生成汇总页面 查看汇总选项 功能添加

main
wanglei 2 months ago
parent 85531c98bb
commit 6d479accd8

@ -2,31 +2,32 @@
<div class="tree-node">
<div class="node-content">
<span style="margin-right: 5px;">{{ nodeData.code }} »</span>
<el-input v-model="nodeData.title" placeholder="请输入标题名称" style="width: 250px;" v-if="isRoot"/>
<el-input v-model="nodeData.title" placeholder="请输入标题名称" style="width: 250px;" v-if="nodeData.type1==='0'"/>
<el-input v-model="nodeData.title" placeholder="请输入标题名称" style="width: 250px;" v-if="isRoot" :disabled="isDisabled"/>
<el-input v-model="nodeData.title" placeholder="请输入标题名称" style="width: 250px;" v-if="nodeData.type1==='0'" :disabled="isDisabled"/>
<el-input placeholder="请选择引用考核任务" readonly v-if="nodeData.type1==='1'||nodeData.type1==='2'" style="width: 250px;"
<el-input placeholder="请选择引用考核任务" readonly v-if="nodeData.type1==='1'||nodeData.type1==='2'" style="width: 250px;" :disabled="isDisabled"
v-model="nodeData.pcTitle" @focus.stop="changeKaohe">
<i slot="suffix" class="el-input__icon el-icon-search" style="color: #1890ff; font-weight: bolder"></i>
</el-input>
<!--评分占比-->
<el-input-number style="margin-left: 5px;" v-model="nodeData.zb" :precision="2" :step="0.01" :min="0.01"
<el-input-number style="margin-left: 5px;" v-model="nodeData.zb" :precision="2" :step="0.01" :min="0.01" :disabled="isDisabled"
:max="1" v-if="nodeData.type1==='1'||nodeData.type1==='0'"></el-input-number>
<el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addChild('0')"
<el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addChild('0')" :disabled="isDisabled"
v-if="isRoot||nodeData.type1==='0'">标题</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addChild('1')"
<el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addChild('1')" :disabled="isDisabled"
v-if="isRoot||nodeData.type1==='0'">占比引用</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addChild('2')"
<el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addChild('2')" :disabled="isDisabled"
v-if="isRoot||nodeData.type1==='0'">不占比引用</el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click.stop="removeNode" v-if="!isRoot"></el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click.stop="removeNode" v-if="!isRoot" :disabled="isDisabled"></el-button>
</div>
<div class="children" v-if="nodeData.data && nodeData.data.length">
<recursive-tree
v-for="(child, index) in nodeData.data"
:key="index"
:node-data="child"
:is-disabled="isDisabled"
@add-child="onAddChild"
@remove-node="onRemoveNode"
@change-kaohe="onChangeKaohe"
@ -47,6 +48,10 @@ export default {
isRoot: {
type: Boolean,
default: false
},
isDisabled: {
type: Boolean,
default: false
}
},
methods: {

@ -68,7 +68,7 @@
<!-- <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">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220">
<template slot-scope="scope">
<!-- <el-button
size="mini"
@ -77,6 +77,12 @@
@click="handleUpdate(scope.row)"
v-hasPermi="['kaohe:gather:edit']"
>修改</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleUpdate(scope.row)"
>汇总选项</el-button>
<el-button
size="mini"
type="text"
@ -111,13 +117,14 @@
style="margin-left: 0px"
:node-data="treeData"
:is-root="true"
:is-disabled="optType===2"
@add-child="handleAddChild"
@remove-node="handleRemoveNode"
@change-kaohe="changeKaoHe"
></recursive-tree>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" :disabled="optType===2"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -219,6 +226,8 @@ export default {
gatherList: [],
//
title: "",
// 1 2
optType: 1,
//
open: false,
treeData: {
@ -298,16 +307,18 @@ export default {
handleAdd() {
this.reset();
this.open = true
this.optType = 1;
this.title = "添加生成汇总"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
this.reset();
const id = row.id || this.ids
getGather(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改生成汇总"
this.treeData = JSON.parse(response.data.titleStr)
this.open = true;
this.optType = 2;
this.title = "查看汇总选项"
})
},
/** 提交按钮 */

Loading…
Cancel
Save