hookehuyr

API联调

This diff is collapsed. Click to expand it.
<!--
* @Date: 2023-11-01 10:18:53
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-11-22 17:29:49
* @LastEditTime: 2023-11-23 10:24:27
* @FilePath: /vue-flow-editor/doc/selectUserView.vue
* @Description: 成员列表选择控件
-->
......@@ -232,7 +232,8 @@ import _ from "lodash";
import { ElNotification, ElMessage, ElMessageBox } from 'element-plus'
const props = defineProps({
visible: Boolean
visible: Boolean,
list: Array,
});
const emit = defineEmits(["close", "confirm"]);
......@@ -316,8 +317,6 @@ onMounted(async () => {
message: role_list.data.msg,
});
}
// TODO: 查询到的用户选中列表数据,等待接口数据
userTags.value = [{ id: 35697, name: "西园寺" },{ id: 492081, name: "营员" }];
// Tabs菜单的完整数据结构
userTabs.value.forEach(item => {
if (item.type === 'corp-tree') {
......@@ -330,17 +329,6 @@ onMounted(async () => {
item.data = roleList.value;
}
});
// 第一项目是组织结构树,默认展开第一个节点
if (userTabs.value[activeTabIdx.value]['type'] === 'corp-tree') {
if (userTabs.value[activeTabIdx.value]['data'].length) {
// 默认展开第一个节点
defaultExpandedKeys.value = [userTabs.value[activeTabIdx.value]['data'][0]['id']];
// 把用户选中的节点注入树结构显示选中状态
nextTick(() => {
currentCheckedNodeKey.value = userTags.value.map(ele => ele.id);
});
}
}
});
watch(() => {
......@@ -369,6 +357,25 @@ watch(
}
}
);
watch(
() => props.list,
val => {
if (val) {
userTags.value = val;
// 第一项目是组织结构树,默认展开第一个节点
if (userTabs.value[activeTabIdx.value]['type'] === 'corp-tree') {
if (userTabs.value[activeTabIdx.value]['data'].length) {
// 默认展开第一个节点
defaultExpandedKeys.value = [userTabs.value[activeTabIdx.value]['data'][0]['id']];
// 把用户选中的节点注入树结构显示选中状态
nextTick(() => {
currentCheckedNodeKey.value = userTags.value.map(ele => ele.id);
});
}
}
}
}
);
/**
* 点击Tab切换回调
......
......@@ -26,9 +26,10 @@
"@vue/composition-api": "^1.7.2",
"axios": "^1.6.0",
"echarts": "^5.1.2",
"element-plus": "^2.4.1",
"element-plus": "^2.4.2",
"jquery": "^3.7.1",
"lodash": "^4.17.21",
"qs": "^6.11.2",
"sass": "^1.69.4",
"sass-loader": "10.1.1",
"uuid": "^9.0.1",
......
This diff could not be displayed because it is too large.
......@@ -3787,10 +3787,10 @@ electron-to-chromium@^1.3.793:
resolved "https://registry.nlark.com/electron-to-chromium/download/electron-to-chromium-1.3.806.tgz?cache=0&sync_timestamp=1628906712766&other_urls=https%3A%2F%2Fregistry.nlark.com%2Felectron-to-chromium%2Fdownload%2Felectron-to-chromium-1.3.806.tgz"
integrity sha1-IVAhAPEa6tbFAdHNfyUE8WyTZkI=
element-plus@^2.4.1:
version "2.4.1"
resolved "https://mirrors.cloud.tencent.com/npm/element-plus/-/element-plus-2.4.1.tgz#8a5faa69e856d82494b94d77fb485d9e727c8bc1"
integrity sha512-t7nl+vQlkBKVk1Ag6AufSDyFV8YIXxTFsaya4Nz/0tiRlcz65WPN4WMFeNURuFJleu1HLNtP4YyQKMuS7El8uA==
element-plus@^2.4.2:
version "2.4.2"
resolved "https://mirrors.cloud.tencent.com/npm/element-plus/-/element-plus-2.4.2.tgz#2a24632e0904ccd7bbbd64c269704f6b9969833c"
integrity sha512-E/HwXX7JF1LPvQSjs0fZ8WblIoc0quoXsRXQZiL7QDq7xJdNGSUaXtdk7xiEv7axPmLfEFtxE5du9fFspDrmJw==
dependencies:
"@ctrl/tinycolor" "^3.4.1"
"@element-plus/icons-vue" "^2.0.6"
......@@ -7185,6 +7185,13 @@ qs@6.7.0:
resolved "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz?cache=0&sync_timestamp=1616385248556&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.7.0.tgz"
integrity sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=
qs@^6.11.2:
version "6.11.2"
resolved "https://mirrors.cloud.tencent.com/npm/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9"
integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==
dependencies:
side-channel "^1.0.4"
qs@~6.5.2:
version "6.5.2"
resolved "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz?cache=0&sync_timestamp=1616385248556&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.5.2.tgz"
......