From 13e47aff7707b3e8fa9ea3366fa78e0f7bc4be0e Mon Sep 17 00:00:00 2001
From: paidaxing444 <12qwaszx>
Date: Tue, 8 Sep 2020 09:40:02 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=91=A8=E8=AE=A1=E5=88=92=E5=92=8C?=
 =?UTF-8?q?=E5=AD=A6=E6=9C=9F=E8=AE=A1=E5=88=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ruoyi-ui/src/views/benyi/planweek/table.vue   | 377 ++++++++++++++++-
 .../src/views/benyi/themetermplan/table.vue   | 394 +++++++++++++++++-
 2 files changed, 759 insertions(+), 12 deletions(-)

diff --git a/ruoyi-ui/src/views/benyi/planweek/table.vue b/ruoyi-ui/src/views/benyi/planweek/table.vue
index 5a55a713c..7e932dd96 100644
--- a/ruoyi-ui/src/views/benyi/planweek/table.vue
+++ b/ruoyi-ui/src/views/benyi/planweek/table.vue
@@ -1,14 +1,379 @@
 <template>
-  <div class="table-container"></div>
+  <div class="table-container" ref="printMe">
+    <h2 class="title">{{title}}</h2>
+    <div class="table">
+      <div class="print no-print">
+        <el-button type="primary" plain size="mini" icon="el-icon-printer" @click="prints"></el-button>
+      </div>
+      <table>
+        <tr class="align-center">
+          <!-- <td v-for="h in headerData" :key="h.title">
+            <b class="table-title">{{h.title}}</b>
+            {{h.name}}
+          </td>-->
+          <td class="w140">
+            <b class="table-title">班级:</b>
+            {{classname}}
+          </td>
+          <td>
+            <b class="table-title">月份:</b>
+            {{month}}
+          </td>
+          <td>
+            <b class="table-title">周次:</b>
+            第{{zc}}周
+          </td>
+          <td colspan="3">
+            <b class="table-title">月主题:</b>
+            {{monththeme}}
+          </td>
+        </tr>
+        <tr v-for="item in weekplanitemList" :key="item.daytime">
+          <td v-if="item.theme" :rowspan="bodyData.weekplanitemList.length" class="align-center">
+            <span>{{item.theme}}</span>
+          </td>
+          <td class="align-center">{{item.daytime}} / 星期{{item.zhou}}</td>
+          <td colspan="4">{{item.jzzc}}</td>
+        </tr>
+        <tr class="align-center table-bg">
+          <td v-for="h in bodyData.title" :key="h.prop">
+            <b>{{h.label}}</b>
+          </td>
+        </tr>
+        <tr v-for="item in bodyData.weekplanitemList" :key="item.daytime">
+          <td v-if="item.theme" :rowspan="bodyData.weekplanitemList.length" class="align-center">
+            <span>{{item.theme}}</span>
+          </td>
+          <td class="align-center">{{item.daytime}} / 星期{{item.zhou}}</td>
+          <td>{{themeactivityFormat(item.activityid)}}</td>
+          <td class="align-center">{{fzxzFormat(item.fzxz)}}</td>
+          <td>{{item.jzzc}}</td>
+          <td>{{item.jzzc}}</td>
+        </tr>
+      </table>
+      <!-- <p
+        class="warning"
+      >注:此周计划表不需要发给家长,只需上报教学主管。制定班级一周教学与活动计划表,请使用班级管理模块中“教学与游戏活动周计划表”,以上报教学主管和作为周计划通知发给家长。</p>-->
+    </div>
+  </div>
 </template>
 
 <script>
