|
@@ -22,18 +22,21 @@
|
|
|
<el-cascader :placeholder="$t('HighFrequencyData.select_classify_prompt')"
|
|
|
v-model="classifyArr" @change="searchListDelay" :options="classifyListTree"
|
|
|
style="max-width: 160px;"
|
|
|
+ key="isAssociativeSub"
|
|
|
+ v-if="searchParams.isAssociativeSub"
|
|
|
:show-all-levels="false" collapse-tags
|
|
|
- :props="{
|
|
|
- emitPath:false,
|
|
|
- value:'ClassifyId',
|
|
|
- label:'ClassifyName',
|
|
|
- children:'Children',
|
|
|
- multiple:true
|
|
|
- }"
|
|
|
+ :props="classifyProps"
|
|
|
+ clearable/>
|
|
|
+ <el-cascader :placeholder="$t('HighFrequencyData.select_classify_prompt')"
|
|
|
+ v-model="classifyArr" @change="searchListDelay" :options="classifyListTree"
|
|
|
+ style="max-width: 160px;" v-else key="noIsAssociativeSub"
|
|
|
+ :show-all-levels="false" collapse-tags
|
|
|
+ :props="classifyProps"
|
|
|
clearable/>
|
|
|
+ {{ classifyArr }}
|
|
|
<div class="associative-box">
|
|
|
<span>{{$t('HighFrequencyData.associative_sub_classify')}}</span>
|
|
|
- <el-switch v-model="searchParams.isAssociativeSub" @change="searchList"></el-switch>
|
|
|
+ <el-switch v-model="searchParams.isAssociativeSub" @change="changeAssociativeSub"></el-switch>
|
|
|
<span class="span-button" @click="setClassify"
|
|
|
v-permission="[permissionBtn.dataSourcePermission.highFrequency_classify_move,permissionBtn.dataSourcePermission.highFrequency_classify_delete,
|
|
|
permissionBtn.dataSourcePermission.highFrequency_classify_editAdd,'or']"
|
|
@@ -375,36 +378,25 @@ import addToIndexDatabaseBatch from './components/highFrequency/addToIndexDataba
|
|
|
},
|
|
|
frequencyList() {
|
|
|
return [
|
|
|
- {
|
|
|
- value: "1m",
|
|
|
- label: "1m",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "3m",
|
|
|
- label: '3m',
|
|
|
- },
|
|
|
- {
|
|
|
- value: "5m",
|
|
|
- label: "5m",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "10m",
|
|
|
- label: "10m",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "15m",
|
|
|
- label: "15m",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "30m",
|
|
|
- label: "30m",
|
|
|
- },
|
|
|
- {
|
|
|
- value: "60m",
|
|
|
- label: "60m",
|
|
|
- },
|
|
|
+ {value: "1m",label: "1m"},
|
|
|
+ {value: "3m",label: '3m'},
|
|
|
+ {value: "5m",label: "5m"},
|
|
|
+ {value: "10m",label: "10m"},
|
|
|
+ {value: "15m",label: "15m"},
|
|
|
+ {value: "30m",label: "30m"},
|
|
|
+ {value: "60m",label: "60m"}
|
|
|
];
|
|
|
},
|
|
|
+ classifyProps(){
|
|
|
+ return {
|
|
|
+ checkStrictly:(!this.searchParams.isAssociativeSub),
|
|
|
+ value:'ClassifyId',
|
|
|
+ label:'ClassifyName',
|
|
|
+ children:'Children',
|
|
|
+ emitPath:this.searchParams.isAssociativeSub,
|
|
|
+ multiple:true
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
watch:{
|
|
|
classifyArr(value){
|
|
@@ -484,6 +476,11 @@ import addToIndexDatabaseBatch from './components/highFrequency/addToIndexDataba
|
|
|
// 调用 callback 返回建议列表的数据
|
|
|
cb(results);
|
|
|
},
|
|
|
+ changeAssociativeSub(value){
|
|
|
+ // 清空
|
|
|
+ this.classifyArr=[]
|
|
|
+ this.searchListDelay()
|
|
|
+ },
|
|
|
searchListDelay(){
|
|
|
setTimeout(()=>{
|
|
|
this.searchList()
|
|
@@ -491,7 +488,6 @@ import addToIndexDatabaseBatch from './components/highFrequency/addToIndexDataba
|
|
|
},
|
|
|
//表格筛选项改变时触发
|
|
|
searchList(){
|
|
|
- console.log('search');
|
|
|
this.searchParams.currentPage = 1
|
|
|
this.getTableData('search')
|
|
|
},
|
|
@@ -525,9 +521,9 @@ import addToIndexDatabaseBatch from './components/highFrequency/addToIndexDataba
|
|
|
}
|
|
|
if(type==='search'){
|
|
|
//如果是表格筛选项改变导致重新请求数据
|
|
|
- //数据获取完成后,列表全选,表格全选
|
|
|
+ //清除所选
|
|
|
this.selectList = []
|
|
|
- this.listCheckAllChange(true)
|
|
|
+ this.listCheckAllChange(false)
|
|
|
}else{
|
|
|
//若不是,数据获取完成后,查询列表全选的值
|
|
|
//若当页有数据在selectList内,则勾选/剔除
|
|
@@ -727,7 +723,7 @@ import addToIndexDatabaseBatch from './components/highFrequency/addToIndexDataba
|
|
|
this.classifySettingShow=true
|
|
|
},
|
|
|
classifyCloseHandle({requestClassifyList,requestDataList}){
|
|
|
- if(requestDataList) this.getTableData()
|
|
|
+ if(requestDataList) this.getTableData('search')
|
|
|
if(requestClassifyList) this.getClassifyList()
|
|
|
this.classifySettingShow=false
|
|
|
},
|
|
@@ -778,10 +774,30 @@ import addToIndexDatabaseBatch from './components/highFrequency/addToIndexDataba
|
|
|
}
|
|
|
highFrequencyDataInterface.highFreDataBatchOperation(params).then(res=>{
|
|
|
if(res.Ret == 200){
|
|
|
- this.$message.success(this.$t('MsgPrompt.operate_success_msg'))
|
|
|
if(this.batchOperationData.type==2){
|
|
|
+ // 批量删除
|
|
|
+ let deleteFails=res.Data.Fail || []
|
|
|
+ let deleteSuccess=res.Data.Success || []
|
|
|
+ if(deleteSuccess.length) this.$message.success(this.$t('MsgPrompt.operate_success_msg'))
|
|
|
+
|
|
|
+ if(deleteFails){
|
|
|
+ let message = '';
|
|
|
+ deleteFails.forEach(item => {
|
|
|
+ message+=`${item.IndexName}:${this.$t('HighFrequencyData.indicator_been_referenced_prompt')}</br>`
|
|
|
+ })
|
|
|
+ // 和成功提示错开
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
// 删除之后 调整选中
|
|
|
this.listCheckAllChange(false)
|
|
|
+ }else{
|
|
|
+ this.$message.success(this.$t('MsgPrompt.operate_success_msg'))
|
|
|
}
|
|
|
this.getTableData()
|
|
|
this.batchOperationDialogShow=false
|