|
|
|
|
@ -26,7 +26,7 @@
|
|
|
|
|
v-hasPermi="['kaohe:gather:add']"
|
|
|
|
|
>新增</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<!-- <el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="success"
|
|
|
|
|
plain
|
|
|
|
|
@ -36,7 +36,7 @@
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
v-hasPermi="['kaohe:gather:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-col>-->
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="danger"
|
|
|
|
|
@ -64,19 +64,27 @@
|
|
|
|
|
<el-table v-loading="loading" :data="gatherList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="主键" align="center" prop="id" />
|
|
|
|
|
<el-table-column label="一级标题" align="center" prop="hzName" />
|
|
|
|
|
<el-table-column label="表头" align="center" prop="tableHeader" />
|
|
|
|
|
<el-table-column label="表数据" align="center" prop="tableData" />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<el-table-column label="一级标题" align="center" prop="hzName" min-width="200" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="表头" align="center" prop="tableHeader" min-width="200" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="表数据" align="center" prop="tableData" min-width="200" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" min-width="150" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
<!-- <el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['kaohe:gather:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
>修改</el-button>-->
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-view"
|
|
|
|
|
@click="viewKaoHeScore(scope.row)"
|
|
|
|
|
v-hasPermi="['kaohe:gather:query']"
|
|
|
|
|
>查看生成汇总
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
@ -150,6 +158,20 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!--查看生成汇总-->
|
|
|
|
|
<el-dialog title="查看生成汇总" :visible.sync="khdf.open" width="90%" top="20px !important">
|
|
|
|
|
|
|
|
|
|
<el-table border :data="khdf.list" height="650px">
|
|
|
|
|
<template v-for="column in khdf.tableHeader">
|
|
|
|
|
<table-column :key="column.label" :column="column" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="khdf.open=false">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -164,6 +186,12 @@ export default {
|
|
|
|
|
components: { TableColumn, RecursiveTree },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 考核得分
|
|
|
|
|
khdf:{
|
|
|
|
|
open: false,
|
|
|
|
|
list: [],
|
|
|
|
|
tableHeader: []
|
|
|
|
|
},
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
|
@ -271,7 +299,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
console.log(this.treeData);
|
|
|
|
|
addGather(JSON.stringify(this.treeData)).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功")
|
|
|
|
|
this.open = false
|
|
|
|
|
this.getList();
|
|
|
|
|
})
|
|
|
|
|
/*this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
@ -306,18 +338,41 @@ export default {
|
|
|
|
|
...this.queryParams
|
|
|
|
|
}, `gather_${new Date().getTime()}.xlsx`)
|
|
|
|
|
},
|
|
|
|
|
handleAddChild(parentNode,type) {
|
|
|
|
|
handleAddChild(parentNode,type1) {
|
|
|
|
|
if (!parentNode.data) {
|
|
|
|
|
this.$set(parentNode, 'data', [])
|
|
|
|
|
}
|
|
|
|
|
if(type1==='0'){
|
|
|
|
|
parentNode.data.push({
|
|
|
|
|
type: type,
|
|
|
|
|
type1: type1,
|
|
|
|
|
type: '0',
|
|
|
|
|
title: null,
|
|
|
|
|
id: null,
|
|
|
|
|
zb: null,
|
|
|
|
|
pcTitle: null,
|
|
|
|
|
data: []
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(type1==='1'){
|
|
|
|
|
parentNode.data.push({
|
|
|
|
|
type1: type1,
|
|
|
|
|
type: '1',
|
|
|
|
|
title: null,
|
|
|
|
|
id: null,
|
|
|
|
|
zb: null,
|
|
|
|
|
pcTitle: null
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(type1==='2'){
|
|
|
|
|
parentNode.data.push({
|
|
|
|
|
type1: type1,
|
|
|
|
|
type: '1',
|
|
|
|
|
title: null,
|
|
|
|
|
id: null,
|
|
|
|
|
pcTitle: null
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
handleRemoveNode(nodeToRemove) {
|
|
|
|
|
const removeNode = (parent, node) => {
|
|
|
|
|
@ -354,9 +409,46 @@ export default {
|
|
|
|
|
// 引用考核任务选择 选中数据
|
|
|
|
|
khrwRowChange(row) {
|
|
|
|
|
this.khrw.parentNode.id = row.id;
|
|
|
|
|
this.khrw.parentNode.title = row.pcTitle;
|
|
|
|
|
this.khrw.parentNode.pcTitle = row.pcTitle;
|
|
|
|
|
this.khrw.open = false;
|
|
|
|
|
},
|
|
|
|
|
// 查看生成汇总
|
|
|
|
|
viewKaoHeScore(row){
|
|
|
|
|
this.khdf.list = [];
|
|
|
|
|
this.khdf.tableHeader = [];
|
|
|
|
|
this.khdf.open = true;
|
|
|
|
|
this.reset()
|
|
|
|
|
getGather(row.id).then(response => {
|
|
|
|
|
let khdfList = JSON.parse(response.data.tableData);
|
|
|
|
|
khdfList.forEach(item=> {
|
|
|
|
|
item.jxdwldbzkhzf['khdx'] = item.khdx;
|
|
|
|
|
})
|
|
|
|
|
this.khdf.list = khdfList;
|
|
|
|
|
|
|
|
|
|
let btTabelTree = JSON.parse(response.data.tableHeader);
|
|
|
|
|
btTabelTree.forEach(item => {
|
|
|
|
|
item.prop = item.name;
|
|
|
|
|
if(item.children && item.children.length>0){
|
|
|
|
|
this.setProp(item.children, item.prop)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.khdf.tableHeader = btTabelTree;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 递归函数 设置prop参数
|
|
|
|
|
setProp(list, prop){
|
|
|
|
|
list.forEach(item=>{
|
|
|
|
|
if(prop){
|
|
|
|
|
item.prop = prop+'.'+item.name;
|
|
|
|
|
}else {
|
|
|
|
|
item.prop = item.name;
|
|
|
|
|
}
|
|
|
|
|
if(item.children && item.children.length>0){
|
|
|
|
|
this.setProp(item.children, item.prop)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|