Merge remote-tracking branch 'origin/main'

main
hshansha 2 months ago
commit 221c87b2e7

@ -2,31 +2,32 @@
<div class="tree-node"> <div class="tree-node">
<div class="node-content"> <div class="node-content">
<span style="margin-right: 5px;">{{ nodeData.code }} »</span> <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="isRoot" :disabled="isDisabled"/>
<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="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"> v-model="nodeData.pcTitle" @focus.stop="changeKaohe">
<i slot="suffix" class="el-input__icon el-icon-search" style="color: #1890ff; font-weight: bolder"></i> <i slot="suffix" class="el-input__icon el-icon-search" style="color: #1890ff; font-weight: bolder"></i>
</el-input> </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> :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> 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> 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> 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>
<div class="children" v-if="nodeData.data && nodeData.data.length"> <div class="children" v-if="nodeData.data && nodeData.data.length">
<recursive-tree <recursive-tree
v-for="(child, index) in nodeData.data" v-for="(child, index) in nodeData.data"
:key="index" :key="index"
:node-data="child" :node-data="child"
:is-disabled="isDisabled"
@add-child="onAddChild" @add-child="onAddChild"
@remove-node="onRemoveNode" @remove-node="onRemoveNode"
@change-kaohe="onChangeKaohe" @change-kaohe="onChangeKaohe"
@ -47,6 +48,10 @@ export default {
isRoot: { isRoot: {
type: Boolean, type: Boolean,
default: false default: false
},
isDisabled: {
type: Boolean,
default: false
} }
}, },
methods: { 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="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="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" 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"> <template slot-scope="scope">
<!-- <el-button <!-- <el-button
size="mini" size="mini"
@ -77,6 +77,12 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['kaohe:gather:edit']" v-hasPermi="['kaohe:gather:edit']"
>修改</el-button>--> >修改</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleUpdate(scope.row)"
>汇总选项</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -111,13 +117,14 @@
style="margin-left: 0px" style="margin-left: 0px"
:node-data="treeData" :node-data="treeData"
:is-root="true" :is-root="true"
:is-disabled="optType===2"
@add-child="handleAddChild" @add-child="handleAddChild"
@remove-node="handleRemoveNode" @remove-node="handleRemoveNode"
@change-kaohe="changeKaoHe" @change-kaohe="changeKaoHe"
></recursive-tree> ></recursive-tree>
</div> </div>
<div slot="footer" class="dialog-footer"> <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> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -219,6 +226,8 @@ export default {
gatherList: [], gatherList: [],
// //
title: "", title: "",
// 1 2
optType: 1,
// //
open: false, open: false,
treeData: { treeData: {
@ -298,16 +307,18 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true this.open = true
this.optType = 1;
this.title = "添加生成汇总" this.title = "添加生成汇总"
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset();
const id = row.id || this.ids const id = row.id || this.ids
getGather(id).then(response => { getGather(id).then(response => {
this.form = response.data this.treeData = JSON.parse(response.data.titleStr)
this.open = true this.open = true;
this.title = "修改生成汇总" this.optType = 2;
this.title = "查看汇总选项"
}) })
}, },
/** 提交按钮 */ /** 提交按钮 */

Loading…
Cancel
Save