|
|
|
@ -97,34 +97,71 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改生成汇总对话框 -->
|
|
|
|
<!-- 添加或修改生成汇总对话框 -->
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="99%" append-to-body>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
<div style="min-height: 400px">
|
|
|
|
<el-form-item label="一级标题" prop="hzName">
|
|
|
|
<recursive-tree
|
|
|
|
<el-input v-model="form.hzName" placeholder="请输入一级标题" />
|
|
|
|
style="margin-left: 0px"
|
|
|
|
</el-form-item>
|
|
|
|
:node-data="treeData"
|
|
|
|
<el-form-item label="表头" prop="tableHeader">
|
|
|
|
:is-root="true"
|
|
|
|
<el-input v-model="form.tableHeader" type="textarea" placeholder="请输入内容" />
|
|
|
|
@add-child="handleAddChild"
|
|
|
|
</el-form-item>
|
|
|
|
@remove-node="handleRemoveNode"
|
|
|
|
<el-form-item label="表数据" prop="tableData">
|
|
|
|
@change-kaohe="changeKaoHe"
|
|
|
|
<el-input v-model="form.tableData" type="textarea" placeholder="请输入内容" />
|
|
|
|
></recursive-tree>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 选择引用考核任务信息 -->
|
|
|
|
|
|
|
|
<el-dialog title="引用考核任务选择" :visible.sync="khrw.open" width="900px">
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-form :model="khrw.queryParams" :inline="true" label-width="100px">
|
|
|
|
|
|
|
|
<el-form-item label="考核任务名称" prop="pcTitle" style="margin-bottom: 10px">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="khrw.queryParams.pcTitle"
|
|
|
|
|
|
|
|
placeholder="请输入考核任务名称"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
@keyup.enter.native="khrwQuery"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
<el-form-item style="margin-bottom: 10px">
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="small" @click="khrwQuery">搜索</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<el-table border v-loading="khrw.loading" :data="khrw.list" @row-dblclick="khrwRowChange">
|
|
|
|
|
|
|
|
<el-table-column label="主键" align="center" prop="id" width="60px"/>
|
|
|
|
|
|
|
|
<el-table-column label="考核任务名称" align="center" prop="pcTitle" min-width="150" :show-overflow-tooltip="true"/>
|
|
|
|
|
|
|
|
<el-table-column label="考核任务描述" align="center" prop="pcDescription" min-width="150" :show-overflow-tooltip="true"/>
|
|
|
|
|
|
|
|
<el-table-column label="模板名称" align="center" prop="templateName" min-width="120" :show-overflow-tooltip="true"/>
|
|
|
|
|
|
|
|
<el-table-column label="考核任务备注" align="center" prop="remark" min-width="150" :show-overflow-tooltip="true"/>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
|
|
|
v-show="khrw.total>0"
|
|
|
|
|
|
|
|
:total="khrw.total"
|
|
|
|
|
|
|
|
:page.sync="khrw.queryParams.pageNum"
|
|
|
|
|
|
|
|
:limit.sync="khrw.queryParams.pageSize"
|
|
|
|
|
|
|
|
@pagination="khrwQuery"
|
|
|
|
|
|
|
|
/>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
<el-button @click="khrwCancel">取 消</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listGather, getGather, delGather, addGather, updateGather } from "@/api/kaohe/gather"
|
|
|
|
import { listGather, getGather, delGather, addGather, updateGather } from "@/api/kaohe/gather"
|
|
|
|
|
|
|
|
import { listPingce } from "@/api/kaohe/pingce"
|
|
|
|
|
|
|
|
import TableColumn from '@/components/TableColumn'
|
|
|
|
|
|
|
|
import RecursiveTree from '@/components/RecursiveTree'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Gather",
|
|
|
|
name: "Gather",
|
|
|
|
|
|
|
|
components: { TableColumn, RecursiveTree },
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
// 遮罩层
|
|
|
|
// 遮罩层
|
|
|
|
@ -145,19 +182,34 @@ export default {
|
|
|
|
title: "",
|
|
|
|
title: "",
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
|
|
|
|
treeData: {
|
|
|
|
|
|
|
|
hz_name: '',
|
|
|
|
|
|
|
|
data: []
|
|
|
|
|
|
|
|
},
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
pageSize: 10,
|
|
|
|
hzName: null,
|
|
|
|
hzName: null
|
|
|
|
tableHeader: null,
|
|
|
|
},
|
|
|
|
tableData: null,
|
|
|
|
/** 选择引用考核任务*/
|
|
|
|
|
|
|
|
khrw: {
|
|
|
|
|
|
|
|
parentNode: null,
|
|
|
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
|
|
|
open: false,
|
|
|
|
|
|
|
|
// 列表遮罩层
|
|
|
|
|
|
|
|
loading: false,
|
|
|
|
|
|
|
|
// 列表查询参数
|
|
|
|
|
|
|
|
queryParams: {
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
pcTitle: null,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 表格数据
|
|
|
|
|
|
|
|
list: [],
|
|
|
|
|
|
|
|
// 总条数
|
|
|
|
|
|
|
|
total: 0,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单参数
|
|
|
|
|
|
|
|
form: {},
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
@ -180,18 +232,10 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单重置
|
|
|
|
// 表单重置
|
|
|
|
reset() {
|
|
|
|
reset() {
|
|
|
|
this.form = {
|
|
|
|
this.treeData = {
|
|
|
|
id: null,
|
|
|
|
hz_name: '',
|
|
|
|
hzName: null,
|
|
|
|
data: []
|
|
|
|
tableHeader: null,
|
|
|
|
|
|
|
|
tableData: null,
|
|
|
|
|
|
|
|
createBy: null,
|
|
|
|
|
|
|
|
createTime: null,
|
|
|
|
|
|
|
|
updateBy: null,
|
|
|
|
|
|
|
|
updateTime: null,
|
|
|
|
|
|
|
|
remark: null
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.resetForm("form")
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
handleQuery() {
|
|
|
|
handleQuery() {
|
|
|
|
@ -211,7 +255,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
handleAdd() {
|
|
|
|
handleAdd() {
|
|
|
|
this.reset()
|
|
|
|
this.reset();
|
|
|
|
this.open = true
|
|
|
|
this.open = true
|
|
|
|
this.title = "添加生成汇总"
|
|
|
|
this.title = "添加生成汇总"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -227,7 +271,8 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 提交按钮 */
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
console.log(this.treeData);
|
|
|
|
|
|
|
|
/*this.$refs["form"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.id != null) {
|
|
|
|
if (this.form.id != null) {
|
|
|
|
updateGather(this.form).then(response => {
|
|
|
|
updateGather(this.form).then(response => {
|
|
|
|
@ -243,7 +288,7 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})*/
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
handleDelete(row) {
|
|
|
|
handleDelete(row) {
|
|
|
|
@ -260,7 +305,58 @@ export default {
|
|
|
|
this.download('kaohe/gather/export', {
|
|
|
|
this.download('kaohe/gather/export', {
|
|
|
|
...this.queryParams
|
|
|
|
...this.queryParams
|
|
|
|
}, `gather_${new Date().getTime()}.xlsx`)
|
|
|
|
}, `gather_${new Date().getTime()}.xlsx`)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleAddChild(parentNode,type) {
|
|
|
|
|
|
|
|
if (!parentNode.data) {
|
|
|
|
|
|
|
|
this.$set(parentNode, 'data', [])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
parentNode.data.push({
|
|
|
|
|
|
|
|
type: type,
|
|
|
|
|
|
|
|
title: null,
|
|
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
|
|
zb: null,
|
|
|
|
|
|
|
|
pcTitle: null,
|
|
|
|
|
|
|
|
data: []
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleRemoveNode(nodeToRemove) {
|
|
|
|
|
|
|
|
const removeNode = (parent, node) => {
|
|
|
|
|
|
|
|
if (parent.data) {
|
|
|
|
|
|
|
|
const index = parent.data.indexOf(node)
|
|
|
|
|
|
|
|
if (index !== -1) {
|
|
|
|
|
|
|
|
parent.data.splice(index, 1)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
parent.data.forEach(child => removeNode(child, node))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
removeNode(this.treeData, nodeToRemove)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
changeKaoHe(parentNode){
|
|
|
|
|
|
|
|
this.khrw.parentNode = parentNode;
|
|
|
|
|
|
|
|
this.khrw.open = true;
|
|
|
|
|
|
|
|
this.khrw.queryParams.pageNum = 1;
|
|
|
|
|
|
|
|
this.khrwQuery();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 引用考核任务信息列表查询 */
|
|
|
|
|
|
|
|
khrwQuery() {
|
|
|
|
|
|
|
|
this.khrw.loading = true;
|
|
|
|
|
|
|
|
listPingce(this.khrw.queryParams).then(response => {
|
|
|
|
|
|
|
|
this.khrw.list = response.rows;
|
|
|
|
|
|
|
|
this.khrw.total = response.total;
|
|
|
|
|
|
|
|
this.khrw.loading = false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 引用考核任务信息选择弹出框关闭*/
|
|
|
|
|
|
|
|
khrwCancel() {
|
|
|
|
|
|
|
|
this.khrw.open = false
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 引用考核任务选择 选中数据
|
|
|
|
|
|
|
|
khrwRowChange(row) {
|
|
|
|
|
|
|
|
this.khrw.parentNode.id = row.id;
|
|
|
|
|
|
|
|
this.khrw.parentNode.pcTitle = row.pcTitle;
|
|
|
|
|
|
|
|
this.khrw.open = false;
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|