fix:修改课程管理页面所有表格序号展示问题

This commit is contained in:
wyx
2022-12-07 12:27:01 +08:00
parent adc1a8e61d
commit bf34366018
2 changed files with 45 additions and 22 deletions

View File

@@ -2487,13 +2487,13 @@
<div class="stmm_i1">
<span style="margin-right: 52px">
{{ currentPlanItem.name }}课程-第1期-
{{ getdateToDateFn(currentPlanItem.createTime) }}
{{ currentPlanItem.createTime }}
</span>
<span style="color: #ffb751">已开课 4.5</span>
</div>
<div class="stmm_i2">
<span style="color: #999ba3">时间:</span>
<span>{{ getdateToTimeFn(currentPlanItem.endTime) }}</span>
<span>{{ currentPlanItem.endTime }}</span>
</div>
<div class="stmm_i3">
<span style="color: #999ba3">地点:</span>
@@ -3147,10 +3147,7 @@ const columns1 = [
width: 100,
dataIndex: "num",
key: "num",
align: "center",
customRender: ({ index }) => {
return index + 1;
},
align: "center"
},
{
title: "名称",
@@ -3396,11 +3393,7 @@ const columns6 = [
key: "num",
width: "6%",
align: "center",
ellipsis: true,
customRender: ({ index }) => {
//{ text, record, index, column }
return index + 1;
},
ellipsis: true
},
{
title: "创建人",
@@ -3454,7 +3447,7 @@ const columns6 = [
ellipsis: true,
align: "center",
customRender: ({ text }) => {
return text ? getdateToTime(text * 1000) : "-";
return text ? text: "-";
},
},
{
@@ -3465,7 +3458,7 @@ const columns6 = [
ellipsis: true,
align: "center",
customRender: ({ text }) => {
return text ? getdateToTime(text * 1000) : "-";
return text ? text : "-";
},
},
{
@@ -3484,10 +3477,6 @@ const columns7 = [
dataIndex: "num",
key: "num",
align: "center",
customRender: ({ index }) => {
//{ text, record, index, column }
return index + 1;
},
},
{
title: "姓名",
@@ -3885,7 +3874,7 @@ export default defineComponent({
selectTime: "",
pageSize3: 10,
currentPage3: 0,
currentPage3: 1,
tableDataTotal3: 0,
checked1: false,
@@ -4110,11 +4099,14 @@ export default defineComponent({
const { rows, total } = res.data.data;
console.log(res.data.data);
state.tableDataTotal1 = total;
for(let i=0;i<rows.length;i++){
rows[i].num = i+1+ (state.currentPage1-1)*10
}
const datas = traverseArr(
rows,
{
key: "offcourseId",
num: "offcourseId",
num: "num",
name: "name",
content: "categoryId",
courseform: "type",
@@ -4418,6 +4410,11 @@ export default defineComponent({
// console.log("获取学员列表", res);
const { rows, total } = res.data.data;
state.tableDataTotal3 = total;
for(let i=0;i<rows.length;i++){
rows[i].num = i+1+ (state.currentPage3-1)*10
}
rows.forEach((item, index) => {
rows[index] = {
...item,
@@ -4428,7 +4425,7 @@ export default defineComponent({
rows,
{
key: "studentId",
num: "studentId",
num: "num",
name: "name",
number: "studentId",
department: "deptName",
@@ -4520,11 +4517,16 @@ export default defineComponent({
console.log("开课res", res);
const { rows, total } = res.data.data;
state.tableDataTotal222 = total;
for(let i=0;i<rows.length;i++){
rows[i].num = i+1+ (state.currentPage222-1)*10
}
const datas = traverseArr(
rows,
{
key: "offcoursePlanId",
num: "offcoursePlanId",
num: "num",
organization: "name",
address: "address",
starttime: "beginTime",