feat : 新增需求征集组件

This commit is contained in:
2024-05-17 23:24:38 +08:00
parent 7869ff4e6a
commit f5c6680c66
4 changed files with 250 additions and 37 deletions

View File

@@ -80,8 +80,8 @@ import {useProcessStore} from '@/stores/processStore.js';
import {getInfo, agreeTask, rejectTask,downloadFile} from "@/api/project-demand/index.js";
import {getSubCompOpt} from '@/api/user/user.js'
import {ElMessage} from "element-plus";
import {useRouter} from "vue-router";
import {useTagsView} from '@/stores/tagsview.js'
import {matterTree} from '@/utils/matterTree.js';
const tagsViewStore = useTagsView()
const router = useRouter()
@@ -180,24 +180,10 @@ const getCompanyOption = async () => {
companyOption.value = res.data
}
const matterTree = (data, id) => {
if (id) {
for (let i = 0; i < data.length; i++) {
if (data[i].value == id) {
companyNameArray.value.push(data[i].label);
}
if (data[i].children && data[i].children.length > 0) {
matterTree(data[i].children)
}
}
return companyNameArray.value;
}
}
const getDataSourceOptionItem = (val) => {
if (val !== undefined) {
val.forEach(item => {
matterTree(companyOption.value, item)
matterTree(companyNameArray.value,companyOption.value, item)
})
}
return companyNameArray.value.join('');