Merge remote-tracking branch 'origin/user-modify' into cloud

This commit is contained in:
yujicun
2023-07-28 16:04:05 +08:00
18 changed files with 263 additions and 180 deletions

View File

@@ -174,26 +174,26 @@
<router-link to="/researchmanage">评估管理</router-link>
</a-menu-item>
<a-sub-menu key="sub6">
<template #icon>
<div class="imgBox">
<img
style="width: 22px; height: 22px"
src="../assets/images/navleft/review.png"
/>
</div>
</template>
<template #title>系统管理</template>
<a-menu-item key="sub6-1">
<span
:class="{
circleActive: selectedKeys[0] === 'sub6-1',
circle: selectedKeys[0]!=='sub6-1',
}"
></span>
<router-link to="/dictmanage">字典管理</router-link>
</a-menu-item>
</a-sub-menu>
<!-- <a-sub-menu key="sub6">-->
<!-- <template #icon>-->
<!-- <div class="imgBox">-->
<!-- <img-->
<!-- style="width: 22px; height: 22px"-->
<!-- src="../assets/images/navleft/review.png"-->
<!-- />-->
<!-- </div>-->
<!-- </template>-->
<!-- <template #title>系统管理</template>-->
<!-- <a-menu-item key="sub6-1">-->
<!-- <span-->
<!-- :class="{-->
<!-- circleActive: selectedKeys[0] === 'sub6-1',-->
<!-- circle: selectedKeys[0]!=='sub6-1',-->
<!-- }"-->
<!-- ></span>-->
<!-- <router-link to="/dictmanage">字典管理</router-link>-->
<!-- </a-menu-item>-->
<!-- </a-sub-menu>-->
<a-menu-item key="sub5" v-if="checkMenu('systemManage')">
<div class="imgBox">

View File

@@ -49,6 +49,8 @@ import {computed, reactive} from "vue";
import {studentUrl,teacherUrl} from "@/api/method";
import router from "@/router";
import {useStore, createStore} from "vuex";
import {LOGOUT} from "@/api/apis";
import {request} from "@/api/request";
const store = useStore();
@@ -83,7 +85,8 @@ const changeRole = (value) => {
}
});
};
const logOut = () => {
const logOut = async () => {
await request(LOGOUT)
store.replaceState(createStore({state: {openpages: []}}).state);
localStorage.clear();
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: '/login'}) : (window.location.href = window.location.protocol + process.env.VUE_APP_LOGIN_URL)

View File

