Browse Source

Merge branch 'master' of http://101.200.220.49:8001/xiuli.gao/playlet

xiuli.gao 2 years ago
parent
commit
53a5b5e7bc

+ 40 - 4
project/src/components/assembly/tagGroup.vue

@@ -5,7 +5,7 @@
5 5
     :append-to-body="true"
6 6
     class="addLable_dialog"
7 7
     width="40%">
8
-    <div class="groupCon">
8
+    <div class="groupCon" v-loading="loading">
9 9
       <div class="group_item">
10 10
         <div class="lable">标签组名称:</div>
11 11
         <div class="opaArea">
@@ -57,8 +57,8 @@
57 57
       <div class="flex">
58 58
         <div class="f14 c-00B38A pointer" @click="deleTagGroup()" v-if="source == 'edit'">删除该标签组</div>
59 59
         <div class="lMarauto">
60
-          <el-button size="mini" @click="lableGroup = false">取 消</el-button>
61
-          <el-button size="mini" type="primary" @click="source == 'add' ? addTagGroup() : editTagGroup()">确 定</el-button>
60
+          <el-button :disabled="loading" size="mini" @click="lableGroup = false">取 消</el-button>
61
+          <el-button :disabled="loading" size="mini" type="primary" @click="source == 'add' ? addTagGroup() : editTagGroup()">确 定</el-button>
62 62
         </div>
63 63
       </div>
64 64
     </div>
@@ -72,6 +72,7 @@ export default {
72 72
   data(){
73 73
     return{
74 74
       lableGroup:false,
75
+      loading:false,
75 76
       groupName:'',
76 77
       groupId:'',
77 78
       moreLable:[{tag_id:0,tag_name:''}],//添加标签组时,新增标签的数据列表,传给后台
@@ -84,6 +85,7 @@ export default {
84 85
         cancelButtonText: '取消',
85 86
         type: 'warning'
86 87
       }).then(() => {
88
+        this.loading = true
87 89
         this.$axios.post(this.URL.BASEURL + this.URL.dele_tag_group, {
88 90
           group_id: this.groupId
89 91
         }).then((res) => {
@@ -96,6 +98,13 @@ export default {
96 98
             message: res.err,
97 99
             type: "warning"
98 100
           })
101
+          this.loading = false
102
+        }).catch(err=>{
103
+          this.$message({
104
+            message: '服务故障,请稍候再试',
105
+            type: "warning"
106
+          })
107
+          this.loading = false
99 108
         })
100 109
       })
101 110
     },
@@ -107,17 +116,24 @@ export default {
107 116
         })
108 117
         return false
109 118
       }
119
+      let tagFlag=false
110 120
       this.moreLable.forEach(m=>{
111 121
         if(m.tag_name==''){
112 122
           this.$message({
113 123
             message: '标签名称不能为空',
114 124
             type: "warning"
115 125
           })
126
+          tagFlag = true
116 127
           return false
117 128
         }
118 129
       })
130
+      if(tagFlag){
131
+        return false
132
+      }
133
+      this.loading = true
119 134
       this.$axios.post(this.URL.BASEURL + this.URL.edit_tag_group, {
120 135
         group_name: this.groupName,
136
+        group_id: this.groupId,
121 137
         tag_list:this.moreLable
122 138
       }).then((res) => {
123 139
         var res = res.data
@@ -129,9 +145,16 @@ export default {
129 145
           message: res.err,
130 146
           type: "warning"
131 147
         })
148
+        this.loading = false
149
+      }).catch(err=>{
150
+        this.$message({
151
+          message: '服务故障,请稍候再试',
152
+          type: "warning"
153
+        })
154
+        this.loading = false
132 155
       })
133 156
     },
