xyg 10 сар өмнө
parent
commit
2981564d98

+ 259 - 249
nasc-ui/src/components/Editor/index.vue

@@ -1,274 +1,284 @@
 <template>
   <div>
-    <el-upload
-      :action="uploadUrl"
-      :before-upload="handleBeforeUpload"
-      :on-success="handleUploadSuccess"
-      :on-error="handleUploadError"
-      name="file"
-      :show-file-list="false"
-      :headers="headers"
-      style="display: none"
-      ref="upload"
-      v-if="this.type == 'url'"
-    >
+    <el-upload :action="uploadUrl" :before-upload="handleBeforeUpload" :on-success="handleUploadSuccess"
+      :on-error="handleUploadError" name="file" :show-file-list="false" :headers="headers" style="display: none"
+      ref="upload" v-if="this.type == 'url'">
     </el-upload>
     <div class="editor" ref="editor" :style="styles"></div>
   </div>
 </template>
 
 <script>
-import Quill from "quill";
-import "quill/dist/quill.core.css";
-import "quill/dist/quill.snow.css";
-import "quill/dist/quill.bubble.css";
-import { getToken } from "@/utils/auth";
+  import Quill from "quill";
+  import "quill/dist/quill.core.css";
+  import "quill/dist/quill.snow.css";
+  import "quill/dist/quill.bubble.css";
+  import { getToken } from "@/utils/auth";
 
