|
@@ -32,11 +32,13 @@
|
|
|
<hc-body scrollbar padding="0px">
|
|
|
<HcLazyTree
|
|
|
ref="rightTree"
|
|
|
+ v-model:loading="isLoading"
|
|
|
tree-key="id"
|
|
|
show-checkbox
|
|
|
is-type
|
|
|
:is-color="false"
|
|
|
-
|
|
|
+
|
|
|
+ :is-auto-check="true"
|
|
|
:accordion="false"
|
|
|
:h-props="treeProps"
|
|
|
@check="addTreeNodeCheckChange"
|
|
@@ -70,11 +72,11 @@
|
|
|
<HcIcon name="close" />
|
|
|
<span>取消</span>
|
|
|
</el-button>
|
|
|
- <el-button hc-btn type="primary" :loading="sureLoading" @click="sureClick(1)">
|
|
|
+ <el-button hc-btn type="primary" :loading="sureLoading" :disabled="isLoading" @click="sureClick(1)">
|
|
|
<HcIcon name="check" />
|
|
|
<span>关联并退出</span>
|
|
|
</el-button>
|
|
|
- <el-button hc-btn type="primary" :loading="sureLoading" @click="sureClick(2)">
|
|
|
+ <el-button hc-btn type="primary" :loading="sureLoading" :disabled="isLoading" @click="sureClick(2)">
|
|
|
<HcIcon name="check" />
|
|
|
<span>关联并继续</span>
|
|
|
</el-button>
|
|
@@ -171,6 +173,10 @@ const leftTreeProps = ref({
|
|
|
},
|
|
|
})
|
|
|
//监听
|
|
|
+const isLoading = ref(false)
|
|
|
+watch(isLoading, (newVal) => {
|
|
|
+ console.log('加载状态变化:', newVal)
|
|
|
+})
|
|
|
watch(() => [
|
|
|
props.linkModal,
|
|
|
|
|
@@ -213,6 +219,8 @@ const addTreeNodeCheckChange = (_, { checkedNodes, checkedKeys, halfCheckedNodes
|
|
|
const sureLoading = ref(false)
|
|
|
const sureClick = async (type) => {
|
|
|
const keys = allSelectedList.value || []
|
|
|
+ console.log(leftPid.value, 'leftPid.value')
|
|
|
+ console.log(keys, 'keys')
|
|
|
|
|
|
|
|
|
if (keys.length <= 0 || leftPid.value.length <= 0) {
|