134
-    addTagGroup(){
157
+    addTagGroup(){ //
135 158
       if(this.groupName==''){
136 159
         this.$message({
137 160
           message: '标签组名称不能为空',
@@ -139,15 +162,21 @@ export default {
139 162
         })
140 163
         return false
141 164
       }
165
+      let tagFlag=false
142 166
       this.moreLable.forEach(m=>{
143 167
         if(m.tag_name==''){
144 168
           this.$message({
145 169
             message: '标签名称不能为空',
146 170
             type: "warning"
147 171
           })
172
+          tagFlag = true
148 173
           return false
149 174
         }
150 175
       })
176
+      if(tagFlag){
177
+        return false
178
+      }
179
+      this.loading = true
151 180
       this.$axios.post(this.URL.BASEURL + this.URL.add_tag_group, {
152 181
         group_name: this.groupName,
153 182
         tag_list:this.moreLable
@@ -161,6 +190,13 @@ export default {
161 190
           message: res.err,
162 191
           type: "warning"
163 192
         })
193
+        this.loading = false
194
+      }).catch(err=>{
195
+        this.$message({
196
+          message: '服务故障,请稍候再试',
197
+          type: "warning"
198
+        })
199
+        this.loading = false
164 200
       })
165 201
     },
166 202
     // 上移

+ 28 - 25
project/src/components/detials/index.vue

@@ -70,9 +70,13 @@
70 70
       <!--      <chatGroup v-if="acIdx == 3"></chatGroup>-->
71 71
       <order v-if="acIdx == 4" :rowProp="rowProp"></order>
72 72
     </div>
73
-
74
-    <el-dialog v-loading="dialogLoading" title="选择企业标签" :visible.sync="comLableShow" :append-to-body="true" class="addLable_dialog" width="30%">
75
-      <div class="addLableBox">
73
+    <el-dialog
74
+      title="选择企业标签"
75
+      :visible.sync="comLableShow"
76
+      :append-to-body="true"
77
+      class="addLable_dialog"
78
+      width="30%">
79
+      <div class="addLableBox" v-loading="dialogLoading">
76 80
         <!--后台说先不做-->
77 81
         <template v-if="false">
78 82
           <div class="add" @click="iptshow = true,addLableVal = ''">+ 添加</div>
@@ -96,8 +100,8 @@
96 100
           +新建标签组
97 101
         </div>
98 102
         <div>
99
-          <el-button size="mini" @click="comLableShow = false">取 消</el-button>
100
-          <el-button size="mini" type="primary" @click="edit_tag">确 定</el-button>
103
+          <el-button :disabled="dialogLoading" size="mini" @click="comLableShow = false">取 消</el-button>
104
+          <el-button :disabled="dialogLoading" size="mini" type="primary" @click="edit_tag">确 定</el-button>
101 105
         </div>
102 106
       </div>
103 107
     </el-dialog>
@@ -209,14 +213,8 @@ export default {
209 213
     chatRecord,
210 214
     order,
211 215
   },
212
-  methods: {
213
-    onPerson () {
214
-
215
-    },
216
-    nextPerson () {
217
-
218
-    },
219
-    edit_tag () {//选择企业标签框的确定
216
+  methods:{
217
+    edit_tag(){//选择企业标签框的确定
220 218
       // this.comLableShow = true
221 219
       this.dialogLoading = true
222 220
       this.$axios.post(this.URL.BASEURL + this.URL.tag_detial_edit, {
@@ -237,27 +235,32 @@ export default {
237 235
         this.dialogLoading = false
238 236
       })
239 237
     },
240
-    init_tag () {
238
+    init_tag(){//点击企业标签编辑,初始化标签列表
241 239
       this.comLableShow = true
242
-      this.$axios.get(this.URL.BASEURL + this.URL.tag_detial_list, {
243
-        params: {
244
-          customer_id: this.rowProp.customer_id,
245
-          user_id: this.rowProp.user_id
240
+      this.dialogLoading = true
241
+      this.$axios.get(this.URL.BASEURL + this.URL.tag_detial_list,{
242
+        params:{
243
+          customer_id:this.rowProp.customer_id,
244
+          user_id:this.rowProp.user_id
246 245
         }
247 246
       }).then((res) => {
248 247
         res = res.data
249 248
         this.lableArr = res.rst
250
-
251
-        this.lableArr_checked = []
252
-        res.rst.forEach(l => {
253
-          l.tag_list.forEach(t => {
254
-            if (t.selected == 1) {
249
+        this.lableArr_checked=[]
250
+        res.rst.forEach(l=>{
251
+          l.tag_list.forEach(t=>{
252
+            if(t.selected == 1){
255 253
               this.lableArr_checked.push(t.tag_id)
256 254
             }
257 255
           })
258 256
         })
259
-        console.log(this.lableArr_checked, ' this.lableArr_checked');
260
-
257
+        this.dialogLoading = false
258
+      }).catch(err=>{
259
+        this.$message({
260
+          message: '服务故障,请稍候再试',
261
+          type: "warning"
262
+        })
263
+        this.dialogLoading = false
261 264
       })
262 265
     },
263 266
     init () {

+ 3 - 3
project/src/components/manage/memberManage.vue

@@ -17,9 +17,9 @@
17 17
           部门信息
18 18
         </div>
19 19
         <div>
20
-          <div v-for="c in depart_List" :key="c.department_id" class="tMar20 flex-align-center">
21
-            <i class="el-icon-success c-00B38A f16 rMar7 pointer" v-if="checkVals.indexOf(c.department_id)>-1" @click="checkDepartId(c.department_id)"></i>
22
-            <i class="el-icon-circle rMar7 pointer" @click="checkDepartId(c.department_id)" v-else></i>
20
+          <div v-for="c in depart_List" :key="c.department_id" class="tMar20 flex-align-center pointer" @click="checkDepartId(c.department_id)">
21
+            <i class="el-icon-success c-00B38A f16 rMar7" v-if="checkVals.indexOf(c.department_id)>-1" ></i>
22
+            <i class="el-icon-circle rMar7" v-else></i>
23 23
             {{c.department_id}}
24 24
           </div>
25 25
         </div>