-export default {
-  name: "Editor",
-  props: {
-    /* 编辑器的内容 */
-    value: {
-      type: String,
-      default: "",
-    },
-    /* 高度 */
-    height: {
-      type: Number,
-      default: null,
-    },
-    /* 最小高度 */
-    minHeight: {
-      type: Number,
-      default: null,
-    },
-    /* 只读 */
-    readOnly: {
-      type: Boolean,
-      default: false,
-    },
-    /* 上传文件大小限制(MB) */
-    fileSize: {
-      type: Number,
-      default: 5,
-    },
-    /* 类型(base64格式、url格式) */
-    type: {
-      type: String,
-      default: "url",
-    }
-  },
-  data() {
-    return {
-      uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
-      headers: {
-        Authorization: "Bearer " + getToken()
+  export default {
+    name: "Editor",
+    props: {
+      /* 编辑器的内容 */
+      value: {
+        type: String,
+        default: "",
       },
-      Quill: null,
-      currentValue: "",
-      options: {
-        theme: "snow",
-        bounds: document.body,
-        debug: "warn",
-        modules: {
-          // 工具栏配置
-          toolbar: [
-            ["bold", "italic", "underline", "strike"],       // 加粗 斜体 下划线 删除线
-            ["blockquote", "code-block"],                    // 引用  代码块
-            [{ list: "ordered" }, { list: "bullet" }],       // 有序、无序列表
-            [{ indent: "-1" }, { indent: "+1" }],            // 缩进
-            [{ size: ["small", false, "large", "huge"] }],   // 字体大小
-            [{ header: [1, 2, 3, 4, 5, 6, false] }],         // 标题
-            [{ color: [] }, { background: [] }],             // 字体颜色、字体背景颜色
-            [{ align: [] }],                                 // 对齐方式
-            ["clean"],                                       // 清除文本格式
-            ["link", "image", "video"]                       // 链接、图片、视频
-          ],
-        },
-        placeholder: "请输入内容",
-        readOnly: this.readOnly,
+      /* 高度 */
+      height: {
+        type: Number,
+        default: null,
       },
-    };
-  },
-  computed: {
-    styles() {
-      let style = {};
-      if (this.minHeight) {
-        style.minHeight = `${this.minHeight}px`;
-      }
-      if (this.height) {
-        style.height = `${this.height}px`;
+      /* 最小高度 */
+      minHeight: {
+        type: Number,
+        default: null,
+      },
+      /* 只读 */
+      readOnly: {
+        type: Boolean,
+        default: false,
+      },
+      /* 上传文件大小限制(MB) */
+      fileSize: {
+        type: Number,
+        default: 5,
+      },
+      /* 类型(base64格式、url格式) */
+      type: {
+        type: String,
+        default: "url",
       }
-      return style;
     },
-  },
-  watch: {
-    value: {
-      handler(val) {
-        if (val !== this.currentValue) {
-          this.currentValue = val === null ? "" : val;
-          if (this.Quill) {
-            this.Quill.pasteHTML(this.currentValue);
-          }
+    data() {
+      return {
+        uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
+        headers: {
+          Authorization: "Bearer " + getToken()
+        },
+        Quill: null,
+        currentValue: "",
+        options: {
+          theme: "snow",
+          bounds: document.body,
+          debug: "warn",
+          modules: {
+            // 工具栏配置
+            toolbar: [
+              ["bold", "italic", "underline", "strike"],       // 加粗 斜体 下划线 删除线
+              ["blockquote", "code-block"],                    // 引用  代码块
+              [{ list: "ordered" }, { list: "bullet" }],       // 有序、无序列表
+              [{ indent: "-1" }, { indent: "+1" }],            // 缩进
+              [{ size: ["small", false, "large", "huge"] }],   // 字体大小
+              [{ header: [1, 2, 3, 4, 5, 6, false] }],         // 标题
+              [{ color: [] }, { background: [] }],             // 字体颜色、字体背景颜色
+              [{ align: [] }],                                 // 对齐方式
+              ["clean"],                                       // 清除文本格式
+              // ["link", "image", "video"]                       // 链接、图片、视频
+            ],
+          },
+          placeholder: "请输入内容",
+          readOnly: this.readOnly,
+        },
+      };
+    },
+    computed: {
+      styles() {
+        let style = {};
+        if (this.minHeight) {
+          style.minHeight = `${this.minHeight}px`;
         }
+        if (this.height) {
+          style.height = `${this.height}px`;
+        }
+        return style;
       },
-      immediate: true,
     },
-  },
-  mounted() {
-    this.init();
-  },
-  beforeDestroy() {
-    this.Quill = null;
-  },
-  methods: {
-    init() {
-      const editor = this.$refs.editor;
-      this.Quill = new Quill(editor, this.options);
-      // 如果设置了上传地址则自定义图片上传事件
-      if (this.type == 'url') {
-        let toolbar = this.Quill.getModule("toolbar");
-        toolbar.addHandler("image", (value) => {
-          if (value) {
-            this.$refs.upload.$children[0].$refs.input.click();
-          } else {
-            this.quill.format("image", false);
+    watch: {
+      value: {
+        handler(val) {
+          if (val !== this.currentValue) {
+            this.currentValue = val === null ? "" : val;
+            if (this.Quill) {
+              this.Quill.pasteHTML(this.currentValue);
+            }
           }
-        });
-      }
-      this.Quill.pasteHTML(this.currentValue);
-      this.Quill.on("text-change", (delta, oldDelta, source) => {
-        const html = this.$refs.editor.children[0].innerHTML;
-        const text = this.Quill.getText();
-        const quill = this.Quill;
-        this.currentValue = html;
-        this.$emit("input", html);
-        this.$emit("on-change", { html, text, quill });
-      });
-      this.Quill.on("text-change", (delta, oldDelta, source) => {
-        this.$emit("on-text-change", delta, oldDelta, source);
-      });
-      this.Quill.on("selection-change", (range, oldRange, source) => {
-        this.$emit("on-selection-change", range, oldRange, source);
-      });
-      this.Quill.on("editor-change", (eventName, ...args) => {
-        this.$emit("on-editor-change", eventName, ...args);
-      });
+        },
+        immediate: true,
+      },
     },
-    // 上传前校检格式和大小
-    handleBeforeUpload(file) {
-      const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"];
-      const isJPG = type.includes(file.type);
-      // 检验文件格式
-      if (!isJPG) {
-        this.$message.error(`图片格式错误!`);
-        return false;
-      }
-      // 校检文件大小
-      if (this.fileSize) {
-        const isLt = file.size / 1024 / 1024 < this.fileSize;
-        if (!isLt) {
-          this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
+    mounted() {
+      this.init();
+    },
+    beforeDestroy() {
+      this.Quill = null;
+    },
+    methods: {
+      init() {
+        const editor = this.$refs.editor;
+        this.Quill = new Quill(editor, this.options);
+        // 如果设置了上传地址则自定义图片上传事件
+        if (this.type == 'url') {
+          let toolbar = this.Quill.getModule("toolbar");
+          toolbar.addHandler("image", (value) => {
+            if (value) {
+              this.$refs.upload.$children[0].$refs.input.click();
+            } else {
+              this.quill.format("image", false);
+            }
+          });
+        }
+        this.Quill.pasteHTML(this.currentValue);
+        this.Quill.on("text-change", (delta, oldDelta, source) => {
+          const html = this.$refs.editor.children[0].innerHTML;
+          const text = this.Quill.getText();
+          const quill = this.Quill;
+          this.currentValue = html;
+          this.$emit("input", html);
+          this.$emit("on-change", { html, text, quill });
+        });
+        this.Quill.on("text-change", (delta, oldDelta, source) => {
+          this.$emit("on-text-change", delta, oldDelta, source);
+        });
+        this.Quill.on("selection-change", (range, oldRange, source) => {
+          this.$emit("on-selection-change", range, oldRange, source);
+        });
+        this.Quill.on("editor-change", (eventName, ...args) => {
+          this.$emit("on-editor-change", eventName, ...args);
+        });
+      },
+      // 上传前校检格式和大小
+      handleBeforeUpload(file) {
+        const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"];
+        const isJPG = type.includes(file.type);
+        // 检验文件格式
+        if (!isJPG) {
+          this.$message.error(`图片格式错误!`);
           return false;
         }
-      }
-      return true;
-    },
-    handleUploadSuccess(res, file) {
-      // 如果上传成功
-      if (res.code == 200) {
-        // 获取富文本组件实例
-        let quill = this.Quill;
-        // 获取光标所在位置
-        let length = quill.getSelection().index;
-        // 插入图片  res.url为服务器返回的图片地址
-        quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
-        // 调整光标到最后
-        quill.setSelection(length + 1);
-      } else {
+        // 校检文件大小
+        if (this.fileSize) {
+          const isLt = file.size / 1024 / 1024 < this.fileSize;
+          if (!isLt) {
+            this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
+            return false;
+          }
+        }
+        return true;
+      },
+      handleUploadSuccess(res, file) {
+        // 如果上传成功
+        if (res.code == 200) {
+          // 获取富文本组件实例
+          let quill = this.Quill;
+          // 获取光标所在位置
+          let length = quill.getSelection().index;
+          // 插入图片  res.url为服务器返回的图片地址
+          quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
+          // 调整光标到最后
+          quill.setSelection(length + 1);
+        } else {
+          this.$message.error("图片插入失败");
+        }
+      },
+      handleUploadError() {
         this.$message.error("图片插入失败");
-      }
-    },
-    handleUploadError() {
-      this.$message.error("图片插入失败");
+      },
     },
-  },
-};
+  };
 </script>
 
 <style>
-.editor, .ql-toolbar {
-  white-space: pre-wrap !important;
-  line-height: normal !important;
-}
-.quill-img {
-  display: none;
-}
-.ql-snow .ql-tooltip[data-mode="link"]::before {
-  content: "请输入链接地址:";
-}
-.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
-  border-right: 0px;
-  content: "保存";
-  padding-right: 0px;
-}
-.ql-snow .ql-tooltip[data-mode="video"]::before {
-  content: "请输入视频地址:";
-}
-.ql-snow .ql-picker.ql-size .ql-picker-label::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item::before {
-  content: "14px";
-}
-.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
-  content: "10px";
-}
-.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
-  content: "18px";
-}
-.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
-  content: "32px";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item::before {
-  content: "文本";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
-  content: "标题1";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
-  content: "标题2";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
-  content: "标题3";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
-  content: "标题4";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
-  content: "标题5";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
-  content: "标题6";
-}
-.ql-snow .ql-picker.ql-font .ql-picker-label::before,
-.ql-snow .ql-picker.ql-font .ql-picker-item::before {
-  content: "标准字体";
-}
-.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
-.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
-  content: "衬线字体";
-}
-.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
-.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
-  content: "等宽字体";
-}
-</style>
+  .editor,
+  .ql-toolbar {
+    white-space: pre-wrap !important;
+    line-height: normal !important;
+  }
+
+  .quill-img {
+    display: none;
+  }
+
+  .ql-snow .ql-tooltip[data-mode="link"]::before {
+    content: "请输入链接地址:";
+  }
+
+  .ql-snow .ql-tooltip.ql-editing a.ql-action::after {
+    border-right: 0px;
+    content: "保存";
+    padding-right: 0px;
+  }
+
+  .ql-snow .ql-tooltip[data-mode="video"]::before {
+    content: "请输入视频地址:";
+  }
+
+  .ql-snow .ql-picker.ql-size .ql-picker-label::before,
+  .ql-snow .ql-picker.ql-size .ql-picker-item::before {
+    content: "14px";
+  }
+
+  .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
+  .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
+    content: "10px";
+  }
+
+  .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
+  .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
+    content: "18px";
+  }
+
+  .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
+  .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
+    content: "32px";
+  }
+
+  .ql-snow .ql-picker.ql-header .ql-picker-label::before,
+  .ql-snow .ql-picker.ql-header .ql-picker-item::before {
+    content: "文本";
+  }
+
+  .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
+  .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
+    content: "标题1";
+  }
+
+  .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
+  .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
+    content: "标题2";
+  }
+
+  .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
+  .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
+    content: "标题3";
+  }
+
+  .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
+  .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
+    content: "标题4";
+  }
+
+  .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
+  .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
+    content: "标题5";
+  }
+
+  .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
+  .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
+    content: "标题6";
+  }
+
+  .ql-snow .ql-picker.ql-font .ql-picker-label::before,
+  .ql-snow .ql-picker.ql-font .ql-picker-item::before {
+    content: "标准字体";
+  }
+
+  .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
+  .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
+    content: "衬线字体";
+  }
+
+  .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
+  .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
+    content: "等宽字体";
+  }
+</style>