+import {
+  listWeekplanitem,
+  getWeekplanitem,
+} from "@/api/benyi/themeweekplanitem";
+
+import { listWeekplan, getWeekplan } from "@/api/benyi/themeweekplan";
+import { listActivityByThemeId } from "@/api/benyi/activity";
+import { listMonthplan } from "@/api/benyi/thememonthplan";
+import { listMonthplanitem } from "@/api/benyi/thememonthplanitem";
+import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme";
+
 export default {
-  name: 'PlayTable',
+  name: "PlayTable",
   data() {
-    return {};
+    return {
+      tableData: [],
+      title: "教学与游戏活动周计划表",
+      zc: "",
+      month: "",
+      classname: "",
+      tbr: "",
+      monththeme: "",
+      bz: "",
+      spyj: "",
+      //根据活动id获取的theme名称
+      themenamebyactivityids: "",
+      //分组性质
+      fzxzOptions: [],
+      //主题活动
+      themeactivityOptions: [],
+      weekplanitemList: [],
+      bodyData: {
+        title: [
+          {
+            label: "活动",
+            prop: "theme",
+          },
+          {
+            label: "周一",
+            prop: "day",
+          },
+          {
+            label: "周二",
+            prop: "name",
+          },
+          {
+            label: "周三",
+            prop: "term",
+          },
+          {
+            label: "周四",
+            prop: "help",
+          },
+          {
+            label: "周五",
+            prop: "help",
+          },
+        ],
+        weekplanitemList: [
+          {
+            theme: "春天的颜色",
+          },
+          // {
+          //   day: "周二",
+          //   name: "活动",
+          //   term: "同质",
+          // },
+          // {
+          //   day: "周三",
+          //   name: "活动",
+          //   term: "同质",
+          // },
+          // {
+          //   day: "周四",
+          //   name: "活动",
+          //   term: "同质",
+          // },
+          // {
+          //   day: "周五",
+          //   name: "活动",
+          //   term: "同质",
+          // },
+        ],
+      },
+      // 查询参数
+      queryParams: {
+        wpid: undefined,
+      },
+      // 查询参数
+      queryParams_MonPlan: {
+        xnxq: undefined,
+        month: undefined,
+        status: "2",
+      },
+      queryParams_MonPlanItem: {
+        mpid: undefined,
+        zc: undefined,
+      },
+    };
+  },
+  created() {
+    const themeweekplanid = this.$route.params && this.$route.params.id;
+    this.getThemeWeekPlan(themeweekplanid);
+    this.getDicts("sys_dm_fzxz").then((response) => {
+      this.fzxzOptions = response.data;
+    });
+  },
+  methods: {
+    //主题翻译
+    async themeFormat(themeids) {
+      var themename = "";
+      var ids = themeids.split(";");
+      var array = [];
+      //console.log(ids);
+      ids.forEach(function (value, key, arr) {
+        //console.log(value); // 结果依次为1,2,3
+        if (value != "") {
+          array.push(parseInt(value));
+        }
+      });
+
+      if (array.length > 0) {
+        await listThemeByIds(array).then((response) => {
+          response.rows.forEach(function (value1, key1, arr1) {
+            themename = themename + value1.name + ";";
+          });
+        });
+        //(themename);
+        this.monththeme = themename;
+      }
+    },
+    // 主题--字典状态字典翻译
+    themeactivityFormat(activityid) {
+      if (activityid != null) {
+        var ilength = activityid.split(";").length - 1;
+        var names = "";
+        for (var i = 1; i < ilength; i++) {
+          names =
+            names +
+            this.selectMoeDictLabel(
+              this.themeactivityOptions,
+              activityid.split(";")[i]
+            ) +
+            ";";
+        }
+        //this.selectDictLabel(this.scopeOptions, row.xnxq);
+        return names;
+      }
+      return "";
+    },
+    // 分组性质类型--字典状态字典翻译
+    fzxzFormat(fzxz) {
+      return this.selectDictLabel(this.fzxzOptions, fzxz);
+    },
+    //主题活动
+    getThemeActivityList(themeid) {
+      listActivityByThemeId(themeid).then((response) => {
+        //console.log(response.rows);
+        this.themeactivityOptions = response.rows;
+      });
+    },
+    //获取周教学计划详情
+    getThemeWeekPlan(themeweekplanid) {
+      getWeekplan(themeweekplanid).then((response) => {
+        //(response);
+        this.queryParams.wpid = response.data.id;
+        this.title = response.data.name;
+        this.zc = response.data.zc;
+        this.month = response.data.month;
+        this.classname = response.classname;
+        this.tbr = response.createusername;
+        this.bz = response.data.remark;
+        this.spyj = response.data.shyj;
+
+        //查找活动id
+        this.queryParams_MonPlan.month = response.data.month;
+        this.queryParams_MonPlan.xnxq = response.data.xnxq;
+        listMonthplan(this.queryParams_MonPlan).then((resMonPlan) => {
+          //console.log(resMonPlan.rows);
+          //获取的月主题
+          var monththemeids = resMonPlan.rows[0].themes;
+
+          this.themeFormat(monththemeids);
+
+          this.queryParams_MonPlanItem.mpid = resMonPlan.rows[0].id;
+          this.queryParams_MonPlanItem.zc = response.data.zc;
+          listMonthplanitem(this.queryParams_MonPlanItem).then(
+            (resMonPlanItem) => {
+              //console.log(resMonPlanItem.rows);
+              var activityids = resMonPlanItem.rows[0].activityid.split(";");
+              var array = [];
+              //console.log(arr);
+              activityids.forEach(function (value, key, arr) {
+                //console.log(value); // 结果依次为1,2,3
+                if (value != "") {
+                  array.push(parseInt(value));
+                }
+              });
+              this.getThemeActivityList(array);
+            }
+          );
+        });
+
+        this.getList();
+      });
+    },
+    /** 查询主题整合周计划明细列表 */
+    async getList() {
+      //console.log(this.queryParams.wpid);
+      await listWeekplanitem(this.queryParams).then((response) => {
+        this.bodyData.weekplanitemList = response.rows;
+
+        //获取所有的活动id
+        var activityIds = "";
+        response.rows.forEach(function (value, key, arr) {
+          if (value.activityid != null) {
+            activityIds = activityIds + value.activityid + ";";
+          }
+        });
+        var array = [];
+        activityIds.split(";").forEach(function (value, key, arr) {
+          if (value != "") {
+            array.push(parseInt(value));
+          }
+        });
+        //获取所有的活动id截止
+        this.getThemeByActivityIds(array);
+      });
+    },
+    //根据活动id获取theme列表
+    async getThemeByActivityIds(array) {
+      if (array.length > 0) {
+        var themename = "";
+        await listThemeByActivityIds(array).then((response) => {
+          response.rows.forEach(function (value, key, arr) {
+            themename = themename + value.name + ";";
+          });
+        });
+        //console.log(themename);
+        this.themenamebyactivityids = themename;
+      }
+
+      this.bodyData.weekplanitemList[0].theme =
+        this.themenamebyactivityids == ""
+          ? "未设置"
+          : this.themenamebyactivityids;
+    },
+    prints() {
+      //console.log(this.$refs.printMe);
+      this.$print(this.$refs.printMe);
+    },
   },
-  created() {},
-  methods: {},
 };
