|
@@ -54,16 +54,27 @@
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column align="center" width="280px">
|
|
|
|
|
|
+ <el-table-column align="center" width="320px">
|
|
<template slot="header" slot-scope="scope">
|
|
<template slot="header" slot-scope="scope">
|
|
- <span style="margin-right:40px;display:inline-block">目录</span>
|
|
|
|
- <el-radio-group
|
|
|
|
- v-model="classifyType"
|
|
|
|
- @change="handleClassifyTypeChange"
|
|
|
|
- >
|
|
|
|
- <el-radio :label="0">分目录</el-radio>
|
|
|
|
- <el-radio :label="1">同目录</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
|
|
+
|
|
|
|
+ <div class="header-cell">
|
|
|
|
+ <el-radio-group
|
|
|
|
+ v-model="classifyType"
|
|
|
|
+ @change="handleClassifyTypeChange"
|
|
|
|
+ >
|
|
|
|
+ <el-radio :label="0" style="margin-right:10px;">分目录</el-radio>
|
|
|
|
+ <el-radio :label="1">同目录</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ <el-cascader
|
|
|
|
+ v-model="defaultClassifyId"
|
|
|
|
+ :options="classifyOpt"
|
|
|
|
+ :props="levelProps"
|
|
|
|
+ placeholder="请选择指标目录"
|
|
|
|
+ @change="handleClassifyChange(row)"
|
|
|
|
+ style="width:120px"
|
|
|
|
+ :disabled="classifyType===0"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
<template slot-scope="{row,$index}">
|
|
<template slot-scope="{row,$index}">
|
|
<el-cascader
|
|
<el-cascader
|
|
@@ -71,8 +82,7 @@
|
|
:options="classifyOpt"
|
|
:options="classifyOpt"
|
|
:props="levelProps"
|
|
:props="levelProps"
|
|
placeholder="请选择指标目录"
|
|
placeholder="请选择指标目录"
|
|
- :disabled="(classifyType===1&&$index>0)"
|
|
|
|
- @change="handleClassifyChange(row,$index)"
|
|
|
|
|
|
+ :disabled="classifyType===1"
|
|
class="cascader-wrapper"
|
|
class="cascader-wrapper"
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
@@ -128,7 +138,9 @@ export default {
|
|
emitPath:false
|
|
emitPath:false
|
|
},
|
|
},
|
|
|
|
|
|
- existNameArr:[]
|
|
|
|
|
|
+ existNameArr:[],
|
|
|
|
+
|
|
|
|
+ defaultClassifyId: 0,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -164,6 +176,8 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
cancelHandle() {
|
|
cancelHandle() {
|
|
|
|
+ this.classifyType = 0;
|
|
|
|
+ this.defaultClassifyId = 0;
|
|
this.existNameArr = [];
|
|
this.existNameArr = [];
|
|
this.$emit('update:isShow',false)
|
|
this.$emit('update:isShow',false)
|
|
},
|
|
},
|
|
@@ -173,7 +187,7 @@ export default {
|
|
if(this.classifyType===1){
|
|
if(this.classifyType===1){
|
|
// 修改所有的指标的目录为第一个
|
|
// 修改所有的指标的目录为第一个
|
|
this.tableData.forEach(item=>{
|
|
this.tableData.forEach(item=>{
|
|
- item.ClassifyId=e.ClassifyId
|
|
|
|
|
|
+ item.ClassifyId=this.defaultClassifyId
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -241,6 +255,11 @@ export default {
|
|
color: #f00;
|
|
color: #f00;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .header-cell {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
<style lang="scss">
|
|
<style lang="scss">
|