+ 781 - 267
nasc-ui/src/views/matter/item/index.vue

@@ -4,55 +4,28 @@
       <!-- 部门数据 -->
       <el-col :span="4" :xs="24">
         <div class="head-container">
-          <el-input
-            v-model="deptName"
-            placeholder="请输入部门名称"
-            clearable
-            size="small"
-            prefix-icon="el-icon-search"
-            style="margin-bottom: 20px"
-          />
+          <el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search"
+            style="margin-bottom: 20px" />
         </div>
         <div class="head-container">
-          <el-tree
-            :data="deptOptions"
-            :props="defaultProps"
-            :expand-on-click-node="false"
-            :filter-node-method="filterNode"
-            ref="tree"
-            node-key="id"
-            default-expand-all
-            highlight-current
-            @node-click="handleNodeClick"
-          />
+          <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
+            :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current
+            @node-click="handleNodeClick" />
         </div>
       </el-col>
       <!-- 事项数据 -->
       <el-col :span="20" :xs="24">
-        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+          label-width="68px">
           <el-form-item label="事项名称" prop="itemName">
-            <el-input
-              v-model="queryParams.itemName"
-              placeholder="请输入事项名称"
-              clearable
-              style="width: 240px"
-              @keyup.enter.native="handleQuery"
-            />
+            <el-input v-model="queryParams.itemName" placeholder="请输入事项名称" clearable style="width: 240px"
+              @keyup.enter.native="handleQuery" />
           </el-form-item>
           <el-form-item prop="prefixQuestion">
-            <label for="prefixQuestion" class="el-form-item__label" style="width: 120px;">是否有前置问题</label>
-            <el-select
-              v-model="queryParams.prefixQuestion"
-              placeholder="请选择是否有前置问题"
-              clearable
-              style="width: 240px"
-            >
-              <el-option
-                v-for="dict in dict.type.sys_yes_no"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
+            <label for="prefixQuestion" class="el-form-item__label" style="width: 120px">是否有前置问题</label>
+            <el-select v-model="queryParams.prefixQuestion" placeholder="请选择是否有前置问题" clearable style="width: 240px">
+              <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label"
+                :value="dict.value" />
             </el-select>
           </el-form-item>
           <el-form-item>
@@ -63,36 +36,16 @@
 
         <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="['matter:item:add']"
-            >新增</el-button>
+            <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+              v-hasPermi="['matter:item: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="['matter:item:edit']"
-            >修改</el-button>
+            <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdateall"
+              v-hasPermi="['matter:item: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="['matter:item:remove']"
-            >删除</el-button>
+            <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
+              @click="handleDeleteall" v-hasPermi="['matter:item:remove']">删除</el-button>
           </el-col>
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
         </el-row>
