Преглед на файлове

完成了月统计响应,月统计计划

sunyanqiang преди 3 години
родител
ревизия
43b0c92417

+ 6 - 6
src/api/thought/responses.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-// 查询月教育计划响应列表
+// 查询月教育计划列表
 export function listResponses(query) {
   return request({
     url: '/thought/responses/list',
@@ -9,7 +9,7 @@ export function listResponses(query) {
   })
 }
 
-// 查询月教育计划响应详细
+// 查询月教育计划
 export function getResponses(id) {
   return request({
     url: '/thought/responses/' + id,
@@ -17,7 +17,7 @@ export function getResponses(id) {
   })
 }
 
-// 新增月教育计划响应
+// 新增月教育计划
 export function addResponses(data) {
   return request({
     url: '/thought/responses',
@@ -26,7 +26,7 @@ export function addResponses(data) {
   })
 }
 
-// 修改月教育计划响应
+// 修改月教育计划
 export function updateResponses(data) {
   return request({
     url: '/thought/responses',
@@ -35,7 +35,7 @@ export function updateResponses(data) {
   })
 }
 
-// 删除月教育计划响应
+// 删除月教育计划
 export function delResponses(id) {
   return request({
     url: '/thought/responses/' + id,
@@ -43,7 +43,7 @@ export function delResponses(id) {
   })
 }
 
-// 导出月教育计划响应
+// 导出月教育计划
 export function exportResponses(query) {
   return request({
     url: '/thought/responses/export',

+ 9 - 0
src/api/thought/thoughtPlan.js

@@ -69,3 +69,12 @@ export function JXxiangYing(unitId, planId) {
     params: { unitId, planId }
   })
 }
+// 继续响应响应提交月教育计划列表
+export function JXxiangYingXiangYing(data) {
+  return request({
+    url: '/thought/thoughtPlan/updateJinDu',
+    method: 'post',
+    data: data
+  })
+}
+

+ 32 - 18
src/layout/components/Sidebar/SidebarItem.vue

@@ -1,27 +1,43 @@
 <template>
   <div v-if="!item.hidden">
     <template
-      v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"
+      v-if="
+        hasOneShowingChild(item.children, item) &&
+        (!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
+        !item.alwaysShow
+      "
     >
-      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
+      <app-link
+        v-if="onlyOneChild.meta"
+        :to="resolvePath(onlyOneChild.path, onlyOneChild.query)"
+      >
         <el-menu-item
           :index="resolvePath(onlyOneChild.path)"
-          :class="{'submenu-title-noDropdown':!isNest}"
+          :class="{ 'submenu-title-noDropdown': !isNest }"
         >
           <item
-            :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)"
+            :icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
             :title="onlyOneChild.meta.title"
           />
         </el-menu-item>
       </app-link>
     </template>
 
-    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
+    <el-submenu
+      v-else
+      ref="subMenu"
+      :index="resolvePath(item.path)"
+      popper-append-to-body
+    >
       <template slot="title">
-        <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
+        <item
+          v-if="item.meta"
+          :icon="item.meta && item.meta.icon"
+          :title="item.meta.title"
+        />
       </template>
       <sidebar-item
-        v-for="child in item.children" 
+        v-for="child in item.children"
         :key="child.path"
         :is-nest="true"
         :item="child"
@@ -48,30 +64,28 @@ export default {
     // route object
     item: {
       type: Object,
-      required: true
+      required: true,
     },
     isNest: {
       type: Boolean,
-      default: false
+      default: false,
     },
     basePath: {
       type: String,
-      default: ""
-    }
+      default: "",
+    },
   },
   data() {
     this.onlyOneChild = null;
     return {};
   },
-  mounted() {
-    
-  },
+  mounted() {},
   methods: {
     hasOneShowingChild(children = [], parent) {
       if (!children) {
         children = [];
       }
-      const showingChildren = children.filter(item => {
+      const showingChildren = children.filter((item) => {
         if (item.hidden) {
           return false;
         } else {
@@ -96,7 +110,7 @@ export default {
     },
     resolvePath(routePath, routeQuery) {
       // console.log(this.$route.path.lastIndexOf('/'))
-    //  let name=this.$route.path.slice(this.$route.path.lastIndexOf('/')+1,this.$route.path.length);
+      //  let name=this.$route.path.slice(this.$route.path.lastIndexOf('/')+1,this.$route.path.length);
       // console.log(routePath)
       if (isExternal(routePath)) {
         return routePath;
@@ -109,7 +123,7 @@ export default {
         return { path: path.resolve(this.basePath, routePath), query: query };
       }
       return path.resolve(this.basePath, routePath);
-    }
-  }
+    },
+  },
 };
 </script>

+ 1 - 1
src/views/militaryvehicleManagement/thebusApply/index.vue

@@ -938,7 +938,7 @@ export default {
           { required: true, message: "请输入不通过原因", trigger: "blur" },
         ],
         teShuYuanYing: [
-          { required: true, message: "请输特殊审批原因", trigger: "blur" },
+          { required: true, message: "请输特殊审批原因", trigger: "blur" },
         ],
       },
       // 用车审批状态

+ 313 - 102
src/views/thought/responses/index.vue

@@ -113,18 +113,6 @@
       </el-form-item>
     </el-form>-->
     <div class="box-lfet">
-      <div class="data">
-        <p>单位</p>
-        <div class="a1"></div>
-        <el-date-picker
-          v-model="tiem"
-          type="date"
-          :editable="false"
-          placeholder="选择日期"
-          value-format="yyyy-MM-dd"
-          @change="shiJian"
-        ></el-date-picker>
-      </div>
       <div class="dadui">
         <img src="../../../images/星星.png" alt />
         大队
@@ -143,7 +131,7 @@
       </div>
     </div>
     <div class="box-right">
-      <el-row :gutter="10" class="mb8">
+      <!-- <el-row :gutter="10" class="mb8">
         <el-col :span="1.5">
           <el-button
             type="primary"
@@ -191,16 +179,13 @@
             >导出</el-button
           >
         </el-col>
-        <!-- <right-toolbar
-          :showSearch.sync="showSearch"
-          @queryTable="getList"
-        ></right-toolbar> -->
-      </el-row>
+      </el-row> -->
 
       <el-table
         v-loading="loading"
         :header-cell-style="{ background: '#003C69', color: 'white' }"
         :data="thoughtPlanList"
+        max-width="10"
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" width="55" align="center" />
@@ -216,7 +201,7 @@
           label="计划开始时间"
           align="center"
           prop="planStartTime"
-          width="180"
+          width="120"
         >
           <template slot-scope="scope">
             <span>{{ parseTime(scope.row.planStartTime, "{y}-{m}-{d}") }}</span>
@@ -226,18 +211,12 @@
           label="计划结束时间"
           align="center"
           prop="planEndTime"
-          width="180"
+          width="120"
         >
           <template slot-scope="scope">
             <span>{{ parseTime(scope.row.planEndTime, "{y}-{m}-{d}") }}</span>
           </template>
         </el-table-column>
-
-        <!-- <el-table-column label="文件路径" align="center" prop="filePath" />
-      <el-table-column label="文件名称" align="center" prop="fileName" />
-      <el-table-column label="创建人" align="center" prop="createName" />
-      <el-table-column label="创建人id" align="center" prop="createId" />
-        <el-table-column label="备注" align="center" prop="remark" />-->
         <el-table-column label="计划个数" align="center" prop="planNumber" />
         <el-table-column
           label="需响应计划数"
@@ -249,41 +228,68 @@
           align="center"
           prop="responseNumber"
         />
-        <!-- <el-table-column label="单位id" align="center" prop="unitId" /> -->
-        <!-- <el-table-column label="计划状态(0进行中,1已完成,2已审批,3已驳回)" align="center" prop="state" /> -->
-        <el-table-column label="计划状态" align="center" prop="state" />
+        <el-table-column label="计划状态" align="center" prop="state">
+          <template slot-scope="scope">
+            <span v-if="scope.row.state == '0'" style="color: #00eaff"
+              >未响应</span
+            >
+            <span v-if="scope.row.state == '1'" style="color: #13ce66"
+              >已完成</span
+            >
+            <span v-if="scope.row.state == '2'" style="color: #ffba00"
+              >已审批</span
+            >
+            <span
+              v-if="scope.row.state == '3'"
+              style="color: #ff4949"
+              :title="scope.row.reasons"
+              >已驳回</span
+            >
+            <span v-if="scope.row.state == '4'" style="color: #00eaff"
+              >进行中</span
+            >
+          </template>
+        </el-table-column>
         <el-table-column
           label="创建时间"
           align="center"
           prop="createTime"
-          width="180"
+          width="120"
         >
           <template slot-scope="scope">
             <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
           </template>
         </el-table-column>
         <el-table-column
+          fixed="right"
+          width="200"
           label="操作"
           align="center"
           class-name="small-padding fixed-width"
         >
           <template slot-scope="scope">
             <el-button
-              size="mini"
+              v-if="scope.row.state == '1'"
+              size="btc"
               type="text"
-              icon="el-icon-edit"
-              @click="handleUpdate(scope.row)"
+              @click="handleUpdate1(scope.row)"
               v-hasPermi="['thought:thoughtPlan:edit']"
-              >修改</el-button
+              >审批</el-button
             >
             <el-button
-              size="mini"
+              size="btc"
+              type="text"
+              @click="handleUpdate(scope.row)"
+              v-hasPermi="['thought:thoughtPlan:edit']"
+              >查看</el-button
+            >
+            <!-- <el-button
+              size="btc"
               type="text"
-              icon="el-icon-delete"
               @click="handleDelete(scope.row)"
               v-hasPermi="['thought:thoughtPlan:remove']"
               >删除</el-button
-            >
+            > -->
           </template>
         </el-table-column>
       </el-table>
@@ -304,7 +310,7 @@
       width="1200px"
       append-to-body
     >
-      <el-form
+      <!-- <el-form
         ref="form"
         :model="form"
         :rules="rules"
@@ -373,24 +379,182 @@
         <el-form-item>
           <FileUpload v-model="form.fileName" />
         </el-form-item>
-      </el-form>
+      </el-form> -->
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 审批月教育计划响应对话框 -->
+    <el-dialog
+      title="审批月教育计划"
+      :visible.sync="open2"
+      width="1064px"
+      append-to-body
+    >
+      <el-form
+        ref="form2"
+        :model="form"
+        :rules="rules2"
+        :inline="true"
+        label-width="100px"
+      >
+        <div class="jiben">文档信息</div>
+        <el-form-item label="计划名称" prop="planName">
+          <el-input v-model="form.planName" placeholder="请输入计划名称" />
+        </el-form-item>
+        <el-form-item label="计划开始时间" prop="planStartTime">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form.planStartTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择计划开始时间"
+          ></el-date-picker>
+        </el-form-item>
+        <el-form-item label="计划结束时间" prop="planEndTime">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form.planEndTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择计划结束时间"
+          ></el-date-picker>
+        </el-form-item>
+        <div class="jiben">计划简介</div>
+        <el-form-item label="" prop="planIntroduction">
+          <el-input
+            type="textarea"
+            v-model="form.planIntroduction"
+            placeholder="请输入计划简介"
+          />
+        </el-form-item>
+        <div class="jiben">计划条数</div>
+        <div class="jiHua">
+          <el-form v-for="(item, e) in checkShop" :key="e">
+            <el-form-item prop="remark">
+              <el-input
+                type="textarea"
+                v-model="item.planContent"
+                placeholder="请输入计划详情"
+              />
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="jiben" v-if="planResponsefus.length != 0">文件</div>
+        <el-form v-for="(item, i) in planResponsefus" :key="i">
+          <el-form-item prop="file">
+            <el-input
+              label="附件名称"
+              v-model="item.fileName"
+              style="width: 260px"
+            />
+            <a
+              :href="item.filePath"
+              download
+              title="下载"
+              style="color: white; margin-left: -58px"
+              class="downloadfile"
+              >下载附件</a
+            >
+          </el-form-item>
+        </el-form>
+        <div class="jiben">审批驳回原因</div>
+        <el-form-item prop="reasons">
+          <el-input v-model="form.reasons" type="textarea" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm1">审批</el-button>
+        <el-button @click="submitFormBoHui" size="btn">驳回</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 查看月教育计划响应对话框 -->
+    <el-dialog
+      title="查看月教育计划"
+      :visible.sync="open3"
+      width="1064px"
+      append-to-body
+    >
+      <el-form
+        ref="form3"
+        :model="form"
+        :rules="rules3"
+        :inline="true"
+        label-width="100px"
+      >
+        <div class="jiben">文档信息</div>
+        <el-form-item label="计划名称" prop="planName">
+          <el-input v-model="form.planName" placeholder="请输入计划名称" />
+        </el-form-item>
+        <el-form-item label="计划开始时间" prop="planStartTime">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form.planStartTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择计划开始时间"
+          ></el-date-picker>
+        </el-form-item>
+        <el-form-item label="计划结束时间" prop="planEndTime">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form.planEndTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择计划结束时间"
+          ></el-date-picker>
+        </el-form-item>
+        <div class="jiben">计划简介</div>
+        <el-form-item label="" prop="planIntroduction">
+          <el-input
+            type="textarea"
+            v-model="form.planIntroduction"
+            placeholder="请输入计划简介"
+          />
+        </el-form-item>
+        <div class="jiben">计划条数</div>
+        <div class="jiHua">
+          <el-form v-for="(item, e) in checkShop" :key="e">
+            <el-form-item prop="remark">
+              <el-input
+                type="textarea"
+                v-model="item.planContent"
+                placeholder="请输入计划详情"
+              />
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="jiben" v-if="planResponsefus.length != 0">文件</div>
+        <el-form v-for="(item, i) in planResponsefus" :key="i">
+          <el-form-item prop="file">
+            <el-input
+              label="附件名称"
+              v-model="item.fileName"
+              style="width: 260px"
+            />
+            <a
+              :href="item.filePath"
+              download
+              title="下载"
+              style="color: white; margin-left: -58px"
+              class="downloadfile"
+              >下载附件</a
+            >
+          </el-form-item>
+        </el-form>
+      </el-form>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-// import {
-//   listThoughtPlan,
-//   getThoughtPlan,
-//   delThoughtPlan,
-//   addThoughtPlan,
-//   updateThoughtPlan,
-//   exportThoughtPlan,
-// } from "@/api/thought/thoughtPlan";
 import {
   listResponses,
   getResponses,
@@ -399,7 +563,7 @@ import {
   updateResponses,
   exportResponses,
 } from "@/api/thought/responses";
-import { getAll, getWeiShu } from "@/api/grassrootsregistration/bdglmeeting";
+import { getWeiShu } from "@/api/grassrootsregistration/bdglmeeting";
 
 export default {
   name: "ThoughtPlan",
@@ -448,7 +612,7 @@ export default {
       // 表单校验
       rules: {},
       // 左侧树形
-      deptOptions: "",
+      deptOptions: [],
       //左侧时间选择
       pickerOptions: {
         disabledDate(time) {
@@ -460,8 +624,27 @@ export default {
         children: "children",
         label: "label",
       },
-      // 搜索时间的保存
-      timeDate: "",
+      //添加计划条数表格为空
+      checkShop: [
+        {
+          planContent: null,
+          responseStatus: null,
+        },
+      ],
+      radio: "",
+      // 查看弹出层的显示与隐藏
+      open3: false,
+      rules3: {},
+      files: [],
+      // 下载文件
+      planResponsefus: [],
+      // 审批弹出层的显示与隐藏
+      open2: false,
+      rules2: {
+        reasons: [
+          { required: true, message: "请输入驳回原因", trigger: "blur" },
+        ],
+      },
     };
   },
   created() {
@@ -469,17 +652,63 @@ export default {
     this.treeselect();
   },
   methods: {
+    // 审批确定提交操作
+    submitForm1() {
+      if (this.form.id != null) {
+        this.form.state = "2";
+        // console.log(this.form);
+        updateResponses(this.form).then((response) => {
+          this.$modal.msgSuccess("审批成功");
+          this.open2 = false;
+          this.getList();
+        });
+      }
+    },
+    // 驳回提交操作
+    submitFormBoHui() {
+      this.$refs["form2"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            this.form.state = "3";
+            // console.log(this.form);
+            updateResponses(this.form).then((response) => {
+              this.$modal.msgSuccess("审批成功");
+              this.open2 = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    // 审批按钮操作
+    handleUpdate1(row) {
+      this.reset();
+      const id = row.id || this.ids;
+      getResponses(id).then((response) => {
+        this.form = response.data;
+        this.checkShop = response.data.responseContents;
+        response.data.planResponsefus.forEach((element) => {
+          element.name = element.fileName;
+          element.url = element.filePath;
+        });
+        // 附件下载的路径拼接
+        if (response.data.planResponsefus.length != 0) {
+          this.planResponsefus = response.data.planResponsefus;
+        }
+        this.planResponsefus.forEach((item) => {
+          item.filePath = process.env.VUE_APP_BASE_API + item.filePath;
+        });
+        this.open2 = true;
+      });
+    },
+
     // 增加对话框
     addForms() {
       this.checkShop.push({
-        peopleName: null,
-        foremanName: null,
-        sentryName: null,
-        examineDate: null,
-        dialogue: null,
+        planContent: null,
+        responseStatus: null,
       });
     },
-
     // 删除对话框
     delForms(i) {
       this.checkShop.splice(i, 1);
@@ -542,14 +771,26 @@ export default {
       this.open = true;
       this.title = "添加月教育计划";
     },
-    /** 修改按钮操作 */
+    /** 查看按钮操作(修改) */
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids;
       getResponses(id).then((response) => {
         this.form = response.data;
-        this.open = true;
-        this.title = "修改月教育计划";
+        this.checkShop = response.data.responseContents;
+        response.data.planResponsefus.forEach((element) => {
+          element.name = element.fileName;
+          element.url = element.filePath;
+        });
+        // 附件下载的路径拼接
+        if (response.data.planResponsefus.length != 0) {
+          this.planResponsefus = response.data.planResponsefus;
+        }
+        this.planResponsefus.forEach((item) => {
+          item.filePath = process.env.VUE_APP_BASE_API + item.filePath;
+        });
+        this.open3 = true;
+        // this.title = "修改月教育计划";
       });
     },
     /** 提交按钮 */
@@ -576,7 +817,7 @@ export default {
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$modal
-        .confirm('是否确认删除月教育计划编号为"' + ids + '"的数据项?')
+        .confirm("是否确认删除月教育计划的数据项?")
         .then(function () {
           return delResponses(ids);
         })
@@ -608,8 +849,6 @@ export default {
         this.registrationData = res;
         this.cg = res.cg;
         this.sb = res.sb;
-        // this.yishenpi = res.yiShenPi;
-        // this.weishenpi = res.weiShenPi;
         this.tiems = res.time;
       });
     },
@@ -664,7 +903,7 @@ export default {
 /* 输入框 */
 ::v-deep .el-dialog .el-input__inner {
   background-color: #004d86 !important;
-  width: 216px;
+  width: 176px;
   color: white;
   margin-right: 20px;
   border: 1px solid white !important;
@@ -701,13 +940,13 @@ export default {
 }
 ::v-deep .el-form-item__content .el-textarea .el-textarea__inner {
   /* width: 1000px; */
-  width: 892px;
-  height: 80px !important;
+  width: 912px;
+  min-height: 80px !important;
 }
 ::v-deep .el-dialog__body {
-  padding-left: 27px !important;
+  padding-left: 76px !important;
   padding-right: 0px !important;
-  padding-bottom: 0px !important;
+  padding-bottom: 20px !important;
 }
 /* 富文本内容 */
 /* ::v-deep .editor{
@@ -762,7 +1001,7 @@ export default {
 }
 
 ::v-deep .el-input__inner {
-  height: 36px !important;
+  /* height: 36px !important; */
   color: white;
   background-color: #00365f !important;
 }
@@ -919,7 +1158,7 @@ export default {
   background-color: #004d86 !important;
 }
 ::v-deep .el-input__suffix {
-  right: 22px;
+  right: 60px;
 }
 ::v-deep .el-tree-node__content {
   height: 32px;
@@ -951,38 +1190,10 @@ export default {
   color: white;
   text-indent: 0.5em;
 }
-/* ::v-deep .el-upload__tip {
-  color: white;
-  position: absolute;
-  top: -5px;
-  width: 500px;
-  left: 80px;
-  color: white;
-}
-::v-deep .el-form-item__content {
-  width: 230px;
+::v-deep .el-table__fixed-right {
+  height: 100% !important;
 }
-/* 选取附件 */
-/* ::v-deep .el-upload-list__item {
-  /* width: 400px; */
-/* }
-::v-deep .el-upload-list__item a {
-  color: white;
-  text-indent: 0.5em;
-} */
-/* ::v-deep .el-select-dropdown__item {
-  color: white;
-}  */
-/* 计划条数 */
-div.jiHua
-  div.el-form-item
-  div.el-form-item__content
-  div.el-input--medium
-  .el-textarea__inner {
-  width: 600px !important;
-}
-.el-radio {
-  color: #fff;
-  top: -22px;
+::v-deep .el-dialog__footer {
+  margin-right: 54px;
 }
 </style>

+ 252 - 118
src/views/thought/thoughtPlan/index.vue

@@ -104,18 +104,6 @@
       </el-form-item>
     </el-form> -->
     <div class="box-lfet">
-      <div class="data">
-        <p>单位</p>
-        <div class="a1"></div>
-        <el-date-picker
-          v-model="tiem"
-          type="date"
-          :editable="false"
-          placeholder="选择日期"
-          value-format="yyyy-MM-dd"
-          @change="shiJian"
-        ></el-date-picker>
-      </div>
       <div class="dadui">
         <img src="../../../images/星星.png" alt />
         大队
@@ -231,6 +219,7 @@
           align="center"
           prop="responseNumber"
         />
+
         <el-table-column
           label="开始时间"
           align="center"
@@ -279,11 +268,19 @@
         >
           <template slot-scope="scope">
             <el-button
-              v-if="scope.row.state == '4'"
+              v-if="scope.row.state == '3'"
               size="btu"
               type="text"
               @click="handleUpdate2(scope.row)"
               v-hasPermi="['thought:responses:edit']"
+              >整改</el-button
+            >
+            <el-button
+              v-if="scope.row.state == '4'"
+              size="btj"
+              type="text"
+              @click="handleUpdate2(scope.row)"
+              v-hasPermi="['thought:responses:edit']"
               >继续响应</el-button
             >
             <el-button
@@ -333,7 +330,7 @@
     <el-dialog
       :title="title"
       :visible.sync="open"
-      width="1200px"
+      width="1064px"
       append-to-body
     >
       <el-form
@@ -367,21 +364,24 @@
             placeholder="选择计划结束时间"
           ></el-date-picker>
         </el-form-item>
-        <el-form-item label="计划简介" prop="planIntroduction">
+        <div class="jiben">计划简介</div>
+        <el-form-item label="" prop="planIntroduction">
           <el-input
             type="textarea"
             v-model="form.planIntroduction"
             placeholder="请输入计划简介"
+            autosize
           />
         </el-form-item>
         <div class="jiben">计划条数</div>
         <div class="jiHua">
           <el-form v-for="(item, e) in checkShop" :key="e">
-            <el-form-item prop="remark">
+            <el-form-item prop="remarks">
               <el-input
                 type="textarea"
                 v-model="item.planContent"
                 placeholder="请输入计划详情"
+                autosize
               />
               <el-button
                 type="primary"
@@ -403,18 +403,6 @@
         <div class="jiben">文件</div>
         <el-form-item>
           <FileUpload v-model="planResponsefus" />
-          <!-- <el-upload
-            class="upload-demo"
-            action="/responses"
-            multiple
-            :limit="3"
-            :on-preview="handlePreview"
-          >
-            <el-button size="small" type="primary">上传文件</el-button>
-            <div slot="tip" class="el-upload__tip">
-              只能上传jpg/png文件,且不超过500kb
-            </div>
-          </el-upload> -->
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -427,7 +415,7 @@
     <el-dialog
       title="响应月教育计划"
       :visible.sync="open1"
-      width="1200px"
+      width="1064px"
       append-to-body
     >
       <el-form
@@ -461,11 +449,13 @@
             placeholder="选择计划结束时间"
           ></el-date-picker>
         </el-form-item>
-        <el-form-item label="计划简介" prop="planIntroduction">
+        <div class="jiben">计划简介</div>
+        <el-form-item label="" prop="planIntroduction">
           <el-input
             type="textarea"
             v-model="form.planIntroduction"
             placeholder="请输入计划简介"
+            autosize
           />
         </el-form-item>
         <div class="jiben">计划条数</div>
@@ -476,40 +466,15 @@
                 type="textarea"
                 v-model="item.planContent"
                 placeholder="请输入计划详情"
+                autosize
               />
               <el-radio v-model="item.responseStatus" label="1">响应</el-radio>
-              <!-- <el-button
-                type="primary"
-                icon="el-icon-plus"
-                size="mini"
-                @click="addForms"
-                v-if="e == checkShop.length - 1"
-              ></el-button>
-              <el-button
-                type="primary"
-                icon="el-icon-delete"
-                size="mini"
-                v-if="e > 0"
-                @click="delForms(e)"
-              ></el-button> -->
             </el-form-item>
           </el-form>
         </div>
         <div class="jiben">文件</div>
         <el-form-item>
           <FileUpload v-model="planResponsefus" />
-          <!-- <el-upload
-            class="upload-demo"
-            action="/responses"
-            multiple
-            :limit="3"
-            :on-preview="handlePreview"
-          >
-            <el-button size="small" type="primary">上传文件</el-button>
-            <div slot="tip" class="el-upload__tip">
-              只能上传jpg/png文件,且不超过500kb
-            </div>
-          </el-upload> -->
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -521,9 +486,9 @@
 
     <!-- 继续响应月教育计划响应对话框 -->
     <el-dialog
-      title="响应月教育计划"
+      title="继续响应月教育计划"
       :visible.sync="open2"
-      width="1200px"
+      width="1064px"
       append-to-body
     >
       <el-form
@@ -557,11 +522,13 @@
             placeholder="选择计划结束时间"
           ></el-date-picker>
         </el-form-item>
-        <el-form-item label="计划简介" prop="planIntroduction">
+        <div class="jiben">计划简介</div>
+        <el-form-item prop="planIntroduction">
           <el-input
             type="textarea"
             v-model="form.planIntroduction"
             placeholder="请输入计划简介"
+            autosize
           />
         </el-form-item>
         <div class="jiben">计划条数</div>
@@ -572,48 +539,108 @@
                 type="textarea"
                 v-model="item.planContent"
                 placeholder="请输入计划详情"
+                autosize
               />
               <el-radio v-model="item.responseStatus" label="1">响应</el-radio>
-              <!-- <el-button
-                type="primary"
-                icon="el-icon-plus"
-                size="mini"
-                @click="addForms"
-                v-if="e == checkShop.length - 1"
-              ></el-button>
-              <el-button
-                type="primary"
-                icon="el-icon-delete"
-                size="mini"
-                v-if="e > 0"
-                @click="delForms(e)"
-              ></el-button> -->
             </el-form-item>
           </el-form>
         </div>
         <div class="jiben">文件</div>
         <el-form-item>
           <FileUpload v-model="planResponsefus" />
-          <!-- <el-upload
-            class="upload-demo"
-            action="/responses"
-            multiple
-            :limit="3"
-            :on-preview="handlePreview"
-          >
-            <el-button size="small" type="primary">上传文件</el-button>
-            <div slot="tip" class="el-upload__tip">
-              只能上传jpg/png文件,且不超过500kb
-            </div>
-          </el-upload> -->
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="baocun1">保存进度</el-button>
-        <el-button type="primary" @click="submitForm1">响应</el-button>
+        <el-button type="primary" @click="submitForm2">响应</el-button>
         <el-button @click="cancel" size="btn">取 消</el-button>
       </div>
     </el-dialog>
+
+    <!-- 查看月教育计划响应对话框 -->
+    <el-dialog
+      title="查看月教育计划"
+      :visible.sync="open3"
+      width="1064px"
+      append-to-body
+    >
+      <el-form
+        ref="form3"
+        :model="form"
+        :rules="rules3"
+        :inline="true"
+        label-width="100px"
+      >
+        <div class="jiben">文档信息</div>
+        <el-form-item label="计划名称" prop="planName">
+          <el-input v-model="form.planName" placeholder="请输入计划名称" />
+        </el-form-item>
+        <el-form-item label="计划开始时间" prop="planStartTime">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form.planStartTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择计划开始时间"
+          ></el-date-picker>
+        </el-form-item>
+        <el-form-item label="计划结束时间" prop="planEndTime">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form.planEndTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择计划结束时间"
+          ></el-date-picker>
+        </el-form-item>
+        <div class="jiben">计划简介</div>
+        <el-form-item label="" prop="planIntroduction">
+          <el-input
+            type="textarea"
+            v-model="form.planIntroduction"
+            placeholder="请输入计划简介"
+            autosize
+          />
+        </el-form-item>
+        <div class="jiben">计划条数</div>
+        <div class="jiHua">
+          <el-form v-for="(item, e) in checkShop" :key="e">
+            <el-form-item prop="remark">
+              <el-input
+                type="textarea"
+                v-model="item.planContent"
+                placeholder="请输入计划详情"
+                autosize
+              />
+              <el-radio v-model="item.responseStatus" label="1">响应</el-radio>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="jiben" v-if="planResponsefus.length != 0">文件</div>
+        <el-form v-for="(item, i) in planResponsefus" :key="i">
+          <el-form-item prop="file">
+            <el-input
+              label="附件名称"
+              v-model="item.fileName"
+              style="width: 260px"
+            />
+            <a
+              :href="item.filePath"
+              download
+              title="下载"
+              style="color: white; margin-left: -58px"
+              class="downloadfile"
+              >下载附件</a
+            >
+          </el-form-item>
+        </el-form>
+        <!-- <el-form-item>
+          <FileUpload v-model="planResponsefus" />
+        </el-form-item> -->
+      </el-form>
+    </el-dialog>
   </div>
 </template>
 
@@ -627,8 +654,9 @@ import {
   exportThoughtPlan,
   xiangYing,
   JXxiangYing,
+  JXxiangYingXiangYing,
 } from "@/api/thought/thoughtPlan";
-import { getAll, getWeiShu } from "@/api/grassrootsregistration/bdglmeeting";
+import { getWeiShu } from "@/api/grassrootsregistration/bdglmeeting";
 
 export default {
   name: "Responses",
@@ -639,6 +667,7 @@ export default {
       tiem: null,
       // 导出遮罩层
       exportLoading: false,
+      url: process.env.VUE_APP_BASE_API,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -676,6 +705,7 @@ export default {
       form: {},
       // 表单校验
       rules: {},
+
       //添加计划条数表格为空
       checkShop: [
         {
@@ -686,7 +716,7 @@ export default {
       // 上传文件
       planResponsefus: [],
       // 左侧树形
-      deptOptions: "",
+      deptOptions: [],
       //左侧时间选择
       pickerOptions: {
         disabledDate(time) {
@@ -709,6 +739,10 @@ export default {
       JiXuXY: null,
       open2: false,
       rules2: {},
+      // 查看弹出层的显示与隐藏
+      open3: false,
+      rules3: {},
+      files: [],
     };
   },
   created() {
@@ -721,22 +755,41 @@ export default {
       // console.log(row);
       this.JiXuXY = row.id;
       JXxiangYing(this.unitId, this.JiXuXY).then((res) => {
-        console.log(res);
         this.form = res.data;
+        this.checkShop = res.data.responseContents;
+        this.planResponsefus = res.data.planResponsefus;
         this.open2 = true;
       });
     },
+    // 继续响应响应按钮提交
+    submitForm2() {
+      if (this.checkShop.every((item) => item.responseStatus)) {
+        this.form.common = "1";
+        this.form.planId = this.form.planId;
+        this.form.unitId = this.unitId;
+        this.form.responseContents = this.checkShop;
+        this.form.planResponsefus = this.planResponsefus;
+        this.thoughtPlanResponses = this.form;
+        JXxiangYingXiangYing(this.thoughtPlanResponses).then((response) => {
+          this.$modal.msgSuccess("响应成功");
+          this.open2 = false;
+          this.getList();
+        });
+      }
+    },
     // 保存进度提交按钮
     baocun1() {
       this.form.common = "0";
-      this.form.planId = this.form.id;
+      this.form.planId = this.form.planId;
       this.form.unitId = this.unitId;
       this.form.planResponsefus = this.planResponsefus;
       this.form.responseContents = this.checkShop;
       this.thoughtPlanResponses = this.form;
-      xiangYing(this.thoughtPlanResponses).then((response) => {
+      // console.log(this.thoughtPlanResponses);
+      JXxiangYingXiangYing(this.thoughtPlanResponses).then((response) => {
         this.$modal.msgSuccess("响应成功");
         this.open1 = false;
+        this.open2 = false;
         this.getList();
       });
     },
@@ -810,6 +863,7 @@ export default {
     cancel() {
       this.open = false;
       this.open1 = false;
+      this.open2 = false;
       this.reset();
     },
     // 表单重置
@@ -873,9 +927,15 @@ export default {
           element.name = element.fileName;
           element.url = element.filePath;
         });
-        this.planResponsefus = response.data.planFujians;
-        this.open = true;
-        this.title = "修改月教育计划响应";
+        // 附件下载的路径拼接
+        if (response.data.planFujians.length != 0) {
+          this.planResponsefus = response.data.planFujians;
+        }
+        this.planResponsefus.forEach((item) => {
+          item.filePath = process.env.VUE_APP_BASE_API + item.filePath;
+        });
+        this.open3 = true;
+        // this.title = "修改月教育计划响应";
       });
     },
     /** 提交按钮 */
@@ -891,13 +951,17 @@ export default {
               this.getList();
             });
           } else {
-            this.form.planFus = this.checkShop;
-            this.form.planFujians = this.planResponsefus;
-            addThoughtPlan(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+            if (this.checkShop[0].planContent != null) {
+              this.form.planFus = this.checkShop;
+              this.form.planFujians = this.planResponsefus;
+              addThoughtPlan(this.form).then((response) => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              this.$modal.msgError("计划条数必须有一条");
+            }
           }
         }
       });
@@ -970,7 +1034,7 @@ export default {
 /* 输入框 */
 ::v-deep .el-dialog .el-input__inner {
   background-color: #004d86 !important;
-  width: 216px;
+  width: 176px;
   color: white;
   margin-right: 20px;
   border: 1px solid white !important;
@@ -1002,17 +1066,12 @@ export default {
 }
 /* 会议文本域样式 */
 ::v-deep .el-form-item__content .el-textarea {
-  width: 900px;
-  /* height: 80px !important; */
-}
-::v-deep .el-form-item__content .el-textarea .el-textarea__inner {
-  /* width: 1000px; */
-  height: 80px !important;
+  width: 1000px;
 }
 ::v-deep .el-dialog__body {
-  padding-left: 35px !important;
+  padding-left: 76px !important;
   padding-right: 0px !important;
-  padding-bottom: 0px !important;
+  padding-bottom: 20px !important;
 }
 /* 富文本内容 */
 /* ::v-deep .editor{
@@ -1066,7 +1125,7 @@ export default {
   margin-right: 7px !important;
 }
 ::v-deep .el-input__inner {
-  height: 36px !important;
+  /* height: 36px !important; */
   color: white;
   background-color: #00365f !important;
 }
@@ -1112,13 +1171,14 @@ export default {
   text-indent: 0.5em;
 }
 ::v-deep .el-form-item__content .el-textarea .el-textarea__inner {
-  /* width: 1000px; */
-  width: 892px;
-  height: 80px !important;
+  width: 912px;
+  min-height: 80px !important;
 }
 .el-radio {
+  position: absolute;
   color: #fff;
-  top: -22px;
+  top: 8px;
+  right: 100px;
 }
 
 /* 文字多余部分省略 */
@@ -1245,10 +1305,7 @@ export default {
 .app-container .box-lfet {
   width: 15%;
   min-height: 740px;
-  /* background: #003156; */
-  /* padding: 10px; */
   margin-right: 10px;
-  /* border: 1px solid white; */
 }
 /* 右侧内容盒子 */
 .app-container .box-right {
@@ -1293,4 +1350,81 @@ export default {
 ::v-deep .canjiaren .el-input__inner {
   width: 560px;
 }
+/* 下载按钮 */
+.downloadfile {
+  border: 1px solid white;
+  display: inline-block;
+  width: 100px;
+  height: 36px;
+  border-radius: 5px;
+  line-height: 33px;
+  text-align: center;
+}
+
+/* 添加按钮样式 */
+.el-button--btq.is-active,
+.el-button--btq:active {
+  background: #1890ff;
+  border-color: #1890ff;
+  color: #ffffff;
+}
+
+.el-button--btq:focus,
+.el-button--btq:hover {
+  background: #1890ff;
+  border-color: #1890ff;
+  color: #ffffff;
+}
+
+.el-button--btq {
+  /* border-color: #20B2AA; */
+  color: #ffffff;
+  width: 44px;
+  height: 28px;
+  background-color: #1890ff;
+  border-radius: 4px;
+  font-size: 14px;
+  text-align: center;
+  margin-top: 1px;
+  padding-top: 10px;
+  padding-right: 30px;
+}
+/* 继续整改 btj */
+.el-button--btj.is-active,
+.el-button--btj:active {
+  background: #13ce66;
+  border-color: #13ce66;
+  color: #ffffff;
+}
+
+.el-button--btj:focus,
+.el-button--btj:hover {
+  background: #35ca78;
+  border-color: #35ca78;
+  color: #ffffff;
+}
+
+.el-button--btj {
+  width: 72px !important;
+  border: 1px solid transparent;
+  padding: 3px 8px;
+  font-size: 14px;
+  line-height: 1.5;
+  border-radius: 3px;
+  color: #fff;
+  background-color: #13ce66;
+  height: 29px;
+}
+::v-deep .el-table__fixed-right {
+  height: 100% !important;
+}
+::v-deep .el-dialog__footer {
+  margin-right: 54px;
+}
+::v-deep .el-input__suffix-inner {
+  margin-right: 40px;
+}
+::v-deep .el-textarea__inner {
+  padding: 24px 28px;
+}
 </style>

+ 1 - 0
src/views/workingArrangements/workTask/index.vue

@@ -1119,6 +1119,7 @@ export default {
         this.moreTable.workProgresses.map((item) => {
           item.file = process.env.VUE_APP_BASE_API + item.file;
         });
+        console.log(this.moreTable.file);
         this.moreTable.workProgresses.forEach((item) => {
           this.comstatus +=
             item.schedule / this.moreTable.workProgresses.length;