-</script>
\ No newline at end of file
+</script>
+<style lang="scss">
+.table-container {
+  padding: 30px 10%;
+  .w140 {
+    width: 140px;
+  }
+  .w200 {
+    width: 200px;
+  }
+  .title {
+    margin: 0;
+    font-size: 18px;
+    text-align: center;
+    padding: 15px 0;
+  }
+  .align-center {
+    text-align: center;
+  }
+  .table {
+    font-size: 14px;
+    .print {
+      display: flex;
+      justify-content: flex-end;
+      padding-bottom: 10px;
+    }
+    p {
+      margin: 0;
+    }
+    table {
+      width: 100%;
+      border-collapse: collapse;
+    }
+    table td {
+      border: #ccc solid 1px;
+      line-height: 24px;
+      padding: 8px 5px;
+    }
+    .table-title {
+      font-size: 16px;
+    }
+    .table-bg {
+      background: #f8f8f8;
+    }
+  }
+  .warning {
+    padding-top: 20px;
+    font-size: 12px;
+    color: #666;
+  }
+}
+@media print {
+  .table-container {
+    padding: 30px 0;
+  }
+  .print {
+    opacity: 0;
+  }
+}
+/*去除页眉页脚*/
+@page {
+  size: auto; /* auto is the initial value */
+  margin: 3mm; /* this affects the margin in the printer settings */
+}
+</style>
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/benyi/themetermplan/table.vue b/ruoyi-ui/src/views/benyi/themetermplan/table.vue
index 7f81e1513..dd4c8bca6 100644
--- a/ruoyi-ui/src/views/benyi/themetermplan/table.vue
+++ b/ruoyi-ui/src/views/benyi/themetermplan/table.vue
@@ -1,14 +1,396 @@
 <template>
-  <div class="table-container"></div>
+  <div class="table-container" ref="printMe">
+    <h2 class="title">{{title}}</h2>
+    <div class="table">
+      <div class="print no-print">
+        <el-button type="primary" plain size="mini" icon="el-icon-printer" @click="prints"></el-button>
+      </div>
+      <table>
+        <tr class="align-center">
+          <!-- <td v-for="h in headerData" :key="h.title">
+            <b class="table-title">{{h.title}}</b>
+            {{h.name}}
+          </td>-->
+          <td class="w140">
+            <b class="table-title">班级:</b>
+            {{classname}}
+          </td>
+          <td>
+            <b class="table-title">学期:</b>
+            {{month}}
+          </td>
+          <td class="w200">
+            <b class="table-title">制定人:</b>
+            {{tbr}}
+          </td>
+        </tr>
+        <tr class="align-center table-bg">
+          <td v-for="h in bodyData.title" :key="h.prop">
+            <b>{{h.label}}</b>
+          </td>
+        </tr>
+        <tr v-for="item in bodyData.weekplanitemList" :key="item.daytime">
+          <td class="align-center">
+            <span>{{item.month}}</span>
+          </td>
+          <td>{{item.theme}}</td>
+          <td>{{item.info}}</td>
+        </tr>
+        <tr>
+          <td colspan="3">
+            <h2 class="title title2">下学期课程计划(2018年3月-2019年3月)</h2>
+          </td>
+        </tr>
+        <tr class="align-center">
+          <!-- <td v-for="h in headerData" :key="h.title">
+            <b class="table-title">{{h.title}}</b>
+            {{h.name}}
+          </td>-->
+          <td>
+            <b class="table-title">班级:</b>
+            {{classname}}
+          </td>
+          <td>
+            <b class="table-title">学期:</b>
+            {{month}}
+          </td>
+          <td>
+            <b class="table-title">制定人:</b>
+            {{tbr}}
+          </td>
+        </tr>
+        <tr class="align-center table-bg">
+          <td v-for="h in bodyData.title" :key="h.prop">
+            <b>{{h.label}}</b>
+          </td>
+        </tr>
+        <tr v-for="item in bodyData.weekplanitemList" :key="item.daytime">
+          <td class="align-center">
+            <span>{{item.month}}</span>
+          </td>
+          <td>{{item.theme}}</td>
+          <td>{{item.info}}</td>
+        </tr>
+        <tr>
+          <td class="align-center">教学主管审批</td>
+          <td colspan="2">{{bz}}</td>
+        </tr>
+      </table>
+      <!-- <p
+        class="warning"
+      >注:此周计划表不需要发给家长,只需上报教学主管。制定班级一周教学与活动计划表,请使用班级管理模块中“教学与游戏活动周计划表”,以上报教学主管和作为周计划通知发给家长。</p>-->
+    </div>
+  </div>
 </template>
 
 <script>