@@ -100,265 +53,826 @@
         <el-table v-loading="loading" :data="matterList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="50" align="center" />
           <el-table-column :label="columns[0].label" align="center" key="id" prop="id" v-if="columns[0].visible" />
-          <el-table-column :label="columns[1].label" align="center" key="itemName" prop="itemName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-          <el-table-column :label="columns[2].label" align="center" key="deptName" prop="dept.deptName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
-          <el-table-column :label="columns[3].label" align="center" key="sortNum" prop="sortNum" v-if="columns[3].visible" width="120" />
+          <el-table-column :label="columns[1].label" align="center" key="itemName" prop="itemName"
+            v-if="columns[1].visible" :show-overflow-tooltip="true" />
+          <el-table-column :label="columns[2].label" align="center" key="deptName" prop="dept.deptName"
+            v-if="columns[2].visible" :show-overflow-tooltip="true" />
+          <el-table-column :label="columns[3].label" align="center" key="sortNum" prop="sortNum"
+            v-if="columns[3].visible" width="120" />
           <el-table-column :label="columns[4].label" align="center" key="prefixQuestion" v-if="columns[4].visible">
             <template slot-scope="scope">
               {{ scope.row.prefixQuestion == "Y" ? "是" : "否" }}
             </template>
           </el-table-column>
