فهرست منبع

修复界面缺陷

jiawuxian 1 سال پیش
والد
کامیت
40a2e48da9

+ 2 - 2
src/router/index.js

@@ -259,7 +259,7 @@ export const dynamicRoutes = [
         path: "content/:id(\\d+)",
         component: () => import("@/views/safetycheck/ruleManager/index.vue"),
         name: "safetycheckRuleManager",
-        meta: { title: "检查内容管理", activeMenu: "/safetycheck/rule" },
+        meta: { title: "管理检查内容", activeMenu: "/safetycheck/rule" },
       },
     ],
   },
@@ -273,7 +273,7 @@ export const dynamicRoutes = [
         path: "content/:id(\\d+)",
         component: () => import("@/views/resumption/ruleManager/index.vue"),
         name: "resumptionRuleManager",
-        meta: { title: "履职内容管理", activeMenu: "/resumption/rule" },
+        meta: { title: "管理履职内容", activeMenu: "/resumption/rule" },
       },
     ],
   },

+ 2 - 2
src/views/resumption/protection/dialog.history.vue

@@ -21,9 +21,9 @@
           <el-descriptions-item labelClassName="gx_info_label" label="报警控制器名称:">
             {{ protection.name }}
           </el-descriptions-item>
-          <el-descriptions-item labelClassName="gx_info_label" label="24小时报警控制器:">
+          <!-- <el-descriptions-item labelClassName="gx_info_label" label="24小时报警控制器:">
             {{ protection.allHour ? "是" : "否" }}
-          </el-descriptions-item>
+          </el-descriptions-item> -->
          
         </el-descriptions>
          <div>

+ 1 - 1
src/views/resumption/taskManager/index.vue

@@ -33,7 +33,7 @@
 
               <!-- <el-row>
                 <el-col :span="5"> -->
-              <el-form-item label="任务名称" prop="planId">
+              <el-form-item label="任务名称" prop="taskName">
                 <el-input placeholder="请输入任务名称" v-model="queryParams.taskName" clearable/>
                 <!-- <el-select
                   v-model="queryParams.planId"

+ 150 - 0
src/views/safetycheck/plan/dialog.detail.vue