+import {
+  listWeekplanitem,
+  getWeekplanitem,
+} from "@/api/benyi/themeweekplanitem";
+
+import { listWeekplan, getWeekplan } from "@/api/benyi/themeweekplan";
+import { listActivityByThemeId } from "@/api/benyi/activity";
+import { listMonthplan } from "@/api/benyi/thememonthplan";
+import { listMonthplanitem } from "@/api/benyi/thememonthplanitem";
+import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme";
+
 export default {
-  name: 'TermTable',
+  name: "TermTable",
   data() {
-    return {};
+    return {
+      tableData: [],
+      title: "主题整合课程学期教学计划表",
+      zc: "",
+      month: "",
+      classname: "中二班",
+      tbr: "",
+      monththeme: "",
+      bz: "",
+      spyj: "",
+      //根据活动id获取的theme名称
+      themenamebyactivityids: "",
+      //分组性质
+      fzxzOptions: [],
+      //主题活动
+      themeactivityOptions: [],
+      bodyData: {
+        title: [
+          {
+            label: "月时间",
+            prop: "theme",
+          },
+          {
+            label: "主题名称",
+            prop: "name",
+          },
+          {
+            label: "备注",
+            prop: "help",
+          },
+        ],
+        weekplanitemList: [
+          {
+            month: '1月',
+            theme: "春天的颜色",
+            info: '时代峰峻的斯洛伐克'
+          },
+          // {
+          //   day: "周二",
+          //   name: "活动",
+          //   term: "同质",
+          // },
+          // {
+          //   day: "周三",
+          //   name: "活动",
+          //   term: "同质",
+          // },
+          // {
+          //   day: "周四",
+          //   name: "活动",
+          //   term: "同质",
+          // },
+          // {
+          //   day: "周五",
+          //   name: "活动",
+          //   term: "同质",
+          // },
+        ],
+      },
+      // 查询参数
+      queryParams: {
+        wpid: undefined,
+      },
+      // 查询参数
+      queryParams_MonPlan: {
+        xnxq: undefined,
+        month: undefined,
+        status: "2",
+      },
+      queryParams_MonPlanItem: {
+        mpid: undefined,
+        zc: undefined,
+      },
+    };
+  },
+  created() {
+    const themeweekplanid = this.$route.params && this.$route.params.id;
+    this.getThemeWeekPlan(themeweekplanid);
+    this.getDicts("sys_dm_fzxz").then((response) => {
+      this.fzxzOptions = response.data;
+    });
+  },
+  methods: {
+    //主题翻译
+    async themeFormat(themeids) {
+      var themename = "";
+      var ids = themeids.split(";");
+      var array = [];
+      //console.log(ids);
+      ids.forEach(function (value, key, arr) {
+        //console.log(value); // 结果依次为1,2,3
+        if (value != "") {
+          array.push(parseInt(value));
+        }
+      });
+
+      if (array.length > 0) {
+        await listThemeByIds(array).then((response) => {
+          response.rows.forEach(function (value1, key1, arr1) {
+            themename = themename + value1.name + ";";
+          });
+        });
+        //(themename);
+        this.monththeme = themename;
+      }
+    },
+    // 主题--字典状态字典翻译
+    themeactivityFormat(activityid) {
+      if (activityid != null) {
+        var ilength = activityid.split(";").length - 1;
+        var names = "";
+        for (var i = 1; i < ilength; i++) {
+          names =
+            names +
+            this.selectMoeDictLabel(
+              this.themeactivityOptions,
+              activityid.split(";")[i]
+            ) +
+            ";";
+        }
+        //this.selectDictLabel(this.scopeOptions, row.xnxq);
+        return names;
+      }
+      return "";
+    },
+    // 分组性质类型--字典状态字典翻译
+    fzxzFormat(fzxz) {
+      return this.selectDictLabel(this.fzxzOptions, fzxz);
+    },
+    //主题活动
+    getThemeActivityList(themeid) {
+      listActivityByThemeId(themeid).then((response) => {
+        //console.log(response.rows);
+        this.themeactivityOptions = response.rows;
+      });
+    },
+    //获取周教学计划详情
+    getThemeWeekPlan(themeweekplanid) {
+      getWeekplan(themeweekplanid).then((response) => {
+        //(response);
+        this.queryParams.wpid = response.data.id;
+        this.title = response.data.name;
+        this.zc = response.data.zc;
+        this.month = response.data.month;
+        this.classname = response.classname;
+        this.tbr = response.createusername;
+        this.bz = response.data.remark;
+        this.spyj = response.data.shyj;
+
+        //查找活动id
+        this.queryParams_MonPlan.month = response.data.month;
+        this.queryParams_MonPlan.xnxq = response.data.xnxq;
+        listMonthplan(this.queryParams_MonPlan).then((resMonPlan) => {
+          //console.log(resMonPlan.rows);
+          //获取的月主题
+          var monththemeids = resMonPlan.rows[0].themes;
+
+          this.themeFormat(monththemeids);
+
+          this.queryParams_MonPlanItem.mpid = resMonPlan.rows[0].id;
+          this.queryParams_MonPlanItem.zc = response.data.zc;
+          listMonthplanitem(this.queryParams_MonPlanItem).then(
+            (resMonPlanItem) => {
+              //console.log(resMonPlanItem.rows);
+              var activityids = resMonPlanItem.rows[0].activityid.split(";");
+              var array = [];
+              //console.log(arr);
+              activityids.forEach(function (value, key, arr) {
+                //console.log(value); // 结果依次为1,2,3
+                if (value != "") {
+                  array.push(parseInt(value));
+                }
+              });
+              this.getThemeActivityList(array);
+            }
+          );
+        });
+
+        this.getList();
+      });
+    },
+    /** 查询主题整合周计划明细列表 */
+    async getList() {
+      //console.log(this.queryParams.wpid);
+      await listWeekplanitem(this.queryParams).then((response) => {
+        this.bodyData.weekplanitemList = response.rows;
+
+        //获取所有的活动id
+        var activityIds = "";
+        response.rows.forEach(function (value, key, arr) {
+          if (value.activityid != null) {
+            activityIds = activityIds + value.activityid + ";";
+          }
+        });
+        var array = [];
+        activityIds.split(";").forEach(function (value, key, arr) {
+          if (value != "") {
+            array.push(parseInt(value));
+          }
+        });
+        //获取所有的活动id截止
+        this.getThemeByActivityIds(array);
+      });
+    },
+    //根据活动id获取theme列表
+    async getThemeByActivityIds(array) {
+      if (array.length > 0) {
+        var themename = "";
+        await listThemeByActivityIds(array).then((response) => {
+          response.rows.forEach(function (value, key, arr) {
+            themename = themename + value.name + ";";
+          });
+        });
+        //console.log(themename);
+        this.themenamebyactivityids = themename;
+      }
+
+      this.bodyData.weekplanitemList[0].theme =
+        this.themenamebyactivityids == ""
+          ? "未设置"
+          : this.themenamebyactivityids;
+    },
+    prints() {
+      //console.log(this.$refs.printMe);
+      this.$print(this.$refs.printMe);
+    },
   },
-  created() {},
-  methods: {},
 };
