|
@@ -21,9 +21,8 @@
|
|
|
<el-table-column :label="$t('Edb.Detail.e_name')" align="center" width="210px" prop="IndexName"/>
|
|
|
<el-table-column :label="$t('Edb.Detail.e_unit')" align="center" width="150px" prop="Unit"/>
|
|
|
<el-table-column :label="$t('Edb.Detail.e_fre')" align="center" width="120px" prop="Frequency"/>
|
|
|
- <el-table-column align="center" width="280px">
|
|
|
+ <el-table-column align="center" width="320px">
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
- <span style="margin-right:40px;display:inline-block"><!-- 目录 -->{{$t('SelftDataPage.col_menu')}}</span>
|
|
|
<el-radio-group
|
|
|
v-model="classifyType"
|
|
|
@change="handleClassifyTypeChange"
|
|
@@ -31,16 +30,25 @@
|
|
|
<el-radio :label="0"><!-- 分目录 -->{{$t('SelftDataPage.col_part_menu')}}</el-radio>
|
|
|
<el-radio :label="1"><!-- 同目录 -->{{$t('SelftDataPage.col_same_menu')}}</el-radio>
|
|
|
</el-radio-group>
|
|
|
+
|
|
|
+ <el-cascader
|
|
|
+ v-model="defaultClassifyId"
|
|
|
+ :options="classifyOpt"
|
|
|
+ :props="levelProps"
|
|
|
+ placeholder="请选择指标目录"
|
|
|
+ @change="handleClassifyChange(row)"
|
|
|
+ style="width:120px"
|
|
|
+ v-if="classifyType===1"
|
|
|
+ />
|
|
|
</template>
|
|
|
- <template slot-scope="{row,$index}">
|
|
|
- <el-cascader
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <cascader
|
|
|
v-model="row.ClassifyId"
|
|
|
:options="classifyOpt"
|
|
|
- :props="levelProps"
|
|
|
placeholder="请选择指标目录"
|
|
|
- :disabled="(classifyType===1&&$index>0)"
|
|
|
- @change="handleClassifyChange(row,$index)"
|
|
|
+ :disabled="classifyType===1"
|
|
|
class="cascader-wrapper"
|
|
|
+ :config="{ checkStrictly: true, emitPath: false }"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -93,9 +101,12 @@ export default {
|
|
|
levelProps: {
|
|
|
label: 'ClassifyName',
|
|
|
value: 'ClassifyId',
|
|
|
- children: 'Children',
|
|
|
+ children: 'Children',
|
|
|
+ checkStrictly: true,
|
|
|
emitPath:false
|
|
|
},
|
|
|
+
|
|
|
+ defaultClassifyId: 0,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -125,6 +136,8 @@ export default {
|
|
|
},
|
|
|
|
|
|
cancelHandle() {
|
|
|
+ this.classifyType = 0;
|
|
|
+ this.defaultClassifyId = 0;
|
|
|
this.$emit('update:isShow',false)
|
|
|
},
|
|
|
|
|
@@ -133,7 +146,7 @@ export default {
|
|
|
if(this.classifyType===1){
|
|
|
// 修改所有的指标的目录为第一个
|
|
|
this.tableData.forEach(item=>{
|
|
|
- item.ClassifyId=e.ClassifyId
|
|
|
+ item.ClassifyId=this.defaultClassifyId
|
|
|
})
|
|
|
}
|
|
|
},
|