riku
2025-04-21 0746b7bbe6aa3d9f02e03654a2cd4fde2081c335
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!--pages/usercenter/notice/publish/index.wxml-->
<view class="page">
  <view class="page-container">
    <view class="title-primary-1"> 通知类型 </view>
    <notice-picker
      noticeMode="{{1}}"
      bind:noticeInitValue="onNoticePickerConfirm"
      bind:noticePickerChange="onNoticePickerConfirm"
    >
    </notice-picker>
    <view class="title-primary-1"> 通知标题 </view>
    <t-textarea
      model:value="{{notice.title}}"
      bordered
      autofocus
      autosize
      confirm-type="next"
      placeholder="输入通知标题"
      bind:change="onTitleChange"
    ></t-textarea>
    <view class="title-primary-1"> 通知内容 </view>
    <t-textarea
      model:value="{{notice.content}}"
      autosize
      bordered
      placeholder="输入通知内容"
      bind:change="onContentChange"
      style="min-height: 300rpx"
    ></t-textarea>
    <t-cell t-class="t-class-cell" title="发送方式" hover>
      <view slot="note" class="notice-type-btn-wrap">
        <text
          class="notice-type-btn {{switchValue ? 'notice-type-btn__selected' : ''}}"
          bind:tap="switchMode"
          >全域群发</text
        >
        <text
          class="notice-type-btn {{switchValue ? '' : 'notice-type-btn__selected'}}"
          bind:tap="switchMode"
          >定向企业</text
        >
        <!-- <text>{{switchValue ? '全域群发' : '定向企业'}}</text>
        <t-switch
          defaultValue="{{true}}"
          value="{{switchValue}}"
          bind:change="switchMode"
        /> -->
      </view>
    </t-cell>
    <block wx:if="{{mode == 0}}">
      <scene-picker
        bind:sceneInitValue="onScenePickerConfirm"
        bind:scenePickerChange="onScenePickerConfirm"
      >
        <view slot="text">
          <t-cell
            t-class="t-class-cell"
            title="场景类型"
            arrow
            hover
            note="{{sceneText}}"
          />
        </view>
      </scene-picker>
      <district-picker
        bind:districtInitValue="onDistrictPickerConfirm"
        bind:districtPickerChange="onDistrictPickerConfirm"
      >
        <view slot="text">
          <t-cell
            t-class="t-class-cell"
            title="区县"
            arrow
            hover
            note="{{districtText}}"
          />
        </view>
      </district-picker>
      <town-picker
        districtCode="{{districtValue[0]}}"
        bind:townInitValue="onTownPickerConfirm"
        bind:townPickerChange="onTownPickerConfirm"
      >
        <view slot="text">
          <t-cell
            t-class="t-class-cell"
            title="街镇"
            arrow
            hover
            note="{{townText}}"
          />
        </view>
      </town-picker>
    </block>
    <block wx:else>
      <t-cell
        t-class="t-class-cell"
        title="通知企业"
        arrow
        hover
        note="{{receiverText}}"
        bindtap="openUserList"
      />
    </block>
  </view>
  <view class="page-footer">
    <t-button
      class="btn-left"
      size="large"
      theme="danger"
      variant="outline"
      bindtap="onCancelCheck"
      data-key="showCancel"
      >取消</t-button
    >
    <t-button
      class="btn-right"
      size="large"
      theme="primary"
      bindtap="onConfirmCheck"
      data-key="showConfirm"
      >发布</t-button
    >
  </view>
</view>
 
<t-dialog
  visible="{{showConfirm}}"
  title="发布确认"
  content="请确认当前通知内容填写无误"
  confirm-btn="{{ { content: '确定', variant: 'base' } }}"
  cancel-btn="取消"
  bind:confirm="onConfirm"
  bind:cancel="closeDialog"
/>
 
<t-dialog
  visible="{{showCancel}}"
  content="确定取消当前已编辑的通知内容?"
  confirm-btn="{{ { content: '确定', variant: 'base', theme: 'danger' } }}"
  cancel-btn="取消"
  bind:confirm="onCancel"
  bind:cancel="closeDialog"
/>
 
<t-popup
  visible="{{popupVisible}}"
  bind:visible-change="onVisibleChange"
  placement="right"
>
  <user-list
    refresh="{{popupRefresh}}"
    bind:clickConfirm="popupConfirm"
    bind:clickCancel="popupCancel"
  ></user-list>
</t-popup>