-</script>
\ No newline at end of file
+</script>
+<style lang="scss">
+.table-container {
+  padding: 30px 10%;
+  .w140 {
+    width: 140px;
+  }
+  .w200 {
+    width: 200px;
+  }
+  .title {
+    margin: 0;
+    font-size: 18px;
+    text-align: center;
+    padding: 15px 0;
+  }
+  .title2 {
+    padding: 0;
+  }
+  .align-center {
+    text-align: center;
+  }
+  .table {
+    font-size: 14px;
+    .print {
+      display: flex;
+      justify-content: flex-end;
+      padding-bottom: 10px;
+    }
+    p {
+      margin: 0;
+    }
+    table {
+      width: 100%;
+      border-collapse: collapse;
+    }
+    table td {
+      border: #ccc solid 1px;
+      line-height: 24px;
+      padding: 8px 5px;
+    }
+    .table-title {
+      font-size: 16px;
+    }
+    .table-bg {
+      background: #f8f8f8;
+    }
+  }
+  .warning {
+    padding-top: 20px;
+    font-size: 12px;
+    color: #666;
+  }
+}
+@media print {
+  .table-container {
+    padding: 30px 0;
+  }
+  .print {
+    opacity: 0;
+  }
+}
+/*去除页眉页脚*/
+@page {
+  size: auto; /* auto is the initial value */
+  margin: 3mm; /* this affects the margin in the printer settings */
+}
+</style>
\ No newline at end of file

From 20f1d72420e11afd29bf582c03f586c334d3014c Mon Sep 17 00:00:00 2001
From: paidaxing444 <12qwaszx>
Date: Tue, 8 Sep 2020 10:35:20 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E5=AD=A6=E6=9C=9F=E8=AE=A1=E5=88=92?=
 =?UTF-8?q?=E9=A2=84=E8=A7=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ruoyi-ui/src/router/index.js                  |  15 +
 .../src/views/benyi/themetermplan/index.vue   |  30 +-
 .../src/views/benyi/themetermplan/table.vue   | 277 ++++--------------
 .../controller/ByThemeTermplanController.java |  10 +-
 4 files changed, 97 insertions(+), 235 deletions(-)

diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index de4b9aec6..d340a0e06 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -337,6 +337,21 @@ export const constantRoutes = [{
       }
     }]
   },
+  {
+    path: '/benyi_course/themetermplanprint',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: 'table/:id',
+      component: () =>
+        import('@/views/benyi/themetermplan/table'),
+      name: 'Themetermplan2',
+      meta: {
+        title: '主题整合学期计划(表格)',
+        icon: ''
+      }
+    }]
+  },
   {
     path: '/benyi_course/math',
     component: Layout,
diff --git a/ruoyi-ui/src/views/benyi/themetermplan/index.vue b/ruoyi-ui/src/views/benyi/themetermplan/index.vue
index 01779407a..79baf1d64 100644
--- a/ruoyi-ui/src/views/benyi/themetermplan/index.vue
+++ b/ruoyi-ui/src/views/benyi/themetermplan/index.vue
@@ -70,7 +70,7 @@
     </el-row>
 
     <el-table v-loading="loading" :data="termplanList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" :selectable="isShow"/>
+      <el-table-column type="selection" width="55" align="center" :selectable="isShow" />
       <el-table-column label="班级名称" align="center" prop="classid" :formatter="classFormat" />
       <el-table-column label="计划名称" align="center" prop="name" :show-overflow-tooltip="true">
         <template slot-scope="scope">
@@ -118,6 +118,13 @@
             v-hasPermi="['benyi:themetermplan:edit']"
             v-show="isShow(scope.row)"
           >提交</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleView(scope.row)"
+            v-hasPermi="['benyi:themetermplan:query']"
+          >预览</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -375,15 +382,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 delTermplan(ids);
         })
@@ -414,6 +417,13 @@ export default {
         })
         .catch(function () {});
     },
+    /** 预览按钮操作 */
+    handleView(row) {
+      const id = row.id;
+      this.$router.push({
+        path: "/benyi_course/themetermplanprint/table/"+id,
+      });
+    },
   },
 };
 </script>
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/benyi/themetermplan/table.vue b/ruoyi-ui/src/views/benyi/themetermplan/table.vue
index dd4c8bca6..84da9ddde 100644
--- a/ruoyi-ui/src/views/benyi/themetermplan/table.vue
+++ b/ruoyi-ui/src/views/benyi/themetermplan/table.vue
@@ -17,7 +17,7 @@
           </td>
           <td>
             <b class="table-title">学期:</b>
