feat : 新增需求征集组件
This commit is contained in:
@@ -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(',');
|
||||
|
||||
Reference in New Issue
Block a user