fix bug 用户中心接口调整

This commit is contained in:
yuping
2023-07-08 11:14:37 +08:00
parent 727a377afa
commit be90a8b34e
4 changed files with 94 additions and 70 deletions

View File

@@ -36,7 +36,7 @@
</template>
<script setup>
import { defineEmits, defineProps, ref, watch } from "vue";
import {boeRequest, useRequest} from "@/api/request";
import {request, useArrayRequest, useRequest} from "@/api/request";
import {ORG_CHILD_LIST, ORG_LIST} from "@/api/apis";
const props = defineProps({
@@ -50,7 +50,7 @@ const props = defineProps({
const emit = defineEmits({});
const stuTreeExpandedKeys = ref([]);
const labelValue = ref({ value: props.value, label: props.name });
const { data: options, loading: orgLoading } = useRequest(
const { data: options, loading: orgLoading } = useArrayRequest(
ORG_LIST,
{ keyword: "" },
);
@@ -66,9 +66,9 @@ watch(props, () => {
});
function onLoadData(treeNode) {
return boeRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
return useArrayRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
treeNode.dataRef.treeChildList = r.data;
options.value = [...options.value];
}
);
@@ -83,7 +83,6 @@ function change(
},
}
) {
console.log("label2222", label, namePath, value);
emit("update:name", label);
emit("update:fullName", namePath);
emit("update:value", value);