mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
--fix bug
This commit is contained in:
16
src/App.vue
16
src/App.vue
@@ -114,6 +114,22 @@ const getDictList = (param) => api1.getDictTree({setCode: param,}).then((res) =>
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ant-table-wrapper {
|
||||
.ant-table-content {
|
||||
.ant-table-thead th {
|
||||
background-color: #eff4fc !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
}
|
||||
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-btn-link {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
|
||||
@@ -282,65 +282,36 @@ export default {
|
||||
const ListOpera = () => {
|
||||
let arr = state.tabledata;
|
||||
arr.map((value) => {
|
||||
if(value.status == '已完成'){
|
||||
value.operation = (
|
||||
<div
|
||||
(value.examStatus || value.workStatus) && (<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
{value.workStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
className="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
onClick={() => {
|
||||
state.CWvisible = true
|
||||
}}
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
查看作业2
|
||||
</a-button>}
|
||||
{value.examStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
className="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
onClick={() => {
|
||||
state.CQvisible = true
|
||||
}}
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
查看答卷3
|
||||
</a-button>}
|
||||
</div>)
|
||||
);
|
||||
} else {
|
||||
value.operation = (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
disabled
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
disabled
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
ListOpera();
|
||||
|
||||
@@ -416,7 +416,7 @@ export default {
|
||||
);
|
||||
},
|
||||
},
|
||||
{/**
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
@@ -424,16 +424,15 @@ export default {
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return text.record.finishStatus == 1 ? (
|
||||
<div
|
||||
customRender: ({record:{examStatus,workStatus}}) => {
|
||||
return (examStatus || workStatus) && (<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
{workStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
@@ -442,8 +441,8 @@ export default {
|
||||
}}
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
</a-button>}
|
||||
{examStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
@@ -452,37 +451,10 @@ export default {
|
||||
}}
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
disabled
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
disabled
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
*/ },
|
||||
|
||||
</a-button>}
|
||||
</div>)
|
||||
}
|
||||
}
|
||||
],
|
||||
exportHomeWorkV: false,
|
||||
downloadUrl: null,
|
||||
|
||||
@@ -429,16 +429,15 @@ export default {
|
||||
const ListOpera = () => {
|
||||
let arr = state.tabledata;
|
||||
arr.map((value) => {
|
||||
if (value.finishStatus == 1) {
|
||||
value.operation = (
|
||||
<div
|
||||
(value.examStatus || value.workStatus) && (<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
{value.workStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;color: rgba(56, 125, 247, 1)"
|
||||
@@ -447,8 +446,8 @@ export default {
|
||||
}}
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
</a-button>}
|
||||
{value.workStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;color: rgba(56, 125, 247, 1)"
|
||||
@@ -457,37 +456,9 @@ export default {
|
||||
}}
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
</a-button>}
|
||||
</div>)
|
||||
);
|
||||
} else {
|
||||
value.operation = (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="margin-right:10px;color:rgba(56, 125, 247, 0.5)"
|
||||
disabled
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="margin-right:10px;color:rgba(56, 125, 247, 0.5)"
|
||||
disabled
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//
|
||||
import store from '@/store'
|
||||
|
||||
export function traverseArr(arr, traverseObj, saveOld = false) {
|
||||
const newArr = [];
|
||||
if (arr.length !== 0) {
|
||||
@@ -30,6 +31,9 @@ export function traverseArr(arr, traverseObj, saveOld = false) {
|
||||
const admin = [5, 6, 8, 9, 11, 12]
|
||||
|
||||
export function checkPer(per) {
|
||||
if (store?.state?.userInfo?.roleList.some(t => t.code === 'learning-admin')) {
|
||||
return true
|
||||
}
|
||||
if (!per) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -305,13 +305,15 @@
|
||||
<!-- 查看面授课弹框 end -->
|
||||
<!-- 确定新建面授课弹窗 -->
|
||||
<!-- 表格 -->
|
||||
<div class="tableBox">
|
||||
<div style="padding:10px 35px">
|
||||
<a-table
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="columns1"
|
||||
:data-source="tableData1"
|
||||
:loading="tableDataTotal1 === -1"
|
||||
:scroll="{ x: 600 }"
|
||||
:loading="tableLoading"
|
||||
:pagination="false"
|
||||
:scroll="{x:'max-content'}"
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
@@ -339,9 +341,10 @@
|
||||
</div>
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
v-if="tableDataTotal1 > 10"
|
||||
:showSizeChanger="false"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize1"
|
||||
:current="currentPage1"
|
||||
:total="tableDataTotal1"
|
||||
@@ -1548,24 +1551,24 @@ import {checkPer} from "@/utils/utils";
|
||||
|
||||
//列表表格
|
||||
const columns1 = [
|
||||
{
|
||||
title: "课程编号",
|
||||
width: 130,
|
||||
dataIndex: "offcourseNumber",
|
||||
key: "offcourseNumber",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
width: 400,
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
align: "left",
|
||||
customRender: ({ text }) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "课程编号",
|
||||
width: 130,
|
||||
dataIndex: "offcourseNumber",
|
||||
key: "offcourseNumber",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "内容分类",
|
||||
width: 130,
|
||||
@@ -1678,7 +1681,7 @@ const columns1 = [
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
width: 160,
|
||||
width: 100,
|
||||
dataIndex: "createtime",
|
||||
key: "9",
|
||||
ellipsis: true,
|
||||
@@ -1689,7 +1692,7 @@ const columns1 = [
|
||||
},
|
||||
{
|
||||
title: "发布时间",
|
||||
width: 160,
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
dataIndex: "pubtime",
|
||||
key: "10",
|
||||
@@ -1715,7 +1718,7 @@ const columns1 = [
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 370,
|
||||
width: 250,
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
fixed: "right",
|
||||
@@ -2128,6 +2131,7 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
|
||||
const state = reactive({
|
||||
tableLoading:false,
|
||||
//新加
|
||||
stuColumns: [
|
||||
{
|
||||
@@ -2900,6 +2904,7 @@ export default defineComponent({
|
||||
|
||||
// 渲染列表1操作
|
||||
const getTableDate = async () => {
|
||||
state.tableLoading = true
|
||||
console.log("我是点击搜索的数据", state.sysTypeId);
|
||||
// let datas = state.tableData1;
|
||||
let startTime = "";
|
||||
@@ -2961,6 +2966,7 @@ export default defineComponent({
|
||||
findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-";
|
||||
});
|
||||
state.tableData1 = datas;
|
||||
state.tableLoading = false
|
||||
};
|
||||
|
||||
function findClassFullName(list, classify, name = "") {
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
<!-- 搜索框及按钮 -->
|
||||
<!-- 无数据 -->
|
||||
<div class="datanull" v-if="tableDataTotal === 0">
|
||||
<div class="datanull" v-if="!tableDataTotal">
|
||||
<div class="nodata_box">
|
||||
<div class="left">
|
||||
<img src="../../assets/images/taskpage/left1.png" />
|
||||
@@ -87,18 +87,13 @@
|
||||
</div>
|
||||
<!-- 无数据 -->
|
||||
<!-- 表格 -->
|
||||
<div
|
||||
class="tableBox"
|
||||
v-if="tableDataTotal !== 0"
|
||||
style="padding-bottom: 0px; position: relative"
|
||||
>
|
||||
<div v-if="tableDataTotal" style="padding:10px 35px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
style="border: 1px solid #f2f6fe;"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableLoading"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ x: 1550 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
>
|
||||
@@ -131,8 +126,8 @@
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
:showSizeChanger="false"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
v-model:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
@@ -1135,38 +1130,27 @@ export default {
|
||||
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
// {
|
||||
// title: "序号",
|
||||
// dataIndex: "number",
|
||||
// key: "number",
|
||||
// width: 100,
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
{
|
||||
title: "路径图名称",
|
||||
dataIndex: "manager",
|
||||
key: "manager",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
align: "left",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
width: 400,
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
dataIndex: "state",
|
||||
width: "10%",
|
||||
key: "state",
|
||||
//width: 100,
|
||||
width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "creater",
|
||||
width: "10%",
|
||||
key: "creater",
|
||||
// width: 100,
|
||||
width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
@@ -1174,7 +1158,7 @@ export default {
|
||||
title: "发布时间",
|
||||
dataIndex: "pubtime",
|
||||
key: "pubtime",
|
||||
width: "15%",
|
||||
width: 200,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
@@ -1182,17 +1166,18 @@ export default {
|
||||
title: "创建时间",
|
||||
dataIndex: "cretime",
|
||||
key: "cretime",
|
||||
width: "15%",
|
||||
align: "center",
|
||||
width: 200,
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
width: "20%",
|
||||
align: "right",
|
||||
fixed: "right",
|
||||
className: "h",
|
||||
width: 250,
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
];
|
||||
|
||||
@@ -83,19 +83,19 @@
|
||||
</div>
|
||||
<!-- 搜索框及按钮 -->
|
||||
<!-- 表格 -->
|
||||
<div class="tableBox">
|
||||
<div style="padding:10px 35px">
|
||||
<a-table
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
style="border: 1px solid #f2f6fe;"
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
:loading="tableLoading"
|
||||
:scroll="{ x: 700 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space align="start">
|
||||
<a-space>
|
||||
<a-button v-if="(record.status===0 || record.status===2 || record.status===-5) && checkPer(record.permissions)" @click="handleEdit(record)" type="link">编辑</a-button>
|
||||
<a-button v-if="record.type===1 && checkPer(record.permissions)" @click="createSub(record)" type="link">创建子项目</a-button>
|
||||
<a-button v-if="record.type===2 && checkPer(record.permissions)" @click="createClass(record)" type="link">创建班级</a-button>
|
||||
@@ -125,8 +125,8 @@
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
:showSizeChanger="false"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
v-model:current="searchParam.pageNo"
|
||||
:total="tableDataTotal"
|
||||
@@ -138,7 +138,7 @@
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<!-- 无项目 -->
|
||||
<div class="tableBox" style="display: none">
|
||||
<div style="display: none">
|
||||
<div
|
||||
class="taskbox"
|
||||
@click="showModal1"
|
||||
@@ -1341,30 +1341,26 @@ export default {
|
||||
title: "项目名称",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
width: 380,
|
||||
// align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
// customRender: (text, record) => {
|
||||
// console.log(text, record);
|
||||
// return <span>{text.text}</span>;
|
||||
// },
|
||||
width: 400,
|
||||
},
|
||||
{
|
||||
title: "项目经理",
|
||||
dataIndex: "manager",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
key: "manager",
|
||||
width: 300,
|
||||
align: "center",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
dataIndex: "status",
|
||||
// width: "30%",
|
||||
className: "h",
|
||||
key: "status",
|
||||
width: 100,
|
||||
align: "center",
|
||||
width: 100,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
@@ -1385,15 +1381,15 @@ export default {
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "createName",
|
||||
// width: "30%",
|
||||
className: "h",
|
||||
key: "createName",
|
||||
width: 100,
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "是否审核",
|
||||
dataIndex: "status",
|
||||
// width: "30%",
|
||||
className: "h",
|
||||
key: "status",
|
||||
width: 100,
|
||||
align: "center",
|
||||
@@ -1419,16 +1415,18 @@ export default {
|
||||
title: "创建时间",
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
width: 180,
|
||||
className: "h",
|
||||
width: 200,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
width: 350,
|
||||
className: "h",
|
||||
align: "right",
|
||||
fixed: "right",
|
||||
width: 300,
|
||||
scopedSlots: {customRender: "action"}
|
||||
},
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user