案例和课程edit treeList

This commit is contained in:
joshen@zcwytd.com
2023-08-02 18:29:20 +08:00
parent 8b6f366c6a
commit 7cb325c38d
3 changed files with 38 additions and 15 deletions

View File

@@ -346,6 +346,7 @@ import apiUser from "@/api/system/user.js";
import apiSearchterm from "@/api/modules/searchterm.js";
import { deepClone } from "../../../utils";
import apiDict from "@/api/modules/dict.js";
import apiType from "@/api/modules/type.js";
import { cutFullName } from "@/utils/tools.js";
import apiPlace from "@/api/phase2/place.js"
export default {
@@ -507,26 +508,28 @@ export default {
isBack = true;
}
console.log(isBack, 'isBack');
Promise.all([apiDict.items("org_domain"), apiCase.majorTypes()]).then(rs => {
if (rs[0].status == 200) {
rs[0].result.forEach(item => {
// Promise.all([apiType.items("org_domain"), apiCase.majorTypes()]).then(rs => {
Promise.all([apiType.treeList(1,90,1), apiCase.majorTypes()]).then(rs => {
if (rs[0].code == 200) {
const {records} = rs[0].data
records.forEach(item => {
item.fielclass = false;
item.type = 'org_domain';
item.list = item.list ? item.list : []
if (Array.isArray(item.list)) {
item.list = item.children ? item.children : []
if (Array.isArray(item.children)) {
item.list.forEach(sub => {
sub.list = sub.list ? sub.list : []
sub.list = sub.children ? sub.children : []
sub.fielclass = false
if (Array.isArray(sub.list)) {
if (Array.isArray(sub.children)) {
sub.list.forEach(three => {
three.list = three.list ? three.list : []
three.list = three.children ? three.children : []
three.fielclass = false
})
}
})
}
})
this.domain = rs[0].result;
this.domain = records;
}
if (rs[1].status == 200) {
rs[1].result.forEach(item => {
@@ -812,6 +815,7 @@ export default {
}
});
},
// 无用
async getdomain() {
let key = "org_domain";
await apiDict.items("org_domain").then(res => {
@@ -1179,6 +1183,9 @@ export default {
let ids = caseList.map((item, index) => {
return item.authorId;
});
//不能为空
if (!ids.length) return
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then(res => {
if (res.status == 200) {