|
@@ -17,7 +17,7 @@
|
|
|
<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">显示</el-button>
|
|
|
+ <el-button type="primary" hc-btn keys="hide-data-show" :loading="showTreeNodeLoad" @click="showTreeNode">显示</el-button>
|
|
|
</HcTooltip>
|
|
|
</div>
|
|
|
<div class="hc-search-tree-val">
|
|
@@ -48,7 +48,7 @@
|
|
|
{{ getTreeNodeType(data.type, data.majorDataType) }}
|
|
|
</span>
|
|
|
|
|
|
- <span :class="data.isHide === 1 ? 'text-red' : ''">
|
|
|
+ <span :class="data.isBussShow === '2' ? 'text-red' : ''">
|
|
|
{{ node.label }}
|
|
|
</span>
|
|
|
</div>
|
|
@@ -84,7 +84,7 @@
|
|
|
{{ getTreeNodeType(data.type, data.majorDataType) }}
|
|
|
</span>
|
|
|
|
|
|
- <span :class="data.isHide === 1 ? 'text-red' : ''">
|
|
|
+ <span :class="data.isBussShow === '2' ? 'text-red' : ''">
|
|
|
{{ node.label }}
|
|
|
</span>
|
|
|
</div>
|
|
@@ -141,7 +141,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { nextTick, onMounted, ref, watch } from 'vue'
|
|
|
+import { nextTick, onActivated, onMounted, ref, watch } from 'vue'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
import { HcIsButton } from '~src/plugins/IsButtons'
|
|
@@ -151,6 +151,7 @@ import NodeTree from './components/nodeTree/index.vue'
|
|
|
import { getTreeNodeType } from 'hc-vue3-ui'
|
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
|
import {
|
|
|
+ arrToKey,
|
|
|
getArrValue,
|
|
|
getObjValue,
|
|
|
isNullES,
|
|
@@ -240,7 +241,13 @@ onMounted(() => {
|
|
|
setContractType(contractInfo.value?.contractType)
|
|
|
getDictionaryApi()
|
|
|
})
|
|
|
-
|
|
|
+onActivated(()=>{
|
|
|
+ //重新加载左边树
|
|
|
+ isShowLeft.value = false
|
|
|
+ setTimeout(()=>{
|
|
|
+ isShowLeft.value = true
|
|
|
+ }, 500)
|
|
|
+})
|
|
|
//身份按钮切换数据
|
|
|
const authBtnTabKey = ref('1')
|
|
|
|
|
@@ -636,8 +643,39 @@ const onmousedown = () => {
|
|
|
|
|
|
//树节点被选中
|
|
|
const treeSelectNode = ref([])
|
|
|
-const ElTreeNodeCheck = (_, { checkedKeys }) => {
|
|
|
+
|
|
|
+const treeSelectdata = ref([])
|
|
|
+const ElTreeNodeCheck = (_, { checkedKeys, checkedNodes }) => {
|
|
|
+ console.log(checkedNodes, 'checkedNodes')
|
|
|
treeSelectNode.value = getArrValue(checkedKeys)
|
|
|
+ treeSelectdata.value = getArrValue(checkedNodes)
|
|
|
+}
|
|
|
+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)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ window?.$message?.error(msg)
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|