-          <el-table-column :label="columns[5].label" align="center" prop="createTime" v-if="columns[5].visible" width="160">
+          <el-table-column :label="columns[5].label" align="center" prop="createTime" v-if="columns[5].visible"
+            width="160">
             <template slot-scope="scope">
               <span>{{ parseTime(scope.row.createTime) }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            label="操作"
-            align="center"
-            width="160"
-            class-name="small-padding fixed-width"
-          >
+          <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
             <template slot-scope="scope" v-if="scope.row.userId !== 1">
-              <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-edit"
-                @click="handleUpdate(scope.row)"
-                v-hasPermi="['system:user:edit']"
-              >修改</el-button>
-              <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-delete"
-                @click="handleDelete(scope.row)"
-                v-hasPermi="['system:user:remove']"
-              >删除</el-button>
+              <el-button size="mini" type="text" icon="el-icon-s-promotion" @click="handleDeploy(scope.row)"
+                v-if="scope.row.prefixQuestion == 'Y'">问题配置</el-button>
+              <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+                v-hasPermi="['system:user:edit']">修改</el-button>
+              <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+                v-hasPermi="['system:user:remove']">删除</el-button>
             </template>
           </el-table-column>
         </el-table>
 
-        <pagination
-          v-show="total > 0"
-          :total="total"
-          :page.sync="queryParams.pageNum"
-          :limit.sync="queryParams.pageSize"
-          @pagination="getList"
-        />
+        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize" @pagination="getList" />
       </el-col>
     </el-row>
 
     <!-- 添加或修改审查事项对话框 -->
     <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="60%" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form ref="formDataref" :model="formData" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="24">
             <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+              <treeselect v-model="formData.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="24">
             <el-form-item label="事项名称" prop="itemName">
-              <el-input v-model="form.itemName" placeholder="请输入事项名称" maxlength="255" />
+              <el-input v-model="formData.itemName" placeholder="请输入事项名称" maxlength="255" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="联系人" prop="contacts">
+              <el-input v-model="formData.contacts" placeholder="请输入联系人" maxlength="255" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="联系电话" prop="contactsPhone">
+              <el-input v-model="formData.contactsPhone" placeholder="请输入联系电话" maxlength="255" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="排序号" prop="sort">
+              <el-input v-model="formData.sort" placeholder="请输入排序号" maxlength="5"
+                onkeyup="value=value.replace(/[^0-9]/g,'')" />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="24">
             <el-form-item label="前置问题" prop="prefixQuestion">
-              <el-radio-group v-model="form.prefixQuestion">
-                <el-radio
-                  v-for="dict in dict.type.sys_yes_no"
-                  :key="dict.value"
-                  :label="dict.value"
-                >{{ dict.label }}</el-radio>
+              <el-radio-group v-model="formData.prefixQuestion" @change="handleVersionChange">
+                <el-radio v-model="formData.prefixQuestion" v-for="dict in dict.type.sys_yes_no" :key="dict.value"
+                  :label="dict.value">{{ dict.label }}</el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row v-if="formData.prefixQuestion=='N'">
+          <el-col :span="24">
+            <el-form-item label="申请条件" prop="conditions">
+              <editor v-model="formData.conditions" :min-height="152" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="formData.prefixQuestion=='N'">
+          <el-col :span="24">
+            <el-form-item label="处理方式">
+              <editor v-model="formData.dealWith" :min-height="152" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="formData.prefixQuestion=='N'">
+          <el-col :span="24">
+            <el-form-item label="材料清单" prop="material" :rules="{required: true, message: '材料清单不能为空', trigger: 'blur'}">
+              <editor v-model="formData.material" :min-height="152" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="formData.prefixQuestion=='N'">
+          <el-col :span="24">
+            <el-form-item label="材料描述">
+              <editor v-model="formData.desc" :min-height="152" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="打印一次性告知单模板">
+              <editor v-model="formData.printContent" :min-height="152" />
+            </el-form-item>
+          </el-col>
+        </el-row>
       </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="title" :visible.sync="addProblem" :close-on-click-modal="false" width="60%" append-to-body>
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="addItem"
+            v-hasPermi="['matter:item:add']">新增</el-button>
+        </el-col>
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columnsp"></right-toolbar>
+      </el-row>
+      <el-table v-loading="loadingp" :data="problemList">
+        <el-table-column type="selection" width="50" align="center" />
+        <el-table-column :label="columnsp[0].label" align="center" key="id" prop="id" v-if="columnsp[0].visible" />
+        <el-table-column :label="columnsp[1].label" align="center" key="desc" prop="desc" v-if="columnsp[1].visible"
+          :show-overflow-tooltip="true" />
+        <el-table-column :label="columnsp[2].label" align="center" key="sortNum" prop="sortNum"
+          v-if="columnsp[2].visible" :show-overflow-tooltip="true" />
+        <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
+          <template slot-scope="scope" v-if="scope.row.userId !== 1">
+            <el-button size="mini" type="text" icon="el-icon-edit" @click="problemUpdate(scope.row)"
+              v-hasPermi="['system:user:edit']">修改</el-button>
+            <el-button size="mini" type="text" icon="el-icon-delete" @click="problemDelete(scope.row)"
+              v-hasPermi="['system:user:remove']">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination v-show="totalp > 0" :total="totalp" :page.sync="problemParams.pageNum"
+        :limit.sync="problemParams.pageSize" @pagination="getList" />
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="canceladd">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 添加或修改问题选项对话框 -->
+    <el-dialog :title="title" :visible.sync="problemopen" :close-on-click-modal="false" width="60%" append-to-body>
+      <el-form ref="prblemformref" :model="prblemform" :rules="rulesproblem" label-width="80px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="问题题目" :prop="'title'" :rules="{required: true, message: '问题题目不能为空', trigger: 'blur'}">
+              <el-input v-model="prblemform.title" type="textarea" placeholder="请输入问题题目" :maxlength="255"
+                :autosize="{minRows: 1, maxRows: 4}" :style="{width: '100%'}"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="排序号" :prop="'sort'" :rules="{required: true, message: '排序号不能为空', trigger: 'blur'}">
+              <el-input v-model="prblemform.sort" placeholder="请输入排序号" maxlength="5"
+                onkeyup="value=value.replace(/[^0-9]/g,'')" /></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <div style="border: 1px solid #ccc;margin-top:10px;padding: 10px;box-sizing: border-box;"
+            v-for="(domain, index) in prblemform.optionlist" :key="domain.key" v-if="prblemform.type===1">
+            <el-row>
+              <el-col :span="16">
+                <el-form-item :label="'选项'+(index+1)" :prop="'optionlist['+index+'].option'"
+                  :rules="{required: true, message: '选项不能为空', trigger: 'blur'}">
+                  <el-input v-model="domain.option" placeholder="请输入选择选项" clearable :style="{width: '100%'}">
+                  </el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="8">
+                <el-form-item label="排序号" :prop="'optionlist['+index+'].number'"
+                  :rules="{required: true, message: '排序号不能为空', trigger: 'blur'}">
+                  <el-input v-model="domain.number" placeholder="请输入排序号" maxlength="5"
+                    onkeyup="value=value.replace(/[^0-9]/g,'')" /></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="24">
+                <el-form-item label="题目跳转" :prop="'optionlist['+index+'].Jump'">
+                  <el-radio-group v-model="domain.Jump" @change="handleJumpChange">
+                    <el-radio key="1" label="是"></el-radio>
+                    <el-radio key="2" label="否"></el-radio>
+                  </el-radio-group>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row v-if="prblemform.optionlist[index].Jump=='是'">
+              <el-col :span="24">
+                <el-form-item :prop="'optionlist['+index+'].region'"
+                  :rules="{required: true, message: '跳转问题不能为空', trigger: 'blur'}">
+                  <el-select v-model="domain.region" placeholder="请选择跳转问题">
+                    <el-option v-for="(item, index) in problemList" :key="index" :label="item.desc" :value="item.id"
+                      :disabled="prblemform.id==item.id"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row v-if="prblemform.optionlist[index].Jump=='否'">
+              <el-col :span="24">
+                <el-form-item label="申请条件" :prop="'optionlist['+index+'].conditions'">
+                  <editor v-model="domain.conditions" :min-height="152" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row v-if="prblemform.optionlist[index].Jump=='否'">
+              <el-col :span="24">
+                <el-form-item label="处理方式" :prop="'optionlist['+index+'].dealWith'">
+                  <editor v-model="domain.dealWith" :min-height="152" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row v-if="prblemform.optionlist[index].Jump=='否'">
+              <el-col :span="24">
+                <el-form-item label="材料清单" :prop="'optionlist['+index+'].materialContent'"
+                  :rules="{required: true, message: '材料清单不能为空', trigger: 'blur'}">
+                  <editor v-model="domain.materialContent" :min-height="152" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row v-if="prblemform.optionlist[index].Jump=='否'">
+              <el-col :span="24">
+                <el-form-item label="材料描述" :prop="'optionlist['+index+'].desc'">
+                  <editor v-model="domain.desc" :min-height="152" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :span="24" v-if="prblemform.type===1">
+                <el-form-item size="large">
+                  <el-button @click="reomoptionlist(index)">删除备选选项</el-button>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </div>
+        </el-row>
+        <el-row style="margin-top: 10px;">
+          <el-col :span="8" v-if="prblemform.type===1">
+            <el-form-item size="large">
+              <el-button @click="addoptionlist()">添加备选选项</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormproblem">确 定</el-button>
+        <el-button @click="cancelproblem">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { deptTreeSelect } from '@/api/system/user'
-import { addMatter, listMatter, updateMatter } from '@/api/matter/matter'
-import Treeselect from '@riophae/vue-treeselect'
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  import { deptTreeSelect } from "@/api/system/user";
+  import { addMatter, listMatter, updateMatter, getMatter, delMatter } from "@/api/matter/matter";
+  import { addQuestion, listQuestion, updateQuestion, delQuestion, getQuestion } from "@/api/matter/question";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
-export default {
-  name: "Item",
-  components: { Treeselect },
-  dicts: ['sys_yes_no'],
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 表单参数
-      form: {},
-      // 部门名称
-      deptName: undefined,
-      // 部门树选项
-      deptOptions: undefined,
-      defaultProps: {
-        children: "children",
-        label: "label"
-      },
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 事项表格数据
-      matterList: null,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        itemName: undefined,
-        prefixQuestion: undefined,
-        deptId: undefined
-      },
-      // 列信息
-      columns: [
-        { key: 0, label: `事项编号`, visible: true },
-        { key: 1, label: `事项名称`, visible: true },
-        { key: 2, label: `所属部门`, visible: true },
-        { key: 3, label: `排序号`, visible: true },
-        { key: 4, label: `是否有前置问题`, visible: true },
-        { key: 5, label: `创建时间`, visible: true }
-      ],
-      // 表单校验
-      rules: {
-        deptId: [
-          { required: true, message: '请选择归属部门', trigger: 'change' }
-        ],
-        itemName: [
-          { required: true, message: "事项名称不能为空", trigger: "blur" }
+  export default {
+    name: "Item",
+    components: { Treeselect },
+    dicts: ["sys_yes_no"],
+    data() {
+      let validates = (rule, value, callback) => {
+        // reg是用于解析富文本标签里的内容,
+        const reg = /(?!<(img|video).*?>)<.*?>/g
+        console.log(value)
+        // strings 是解析出来的内容,不包含标签
+        const strings = value.replace(reg, '')
+        console.log(strings)
+        // value是空,callback触发不能为空
+        if (value === "") {
+          callback(new Error("内容不能为空"));
+          // 如果解析出来的内容是空或全部是空格,callback触发不能为空
+        } else if (strings.match(/^[ ]*$/)) {
+          callback(
+            new Error("内容不能为空")
+          );
+        } else {
+          callback();
+        }
+      };
+      return {
+        dictflag: "",
+        problemIndex: "",
+        // 遮罩层
+        loading: true,
+        loadingp: true,
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        addProblem: false,
+        problemopen: false,
+        // 表单参数
+        formData: {},
+        // 表单参数
+        prblemform: {
+          title: '',
+          type: 1,
+          sort: 1,
+          number: 0,
+          key: Date.now(),
+          // type为1是选择题,下面储存选项
+          optionlist: [{
+            option: '',
+            number: '',
+            Jump: '',
+            region: '',
+            conditions: '',
+            dealWith: '',
+            materialContent: '',
+            desc: '',
+            reason: false,
+            checked: false,
+            key: Date.now(),
+          }],
+        },
+        // 部门名称
+        deptName: undefined,
+        // 部门树选项
+        deptOptions: undefined,
+        defaultProps: {
+          children: "children",
+          label: "label",
+        },
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        totalp: 0,
+        // 事项表格数据
+        matterList: null,
+        //问题数据
+        problemList: null,
+        // 查询事项参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          itemName: undefined,
+          prefixQuestion: undefined,
+          deptId: undefined,
+        },
+        // 查询问题参数
+        problemParams: {
+          pageNum: 1,
+          pageSize: 10,
+          matterId: undefined,
+        },
+        // 列信息
+        columns: [
+          { key: 0, label: `事项编号`, visible: true },
+          { key: 1, label: `事项名称`, visible: true },
+          { key: 2, label: `所属部门`, visible: true },
+          { key: 3, label: `排序号`, visible: true },
+          { key: 4, label: `是否有前置问题`, visible: true },
+          { key: 5, label: `创建时间`, visible: true },
         ],
-        prefixQuestion: [
-          { required: true, message: '请选择是否有前置问题', trigger: 'change' }
+        columnsp: [
+          { key: 0, label: `序号`, visible: true },
+          { key: 1, label: `问题题目`, visible: true },
+          { key: 2, label: `排序号`, visible: true }
         ],
-      }
-    };
-  },
-  watch: {
-    // 根据名称筛选部门树
-    deptName(val) {
-      this.$refs.tree.filter(val);
-    }
-  },
-  created() {
-    this.getList();
-    this.getDeptTree();
-  },
-  methods: {
-    /** 查询审查事项列表 */
-    getList() {
-      this.loading = true;
-      listMatter(this.queryParams).then(response => {
-          this.matterList = response.rows;
-          this.total = response.total;
-          this.loading = false;
+        // 表单校验
+        rules: {
+          deptId: [
+            { required: true, message: "请选择归属部门", trigger: "change" },
+          ],
+          itemName: [
+            { required: true, message: "事项名称不能为空", trigger: "blur" },
+          ],
+          contacts: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
+          contactsPhone: [{ required: true, message: "联系电话不能为空", trigger: "blur" }],
+          sort: [{ required: true, message: "排序号不能为空", trigger: "blur" }],
+          prefixQuestion: [
+            {
+              required: true,
+              message: "请选择是否有前置问题",
+              trigger: "change",
+            },
+          ],
+        },
+        rulesproblem: {
+          // materialContent: [{ required: true, validator: validates, message: "请填写材料内容", trigger: "blur" }],
         }
-      );
-    },
-    /** 查询部门下拉树结构 */
-    getDeptTree() {
-      deptTreeSelect().then(response => {
-        this.deptOptions = response.data;
-      });
-    },
-    // 筛选节点
-    filterNode(value, data) {
-      if (!value) return true;
-      return data.label.indexOf(value) !== -1;
+      };
     },
-    // 节点单击事件
-    handleNodeClick(data) {
-      this.queryParams.deptId = data.id;
-      this.handleQuery();
+    watch: {
+      // 根据名称筛选部门树
+      deptName(val) {
+        this.$refs.tree.filter(val);
+      },
     },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
+    created() {
       this.getList();
+      this.getDeptTree();
     },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.queryParams.deptId = undefined;
-      this.$refs.tree.setCurrentKey(null);
-      this.handleQuery();
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加审查事项";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.userId);
-      this.single = selection.length != 1;
-      this.multiple = !selection.length;
-    },
-    /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != undefined) {
-            updateMatter(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addMatter(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+    methods: {
+      /** 是否前置选择器 */
+      handleVersionChange(prefixQuestion) {
+        this.dictflag = prefixQuestion;
+      },
+      handleJumpChange(Jump) {
+        if (Jump == "是") {
+          this.prblemflag = true;
+        } else if (Jump == "否") {
+          this.prblemflag = false;
+        }
+      },
+      /** 查询审查事项列表 */
+      getList() {
+        this.loading = true;
+        listMatter(this.queryParams).then((response) => {
+          this.matterList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      /** 查询问题列表 */
+      getPrblemList() {
+        this.loadingp = true;
+        listQuestion(this.problemParams).then((response) => {
+          this.problemList = response.rows;
+          this.totalp = response.total;
+          this.loadingp = false;
+        });
+      },
+      /** 查询部门下拉树结构 */
+      getDeptTree() {
+        deptTreeSelect().then((response) => {
+          this.deptOptions = response.data;
+        });
+      },
+      // 筛选节点
+      filterNode(value, data) {
+        if (!value) return true;
+        return data.label.indexOf(value) !== -1;
+      },
+      // 节点单击事件
+      handleNodeClick(data) {
+        this.queryParams.deptId = data.id;
+        this.handleQuery();
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.queryParams.deptId = undefined;
+        this.$refs.tree.setCurrentKey(null);
+        this.handleQuery();
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
+        this.open = true;
+        this.title = "添加审查事项";
+        this.reset();
+      },
+      addItem() {
+        this.title = "添加问题题目"
+        this.problemopen = true;
+        this.resetproblem();
+      },
+      /** 问题配置 */
+      handleDeploy(row) {
+        this.title = "添加问题题目";
+        this.problemParams.matterId = row.id;
+        this.addProblem = true;
+        this.getPrblemList();
+      },
+      submitFormproblem() {
+        this.$refs["prblemformref"].validate((valid) => {
+          if (valid) {
+            var data = this.prblemform;
+            var params = {
+              desc: data.title,
+              sortNum: data.sort,
+              id: data.id ? data.id : "",
+              matterId: this.problemParams.matterId,
+              preQuestionOptionList: []
+            }
+            var optionlist = data.optionlist;
+            for (var j = 0; j < optionlist.length; j++) {
+              if (optionlist[j].Jump == "是") {
+                params.preQuestionOptionList.push({
+                  desc: optionlist[j].option,
+                  sortNum: optionlist[j].number,
+                  id: optionlist[j].id ? optionlist[j].id : "",
+                  jumpToMatterId: optionlist[j].region
+                })
+              } else {
+                params.preQuestionOptionList.push({
+                  desc: optionlist[j].option,
+                  sortNum: optionlist[j].number,
+                  jumpToMatterId: 0,
+                  id: optionlist[j].id ? optionlist[j].id : "",
+                  material: {
+                    conditions: optionlist[j].conditions,
+                    dealWith: optionlist[j].dealWith,
+                    material: optionlist[j].materialContent,
+                    id: optionlist[j].id ? optionlist[j].id : "",
+                    desc: optionlist[j].desc,
+                  }
+                })
+              }
+            }
+            if (this.prblemform.id != undefined) {
+              updateQuestion(params).then((response) => {
+                console.log(response)
+                this.$modal.msgSuccess("修改成功");
+                this.problemopen = false;
+                this.getPrblemList();
+              });
+            } else {
+              addQuestion(params).then((response) => {
+                console.log(response)
+                this.$modal.msgSuccess("新增成功");
+                this.problemopen = false;
+                this.getPrblemList();
+              });
+            }
+          }
+        });
+      },
+      /** 修改按钮操作 */
+      handleUpdateall() { },
+      handleUpdate(row) {
+        this.title = "修改审查事项";
+        var id = row.id;
+        getMatter(id).then((response) => {
+          var data = response.data;
+          this.formData = {
+            deptId: data.deptId,
+            id: data.id,
+            itemName: data.itemName,
+            contacts: data.contacts,
+            contactsPhone: data.contactsPhone,
+            sort: data.sortNum,
+            prefixQuestion: data.prefixQuestion,
+            conditions: data.material ? data.material.conditions : "",
+            dealWith: data.material ? data.material.dealWith : "",
+            material: data.material ? data.material.material : "",
+            desc: data.material ? data.material.desc : "",
+            printContent: data.print ? data.print.content : ""
           }
+          this.open = true;
+        });
+      },
+      problemUpdate(row) {
+        this.title = "修改问题题目";
+        var matterId = row.id;
+        getQuestion(matterId).then((response) => {
+          var data = response.data;
+          this.prblemform = {
+            title: data.desc,
+            type: 1,
+            id: data.id,
+            sort: data.sortNum,
+            number: 0,
+            key: Date.now(),
+            // type为1是选择题,下面储存选项
+            optionlist: []
+          }
+          var optionlist = response.data.preQuestionOptionList;
+          for (var i = (optionlist.length - 1); i >= 0; i--) {
+            if (optionlist[i].jumpToMatterId) {
+              var Jump = "是";
+              this.prblemform.optionlist.push({
+                option: optionlist[i].desc,
+                number: optionlist[i].sortNum,
+                jumpToMatterId: optionlist[i].jumpToMatterId,
+                Jump: Jump,
+                region: optionlist[i].questionId,
+                id: optionlist[i].id,
+                reason: false,
+                checked: false,
+                key: optionlist[i].key,
+              })
+            } else {
+              var Jump = "否";
+              this.prblemform.optionlist.push({
+                option: optionlist[i].desc,
+                number: optionlist[i].sortNum,
+                jumpToMatterId: optionlist[i].jumpToMatterId,
+                Jump: Jump,
+                region: '',
+                id: optionlist[i].id,
+                conditions: optionlist[i].material.conditions,
+                dealWith: optionlist[i].material.dealWith,
+                materialContent: optionlist[i].material.material,
+                desc: optionlist[i].material.desc,
+                reason: false,
+                checked: false,
+                key: optionlist[i].key,
+              })
+            }
+          }
+          this.problemopen = true;
+        });
+      },
+      /** 删除按钮操作 */
+      handleDeleteall() {
+      },
+      handleDelete(row) {
+        console.log(row)
+        var id = row.id;
+        delMatter(id).then((response) => {
+          this.$modal.msgSuccess("删除成功");
+          this.getList();
+        });
+      },
+      problemDelete(row) {
+        var matterId = row.id;
+        delQuestion(matterId).then((response) => {
+          this.$modal.msgSuccess("删除成功");
+          this.getPrblemList();
+        });
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map((item) => item.userId);
+        this.single = selection.length != 1;
+        this.multiple = !selection.length;
+      },
+      // // 添加问题前判空
+      // submitForm() {
+      //   this.$refs['elForm'].validate(valid => {
+      //     if (!valid) return
+      //     this.addFormlist()
+      //   })
+      // },
+      // 添加问题
+      addFormlist() {
+        this.prblemform.formlist.push({
+          title: '',
+          type: 1,
+          sort: 1,
+          category: null,
+          key: Date.now(),
+          optionlist: [{
+            option: '',
+            number: '',
+            Jump: '',
+            region: '',
+            conditions: '',
+            reason: false,
+            checked: false,
+            key: Date.now(),
+          }],
+        })
+        this.prblemform.number++
+      },
+      // 添加问题选项
+      addoptionlist() {
+        this.prblemform.optionlist.push({
+          option: '',
+          number: '',
+          Jump: '',
+          sort: 1,
+          region: '',
+          conditions: '',
+          dealWith: '',
+          materialContent: '',
+          desc: '',
+          reason: false,
+          checked: false,
+          key: Date.now(),
+        });
+      },
+      // 删除问题的选项
+      reomoptionlist(itme) {
+        if (this.prblemform.optionlist.length === 1) {
+          this.$message.info("至少要有一个选项")
+          return;
         }
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
+        this.prblemform.optionlist.splice(itme, 1)
+      },
+      /** 提交按钮 */
+      submitForm: function () {
+        this.$refs["formDataref"].validate((valid) => {
+          if (valid) {
+            var data = this.formData;
+            console.log(data)
+            if (data.prefixQuestion == "Y") {
+              var params = {
+                deptId: data.deptId,
+                id: data.id ? data.id : "",
+                itemName: data.itemName,
+                contacts: data.contacts,
+                contactsPhone: data.contactsPhone,
+                sortNum: data.sort,
+                prefixQuestion: data.prefixQuestion,
+                print: {
+                  content: data.printContent,
+                }
+              };
+            } else {
+              var params = {
+                deptId: data.deptId,
+                id: data.id ? data.id : "",
+                itemName: data.itemName,
+                contacts: data.contacts,
+                contactsPhone: data.contactsPhone,
+                sortNum: data.sort,
+                prefixQuestion: data.prefixQuestion,
+                material: {
+                  conditions: data.conditions,
+                  dealWith: data.dealWith,
+                  material: data.material,
+                  desc: data.desc,
+                  id: data.id ? data.id : "",
+                },
+                print: {
+                  content: data.printContent,
+                },
+              };
+            }
+            console.log(params)
+            if (this.formData.id != undefined) {
+              updateMatter(params).then((response) => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addMatter(params).then((response) => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.$refs.formDataref.resetFields();
+        this.open = false;
+        this.reset();
+      },
+      canceladd() {
+        this.addProblem = false;
+      },
+      cancelproblem() {
+        this.$refs.prblemformref.resetFields();
+        this.problemopen = false;
+        this.resetproblem();
+      },
+      resetproblem() {
+        this.prblemform = {
+          title: '',
+          type: 1,
+          sort: 1,
+          number: 0,
+          key: Date.now(),
+          // type为1是选择题,下面储存选项
+          optionlist: [{
+            option: '',
+            number: '',
+            Jump: '',
+            region: '',
+            conditions: '',
+            dealWith: '',
+            materialContent: '',
+            desc: '',
+            reason: false,
+            checked: false,
+            key: Date.now(),
+          }]
+        };
+      },
+      reset() {
+        this.formData = {
+          deptId: undefined,
+          itemName: '',
+          contacts: '',
+          contactsPhone: '',
+          sort: '',
+          prefixQuestion: '',
+          conditions: '',
+          dealWith: '',
+          material: '',
+          desc: '',
+          printContent: ''
+        }
+      },
     },
-    reset() {
-      this.form = {
-        id: undefined,
-        deptId: undefined,
-        itemName: undefined,
-        prefixQuestion: undefined
-      };
-      this.resetForm("form");
-    }
-  }
-};
+  };
 </script>
+<style>
+  .el-dialog {
+    height: 80vh;
+  }
+
+  .el-dialog__body {
+    height: 80%;
+    overflow-y: scroll;
+  }
+</style>

+ 1 - 1
nasc-ui/vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://localhost:8080`,
+        target: `http://172.16.99.102:8080`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''