案例推荐

This commit is contained in:
joshen@zcwytd.com
2023-08-02 14:01:33 +08:00
parent 34f42c5f01
commit 19bf2f951b

View File

@@ -406,7 +406,7 @@ const stageId = ref();
const nameSearch = ref({
keyword: "",
departId: null,
departId: '',
});
const stuTreeSelectKeys = ref([]);
const stuTreeExpandedKeys = ref([]);
@@ -415,30 +415,30 @@ const audienceName = ref({
});
const searchOrgName = ref({
keyword: "",
page: 1,
pageNo: 1,
pageSize: 10,
});
const stageIds = computed(() => props.stage);
const { data: orgData, fetch: searchOrg } = useRequest(
const { data: orgData, fetchData: searchOrg } = useRequest(
ORG_LIST,
searchOrgName.value
);
const { data: treeData, loading: orgLoading } = useRequest(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
// {
// init: true,
// result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
// }
);
const { data: treeOrgData, loading: orgOrgLoading } = useRequest(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
// {
// init: true,
// result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
// }
);
const projectStuColumns = ref([
@@ -597,7 +597,8 @@ function searchAudi() {
function onLoadData(treeNode) {
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
// treeNode.dataRef.treeChildList = r.result.directChildList;
treeNode.dataRef.treeChildList = r.data;
treeData.value = [...treeData.value];
}
);
@@ -606,7 +607,7 @@ function onLoadData(treeNode) {
function onLoadOrgData(treeNode) {
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
treeNode.dataRef.treeChildList = r.data;
treeOrgData.value = [...treeOrgData.value];
}
);
@@ -653,7 +654,7 @@ function orgDel(i) {
const listData = reactive({
departId: '',
keyword: "",
page: 1,
pageNo: 1,
pageSize: 10,
})
@@ -682,9 +683,9 @@ const httpList = (addOrMinus) => {
userList(listData).then((res) => {
if (res.status == 200) {
if (!addOrMinus) {
counts.value -= res.data.result.totalElement
counts.value -= res.data.result.total
} else {
counts.value += res.data.result.totalElement
counts.value += res.data.result.total
}
}
console.log(counts.value);
@@ -693,7 +694,7 @@ const httpList = (addOrMinus) => {
const resetStu = () => {
nameSearch.value.keyword = "";
stuTableRef.value.reset({ keyword: "", departId: null });
stuTableRef.value.reset({ keyword: "", departId: '' });
};
//清空选择部门信息
const deleteDepSelect = () => {
@@ -823,7 +824,7 @@ watch(visiable, () => {
auditTableRef.value && auditTableRef.value.clear();
auditTableRef.value && auditTableRef.value.reset({ keyword: "" });
stuTableRef.value && stuTableRef.value.clear();
stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: null });
stuTableRef.value && stuTableRef.value.reset({ keyword: "", departId: '' });
projectStuTableRef.value && projectStuTableRef.value.clear();
projectStuTableRef.value && projectStuTableRef.value.reset({ pid: props.infoId, type: props.infoType, studentName: "" });
}