-            {{month}}
+            {{xnxqFormat(xnxq)}}
           </td>
           <td class="w200">
             <b class="table-title">制定人:</b>
@@ -29,51 +29,16 @@
             <b>{{h.label}}</b>
           </td>
         </tr>
-        <tr v-for="item in bodyData.weekplanitemList" :key="item.daytime">
+        <tr v-for="item in bodyData.termplanitemList" :key="item.id">
           <td class="align-center">
             <span>{{item.month}}</span>
           </td>
-          <td>{{item.theme}}</td>
-          <td>{{item.info}}</td>
-        </tr>
-        <tr>
-          <td colspan="3">
-            <h2 class="title title2">下学期课程计划(2018年3月-2019年3月)</h2>
-          </td>
-        </tr>
-        <tr class="align-center">
-          <!-- <td v-for="h in headerData" :key="h.title">
-            <b class="table-title">{{h.title}}</b>
-            {{h.name}}
-          </td>-->
-          <td>
-            <b class="table-title">班级:</b>
-            {{classname}}
-          </td>
-          <td>
-            <b class="table-title">学期:</b>
-            {{month}}
-          </td>
-          <td>
-            <b class="table-title">制定人:</b>
-            {{tbr}}
-          </td>
-        </tr>
-        <tr class="align-center table-bg">
-          <td v-for="h in bodyData.title" :key="h.prop">
-            <b>{{h.label}}</b>
-          </td>
-        </tr>
-        <tr v-for="item in bodyData.weekplanitemList" :key="item.daytime">
-          <td class="align-center">
-            <span>{{item.month}}</span>
-          </td>
-          <td>{{item.theme}}</td>
-          <td>{{item.info}}</td>
+          <td class="align-center">{{themeFormat(item.themeconent)}}</td>
+          <td>{{item.remark}}</td>
         </tr>
         <tr>
           <td class="align-center">教学主管审批</td>
-          <td colspan="2">{{bz}}</td>
+          <td colspan="2">{{spyj}}</td>
         </tr>
       </table>
       <!-- <p
@@ -84,40 +49,30 @@
 </template>
 
 <script>
