|
@@ -21,6 +21,9 @@
|
|
|
<div class="hc-page-content-box hc-division-page">
|
|
|
<div class="basic-info">
|
|
|
<HcCard title="当前节点基础信息">
|
|
|
+ <template #extra>
|
|
|
+ <el-checkbox v-model="treeItemInfo.isConcealedWorksNode" label="标记为隐蔽工程节点" :true-label="1" :false-label="0" size="large" @change="concealedChange"/>
|
|
|
+ </template>
|
|
|
<HcTable :column="tableBasicColumn" :datas="tableBasicData" :isIndex="false" border>
|
|
|
<template #type="{row}">{{getRowType(row['type'])}}</template>
|
|
|
<template #majorDataType="{row}">{{getRowMajorType(row['majorDataType'])}}</template>
|
|
@@ -248,7 +251,6 @@ import DivisionTree from "./components/division/DivisionTree.vue"
|
|
|
import HcTreeNode from "./components/HcTreeNode.vue"
|
|
|
import {isType, getIndex, deepClone, formValidate} from "vue-utils-plus"
|
|
|
import {getStoreData, setStoreData} from '~src/utils/storage'
|
|
|
-import {HcIsButton} from "~src/plugins/IsButtons";
|
|
|
import {getDictionary} from "~api/other"
|
|
|
import wbsApi from "~api/data-fill/wbs";
|
|
|
import divisionApi from "~api/data-fill/division";
|
|
@@ -398,6 +400,23 @@ const tableBasicColumn = ref([
|
|
|
])
|
|
|
const tableBasicData = ref([])
|
|
|
|
|
|
+//标记为隐蔽工程节点
|
|
|
+const concealedChange = async () => {
|
|
|
+ const { primaryKeyId } = treeItemInfo.value
|
|
|
+ if (primaryKeyId) {
|
|
|
+ const {error, code, msg} = await divisionApi.concealedWorksNnode({
|
|
|
+ primaryKeyId: primaryKeyId
|
|
|
+ }, false)
|
|
|
+ if (!error && code === 200) {
|
|
|
+ window?.$message?.success(msg)
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning(msg)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning('请先在左侧选择节点')
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
//当前节点工程用表信息
|
|
|
const tableProjectColumn = ref([
|
|
|
{key:'nodeName', name: '工程用表名称'},
|
|
@@ -429,25 +448,6 @@ const ElTreeMenu = ref([
|
|
|
{icon: 'sort-asc', label: '调整排序', key: "sort"},
|
|
|
{icon: 'delete-bin', label: '删除节点', key: "del"}
|
|
|
])
|
|
|
-/*const setElTreeMenu = () => {
|
|
|
- let newArr = [];
|
|
|
- if (HcIsButton('wbs_tree_add')) {
|
|
|
- newArr.push({icon: 'add-circle', label: '新增节点', key: "add"})
|
|
|
- }
|
|
|
- if (HcIsButton('wbs_tree_copy')) {
|
|
|
- newArr.push({icon: 'file-copy-2', label: '复制节点', key: "copy"})
|
|
|
- }
|
|
|
- if (HcIsButton('wbs_tree_edit')) {
|
|
|
- newArr.push({icon: 'draft', label: '修改节点', key: "edit"})
|
|
|
- }
|
|
|
- if (HcIsButton('wbs_tree_sort')) {
|
|
|
- newArr.push({icon: 'sort-asc', label: '调整排序', key: "sort"})
|
|
|
- }
|
|
|
- if (HcIsButton('wbs_tree_del')) {
|
|
|
- newArr.push({icon: 'delete-bin', label: '删除节点', key: "del"})
|
|
|
- }
|
|
|
- ElTreeMenu.value = newArr
|
|
|
-}*/
|
|
|
|
|
|
//树菜单被点击
|
|
|
const ElTreeMenuClick = async ({key,node,data}) => {
|