diff --git a/ruoyi-ui/src/views/benyi/thememonthplan/data.vue b/ruoyi-ui/src/views/benyi/thememonthplan/data.vue index d5b87a2e1..597fb4f16 100644 --- a/ruoyi-ui/src/views/benyi/thememonthplan/data.vue +++ b/ruoyi-ui/src/views/benyi/thememonthplan/data.vue @@ -21,6 +21,7 @@ placeholder="周次" clearable size="small" + :min="1" class="my-date-picker" @keyup.enter.native="handleQuery" /> @@ -156,7 +157,7 @@ > <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="月计划" prop="mpid"> - <el-select v-model="form.mpid" size="small" :disabled="true"> + <el-select v-model="form.mpid" :disabled="true"> <el-option v-for="item in themeMonthPlanOptions" :key="item.id" @@ -166,30 +167,44 @@ </el-select> </el-form-item> <el-form-item label="周次" prop="zc"> - <el-input-number class="my-date-picker" v-model="form.zc" placeholder="请输入周次" /> + <el-input-number + class="my-date-picker" + v-model="form.zc" + :min="1" + placeholder="请输入周次" + /> </el-form-item> - <el-form-item label="开始时间" prop="starttime"> - <el-date-picker + <el-form-item label="起止时间" prop="starttime"> + <!-- <el-date-picker clearable - size="small" class="my-date-picker" v-model="form.starttime" type="date" value-format="yyyy-MM-dd" placeholder="选择开始时间" - ></el-date-picker> + ></el-date-picker> --> + <el-date-picker + v-model="form.starttime" + clearable + class="my-date-picker" + type="daterange" + value-format="yyyy-MM-dd" + range-separator="至" + start-placeholder="开始日期" + end-placeholder="结束日期" + > + </el-date-picker> </el-form-item> - <el-form-item label="结束时间" prop="endtime"> + <!-- <el-form-item label="结束时间" prop="endtime"> <el-date-picker clearable - size="small" class="my-date-picker" v-model="form.endtime" type="date" value-format="yyyy-MM-dd" placeholder="选择结束时间" ></el-date-picker> - </el-form-item> + </el-form-item> --> <el-form-item label="选择活动" prop="activityid"> <el-checkbox-group v-model="themeactivityList" @@ -396,7 +411,7 @@ export default { this.form = { id: undefined, mpid: undefined, - zc: 0, + zc: 1, starttime: undefined, endtime: undefined, activityid: undefined, @@ -439,6 +454,10 @@ export default { this.form = response.data; this.open = true; this.title = "填充主题整合周计划明细"; + let arrTime = []; + arrTime.push(response.data.starttime); + arrTime.push(response.data.endtime); + this.form.starttime = arrTime; var activityid = response.data.activityid.split(";"); var array = []; //console.log(arr); @@ -455,6 +474,9 @@ export default { submitForm: function () { this.$refs["form"].validate((valid) => { if (valid) { + let arrTime = this.form.starttime; + this.form.starttime = arrTime[0]; + this.form.endtime = arrTime[1]; if (this.form.id != undefined) { updateMonthplanitem(this.form).then((response) => { if (response.code === 200) { @@ -479,7 +501,7 @@ export default { handleDelete(row) { const ids = row.id || this.ids; this.$confirm( - '是否确认删除主题整合周计划编号为"' + ids + '"的数据项?', + '是否确认删除主题整合周计划明细的数据项?', "警告", { confirmButtonText: "确定", @@ -496,22 +518,6 @@ export default { }) .catch(function () {}); }, - /** 导出按钮操作 */ - handleExport() { - const queryParams = this.queryParams; - this.$confirm("是否确认导出所有主题整合周计划数据项?", "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }) - .then(function () { - return exportWeekplan(queryParams); - }) - .then((response) => { - this.download(response.msg); - }) - .catch(function () {}); - }, }, }; </script> diff --git a/ruoyi-ui/src/views/benyi/thememonthplan/table.vue b/ruoyi-ui/src/views/benyi/thememonthplan/table.vue index cb11aace5..8f467a8c1 100644 --- a/ruoyi-ui/src/views/benyi/thememonthplan/table.vue +++ b/ruoyi-ui/src/views/benyi/thememonthplan/table.vue @@ -49,8 +49,15 @@ </td> <td class="align-center">{{ item.zc }}</td> <td class="align-center">{{ item.starttime }}至{{ item.endtime }}</td> - <td class="align-center"> - {{ themeactivityFormat(item.activityid) }} + <td class="align-center" v-if="item.activityid != undefined"> + <!-- {{ themeactivityFormat(item.activityid) }} --> + <router-link + style="color: blue" + v-for="(index, item) in item.activityid.split(';')" + :key="item" + :to="url + index" + ><p>{{ themeactivityFormat(index) }}</p></router-link + > </td> <td>{{ item.jzzc }}</td> </tr> @@ -84,6 +91,8 @@ export default { name: "MonthTable", data() { return { + //url + url: "/benyi_course/tremplan/themestudy/", tableData: [], title: "", month: "", @@ -228,24 +237,34 @@ export default { }); }, // 主题--字典状态字典翻译 + // themeactivityFormat(activityid) { + // if (activityid != null) { + // var ilength = activityid.split(";").length - 1; + // var names = ""; + // for (var i = 1; i < ilength; i++) { + // // console.log(activityid.split(";")[i]); + // // console.log(this.themeactivityOptions); + // names = + // names + + // this.selectMoeDictLabel( + // this.themeactivityOptions, + // activityid.split(";")[i] + // ) + + // ";"; + // } + // //this.selectDictLabel(this.scopeOptions, row.xnxq); + // // console.log(names); + // return names; + // } + // return ""; + // }, themeactivityFormat(activityid) { - if (activityid != null) { - var ilength = activityid.split(";").length - 1; - var names = ""; - for (var i = 1; i < ilength; i++) { - // console.log(activityid.split(";")[i]); - // console.log(this.themeactivityOptions); - names = - names + - this.selectMoeDictLabel( - this.themeactivityOptions, - activityid.split(";")[i] - ) + - ";"; - } - //this.selectDictLabel(this.scopeOptions, row.xnxq); - // console.log(names); - return names; + if (activityid != "" && activityid != null) { + var name = this.selectMoeDictLabel( + this.themeactivityOptions, + activityid + ); + return name; } return ""; }, diff --git a/ruoyi-ui/src/views/benyi/themestudy_tremplan/index.vue b/ruoyi-ui/src/views/benyi/themestudy_tremplan/index.vue index 12229b0f4..e489b3aca 100644 --- a/ruoyi-ui/src/views/benyi/themestudy_tremplan/index.vue +++ b/ruoyi-ui/src/views/benyi/themestudy_tremplan/index.vue @@ -249,6 +249,7 @@ export default { this.queryParams.themeid = ""; //console.log(this.id); listActivity(this.queryParams).then((req) => { + this.title = req.rows[0].name; //console.log(req); if (req.code == "200") { this.activityList = req.rows; diff --git a/ruoyi-ui/src/views/benyi/themetermplan/data.vue b/ruoyi-ui/src/views/benyi/themetermplan/data.vue index 02c561b0d..c67efd06f 100644 --- a/ruoyi-ui/src/views/benyi/themetermplan/data.vue +++ b/ruoyi-ui/src/views/benyi/themetermplan/data.vue @@ -441,7 +441,7 @@ export default { handleDelete(row) { const ids = row.id || this.ids; this.$confirm( - '是否确认删除主题整合学期计划明细编号为"' + ids + '"的数据项?', + '是否确认删除主题整合学期计划明细的数据项?', "警告", { confirmButtonText: "确定",