Pārlūkot izejas kodu

- 装置信息 修改功能 bugfix
- 装置审计记录 修改功能 bugfix
- 装置审计记录详情页 样式修改
- 装置审计记录详情页 左侧章节 基础功能代码修改
- 装置审计记录详情页 右侧问卷 基础功能代码修改

wangggziwen 10 mēneši atpakaļ
vecāks
revīzija
b06ac3f07e

+ 6 - 1
rc-admin/src/main/java/com/ruoyi/web/controller/rc/TAuditController.java

@@ -89,7 +89,12 @@ public class TAuditController extends BaseController
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
-        return success(tAuditService.selectTAuditById(id));
+        TAudit tAudit = tAuditService.selectTAuditById(id);
+        String year = tAudit.getYear();
+        if (year.length() > 4) {
+            tAudit.setYear(year.substring(0, year.indexOf("-")));
+        }
+        return success(tAudit);
     }
 
     /**

+ 6 - 2
rc-admin/src/main/java/com/ruoyi/web/controller/rc/TDeptInfoController.java

@@ -4,7 +4,6 @@ import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
 import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.rc.domain.TChap;
 import com.ruoyi.system.service.ISysDeptService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -90,7 +89,12 @@ public class TDeptInfoController extends BaseController
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
-        return success(tDeptInfoService.selectTDeptInfoById(id));
+        TDeptInfo tDeptInfo = tDeptInfoService.selectTDeptInfoById(id);
+        String year = tDeptInfo.getYear();
+        if (year.length() > 4) {
+            tDeptInfo.setYear(year.substring(0, year.indexOf("-")));
+        }
+        return success(tDeptInfo);
     }
 
     /**

+ 7 - 1
rc-admin/src/main/java/com/ruoyi/web/controller/rc/TQuestionnaireController.java

@@ -1,6 +1,7 @@
 package com.ruoyi.web.controller.rc;
 
 import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.rc.domain.TDeptInfo;
 import com.ruoyi.system.service.ISysDeptService;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
@@ -88,7 +89,12 @@ public class TQuestionnaireController extends BaseController
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
-        return success(tQuestionnaireService.selectTQuestionnaireById(id));
+        TQuestionnaire tQuestionnaire = tQuestionnaireService.selectTQuestionnaireById(id);
+        String year = tQuestionnaire.getYear();
+        if (year.length() > 4) {
+            tQuestionnaire.setYear(year.substring(0, year.indexOf("-")));
+        }
+        return success(tQuestionnaire);
     }
 
     /**

+ 9 - 0
rc-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -53,6 +53,15 @@ public class SysUserController extends BaseController
     @Autowired
     private ISysPostService postService;
 
+    /**
+     * 获取全部用户列表
+     */
+    @GetMapping("/listAll")
+    public AjaxResult listAll(SysUser user)
+    {
+        return success(userService.selectUserList(user));
+    }
+
     /**
      * 获取用户列表
      */

+ 20 - 0
rc-buisness/src/main/java/com/ruoyi/rc/domain/TQuestionnaire.java

@@ -70,10 +70,14 @@ public class TQuestionnaire extends BaseEntity
     @Excel(name = "负责人")
     private Long personInCharge;
 
+    private String personInChargeName;
+
     /** 审核人 */
     @Excel(name = "审核人")
     private Long reviewer;
 
+    private String reviewerName;
+
     /** 备注 */
     @Excel(name = "备注")
     private String remarks;
@@ -86,6 +90,22 @@ public class TQuestionnaire extends BaseEntity
     @Excel(name = "装置")
     private String deptName;
 
+    public String getPersonInChargeName() {
+        return personInChargeName;
+    }
+
+    public void setPersonInChargeName(String personInChargeName) {
+        this.personInChargeName = personInChargeName;
+    }
+
+    public String getReviewerName() {
+        return reviewerName;
+    }
+
+    public void setReviewerName(String reviewerName) {
+        this.reviewerName = reviewerName;
+    }
+
     public String getDeptName() {
         return deptName;
     }

+ 1 - 0
rc-buisness/src/main/resources/mapper/rc/TChapterMapper.xml

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="deptId != null  and deptId != ''"> and dept_id = #{deptId}</if>
         </where>
+        order by code asc
     </select>
     
     <select id="selectTChapterById" parameterType="Long" resultMap="TChapterResult">

+ 8 - 1
rc-buisness/src/main/resources/mapper/rc/TQuestionnaireMapper.xml