@@ -0,0 +1,150 @@
+<template>
+  <div class="rule-type">
+    <DialogCom title="检查任务详情" :visible.sync="isShow" width="1500px" >
+      <el-descriptions :column="4" border :label-style="labelStyle" :contentStyle="content_style">
+        <el-descriptions-item label="任务名称">{{
+          formData.planName
+        }}</el-descriptions-item>
+        <el-descriptions-item label="任务类型">{{
+          getLabel(dict.type.check_type, formData.checkType)
+        }}</el-descriptions-item>
+        <el-descriptions-item label="任务周期">{{
+          getLabel(dict.type.check_cycle, formData.planCycle)
+        }}</el-descriptions-item>
+        <el-descriptions-item label="开始时间" v-if="formData.planCycle == 6">{{
+          dayjs(formData.startDate).format("YYYY-MM-DD")
+        }}</el-descriptions-item>
+        <el-descriptions-item label="结束时间" v-if="formData.planCycle == 6">{{
+          dayjs(formData.endDate).format("YYYY-MM-DD")
+        }}</el-descriptions-item>
+        <el-descriptions-item label="机构主体类型">{{
+          getLabel(orgTypeOptions, formData.execOrgType)
+        }}</el-descriptions-item>
+        <el-descriptions-item label="检查人员">
+          {{
+            formData.roleList .map((r) => r.roleName).join("、") 
+          }}
+        </el-descriptions-item>
+        <el-descriptions-item label="受检机构类型">{{
+          formData.checkOrgTypeList
+            .map((t) => getLabel(orgTypeOptions, t.typeId))
+            .join("、")
+        }}</el-descriptions-item>
+        <el-descriptions-item label="任务次数" :span="formData.planCycle!=6 ?2:1">{{
+          formData.count
+        }}</el-descriptions-item>
+        <el-descriptions-item
+          label="检查主体"
+          :span="4"
+          v-if="formData.execOrgList && formData.execOrgList.length > 0"
+          >{{
+            formData.execOrgList.map((org) => org.shortName).join("、")
+          }}</el-descriptions-item
+        >
+        <el-descriptions-item
+          label="受检机构"
+          :span="4"
+          v-if="formData.checkOrgList && formData.checkOrgList.length > 0"
+          >{{
+            formData.checkOrgList.map((org) => org.shortName).join("、")
+          }}</el-descriptions-item
+        >
+        <el-descriptions-item label="备注" :span="formData.planCycle!=6">{{
+          formData.note
+        }}</el-descriptions-item>
+      </el-descriptions>
+      <el-table :data="tableData" style="width: 100%" height="400px">
+        <el-table-column label="是否扫描">
+          <template v-slot="{ row }">
+            {{ row.pointScan ? "是" : "否" }}
+          </template>
+        </el-table-column>
+        <el-table-column label="必完成项">
+          <template v-slot="{ row }">
+            {{ row.required ? "是" : "否" }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="ruleName" label="检查手册"> </el-table-column>
+        <el-table-column prop="itemName" label="检查项"> </el-table-column>
+        <el-table-column prop="pointName" label="检查内容" width="300px">
+          <template slot-scope="scope">
+            <pre>{{ scope.row.pointName }}</pre>
+          </template>
+        </el-table-column>
+        <el-table-column prop="areaName" label="检查区域"> </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer" style="margin-top: 20px">
+        <el-button @click="onHide">关闭</el-button>
+      </div>
+    </DialogCom>
+  </div>
+</template>
+
+<script>
+import { findAllRole } from "@/api/system/role";
+import * as api from "@/api/safetycheck/plan";
+import { getLabel } from "@/views/commonOption.js";
+import dayjs from 'dayjs';
+export default {
+  dicts: ["check_type", "check_cycle", "check_status"],
+  props: {
+    orgTypeOptions: {
+      type: Array,
+    },
+  },
+  data() {
+    return {
+      isShow: false,
+      tableData: [],
+      formData: {
+        roleList: [],
+        checkOrgTypeList: [],
+      },
+      // resumptionRoles: [],
+      labelStyle: {
+        color: "#000",
+        "text-align": "center",
+        height: "40px",
+        "width": "150px",
+        "word-break": "keep-all",
+      },content_style: {
+        "text-align": "left",
+         "min-width": "150px",
+         "text-wrap":'no-wrap'
+        // "word-break": "break-all",
+      },
+    };
+  },
+  methods: {
+    getLabel,
+    dayjs,
+    show(id) {
+      this.tableData = null;
+      api.get(id).then((r) => {
+        this.formData = r.data;
+        this.tableData = r.data.rulePointList;
+        this.isShow = true;
+        // if (this.formData.execOrgType) {
+        //   this.getRolesByOrg();
+        // }
+      });
+    },
+    // getRolesByOrg() {
+    //   if (this.formData.execOrgType != null) {
+    //     let params = {
+    //       orgType: this.formData.execOrgType,
+    //     };
+
+    //     findAllRole(params).then((res) => {
+    //       this.resumptionRoles = res.data;
+    //     });
+    //   }
+    // },
+    onHide() {
+      this.isShow = false;
+    },
+  },
+};
+</script>
+
+<style></style>

+ 35 - 10
src/views/safetycheck/plan/index.vue

@@ -366,7 +366,7 @@
                   >撤回</el-button
                 >
                 <el-button
-                  v-if="eqOrg(r.row)"
+                  v-if="showEditBtn(r.row)"
                   size="mini"
                   type="text"
                   icon="el-icon-edit-outline"
@@ -375,6 +375,14 @@
                   >编辑</el-button
                 >
                 <el-button
+                  v-if="!showEditBtn(r.row)"
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit-outline"
+                  @click="onDetail(r.row.id)"
+                  >详情</el-button
+                >
+                <el-button
                   v-if="showDelete(r.row)"
                   size="mini"
                   type="text"
@@ -405,6 +413,11 @@
     ></dialog-edit>
     <DialogDistribute ref="dialogDistribute" @select="sel"></DialogDistribute>
     <DialogThreeState ref="DialogThreeState"> </DialogThreeState>
+    <dialog-detail
+      ref="detailDialog"
+      :orgTypeOptions="orgTypeOptions"
+      :ruleTypeOptions="dict.type.rule_type"
+    ></dialog-detail>
   </div>
 </template>
 
@@ -413,6 +426,7 @@ import DialogDistribute from "./distribute.vue";
 import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
 import { mapState, mapMutations, mapGetters } from "vuex";
 import DialogEdit from "./dialog.edit";
+import DialogDetail from "./dialog.detail";
 import * as api from "@/api/safetycheck/plan";
 import { statusOptions, getLabel } from "@/views/commonOption";
 import { listRole } from "@/api/system/role";
@@ -431,6 +445,7 @@ export default {
     OrgTree,
     DialogDistribute,
     DialogThreeState,
+    DialogDetail
   },
   data() {
     const { params, query } = this.$route;
@@ -499,18 +514,15 @@ export default {
     ...mapMutations([]),
 
     //判断是否跟当前用户同机构
-    eqOrg(row) {
+    showEditBtn(row) {
       // console.log(row.planOfOrgId,"row.planOfOrgId");
       // console.log(this.orgId,"this.orgId");
-      if (
-        row != null &&
-        row != undefined &&
-        (row.planCreateOrgId == this.orgId ||
-          (row.planOfOrgType == 3 && row.planOfOrgId == this.orgId))
-      ) {
-        return true;
+      if (row == null || row == undefined) {
+        return false;
       }
-      return false;
+
+      //只能编辑所属机构是自己的
+      return row.planOfOrgId == this.orgId;
     },
     showDialogDistribute(row) {
       //行社的计划,或检查机构类型是省联社、办事处,走单个下发
@@ -633,6 +645,16 @@ export default {
 
       return false;
     },
+    // showEditBtn(row) {
+    //   if (row == null || row == undefined) {
+    //     return false;
+    //   }
+
+    //   //只能编辑所属机构是自己的
+    //   return row.planOfOrgId == this.orgId;
+    //   // console.log(row.planOfOrgId,"row.planOfOrgId");
+    //   // console.log(this.orgId,"this.orgId");
+    // },
     splitRoleNames(val) {
       if (val != null && val != undefined) {
         return val.split(",");
@@ -769,6 +791,9 @@ export default {
     onEdit(id, other = {}) {
       this.$refs.editDialog.show(id, other);
     },
+    onDetail(id) {
+      this.$refs.detailDialog.show(id);
+    },
     async onDel(row) {
       let msg = "";
       if (row.planStatus == 0) {

+ 19 - 15
src/views/safetycheck/task/index.vue

@@ -44,7 +44,7 @@
               <el-form-item label="检查人员" prop="roleId">
                 <el-select
                   v-model="queryParams.roleId"
-                  placeholder="请选择用户角色"
+                  placeholder="请选择检查人员"
                   clearable
                 >
                   <el-option
@@ -345,7 +345,10 @@
                 <el-button
                   type="text"
                   @click="showscanRecord(r.row)"
-                  v-if="(r.row.status == 2 || r.row.status == 3) && r.row.sourceType=='0'"
+                  v-if="
+                    (r.row.status == 2 || r.row.status == 3) &&
+                    r.row.sourceType == '0'
+                  "
                   v-hasPermi="['core:task:query']"
                   icon="el-icon-view"
                   >扫描记录</el-button
@@ -415,7 +418,7 @@ import { checkPermi } from "@/utils/permission.js";
 import dayjs from "dayjs";
 import { deptTreeSelect } from "@/api/system/public";
 import request from "@/utils/request";
-import {newline} from "js-beautify/js/src/javascript/acorn";
+import { newline } from "js-beautify/js/src/javascript/acorn";
 export default {
   name: "Saftask",
   dicts: ["resumption_plan_cycle", "resumption_status", "safety_check_status"],
@@ -448,8 +451,9 @@ export default {
         pageSize: 10,
         planStartTime: null,
         title: null,
+        roleId: null,
         checkOrgIds: null,
-        range: [new Date(),new Date()],
+        range: [new Date(), new Date()],
       },
       selectedOrgName: null,
       pageData: [],
@@ -485,14 +489,14 @@ export default {
   computed: {
     ...mapGetters(["orgName", "userId", "roleList", "orgId"]),
   },
-  beforeRouteEnter(to,from,next){
-    console.log(from,'to')
-    if(from.path === '/home'){
-      next(vm=>{
+  beforeRouteEnter(to, from, next) {
+    console.log(from, "to");
+    if (from.path === "/home") {
+      next((vm) => {
         vm.queryParams.status = to.query.status;
-      })
-    }else {
-      next()
+      });
+    } else {
+      next();
     }
   },
   activated() {
@@ -606,7 +610,7 @@ export default {
       this.selectedOrgName = this.orgName;
       this.queryParams.checkSub = true;
       this.$refs["orgTree"].setCheckSub(this.queryParams.checkSub);
-      this.queryParams.range = [new Date(),new Date()];
+      this.queryParams.range = [new Date(), new Date()];
 
       this.refresh();
     },
@@ -629,9 +633,9 @@ export default {
           }
         });
     },
-    refresh(){
-      this.queryParams.pageNum=1;
-      this.queryParams.pageSize=10;
+    refresh() {
+      this.queryParams.pageNum = 1;
+      this.queryParams.pageSize = 10;
       this.getList();
     },
     async getList() {