Browse Source

feat: 成员管理 & 运营组 - "绑定运营"过滤状态

zhengxy 1 year ago
parent
commit
faf98539c7

+ 6 - 2
project/src/components/assembly/screen/channel.vue

@@ -71,7 +71,7 @@ export default {
71 71
     },
72 72
     afferent_params: {//接口传入数据
73 73
       type: Object,
74
-      default: () => { }
74
+      default: () => ({})
75 75
     },
76 76
     width: {
77 77
       type: String,
@@ -360,7 +360,11 @@ export default {
360 360
       });
361 361
     },
362 362
     getsysUserList () {
363
-      this.$axios.get(this.URL.BASEURL + this.URL.getsysUserList).then((res) => {
363
+      this.$axios.get(this.URL.BASEURL + this.URL.getsysUserList, {
364
+        params: {
365
+          ...this.afferent_params
366
+        }
367
+      }).then((res) => {
364 368
         var res = res.data
365 369
         if (res && res.errno == 0) {
366 370
           this.options = res.rst

+ 6 - 2
project/src/components/assembly/screen/channelMultiple.vue

@@ -56,7 +56,7 @@ export default {
56 56
     },
57 57
     afferent_params: {//接口传入数据
58 58
       type: Object,
59
-      default: () => { }
59
+      default: () => ({})
60 60
     },
61 61
     width: {
62 62
       type: String,
@@ -343,7 +343,11 @@ export default {
343 343
       });
344 344
     },
345 345
     getsysUserList () {
346
-      this.$axios.get(this.URL.BASEURL + this.URL.getsysUserList).then((res) => {
346
+      this.$axios.get(this.URL.BASEURL + this.URL.getsysUserList, {
347
+        params: {
348
+          ...this.afferent_params
349
+        }
350
+      }).then((res) => {
347 351
         var res = res.data
348 352
         if (res && res.errno == 0) {
349 353
           this.options = res.rst

+ 1 - 1
project/src/components/manage/memberComp/memberInfoBind.vue

@@ -27,7 +27,7 @@
27 27
       </div>
28 28
       <div class="form-item">
29 29
         <span class="lable">绑定运营</span>
30
-        <selfChannel v-if="dialogVisible" title="" width="280px" type="circleCreate" :afferent_value="form.operator_id" placeholder="请选择运营" @channelDefine="onChangeOperatorId" />
30
+        <selfChannel v-if="dialogVisible" title="" width="280px" type="circleCreate" :afferent_params="{ type: 1, operator_id: form.operator_id || '' }" :afferent_value="form.operator_id" placeholder="请选择运营" @channelDefine="onChangeOperatorId" />
31 31
       </div>
32 32
     </div>
33 33
     <div slot="footer" class="dialog-footer">

+ 12 - 3
project/src/components/operatorGroup/dialog/operatorGroupDialog.vue

@@ -14,7 +14,7 @@
14 14
       </div>
15 15
       <div class="form-item">
16 16
         <span class="lable required">运营:</span>
17
-        <selfChannel ref="operatorIdEl" title="" type="circleCreate" placeholder="请选择" :labelWidth="true" width="440px" :reset="reset" :afferent_value="form.operator_id" @channelDefine="onChangeOperatorId" />
17
+        <selfChannel v-if="isShowOperatorOptions" title="" type="circleCreate" placeholder="请选择" :labelWidth="true" width="440px" :reset="reset" :afferent_params="{ type: 1, operator_id: form.operator_id || '' }" :afferent_value="form.operator_id" @channelDefine="onChangeOperatorId" />
18 18
       </div>
19 19
       <div class="form-item" style="margin-top:10px;">
20 20
         <span class="lable required">成员:</span>
@@ -55,6 +55,7 @@ export default {
55 55
     return {
56 56
       loading: false,
57 57
       reset: false,
58
+      isShowOperatorOptions: false,
58 59
       form: {
59 60
         group_name: '', // 名称
60 61
         operator_id: '', // 运营
@@ -163,6 +164,8 @@ export default {
163 164
       await this.$nextTick()
164 165
       if (this.isEdit) { // 编辑 => 获取运营组详情 => 回显表单数据
165 166
         this.handleGetGroupDetail()
167
+      } else { // 新建
168
+        this.handleShowOperatorOpt()
166 169
       }
167 170
     },
168 171
     // 获取运营组详情
@@ -179,8 +182,8 @@ export default {
179 182
           console.log('detailInfo => ', detailInfo)
180 183
           this.form.group_name = detailInfo.group_name
181 184
           this.form.operator_id = detailInfo.operator_id
182
-          await this.$nextTick()
183
-          this.$refs.operatorIdEl && this.$refs.operatorIdEl.init_afferent()
185
+
186
+          this.handleShowOperatorOpt() // 回显
184 187
 
185 188
           if (detailInfo.corp_user_list && detailInfo.corp_user_list.length) {
186 189
             const userListRes = []
@@ -215,6 +218,12 @@ export default {
215 218
       this.form.corp_user_list = []
216 219
       this.$refs.customerServiceCorpV2 && this.$refs.customerServiceCorpV2.handleCloseAllOpen()
217 220
       this.reset = !this.reset
221
+      this.isShowOperatorOptions = false
222
+    },
223
+
224
+    // 显示运营选项
225
+    handleShowOperatorOpt() {
226
+      this.isShowOperatorOptions = true
218 227
     },
219 228
   },
220 229
 };