@@ -22,10 +22,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="reviewer"    column="reviewer"    />
         <result property="remarks"    column="remarks"    />
         <result property="deptId"    column="dept_id"    />
+        <result property="personInChargeName"    column="person_in_charge_name"    />
+        <result property="reviewerName"    column="reviewer_name"    />
     </resultMap>
 
     <sql id="selectTQuestionnaireVo">
-        select id, audit_id, chapter_id, year, type, directory, code, name, yes_no_na, minimum_standard, good_practices, standard, completion_status, person_in_charge, reviewer, remarks, dept_id from t_questionnaire
+        select id, audit_id, chapter_id, year, type, directory, code, name, yes_no_na, minimum_standard, good_practices, standard, completion_status, person_in_charge, reviewer, remarks, q.dept_id,
+        u1.nick_name as person_in_charge_name, u2.nick_name as reviewer_name
+        from t_questionnaire q
+        left join sys_user u1 on q.person_in_charge = u1.user_id
+        left join sys_user u2 on q.reviewer = u2.user_id
     </sql>
 
     <select id="selectTQuestionnaireList" parameterType="TQuestionnaire" resultMap="TQuestionnaireResult">
@@ -48,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             <if test="deptId != null  and deptId != ''"> and dept_id = #{deptId}</if>
         </where>
+        order by code asc
     </select>
     
     <select id="selectTQuestionnaireById" parameterType="Long" resultMap="TQuestionnaireResult">

+ 9 - 0
ruoyi-ui/src/api/system/user.js

@@ -1,6 +1,15 @@
 import request from '@/utils/request'
 import { parseStrEmpty } from "@/utils/ruoyi";
 
