mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 10:56:46 +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%;
|
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 {
|
#container {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -282,65 +282,36 @@ export default {
|
|||||||
const ListOpera = () => {
|
const ListOpera = () => {
|
||||||
let arr = state.tabledata;
|
let arr = state.tabledata;
|
||||||
arr.map((value) => {
|
arr.map((value) => {
|
||||||
if(value.status == '已完成'){
|
value.operation = (
|
||||||
value.operation = (
|
(value.examStatus || value.workStatus) && (<div
|
||||||
<div
|
style={{
|
||||||
style={{
|
display: "flex",
|
||||||
display: "flex",
|
alignItems: "center",
|
||||||
alignItems: "center",
|
justifyContent: "center",
|
||||||
justifyContent: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<a-button
|
|
||||||
type="link"
|
|
||||||
class="operation"
|
|
||||||
style="cursor:pointer;margin-right:10px;"
|
|
||||||
onClick={() => {
|
|
||||||
state.CWvisible = true
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看作业
|
{value.workStatus===1 && <a-button
|
||||||
</a-button>
|
type="link"
|
||||||
<a-button
|
className="operation"
|
||||||
type="link"
|
style="cursor:pointer;margin-right:10px;"
|
||||||
class="operation"
|
onClick={() => {
|
||||||
style="cursor:pointer;margin-right:10px;"
|
state.CWvisible = true
|
||||||
onClick={() => {
|
}}
|
||||||
state.CQvisible = true
|
>
|
||||||
}}
|
查看作业2
|
||||||
>
|
</a-button>}
|
||||||
查看答卷
|
{value.examStatus===1 && <a-button
|
||||||
</a-button>
|
type="link"
|
||||||
</div>
|
className="operation"
|
||||||
|
style="cursor:pointer;margin-right:10px;"
|
||||||
|
onClick={() => {
|
||||||
|
state.CQvisible = true
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
查看答卷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();
|
ListOpera();
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{/**
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "operation",
|
dataIndex: "operation",
|
||||||
key: "operation",
|
key: "operation",
|
||||||
@@ -424,16 +424,15 @@ export default {
|
|||||||
align: "center",
|
align: "center",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
className: "h",
|
className: "h",
|
||||||
customRender: (text) => {
|
customRender: ({record:{examStatus,workStatus}}) => {
|
||||||
return text.record.finishStatus == 1 ? (
|
return (examStatus || workStatus) && (<div
|
||||||
<div
|
style={{
|
||||||
style={{
|
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<a-button
|
{workStatus===1 && <a-button
|
||||||
type="link"
|
type="link"
|
||||||
class="operation"
|
class="operation"
|
||||||
style="cursor:pointer;margin-right:10px;"
|
style="cursor:pointer;margin-right:10px;"
|
||||||
@@ -442,8 +441,8 @@ export default {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看作业
|
查看作业
|
||||||
</a-button>
|
</a-button>}
|
||||||
<a-button
|
{examStatus===1 && <a-button
|
||||||
type="link"
|
type="link"
|
||||||
class="operation"
|
class="operation"
|
||||||
style="cursor:pointer;margin-right:10px;"
|
style="cursor:pointer;margin-right:10px;"
|
||||||
@@ -452,37 +451,10 @@ export default {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看答卷
|
查看答卷
|
||||||
</a-button>
|
</a-button>}
|
||||||
</div>
|
</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>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
*/ },
|
|
||||||
|
|
||||||
],
|
],
|
||||||
exportHomeWorkV: false,
|
exportHomeWorkV: false,
|
||||||
downloadUrl: null,
|
downloadUrl: null,
|
||||||
|
|||||||
@@ -429,16 +429,15 @@ export default {
|
|||||||
const ListOpera = () => {
|
const ListOpera = () => {
|
||||||
let arr = state.tabledata;
|
let arr = state.tabledata;
|
||||||
arr.map((value) => {
|
arr.map((value) => {
|
||||||
if (value.finishStatus == 1) {
|
|
||||||
value.operation = (
|
value.operation = (
|
||||||
<div
|
(value.examStatus || value.workStatus) && (<div
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<a-button
|
{value.workStatus===1 && <a-button
|
||||||
type="link"
|
type="link"
|
||||||
class="operation"
|
class="operation"
|
||||||
style="cursor:pointer;margin-right:10px;color: rgba(56, 125, 247, 1)"
|
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"
|
type="link"
|
||||||
class="operation"
|
class="operation"
|
||||||
style="cursor:pointer;margin-right:10px;color: rgba(56, 125, 247, 1)"
|
style="cursor:pointer;margin-right:10px;color: rgba(56, 125, 247, 1)"
|
||||||
@@ -457,38 +456,10 @@ export default {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看答卷
|
查看答卷
|
||||||
</a-button>
|
</a-button>}
|
||||||
</div>
|
</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 = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:FaceTeachModelVisible", false);
|
ctx.emit("update:FaceTeachModelVisible", false);
|
||||||
|
|||||||
@@ -1,178 +1,182 @@
|
|||||||
//
|
import store from '@/store'
|
||||||
|
|
||||||
export function traverseArr(arr, traverseObj, saveOld = false) {
|
export function traverseArr(arr, traverseObj, saveOld = false) {
|
||||||
const newArr = [];
|
const newArr = [];
|
||||||
if (arr.length !== 0) {
|
if (arr.length !== 0) {
|
||||||
arr.forEach((item) => {
|
arr.forEach((item) => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
if (saveOld) {
|
if (saveOld) {
|
||||||
obj = {
|
obj = {
|
||||||
...item,
|
...item,
|
||||||
};
|
};
|
||||||
}
|
|
||||||
if (Object.keys(traverseObj).length !== 0) {
|
|
||||||
for (const key in traverseObj) {
|
|
||||||
if (typeof traverseObj[key] === "string") {
|
|
||||||
obj[key] = item[traverseObj[key]];
|
|
||||||
} else {
|
|
||||||
if (item[key] && item[key].length !== 0) {
|
|
||||||
obj[key] = traverseArr(item[key], traverseObj);
|
|
||||||
}
|
}
|
||||||
}
|
if (Object.keys(traverseObj).length !== 0) {
|
||||||
}
|
for (const key in traverseObj) {
|
||||||
}
|
if (typeof traverseObj[key] === "string") {
|
||||||
newArr.push(obj);
|
obj[key] = item[traverseObj[key]];
|
||||||
});
|
} else {
|
||||||
}
|
if (item[key] && item[key].length !== 0) {
|
||||||
// console.log('newArr', newArr)
|
obj[key] = traverseArr(item[key], traverseObj);
|
||||||
return newArr;
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
newArr.push(obj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// console.log('newArr', newArr)
|
||||||
|
return newArr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const admin = [5, 6, 8, 9, 11, 12]
|
const admin = [5, 6, 8, 9, 11, 12]
|
||||||
|
|
||||||
export function checkPer(per) {
|
export function checkPer(per) {
|
||||||
if (!per) {
|
if (store?.state?.userInfo?.roleList.some(t => t.code === 'learning-admin')) {
|
||||||
return false
|
return true
|
||||||
}
|
}
|
||||||
return (per + "").split(',').some(t => admin.some(s => s == t))
|
if (!per) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return (per + "").split(',').some(t => admin.some(s => s == t))
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deepClone(obj) {
|
export function deepClone(obj) {
|
||||||
let result = typeof obj.splice === "function" ? [] : {};
|
let result = typeof obj.splice === "function" ? [] : {};
|
||||||
if (obj && typeof obj === "object") {
|
if (obj && typeof obj === "object") {
|
||||||
for (let key in obj) {
|
for (let key in obj) {
|
||||||
if (obj[key] && typeof obj[key] === "object") {
|
if (obj[key] && typeof obj[key] === "object") {
|
||||||
result[key] = deepClone(obj[key]);
|
result[key] = deepClone(obj[key]);
|
||||||
} else {
|
} else {
|
||||||
result[key] = obj[key];
|
result[key] = obj[key];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
return obj;
|
||||||
}
|
|
||||||
return obj;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deepCloneFilterString(obj, fillterKeys) {
|
export function deepCloneFilterString(obj, fillterKeys) {
|
||||||
let result = typeof obj.splice === "function" ? [] : {};
|
let result = typeof obj.splice === "function" ? [] : {};
|
||||||
if (obj && typeof obj === "object") {
|
if (obj && typeof obj === "object") {
|
||||||
for (let key in obj) {
|
for (let key in obj) {
|
||||||
if (obj[key] && typeof obj[key] === "object") {
|
if (obj[key] && typeof obj[key] === "object") {
|
||||||
result[key] = deepCloneFilterString(obj[key], fillterKeys);
|
result[key] = deepCloneFilterString(obj[key], fillterKeys);
|
||||||
} else {
|
} else {
|
||||||
result[key] = fillterKeys.includes(key) ? obj[key] : String(obj[key]);
|
result[key] = fillterKeys.includes(key) ? obj[key] : String(obj[key]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
return obj;
|
||||||
}
|
|
||||||
return obj;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sortBy(arr, key) {
|
export function sortBy(arr, key) {
|
||||||
return arr.sort((x, y) => {
|
return arr.sort((x, y) => {
|
||||||
const valueX = parseInt(x[key]);
|
const valueX = parseInt(x[key]);
|
||||||
const valueY = parseInt(y[key]);
|
const valueY = parseInt(y[key]);
|
||||||
if (valueX > valueY) {
|
if (valueX > valueY) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (valueX < valueY) {
|
if (valueX < valueY) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function filterCommon(arr, key) {
|
export function filterCommon(arr, key) {
|
||||||
let newData = {};
|
let newData = {};
|
||||||
arr.forEach((item) => {
|
arr.forEach((item) => {
|
||||||
//新建属性名
|
//新建属性名
|
||||||
if (Object.keys(newData).indexOf("" + item[key]) === -1) {
|
if (Object.keys(newData).indexOf("" + item[key]) === -1) {
|
||||||
newData[item[key]] = [];
|
newData[item[key]] = [];
|
||||||
}
|
}
|
||||||
//对应插入属性值
|
//对应插入属性值
|
||||||
newData["" + item[key]].push(item);
|
newData["" + item[key]].push(item);
|
||||||
});
|
});
|
||||||
return newData;
|
return newData;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getdateToTime(date) {
|
export function getdateToTime(date) {
|
||||||
let now = new Date(parseInt(date)),
|
let now = new Date(parseInt(date)),
|
||||||
y = now.getFullYear(),
|
y = now.getFullYear(),
|
||||||
m = now.getMonth() + 1,
|
m = now.getMonth() + 1,
|
||||||
d = now.getDate(),
|
d = now.getDate(),
|
||||||
hh = now.getHours(),
|
hh = now.getHours(),
|
||||||
mm = now.getMinutes();
|
mm = now.getMinutes();
|
||||||
return `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d} ${hh}:${mm}`;
|
return `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d} ${hh}:${mm}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getdateToDate(date) {
|
export function getdateToDate(date) {
|
||||||
let now = new Date(parseInt(date)),
|
let now = new Date(parseInt(date)),
|
||||||
y = now.getFullYear(),
|
y = now.getFullYear(),
|
||||||
m = now.getMonth() + 1,
|
m = now.getMonth() + 1,
|
||||||
d = now.getDate();
|
d = now.getDate();
|
||||||
return `${y}${m < 10 ? "0" + m : m}${d < 10 ? "0" + d : d}`;
|
return `${y}${m < 10 ? "0" + m : m}${d < 10 ? "0" + d : d}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
//计算两个时间之间的时间差 多少天时分秒
|
//计算两个时间之间的时间差 多少天时分秒
|
||||||
export function intervalTime(startTime) {
|
export function intervalTime(startTime) {
|
||||||
const curTime = new Date().getTime(); //计算当前时间戳
|
const curTime = new Date().getTime(); //计算当前时间戳
|
||||||
const date3 = curTime - startTime; //时间差的毫秒数
|
const date3 = curTime - startTime; //时间差的毫秒数
|
||||||
//计算出相差天数
|
//计算出相差天数
|
||||||
const days = Math.floor(date3 / (24 * 3600 * 1000));
|
const days = Math.floor(date3 / (24 * 3600 * 1000));
|
||||||
//计算出小时数
|
//计算出小时数
|
||||||
const leave1 = date3 % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
|
const leave1 = date3 % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
|
||||||
const hours = Math.floor(leave1 / (3600 * 1000));
|
const hours = Math.floor(leave1 / (3600 * 1000));
|
||||||
//计算相差分钟数
|
//计算相差分钟数
|
||||||
const leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
|
const leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
|
||||||
const minutes = Math.floor(leave2 / (60 * 1000));
|
const minutes = Math.floor(leave2 / (60 * 1000));
|
||||||
//计算相差秒数
|
//计算相差秒数
|
||||||
const leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
|
const leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
|
||||||
const seconds = Math.round(leave3 / 1000);
|
const seconds = Math.round(leave3 / 1000);
|
||||||
return {
|
return {
|
||||||
days,
|
days,
|
||||||
hours,
|
hours,
|
||||||
minutes,
|
minutes,
|
||||||
seconds,
|
seconds,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分片处理
|
// 分片处理
|
||||||
export function batchLoadList(
|
export function batchLoadList(
|
||||||
sourceData,
|
sourceData,
|
||||||
dataTotal,
|
dataTotal,
|
||||||
splitNumber = 10,
|
splitNumber = 10,
|
||||||
callback,
|
callback,
|
||||||
complete
|
complete
|
||||||
) {
|
) {
|
||||||
if (sourceData.length <= splitNumber) {
|
if (sourceData.length <= splitNumber) {
|
||||||
typeof callback === "function" && callback(sourceData);
|
typeof callback === "function" && callback(sourceData);
|
||||||
typeof callback === "function" && complete();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let first = 0;
|
|
||||||
const intTime = parseInt(String(dataTotal / splitNumber));
|
|
||||||
const floatTime = sourceData.length % splitNumber;
|
|
||||||
const total = intTime + (floatTime > 0 ? 1 : 0);
|
|
||||||
for (let i = 0; i < total; i += 1) {
|
|
||||||
const end = first + splitNumber;
|
|
||||||
const splitArray = sourceData.slice(first, end);
|
|
||||||
setTimeout(() => {
|
|
||||||
typeof callback === "function" && callback(splitArray);
|
|
||||||
if (i === total - 1) {
|
|
||||||
// 分片处理完成
|
|
||||||
typeof callback === "function" && complete();
|
typeof callback === "function" && complete();
|
||||||
}
|
return;
|
||||||
});
|
}
|
||||||
first = end;
|
let first = 0;
|
||||||
}
|
const intTime = parseInt(String(dataTotal / splitNumber));
|
||||||
|
const floatTime = sourceData.length % splitNumber;
|
||||||
|
const total = intTime + (floatTime > 0 ? 1 : 0);
|
||||||
|
for (let i = 0; i < total; i += 1) {
|
||||||
|
const end = first + splitNumber;
|
||||||
|
const splitArray = sourceData.slice(first, end);
|
||||||
|
setTimeout(() => {
|
||||||
|
typeof callback === "function" && callback(splitArray);
|
||||||
|
if (i === total - 1) {
|
||||||
|
// 分片处理完成
|
||||||
|
typeof callback === "function" && complete();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
first = end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function newFile(code) {
|
export function newFile(code) {
|
||||||
const blob = new Blob([code], {
|
const blob = new Blob([code], {
|
||||||
type: "application/vnd.ms-excel",
|
type: "application/vnd.ms-excel",
|
||||||
});
|
});
|
||||||
const linkNode = document.createElement("a");
|
const linkNode = document.createElement("a");
|
||||||
linkNode.style.display = "none";
|
linkNode.style.display = "none";
|
||||||
linkNode.href = URL.createObjectURL(blob); //生成一个Blob URL
|
linkNode.href = URL.createObjectURL(blob); //生成一个Blob URL
|
||||||
document.body.appendChild(linkNode);
|
document.body.appendChild(linkNode);
|
||||||
linkNode.click(); //模拟在按钮上的一次鼠标单击
|
linkNode.click(); //模拟在按钮上的一次鼠标单击
|
||||||
URL.revokeObjectURL(linkNode.href); // 释放URL 对象
|
URL.revokeObjectURL(linkNode.href); // 释放URL 对象
|
||||||
document.body.removeChild(linkNode);
|
document.body.removeChild(linkNode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -305,13 +305,15 @@
|
|||||||
<!-- 查看面授课弹框 end -->
|
<!-- 查看面授课弹框 end -->
|
||||||
<!-- 确定新建面授课弹窗 -->
|
<!-- 确定新建面授课弹窗 -->
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="tableBox">
|
<div style="padding:10px 35px">
|
||||||
<a-table
|
<a-table
|
||||||
|
:header-cell-style="{'text-align':'center'}"
|
||||||
|
style="border: 1px solid #f2f6fe"
|
||||||
:columns="columns1"
|
:columns="columns1"
|
||||||
:data-source="tableData1"
|
:data-source="tableData1"
|
||||||
:loading="tableDataTotal1 === -1"
|
:loading="tableLoading"
|
||||||
:scroll="{ x: 600 }"
|
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
|
:scroll="{x:'max-content'}"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ record, column }">
|
<template #bodyCell="{ record, column }">
|
||||||
<template v-if="column.key === 'operation'">
|
<template v-if="column.key === 'operation'">
|
||||||
@@ -339,9 +341,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pa">
|
<div class="pa">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
|
v-if="tableDataTotal1 > 10"
|
||||||
:showSizeChanger="false"
|
:showSizeChanger="false"
|
||||||
showQuickJumper="true"
|
:showQuickJumper="true"
|
||||||
hideOnSinglePage="true"
|
:hideOnSinglePage="true"
|
||||||
:pageSize="pageSize1"
|
:pageSize="pageSize1"
|
||||||
:current="currentPage1"
|
:current="currentPage1"
|
||||||
:total="tableDataTotal1"
|
:total="tableDataTotal1"
|
||||||
@@ -753,7 +756,7 @@
|
|||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<!--新加 二维码
|
<!--新加 二维码
|
||||||
<a-menu-item @click="qrcodeVisible(record, 1)">
|
<a-menu-item @click="qrcodeVisible(record, 1)">
|
||||||
二维码
|
二维码
|
||||||
</a-menu-item>-->
|
</a-menu-item>-->
|
||||||
@@ -1548,24 +1551,24 @@ import {checkPer} from "@/utils/utils";
|
|||||||
|
|
||||||
//列表表格
|
//列表表格
|
||||||
const columns1 = [
|
const columns1 = [
|
||||||
{
|
|
||||||
title: "课程编号",
|
|
||||||
width: 130,
|
|
||||||
dataIndex: "offcourseNumber",
|
|
||||||
key: "offcourseNumber",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "名称",
|
title: "名称",
|
||||||
width: 400,
|
width: 400,
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "name",
|
key: "name",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "left",
|
||||||
customRender: ({ text }) => {
|
customRender: ({ text }) => {
|
||||||
return text ? text : "-";
|
return text ? text : "-";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "课程编号",
|
||||||
|
width: 130,
|
||||||
|
dataIndex: "offcourseNumber",
|
||||||
|
key: "offcourseNumber",
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "内容分类",
|
title: "内容分类",
|
||||||
width: 130,
|
width: 130,
|
||||||
@@ -1678,7 +1681,7 @@ const columns1 = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
width: 160,
|
width: 100,
|
||||||
dataIndex: "createtime",
|
dataIndex: "createtime",
|
||||||
key: "9",
|
key: "9",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
@@ -1689,7 +1692,7 @@ const columns1 = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "发布时间",
|
title: "发布时间",
|
||||||
width: 160,
|
width: 100,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
dataIndex: "pubtime",
|
dataIndex: "pubtime",
|
||||||
key: "10",
|
key: "10",
|
||||||
@@ -1715,7 +1718,7 @@ const columns1 = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 370,
|
width: 250,
|
||||||
dataIndex: "operation",
|
dataIndex: "operation",
|
||||||
key: "operation",
|
key: "operation",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
@@ -2128,6 +2131,7 @@ export default defineComponent({
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
tableLoading:false,
|
||||||
//新加
|
//新加
|
||||||
stuColumns: [
|
stuColumns: [
|
||||||
{
|
{
|
||||||
@@ -2900,6 +2904,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
// 渲染列表1操作
|
// 渲染列表1操作
|
||||||
const getTableDate = async () => {
|
const getTableDate = async () => {
|
||||||
|
state.tableLoading = true
|
||||||
console.log("我是点击搜索的数据", state.sysTypeId);
|
console.log("我是点击搜索的数据", state.sysTypeId);
|
||||||
// let datas = state.tableData1;
|
// let datas = state.tableData1;
|
||||||
let startTime = "";
|
let startTime = "";
|
||||||
@@ -2961,6 +2966,7 @@ export default defineComponent({
|
|||||||
findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-";
|
findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-";
|
||||||
});
|
});
|
||||||
state.tableData1 = datas;
|
state.tableData1 = datas;
|
||||||
|
state.tableLoading = false
|
||||||
};
|
};
|
||||||
|
|
||||||
function findClassFullName(list, classify, name = "") {
|
function findClassFullName(list, classify, name = "") {
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 搜索框及按钮 -->
|
<!-- 搜索框及按钮 -->
|
||||||
<!-- 无数据 -->
|
<!-- 无数据 -->
|
||||||
<div class="datanull" v-if="tableDataTotal === 0">
|
<div class="datanull" v-if="!tableDataTotal">
|
||||||
<div class="nodata_box">
|
<div class="nodata_box">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<img src="../../assets/images/taskpage/left1.png" />
|
<img src="../../assets/images/taskpage/left1.png" />
|
||||||
@@ -87,18 +87,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 无数据 -->
|
<!-- 无数据 -->
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div
|
<div v-if="tableDataTotal" style="padding:10px 35px">
|
||||||
class="tableBox"
|
|
||||||
v-if="tableDataTotal !== 0"
|
|
||||||
style="padding-bottom: 0px; position: relative"
|
|
||||||
>
|
|
||||||
<a-table
|
<a-table
|
||||||
style="border: 1px solid #f2f6fe"
|
:header-cell-style="{'text-align':'center'}"
|
||||||
|
style="border: 1px solid #f2f6fe;"
|
||||||
:columns="tableDataFunc()"
|
:columns="tableDataFunc()"
|
||||||
:data-source="tableData"
|
:data-source="tableData"
|
||||||
:loading="tableLoading"
|
:loading="tableLoading"
|
||||||
expandRowByClick="true"
|
|
||||||
:scroll="{ x: 1550 }"
|
|
||||||
@expand="expandTable"
|
@expand="expandTable"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
>
|
>
|
||||||
@@ -131,8 +126,8 @@
|
|||||||
<a-pagination
|
<a-pagination
|
||||||
v-if="tableDataTotal > 10"
|
v-if="tableDataTotal > 10"
|
||||||
:showSizeChanger="false"
|
:showSizeChanger="false"
|
||||||
showQuickJumper="true"
|
:showQuickJumper="true"
|
||||||
hideOnSinglePage="true"
|
:hideOnSinglePage="true"
|
||||||
:pageSize="pageSize"
|
:pageSize="pageSize"
|
||||||
v-model:current="currentPage"
|
v-model:current="currentPage"
|
||||||
:total="tableDataTotal"
|
:total="tableDataTotal"
|
||||||
@@ -1135,38 +1130,27 @@ export default {
|
|||||||
|
|
||||||
const tableDataFunc = () => {
|
const tableDataFunc = () => {
|
||||||
const columns = [
|
const columns = [
|
||||||
// {
|
|
||||||
// title: "序号",
|
|
||||||
// dataIndex: "number",
|
|
||||||
// key: "number",
|
|
||||||
// width: 100,
|
|
||||||
// align: "center",
|
|
||||||
// className: "h",
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
title: "路径图名称",
|
title: "路径图名称",
|
||||||
dataIndex: "manager",
|
dataIndex: "manager",
|
||||||
key: "manager",
|
key: "manager",
|
||||||
width: "20%",
|
align: "left",
|
||||||
align: "center",
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
className: "h",
|
width: 400,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
dataIndex: "state",
|
dataIndex: "state",
|
||||||
width: "10%",
|
|
||||||
key: "state",
|
key: "state",
|
||||||
//width: 100,
|
width: 100,
|
||||||
align: "center",
|
align: "center",
|
||||||
className: "h",
|
className: "h",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建人",
|
title: "创建人",
|
||||||
dataIndex: "creater",
|
dataIndex: "creater",
|
||||||
width: "10%",
|
|
||||||
key: "creater",
|
key: "creater",
|
||||||
// width: 100,
|
width: 100,
|
||||||
align: "center",
|
align: "center",
|
||||||
className: "h",
|
className: "h",
|
||||||
},
|
},
|
||||||
@@ -1174,7 +1158,7 @@ export default {
|
|||||||
title: "发布时间",
|
title: "发布时间",
|
||||||
dataIndex: "pubtime",
|
dataIndex: "pubtime",
|
||||||
key: "pubtime",
|
key: "pubtime",
|
||||||
width: "15%",
|
width: 200,
|
||||||
align: "center",
|
align: "center",
|
||||||
className: "h",
|
className: "h",
|
||||||
},
|
},
|
||||||
@@ -1182,17 +1166,18 @@ export default {
|
|||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
dataIndex: "cretime",
|
dataIndex: "cretime",
|
||||||
key: "cretime",
|
key: "cretime",
|
||||||
width: "15%",
|
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 200,
|
||||||
className: "h",
|
className: "h",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "operation",
|
dataIndex: "operation",
|
||||||
key: "operation",
|
key: "operation",
|
||||||
width: "20%",
|
|
||||||
align: "right",
|
align: "right",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
|
className: "h",
|
||||||
|
width: 250,
|
||||||
scopedSlots: { customRender: "action" },
|
scopedSlots: { customRender: "action" },
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -83,19 +83,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 搜索框及按钮 -->
|
<!-- 搜索框及按钮 -->
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div class="tableBox">
|
<div style="padding:10px 35px">
|
||||||
<a-table
|
<a-table
|
||||||
|
:header-cell-style="{'text-align':'center'}"
|
||||||
|
style="border: 1px solid #f2f6fe;"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data-source="tableData"
|
:data-source="tableData"
|
||||||
:loading="tableLoading"
|
:loading="tableLoading"
|
||||||
:scroll="{ x: 700 }"
|
|
||||||
@expand="expandTable"
|
@expand="expandTable"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:header-cell-style="{'text-align':'center'}"
|
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ record, column }">
|
<template #bodyCell="{ record, column }">
|
||||||
<template v-if="column.key === 'operation'">
|
<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.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===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>
|
<a-button v-if="record.type===2 && checkPer(record.permissions)" @click="createClass(record)" type="link">创建班级</a-button>
|
||||||
@@ -125,8 +125,8 @@
|
|||||||
<a-pagination
|
<a-pagination
|
||||||
v-if="tableDataTotal > 10"
|
v-if="tableDataTotal > 10"
|
||||||
:showSizeChanger="false"
|
:showSizeChanger="false"
|
||||||
showQuickJumper="true"
|
:showQuickJumper="true"
|
||||||
hideOnSinglePage="true"
|
:hideOnSinglePage="true"
|
||||||
:pageSize="pageSize"
|
:pageSize="pageSize"
|
||||||
v-model:current="searchParam.pageNo"
|
v-model:current="searchParam.pageNo"
|
||||||
:total="tableDataTotal"
|
:total="tableDataTotal"
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<!-- 无项目 -->
|
<!-- 无项目 -->
|
||||||
<div class="tableBox" style="display: none">
|
<div style="display: none">
|
||||||
<div
|
<div
|
||||||
class="taskbox"
|
class="taskbox"
|
||||||
@click="showModal1"
|
@click="showModal1"
|
||||||
@@ -1341,30 +1341,26 @@ export default {
|
|||||||
title: "项目名称",
|
title: "项目名称",
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "name",
|
key: "name",
|
||||||
width: 380,
|
className: "h",
|
||||||
// align: "center",
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
// scopedSlots: { customRender: "action" }, //引入的插槽
|
width: 400,
|
||||||
// customRender: (text, record) => {
|
|
||||||
// console.log(text, record);
|
|
||||||
// return <span>{text.text}</span>;
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "项目经理",
|
title: "项目经理",
|
||||||
dataIndex: "manager",
|
dataIndex: "manager",
|
||||||
|
className: "h",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "manager",
|
key: "manager",
|
||||||
width: 300,
|
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
// width: "30%",
|
className: "h",
|
||||||
key: "status",
|
key: "status",
|
||||||
width: 100,
|
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 100,
|
||||||
customRender: (value) => {
|
customRender: (value) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -1385,15 +1381,15 @@ export default {
|
|||||||
{
|
{
|
||||||
title: "创建人",
|
title: "创建人",
|
||||||
dataIndex: "createName",
|
dataIndex: "createName",
|
||||||
// width: "30%",
|
className: "h",
|
||||||
key: "createName",
|
key: "createName",
|
||||||
width: 100,
|
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "是否审核",
|
title: "是否审核",
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
// width: "30%",
|
className: "h",
|
||||||
key: "status",
|
key: "status",
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
align: "center",
|
||||||
@@ -1419,16 +1415,18 @@ export default {
|
|||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
dataIndex: "createTime",
|
dataIndex: "createTime",
|
||||||
key: "createTime",
|
key: "createTime",
|
||||||
width: 180,
|
className: "h",
|
||||||
|
width: 200,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "operation",
|
dataIndex: "operation",
|
||||||
key: "operation",
|
key: "operation",
|
||||||
width: 350,
|
className: "h",
|
||||||
align: "right",
|
align: "right",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
|
width: 300,
|
||||||
scopedSlots: {customRender: "action"}
|
scopedSlots: {customRender: "action"}
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user