主题整合备课 table 栏内容换行 更整齐

This commit is contained in:
zhanglipeng 2021-09-03 10:37:30 +08:00
parent d654ccb791
commit 3167d0f93c
8 changed files with 200 additions and 142 deletions

View File

@ -67,19 +67,27 @@
</div>
<el-table
border
border
v-loading="loading"
:data="mathtermplanitemList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
fixed
fixed
label="游戏数学内容"
align="center"
prop="mathconent"
:formatter="mathFaFormat"
/>
>
<template slot-scope="scope" v-if="scope.row.mathconent != undefined">
<p
v-for="(item, index) in scope.row.mathconent.split(';')"
:key="index"
>
{{ mathFaFormat(item) }}
</p>
</template></el-table-column
>
<el-table-column
label="所属计划"
align="center"
@ -118,7 +126,12 @@
/>
<!-- 添加或修改游戏数学学期计划明细对话框 -->
<el-dialog :title="title" :visible.sync="open" class="v-dialog" append-to-body>
<el-dialog
:title="title"
:visible.sync="open"
class="v-dialog"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属计划" prop="tpid">
<el-select v-model="form.tpid" size="small" :disabled="true">
@ -340,24 +353,33 @@ export default {
});
return actions.join("");
},
// // --
// mathFaFormat(row, column) {
// if (row.mathconent != null) {
// var ilength = row.mathconent.split(";").length - 1;
// var names = "";
// for (var i = 1; i < ilength; i++) {
// names =
// names +
// this.selectMoeDictLabel(
// this.mathFaOptions,
// row.mathconent.split(";")[i]
// ) +
// "";
// }
// //this.selectDictLabel(this.scopeOptions, row.xnxq);
// return names;
// }
// return "";
// },
// --
mathFaFormat(row, column) {
if (row.mathconent != null) {
var ilength = row.mathconent.split(";").length - 1;
var names = "";
for (var i = 1; i < ilength; i++) {
names =
names +
this.selectMoeDictLabel(
this.mathFaOptions,
row.mathconent.split(";")[i]
) +
"";
}
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return names;
mathFaFormat(id) {
var name = "";
if (id != null && id != "") {
name = this.selectMoeDictLabel(this.mathFaOptions, id);
}
return "";
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return name;
},
//
cancel() {

View File

@ -84,13 +84,16 @@
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column
fixed
label="活动"
align="center"
prop="activityid"
:formatter="themeactivityFormat"
/>
<el-table-column fixed label="活动" align="center" prop="activityid">
<template slot-scope="scope" v-if="scope.row.activityid != undefined">
<p
v-for="(item, index) in scope.row.activityid.split(';')"
:key="index"
>
{{ themeactivityFormat(item) }}
</p>
</template></el-table-column
>
<el-table-column
label="所属月计划"
align="center"
@ -313,23 +316,31 @@ export default {
},
methods: {
// --
themeactivityFormat(row, column) {
if (row.activityid != null) {
var ilength = row.activityid.split(";").length - 1;
var names = "";
for (var i = 1; i < ilength; i++) {
names =
names +
this.selectMoeDictLabel(
this.themeactivityOptions,
row.activityid.split(";")[i]
) +
"";
}
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return names;
// themeactivityFormat(row, column) {
// if (row.activityid != null) {
// var ilength = row.activityid.split(";").length - 1;
// var names = "";
// for (var i = 1; i < ilength; i++) {
// names =
// names +
// this.selectMoeDictLabel(
// this.themeactivityOptions,
// row.activityid.split(";")[i]
// ) +
// "";
// }
// //this.selectDictLabel(this.scopeOptions, row.xnxq);
// return names;
// }
// return "";
// },
themeactivityFormat(activityid) {
var name = "";
if (activityid != null && activityid != "") {
name = this.selectMoeDictLabel(this.themeactivityOptions, activityid);
}
return "";
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return name;
},
//checkbox
getThemeActivityIdValue() {
@ -500,15 +511,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除主题整合周计划明细的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
this.$confirm("是否确认删除主题整合周计划明细的数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delMonthplanitem(ids);
})

View File

@ -163,12 +163,13 @@
<span>{{ parseTime(scope.row.month, "{y}-{m}") }}</span>
</template>
</el-table-column>
<el-table-column
label="本月主题"
align="center"
prop="themes"
:formatter="themeFormat"
/>
<el-table-column label="本月主题" align="center" prop="themes">
<template slot-scope="scope" v-if="scope.row.themes != undefined">
<p v-for="(item, index) in scope.row.themes.split(';')" :key="index">
{{ themeFormat(item) }}
</p>
</template></el-table-column
>
<el-table-column prop="wxkc" label="微型课程">
<template slot-scope="scope">
<div v-html="scope.row.wxkc"></div>
@ -409,23 +410,31 @@ export default {
return this.selectDictLabel(this.statusOptions, row.status);
},
// --
themeFormat(row, column) {
if (row.themes != null) {
var ilength = row.themes.split(";").length - 1;
var names = "";
for (var i = 1; i < ilength; i++) {
names =
names +
this.selectMoeDictLabel(
this.themeOptions,
row.themes.split(";")[i]
) +
" ";
}
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return names;
// themeFormat(row, column) {
// if (row.themes != null) {
// var ilength = row.themes.split(";").length - 1;
// var names = "";
// for (var i = 1; i < ilength; i++) {
// names =
// names +
// this.selectMoeDictLabel(
// this.themeOptions,
// row.themes.split(";")[i]
// ) +
// " ";
// }
// //this.selectDictLabel(this.scopeOptions, row.xnxq);
// return names;
// }
// return "";
// },
themeFormat(themeid) {
var name = "";
if (themeid != null && themeid != "") {
name = this.selectMoeDictLabel(this.themeOptions, themeid);
}
return "";
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return name;
},
//
getThemeList() {

View File

@ -45,7 +45,7 @@
:rowspan="bodyData.monthplanitemList.length"
class="align-center"
>
<span>{{ monththeme }}</span>
<span v-html="monththemes"></span>
</td>
<td class="align-center">{{ item.zc }}</td>
<td class="align-center">{{ item.starttime }}{{ item.endtime }}</td>
@ -99,6 +99,7 @@ export default {
classname: "",
tbr: "",
monththeme: "",
monththemes: "",
wxkc: "",
bz: "",
spyj: "",
@ -185,6 +186,7 @@ export default {
//
async themeFormat(themeids) {
var themename = "";
var themenames = "";
var ids = themeids.split(";");
var array = [];
//console.log(ids);
@ -199,10 +201,12 @@ export default {
await listThemeByIds(array).then((response) => {
response.rows.forEach(function (value1, key1, arr1) {
themename = themename + value1.name + ";";
themenames = themenames + "<p>" + value1.name + "</p>";
});
});
//(themename);
this.monththeme = themename;
this.monththemes = themenames;
}
},
/** 查询主题整合周计划明细列表 */

View File

@ -74,13 +74,17 @@
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column
fixed
label="主题内容"
align="center"
prop="themeconent"
:formatter="themeFormat"
/>
<el-table-column fixed label="主题内容" align="center" prop="themeconent"
><template slot-scope="scope" v-if="scope.row.themeconent != undefined">
<p
v-for="(item, index) in scope.row.themeconent.split(';')"
:key="index"
>
{{ themeFormat(item) }}
</p>
</template></el-table-column
>
<el-table-column
label="学期计划"
align="center"
@ -264,23 +268,30 @@ export default {
},
methods: {
// --
themeFormat(row, column) {
if (row.themeconent != null) {
var ilength = row.themeconent.split(";").length - 1;
var names = "";
for (var i = 1; i < ilength; i++) {
names =
names +
this.selectMoeDictLabel(
this.themeOptions,
row.themeconent.split(";")[i]
) +
" ";
}
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return names;
// themeFormat(row, column) {
// if (row.themeconent != null) {
// var ilength = row.themeconent.split(";").length - 1;
// var names = "";
// for (var i = 1; i < ilength; i++) {
// names =
// names +
// this.selectMoeDictLabel(
// this.themeOptions,
// row.themeconent.split(";")[i]
// ) +
// " ";
// }
// //this.selectDictLabel(this.scopeOptions, row.xnxq);
// return names;
// }
// return "";
// },
themeFormat(themeid) {
var name = "";
if (themeid != null && themeid != "") {
name = this.selectMoeDictLabel(this.themeOptions, themeid);
}
return "";
return name;
},
//checkbox
getThemeconentValue() {
@ -440,15 +451,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除主题整合学期计划明细的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
this.$confirm("是否确认删除主题整合学期计划明细的数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delTermplanitem(ids);
})

View File

@ -39,7 +39,7 @@
<td class="align-center">
<span>{{ item.month }}</span>
</td>
<td class="align-center">
<td class="align-center" v-if="item.themeconent != undefined">
<router-link
style="margin: 10px; color: blue"
v-for="(index, item) in item.themeconent.split(';')"
@ -48,6 +48,7 @@
>{{ themeFormat(index) }}</router-link
>
</td>
<td v-else></td>
<td>{{ item.remark }}</td>
</tr>
<tr>

View File

@ -122,13 +122,16 @@
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="编号" align="center" prop="id" /> -->
<el-table-column
fixed
label="活动"
align="center"
prop="activityid"
:formatter="themeactivityFormat"
/>
<el-table-column fixed label="活动" align="center" prop="activityid"
><template slot-scope="scope" v-if="scope.row.activityid != undefined">
<p
v-for="(item, index) in scope.row.activityid.split(';')"
:key="index"
>
{{ themeactivityFormat(item) }}
</p>
</template></el-table-column
>
<el-table-column
label="所属周计划"
align="center"
@ -361,23 +364,30 @@ export default {
},
methods: {
// --
themeactivityFormat(row, column) {
if (row.activityid != null) {
var ilength = row.activityid.split(";").length - 1;
var names = "";
for (var i = 1; i < ilength; i++) {
names =
names +
this.selectMoeDictLabel(
this.themeactivityOptions,
row.activityid.split(";")[i]
) +
"";
}
//this.selectDictLabel(this.scopeOptions, row.xnxq);
return names;
// themeactivityFormat(row, column) {
// if (row.activityid != null) {
// var ilength = row.activityid.split(";").length - 1;
// var names = "";
// for (var i = 1; i < ilength; i++) {
// names =
// names +
// this.selectMoeDictLabel(
// this.themeactivityOptions,
// row.activityid.split(";")[i]
// ) +
// "";
// }
// //this.selectDictLabel(this.scopeOptions, row.xnxq);
// return names;
// }
// return "";
// },
themeactivityFormat(activityid) {
var name = "";
if (activityid != null && activityid != "") {
name = this.selectMoeDictLabel(this.themeactivityOptions, activityid);
}
return "";
return name;
},
//checkbox
getThemeActivityIdValue() {
@ -567,15 +577,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除主题整合周计划明细数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
this.$confirm("是否确认删除主题整合周计划明细数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delWeekplanitem(ids);
})

View File

@ -49,7 +49,9 @@
:rowspan="bodyData.weekplanitemList.length"
class="align-center"
>
<span>{{ item.theme }}</span>
<p v-for="(item, index) in item.theme.split(';')" :key="index">
{{ item }}
</p>
</td>
<td class="align-center">{{ item.daytime }} / 星期{{ item.zhou }}</td>
<td v-if="item.activityid != undefined">