ソースを参照

cascader改多选后带来的亿点问题

cxmo 10 ヶ月 前
コミット
4117cbfff6
1 ファイル変更11 行追加5 行削除
  1. 11 5
      src/views/system_manage/dataRefreshSetting.vue

+ 11 - 5
src/views/system_manage/dataRefreshSetting.vue

@@ -36,7 +36,7 @@
                         :show-all-levels="false"
                         collapse-tags
                         :props="{
-                            emitPath:false,
+                            emitPath:true,
                             value:'ClassifyId',
                             label:'ClassifyName',
                             children:'Children',
@@ -51,7 +51,7 @@
                             label: 'ItemName',
                             children: 'Children',
                             emitPath: false,
-                            multiple:true
+                            multiple:true,
                         }"
                         collapse-tags
                         :show-all-levels="false"
@@ -412,10 +412,12 @@ export default {
         },
         async getTableData(type){
             const {frequency,user,classify,state,terminalCode,keyWord,sortParam,sortType} = this.selectOption
+            const classifyArr = Array.isArray(classify)?classify:[]
+            const classifyId = [...new Set(classifyArr.join(',').split(','))]
             const res = await dataRefreshInterface.getEdbTableList({
                 Source:Number(this.Source),
                 SubSource:Number(this.SubSource),
-                ClassifyId:Array.isArray(classify)?classify.join(','):classify,
+                ClassifyId:classifyId.join(','),
                 TerminalCode:terminalCode,
                 SysUserId:Array.isArray(user)?user.join(','):user,
                 Frequency:Array.isArray(frequency)?frequency.join(','):frequency,
@@ -574,10 +576,12 @@ export default {
         },
         setRefreshTime(list){
             const {frequency,user,classify,state,terminalCode,keyWord} = this.selectOption
+            const classifyArr = Array.isArray(classify)?classify:[]
+            const classifyId = [...new Set(classifyArr.join(',').split(','))]
             dataRefreshInterface.setRefreshTime({
                 Source:Number(this.Source),
                 SubSource:Number(this.SubSource),
-                ClassifyId:Array.isArray(classify)?classify.join(','):classify,
+                ClassifyId:classifyId.join(','),
                 TerminalCode:terminalCode,
                 SysUserId:Array.isArray(user)?user.join(','):user,
                 Frequency:Array.isArray(frequency)?frequency.join(','):frequency,
@@ -607,10 +611,12 @@ export default {
         },
         setRefreshStatus(){
             const {frequency,user,classify,state,terminalCode,keyWord} = this.selectOption
+            const classifyArr = Array.isArray(classify)?classify:[]
+            const classifyId = [...new Set(classifyArr.join(',').split(','))]
             dataRefreshInterface.setRefreshStatus({
                 Source:Number(this.Source),
                 SubSource:Number(this.SubSource),
-                ClassifyId:Array.isArray(classify)?classify.join(','):classify,
+                ClassifyId:classifyId.join(','),
                 TerminalCode:terminalCode,
                 SysUserId:Array.isArray(user)?user.join(','):user,
                 Frequency:Array.isArray(frequency)?frequency.join(','):frequency,