yangjunfeng лет назад: 5
Родитель
Сommit
9980a48d80

+ 11 - 6
CallCenterWeb.UI/src/views/memberManagement/memberList/index.vue

@@ -207,15 +207,20 @@ export default {
207 207
   },
208 208
   filters: {
209 209
     phoneFilter(status) {
210
-      const mtel = status.substr(0, 3) + '****' + status.substr(7)
211
-      return mtel
210
+      if (status) {
211
+        const mtel = status.substr(0, 3) + '****' + status.substr(7)
212
+        return mtel
213
+      }
212 214
     },
213 215
     mobileFilter(status) {
214
-      const arr = status.split(',')
215
-      var mtel = ''
216
-      for (let i = 0; i < arr.length; i++) {
217
-        mtel += arr[i].substr(0, 3) + '****' + arr[i].substr(7) + ','
216
+      if (status) {
217
+        const arr = status.split(',')
218
+        var mtel = ''
219
+        for (let i = 0; i < arr.length; i++) {
220
+          mtel += arr[i].substr(0, 3) + '****' + arr[i].substr(7) + ','
221
+        }
218 222
       }
223
+
219 224
       return mtel
220 225
     }
221 226
   },

+ 27 - 25
CallCenterWeb.UI/src/views/repository/component/addOrEditScore.vue

@@ -36,7 +36,7 @@
36 36
           list-type="text"
37 37
           name="files">
38 38
           <el-button size="small" type="primary">点击上传</el-button>
39
-          </el-upload>
39
+        </el-upload>
40 40
       </el-form-item>
41 41
 
42 42
       <el-form-item>
@@ -73,15 +73,15 @@ export default {
73 73
         id: '', // 当前节点id
74 74
         title: '', // 分类名称
75 75
         content: '', // 分类内容
76
-        remark: '',// 备注
76
+        remark: '', // 备注
77 77
         parentids: [],
78
-        fileList:[]
78
+        fileList: []
79 79
       },
80
-      fileList: [],// 上传文件数组
80
+      fileList: [], // 上传文件数组
81 81
       uploadData: {// 文件上传数据
82 82
         uploadUrl: this.$store.getters.serverConfig.BASE_API + 'api/Knowledge/upload',
83 83
         uploaderFiles: {// 上传文件的参数
84
-        },
84
+        }
85 85
       },
86 86
       rules: {
87 87
         parentids: [
@@ -133,12 +133,12 @@ export default {
133 133
           this.ruleForm.content = res.F_Content // 内容
134 134
           this.ruleForm.remark = res.F_Description // 备注
135 135
           this.ruleForm.parentids = res.ParentId.map(Number).reverse()
136
-          if(res.FileUrl.length!=0){
137
-            res.FileUrl.map(item=>{
136
+          if (res.FileUrl.length != 0) {
137
+            res.FileUrl.map(item => {
138 138
               this.ruleForm.fileList.push({
139
-                name:item.F_Name,
140
-                id:item.F_Id,
141
-                url:item.F_Url,
139
+                name: item.F_Name,
140
+                id: item.F_Id,
141
+                url: item.F_Url
142 142
               })
143 143
               this.fileList.push(item.F_Id)
144 144
             })
@@ -152,13 +152,13 @@ export default {
152 152
         if (valid) {
153 153
           this.ruleForm.typeid = this.ruleForm.parentids[this.ruleForm.parentids.length - 1]
154 154
           this.loading = true
155
-          const params={
156
-            F_CategoryId:this.ruleForm.parentids.length==0?0:this.ruleForm.parentids[this.ruleForm.parentids.length-1],
157
-            F_Title:this.ruleForm.title,          
158
-            F_Content:this.ruleForm.content,          
159
-            F_Description:this.ruleForm.remark,          
160
-            F_RepositoryId:this.scoreid,          
161
-            F_Url:this.fileList.length>0?this.fileList.toString():'',          
155
+          const params = {
156
+            F_CategoryId: this.ruleForm.parentids.length == 0 ? 0 : this.ruleForm.parentids[this.ruleForm.parentids.length - 1],
157
+            F_Title: this.ruleForm.title,
158
+            F_Content: this.ruleForm.content,
159
+            F_Description: this.ruleForm.remark,
160
+            F_RepositoryId: this.scoreid,
161
+            F_Url: this.fileList.length > 0 ? this.fileList.toString() : ''
162 162
           }
163 163
           if (!this.scoreid) {
164 164
             // 添加
@@ -166,8 +166,8 @@ export default {
166 166
               this.loading = false
167 167
               if (response.state.toLowerCase() === 'success') {
168 168
                 this.$parent.$layer.close(this.layerid)
169
-                this.$parent.scoreId=''
170
-                this.$parent.treeclickId=''
169
+                this.$parent.scoreId = ''
170
+                this.$parent.treeclickId = ''
171 171
                 this.$parent.getList() // 重新加载父级数据
172 172
                 this.$parent.getTreeLists() // 重新加载父级数据
173 173
                 this.$message.success('恭喜你,知识库分类添加成功!')
@@ -183,8 +183,8 @@ export default {
183 183
             this.loading = false
184 184
             if (response.state.toLowerCase() === 'success') {
185 185
               this.$parent.$layer.close(this.layerid)
186
-              this.$parent.scoreId=''
187
-              this.$parent.treeclickId=''
186
+              this.$parent.scoreId = ''
187
+              this.$parent.treeclickId = ''
188 188
               this.$parent.getList() // 重新加载父级数据
189 189
               this.$message.success('恭喜你,知识库分类编辑成功!')
190 190
             }
@@ -199,8 +199,10 @@ export default {
199 199
     },
200 200
     // 文件上传
201 201
     uploadSuccess(response, file, fileList) {
202
+      console.log(1, response.data)
202 203
       if (response.state.toLowerCase() === 'success') {
203
-      response.data.map(item=>{
204
+        console.log(1, response.data)
205
+        response.data.map(item => {
204 206
           this.fileList.push(item.F_Id)
205 207
         })
206 208
       } else {
@@ -210,9 +212,9 @@ export default {
210 212
     uploadError(err, file, fileList) {
211 213
       this.$message.error(err)
212 214
     },
213
-    uploadRemove(file,fileList){
214
-      this.fileList=[]
215
-      fileList.map(item=>{
215
+    uploadRemove(file, fileList) {
216
+      this.fileList = []
217
+      fileList.map(item => {
216 218
         this.fileList.push(item.response.data[0].F_Id)
217 219
       })
218 220
     }