cxmo 10 months ago
parent
commit
d5b9ba203b

+ 6 - 6
src/api/modules/dataApi.js

@@ -449,10 +449,10 @@ const dataRefreshInterface = {
      * @param {Object} params 
      * @param {Object} params 
      * @param {Number} params.Source
      * @param {Number} params.Source
      * @param {Number} params.SubSource
      * @param {Number} params.SubSource
-     * @param {Number} params.ClassifyId 筛选项
+     * @param {String} params.ClassifyId 筛选项 多选
      * @param {String} params.TerminalCode 筛选项
      * @param {String} params.TerminalCode 筛选项
-     * @param {Number} params.SysUserId 筛选项
-     * @param {String} params.Frequency 筛选项
+     * @param {String} params.SysUserId 筛选项 多选
+     * @param {String} params.Frequency 筛选项 多选
      * @param {String} params.Keyword 筛选项
      * @param {String} params.Keyword 筛选项
      * @param {String} params.Status 筛选项
      * @param {String} params.Status 筛选项
      * @param {Boolean} params.IsSelectAll
      * @param {Boolean} params.IsSelectAll
@@ -490,10 +490,10 @@ const dataRefreshInterface = {
      * @param {Object} params 
      * @param {Object} params 
      * @param {Number} params.Source
      * @param {Number} params.Source
      * @param {Number} params.SubSource
      * @param {Number} params.SubSource
-     * @param {Number} params.ClassifyId 筛选项
+     * @param {String} params.ClassifyId 筛选项 多选
      * @param {String} params.TerminalCode 筛选项
      * @param {String} params.TerminalCode 筛选项
-     * @param {Number} params.SysUserId 筛选项
-     * @param {String} params.Frequency 筛选项
+     * @param {String} params.SysUserId 筛选项 多选
+     * @param {String} params.Frequency 筛选项 多选
      * @param {String} params.Keyword 筛选项
      * @param {String} params.Keyword 筛选项
      * @param {String} params.Status 筛选项
      * @param {String} params.Status 筛选项
      * @param {Boolean} params.IsSelectAll
      * @param {Boolean} params.IsSelectAll

+ 3 - 3
src/views/system_manage/components/refreshConfig.vue

@@ -15,7 +15,7 @@
                     </el-form-item>
                     </el-form-item>
                     
                     
                     <!-- 每周 -->
                     <!-- 每周 -->
-                    <el-form-item :prop="`configList[${index}].frequency_week`" v-if="item.frequency==='week'" :rules="{required:true,message:'请选择刷新频率',trigger: 'blur'}">
+                    <el-form-item :prop="`configList[${index}].frequency_week`" v-if="item.frequency.includes('周')" :rules="{required:true,message:'请选择刷新频率',trigger: 'blur'}">
                         <el-select v-model="item.frequency_week" class="full-input" key="week">
                         <el-select v-model="item.frequency_week" class="full-input" key="week">
                             <el-option v-for="i in weekList" :key="i.key" 
                             <el-option v-for="i in weekList" :key="i.key" 
                                 :label="i.label" :value="i.key"/>
                                 :label="i.label" :value="i.key"/>
@@ -23,14 +23,14 @@
                     </el-form-item>
                     </el-form-item>
                     
                     
                     <!-- 每旬、月、季、半年、年 -->
                     <!-- 每旬、月、季、半年、年 -->
-                    <el-form-item :prop="`configList[${index}].frequency_last`" v-if="!item.frequency.includes('日')&&!item.frequency.includes('')"
+                    <el-form-item :prop="`configList[${index}].frequency_last`" v-if="!item.frequency.includes('日')&&!item.frequency.includes('')"
                         :rules="{required:true,message:'请选择刷新频率',trigger: 'blur'}">
                         :rules="{required:true,message:'请选择刷新频率',trigger: 'blur'}">
                         <el-select v-model="item.frequency_last" :key="item.key" key="option">
                         <el-select v-model="item.frequency_last" :key="item.key" key="option">
                             <el-option v-for="i in timeOptionList" :key="i.key" 
                             <el-option v-for="i in timeOptionList" :key="i.key" 
                                 :label="i.label" :value="i.key"/>
                                 :label="i.label" :value="i.key"/>
                         </el-select>
                         </el-select>
                     </el-form-item>
                     </el-form-item>
-                    <el-form-item :prop="`configList[${index}].frequency_n`" v-if="item.frequency_last==='n'&&!item.frequency.includes('日')&&!item.frequency.includes('')"
+                    <el-form-item :prop="`configList[${index}].frequency_n`" v-if="item.frequency_last==='n'&&!item.frequency.includes('日')&&!item.frequency.includes('')"
                         :rules="{required:true,message:'请选择刷新频率',trigger: 'blur'}">
                         :rules="{required:true,message:'请选择刷新频率',trigger: 'blur'}">
                         <el-input v-model="item.frequency_n" type="number" :min="1" :max="n_limit_map[item.frequency]||10">
                         <el-input v-model="item.frequency_n" type="number" :min="1" :max="n_limit_map[item.frequency]||10">
                             <template slot="prefix">N=</template>
                             <template slot="prefix">N=</template>

+ 15 - 13
src/views/system_manage/dataRefreshSetting.vue

@@ -19,7 +19,7 @@
             
             
             <el-input placeholder="指标ID/指标名称" prefix-icon="el-icon-search" clearable
             <el-input placeholder="指标ID/指标名称" prefix-icon="el-icon-search" clearable
                 v-model="selectOption.keyWord" @input="selectOptionChange('keyWord')"
                 v-model="selectOption.keyWord" @input="selectOptionChange('keyWord')"
-                v-if="![34,11].includes(Source)"></el-input>
+                v-if="![34,11].includes(Source)&&Source"></el-input>
             
             
         </div>
         </div>
         <div class="table-box" v-if="hasSelectOption">
         <div class="table-box" v-if="hasSelectOption">
@@ -34,6 +34,7 @@
                         v-model="selectOption.classify" @change="selectOptionChange('classify')"
                         v-model="selectOption.classify" @change="selectOptionChange('classify')"
                         :options="edbClassifyList" 
                         :options="edbClassifyList" 
                         :show-all-levels="false"
                         :show-all-levels="false"
+                        collapse-tags
                         :props="{
                         :props="{
                             emitPath:false,
                             emitPath:false,
                             value:'ClassifyId',
                             value:'ClassifyId',
@@ -42,7 +43,7 @@
                             multiple:true
                             multiple:true
                         }" />
                         }" />
                     <el-cascader
                     <el-cascader
