diff --git a/ruoyi-ui/src/views/benyi/mathtermplan/data.vue b/ruoyi-ui/src/views/benyi/mathtermplan/data.vue index 62a64b55a..dc042971c 100644 --- a/ruoyi-ui/src/views/benyi/mathtermplan/data.vue +++ b/ruoyi-ui/src/views/benyi/mathtermplan/data.vue @@ -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() { diff --git a/ruoyi-ui/src/views/benyi/thememonthplan/data.vue b/ruoyi-ui/src/views/benyi/thememonthplan/data.vue index 285ef9dbc..cc7f9bfe3 100644 --- a/ruoyi-ui/src/views/benyi/thememonthplan/data.vue +++ b/ruoyi-ui/src/views/benyi/thememonthplan/data.vue @@ -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); }) diff --git a/ruoyi-ui/src/views/benyi/thememonthplan/index.vue b/ruoyi-ui/src/views/benyi/thememonthplan/index.vue index 6830aac6c..38d4396ac 100644 --- a/ruoyi-ui/src/views/benyi/thememonthplan/index.vue +++ b/ruoyi-ui/src/views/benyi/thememonthplan/index.vue @@ -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() { diff --git a/ruoyi-ui/src/views/benyi/thememonthplan/table.vue b/ruoyi-ui/src/views/benyi/thememonthplan/table.vue index 2744338a2..aa5f513a9 100644 --- a/ruoyi-ui/src/views/benyi/thememonthplan/table.vue +++ b/ruoyi-ui/src/views/benyi/thememonthplan/table.vue @@ -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; } }, /** 查询主题整合周计划明细列表 */ diff --git a/ruoyi-ui/src/views/benyi/themetermplan/data.vue b/ruoyi-ui/src/views/benyi/themetermplan/data.vue index c67efd06f..f871b6089 100644 --- a/ruoyi-ui/src/views/benyi/themetermplan/data.vue +++ b/ruoyi-ui/src/views/benyi/themetermplan/data.vue @@ -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); }) diff --git a/ruoyi-ui/src/views/benyi/themetermplan/table.vue b/ruoyi-ui/src/views/benyi/themetermplan/table.vue index 7e488d557..a67345959 100644 --- a/ruoyi-ui/src/views/benyi/themetermplan/table.vue +++ b/ruoyi-ui/src/views/benyi/themetermplan/table.vue @@ -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> diff --git a/ruoyi-ui/src/views/benyi/themeweekplan/data.vue b/ruoyi-ui/src/views/benyi/themeweekplan/data.vue index 3b5563b4f..c2763d1d7 100644 --- a/ruoyi-ui/src/views/benyi/themeweekplan/data.vue +++ b/ruoyi-ui/src/views/benyi/themeweekplan/data.vue @@ -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); }) diff --git a/ruoyi-ui/src/views/benyi/themeweekplan/table.vue b/ruoyi-ui/src/views/benyi/themeweekplan/table.vue index b282706eb..651377373 100644 --- a/ruoyi-ui/src/views/benyi/themeweekplan/table.vue +++ b/ruoyi-ui/src/views/benyi/themeweekplan/table.vue @@ -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">