wbs-tree.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. <template>
  2. <hc-drawer v-model="isShow" is-close to-id="hc-project-list">
  3. <div class="hc-project-wbs-tree flex">
  4. <div class="header hc-flex">
  5. <div class="name flex-1">{{ typeLable }} - {{ projectInfo.projectName }}</div>
  6. <div class="hc-flex">
  7. <el-dropdown trigger="click">
  8. <el-button hc-btn type="success">
  9. <span>数据同步</span>
  10. <hc-icon name="arrow-down-s" />
  11. </el-button>
  12. <template #dropdown>
  13. <el-dropdown-menu>
  14. <template v-for="item in dataSyncMenu" :key="item.key">
  15. <el-dropdown-item @click="dataSyncMenuClick(item)">{{ item.name }}</el-dropdown-item>
  16. </template>
  17. </el-dropdown-menu>
  18. </template>
  19. </el-dropdown>
  20. <el-button v-if="isFormSet" class="ml-3" hc-btn type="primary" @click="setIsFormSetValue">表单设置</el-button>
  21. <el-button v-else class="ml-3" hc-btn type="primary" @click="setIsFormSetValue">元素设置</el-button>
  22. <el-button hc-btn type="danger">节点参数</el-button>
  23. <el-button hc-btn color="#626aef">独立表单库</el-button>
  24. <el-button hc-btn type="warning">归档文件时间</el-button>
  25. </div>
  26. </div>
  27. <div class="body">
  28. <hc-body split padding="8px">
  29. <template #left>
  30. <hc-card v-loading="isTreeLoading" title="工程节点信息" scrollbar class="is-tree">
  31. <template #search>
  32. <hc-search-input v-model="searchTree.queryValue" @search="searchTreeClick">
  33. <template #prepend>
  34. <el-select v-model="searchTree.type" placeholder="类型" style="width: 75px">
  35. <el-option label="节点" value="1" />
  36. <el-option label="表名" value="2" />
  37. </el-select>
  38. </template>
  39. </hc-search-input>
  40. </template>
  41. <hc-data-tree
  42. v-if="isSearchTree" :h-props="treeProps" :datas="treeLoadData" tree-key="id" :auto-expand-keys="treeExpandKeys"
  43. :menus="treeMenus" @menu-tap="treeMenuClick" @node-tap="treeNodeClick"
  44. />
  45. <hc-lazy-tree
  46. v-else :h-props="treeProps" tree-key="id" :auto-expand-keys="treeExpandKeys"
  47. :menus="treeMenus" @load="treeLoadNode" @menu-tap="treeMenuClick" @node-tap="treeNodeClick"
  48. />
  49. </hc-card>
  50. </template>
  51. <template v-if="isFormSet">
  52. <div class="body-top">
  53. <hc-card title="节点信息">
  54. <hc-table :is-index="false" :column="nodeTableColumn" :datas="nodeTableData">
  55. <template #nodeType="{ row }">{{ getDictionaryName(nodeTypelist, row.nodeType, true) }}</template>
  56. </hc-table>
  57. </hc-card>
  58. </div>
  59. <div class="body-content">
  60. <hc-card title="当前项目信息表">
  61. <template #extra>
  62. <el-button hc-btn type="primary" :disabled="infoTableData.length <= 0">编辑</el-button>
  63. <el-button hc-btn type="success" :disabled="infoTableData.length <= 0">排序</el-button>
  64. </template>
  65. <hc-table v-loading="infoTableLoading" :is-index="false" :column="infoTableColumn" :datas="infoTableData">
  66. <template #tableType="{ row }">{{ getDictionaryName(tableTypelist, row.tableType, true) }}</template>
  67. <template #tableOwner="{ row }">{{ getDictionaryName(ownerTypeList, row.tableOwner, true) }}</template>
  68. <template #action="{ row }">
  69. <el-link type="primary">预览</el-link>
  70. <el-link v-if="row.status === 1" type="warning">隐藏表单</el-link>
  71. <el-link v-if="row.status === 0" type="success">取消隐藏</el-link>
  72. <el-link v-del-com:[delInfoTableRow]="row" type="danger">删除</el-link>
  73. </template>
  74. </hc-table>
  75. </hc-card>
  76. </div>
  77. </template>
  78. <template v-else>
  79. <hc-card>
  80. <hc-table v-loading="infoTableLoading" :is-index="false" :column="infoTableColumn1" :datas="infoTableData">
  81. <template #tableType="{ row }">{{ getDictionaryName(tableTypelist, row.tableType, true) }}</template>
  82. <template #isLinkTable="{ row }">{{ row.isLinkTable === 2 ? '是' : '否' }}</template>
  83. <template #tableOwner="{ row }">{{ getDictionaryName(ownerTypeList, row.tableOwner, true) }}</template>
  84. <template #action="{ row }">
  85. <el-link type="success">关联清表</el-link>
  86. <el-link type="primary" :disabled="row.excelId === -1 || isNullES(row.excelId)">编辑元素</el-link>
  87. <el-link type="warning" :disabled="row.excelId === -1 || isNullES(row.excelId)">调整表单</el-link>
  88. <el-link type="primary">编辑元素公式</el-link>
  89. <el-link type="warning">表单同步</el-link>
  90. <el-link type="primary">关联节点</el-link>
  91. <el-link v-del-com:[delInfoTableRow]="row" type="danger">删除表单</el-link>
  92. </template>
  93. </hc-table>
  94. </hc-card>
  95. </template>
  96. </hc-body>
  97. </div>
  98. </div>
  99. <!-- 编辑节点 -->
  100. <TreeNodeEditDialog
  101. v-model="isTreeNodeEditShow" :node="treeInfo" :type="Number(isType)" :wid="wbsId" :pid="projectInfo.id" :tree-props="treeProps"
  102. :node-type="nodeTypelist" :major-type="majorDataTypeList" @close="treeNodeEditClose" @change="treeNodeEditChange"
  103. />
  104. <!-- 节点排序 -->
  105. <hc-new-dialog v-model="nodeSortModalShow" is-table widths="1100px" title="调整排序" @save="nodeSortModalSave">
  106. <hc-table
  107. ui="hc-table-row-drop" :column="nodeSortTableColumn" :datas="nodeSortTableData"
  108. :loading="nodeSortNodeLoading" is-row-drop quick-sort :index-style="{ width: 80 }"
  109. @row-drop="nodeSortTableRowDrop" @row-sort="nodeSortTableRowDrop"
  110. >
  111. <template #action="{ row, index }">
  112. <span class="text-xl" :class="index === 0 ? 'text-gray' : 'text-link'" @click="upNodeSortClick(row, index)">
  113. <hc-icon name="arrow-up" fill />
  114. </span>
  115. <span class="ml-2 text-xl" :class="index === (nodeSortTableData.length - 1) ? 'text-gray' : 'text-link'" @click="downNodeSortClick(row, index)">
  116. <hc-icon name="arrow-down" fill />
  117. </span>
  118. </template>
  119. </hc-table>
  120. </hc-new-dialog>
  121. </hc-drawer>
  122. </template>
  123. <script setup>
  124. import { nextTick, ref, watch } from 'vue'
  125. import { useAppStore } from '~src/store'
  126. import { HcFirmMsg, getStore, setStore } from 'hc-vue3-ui'
  127. import { deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
  128. import { getDictionaryData, reloadPage } from '~uti/tools'
  129. import TreeNodeEditDialog from './tree-node-edit.vue'
  130. import wbsTreeApi from '~api/wbs/tree'
  131. import mainApi from '~api/wbs/private'
  132. const props = defineProps({
  133. type: {
  134. type: [String, Number],
  135. default: '1',
  136. },
  137. info: {
  138. type: Object,
  139. default: () => ({}),
  140. },
  141. })
  142. //事件
  143. const emit = defineEmits(['change', 'close'])
  144. //双向绑定
  145. // eslint-disable-next-line no-undef
  146. const isShow = defineModel('modelValue', {
  147. default: false,
  148. })
  149. const store = useAppStore()
  150. //监听数据
  151. const isType = ref(props.type)
  152. const projectInfo = ref(props.info)
  153. watch(() => [props.type, props.info], ([type, info]) => {
  154. isType.value = type
  155. projectInfo.value = info
  156. }, { deep: true })
  157. //监听显示
  158. watch(isShow, (val) => {
  159. if (val) {
  160. getProjectData()
  161. } else {
  162. //projectInfo.value = {}
  163. //isType.value = ''
  164. emit('close')
  165. }
  166. })
  167. //获取项目信息
  168. const typeLable = ref('')
  169. const wbsId = ref('')
  170. const getProjectData = () => {
  171. const type = isType.value ?? 1
  172. const wbsArr = ['WBS树管理', '实验划分', '计量管理', '日志树管理', '征拆划分']
  173. typeLable.value = wbsArr[Number(type) - 1]
  174. const wbsIds = [
  175. 'referenceWbsTemplateId', 'referenceWbsTemplateIdTrial',
  176. 'referenceWbsTemplateIdMeter', 'referenceLogWbsTemplateId',
  177. 'referenceWbsTemplateIdLar',
  178. ]
  179. wbsId.value = projectInfo.value[wbsIds[Number(type) - 1]]
  180. console.log('info: ', projectInfo.value)
  181. getNodeTypelist(Number(type) - 1)
  182. getTableTypelist(Number(type) - 1)
  183. getDataTypelist()
  184. getOwnerTypelist()
  185. getMajorDataTypeList()
  186. }
  187. //获取节点类型
  188. const nodeTypelist = ref([])
  189. const getNodeTypelist = async (type) => {
  190. //计量管理,征拆划分,实验划分,WBS树管理,日志树管理
  191. const types = ['wbs_node_type', 'trial_node_type', 'meter_node_type', 'wbs_node_type', 'lar_node_type']
  192. const data = await getDictionaryData(types[type])
  193. nodeTypelist.value = getArrValue(data)
  194. }
  195. //获取表单类型
  196. const tableTypelist = ref([])
  197. const getTableTypelist = async (type) => {
  198. //计量管理,征拆划分,实验划分,WBS树管理,日志树管理
  199. const types = ['table_type', 'trial_table_type', 'table_type', 'table_type', 'table_type']
  200. const data = await getDictionaryData(types[type])
  201. tableTypelist.value = getArrValue(data)
  202. }
  203. //获取数据类型
  204. const dataTypeList = ref([])
  205. const getDataTypelist = async () => {
  206. const data = await getDictionaryData('data_type')
  207. dataTypeList.value = getArrValue(data)
  208. }
  209. //获取业主类型
  210. const ownerTypeList = ref([])
  211. const getOwnerTypelist = async () => {
  212. const data = await getDictionaryData('owner_type')
  213. ownerTypeList.value = getArrValue(data)
  214. }
  215. //获取类型字典
  216. const majorDataTypeList = ref([])
  217. const getMajorDataTypeList = async () => {
  218. const data = await getDictionaryData('major_data_type')
  219. majorDataTypeList.value = getArrValue(data)
  220. }
  221. //获取字典里的数据
  222. const getDictionaryName = (arr, id, name) => {
  223. if (isNullES(id)) return name ? '' : {}
  224. const item = arr.find((item) => item.value === Number(id))
  225. return name ? item?.label : getObjValue(item)
  226. }
  227. //树节点搜索
  228. const isSearchTree = ref(false)
  229. const isTreeLoading = ref(false)
  230. const searchTree = ref({ queryValue: '', type: '1' })
  231. const searchTreeClick = () => {
  232. const { queryValue } = searchTree.value
  233. isSearchTree.value = !isNullES(queryValue)
  234. getTreeLoadData()
  235. }
  236. //获取搜索树的数据
  237. const treeLoadData = ref([])
  238. const getTreeLoadData = async () => {
  239. isTreeLoading.value = true
  240. const { data } = await wbsTreeApi.getQueryValueByType({
  241. ...searchTree.value,
  242. wbsId: wbsId.value,
  243. projectId: projectInfo.value.id,
  244. })
  245. treeLoadData.value = getArrValue(data)
  246. isTreeLoading.value = false
  247. }
  248. //树属性
  249. const treeExpandKeys = ref(getStore('project-wbs-tree-expand-keys') || [])
  250. const treeProps = {
  251. children: 'children',
  252. label: 'title',
  253. isLeaf: ({ hasChildren, isExistForm, majorDataType, nodeType }) => {
  254. let tag = false
  255. if (!hasChildren) {
  256. tag = true
  257. }
  258. if (isExistForm === 1) {
  259. tag = true
  260. }
  261. if (nodeType >= 6 && nodeType <= 13) {
  262. tag = true
  263. }
  264. //中间交工。开工报告、质量评定)
  265. if (majorDataType >= 1 && majorDataType <= 3) {
  266. tag = true
  267. }
  268. return tag
  269. },
  270. }
  271. //树的右键菜单
  272. const treeMenus = [
  273. { icon: 'draft', label: '编辑节点', key: 'edit' },
  274. { icon: 'refresh', label: '同步新增元素表单', key: 'sync1' },
  275. { icon: 'loop-left', label: '同步元素表单排序到合同段', key: 'sync3' },
  276. { icon: 'loop-right', label: '同步节点基础信息及表单URL', key: 'sync2' },
  277. { icon: 'sort-asc', label: '调整排序', key: 'sort' },
  278. { icon: 'delete-bin', label: '删除节点', key: 'del' },
  279. ]
  280. //菜单被点击
  281. const treeMenuItem = ref({})
  282. const treeMenuClick = async ({ key, node, data }) => {
  283. if (key === 'edit') { //编辑节点
  284. data.parentName = node?.parent?.data?.title ?? '' //获取父节点名称
  285. treeItem.value = data
  286. await getTreeDetail()
  287. await nextTick()
  288. isTreeNodeEditShow.value = true
  289. } else if (key === 'sync1') {
  290. const { primaryKeyId, pKeyId } = data
  291. const pid = primaryKeyId ? primaryKeyId : pKeyId
  292. if (isNullES(pid)) {
  293. window.$message.warning('参数异常,请稍后重试')
  294. return
  295. }
  296. //同步新增元素表单
  297. await HcFirmMsg({
  298. text: `是否同步节点【${data.title}】?`,
  299. loadingText: '数据同步中...',
  300. }, (resolve) => {
  301. const { isRes } = mainApi.syncNodeTable(pid)
  302. resolve() //关闭弹窗
  303. if (!isRes) return
  304. window.$message.success('同步成功')
  305. getInfoTableData()
  306. })
  307. } else if (key === 'sync3') {
  308. const { id } = projectInfo.value
  309. if (isNullES(id)) {
  310. window.$message.warning('参数异常,请稍后重试')
  311. return
  312. }
  313. //同步元素表单排序到合同段
  314. await HcFirmMsg({
  315. text: '同步元素表单排序到合同段?',
  316. loadingText: '数据同步中...',
  317. }, (resolve) => {
  318. const { isRes } = mainApi.syncContractTabSort(id)
  319. resolve() //关闭弹窗
  320. if (!isRes) return
  321. window.$message.success('同步成功')
  322. getInfoTableData()
  323. })
  324. } else if (key === 'sync2') {
  325. const { primaryKeyId, pKeyId } = data
  326. const pid = primaryKeyId ? primaryKeyId : pKeyId
  327. if (isNullES(pid)) {
  328. window.$message.warning('参数异常,请稍后重试')
  329. return
  330. }
  331. //同步节点基础信息及表单URL
  332. await HcFirmMsg({
  333. text: `是否同步节点【${data.title}】到合同段?`,
  334. loadingText: '数据同步中...',
  335. }, (resolve) => {
  336. const { isRes } = mainApi.syncNodeinfo(pid)
  337. resolve() //关闭弹窗
  338. if (!isRes) return
  339. window.$message.success('同步成功')
  340. getInfoTableData()
  341. })
  342. } else if (key === 'sort') {
  343. const { parentId } = data
  344. const { id } = projectInfo.value
  345. if (isNullES(id) || isNullES(wbsId.value)) {
  346. window.$message.warning('参数异常,请稍后重试')
  347. return
  348. }
  349. //调整排序
  350. nodeSortModalShow.value = true
  351. nodeSortNodeLoading.value = true
  352. const { data: apiData } = await wbsTreeApi.findWbsTreePrivateSameLevel({
  353. parentId: parentId,
  354. projectId: id,
  355. wbsId: wbsId.value,
  356. })
  357. nodeSortNodeLoading.value = false
  358. nodeSortTableData.value = getArrValue(apiData)
  359. } else if (key === 'del') {
  360. if (node.level <= 1) {
  361. window.$message.warning('当前节点无法删除')
  362. return
  363. }
  364. const { primaryKeyId, pKeyId } = data
  365. const pid = primaryKeyId ? primaryKeyId : pKeyId
  366. if (isNullES(pid)) {
  367. window.$message.warning('参数异常,请稍后重试')
  368. return
  369. }
  370. //删除节点
  371. await HcFirmMsg({
  372. text: `此操作将删除节点【${data.title}】,是否继续?`,
  373. loadingText: '删除节点中...',
  374. }, (resolve) => {
  375. const { isRes } = mainApi.del(pid)
  376. resolve() //关闭弹窗
  377. if (!isRes) return
  378. window.$message.success('删除成功')
  379. reloadPage()
  380. })
  381. }
  382. }
  383. //节点排序
  384. const nodeSortModalShow = ref(false)
  385. const nodeSortTableColumn = ref([
  386. { key:'tableName', name: '节点名称' },
  387. { key:'action', name: '排序', width: 90 },
  388. ])
  389. const nodeSortTableData = ref([])
  390. const nodeSortNodeLoading = ref(false)
  391. //拖动完成
  392. const nodeSortTableRowDrop = (rows) => {
  393. nodeSortTableData.value = [] // 先清空,否则排序会异常
  394. nextTick(() => {
  395. nodeSortTableData.value = rows
  396. })
  397. }
  398. //向上
  399. const upNodeSortClick = (row, index) => {
  400. const data = nodeSortTableData.value || []
  401. if (index !== 0) {
  402. const tmp = data.splice(index - 1, 1)
  403. nodeSortTableData.value.splice(index, 0, tmp[0])
  404. } else {
  405. window?.$message?.warning('已经处于置顶,无法上移')
  406. }
  407. }
  408. //向下
  409. const downNodeSortClick = (row, index) => {
  410. const indexs = index + 1
  411. const data = nodeSortTableData.value
  412. if (indexs !== data.length) {
  413. const tmp = data.splice(indexs, 1)
  414. nodeSortTableData.value.splice(index, 0, tmp[0])
  415. } else {
  416. window?.$message?.warning('已经处于置底,无法下移')
  417. }
  418. }
  419. //节点排序完成
  420. const nodeSortModalSave = async () => {
  421. const arr = deepClone(nodeSortTableData.value)
  422. if (arr.length <= 0) {
  423. window.$message.warning('数据异常,请稍后重试')
  424. nodeSortModalShow.value = false
  425. return
  426. }
  427. //处理顺序
  428. for (let i = 0; i < arr.length; i++) {
  429. arr[i].sort = i + 1
  430. }
  431. //发起请求
  432. const { isRes } = await wbsTreeApi.wbsTreePrivateSort(arr)
  433. if (!isRes) return
  434. window.$message.success('排序完成')
  435. nodeSortModalShow.value = false
  436. reloadPage()
  437. }
  438. //编辑节点
  439. const isTreeNodeEditShow = ref(false)
  440. //编辑节点被关闭
  441. const treeNodeEditClose = () => {
  442. isTreeNodeEditShow.value = false
  443. treeMenuItem.value = {}
  444. }
  445. //编辑节点被修改
  446. const treeNodeEditChange = () => {
  447. isTreeNodeEditShow.value = false
  448. treeMenuItem.value = {}
  449. console.log('编辑节点被修改')
  450. }
  451. //懒加载树
  452. const treeLoadNode = async ({ item, level }, resolve) => {
  453. let pid = level !== 0 ? item.id : 0
  454. const { data } = await mainApi.getLazytree({
  455. wbsId: wbsId.value,
  456. parentId: pid,
  457. tenantId: store.tenantId,
  458. projectId: projectInfo.value.id,
  459. wbsType: isType.value,
  460. })
  461. resolve(getArrValue(data))
  462. }
  463. //节点信息
  464. const nodeTableColumn = ref([
  465. { key: 'nodeName', name: '当前节点', align: 'center' },
  466. { key: 'nodeType', name: '节点类型', align: 'center' },
  467. { key: 'parentName', name: '上级节点', align: 'center' },
  468. ])
  469. const nodeTableData = ref([])
  470. //节点被点击
  471. const treeItem = ref({})
  472. const treeNodeClick = ({ node, data, keys }) => {
  473. //获取父节点名称
  474. let parentName = ''
  475. if (node?.parent?.data) {
  476. parentName = node.parent.data.title ?? ''
  477. }
  478. data.parentName = parentName
  479. //设置相关数据
  480. treeItem.value = getObjValue(data)
  481. setStore('project-wbs-tree-expand-keys', keys)
  482. treeExpandKeys.value = getArrValue(keys)
  483. //获取节点详情
  484. getTreeDetail()
  485. getInfoTableData()
  486. }
  487. //获取节点详情
  488. const treeInfo = ref({})
  489. const getTreeDetail = async () => {
  490. const { id, parentName } = treeItem.value
  491. const { data } = await mainApi.detail({
  492. id,
  493. wbsId: wbsId.value,
  494. projectId: projectInfo.value.id,
  495. })
  496. const res = getObjValue(data)
  497. res.parentName = parentName
  498. treeInfo.value = res
  499. nodeTableData.value = [res]
  500. }
  501. //当前项目信息表
  502. const infoTableLoading = ref(false)
  503. const infoTableColumn = ref([
  504. { key: 'tableName', name: '表单名称' },
  505. { key: 'elementTotal', name: '字段总量', align: 'center', width: 80 },
  506. { key: 'fillRate', name: '填报率', align: 'center', width: 80 },
  507. { key: 'tableType', name: '表单类型', align: 'center', width: 100 },
  508. { key: 'tableOwner', name: '所属方', align: 'center', width: 100 },
  509. { key: 'action', name: '操作', align: 'center', width: 160 },
  510. ])
  511. const infoTableData = ref([])
  512. const getInfoTableData = async () => {
  513. const { id } = treeItem.value
  514. infoTableLoading.value = true
  515. const { data } = await mainApi.findNodeTableByCondition({
  516. parentId: id,
  517. wbsId: wbsId.value,
  518. projectId: projectInfo.value.id,
  519. })
  520. infoTableData.value = getArrValue(data)
  521. infoTableLoading.value = false
  522. }
  523. //当前项目信息表删除
  524. const delInfoTableRow = async ({ item }, resolve) => {
  525. const { isRes } = await mainApi.removeTableByCondition({
  526. id: item.id,
  527. wbsId: wbsId.value,
  528. projectId: projectInfo.value.id,
  529. })
  530. resolve() //关闭弹窗
  531. if (!isRes) return
  532. window.$message.success('删除成功')
  533. getInfoTableData().then()
  534. }
  535. //表单设置
  536. const isFormSet = ref(true)
  537. const infoTableColumn1 = ref([
  538. { key: 'tableName', name: '表单名称' },
  539. { key: 'tableType', name: '表单类型', align: 'center', width: 80 },
  540. { key: 'fillRate', name: '填报率', align: 'center', width: 80 },
  541. { key: 'isLinkTable', name: '关联清表', align: 'center', width: 80 },
  542. { key: 'tableOwner', name: '所属方', align: 'center', width: 100 },
  543. { key: 'action', name: '操作', width: 490, align: 'center' },
  544. ])
  545. const setIsFormSetValue = () => {
  546. isFormSet.value = !isFormSet.value
  547. if (isFormSet.value) {
  548. getTreeDetail()
  549. }
  550. getInfoTableData()
  551. }
  552. //数据同步按钮菜单
  553. const dataSyncMenu = [
  554. { key: 'jdSync', name: '节点参数同步', load:false },
  555. { key: 'dqSync', name: '电签同步', load:false },
  556. { key: 'gsSync', name: '公式同步', load:false },
  557. ]
  558. const dataSyncMenuClick = (item) => {
  559. console.log( item)
  560. }
  561. </script>
  562. <style scoped lang="scss">
  563. .hc-project-wbs-tree {
  564. position: relative;
  565. background: #ececec;
  566. border-radius: 4px;
  567. height: 100%;
  568. flex-direction: column;
  569. overflow: hidden;
  570. .header {
  571. color: white;
  572. background: #54565A;
  573. padding: 10px 14px;
  574. flex-shrink: 0;
  575. .name {
  576. white-space:nowrap;
  577. overflow:hidden;
  578. text-overflow:ellipsis;
  579. }
  580. }
  581. .body {
  582. flex: 1;
  583. flex-basis: auto;
  584. position: relative;
  585. }
  586. }
  587. </style>
  588. <style lang="scss">
  589. .hc-project-wbs-tree .body {
  590. .el-card.hc-card-box {
  591. --el-card-padding: 12px;
  592. --el-card-border-radius: 5px;
  593. }
  594. .hc-page-split-content {
  595. position: relative;
  596. .body-top {
  597. position: relative;
  598. height: 119.5px;
  599. }
  600. .body-content {
  601. position: relative;
  602. margin-top: 10px;
  603. height: calc(100% - 129.5px);
  604. }
  605. }
  606. }
  607. </style>