Merge remote-tracking branch 'boe/dev0731' into dev0731

This commit is contained in:
yujicun
2023-08-03 14:35:57 +08:00
24 changed files with 22699 additions and 193 deletions

22375
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -84,7 +84,7 @@ export function useBoeApiPage(_url, params = {}, config = {
// init: true,
// result: res => res.result,
// }) {
//
// const state = reactive({
// data: [],
// loading: false,
@@ -92,7 +92,7 @@ export function useBoeApiPage(_url, params = {}, config = {
// watch(() => params, () => {
// fetch();
// });
//
// function fetch() {
// state.loading = true;
// return boeRequest(_url, params).then(r => {
@@ -100,7 +100,7 @@ export function useBoeApiPage(_url, params = {}, config = {
// state.loading = false;
// });
// }
//
// config.init && fetch();
// return {
// ...toRefs(state),
@@ -109,7 +109,7 @@ export function useBoeApiPage(_url, params = {}, config = {
// }
// export function useBoeUserListPage(_url, params = {}, init = true) {
//
// const state = reactive({
// data: [],
// loading: false,
@@ -118,10 +118,10 @@ export function useBoeApiPage(_url, params = {}, config = {
// page: 1,
// ...params
// });
//
// watch(() => params.keyword, throttle(fetch, 600));
// watch(() => params.page, fetch);
//
// function fetch() {
// state.loading = true;
// if (!params.keyword) {
@@ -135,7 +135,7 @@ export function useBoeApiPage(_url, params = {}, config = {
// state.loading = false;
// });
// }
//
// init && fetch();
// return {
// ...toRefs(state),

View File

@@ -74,8 +74,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" v-model:selectedRows="stuSelectRows"
<BaseTable ref="stuTableRef" :columns="stuColumns" :url="USER_LIST_PAGE" pageKey="pageNo"
:request="useNewRowsPageNoInit" v-model:params="nameSearch" v-model:selectedRows="stuSelectRows"
type="checkbox"></BaseTable>
</div>
</div>
@@ -128,8 +128,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" v-model:selectedRows="auditSelectRows"
<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>
</div>
@@ -311,16 +311,10 @@
<script setup>
import { message } from "ant-design-vue";
import { computed, defineEmits, defineProps, ref, watch, onMounted, reactive, nextTick } 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, useBoeApiAuditPage,request,useRequest } from "@/api/request";
import dialog from "@/utils/dialog";
import {AUDIENCE_LIST, ORG_CHILD_LIST, ORG_LIST, STUDENT_LIST, USER_LIST_PAGE} from "@/api/apis";
import BaseTable from "@/components/common/BaseTable";
import { STUDENT_LIST } from "@/api/apis";
// 推荐接口
import { caseRecommend, userList } from '@/api/case'
@@ -412,7 +406,7 @@ const stageId = ref();
const nameSearch = ref({
keyword: "",
departId: null,
departId: '',
});
const stuTreeSelectKeys = ref([]);
const stuTreeExpandedKeys = ref([]);
@@ -421,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 } = useBoeApiPage(
const { data: orgData, fetchData: searchOrg } = useRequest(
ORG_LIST,
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 })),
}
// {
// 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 })),
}
// {
// init: true,
// result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
// }
);
const projectStuColumns = ref([
@@ -601,18 +595,19 @@ 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.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];
}
);
@@ -659,7 +654,7 @@ function orgDel(i) {
const listData = reactive({
departId: '',
keyword: "",
page: 1,
pageNo: 1,
pageSize: 10,
})
@@ -688,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);
@@ -699,7 +694,7 @@ const httpList = (addOrMinus) => {
const resetStu = () => {
nameSearch.value.keyword = "";
stuTableRef.value.reset({ keyword: "", departId: null });
stuTableRef.value.reset({ keyword: "", departId: '' });
};
//清空选择部门信息
const deleteDepSelect = () => {
@@ -815,7 +810,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;
@@ -829,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: "" });
}

View File

@@ -0,0 +1,136 @@
<template>
<a-table :customRow="customRow" class="ant-table-striped"
:row-class-name="(_, index) => (index % 2 === 1 ? 'table-striped' : null)" row-key="id" :columns="columns"
:data-source="data" :loading="loading" :pagination="pagination" :row-selection="rowSelection">
<template #operation="{ record }">
<slot :record="record"></slot>
</template>
</a-table>
</template>
<script setup>
import { defineProps, defineExpose, ref, computed, onMounted, defineEmits, nextTick } from "vue";
import { useRowsPageNoInit } from "@/api/request";
import { useResetRef } from "@/utils/useCommon";
const props = defineProps({
type: {
type: String,
default: ""
},
columns: {
type: Array,
default: () => []
},
url: {
type: String,
default: ""
},
pageKey: {
type: String,
default: "pageNo"
},
params: {
type: Object,
default: () => ({})
},
init: {
type: Boolean,
default: true
},
request: {
type: Function,
default: useRowsPageNoInit
}
});
const emit = defineEmits(["update:params", "update:selectedRowKeys", "update:selectedRows"]);
const rowSelectKeys = ref([]);
const selectsData = ref([]);
const params = useResetRef({ [props.pageKey]: 1, pageSize: 10 });
const postParam = computed(() => ({ ...params.value, ...props.params }));
const { data, loading, total, fetch: onFetch } = props.request(props.url, postParam);
const rowSelection = computed(() => (props.type ? {
type: props.type,
columnWidth: 20,
selectedRowKeys: rowSelectKeys.value,
onChange: onSelectChange,
preserveSelectedRowKeys: true,
} : null));
const customRow = (record) => ({
onClick: () => {
if (props.type === "checkbox") {
if (rowSelectKeys.value.some(t => t === record.id)) {
rowSelectKeys.value = rowSelectKeys.value.filter(t => t !== record.id);
selectsData.value = selectsData.value.filter(t => t.id !== record.id);
} else {
rowSelectKeys.value.push(record.id);
selectsData.value.push(record);
}
} else {
rowSelectKeys.value = [record.id];
selectsData.value = [record];
}
emit("update:selectedRowKeys", [...rowSelectKeys.value]);
emit("update:selectedRows", [...selectsData.value]);
}
});
onMounted(() => props.init && nextTick(onFetch));
function onSelectChange(e, l) {
rowSelectKeys.value = e;
selectsData.value = l;
emit("update:selectedRowKeys", e);
emit("update:selectedRows", l);
}
const pagination = computed(() => ({
total: total.value,
showSizeChanger: false,
current: params.value[props.pageKey],
pageSize: params.value.pageSize,
onChange: changePagination,
}));
const changePagination = (e) => {
params.value[props.pageKey] = e;
nextTick(onFetch);
};
function reset(v) {
params.reset();
v && emit("update:params", { ...v });
nextTick(onFetch);
}
function resetSelected() {
rowSelectKeys.value = [];
selectsData.value = [];
emit("update:selectedRowKeys", []);
emit("update:selectedRows", []);
}
function clear(v) {
rowSelectKeys.value = [];
selectsData.value = [];
params.reset();
v && emit("update:params", { ...v });
emit("update:selectedRowKeys", []);
emit("update:selectedRows", []);
}
const toLoading = () => loading.value = true;
function remove(i) {
rowSelectKeys.value.splice(i, 1);
selectsData.value.splice(i, 1);
emit("update:selectedRowKeys", rowSelectKeys.value);
emit("update:selectedRows", selectsData.value);
}
const fetch = () => nextTick(onFetch);
defineExpose({ fetch, reset, resetSelected, clear, toLoading, remove });
</script>

View File

@@ -282,7 +282,7 @@
<!-- 二维码弹窗 -->
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import SignQR from "./SignQR.vue";
import TwoDimensionalCode from "../../components/TwoDimensionalCode";

View File

@@ -114,7 +114,7 @@
</a-drawer>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
// import * as api from "../../../api/index";

View File

@@ -120,7 +120,7 @@
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource1"/>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import EScore from "../ExportScore.vue";

View File

@@ -126,7 +126,7 @@
</a-drawer>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import ExportAchievement from "../ExportAchievement.vue";

View File

@@ -133,7 +133,7 @@
:downloadUrl="downloadUrl"
/>
</template>
<script setup>
<script setup lang="jsx">
import {computed, defineEmits, ref, watch} from "vue";
import * as api from "@/api/index1";
import BaseTable from "@/components/common/BaseTable";

View File

@@ -158,7 +158,7 @@
/>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import CKWork from "../CheckWork.vue";

View File

@@ -132,7 +132,7 @@
:basicdata="datasource.info" />
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
// import * as api from "../../../api/index";

View File

@@ -119,7 +119,7 @@
/>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
// import * as api from "../../../api/index";

View File

@@ -132,7 +132,7 @@
:basicdata="datasource.info" />
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
import ViewAssess from "../ViewAssess";

View File

@@ -112,7 +112,7 @@
</a-drawer>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
// import * as api from "../../../api/index";

View File

@@ -125,7 +125,7 @@
</a-drawer>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import ExportAchievement from "../ExportAchievement.vue";

View File

@@ -82,7 +82,7 @@
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource1" />
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import EScore from "../ExportScore.vue";

View File

@@ -150,7 +150,7 @@
</a-drawer>
</template>
<script setup>
<script setup lang="jsx">
import {computed, defineEmits, ref, watch} from "vue";
import * as api from "@/api/index1";
import BaseTable from "@/components/common/BaseTable";

View File

@@ -101,7 +101,7 @@
<ExportHomeWork v-model:exportHomeWorkV="exportHomeWorkV" :downloadUrl="downloadUrl" />
</template>
<script>
<script lang="jsx">
import { toRefs, reactive } from "vue";
import { message } from "ant-design-vue";
import CKWork from "../CheckWork.vue";

View File

@@ -120,7 +120,7 @@
/>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
import SeeStu from "@/components/drawers/SeeStu";

View File

@@ -119,7 +119,7 @@
/>
</template>
<script>
<script lang="jsx">
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
// import * as api from "../../../api/index";

View File

@@ -37,8 +37,8 @@
</template>
<script setup>
import {defineEmits, defineProps, ref, watch, watchEffect} from "vue";
import {request, useRequest} from "@/api/request";
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
import {request, useRequest,useArrayRequest} from "@/api/request";
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/apis";
const props = defineProps({
value: {
@@ -57,7 +57,7 @@ const props = defineProps({
const emit = defineEmits({});
const stuTreeExpandedKeys = ref([]);
const labelValue = ref([]);
const { data: options, loading: orgLoading } = useRequest(
const { data: options, loading: orgLoading } = useArrayRequest(
ORG_LIST,
{ keyword: "" },
);