|
@@ -1,166 +1,172 @@
|
|
|
<template>
|
|
|
<div class="h-full">
|
|
|
- <div v-if="wbsTypeTabKey === 'tree'" class="hc-layout-box" element-loading-text="批量保存数据中...">
|
|
|
- <div
|
|
|
- id="wbs-left-tree" :class="[isWbsTreeShow ? 'show' : '', isMouseTree ? 'on-transition' : '']"
|
|
|
- :style="`width:${isWbsTreeShow ? leftWidth : 0}px; ${isWbsTreeShow ? '' : 'display: none'}`"
|
|
|
- class="hc-layout-left-box bg-white"
|
|
|
- >
|
|
|
- <div class="hc-project-box">
|
|
|
- <div class="hc-project-icon-box">
|
|
|
- <HcIcon name="stack" />
|
|
|
- </div>
|
|
|
- <div class="project-name-box ml-2">
|
|
|
- <div class="project-alias">{{ projectInfo.projectName }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="hc-tree-box">
|
|
|
- <div class="hc-tree-back-to">
|
|
|
- <HcTooltip keys="hide-data-show">
|
|
|
- <el-button type="primary" hc-btn keys="hide-data-show" :loading="showTreeNodeLoad" @click="showTreeNode">显示</el-button>
|
|
|
- </HcTooltip>
|
|
|
+ <hc-page-split v-if="wbsTypeTabKey === 'tree'" ref="pageSplitRef">
|
|
|
+ <template #left>
|
|
|
+ <div class="left-box-container bg-white">
|
|
|
+ <div class="hc-project-box">
|
|
|
+ <div class="hc-project-icon-box">
|
|
|
+ <HcIcon name="stack" />
|
|
|
+ </div>
|
|
|
+ <div class="project-name-box ml-2">
|
|
|
+ <div class="project-alias">{{ projectInfo.projectName }}</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="hc-search-tree-val">
|
|
|
- <el-input v-model="searchTreeVal" clearable block placeholder="请输入名称关键词检索" @keyup="searchTreeKeyUp">
|
|
|
- <template #suffix>
|
|
|
- <HcIcon name="search-2" ui="text-xl iscusor" @click="searchTreeClick" />
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- <div v-if="isShowLeft" id="hc-tree-scrollbar" v-loading="treeLoading" class="hc-tree-scrollbar" element-loading-text="获取数据中...">
|
|
|
- <el-scrollbar v-show="isSearchTree" class="scroll-bar-right-16">
|
|
|
- <HcDataTree
|
|
|
-
|
|
|
- :datas="searchTreeData"
|
|
|
- :is-mark="TreeMark"
|
|
|
-
|
|
|
- is-counts
|
|
|
- is-type
|
|
|
- :auto-expand-keys="TreeAutoExpandKeys"
|
|
|
- default-expand-all
|
|
|
- @node-tap="wbsElTreeClick"
|
|
|
+ <div class="hc-tree-box hc-tree-box1">
|
|
|
+ <div class="hc-search-tree-val">
|
|
|
+ <el-input
|
|
|
+ v-model="searchTreeVal"
|
|
|
+ clearable
|
|
|
+ block
|
|
|
+ placeholder="请输入名称关键词检索"
|
|
|
+ @keyup="searchTreeKeyUp"
|
|
|
>
|
|
|
- <template #default="{ node, data, level }">
|
|
|
- <div class="data-custom-tree-node">
|
|
|
- <!-- 树组件,节点名称 -->
|
|
|
- <div :class="node.level === 1 ? 'level-name' : ''" class="label">
|
|
|
- <span v-if="(data.type > 0 && data.majorDataType > 0) || (data.type > 0 && data.majorDataType <= 0)" class="hc-tree-node-type">
|
|
|
- {{ getTreeNodeType(data.type, data.majorDataType) }}
|
|
|
- </span>
|
|
|
-
|
|
|
- <span :class="data.isBussShow === '2' ? 'text-red' : ''">
|
|
|
- {{ node.label }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <!-- 树组件,统计数量 -->
|
|
|
- <div class="submit-counts text-blue">【{{ data.submitCounts ?? 0 }}】</div>
|
|
|
-
|
|
|
-
|
|
|
- <!-- 树组件,操作菜单 END -->
|
|
|
- </div>
|
|
|
+ <template #suffix>
|
|
|
+ <HcIcon
|
|
|
+ name="search-2"
|
|
|
+ ui="text-xl iscusor"
|
|
|
+ @click="searchTreeClick"
|
|
|
+ />
|
|
|
</template>
|
|
|
- </HcDataTree>
|
|
|
- </el-scrollbar>
|
|
|
- <el-scrollbar v-show="!isSearchTree" class="scroll-bar-right-16">
|
|
|
- <HcLazyTree
|
|
|
- ref="wbstree"
|
|
|
- :auto-expand-keys="TreeAutoExpandKeys"
|
|
|
- :is-mark="TreeMark"
|
|
|
- is-counts
|
|
|
- is-type
|
|
|
- show-checkbox
|
|
|
- check-strictly
|
|
|
- @load="treeLoadNode"
|
|
|
-
|
|
|
- @node-loading="ElTreeNodeLoading"
|
|
|
- @node-tap="wbsElTreeClick"
|
|
|
- @check="ElTreeNodeCheck"
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="isShowLeft"
|
|
|
+ id="hc-tree-scrollbar"
|
|
|
+ v-loading="treeLoading"
|
|
|
+ class="hc-tree-scrollbar"
|
|
|
+ element-loading-text="获取数据中..."
|
|
|
+ >
|
|
|
+ <el-scrollbar
|
|
|
+ v-show="isSearchTree"
|
|
|
+ class="scroll-bar-right-16"
|
|
|
>
|
|
|
- <template #default="{ node, data, level }">
|
|
|
- <div class="data-custom-tree-node">
|
|
|
- <!-- 树组件,节点名称 -->
|
|
|
- <div :class="node.level === 1 ? 'level-name' : ''" class="label">
|
|
|
- <span v-if="(data.type > 0 && data.majorDataType > 0) || (data.type > 0 && data.majorDataType <= 0)" class="hc-tree-node-type">
|
|
|
- {{ getTreeNodeType(data.type, data.majorDataType) }}
|
|
|
- </span>
|
|
|
-
|
|
|
- <span :class="data.isBussShow === '2' ? 'text-red' : ''">
|
|
|
- {{ node.label }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <!-- 树组件,统计数量 -->
|
|
|
- <div class="submit-counts text-blue">【{{ data.submitCounts ?? 0 }}】</div>
|
|
|
-
|
|
|
-
|
|
|
- <!-- 树组件,操作菜单 END -->
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </HcLazyTree>
|
|
|
- </el-scrollbar>
|
|
|
+ <HcDataTree
|
|
|
+
|
|
|
+ :is-show-eye="true"
|
|
|
+ :datas="searchTreeData"
|
|
|
+ :is-mark="TreeMark"
|
|
|
+ :menus="ElTreeMenu"
|
|
|
+
|
|
|
+
|
|
|
+ is-type
|
|
|
+ :auto-expand-keys="TreeAutoExpandKeys"
|
|
|
+
|
|
|
+ is-counts default-expand-all is-form-date
|
|
|
+ :is-show-sync="userInfo?.role_id?.split(',').includes('1123598816738675201')"
|
|
|
+ @node-tap="wbsElTreeClick"
|
|
|
+ @menu-tap="ElTreeMenuClick"
|
|
|
+ />
|
|
|
+ </el-scrollbar>
|
|
|
+ <el-scrollbar
|
|
|
+ v-show="!isSearchTree"
|
|
|
+ class="scroll-bar-right-16"
|
|
|
+ >
|
|
|
+ <HcLazyTree
|
|
|
+ ref="wbstree"
|
|
|
+
|
|
|
+ :is-show-eye="true"
|
|
|
+ :is-show-sync="userInfo?.role_id?.split(',').includes('1123598816738675201')"
|
|
|
+ is-form-date
|
|
|
+
|
|
|
+ :auto-expand-keys="TreeAutoExpandKeys"
|
|
|
+ :is-mark="TreeMark"
|
|
|
+ :menus="ElTreeMenu"
|
|
|
+ is-counts
|
|
|
+ is-type
|
|
|
+ show-checkbox
|
|
|
+ check-strictly
|
|
|
+ @load="treeLoadNode"
|
|
|
+ @menu-tap="ElTreeMenuClick"
|
|
|
+ @node-loading="ElTreeNodeLoading"
|
|
|
+ @node-tap="wbsElTreeClick"
|
|
|
+ />
|
|
|
+ </el-scrollbar>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="hc-tree-foot-tip-box">
|
|
|
+ <div class="dot-view green">已审批</div>
|
|
|
+ <div class="dot-view black">未填报</div>
|
|
|
+ <div class="dot-view orange">已填报-待审批</div>
|
|
|
+ <div class="dot-view blue">已填报-未上报</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="hc-tree-foot-tip-box">
|
|
|
- <div class="dot-view red">已隐藏</div>
|
|
|
- <div class="dot-view black">未隐藏</div>
|
|
|
- </div>
|
|
|
- <!-- 左右拖动 -->
|
|
|
- <div class="horizontal-drag-line" @mousedown="onmousedown" />
|
|
|
- </div>
|
|
|
- <div id="wbs-content-box" v-loading="ListItemLoading" class="hc-layout-content-box">
|
|
|
- <!---展开收缩树 -->
|
|
|
- <div class="hc-expansion-contraction-tree" @click="setWbsTreeShow">
|
|
|
- <HcIcon v-show="isWbsTreeShow" name="arrow-left-s" />
|
|
|
- <HcIcon v-show="!isWbsTreeShow" name="arrow-right-s" />
|
|
|
- </div>
|
|
|
- <hc-tab-card :tabs="authBtnTabdata" :tab-key="authBtnTabKey" @change="authBtnTabClick">
|
|
|
- <el-scrollbar v-if="ListItemDatas.length > 0" ref="ListItemScrollRef">
|
|
|
- <CollapseForm
|
|
|
- ref="ListItemRef"
|
|
|
- :tree-auto-expand-keys="TreeAutoExpandKeys"
|
|
|
- :classify="authBtnTabKey"
|
|
|
- :contract-id="contractId"
|
|
|
- :datas="ListItemDatas"
|
|
|
- :draw-type="!isDrawType"
|
|
|
- :primary-key-id="primaryKeyId"
|
|
|
- :status="NodeStatus"
|
|
|
- :tenant-id="userInfo?.tenant_id"
|
|
|
- :wbs-temp-id="projectInfo?.referenceWbsTemplateIdTrial"
|
|
|
- :wbs-type="2"
|
|
|
- :treenode-data-info="nodeDataInfo"
|
|
|
- :newlistdata="newlistdata"
|
|
|
- @offset-top="ListItemOffsetTop"
|
|
|
- @renew="getTableDataAll"
|
|
|
- @get-list="searchNodeAllTable1"
|
|
|
- />
|
|
|
- </el-scrollbar>
|
|
|
- <hc-empty v-else title="暂无表单" />
|
|
|
- </hc-tab-card>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <hc-tab-card
|
|
|
+ :tabs="authBtnTabdata"
|
|
|
+ :tab-key="authBtnTabKey"
|
|
|
+ @change="authBtnTabClick"
|
|
|
+ >
|
|
|
+ <el-scrollbar
|
|
|
+ v-if="ListItemDatas.length > 0"
|
|
|
+ ref="ListItemScrollRef"
|
|
|
+ >
|
|
|
+ <CollapseForm
|
|
|
+ ref="ListItemRef"
|
|
|
+ :contract-info="
|
|
|
+ contractInfo?.contractType === 2
|
|
|
+ ? nodeDataInfo?.contractIdRelation
|
|
|
+ : contractId
|
|
|
+ "
|
|
|
+ :tree-auto-expand-keys="TreeAutoExpandKeys"
|
|
|
+ :classify="authBtnTabKey"
|
|
|
+ :contract-id="contractId"
|
|
|
+ :datas="ListItemDatas"
|
|
|
+ :draw-type="!isDrawType"
|
|
|
+ :primary-key-id="primaryKeyId"
|
|
|
+ :status="NodeStatus"
|
|
|
+ :tenant-id="userInfo?.tenant_id"
|
|
|
+ :wbs-temp-id="
|
|
|
+ projectInfo?.referenceWbsTemplateIdTrial
|
|
|
+ "
|
|
|
+ :wbs-type="2"
|
|
|
+ :treenode-data-info="nodeDataInfo"
|
|
|
+ :newlistdata="newlistdata"
|
|
|
+ @offset-top="ListItemOffsetTop"
|
|
|
+ @renew="getTableDataAll"
|
|
|
+ @get-list="searchNodeAllTable1"
|
|
|
+ />
|
|
|
+ </el-scrollbar>
|
|
|
+ <hc-empty v-else title="暂无表单" />
|
|
|
+ </hc-tab-card>
|
|
|
+ </hc-page-split>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { nextTick, onActivated, onMounted, ref, watch } from 'vue'
|
|
|
+import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
-import { HcIsButton } from '~src/plugins/IsButtons'
|
|
|
+
|
|
|
import CollapseForm from './collapse-form/index.vue'
|
|
|
-import NodeTree from './components/nodeTree/index.vue'
|
|
|
|
|
|
-import { getTreeNodeType } from 'hc-vue3-ui'
|
|
|
+
|
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
|
+
|
|
|
+
|
|
|
import {
|
|
|
arrToKey,
|
|
|
+ deepClone,
|
|
|
+
|
|
|
getArrValue,
|
|
|
+
|
|
|
getObjValue,
|
|
|
isNullES,
|
|
|
+
|
|
|
} from 'js-fast-way'
|
|
|
-import { getDictionary } from '~api/other'
|
|
|
+import {
|
|
|
+
|
|
|
+ userConfigSave,
|
|
|
+} from '~api/other'
|
|
|
import wbsApi from '~api/data-fill/wbs'
|
|
|
import queryApi from '~api/data-fill/query'
|
|
|
+import nodeBaseApi from '~api/data-fill/nodebaseinfo'
|
|
|
+import { useClick } from 'hc-vue3-ui'
|
|
|
|
|
|
+import { HcDelMsg, NewDelMsg } from 'hc-vue3-ui'
|
|
|
|
|
|
+import { toPdfPage } from '~uti/btn-auth'
|
|
|
+import website from '~src/config'
|
|
|
|
|
|
|
|
|
//初始变量
|
|
@@ -175,6 +181,9 @@ const projectInfo = ref(useAppState.projectInfo)
|
|
|
const contractInfo = ref(useAppState.contractInfo)
|
|
|
const isCollapse = ref(useAppState.getCollapse)
|
|
|
const userInfo = ref(useAppState.getUserInfo)
|
|
|
+const isLayout = ref(useAppState.isLayout)
|
|
|
+const leftWidth = ref(440)
|
|
|
+const isTemplateType = ref(useAppState.contractInfo?.templateType === 2)
|
|
|
//路由参数
|
|
|
const routerQuery = useRoutes?.query
|
|
|
// const typeName = routerQuery?.type || 'map'
|
|
@@ -186,69 +195,88 @@ const TreeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
|
|
|
|
|
|
//树搜索
|
|
|
const isSearchTree = ref(false)
|
|
|
-
|
|
|
const searchTreeHeight = ref()
|
|
|
-const getSearchTreeData = async () => {
|
|
|
+const getSearchTreeData = async (type) => {
|
|
|
treeLoading.value = true
|
|
|
- const { error, code, data } = await queryApi.getTreeNodeByQueryValueAndContractId({
|
|
|
- contractId: contractId.value,
|
|
|
- queryValue: searchTreeVal.value,
|
|
|
- tableOwner:authBtnTabKey.value,
|
|
|
- description: 1,
|
|
|
- })
|
|
|
- //判断状态
|
|
|
- if (!error && code === 200) {
|
|
|
- let treedata = getArrValue(data)
|
|
|
- searchTreeData.value = treedata
|
|
|
- treeLoading.value = false
|
|
|
-
|
|
|
- } else {
|
|
|
- treeLoading.value = false
|
|
|
-
|
|
|
- searchTreeData.value = []
|
|
|
- }
|
|
|
+ let response
|
|
|
+
|
|
|
+ response = await queryApi.getTreeNodeByQueryValueAndContractId({
|
|
|
+ contractId: contractId.value,
|
|
|
+ tableOwner: authBtnTabKey.value,
|
|
|
+ queryValue: searchTreeVal.value,
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ const { error, code, data } = response
|
|
|
+ if (!error && code === 200) {
|
|
|
+ let treedata = getArrValue(data)
|
|
|
+ searchTreeData.value = treedata
|
|
|
+ treeLoading.value = false
|
|
|
+ } else {
|
|
|
+ treeLoading.value = false
|
|
|
+
|
|
|
+ searchTreeData.value = []
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//监听
|
|
|
const searchTreeVal = ref('')
|
|
|
-watch(() => [
|
|
|
- useAppState.getCollapse, searchTreeVal.value,
|
|
|
-], ([Collapse, search]) => {
|
|
|
- isCollapse.value = Collapse
|
|
|
- if (search.length == 0) {
|
|
|
- isSearchTree.value = false
|
|
|
- }
|
|
|
-
|
|
|
-})
|
|
|
+watch(
|
|
|
+ () => [useAppState.getCollapse, searchTreeVal.value],
|
|
|
+ ([Collapse, search]) => {
|
|
|
+ isCollapse.value = Collapse
|
|
|
+ if (search.length == 0) {
|
|
|
+ isSearchTree.value = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+)
|
|
|
|
|
|
//加载树需要的classType
|
|
|
const classType = ref('')
|
|
|
-watch(() => [
|
|
|
- classType.value,
|
|
|
-], ([classify]) => {
|
|
|
- if (classify) {
|
|
|
- //重新加载左边树
|
|
|
- isShowLeft.value = false
|
|
|
- setTimeout(()=>{
|
|
|
- isShowLeft.value = true
|
|
|
- }, 500)
|
|
|
- }
|
|
|
+watch(
|
|
|
+ () => [classType.value, useAppState.isLayout],
|
|
|
+ ([classify, isLay]) => {
|
|
|
+ isLayout.value = isLay || ''
|
|
|
+ if (classify) {
|
|
|
+ //重新加载左边树
|
|
|
+ isShowLeft.value = false
|
|
|
+ setTimeout(() => {
|
|
|
+ isShowLeft.value = true
|
|
|
+ }, 500)
|
|
|
+ }
|
|
|
+ },
|
|
|
+)
|
|
|
+const pageSplitRef = ref(null)
|
|
|
|
|
|
+watch(() => pageSplitRef.value?.leftPanelWidth, (newWidth) => {
|
|
|
+
|
|
|
+
|
|
|
+ leftWidth.value = newWidth
|
|
|
+ setUserConfig(newWidth)
|
|
|
+
|
|
|
})
|
|
|
//渲染完成
|
|
|
onMounted(() => {
|
|
|
console.log(projectInfo.value)
|
|
|
treeLoading.value = typeName === 'tree'
|
|
|
+ const treeWidth = useAppState.getTreeWidth
|
|
|
+
|
|
|
+
|
|
|
+ leftWidth.value = isNullES(treeWidth) || treeWidth <= 0 ? 440 : treeWidth
|
|
|
setContractType(contractInfo.value?.contractType)
|
|
|
- getDictionaryApi()
|
|
|
-})
|
|
|
-onActivated(()=>{
|
|
|
- //重新加载左边树
|
|
|
- isShowLeft.value = false
|
|
|
- setTimeout(()=>{
|
|
|
- isShowLeft.value = true
|
|
|
- }, 500)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ nextTick(() => {
|
|
|
+ pageSplitRef.value?.setLeftWidth(leftWidth.value)
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
+
|
|
|
//身份按钮切换数据
|
|
|
const authBtnTabKey = ref('1')
|
|
|
|
|
@@ -256,13 +284,15 @@ const authBtnTabKey = ref('1')
|
|
|
const wbstree = ref(null)
|
|
|
const isShowLeft = ref(true)
|
|
|
const authBtnTabClick = (val) => {
|
|
|
+
|
|
|
if (!primaryKeyId.value) {
|
|
|
window?.$message?.warning('请先在左侧项目树选择一个节点')
|
|
|
} else if (val['key'] !== authBtnTabKey.value) {
|
|
|
authBtnTabKey.value = val['key']
|
|
|
+
|
|
|
//重新加载左边树
|
|
|
isShowLeft.value = false
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
isShowLeft.value = true
|
|
|
}, 500)
|
|
|
getTableDataAll()
|
|
@@ -280,18 +310,13 @@ const setContractType = (contractType) => {
|
|
|
authBtnTabKey.value = contractType + ''
|
|
|
classType.value = contractType + ''
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
const getTableDataAll = async (key) => {
|
|
|
await searchNodeAllTable()
|
|
|
await queryNodeStatus()
|
|
|
-// wbstree.value.resetNode().then((res)=>{
|
|
|
-// if(res){
|
|
|
-// searchNodeAllTable()
|
|
|
-// queryNodeStatus()
|
|
|
-// }
|
|
|
-// })
|
|
|
+
|
|
|
//保存后自动展开到当前表单
|
|
|
if (!isNullES(key)) {
|
|
|
console.log(key)
|
|
@@ -303,10 +328,7 @@ const getTableDataAll = async (key) => {
|
|
|
|
|
|
//结构类型tab数据和相关处理
|
|
|
const wbsTypeTabKey = ref(typeName)
|
|
|
-const wbsTypeTab = ref([
|
|
|
- { key: 'map', name: '导图结构填报' },
|
|
|
- { key: 'tree', name: '树形结构填报' },
|
|
|
-])
|
|
|
+
|
|
|
const authBtnTabdata = ref([
|
|
|
{ key: '1', name: '施工质检' },
|
|
|
{ key: '2', name: '监理质检' },
|
|
@@ -323,25 +345,48 @@ const wbsTypeTabChange = (item) => {
|
|
|
path: useRoutes.path,
|
|
|
query: {
|
|
|
type: item?.key,
|
|
|
- classifyType:classType.value,
|
|
|
- tableOwner:authBtnTabKey.value,
|
|
|
+ classifyType: classType.value,
|
|
|
+ tableOwner: authBtnTabKey.value,
|
|
|
},
|
|
|
})
|
|
|
getSearchTreeData()
|
|
|
}
|
|
|
+//切换导图结构
|
|
|
+const wbsMapTypeTab = () => {
|
|
|
+ wbsTypeTabChange({ key: 'map', name: '导图结构填报' })
|
|
|
+}
|
|
|
|
|
|
+//设置图纸数据
|
|
|
+const setUploadDrawingsData = async (echoParams, link) => {
|
|
|
+ const info = nodeDataInfo.value
|
|
|
+ const { error, code, data } = await wbsApi.saveContractTreeDrawings(
|
|
|
+ {
|
|
|
+ fileUrl: link,
|
|
|
+ id: echoParams['drawingsId'],
|
|
|
+ primaryKeyId: echoParams['primaryKeyId'],
|
|
|
+ },
|
|
|
+ false,
|
|
|
+ )
|
|
|
+ //处理数据
|
|
|
+ if (!error && code === 200) {
|
|
|
+ if (info['primaryKeyId'] === echoParams['primaryKeyId']) {
|
|
|
+ nodeDataInfo.value['drawingsId'] = data
|
|
|
+ nodeDataInfo.value['fileUrl'] = link
|
|
|
+ window?.$message?.success('图纸上传成功')
|
|
|
+ } else {
|
|
|
+ window?.$message?.success(
|
|
|
+ '图纸上传成功,由于您切换了其他节点,需要手动刷新才能查看到图纸',
|
|
|
+ )
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ window?.$message?.error('图纸保存失败')
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-const NodeTreeAccordion = ref(true)
|
|
|
-
|
|
|
//设置树菜单数据
|
|
|
-
|
|
|
+const ElTreeMenu = ref([])
|
|
|
const TreeMark = ref(false)
|
|
|
|
|
|
|
|
@@ -350,8 +395,6 @@ const primaryKeyId = ref('')
|
|
|
const nodeItemInfo = ref({})
|
|
|
const nodeDataInfo = ref({})
|
|
|
|
|
|
-
|
|
|
-
|
|
|
const searchTreeData = ref([])
|
|
|
|
|
|
//回车
|
|
@@ -361,15 +404,16 @@ const searchTreeKeyUp = (e) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
const treeLoading = ref(true)
|
|
|
|
|
|
const searchTreeClick = async () => {
|
|
|
if (searchTreeVal.value) {
|
|
|
- searchTreeHeight.value = document.getElementById('hc-tree-scrollbar').offsetHeight
|
|
|
+ searchTreeHeight.value
|
|
|
+ = document.getElementById('hc-tree-scrollbar').offsetHeight
|
|
|
isSearchTree.value = true
|
|
|
//treeLoading.value = true
|
|
|
getSearchTreeData()
|
|
|
+
|
|
|
} else {
|
|
|
isSearchTree.value = false
|
|
|
}
|
|
@@ -377,7 +421,9 @@ const searchTreeClick = async () => {
|
|
|
|
|
|
//懒加载的数据
|
|
|
const treeLoadNode = async ({ node, item, level }, resolve) => {
|
|
|
- let contractIdRelation = '', parentId = '', primaryKeyId = ''
|
|
|
+ let contractIdRelation = '',
|
|
|
+ parentId = '',
|
|
|
+ primaryKeyId = ''
|
|
|
if (level !== 0) {
|
|
|
const nodeData = getObjValue(item)
|
|
|
contractIdRelation = nodeData?.contractIdRelation || ''
|
|
@@ -392,8 +438,7 @@ const treeLoadNode = async ({ node, item, level }, resolve) => {
|
|
|
parentId,
|
|
|
// classifyType: authBtnTabKey.value,
|
|
|
classifyType: classType.value,
|
|
|
- tableOwner:authBtnTabKey.value,
|
|
|
- description: 1,
|
|
|
+ tableOwner: authBtnTabKey.value,
|
|
|
dataTime:new Date(),
|
|
|
})
|
|
|
treeLoading.value = false
|
|
@@ -409,16 +454,17 @@ const wbsElTreeClick = ({ node, data, keys }) => {
|
|
|
const { notExsitChild } = data
|
|
|
const { hasChildren } = data
|
|
|
if (notExsitChild || !hasChildren) {
|
|
|
-
|
|
|
+
|
|
|
getTableDataAll()
|
|
|
} else {
|
|
|
-
|
|
|
+
|
|
|
ListItemDatas.value = []
|
|
|
NodeStatus.value = '1'
|
|
|
}
|
|
|
setStoreValue('wbsTreeExpandKeys', keys)
|
|
|
TreeAutoExpandKeys.value = keys || []
|
|
|
|
|
|
+
|
|
|
// getTableDataAll()
|
|
|
}
|
|
|
//树加载完成
|
|
@@ -427,54 +473,13 @@ const ElTreeNodeLoading = () => {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-//导图结构数据
|
|
|
-const NodeTreeRef = ref(null)
|
|
|
-
|
|
|
-//鼠标左键单击事件
|
|
|
-const NodeTreeClick = ({ keys }) => {
|
|
|
- setStoreValue('wbsTreeExpandKeys', keys)
|
|
|
- TreeAutoExpandKeys.value = keys || []
|
|
|
-}
|
|
|
-
|
|
|
-//双击事件
|
|
|
-const isDrawer = ref(false)
|
|
|
-const NodeTreeDblClick = ({ node, data }) => {
|
|
|
+//树菜单被点击
|
|
|
+const ElTreeMenuClick = async ({ key, node, data, keys }) => {
|
|
|
nodeItemInfo.value = node
|
|
|
nodeDataInfo.value = data
|
|
|
- primaryKeyId.value = data?.primaryKeyId || ''
|
|
|
- isDrawer.value = true
|
|
|
- getTableDataAll()
|
|
|
-}
|
|
|
-const drawerClose = () => {
|
|
|
- isDrawer.value = false
|
|
|
- ListItemDatas.value = []
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-//获取节点类型
|
|
|
-const nodeTypeData = ref([])
|
|
|
-const getDictionaryApi = async () => {
|
|
|
- const { data } = await getDictionary({
|
|
|
- code: 'wbs_node_type',
|
|
|
- })
|
|
|
- //处理数据
|
|
|
- let newArr = []
|
|
|
- const newData = getArrValue(data)
|
|
|
- for (let i = 0; i < newData.length; i++) {
|
|
|
- newArr.push({
|
|
|
- label: newData[i]['dictValue'],
|
|
|
- value: Number(newData[i]['dictKey']),
|
|
|
- })
|
|
|
- }
|
|
|
- nodeTypeData.value = newArr
|
|
|
+ setStoreValue('wbsTreeExpandKeys', keys)
|
|
|
+ TreeAutoExpandKeys.value = keys || []
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -484,32 +489,6 @@ const getDictionaryApi = async () => {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
//设置滚动条位置
|
|
|
const ListItemScrollRef = ref(null)
|
|
|
const ListItemOffsetTop = (offsetTop) => {
|
|
@@ -536,12 +515,15 @@ const searchNodeAllTable = async () => {
|
|
|
type: authBtnTabKey.value,
|
|
|
})
|
|
|
ListItemDatas.value = getArrValue(data)
|
|
|
+
|
|
|
ListItemLoading.value = false
|
|
|
}
|
|
|
+//获取文件题名
|
|
|
+
|
|
|
|
|
|
const newlistdata = ref([])
|
|
|
const searchNodeAllTable1 = async () => {
|
|
|
- console.log('重新获取表单列表')
|
|
|
+ console.log('重新获取表单列表')
|
|
|
const info = nodeDataInfo.value
|
|
|
const { data } = await wbsApi.searchNodeAllTable({
|
|
|
projectId: projectId.value,
|
|
@@ -584,7 +566,6 @@ const queryNodeStatus = async () => {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
//表单变量
|
|
|
const ListItemRef = ref(null)
|
|
|
const ListItemsRef = ref(null)
|
|
@@ -604,83 +585,65 @@ const ListItemsRef = ref(null)
|
|
|
|
|
|
|
|
|
|
|
|
-//划分变更
|
|
|
-const divisionClick = () => {
|
|
|
- router.push({
|
|
|
- path: '/data-fill/division',
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
-//树展开和收起
|
|
|
-const isWbsTreeShow = ref(true)
|
|
|
-const setWbsTreeShow = () => {
|
|
|
- isWbsTreeShow.value = !isWbsTreeShow.value
|
|
|
-}
|
|
|
|
|
|
|
|
|
+//更新配置
|
|
|
+watch(
|
|
|
+ () => leftWidth.value,
|
|
|
+ (diffVal) => {
|
|
|
+ setUserConfig(diffVal)
|
|
|
+ },
|
|
|
+)
|
|
|
+const setUserConfig = async (data) => {
|
|
|
|
|
|
-//左右拖动,改变树形结构宽度
|
|
|
-const leftWidth = ref(382)
|
|
|
-const isMouseTree = ref(false)
|
|
|
-const onmousedown = () => {
|
|
|
- const leftNum = isCollapse.value ? 142 : 272
|
|
|
- isMouseTree.value = true
|
|
|
- document.onmousemove = (ve) => {
|
|
|
- let diffVal = ve.clientX - leftNum
|
|
|
- if (diffVal >= 310 && diffVal <= 900) {
|
|
|
- leftWidth.value = diffVal
|
|
|
- }
|
|
|
- }
|
|
|
- document.onmouseup = () => {
|
|
|
- document.onmousemove = null
|
|
|
- document.onmouseup = null
|
|
|
- isMouseTree.value = false
|
|
|
+ if (data > 0) {
|
|
|
+ await useClick()
|
|
|
+ useAppState.setTreeWidth(data)
|
|
|
+ await userConfigSave({ treeWidth: data })
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
|
|
|
+}
|
|
|
+</script>
|
|
|
|
|
|
-//树节点被选中
|
|
|
-const treeSelectNode = ref([])
|
|
|
+<style lang="scss" scoped>
|
|
|
+@import "../../styles/data-fill/wbs.scss";
|
|
|
|
|
|
-const treeSelectdata = ref([])
|
|
|
-const ElTreeNodeCheck = (_, { checkedKeys, checkedNodes }) => {
|
|
|
- console.log(checkedNodes, 'checkedNodes')
|
|
|
- treeSelectNode.value = getArrValue(checkedKeys)
|
|
|
- treeSelectdata.value = getArrValue(checkedNodes)
|
|
|
+.back-button {
|
|
|
+ /* 确保按钮有足够的空间来展示放大效果 */
|
|
|
+ padding: 4px;
|
|
|
+ /* 过渡效果:所有属性变化在300ms内完成,使用ease-out缓动函数 */
|
|
|
+ transition: all 300ms ease-out;
|
|
|
+ /* 防止放大时内容溢出 */
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
-const showTreeNodeLoad = ref(false)
|
|
|
-const showTreeNode = async ()=>{
|
|
|
- const keys = arrToKey(treeSelectdata.value, 'pKeyId', ',')
|
|
|
- if (keys.length <= 0) {
|
|
|
- window?.$message?.warning('请先在左侧项目树选择节点')
|
|
|
- return
|
|
|
- }
|
|
|
- //发起请求
|
|
|
- showTreeNodeLoad.value = true
|
|
|
- const { error, code, msg } = await wbsApi.updateNodeStates({
|
|
|
- ids: keys,
|
|
|
- status:1,
|
|
|
-
|
|
|
- }, false)
|
|
|
- showTreeNodeLoad.value = false
|
|
|
- if (!error && code === 200) {
|
|
|
- window?.$message?.success(msg || '操作成功')
|
|
|
- //重新加载左边树
|
|
|
- isShowLeft.value = false
|
|
|
- setTimeout(()=>{
|
|
|
- isShowLeft.value = true
|
|
|
- }, 500)
|
|
|
|
|
|
- }
|
|
|
+/* 缩放状态的样式 */
|
|
|
+.back-button.scaling {
|
|
|
+ /* 放大到1.2倍 */
|
|
|
+ transform: scale(1.2);
|
|
|
}
|
|
|
-</script>
|
|
|
+.hc-project-box{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ // font-size:20px;
|
|
|
+
|
|
|
+}
|
|
|
+.title-input{
|
|
|
+ height: 30px;
|
|
|
+ padding: 10px;
|
|
|
+ border: 1px solid #dcdfe6;
|
|
|
+ background-color: #dcdfe6;
|
|
|
+ line-height: 13px;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-weight: 500;
|
|
|
+ margin-left: 4px;
|
|
|
+ max-width: 300px;
|
|
|
+ overflow-x: auto;
|
|
|
+ overflow-y: hidden;
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
-@import "../../styles/data-fill/wbs.scss";
|
|
|
+}
|
|
|
.hc-add-node-modal-foot-box {
|
|
|
position: relative;
|
|
|
display: flex;
|
|
@@ -721,21 +684,32 @@ const showTreeNode = async ()=>{
|
|
|
bottom: 77px;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+.data-fill-wbs-hide-btn {
|
|
|
+ background: #fff;
|
|
|
+ color: #ffffff;
|
|
|
+}
|
|
|
+
|
|
|
+html.dark .data-fill-wbs-hide-btn {
|
|
|
+ background: #141414;
|
|
|
+ color: #141414;
|
|
|
+}
|
|
|
+
|
|
|
html.theme-dark {
|
|
|
.bg-svg-xml {
|
|
|
background-color: initial;
|
|
|
background-image: initial;
|
|
|
}
|
|
|
- .hc-layout-box .hc-layout-content-box .hc-card-max-h-box.node-tree .hc-tree-foot-tip-box {
|
|
|
+ .hc-layout-box
|
|
|
+ .hc-layout-content-box
|
|
|
+ .hc-card-max-h-box.node-tree
|
|
|
+ .hc-tree-foot-tip-box {
|
|
|
border-top: 1px solid #303030;
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
</style>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-.hc-tree-box .el-tree-node {
|
|
|
+.hc-tree-box1 .el-tree-node {
|
|
|
.el-checkbox {
|
|
|
margin-right: 0;
|
|
|
.el-checkbox__inner {
|
|
@@ -825,7 +799,8 @@ html.theme-dark {
|
|
|
background-color: #f1f5f8;
|
|
|
display: inline;
|
|
|
vertical-align: middle;
|
|
|
- box-shadow: -2px 0 10px 0 rgba(32, 37, 50, 0.03), 0 10px 21px 20px rgba(32, 37, 50, 0.03);
|
|
|
+ box-shadow: -2px 0 10px 0 rgba(32, 37, 50, 0.03),
|
|
|
+ 0 10px 21px 20px rgba(32, 37, 50, 0.03);
|
|
|
}
|
|
|
.copy-node-form-box {
|
|
|
margin-top: 24px;
|
|
@@ -850,9 +825,172 @@ html.theme-dark {
|
|
|
opacity: 1;
|
|
|
transition: opacity 0.2s;
|
|
|
&:hover {
|
|
|
- opacity: .5;
|
|
|
+ opacity: 0.5;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.hc-tree-back-to{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+/* 新增拖拽排序相关样式 */
|
|
|
+.sortable-ghost {
|
|
|
+ opacity: 0.5;
|
|
|
+ background: #f5f5f5;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+
|
|
|
+.hc-attachment-item {
|
|
|
+ transition: all 0.3s;
|
|
|
+ cursor: move;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 12px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 4px;
|
|
|
+ border: 1px solid #ebeef5;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.hc-attachment-content {
|
|
|
+ min-height: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 原有样式保持不变 */
|
|
|
+.hc-attachment-card {
|
|
|
+ margin-bottom: 16px;
|
|
|
+
|
|
|
+ .hc-attachment-header {
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ padding-left: 8px;
|
|
|
+ border-left: 3px solid #409eff;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .hc-attachment-file-name {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .name {
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .hc-attachment-btn-box {
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
+<style>
|
|
|
+.custom-tooltip-pro {
|
|
|
+ background-color: #7691E0 !important;
|
|
|
+ color: white !important;
|
|
|
+ border: none !important;
|
|
|
+ max-width: 300px !important; /* 最大宽度 */
|
|
|
+ padding: 10px !important;
|
|
|
+ font-size: 14px;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.tooltip-content {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.new-folder {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 8px 5px;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.add-icon {
|
|
|
+ font-size: 18px;
|
|
|
+}
|
|
|
+
|
|
|
+.add-input-container {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
+ padding: 8px 5px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ background: white;
|
|
|
+}
|
|
|
+
|
|
|
+.folder-input {
|
|
|
+ flex: 1;
|
|
|
+ background-color: rgba(255, 255, 255, 1);
|
|
|
+ border: none;
|
|
|
+ border-radius: 4px;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.input-buttons {
|
|
|
+ display: flex;
|
|
|
+ gap: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.confirm-icon {
|
|
|
+ color: #4CAF50;
|
|
|
+ font-size: 18px;
|
|
|
+}
|
|
|
+
|
|
|
+.cancel-icon {
|
|
|
+ color: #f44336;
|
|
|
+ font-size: 18px;
|
|
|
+}
|
|
|
+
|
|
|
+.folder-list-container {
|
|
|
+ max-height: 200px; /* 最大高度 */
|
|
|
+ overflow-y: auto; /* 超出滚动 */
|
|
|
+ overflow-x: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.folder-item {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 8px 5px;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.folder-name {
|
|
|
+ margin-right: 15px; /* 名称与删除图标间距 */
|
|
|
+ flex: 1;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+}
|
|
|
+
|
|
|
+.delete-icon {
|
|
|
+ font-size: 18px;
|
|
|
+ flex-shrink: 0; /* 防止图标被压缩 */
|
|
|
+}
|
|
|
+
|
|
|
+/* 滚动条样式优化 */
|
|
|
+.folder-list-container::-webkit-scrollbar {
|
|
|
+ width: 6px;
|
|
|
+}
|
|
|
+
|
|
|
+.folder-list-container::-webkit-scrollbar-thumb {
|
|
|
+ background-color: rgba(255, 255, 255, 0.3);
|
|
|
+ border-radius: 3px;
|
|
|
+}
|
|
|
+</style>
|