Procházet zdrojové kódy

隐患问题清单

jiawuxian před 2 roky
rodič
revize
3056772950

+ 2 - 27
src/api/question/list.js

@@ -12,36 +12,11 @@ export function listQuestion(query) {
 // 查询详细隐患问题清单
 export function getQuestion(id) {
   return request({
-    url: "/core/question/" + id,
+    url: "/core/question/info/" + id,
     method: "get",
   });
 }
 
-// 新增隐患问题清单
-export function addQuestion(data) {
-  return request({
-    url: "/core/question",
-    method: "post",
-    data: data,
-  });
-}
-
-// 修改隐患问题清单
-export function updateQuestion(data) {
-  return request({
-    url: "/core/question",
-    method: "put",
-    data: data,
-  });
-}
-
-// 删除隐患问题清单
-export function delQuestion(id) {
-  return request({
-    url: "/core/question/" + id,
-    method: "delete",
-  });
-}
 
 // 问题确认
 export function confirm(data) {
@@ -62,7 +37,7 @@ export function confirmDissent(data) {
 }
 
 // 整改
-export function reform(id) {
+export function reform(data) {
   return request({
     url: "/core/question/reform/" + data.id,
     method: "put",

+ 3 - 0
src/components/ImageUpload/index.vue

@@ -162,6 +162,9 @@ export default {
       },
       fileList: [],
       file: null,
+      baseUrl:process.env.NODE_ENV === "development"
+              ? process.env.VUE_APP_BASE_API
+              : window.origin
     };
   },
   watch: {

+ 4 - 1
src/components/orgTree/index.vue

@@ -8,6 +8,7 @@
         size="small"
         prefix-icon="el-icon-search"
         style="margin-bottom: 20px"
+        maxlength="50"
       />
     </div>
     <div class="tree-container">
@@ -37,7 +38,7 @@
 <script>
 import tableListMixins from "@/mixins/tableList";
 import { deptTreeSelect, handsheDeptTreeSelect } from "@/api/system/public";
-
+window.treeData={}
 export default {
   name: "orgTree",
   mixins: [tableListMixins],
@@ -105,12 +106,14 @@ export default {
       if (this.customRequest) {
         method = this.customRequest;
       }
+      
       method().then((response) => {
         this.treeList = response.data;
         this.defaultKeys.push(response.data[0].id);
         this.$emit("defaultKey", response.data[0].id);
         this.$emit("defaultOrg", response.data[0]);
         this.defaultKey = response.data[0].id;
+        
         setTimeout(() => {
           this.$refs.tree.setCurrentKey(response.data[0].id);
         }, 100);

+ 5 - 1
src/components/orgTree/orgDropDown.vue

@@ -24,6 +24,10 @@ export default {
     value: {
       type:String,      
     },
+    label:{
+      type:String,
+      default:'shortName'
+    }
   },
   watch: {
     // value(v){
@@ -59,7 +63,7 @@ export default {
       }
       return {
         id: node.id,
-        label: node.name,
+        label: node[this.label],
         children: node.children,
       };
     },

+ 335 - 79
src/views/question/list/dialog.vue

@@ -1,43 +1,168 @@
 <template>
-  <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="orgId">
-        <el-input v-model="form.orgId" placeholder="请输入隐患所属机构" />
+  <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body @close="cancel">
+    <el-descriptions :column="2" class="contentArea">
+      <el-descriptions-item label="隐患所属机构">{{
+        data.orgName
+      }}</el-descriptions-item>
+      <el-descriptions-item label="来源任务">{{
+        data.srcTaskName
+      }}</el-descriptions-item>
+      <el-descriptions-item label="检查项">{{
+        data.checkItem
+      }}</el-descriptions-item>
+      <el-descriptions-item label="检查内容">
+        {{ data.checkContent }}
+      </el-descriptions-item>
+      <el-descriptions-item label="隐患描述">
+        {{ data.questionDesc }}</el-descriptions-item
+      >
+      <el-descriptions-item label="提出人">
+        {{ data.submitorName }}</el-descriptions-item
+      >
+      <el-descriptions-item label="发现日期">
+        {{ dayjs(data.submitTime).format("YYYY-MM-DD") }}</el-descriptions-item
+      >
+      <el-descriptions-item label="整改期限">
+        {{
+          dayjs(data.reformDeadline).format("YYYY-MM-DD")
+        }}</el-descriptions-item
+      >
+      <el-descriptions-item label="隐患图片">
+        <div class="imageList">
+          <el-image
+            style="width: 100px"
+            v-for="url in data.images"
+            :src="url"
+            :preview-src-list="data.images"
+          >
+          </el-image></div
+      ></el-descriptions-item>
+    </el-descriptions>
+    <el-descriptions :column="2" class="contentArea" v-if="data.confirm">
+      <el-descriptions-item label="确认结果">{{
+        data.confirm.executeStatus == 0 ? "确认" : "提出异议"
+      }}</el-descriptions-item>
+      <el-descriptions-item label="确认人">{{
+        data.confirm.executorName
+      }}</el-descriptions-item>
+      <el-descriptions-item label="描述">{{
+        data.confirm.description
+      }}</el-descriptions-item>
+    </el-descriptions>
+    <el-descriptions :column="2" class="contentArea" v-if="data.confirmDissent">
+      <el-descriptions-item label="审核结果">{{
+        data.confirmDissent.executeStatus == 0 ? "同意" : "不同意"
+      }}</el-descriptions-item>
+      <el-descriptions-item label="审核人">{{
+        data.confirmDissent.executorName
+      }}</el-descriptions-item>
+      <el-descriptions-item label="描述">{{
+        data.confirmDissent.description
+      }}</el-descriptions-item>
+    </el-descriptions>
+    <el-descriptions :column="2" class="contentArea" v-if="data.reform">
+      <el-descriptions-item label="整改时间">{{
+        dayjs(data.reform.executeTime).format("YYYY-MM-DD")
+      }}</el-descriptions-item>
+      <el-descriptions-item label="整改状态">{{
+        data.reform.executeStatus == 0 ? "已整改" : "未整改"
+      }}</el-descriptions-item>
+      <el-descriptions-item label="描述">{{
+        data.reform.description
+      }}</el-descriptions-item>
+      <el-descriptions-item label="整改图片">
+        <div class="imageList">
+          <el-image
+            style="width: 100px; height: 100px"
+            v-for="url in data.reform.images"
+            :src="url"
+            :preview-src-list="data.reform.images"
+          >
+          </el-image></div
+      ></el-descriptions-item>
+    </el-descriptions>
+    <el-form
+      ref="confirmForm"
+      :model="confirmData"
+      label-width="100px"
+      class="form"
+      v-if="type == 'confirm'"
+      :rules="confirmRule"
+    >
+      <el-form-item label="确认结果" prop="status">
+        <el-radio-group v-model="confirmData.status">
+          <el-radio :label="0">确认</el-radio>
+          <el-radio :label="1">提出异议</el-radio>
+        </el-radio-group>
       </el-form-item>
-      <el-form-item label="隐患所属机构名称" prop="orgName">
-        <el-input v-model="form.orgName" placeholder="请输入隐患所属机构名称" />
+      <el-form-item
+        label="异议内容"
+        prop="description"
+        v-if="confirmData.status == 1"
+      >
+        <el-input
+          v-model="confirmData.description"
+          maxlength="255"
+          placeHolder="请输入异议内容"
+        ></el-input>
       </el-form-item>
-      <el-form-item label="隐患所属机构path" prop="orgPath">
-        <el-input v-model="form.orgPath" placeholder="请输入隐患所属机构path" />
-      </el-form-item>
-      <el-form-item label="来源任务id" prop="srcTaskId">
-        <el-input v-model="form.srcTaskId" placeholder="请输入来源任务id" />
-      </el-form-item>
-      <el-form-item label="来源任务名称" prop="srcTaskName">
-        <el-input v-model="form.srcTaskName" placeholder="请输入来源任务名称" />
-      </el-form-item>
-      <el-form-item label="检查内容">
-        <editor v-model="form.checkContent" :min-height="192" />
-      </el-form-item>
-      <el-form-item label="隐患描述" prop="questionDesc">
-        <el-input v-model="form.questionDesc" placeholder="请输入隐患描述" />
-      </el-form-item>
-      <el-form-item label="提出人id" prop="submitorId">
-        <el-input v-model="form.submitorId" placeholder="请输入提出人id" />
+    </el-form>
+    <el-form
+      ref="confirmDissentForm"
+      :model="confirmDissentData"
+      label-width="100px"
+      class="form"
+      v-if="type == 'confirmDissent'"
+      :rules="confirmDissentRule"
+    >
+      <el-form-item label="审核结果" prop="status">
+        <el-radio-group v-model="confirmDissentData.status">
+          <el-radio :label="0">同意</el-radio>
+          <el-radio :label="1">不同意</el-radio>
+        </el-radio-group>
       </el-form-item>
-      <el-form-item label="提出人名称" prop="submitorName">
-        <el-input v-model="form.submitorName" placeholder="请输入提出人名称" />
+      <el-form-item
+        label="原因"
+        prop="description"
+        v-if="confirmDissentData.status == 1"
+      >
+        <el-input
+          v-model="confirmDissentData.description"
+          maxlength="255"
+        ></el-input>
       </el-form-item>
-      <el-form-item label="发现时间" prop="submitTime">
+    </el-form>
+    <el-form
+      ref="reformForm"
+      :model="reformData"
+      label-width="100px"
+      class="form"
+      v-if="type == 'reform'"
+      :rules="reformRule"
+    >
+      <el-form-item label="整改时间" prop="reformDate">
         <el-date-picker
-          clearable
-          v-model="form.submitTime"
+          v-model="reformData.reformDate"
           type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="请选择发现时间"
+          placeholder="选择日期"
+          :pickerOptions="pickerOptions"
         >
         </el-date-picker>
       </el-form-item>
+      <el-form-item label="整改描述" prop="description">
+        <el-input
+          v-model="reformData.description"
+          maxlength="255"
+          placeHolder="请输入整改描述"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="整改图片" prop="images">
+        <imgUpload
+          type="more"
+          :value="reformData.images"
+          @input="imageListChanged"
+        ></imgUpload>
+      </el-form-item>
     </el-form>
     <div slot="footer" class="dialog-footer">
       <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -46,6 +171,14 @@
   </el-dialog>
 </template>
 <script>
+import {
+  getQuestion,
+  confirm,
+  confirmDissent,
+  reform,
+} from "@/api/question/list.js";
+import dayjs from "dayjs";
+import imgUpload from "@/components/ImageUpload/index.vue";
 export default {
   data() {
     return {
@@ -57,74 +190,197 @@ export default {
       form: {},
       // 表单校验
       rules: {},
+      row: null,
+      type: null,
+      data: {},
+      confirmData: {
+        id: null,
+        status: 0,
+        description: null,
+      },
+      confirmDissentData: {
+        id: null,
+        status: 0,
+        description: null,
+      },
+      reformData: {
+        id: null,
+        reformDate: null,
+        description: null,
+        images: null,
+      },
+      confirmRule: {
+        description: [
+          { required: false, message: "请输入异议内容", trigger: "blur" },
+        ],
+      },
+
+      confirmDissentRule: {
+        description: [
+          { required: false, message: "请输入原因", trigger: "blur" },
+        ],
+      },
+      reformRule: {
+        reformDate: [
+          { required: true, message: "请选择整改日期", trigger: "blur" },
+        ],
+      },
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        },
+      },
     };
   },
-  methods:{
+  components: { imgUpload },
+  methods: {
+    dayjs,
     // 取消按钮
     cancel() {
       this.open = false;
       this.reset();
     },
+    show(row, type) {
+      this.row = row;
+      this.type = type;
+      this.setTitle(type);
+      getQuestion(row.id).then((r) => {
+        this.data = r.data;
+        this.data.confirmDissent = r.data.flows.find((d) => d.executeStep == 1);
+        this.data.confirm = r.data.flows.find((d) => d.executeStep == 2);
+        this.data.reform = r.data.flows.find((d) => d.executeStep == 10);
+        this.open = true;
+      });
+    },
+    setTitle(type) {
+      switch (type) {
+        case "detail":
+          this.title = "详情";
+          break;
+        case "confirm":
+          this.title = "隐患确认";
+          break;
+        case "confirmDissent":
+          this.title = "异议审批";
+          break;
+        case "reform":
+          this.title = "隐患整改";
+          break;
+      }
+    },
     // 表单重置
     reset() {
-      this.form = {
+      this.confirmData = {
+        id: null,
+        status: 0,
+        description: null,
+      };
+      this.confirmDissentData = {
         id: null,
-        orgId: null,
-        orgName: null,
-        orgPath: null,
-        srcType: null,
-        srcTaskId: null,
-        srcTaskName: null,
-        checkContent: null,
-        questionDesc: null,
-        submitorId: null,
-        submitorName: null,
-        submitTime: null,
-        confirmStatus: null,
-        reformStatus: null,
-        createTime: null,
-        updateTime: null,
-        createBy: null,
-        updateBy: null
+        status: 0,
+        description: null,
       };
-      this.resetForm("form");
+      this.reformData = {
+        id: null,
+        reformDate: null,
+        description: null,
+        images: null,
+      };
+      this.resetForm("confirmForm");
+      this.resetForm("confirmDissentForm");
+      this.resetForm("reformForm");
+    },
+    imageListChanged(value) {
+      this.reformData.images = value;
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateQuestion(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addQuestion(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
+      if (this.type == "confirm") {
+        this.submitConfirm();
+      } else if (this.type == "confirmDissent") {
+        this.submitConfirmDissent();
+      } else if (this.type === "reform") {
+        this.submitReform();
+      }
+    },
+    submitConfirm() {
+      this.$refs["confirmForm"].validate((valid) => {
+        if (!valid) {
+          return;
         }
+        let data = { ...this.confirmData, id: this.data.id };
+        confirm(data).then((r) => {
+          if (r.data) {
+            this.$message.info("确认成功");
+            this.$emit("success");
+            this.open = false;
+          }
+        });
       });
     },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加隐患问题清单";
+    submitConfirmDissent() {
+      this.$refs["confirmDissentForm"].validate((valid) => {
+        if (!valid) {
+          return;
+        }
+        let data = { ...this.confirmDissentData, id: this.data.id };
+        confirmDissent(data).then((r) => {
+          if (r.data) {
+            this.$message.info("异议审批成功");
+            this.$emit("success");
+            this.open = false;
+          }
+        });
+      });
     },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getQuestion(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改隐患问题清单";
+    submitReform() {
+      this.$refs["reformForm"].validate((valid) => {
+        if (!valid) {
+          return;
+        }
+        let data = { ...this.reformData, id: this.data.id };
+        reform(data).then((r) => {
+          if (r.data) {
+            this.$message.info("整改成功");
+            this.$emit("success");
+            this.open = false;
+          }
+        });
       });
     },
-  }
+    // handleConfirmStatusChange(value) {
+    //   if (value == 1) {
+    //     this.confirmRule["description"].required = true;
+    //   } else {
+    //     this.confirmRule["description"].required = false;
+    //   }
+    // },
+    // handleConfirmDissentStatusChange(value) {
+    //   if (value == 1) {
+    //     this.confirmDissentRule["description"].required = true;
+    //   } else {
+    //     this.confirmRule["description"].required = false;
+    //   }
+    // },
+  },
 };
 </script>
+<style lang="scss" scoped>
+.contentArea {
+  border-bottom: 1px solid #606266;
+  padding-bottom: 20px;
+
+  ::v-deep .el-descriptions-item__label {
+    width: 100px;
+    text-align: right;
+    display: inline-block;
+  }
+}
+.form {
+  padding-top: 20px;
+}
+.imageList div {
+  margin-left: 5px;
+  margin-right: 5px;
+}
+</style>

+ 174 - 55
src/views/question/list/index.vue

@@ -18,21 +18,52 @@
           v-show="showSearch"
           label-width="68px"
         >
-          <el-form-item label="隐患所属机构" prop="orgId">
+          <el-form-item label="关键字" prop="searchKey">
             <el-input
-              v-model="queryParams.orgId"
-              placeholder="请输入隐患所属机构"
+              v-model="queryParams.searchKey"
+              placeholder="请输入关键字"
               clearable
-              @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-          <el-form-item label="发现时间" prop="submitTime">
+          <el-form-item prop="confirmStatus" label="确认状态">
+            <el-select
+              prop="confirmStatus"
+              label="确认状态"
+              v-model="queryParams.confirmStatus"
+              placeholder="请选择确认状态"
+              clearable
+            >
+              <el-option
+                v-for="dict in dict.type.question_confirm_status"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="reformStatus" label="整改状态">
+            <el-select
+              prop="reformStatus"
+              label="整改状态"
+              v-model="queryParams.reformStatus"
+              placeholder="请选择整改状态"
+              clearable
+            >
+              <el-option
+                v-for="dict in dict.type.question_reform_status"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="发现日期" prop="submitTime">
             <el-date-picker
               clearable
               v-model="queryParams.submitTime"
-              type="date"
+              type="daterange"
               value-format="yyyy-MM-dd"
-              placeholder="请选择发现时间"
+              placeholder="请选择发现日期"
             >
             </el-date-picker>
           </el-form-item>
@@ -51,7 +82,7 @@
         </el-form>
 
         <el-row :gutter="10" class="mb8">
-          <el-col :span="1.5">
+          <!-- <el-col :span="1.5">
             <el-button
               type="warning"
               plain
@@ -61,7 +92,7 @@
               v-hasPermi="['system:question:export']"
               >导出</el-button
             >
-          </el-col>
+          </el-col> -->
           <right-toolbar
             :showSearch.sync="showSearch"
             @queryTable="getList"
@@ -71,76 +102,130 @@
         <el-table
           v-loading="loading"
           :data="questionList"
-          @selection-change="handleSelectionChange"
         >
-          <el-table-column type="selection" width="55" align="center" />
-          <el-table-column label="${comment}" align="center" prop="id" />
+          <el-table-column
+            type="index"
+            label="序号"
+            width="60px"
+            v-if="columns[0].visible"
+          ></el-table-column>
           <el-table-column
             label="隐患所属机构名称"
             align="center"
             prop="orgName"
+            v-if="columns[1].visible"
           />
           <el-table-column
             label="来源任务名称"
             align="center"
             prop="srcTaskName"
+            v-if="columns[2].visible"
           />
           <el-table-column
             label="检查内容"
             align="center"
             prop="checkContent"
+            v-if="columns[3].visible"
           />
           <el-table-column
             label="隐患描述"
             align="center"
             prop="questionDesc"
+            v-if="columns[4].visible"
           />
           <el-table-column
             label="提出人名称"
             align="center"
             prop="submitorName"
+            width="100px"
+            v-if="columns[5].visible"
           />
           <el-table-column
-            label="发现时间"
+            label="发现日期"
             align="center"
             prop="submitTime"
-            width="180"
+            width="120"
+            v-if="columns[6].visible"
           >
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.submitTime, "{y}-{m}-{d}") }}</span>
+              <span>{{
+                dayjs(scope.row.submitTime).format("YYYY-MM-DD")
+              }}</span>
             </template>
           </el-table-column>
           <el-table-column
-            label="确认状态。0未确认,1提出异议,2已确认,3已关闭"
+            label="确认状态"
             align="center"
+            width="80px"
             prop="confirmStatus"
-          />
+            v-if="columns[7].visible"
+          >
+            <template slot-scope="scope">
+              <span>{{
+                getLabel(
+                  dict.type.question_confirm_status,
+                  scope.row.confirmStatus
+                )
+              }}</span>
+            </template>
+          </el-table-column>
           <el-table-column
-            label="整改状态。5未整改,6已整改"
+            label="整改状态"
             align="center"
             prop="reformStatus"
-          />
+            width="80px"
+            v-if="columns[8].visible"
+          >
+            <template slot-scope="scope">
+              <span>{{
+                getLabel(
+                  dict.type.question_reform_status,
+                  scope.row.reformStatus
+                )
+              }}</span>
+            </template>
+          </el-table-column>
           <el-table-column
             label="操作"
             align="center"
+            width="120px"
             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="['system:question:edit']"
-                >修改</el-button
+                icon="el-icon-tickets"
+                @click="handleDetail(scope.row)"
+                v-hasPermi="['question:list:query']"
+                >详情</el-button
               >
               <el-button
                 size="mini"
                 type="text"
-                icon="el-icon-delete"
-                @click="handleDelete(scope.row)"
-                v-hasPermi="['system:question:remove']"
-                >删除</el-button
+                icon="el-icon-s-check"
+                @click="handleConfirm(scope.row)"
+                v-hasPermi="['question:list:confirm']"
+                v-if="scope.row.orgId==orgId && scope.row.confirmStatus==0"
+                >隐患确认</el-button
+              >
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-s-flag"
+                @click="handleConfirmDissent(scope.row)"
+                v-hasPermi="['question:list:confirmDissent']"
+                v-if="scope.row.submitorId==userId && scope.row.confirmStatus==1"
+                >异议审批</el-button
+              >
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-s-unfold"
+                @click="handleReform(scope.row)"
+                v-hasPermi="['question:list:reform']"
+                v-if="scope.row.orgId==orgId && scope.row.confirmStatus==2 && scope.row.reformStatus==10"
+                >整改</el-button
               >
             </template>
           </el-table-column>
@@ -155,6 +240,7 @@
         />
       </el-col>
     </el-row>
+    <Dialog ref="dialog" @success="getList()"></Dialog>
   </div>
 </template>
 
@@ -166,19 +252,23 @@ import {
   addQuestion,
   updateQuestion,
 } from "@/api/question/list.js";
-
+import OrgTree from "@/components/orgTree";
+import Dialog from "./dialog.vue";
+import { mapGetters } from "vuex";
+import dayjs from "dayjs";
+import { getLabel } from "./../../commonOption";
 export default {
   name: "Question",
   data() {
     return {
       // 遮罩层
       loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
+      // // 选中数组
+      // ids: [],
+      // // 非单个禁用
+      // single: true,
+      // // 非多个禁用
+      // multiple: true,
       // 显示搜索条件
       showSearch: true,
       // 总条数
@@ -190,17 +280,34 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        orgId: null,
+        orgId: this.orgId,
         submitTime: null,
         confirmStatus: null,
         reformStatus: null,
+        checkSub: true,
       },
+      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 },
+        { key: 6, label: `发现日期`, visible: true },
+        { key: 7, label: `确认状态`, visible: true },
+        { key: 8, label: `整改状态`, visible: true },
+      ],
     };
   },
-  created() {
-    this.getList();
+  dicts: ["question_confirm_status", "question_reform_status"],
+  components: { OrgTree, Dialog },
+  computed: {
+    ...mapGetters(["orgId","userId"]),
   },
+  created() {},
   methods: {
+    dayjs,
+    getLabel,
     /** 查询隐患问题清单列表 */
     getList() {
       this.loading = true;
@@ -221,25 +328,23 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
-      this.single = selection.length !== 1;
-      this.multiple = !selection.length;
+    // // 多选框选中数据
+    // handleSelectionChange(selection) {
+    //   this.ids = selection.map((item) => item.id);
+    //   this.single = selection.length !== 1;
+    //   this.multiple = !selection.length;
+    // },
+    handleDetail(row){
+      this.$refs.dialog.show(row,'detail')
     },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal
-        .confirm('是否确认删除隐患问题清单编号为"' + ids + '"的数据项?')
-        .then(function () {
-          return delQuestion(ids);
-        })
-        .then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        })
-        .catch(() => {});
+    handleConfirm(row){
+      this.$refs.dialog.show(row,'confirm')
+    },
+    handleConfirmDissent(row){
+      this.$refs.dialog.show(row,'confirmDissent')
+    },
+    handleReform(row){
+      this.$refs.dialog.show(row,'reform')
     },
     /** 导出按钮操作 */
     handleExport() {
@@ -251,6 +356,20 @@ export default {
         `question_${new Date().getTime()}.xlsx`
       );
     },
+    //单选框状态改变
+    checkChange(state) {
+      this.queryParams.checkSub = state;
+      this.getList();
+    },
+    getDefaultKey(key) {
+      this.queryParams.orgId = key;
+      this.getList();
+    },
+    // 节点单击事件
+    clickTreeNode(data) {
+      this.queryParams.orgId = data.id;
+      this.getList();
+    },
   },
 };
 </script>

+ 1 - 24
src/views/resumption/rule/index.vue

@@ -92,30 +92,7 @@
               >新增</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="['system:user: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="['system:user:remove']"
-              >删除</el-button
-            > 
-          </el-col>-->
+
 
           <right-toolbar
             :showSearch.sync="showSearch"