+// 查询全部用户列表
+export function listAllUser(query) {
+  return request({
+    url: '/system/user/listAll',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询用户列表
 export function listUser(query) {
   return request({

+ 13 - 0
ruoyi-ui/src/router/index.js

@@ -101,6 +101,19 @@ export const constantRoutes = [
       }
     ]
   },
+  {
+    path: '/rc',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: 'editchapter',
+        component: (resolve) => require(['@/views/rc/editchapter/index'], resolve),
+        name: 'EditChapter',
+        meta: { title: '编辑左侧章节' }
+      }
+    ]
+  },
 ]
 
 // 动态路由,基于用户权限动态去加载

+ 2 - 14
ruoyi-ui/src/views/rc/chapter/index.vue

@@ -16,12 +16,12 @@
           ref="chapterList"
           v-loading="loading"
           :data="chapterList"
-          style="margin-bottom: 20px"
+          style="margin-bottom: 20px; font-size: 12px;"
           border
           class="menuTable"
           @row-click="handleNodeClick"
           :show-header="false">
-          <el-table-column align="center" prop="code" width="50" :show-overflow-tooltip="true"/>
+          <el-table-column align="center" prop="code" width="80" :show-overflow-tooltip="true"/>
           <el-table-column align="center" prop="name"/>
         </el-table>
       </div>
@@ -69,8 +69,6 @@ export default {
       // 表单校验
       rules: {
       },
-      // 装置列表
-      deptOptions: [],
     };
   },
   created() {
@@ -150,12 +148,6 @@ export default {
       this.reset();
       const id = row.id || this.ids
       getChapter(id).then(response => {
-        // 字符串转数组
-        if (response.data.deptId != null && response.data.deptId != "") {
-            response.data.deptId = response.data.deptId.split(",").map(Number);
-        } else {
-            response.data.deptId = [];
-        }
         this.form = response.data;
         this.open = true;
         this.title = "修改章节";
@@ -165,10 +157,6 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          // 数组转字符串
-          if (this.form.deptId != null) {
-              this.form.deptId = this.form.deptId.toString();
-          }
           if (this.form.id != null) {
             updateChapter(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");

+ 10 - 20
ruoyi-ui/src/views/rc/deptinfo/index.vue

@@ -111,6 +111,16 @@
     <!-- 添加或修改装置信息对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="装置" prop="deptId">
+          <el-select clearable v-model="form.deptId" placeholder="请选择装置">
+            <el-option
+              v-for="dict in deptOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="年份" prop="year">
           <el-date-picker clearable
                           v-model="form.year"
@@ -122,16 +132,6 @@
         <el-form-item label="装置信息" prop="deptInfo">
           <el-input v-model="form.deptInfo" type="textarea" placeholder="请输入内容" />
         </el-form-item>
-        <el-form-item label="装置" prop="deptId">
-          <el-select clearable multiple v-model="form.deptId" placeholder="请选择装置">
-            <el-option
-              v-for="dict in deptOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -254,12 +254,6 @@ export default {
       const id = row.id || this.ids
       getDeptinfo(id).then(response => {
         this.form = response.data;
-        // 字符串转数组
-        if (response.data.deptId != null && response.data.deptId != "") {
-          response.data.deptId = response.data.deptId.split(",").map(Number);
-        } else {
-          response.data.deptId = [];
-        }
         this.open = true;
         this.title = "修改装置信息";
       });
@@ -268,10 +262,6 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          // 数组转字符串
-          if (this.form.deptId != null) {
-            this.form.deptId = this.form.deptId.toString();
-          }
           if (this.form.id != null) {
             updateDeptinfo(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");

+ 261 - 0
ruoyi-ui/src/views/rc/editchapter/index.vue

@@ -0,0 +1,261 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="序号" prop="code">
+        <el-input
+          v-model="queryParams.code"
+          placeholder="请输入序号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['rc:chapter:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['rc:chapter:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['rc:chapter:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['rc:chapter:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="chapterList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" align="center" prop="code" />
+      <el-table-column label="名称" align="center" prop="name" />
+      <el-table-column label="操作" align="center" width="180" fixed="right" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['rc:chapter:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['rc:chapter:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!-- 添加或修改章节对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="序号" prop="code">
+          <el-input v-model="form.code" placeholder="请输入序号" />
+        </el-form-item>
+        <el-form-item label="名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入内容" />
+        </el-form-item>
+      </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>
+  </div>
+</template>
+
+<script>
+import { listChapter, getChapter, delChapter, addChapter, updateChapter } from "@/api/rc/chapter";
+import { listDept } from "@/api/system/dept";
+
+export default {
+  name: "Chapter",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 章节表格数据
+      chapterList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        auditId: null,
+        code: null,
+        name: null,
+        deptId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      },
+    };
+  },
+  created() {
+    this.getList();
+    this.getDeptList();
+  },
+  methods: {
+    /** 查询章节列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.auditId = this.$route.query.auditId;
+      listChapter(this.queryParams).then(response => {
+        this.chapterList = response.data;
+        this.loading = false;
+      });
+    },
+    /** 查询装置列表 */
+    getDeptList() {
+      listDept().then(response => {
+        let data = response.data;
+        for (let i = 0; i < data.length; i++) {
+          // 非顶级节点
+          if (data[i].parentId !== 0) {
+            // 插入装置列表
+            this.deptOptions.push({"dictLabel": data[i].deptName, "dictValue": data[i].deptId});
+          }
+        }
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        code: null,
+        name: null,
+        deptId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加章节";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getChapter(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改章节";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.form.auditId = this.$route.query.auditId;
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateChapter(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addChapter(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除章节编号为"' + ids + '"的数据项?').then(function() {
+        return delChapter(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('rc/chapter/export', {
+        ...this.queryParams
+      }, `chapter_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 172 - 55
ruoyi-ui/src/views/rc/questionnaire/index.vue

@@ -1,7 +1,60 @@
 <template>
   <div class="app-container" style="padding: 0px;">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
+      <el-form-item label="问卷类型" prop="type">
+        <el-select v-model="queryParams.type" placeholder="请选择问卷类型" clearable>
+          <el-option
+            v-for="dict in dict.type.t_sec_sub_chap_type"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="YES/NO/NA" prop="yesNoNa">
+        <el-select v-model="queryParams.yesNoNa" placeholder="请选择YES/NO/NA" clearable>
+          <el-option
+            v-for="dict in dict.type.t_sec_sub_chap_yes_no_na"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="标准" prop="standard">
+        <el-select v-model="queryParams.standard" placeholder="请选择标准" clearable>
+          <el-option
+            v-for="dict in dict.type.t_sec_sub_chap_standard"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="完成情况" prop="completionStatus">
+        <el-select v-model="queryParams.completionStatus" placeholder="请选择完成情况" clearable>
+          <el-option
+            v-for="dict in dict.type.t_sec_sub_chap_completion_status"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
 
     <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          plain
+          size="mini"
+          @click="handleEditChapter"
+        >编辑左侧章节</el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -47,29 +100,51 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table border v-loading="loading" :data="questionnaireList" @selection-change="handleSelectionChange">
+    <el-table border v-loading="loading" :data="questionnaireList" @selection-change="handleSelectionChange" style="font-size: 12px;">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="id" align="center" prop="id" />
-      <el-table-column label="审计记录id" align="center" prop="auditId" />
-      <el-table-column label="章节id" align="center" prop="chapterId" />
-      <el-table-column label="年份" align="center" prop="year" width="180">
+      <el-table-column label="年份" align="center" prop="year">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.year, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.year, '{y}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="问卷类型" align="center" prop="type" />
-      <el-table-column label="目录" align="center" prop="directory" />
+      <el-table-column label="问卷类型" align="center" prop="type">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.t_sec_sub_chap_type" :value="scope.row.type"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="目录" align="center" prop="directory" width="200" />
       <el-table-column label="序号" align="center" prop="code" />
-      <el-table-column label="名称" align="center" prop="name" />
-      <el-table-column label="YES/NO/NA" align="center" prop="yesNoNa" />
-      <el-table-column label="MinimumStandard" align="center" prop="minimumStandard" />
-      <el-table-column label="Good Practices" align="center" prop="goodPractices" />
-      <el-table-column label="标准" align="center" prop="standard" />
-      <el-table-column label="完成情况" align="center" prop="completionStatus" />
-      <el-table-column label="负责人" align="center" prop="personInCharge" />
-      <el-table-column label="审核人" align="center" prop="reviewer" />
-      <el-table-column label="备注" align="center" prop="remarks" />
-      <el-table-column label="装置id" align="center" prop="deptId" />
+      <el-table-column label="名称" align="center" prop="name" width="350" />
+      <el-table-column label="YES" align="center" prop="yesNoNa">
+        <template slot-scope="scope">
+          <span>{{scope.row.yesNoNa == 1 ? "√" : ""}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="NO" align="center" prop="yesNoNa">
+        <template slot-scope="scope">
+          <span>{{scope.row.yesNoNa == 2 ? "√" : ""}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="NA" align="center" prop="yesNoNa">
+        <template slot-scope="scope">
+          <span>{{scope.row.yesNoNa == 3 ? "√" : ""}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="MinimumStandard" align="center" prop="minimumStandard" width="150" />
+      <el-table-column label="Good Practices" align="center" prop="goodPractices" width="150" />
+      <el-table-column label="标准" align="center" prop="standard">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.t_sec_sub_chap_standard" :value="scope.row.standard"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="完成情况" align="center" prop="completionStatus">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.t_sec_sub_chap_completion_status" :value="scope.row.completionStatus"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="负责人" align="center" prop="personInChargeName" />
+      <el-table-column label="审核人" align="center" prop="reviewerName" />
+      <el-table-column label="备注" align="center" prop="remarks" width="150" />
       <el-table-column label="操作" align="center" width="120" fixed="right" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -101,20 +176,24 @@
     <!-- 添加或修改问卷对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="审计记录id" prop="auditId">
-          <el-input v-model="form.auditId" placeholder="请输入审计记录id" />
-        </el-form-item>
-        <el-form-item label="章节id" prop="chapterId">
-          <el-input v-model="form.chapterId" placeholder="请输入章节id" />
-        </el-form-item>
         <el-form-item label="年份" prop="year">
           <el-date-picker clearable
             v-model="form.year"
-            type="date"
-            value-format="yyyy-MM-dd"
+            type="year"
+            value-format="yyyy"
             placeholder="请选择年份">
           </el-date-picker>
         </el-form-item>
+        <el-form-item label="问卷类型" prop="type">
+          <el-select v-model="form.type" placeholder="请选择问卷类型">
+            <el-option
+              v-for="dict in dict.type.t_sec_sub_chap_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="目录" prop="directory">
           <el-input v-model="form.directory" type="textarea" placeholder="请输入内容" />
         </el-form-item>
@@ -124,8 +203,14 @@
         <el-form-item label="名称" prop="name">
           <el-input v-model="form.name" type="textarea" placeholder="请输入内容" />
         </el-form-item>
-        <el-form-item label="YES/NO/NA" prop="yesNoNa">
-          <el-input v-model="form.yesNoNa" placeholder="请输入YES/NO/NA" />
+        <el-form-item label="" prop="yesNoNa">
+          <el-radio-group v-model="form.yesNoNa">
+            <el-radio
+              v-for="dict in dict.type.t_sec_sub_chap_yes_no_na"
+              :key="dict.value"
+              :label="dict.value"
+            >{{dict.label}}</el-radio>
+          </el-radio-group>
         </el-form-item>
         <el-form-item label="MinimumStandard" prop="minimumStandard">
           <el-input v-model="form.minimumStandard" type="textarea" placeholder="请输入内容" />
@@ -134,30 +219,48 @@
           <el-input v-model="form.goodPractices" type="textarea" placeholder="请输入内容" />
         </el-form-item>
         <el-form-item label="标准" prop="standard">
-          <el-input v-model="form.standard" placeholder="请输入标准" />
+          <el-select v-model="form.standard" placeholder="请选择标准">
+            <el-option
+              v-for="dict in dict.type.t_sec_sub_chap_standard"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="完成情况" prop="completionStatus">
+          <el-select v-model="form.completionStatus" placeholder="请选择完成情况">
+            <el-option
+              v-for="dict in dict.type.t_sec_sub_chap_completion_status"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="负责人" prop="personInCharge">
-          <el-input v-model="form.personInCharge" placeholder="请输入负责人" />
+          <el-select clearable v-model="form.personInCharge" placeholder="请选择负责人">
+            <el-option
+              v-for="dict in userOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
         </el-form-item>
         <el-form-item label="审核人" prop="reviewer">
-          <el-input v-model="form.reviewer" placeholder="请输入审核人" />
-        </el-form-item>
-        <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-        <el-form-item label="装置id" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入装置id" />
-        </el-form-item>
-        <el-form-item label="装置" prop="deptId">
-          <el-select clearable multiple v-model="form.deptId" placeholder="请选择装置">
+          <el-select clearable v-model="form.reviewer" placeholder="请选择审核人">
             <el-option
-              v-for="dict in deptOptions"
+              v-for="dict in userOptions"
               :key="dict.dictValue"
               :label="dict.dictLabel"
               :value="dict.dictValue"
             ></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -170,9 +273,11 @@
 <script>
 import { listQuestionnaire, getQuestionnaire, delQuestionnaire, addQuestionnaire, updateQuestionnaire } from "@/api/rc/questionnaire";
 import { listDept } from "@/api/system/dept";
+import { listAllUser } from "@/api/system/user";
 
 export default {
   name: "Questionnaire",
+  dicts: ['t_sec_sub_chap_completion_status', 't_sec_sub_chap_yes_no_na', 't_sec_sub_chap_type', 't_sec_sub_chap_standard'],
   data() {
     return {
       // 遮罩层
@@ -184,7 +289,7 @@ export default {
       // 非多个禁用
       multiple: true,
       // 显示搜索条件
-      showSearch: true,
+      showSearch: false,
       // 总条数
       total: 0,
       // 问卷表格数据
@@ -219,15 +324,38 @@ export default {
       // 表单校验
       rules: {
       },
-      // 装置列表
-      deptOptions: [],
+      // 用户列表
+      userOptions: [],
     };
   },
   created() {
     this.getList();
     this.getDeptList();
+    this.getUserList();
   },
   methods: {
+    /** 查询用户列表 */
+    getUserList() {
+      listAllUser().then(response => {
+        let data = response.data;
+        for (let i = 0; i < data.length; i++) {
+          // 非顶级节点
+          if (data[i].parentId !== 0) {
+            // 插入装置列表
+            this.userOptions.push({"dictLabel": data[i].nickName, "dictValue": data[i].userId});
+          }
+        }
+      });
+    },
+    /** 编辑左侧章节 */
+    handleEditChapter() {
+      this.$router.push({
+        path: "/rc/editchapter",
+        query: {
+          auditId: this.queryParams.auditId
+        }
+      });
+    },
     /** 查询问卷列表 */
     getList(auditId, chapterId) {
       this.loading = true;
@@ -265,7 +393,6 @@ export default {
     reset() {
       this.form = {
         id: null,
-        auditId: null,
         chapterId: null,
         year: null,
         type: null,
@@ -311,12 +438,6 @@ export default {
       this.reset();
       const id = row.id || this.ids
       getQuestionnaire(id).then(response => {
-        // 字符串转数组
-        if (response.data.deptId != null && response.data.deptId != "") {
-            response.data.deptId = response.data.deptId.split(",").map(Number);
-        } else {
-            response.data.deptId = [];
-        }
         this.form = response.data;
         this.open = true;
         this.title = "修改问卷";
@@ -326,10 +447,6 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          // 数组转字符串
-          if (this.form.deptId != null) {
-              this.form.deptId = this.form.deptId.toString();
-          }
           if (this.form.id != null) {
             updateQuestionnaire(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");