@@ -13,7 +13,7 @@
</template>
<script setup>
import {defineProps, defineExpose, ref, computed, onMounted, defineEmits, nextTick} from "vue";
import {useRowsPageNoInit} from "@/api/request";
import {usePage, useRequest, useRowsPageNoInit} from "@/api/request";
import {useResetRef} from "@/utils/useCommon";
const props = defineProps({
@@ -43,7 +43,7 @@ const props = defineProps({
},
request: {
type: Function,
default: useRowsPageNoInit
default: usePage
}
});
const emit = defineEmits(["update:params", "update:selectedRowKeys", "update:selectedRows"]);

View File

@@ -36,8 +36,8 @@
</template>
<script setup>
import { defineEmits, defineProps, ref, watch } from "vue";
import { boeRequest, useBoeApi } from "@/api/request";
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
import {request, useArrayRequest, useRequest} from "@/api/request";
import {ORG_CHILD_LIST, ORG_LIST} from "@/api/apis";
const props = defineProps({
value: String,
@@ -50,13 +50,9 @@ const props = defineProps({
const emit = defineEmits({});
const stuTreeExpandedKeys = ref([]);
const labelValue = ref({ value: props.value, label: props.name });
const { data: options, loading: orgLoading } = useBoeApi(
const { data: options, loading: orgLoading } = useArrayRequest(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
);
watch(props, () => {
@@ -70,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];
}
);
@@ -87,7 +83,6 @@ function change(
},
}
) {
console.log("label2222", label, namePath, value);
emit("update:name", label);
emit("update:fullName", namePath);
emit("update:value", value);

View File

@@ -37,7 +37,7 @@
</template>
<script setup>
import {defineEmits, defineProps, ref, watch, watchEffect} from "vue";
import { boeRequest, useBoeApi } from "@/api/request";
import {request, useRequest} from "@/api/request";
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
const props = defineProps({
@@ -57,13 +57,9 @@ const props = defineProps({
const emit = defineEmits({});
const stuTreeExpandedKeys = ref([]);
const labelValue = ref([]);
const { data: options, loading: orgLoading } = useBoeApi(
const { data: options, loading: orgLoading } = useRequest(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
);
watchEffect(()=>{
@@ -84,9 +80,9 @@ watch(props, () => {
});
function onLoadData(treeNode) {
return boeRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
treeNode.dataRef.treeChildList = r.data;
options.value = [...options.value];
}
);

View File

@@ -28,8 +28,8 @@
</template>
<script setup>
import {computed, defineEmits, defineProps, onMounted, ref, watch} from "vue";
import {useBoeUserListPage} from "@/api/request";
import {USER_LIST} from "@/api/ThirdApi";
import {usePage} from "@/api/request";
import {USER_LIST} from "@/api/apis";
const props = defineProps({
value: {
@@ -58,7 +58,7 @@ const isOpen = ref(false)
const memberParam = ref({keyword: '', page: 1, pageSize: 20})
const {data: userList, loading} = useBoeUserListPage(USER_LIST, memberParam.value, false)
const {data: userList, loading} = usePage(USER_LIST, memberParam.value, false)
const options = computed(() => userList.value.filter(e => !(props.value + '').includes(e.id)).map(e => ({
label: e.realName + e.userNo,

View File

@@ -75,8 +75,8 @@
margin: 0px 4px 120px 10px;
border: 1px solid #f0f0f0;
">
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="page"
:request="useBoeApiUserInfoPage" v-model:params="nameSearch"
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="pageNo"
v-model:params="nameSearch" :request="useNewRowsPageNoInit"
v-model:selectedRows="stuSelectRows" type="checkbox"></BaseTable>
</div>
</div>
@@ -131,8 +131,8 @@
</a-form-item>
</div>
<div class="tableBox tabb">
<BaseTable ref="auditTableRef" :columns="audiColums" :url="AUDIENCE_LIST" page-key="page"
:request="useBoeApiAuditPage" v-model:params="audienceName"
<BaseTable ref="auditTableRef" :columns="audiColums" :url="AUDIENCE_LIST" page-key="pageNo"
v-model:params="audienceName"
v-model:selectedRows="auditSelectRows" v-model:selectedRowKeys="auditSelectRowKeys"
type="checkbox"></BaseTable>
</div>
@@ -296,19 +296,13 @@
<script setup>
import {message} from "ant-design-vue";
import {computed, defineEmits, defineProps, ref, watch} from "vue";
import {boeRequest, useBoeApi, useBoeApiPage, useBoeApiUserInfoPage, useBoeApiAuditPage} from "@/api/request";
import {
ORG_CHILD_LIST,
ORG_LIST,
USER_LIST_PAGE,
AUDIENCE_LIST,
} from "@/api/ThirdApi";
import { useNewRowsPageNoInit, request, useRequest} from "@/api/request";
import {
saveStu,
} from "@/api/index1";
import dialog from "@/utils/dialog";
import BaseTable from "@/components/common/BaseTable";
import {STUDENT_LIST} from "@/api/apis";
import {AUDIENCE_LIST, ORG_CHILD_LIST, ORG_LIST, STUDENT_LIST, USER_LIST_PAGE} from "@/api/apis";
const emit = defineEmits({});
const props = defineProps({
@@ -392,7 +386,7 @@ const stageId = ref();
const nameSearch = ref({
keyword: "",
departId: null,
departId: '',
});
const stuTreeSelectKeys = ref([]);
const stuTreeExpandedKeys = ref([]);
@@ -401,30 +395,22 @@ const audienceName = ref({
});
const searchOrgName = ref({
keyword: "",
page: 1,
pageNo: 1,
pageSize: 10,
});
const stageIds = computed(() => props.stage);
const { data: orgData, fetch: searchOrg } = useBoeApiPage(
const { data: orgData, fetchData: searchOrg } = useRequest(
ORG_LIST,
searchOrgName.value
searchOrgName.value,
);
const { data: treeData, loading: orgLoading } = useBoeApi(
const { data: treeData, loading: orgLoading } = useRequest(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
);
const { data: treeOrgData, loading: orgOrgLoading } = useBoeApi(
const { data: treeOrgData, loading: orgOrgLoading } = useRequest(
ORG_LIST,
{ keyword: "" },
{
init: true,
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
}
);
const projectStuColumns = ref([
@@ -553,18 +539,18 @@ function searchAudi() {
}
function onLoadData(treeNode) {
return boeRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
(r) => {
treeNode.dataRef.treeChildList = r.result.directChildList;
treeNode.dataRef.treeChildList = r.data;
treeData.value = [...treeData.value];
}
);
}
function onLoadOrgData(treeNode) {
return boeRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
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];
}
);
@@ -605,7 +591,7 @@ function onOrgSelectChange(e, l) {
const resetStu = () => {
nameSearch.value.keyword = "";
stuTableRef.value.reset({ keyword: "", departId: null });
stuTableRef.value.reset({ keyword: "", departId: '' });
};
//清空选择部门信息
const deleteDepSelect = () => {
@@ -675,7 +661,7 @@ watch(visiable, () => {
orgSelectKeys.value = [];
deptList.value = [];
audienceName.value.keyword = "";
nameSearch.value.departId = null;
nameSearch.value.departId = '';
stuTreeExpandedKeys.value = [];
stuTreeSelectKeys.value = [];
activeKey.value = props.isGroup ? 4 : 1;
@@ -689,7 +675,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: "" });
}