-                        placeholder="创建人" no-match-text="请选择完整数据源" 
+                        placeholder="创建人" no-match-text="请选择完整数据源" style="height: 40px;"
                         v-model="selectOption.user" @change="selectOptionChange('user')"
                         v-model="selectOption.user" @change="selectOptionChange('user')"
                         :options="userList"
                         :options="userList"
                         :props="{
                         :props="{
@@ -57,7 +58,7 @@
                         clearable
                         clearable
                         filterable 
                         filterable 
                     />
                     />
-                    <el-select placeholder="频度" v-model="selectOption.frequency" @change="selectOptionChange('frequency')" multiple clearable>
+                    <el-select placeholder="频度" v-model="selectOption.frequency" @change="selectOptionChange('frequency')" multiple collapse-tags clearable>
                         <el-option v-for="i in frequencyList" :key="i"
                         <el-option v-for="i in frequencyList" :key="i"
                             :label="i" :value="i"
                             :label="i" :value="i"
                         />
                         />
@@ -345,12 +346,12 @@ export default {
             //如果没有二级数据源,则请求表格筛选项数据;钢联化工,SMM没有筛选项数据
             //如果没有二级数据源,则请求表格筛选项数据;钢联化工,SMM没有筛选项数据
             if(!this.SubSourceList.length&&this.hasSelectOption){
             if(!this.SubSourceList.length&&this.hasSelectOption){
                 this.getSelectOption()
                 this.getSelectOption()
-                this.getTableData('optionChange')
+                this.selectOptionChange()
             }
             }
         },
         },
         handleSubSourceChange(){
         handleSubSourceChange(){
             this.getSelectOption()
             this.getSelectOption()
-            this.getTableData('optionChange')
+            this.selectOptionChange()
         },
         },
         //获取终端编码列表
         //获取终端编码列表
         async getTerminalCodeList(){
         async getTerminalCodeList(){
@@ -402,6 +403,7 @@ export default {
         },
         },
         //表格筛选项改变时触发
         //表格筛选项改变时触发
         selectOptionChange(type){
         selectOptionChange(type){
+            this.currentPage = 1
             this.getTableData('optionChange')
             this.getTableData('optionChange')
         },
         },
         handleCurrentChange(page){
         handleCurrentChange(page){
@@ -575,10 +577,10 @@ export default {
             dataRefreshInterface.setRefreshTime({
             dataRefreshInterface.setRefreshTime({
                 Source:Number(this.Source),
                 Source:Number(this.Source),
                 SubSource:Number(this.SubSource),
                 SubSource:Number(this.SubSource),
-                ClassifyId:Number(classify),
+                ClassifyId:Array.isArray(classify)?classify.join(','):classify,
                 TerminalCode:terminalCode,
                 TerminalCode:terminalCode,
-                SysUserId:user,
-                Frequency:frequency,
+                SysUserId:Array.isArray(user)?user.join(','):user,
+                Frequency:Array.isArray(frequency)?frequency.join(','):frequency,
                 Keyword:keyWord,
                 Keyword:keyWord,
                 Status:state,
                 Status:state,
                 IsSelectAll:this.isSelectAll,
                 IsSelectAll:this.isSelectAll,
@@ -587,7 +589,7 @@ export default {
             }).then(res=>{
             }).then(res=>{
                 if(res.Ret!==200) return
                 if(res.Ret!==200) return
                 this.$message.success("设置刷新时间成功")
                 this.$message.success("设置刷新时间成功")
-                this.getTableData('optionChange')
+                this.selectOptionChange()
                 this.isSetTimeDialogShow = false
                 this.isSetTimeDialogShow = false
             })
             })
         },
         },
@@ -608,10 +610,10 @@ export default {
             dataRefreshInterface.setRefreshStatus({
             dataRefreshInterface.setRefreshStatus({
                 Source:Number(this.Source),
                 Source:Number(this.Source),
                 SubSource:Number(this.SubSource),
                 SubSource:Number(this.SubSource),
-                ClassifyId:Number(classify),
+                ClassifyId:Array.isArray(classify)?classify.join(','):classify,
                 TerminalCode:terminalCode,
                 TerminalCode:terminalCode,
-                SysUserId:user,
-                Frequency:frequency,
+                SysUserId:Array.isArray(user)?user.join(','):user,
+                Frequency:Array.isArray(frequency)?frequency.join(','):frequency,
                 Keyword:keyWord,
                 Keyword:keyWord,
                 Status:state,
                 Status:state,
                 IsSelectAll:this.isSelectAll,
                 IsSelectAll:this.isSelectAll,
@@ -620,7 +622,7 @@ export default {
             }).then(res=>{
             }).then(res=>{
                 if(res.Ret!==200) return 
                 if(res.Ret!==200) return 
                 this.$message.success("设置刷新状态成功")
                 this.$message.success("设置刷新状态成功")
-                this.getTableData('optionChange')
+                this.selectOptionChange()
                 this.isSetStateDialogShow = false
                 this.isSetStateDialogShow = false
             })
             })
         },
         },