+import { listTermplan, getTermplan } from "@/api/benyi/themetermplan";
 import {
-  listWeekplanitem,
-  getWeekplanitem,
-} from "@/api/benyi/themeweekplanitem";
-
-import { listWeekplan, getWeekplan } from "@/api/benyi/themeweekplan";
-import { listActivityByThemeId } from "@/api/benyi/activity";
-import { listMonthplan } from "@/api/benyi/thememonthplan";
-import { listMonthplanitem } from "@/api/benyi/thememonthplanitem";
-import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme";
+  listTermplanitem,
+  getTermplanitem,
+} from "@/api/benyi/themetermplanitem";
+import { listTheme } from "@/api/benyi/theme";
 
 export default {
   name: "TermTable",
   data() {
     return {
-      tableData: [],
-      title: "主题整合课程学期教学计划表",
-      zc: "",
-      month: "",
-      classname: "中二班",
+      //学年学期
+      xnxqOptions: [],
+      //主题
+      themeOptions: [],
+      title: "",
+      xnxq: "",
+      classname: "",
       tbr: "",
-      monththeme: "",
-      bz: "",
       spyj: "",
-      //根据活动id获取的theme名称
-      themenamebyactivityids: "",
-      //分组性质
-      fzxzOptions: [],
-      //主题活动
-      themeactivityOptions: [],
       bodyData: {
         title: [
           {
-            label: "月时间",
+            label: "月份",
             prop: "theme",
           },
           {
@@ -129,197 +84,71 @@ export default {
             prop: "help",
           },
         ],
-        weekplanitemList: [
-          {
-            month: '1月',
-            theme: "春天的颜色",
-            info: '时代峰峻的斯洛伐克'
-          },
-          // {
-          //   day: "周二",
-          //   name: "活动",
-          //   term: "同质",
-          // },
-          // {
-          //   day: "周三",
-          //   name: "活动",
-          //   term: "同质",
-          // },
-          // {
-          //   day: "周四",
-          //   name: "活动",
-          //   term: "同质",
-          // },
-          // {
-          //   day: "周五",
-          //   name: "活动",
-          //   term: "同质",
-          // },
-        ],
+        termplanitemList: [],
       },
       // 查询参数
       queryParams: {
-        wpid: undefined,
-      },
-      // 查询参数
-      queryParams_MonPlan: {
-        xnxq: undefined,
-        month: undefined,
-        status: "2",
-      },
-      queryParams_MonPlanItem: {
-        mpid: undefined,
-        zc: undefined,
+        tpid: undefined,
       },
     };
   },
   created() {
-    const themeweekplanid = this.$route.params && this.$route.params.id;
-    this.getThemeWeekPlan(themeweekplanid);
-    this.getDicts("sys_dm_fzxz").then((response) => {
-      this.fzxzOptions = response.data;
+    const themetermplanid = this.$route.params && this.$route.params.id;
+    this.queryParams.tpid = themetermplanid;
+    this.getThemeTermPlan(themetermplanid);
+    this.getThemeList();
+    this.getDicts("sys_xnxq").then((response) => {
+      this.xnxqOptions = response.data;
     });
   },
   methods: {
-    //主题翻译
-    async themeFormat(themeids) {
-      var themename = "";
-      var ids = themeids.split(";");
-      var array = [];
-      //console.log(ids);
-      ids.forEach(function (value, key, arr) {
-        //console.log(value); // 结果依次为1,2,3
-        if (value != "") {
-          array.push(parseInt(value));
-        }
-      });
-
-      if (array.length > 0) {
-        await listThemeByIds(array).then((response) => {
-          response.rows.forEach(function (value1, key1, arr1) {
-            themename = themename + value1.name + ";";
-          });
-        });
-        //(themename);
-        this.monththeme = themename;
-      }
+    // 学年学期类型--字典状态字典翻译
+    xnxqFormat(xnxq) {
+      return this.selectDictLabel(this.xnxqOptions, xnxq);
     },
     // 主题--字典状态字典翻译
-    themeactivityFormat(activityid) {
-      if (activityid != null) {
-        var ilength = activityid.split(";").length - 1;
+    themeFormat(themeids) {
+      if (themeids != "") {
+        var ilength = themeids.split(";").length - 1;
         var names = "";
         for (var i = 1; i < ilength; i++) {
           names =
             names +
-            this.selectMoeDictLabel(
-              this.themeactivityOptions,
-              activityid.split(";")[i]
-            ) +
-            ";";
+            this.selectMoeDictLabel(this.themeOptions, themeids.split(";")[i]) +
+            " ";
         }
         //this.selectDictLabel(this.scopeOptions, row.xnxq);
         return names;
       }
       return "";
     },
-    // 分组性质类型--字典状态字典翻译
-    fzxzFormat(fzxz) {
-      return this.selectDictLabel(this.fzxzOptions, fzxz);
-    },
-    //主题活动
-    getThemeActivityList(themeid) {
-      listActivityByThemeId(themeid).then((response) => {
+    //主题
+    getThemeList() {
+      listTheme(null).then((response) => {
         //console.log(response.rows);
-        this.themeactivityOptions = response.rows;
+        this.themeOptions = response.rows;
       });
     },
-    //获取周教学计划详情
-    getThemeWeekPlan(themeweekplanid) {
-      getWeekplan(themeweekplanid).then((response) => {
-        //(response);
-        this.queryParams.wpid = response.data.id;
+    //获取教学学期计划
+    getThemeTermPlan(themetermplanid) {
+      getTermplan(themetermplanid).then((response) => {
+        console.log(response.data);
         this.title = response.data.name;
-        this.zc = response.data.zc;
-        this.month = response.data.month;
-        this.classname = response.classname;
         this.tbr = response.createusername;
-        this.bz = response.data.remark;
+        this.classname = response.classname;
+        this.xnxq = response.data.xnxq;
         this.spyj = response.data.shyj;
-
-        //查找活动id
-        this.queryParams_MonPlan.month = response.data.month;
-        this.queryParams_MonPlan.xnxq = response.data.xnxq;
-        listMonthplan(this.queryParams_MonPlan).then((resMonPlan) => {
-          //console.log(resMonPlan.rows);
-          //获取的月主题
-          var monththemeids = resMonPlan.rows[0].themes;
-
-          this.themeFormat(monththemeids);
-
-          this.queryParams_MonPlanItem.mpid = resMonPlan.rows[0].id;
-          this.queryParams_MonPlanItem.zc = response.data.zc;
-          listMonthplanitem(this.queryParams_MonPlanItem).then(
-            (resMonPlanItem) => {
-              //console.log(resMonPlanItem.rows);
-              var activityids = resMonPlanItem.rows[0].activityid.split(";");
-              var array = [];
-              //console.log(arr);
-              activityids.forEach(function (value, key, arr) {
-                //console.log(value); // 结果依次为1,2,3
-                if (value != "") {
-                  array.push(parseInt(value));
-                }
-              });
-              this.getThemeActivityList(array);
-            }
-          );
-        });
-
-        this.getList();
+      });
+      this.getThemeTermItemPlan();
+    },
+    //获取学期月份详细计划
+    getThemeTermItemPlan() {
+      listTermplanitem(this.queryParams).then((response) => {
+        console.log(response.rows);
+        this.bodyData.termplanitemList = response.rows;
       });
     },
-    /** 查询主题整合周计划明细列表 */
-    async getList() {
-      //console.log(this.queryParams.wpid);
-      await listWeekplanitem(this.queryParams).then((response) => {
-        this.bodyData.weekplanitemList = response.rows;
-
-        //获取所有的活动id
-        var activityIds = "";
-        response.rows.forEach(function (value, key, arr) {
-          if (value.activityid != null) {
-            activityIds = activityIds + value.activityid + ";";
-          }
-        });
-        var array = [];
-        activityIds.split(";").forEach(function (value, key, arr) {
-          if (value != "") {
-            array.push(parseInt(value));
-          }
-        });
-        //获取所有的活动id截止
-        this.getThemeByActivityIds(array);
-      });
-    },
-    //根据活动id获取theme列表
-    async getThemeByActivityIds(array) {
-      if (array.length > 0) {
-        var themename = "";
-        await listThemeByActivityIds(array).then((response) => {
-          response.rows.forEach(function (value, key, arr) {
-            themename = themename + value.name + ";";
-          });
-        });
-        //console.log(themename);
-        this.themenamebyactivityids = themename;
-      }
-
-      this.bodyData.weekplanitemList[0].theme =
-        this.themenamebyactivityids == ""
-          ? "未设置"
-          : this.themenamebyactivityids;
-    },
+    //打印
     prints() {
       //console.log(this.$refs.printMe);
       this.$print(this.$refs.printMe);
diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java
index 2858b37bd..cca3f4e93 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java
@@ -11,6 +11,7 @@ import com.ruoyi.project.benyi.domain.ByThemeTermplanitem;
 import com.ruoyi.project.benyi.service.IByThemeTermplanitemService;
 import com.ruoyi.project.common.SchoolCommon;
 import com.ruoyi.project.system.service.IByClassService;
+import com.ruoyi.project.system.service.ISysUserService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -47,6 +48,8 @@ public class ByThemeTermplanController extends BaseController {
     private IByClassService byClassService;
     @Autowired
     private IByThemeTermplanitemService byThemeTermplanitemService;
+    @Autowired
+    private ISysUserService userService;
 
     /**
      * 查询主题整合学期计划列表
@@ -84,7 +87,12 @@ public class ByThemeTermplanController extends BaseController {
     @PreAuthorize("@ss.hasPermi('benyi:themetermplan:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") String id) {
-        return AjaxResult.success(byThemeTermplanService.selectByThemeTermplanById(id));
+        AjaxResult ajax = AjaxResult.success();
+        ByThemeTermplan byThemeTermplan = byThemeTermplanService.selectByThemeTermplanById(id);
+        ajax.put(AjaxResult.DATA_TAG, byThemeTermplan);
+        ajax.put("classname", byClassService.selectByClassById(byThemeTermplan.getClassid()).getBjmc());
+        ajax.put("createusername", userService.selectUserById(byThemeTermplan.getCreateuserid()).getNickName());
+        return ajax;
     }
 
     /**

From 97ff7191a75edbbf660f1e0acf8e585b225afa2f Mon Sep 17 00:00:00 2001
From: paidaxing444 <12qwaszx>
Date: Tue, 8 Sep 2020 10:43:04 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=A2=84=E8=A7=88?=
 =?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../views/benyi/thememonthplanapproval/index.vue | 14 ++++++++++++++
 .../views/benyi/themetermplanapproval/index.vue  | 14 ++++++++++++++
 .../views/benyi/themeweekplanapproval/index.vue  | 16 +++++++++++++++-
 3 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/ruoyi-ui/src/views/benyi/thememonthplanapproval/index.vue b/ruoyi-ui/src/views/benyi/thememonthplanapproval/index.vue
index 50ca88c7a..954a22f7e 100644
--- a/ruoyi-ui/src/views/benyi/thememonthplanapproval/index.vue
+++ b/ruoyi-ui/src/views/benyi/thememonthplanapproval/index.vue
@@ -105,6 +105,13 @@
             v-hasPermi="['benyi:thememonthplan:edit']"
             v-show="isShow(scope.row)"
           >审批</el-button>
+                    <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleView(scope.row)"
+            v-hasPermi="['benyi:themetermplan:query']"
+          >预览</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -390,6 +397,13 @@ export default {
         }
       });
     },
+      /** 预览按钮操作 */
+    handleView(row) {
+      const id = row.id;
+      this.$router.push({
+        path: "/benyi_course/thememonthplanprint/table/"+id,
+      });
+    },
   },
 };
 </script>
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/benyi/themetermplanapproval/index.vue b/ruoyi-ui/src/views/benyi/themetermplanapproval/index.vue
index b0155446a..2b90343e5 100644
--- a/ruoyi-ui/src/views/benyi/themetermplanapproval/index.vue
+++ b/ruoyi-ui/src/views/benyi/themetermplanapproval/index.vue
@@ -83,6 +83,13 @@
             v-hasPermi="['benyi:themetermplan:edit']"
             v-show="isShow(scope.row)"
           >审批</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleView(scope.row)"
+            v-hasPermi="['benyi:themetermplan:query']"
+          >预览</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -327,6 +334,13 @@ export default {
         }
       });
     },
+    /** 预览按钮操作 */
+    handleView(row) {
+      const id = row.id;
+      this.$router.push({
+        path: "/benyi_course/themetermplanprint/table/" + id,
+      });
+    },
   },
 };
 </script>
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/benyi/themeweekplanapproval/index.vue b/ruoyi-ui/src/views/benyi/themeweekplanapproval/index.vue
index 838344614..a741e78fe 100644
--- a/ruoyi-ui/src/views/benyi/themeweekplanapproval/index.vue
+++ b/ruoyi-ui/src/views/benyi/themeweekplanapproval/index.vue
@@ -99,6 +99,13 @@
             v-hasPermi="['benyi:themeweekplan:edit']"
             v-show="isShow(scope.row)"
           >审批</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleView(scope.row)"
+            v-hasPermi="['benyi:themeweekplan:query']"
+          >预览</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -142,7 +149,7 @@
         <el-form-item label="备注" prop="remar">
           <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" :disabled="true" />
         </el-form-item>
-          <el-form-item label="审批意见" prop="status">
+        <el-form-item label="审批意见" prop="status">
           <el-radio-group v-model="form.status">
             <el-radio label="0">退回</el-radio>
             <el-radio label="2">通过</el-radio>
@@ -343,6 +350,13 @@ export default {
         }
       });
     },
+    /** 预览按钮操作 */
+    handleView(row) {
+      const id = row.id;
+      this.$router.push({
+        path: "/benyi_course/themeweekplanprint/table/" + id,
+      });
+    },
   },
 };
 </script>
\ No newline at end of file