--fix bug

This commit is contained in:
yuping
2023-06-01 00:33:27 +08:00
parent e2b416234b
commit 4680d44799
3 changed files with 14 additions and 3 deletions

View File

@@ -116,7 +116,12 @@ export default {
// const showAddGroup = () => {
// state.Avisible = true;
// };
function uuid() {
const temp_url = URL.createObjectURL(new Blob());
const uuid = temp_url.toString();
URL.revokeObjectURL(temp_url);
return uuid.substr(uuid.lastIndexOf("/") + 1);
}
//展示要增加的小组
const showAddGroup = () => {
if (!state.groupNum) return message.warning("请输入要添加的小组数");
@@ -125,7 +130,7 @@ export default {
for (let i = 0; i < state.groupNum; i++) {
let obj = {
key: i,
groupName: "第" + (i + 1) + "小组",
groupName: uuid(),
capacity: state.peopleNum,
};
arr.push(obj);

View File

@@ -36,7 +36,7 @@
</a-tree-select>
</template>
<script setup>
import { defineEmits, defineProps, ref, watch } from "vue";
import {defineEmits, defineProps, ref, watch, watchEffect} from "vue";
import { boeRequest, useBoeApi } from "@/api/request";
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
@@ -66,6 +66,10 @@ const { data: options, loading: orgLoading } = useBoeApi(
}
);
watchEffect(()=>{
labelValue.value = props.value;
})
watch(props, () => {
// stuTreeExpandedKeys.value = [];
// console.log("labelValue.value", labelValue.value, props.value);

View File

@@ -189,6 +189,7 @@
</div>
<div style="margin-top: 10px">
<a-select
v-if="jobType && jobType.length"
:getPopupContainer="
(triggerNode) => triggerNode.parentNode || document.body
"
@@ -207,6 +208,7 @@
</div>
<div style="margin-top: 10px">
<a-select
v-if="bandList && bandList.length"
:getPopupContainer="
(triggerNode) => triggerNode.parentNode || document.body
"