|
|
@@ -100,7 +100,9 @@
|
|
|
<!-- </div>-->
|
|
|
<div class="flex flex-justify-start flex-center">
|
|
|
<span class="bold grey ml-5 ">字段选择</span>
|
|
|
- <el-checkbox v-if='fieldType[selectIndex]' class='ml-20' v-model='fieldType[selectIndex].checkAll' @change='allChange'>全 选</el-checkbox>
|
|
|
+ <el-checkbox v-if='fieldType[selectIndex]' class='ml-20' v-model='fieldType[selectIndex].checkAll'
|
|
|
+ @change='allChange'>全 选
|
|
|
+ </el-checkbox>
|
|
|
<div class='flex flex-center' v-if='selectIndex === 2'>
|
|
|
<div class='bold ml-10 text-right' style='width: 80px'>筛选:</div>
|
|
|
<el-select
|
|
|
@@ -152,7 +154,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="height: 320px;overflow-x: scroll" v-if='selectIndex !== -1'>
|
|
|
- <div class="flex flex-wrap " >
|
|
|
+ <div class="flex flex-wrap ">
|
|
|
<div v-for="(item,index) in fieldType[selectIndex].params" :key='item.id'
|
|
|
class="pointer item" style='height: 30px'>
|
|
|
<el-checkbox v-model='item.checked' :label="item.code" size="large" @change='change(selectIndex,index)'>
|
|
|
@@ -165,7 +167,7 @@
|
|
|
</div>
|
|
|
<div class="flex flex-center mt-20 mb-5">
|
|
|
<base-button title="重置" @click='resetParams' type="0" icon="Refresh"/>
|
|
|
- <base-button title="保存配置" @click='resetParams' class='ml-15' icon="Upload"/>
|
|
|
+ <base-button title="保存配置" @click='saveConfigParams' class='ml-15' icon="Upload"/>
|
|
|
<base-button class="ml-15" title="导出表格" icon="el-icon-download" @click='exportExcel'/>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
@@ -381,14 +383,20 @@ export default {
|
|
|
month: this.month
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- this.parseList(res.data.records, index, false)
|
|
|
+ this.parseList(res.data, index, false)
|
|
|
}
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- this.$api.params.paramsList({ type: this.fieldType[index].dictKey, export: 1 }).then(res => {
|
|
|
+ this.$api.params.paramsList({
|
|
|
+ type: this.fieldType[index].dictKey,
|
|
|
+ export: 1,
|
|
|
+ year: '',
|
|
|
+ season: '',
|
|
|
+ month: ''
|
|
|
+ }).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- this.parseList(res.data.records, index, false)
|
|
|
+ this.parseList(res.data, index, false)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -548,6 +556,16 @@ export default {
|
|
|
this.parseList(res.data.records, this.selectIndex, true)
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ saveConfigParams () {
|
|
|
+ const checkList = this.fieldType[this.selectIndex].params.filter(sub => sub.checked === true).map(sub => sub.id)
|
|
|
+ this.$api.params.saveConfigParams(checkList).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|