mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
Merge remote-tracking branch 'yx/250429-report-wjh'
This commit is contained in:
@@ -35,27 +35,27 @@
|
|||||||
placeholder="请选择状态" allowClear :options="statusList">
|
placeholder="请选择状态" allowClear :options="statusList">
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="select" v-if="[3].includes(currentTab) ">-->
|
<div class="select" v-if="[3].includes(currentTab) ">
|
||||||
<!-- <a-tree-select-->
|
<a-tree-select
|
||||||
<!-- :getPopupContainer="-->
|
:getPopupContainer="
|
||||||
<!-- (triggerNode) => triggerNode.parentNode || document.body-->
|
(triggerNode) => triggerNode.parentNode || document.body
|
||||||
<!-- "-->
|
"
|
||||||
<!-- v-model:value="categoryTypeId"-->
|
v-model:value="categoryTypeId"
|
||||||
<!-- show-search-->
|
show-search
|
||||||
<!-- style="width: 100%"-->
|
style="width: 100%"
|
||||||
<!-- :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"-->
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||||
<!-- placeholder="请选择内容分类"-->
|
placeholder="请选择内容分类"
|
||||||
<!-- allow-clear-->
|
allow-clear
|
||||||
<!-- tree-default-expand-all-->
|
tree-default-expand-all
|
||||||
<!-- :fieldNames="{-->
|
:fieldNames="{
|
||||||
<!-- children: 'children',-->
|
children: 'children',
|
||||||
<!-- label: 'name',-->
|
label: 'name',
|
||||||
<!-- value: 'code',-->
|
value: 'code',
|
||||||
<!-- }"-->
|
}"
|
||||||
<!-- :tree-data="sysTypeOptions"-->
|
:tree-data="sysTypeOptions"
|
||||||
<!-- >-->
|
>
|
||||||
<!-- </a-tree-select>-->
|
</a-tree-select>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<div class="select" v-if="currentTab !== 6">
|
<div class="select" v-if="currentTab !== 6">
|
||||||
<a-input
|
<a-input
|
||||||
style="width: 100%; height: 40px; border-radius: 3px"
|
style="width: 100%; height: 40px; border-radius: 3px"
|
||||||
@@ -166,23 +166,26 @@
|
|||||||
:scroll="{ x: 700 }"
|
:scroll="{ x: 700 }"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
@resizeColumn="handleResizeColumn"
|
@resizeColumn="handleResizeColumn"
|
||||||
|
@change="handleTableChange"
|
||||||
:row-selection="{
|
:row-selection="{
|
||||||
selectedRowKeys: selectedRowKeys,
|
selectedRowKeys: selectedRowKeys,
|
||||||
onChange: onSelectChange,
|
onChange: onSelectChange,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template v-slot:header>
|
<!-- <template v-slot:header>-->
|
||||||
<draggable
|
<!-- <draggable-->
|
||||||
v-model="columns"
|
<!-- v-model="columns"-->
|
||||||
item-key="key"
|
<!-- item-key="key"-->
|
||||||
:list="columns"
|
<!-- :list="columns"-->
|
||||||
:group="{ name: 'columns', pull: 'clone', put: false }"
|
<!-- :group="{ name: 'columns', pull: 'clone', put: false }"-->
|
||||||
>
|
<!-- >-->
|
||||||
<template #item="{ element }">
|
<!-- <template #item="{ element }">-->
|
||||||
<a-table-column :title="element.title" :dataIndex="element.dataIndex" :key="element.key"></a-table-column>
|
<!-- <a-table-column :title="element.title" :dataIndex="element.dataIndex" :key="element.key"></a-table-column>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</draggable>
|
<!-- </draggable>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
|
|
||||||
|
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
<div class="pa">
|
<div class="pa">
|
||||||
@@ -212,7 +215,8 @@ import dayjs from "dayjs";
|
|||||||
import {message} from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
import Cookies from "vue-cookies";
|
import Cookies from "vue-cookies";
|
||||||
import {useStore} from "vuex";
|
import {useStore} from "vuex";
|
||||||
import orgjson from './org.json';
|
// import orgjson from './org.json';
|
||||||
|
// import fl from './fl.json';
|
||||||
import PostSelectNew from "@/components/growthpath/PostSelect.vue";
|
import PostSelectNew from "@/components/growthpath/PostSelect.vue";
|
||||||
import OfficeSelect from "@/components/growthpath/OfficeSelect.vue";
|
import OfficeSelect from "@/components/growthpath/OfficeSelect.vue";
|
||||||
import draggable from 'vuedraggable';
|
import draggable from 'vuedraggable';
|
||||||
@@ -224,6 +228,8 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const sysTypeOptions = computed(() => store.state.content_type);
|
const sysTypeOptions = computed(() => store.state.content_type);
|
||||||
|
// const sysTypeOptions = fl;
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
tableLoading: false, // table加载图标
|
tableLoading: false, // table加载图标
|
||||||
tableDataTotal: 0, // 数据总条数
|
tableDataTotal: 0, // 数据总条数
|
||||||
@@ -249,6 +255,7 @@ export default {
|
|||||||
statusList: [],
|
statusList: [],
|
||||||
content_type: null,
|
content_type: null,
|
||||||
categoryTypeId: null,
|
categoryTypeId: null,
|
||||||
|
tableSorts: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDragEnd = (event) => {
|
const onDragEnd = (event) => {
|
||||||
@@ -404,8 +411,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// const res = await api.userGetUserOrg({});
|
const res = await api.userGetUserOrg({});
|
||||||
const res = orgjson;
|
// const res = orgjson;
|
||||||
if (res != null && res.data != null && res.data.result != null && res.data.result.orgTreeList != null) {
|
if (res != null && res.data != null && res.data.result != null && res.data.result.orgTreeList != null) {
|
||||||
orgArray = flattenOrgTree(res.data.result.orgTreeList);
|
orgArray = flattenOrgTree(res.data.result.orgTreeList);
|
||||||
}
|
}
|
||||||
@@ -442,6 +449,7 @@ export default {
|
|||||||
getTabData();
|
getTabData();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function fetchExportReport(data) {
|
function fetchExportReport(data) {
|
||||||
//根据逗号分隔开的id
|
//根据逗号分隔开的id
|
||||||
axios({
|
axios({
|
||||||
@@ -456,6 +464,7 @@ export default {
|
|||||||
downLoad(res.data, tabIndexMap[state.currentTab] + ".xlsx");
|
downLoad(res.data, tabIndexMap[state.currentTab] + ".xlsx");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出按钮
|
// 导出按钮
|
||||||
const exportClick = async () => {
|
const exportClick = async () => {
|
||||||
if (!state.selectedRowKeys?.length) {
|
if (!state.selectedRowKeys?.length) {
|
||||||
@@ -488,9 +497,9 @@ export default {
|
|||||||
page: state.pageNo,
|
page: state.pageNo,
|
||||||
size: state.pageSize,
|
size: state.pageSize,
|
||||||
orgPath: state.orgPath,
|
orgPath: state.orgPath,
|
||||||
|
tableSorts: state.tableSorts,
|
||||||
});
|
});
|
||||||
}
|
} else if (state.currentTab === 5) {
|
||||||
else if (state.currentTab === 5) {
|
|
||||||
//案例列表
|
//案例列表
|
||||||
res = await api.casePageList({
|
res = await api.casePageList({
|
||||||
createName: state.creator,
|
createName: state.creator,
|
||||||
@@ -501,9 +510,9 @@ export default {
|
|||||||
page: state.pageNo,
|
page: state.pageNo,
|
||||||
size: state.pageSize,
|
size: state.pageSize,
|
||||||
orgPath: state.orgPath,
|
orgPath: state.orgPath,
|
||||||
|
tableSorts: state.tableSorts
|
||||||
});
|
});
|
||||||
}
|
} else if (state.currentTab === 6) {
|
||||||
else if (state.currentTab === 6) {
|
|
||||||
//专业力
|
//专业力
|
||||||
res = await api.professionalPageList({
|
res = await api.professionalPageList({
|
||||||
startCreateTime: state.publishTime && state.publishTime[0] ? state.publishTime[0] + " 00:00:00" : null,
|
startCreateTime: state.publishTime && state.publishTime[0] ? state.publishTime[0] + " 00:00:00" : null,
|
||||||
@@ -514,9 +523,9 @@ export default {
|
|||||||
orgPath: state.orgPath,
|
orgPath: state.orgPath,
|
||||||
stdPosition: state.stdPosition,
|
stdPosition: state.stdPosition,
|
||||||
qualsLevelCode: state.qualsLevelCode,
|
qualsLevelCode: state.qualsLevelCode,
|
||||||
|
tableSorts: state.tableSorts
|
||||||
});
|
});
|
||||||
}
|
} else if (state.currentTab === 3) {
|
||||||
else if (state.currentTab === 3) {
|
|
||||||
res = await api.coursePageList({
|
res = await api.coursePageList({
|
||||||
page: state.pageNo,
|
page: state.pageNo,
|
||||||
size: state.pageSize,
|
size: state.pageSize,
|
||||||
@@ -528,7 +537,8 @@ export default {
|
|||||||
startCreateTime: state.publishTime && state.publishTime[0] ? state.publishTime[0] + " 00:00:00" : null,
|
startCreateTime: state.publishTime && state.publishTime[0] ? state.publishTime[0] + " 00:00:00" : null,
|
||||||
endCreateTime: state.publishTime && state.publishTime[1] ? state.publishTime[1] + " 23:59:59" : null,
|
endCreateTime: state.publishTime && state.publishTime[1] ? state.publishTime[1] + " 23:59:59" : null,
|
||||||
orgPath: state.orgPath,
|
orgPath: state.orgPath,
|
||||||
category: findPathByValue(state.categoryTypeId)
|
category: findPathByValue(sysTypeOptions, state.categoryTypeId),
|
||||||
|
tableSorts: state.tableSorts
|
||||||
});
|
});
|
||||||
} else if (state.currentTab === 2) {
|
} else if (state.currentTab === 2) {
|
||||||
res = await api.facePageList({
|
res = await api.facePageList({
|
||||||
@@ -541,6 +551,7 @@ export default {
|
|||||||
startTime: state.publishTime && state.publishTime[0] ? state.publishTime[0] + " 00:00:00" : null,
|
startTime: state.publishTime && state.publishTime[0] ? state.publishTime[0] + " 00:00:00" : null,
|
||||||
endTime: state.publishTime && state.publishTime[1] ? state.publishTime[1] + " 23:59:59" : null,
|
endTime: state.publishTime && state.publishTime[1] ? state.publishTime[1] + " 23:59:59" : null,
|
||||||
orgPath: state.orgPath,
|
orgPath: state.orgPath,
|
||||||
|
tableSorts: state.tableSorts
|
||||||
});
|
});
|
||||||
} else if (state.currentTab === 1) {
|
} else if (state.currentTab === 1) {
|
||||||
res = await api.routerPageList({
|
res = await api.routerPageList({
|
||||||
@@ -552,7 +563,8 @@ export default {
|
|||||||
startCreateTime: state.publishTime && state.publishTime[0] ? state.publishTime[0] + " 00:00:00" : null,
|
startCreateTime: state.publishTime && state.publishTime[0] ? state.publishTime[0] + " 00:00:00" : null,
|
||||||
endCreateTime: state.publishTime && state.publishTime[1] ? state.publishTime[1] + " 23:59:59" : null,
|
endCreateTime: state.publishTime && state.publishTime[1] ? state.publishTime[1] + " 23:59:59" : null,
|
||||||
orgPath: state.orgPath,
|
orgPath: state.orgPath,
|
||||||
status: state.status
|
status: state.status,
|
||||||
|
tableSorts: state.tableSorts
|
||||||
});
|
});
|
||||||
} else if (state.currentTab === 0) {
|
} else if (state.currentTab === 0) {
|
||||||
res = await api.projectPageList({
|
res = await api.projectPageList({
|
||||||
@@ -566,7 +578,7 @@ export default {
|
|||||||
endCreateTime: state.publishTime && state.publishTime[1] ? state.publishTime[1] + " 23:59:59" : null,
|
endCreateTime: state.publishTime && state.publishTime[1] ? state.publishTime[1] + " 23:59:59" : null,
|
||||||
orgPath: state.orgPath,
|
orgPath: state.orgPath,
|
||||||
status: state.status && (state.status == 1 ? "进行中" : "已结束"),
|
status: state.status && (state.status == 1 ? "进行中" : "已结束"),
|
||||||
|
tableSorts: state.tableSorts
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
afterApiPage(res);
|
afterApiPage(res);
|
||||||
@@ -607,6 +619,7 @@ export default {
|
|||||||
1: "测试",
|
1: "测试",
|
||||||
2: "练习"
|
2: "练习"
|
||||||
};
|
};
|
||||||
|
|
||||||
const tabClick = (index) => {
|
const tabClick = (index) => {
|
||||||
state.selectedRowKeys = [];
|
state.selectedRowKeys = [];
|
||||||
state.currentTab = index;
|
state.currentTab = index;
|
||||||
@@ -624,6 +637,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "left",
|
align: "left",
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "归属组织",
|
title: "归属组织",
|
||||||
@@ -657,6 +671,7 @@ export default {
|
|||||||
key: "createDate",
|
key: "createDate",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "发布时间",
|
title: "发布时间",
|
||||||
@@ -665,6 +680,7 @@ export default {
|
|||||||
key: "publishTime",
|
key: "publishTime",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
@@ -817,6 +833,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "left",
|
align: "left",
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "归属组织",
|
title: "归属组织",
|
||||||
@@ -874,6 +891,9 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "参加人数",
|
title: "参加人数",
|
||||||
@@ -881,6 +901,9 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "参考率",
|
title: "参考率",
|
||||||
@@ -899,6 +922,9 @@ export default {
|
|||||||
key: "passNum",
|
key: "passNum",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "及格率",
|
title: "及格率",
|
||||||
@@ -907,6 +933,7 @@ export default {
|
|||||||
key: "passRate",
|
key: "passRate",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
sorter: true,
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return formatTextRate(text.value);
|
return formatTextRate(text.value);
|
||||||
},
|
},
|
||||||
@@ -919,7 +946,7 @@ export default {
|
|||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return formatTextRate(text.value);
|
return formatValNull(text.value);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -929,6 +956,9 @@ export default {
|
|||||||
key: "medianScore",
|
key: "medianScore",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "平均答题时长(分钟)",
|
title: "平均答题时长(分钟)",
|
||||||
@@ -937,6 +967,9 @@ export default {
|
|||||||
key: "avgTestDuration",
|
key: "avgTestDuration",
|
||||||
width: 160,
|
width: 160,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "发布时间",
|
title: "发布时间",
|
||||||
@@ -957,6 +990,7 @@ export default {
|
|||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
sorter: true,
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return formatDate(text.value);
|
return formatDate(text.value);
|
||||||
},
|
},
|
||||||
@@ -969,8 +1003,7 @@ export default {
|
|||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
} else if (index === 6) {
|
||||||
else if (index === 6) {
|
|
||||||
columns.value = [
|
columns.value = [
|
||||||
{
|
{
|
||||||
title: "岗位名称",
|
title: "岗位名称",
|
||||||
@@ -980,6 +1013,7 @@ export default {
|
|||||||
key: "stdPositionName",
|
key: "stdPositionName",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "left",
|
align: "left",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "任职资格等级",
|
title: "任职资格等级",
|
||||||
@@ -987,6 +1021,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "band",
|
title: "band",
|
||||||
@@ -1001,6 +1036,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "必修任务数",
|
title: "必修任务数",
|
||||||
@@ -1022,6 +1058,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "完成人数",
|
title: "完成人数",
|
||||||
@@ -1077,6 +1114,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
sorter: true,
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return formatDate(text.value);
|
return formatDate(text.value);
|
||||||
},
|
},
|
||||||
@@ -1093,8 +1131,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
} else if (index === 5) {
|
||||||
else if (index === 5) {
|
|
||||||
columns.value = [
|
columns.value = [
|
||||||
{
|
{
|
||||||
title: "案例名称",
|
title: "案例名称",
|
||||||
@@ -1102,8 +1139,9 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
key: "caseName",
|
key: "caseName",
|
||||||
width: 120,
|
width: 150,
|
||||||
align: "left",
|
align: "left",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "归属组织",
|
title: "归属组织",
|
||||||
@@ -1111,7 +1149,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
width: 120,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "专业分类",
|
title: "专业分类",
|
||||||
@@ -1134,6 +1172,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
sorter: true,
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return formatDate(text.value);
|
return formatDate(text.value);
|
||||||
},
|
},
|
||||||
@@ -1152,6 +1191,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "收藏数",
|
title: "收藏数",
|
||||||
@@ -1159,6 +1199,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "点赞数",
|
title: "点赞数",
|
||||||
@@ -1166,6 +1207,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -1174,6 +1216,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "是否推荐",
|
title: "是否推荐",
|
||||||
@@ -1220,6 +1263,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "left",
|
align: "left",
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "归属组织",
|
title: "归属组织",
|
||||||
@@ -1237,7 +1281,7 @@ export default {
|
|||||||
key: "category",
|
key: "category",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
fixed: "left",
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "授课老师",
|
title: "授课老师",
|
||||||
@@ -1246,7 +1290,6 @@ export default {
|
|||||||
key: "teacher",
|
key: "teacher",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
fixed: "left",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "关键字",
|
title: "关键字",
|
||||||
@@ -1255,6 +1298,9 @@ export default {
|
|||||||
key: "keywords",
|
key: "keywords",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "课件数量",
|
title: "课件数量",
|
||||||
@@ -1349,6 +1395,7 @@ export default {
|
|||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
sorter: true,
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return formatDate(text.value)
|
return formatDate(text.value)
|
||||||
},
|
},
|
||||||
@@ -1360,18 +1407,20 @@ export default {
|
|||||||
key: "createName",
|
key: "createName",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
} else if (index === 2) {
|
} else if (index === 2) {
|
||||||
columns.value = [
|
columns.value = [
|
||||||
{
|
{
|
||||||
title: "课程名称",
|
title: "课程名称",
|
||||||
dataIndex: "offCourseName",
|
dataIndex: "offCoursePlanName",
|
||||||
key: "offCourseName",
|
key: "offCoursePlanName",
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "left",
|
align: "left",
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "归属组织",
|
title: "归属组织",
|
||||||
@@ -1382,6 +1431,14 @@ export default {
|
|||||||
align: "center",
|
align: "center",
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "所属课程",
|
||||||
|
dataIndex: "offCourseName",
|
||||||
|
ellipsis: true,
|
||||||
|
key: "offCourseName",
|
||||||
|
width: 120,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "开课开始时间",
|
title: "开课开始时间",
|
||||||
dataIndex: "startTime",
|
dataIndex: "startTime",
|
||||||
@@ -1419,6 +1476,9 @@ export default {
|
|||||||
key: "address",
|
key: "address",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "授课讲师",
|
title: "授课讲师",
|
||||||
@@ -1427,9 +1487,10 @@ export default {
|
|||||||
key: "teacher",
|
key: "teacher",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "是否作业",
|
title: "是否作业",
|
||||||
dataIndex: "hasWorkInfo",
|
dataIndex: "hasWorkInfo",
|
||||||
@@ -1437,6 +1498,9 @@ export default {
|
|||||||
key: "hasWorkInfo",
|
key: "hasWorkInfo",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return text.value == 1 ? "是" : "否";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "是否考试",
|
title: "是否考试",
|
||||||
@@ -1445,6 +1509,9 @@ export default {
|
|||||||
key: "hasTest",
|
key: "hasTest",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return text.value == 1 ? "是" : "否";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "参加人数",
|
title: "参加人数",
|
||||||
@@ -1453,6 +1520,7 @@ export default {
|
|||||||
key: "studentNum",
|
key: "studentNum",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "参评人数",
|
title: "参评人数",
|
||||||
@@ -1461,6 +1529,9 @@ export default {
|
|||||||
key: "assessmentNum",
|
key: "assessmentNum",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "平均评分",
|
title: "平均评分",
|
||||||
@@ -1469,6 +1540,9 @@ export default {
|
|||||||
key: "assessmentScore",
|
key: "assessmentScore",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "作业完成人数",
|
title: "作业完成人数",
|
||||||
@@ -1477,6 +1551,9 @@ export default {
|
|||||||
key: "workCompNum",
|
key: "workCompNum",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "作业平均分",
|
title: "作业平均分",
|
||||||
@@ -1485,6 +1562,9 @@ export default {
|
|||||||
key: "workAvgScore",
|
key: "workAvgScore",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "考试完成人数",
|
title: "考试完成人数",
|
||||||
@@ -1493,6 +1573,9 @@ export default {
|
|||||||
key: "testCompNum",
|
key: "testCompNum",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "考试平均分",
|
title: "考试平均分",
|
||||||
@@ -1501,6 +1584,9 @@ export default {
|
|||||||
key: "testAvgScore",
|
key: "testAvgScore",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatValNull(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -1518,6 +1604,10 @@ export default {
|
|||||||
key: "reportCreateTime",
|
key: "reportCreateTime",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
sorter: true,
|
||||||
|
customRender: (text) => {
|
||||||
|
return formatDate(text.value)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
@@ -1530,6 +1620,7 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "left",
|
align: "left",
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "归属组织",
|
title: "归属组织",
|
||||||
@@ -1566,6 +1657,7 @@ export default {
|
|||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
sorter: true,
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return text.value ? formatDate(text.value) : "";
|
return text.value ? formatDate(text.value) : "";
|
||||||
},
|
},
|
||||||
@@ -1612,6 +1704,9 @@ export default {
|
|||||||
key: "studentLearnRate",
|
key: "studentLearnRate",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender(text) {
|
||||||
|
return formatTextRate(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "完成人数",
|
title: "完成人数",
|
||||||
@@ -1628,6 +1723,9 @@ export default {
|
|||||||
key: "studentCompleteRate",
|
key: "studentCompleteRate",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender(text) {
|
||||||
|
return formatTextRate(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "总任务数",
|
title: "总任务数",
|
||||||
@@ -1644,6 +1742,9 @@ export default {
|
|||||||
key: "taskRate",
|
key: "taskRate",
|
||||||
width: 120,
|
width: 120,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
customRender(text) {
|
||||||
|
return formatTextRate(text.value);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "在线课程数",
|
title: "在线课程数",
|
||||||
@@ -1688,6 +1789,7 @@ export default {
|
|||||||
dataIndex: "examNum",
|
dataIndex: "examNum",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "examNum",
|
key: "examNum",
|
||||||
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1695,6 +1797,7 @@ export default {
|
|||||||
dataIndex: "examPassRate",
|
dataIndex: "examPassRate",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "examPassRate",
|
key: "examPassRate",
|
||||||
|
align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
customRender: (text) => {
|
customRender: (text) => {
|
||||||
return formatTextRate(text.value);
|
return formatTextRate(text.value);
|
||||||
@@ -1706,7 +1809,7 @@ export default {
|
|||||||
if ([0, 1].includes(index)) {
|
if ([0, 1].includes(index)) {
|
||||||
state.statusList = statusArr[index];
|
state.statusList = statusArr[index];
|
||||||
}
|
}
|
||||||
|
state.tableSorts = [];
|
||||||
getTableData();
|
getTableData();
|
||||||
getTabData();
|
getTabData();
|
||||||
};
|
};
|
||||||
@@ -1738,6 +1841,21 @@ export default {
|
|||||||
col.width = w;
|
col.width = w;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 表格 change 事件(分页、排序等)
|
||||||
|
const handleTableChange = (pag, filters, sorter) => {
|
||||||
|
const {field, order} = sorter;
|
||||||
|
if (order) {
|
||||||
|
state.tableSorts = [{
|
||||||
|
sortField: field,
|
||||||
|
sortOrder: order === 'ascend' ? 'asc' : order === 'descend' ? 'desc' : null,
|
||||||
|
}];
|
||||||
|
} else {
|
||||||
|
state.tableSorts = [];
|
||||||
|
}
|
||||||
|
getTableData();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const routerStatusObj = {
|
const routerStatusObj = {
|
||||||
"0": "草稿",
|
"0": "草稿",
|
||||||
"1": "已发布",
|
"1": "已发布",
|
||||||
@@ -1753,23 +1871,38 @@ export default {
|
|||||||
};
|
};
|
||||||
//时间格式化 后续抽到 工具类中
|
//时间格式化 后续抽到 工具类中
|
||||||
const formatTime_ = (time, format = "YYYY-MM-DD HH:mm:ss") => {
|
const formatTime_ = (time, format = "YYYY-MM-DD HH:mm:ss") => {
|
||||||
|
if (!time) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return dayjs(time).format(format);
|
return dayjs(time).format(format);
|
||||||
};
|
};
|
||||||
|
|
||||||
//后续抽到 工具类中
|
//后续抽到 工具类中
|
||||||
function formatTextRate(value) {
|
function formatTextRate(value) {
|
||||||
return value ? value + "%" : "0%";
|
if (!value && value != 0) {
|
||||||
|
return "-";
|
||||||
|
}
|
||||||
|
return value + "%";
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatValNull(val) {
|
||||||
|
if (!val && val !== 0) {
|
||||||
|
return "-";
|
||||||
|
}
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取名称路径的函数
|
// 获取名称路径的函数
|
||||||
function findPathByValue(data, value) {
|
function findPathByValue(data, value) {
|
||||||
debugger;
|
debugger;
|
||||||
|
|
||||||
function recursiveSearch(nodes, value, path) {
|
function recursiveSearch(nodes, value, path) {
|
||||||
for (let node of nodes) {
|
for (let node of nodes) {
|
||||||
if (node.value === value) {
|
if (node.value === value) {
|
||||||
return path + node.name;
|
return path + node.name;
|
||||||
}
|
}
|
||||||
if (node.children) {
|
if (node.children) {
|
||||||
let result = recursiveSearch(node.children, value, path + node.name + '-');
|
let result = recursiveSearch(node.children, value, path + node.name + '/');
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -1778,7 +1911,7 @@ export default {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data) {
|
if (!data || !value) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return recursiveSearch(data, value, '');
|
return recursiveSearch(data, value, '');
|
||||||
@@ -1803,7 +1936,8 @@ export default {
|
|||||||
orgChange,
|
orgChange,
|
||||||
handleResizeColumn,
|
handleResizeColumn,
|
||||||
onDragEnd,
|
onDragEnd,
|
||||||
sysTypeOptions
|
sysTypeOptions,
|
||||||
|
handleTableChange
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -2054,4 +2188,7 @@ export default {
|
|||||||
// background-color: #eff4fc;
|
// background-color: #eff4fc;
|
||||||
// cursor: move; // 启用拖拽光标
|
// cursor: move; // 启用拖拽光标
|
||||||
//}
|
//}
|
||||||
|
.ant-table-tbody > tr > td {
|
||||||
|
user-select: text !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user