Procházet zdrojové kódy

Merge branch 'V0.0.4' of http://10.87.21.221:8000/jzyd_yyds/soc_web into V0.0.4

luowei před 1 rokem
rodič
revize
5a2302b116

+ 5 - 4
.env.development

@@ -10,13 +10,14 @@ ENV = 'development'
 #罗俊
 # VUE_APP_BASE_API = 'http://10.87.10.49:8080'
 #罗伟
-VUE_APP_BASE_API = 'http://10.87.21.103:8080'
+# VUE_APP_BASE_API = 'http://10.87.10.47:8080'
 #高雄
 #VUE_APP_BASE_API = 'http://10.87.11.94:8080'
-# VUE_APP_BASE_API = 'http://localhost:8080'
+#景远超
+# VUE_APP_BASE_API = 'http://10.87.11.173:8080'
+#VUE_APP_BASE_API = 'http://localhost:8080'
 # 55环境
-#VUE_APP_BASE_API = 'http://10.87.10.55:8080'
-
+VUE_APP_BASE_API = 'http://10.87.21.103:8080'
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
 

+ 2 - 2
src/components/RightToolbar/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="top-right-btn" :style="style">
     <el-row>
-      <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top" v-if="search">
-        <el-button size="mini" circle icon="el-icon-view" @click="toggleSearch()" />
+      <el-tooltip class="item" effect="dark" :content="showSearch ? '折叠搜索' : '展开搜索'" placement="top" v-if="search">
+        <el-button size="mini" circle :icon="showSearch ? 'el-icon-top':'el-icon-bottom'" @click="toggleSearch()" />
       </el-tooltip>
       <el-tooltip class="item" effect="dark" content="刷新" placement="top">
         <el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" />

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

@@ -118,7 +118,7 @@ export default {
   },
 };
 </script>
-<style scoped lang="scss">
+<style  lang="scss" scoped>
 ::v-deep {
   .vue-treeselect__menu {
     overflow-x: auto !important;

+ 17 - 26
src/router/index.js

@@ -116,17 +116,8 @@ export const constantRoutes = [
         meta: { title: '个人中心', icon: 'user' }
       }
     ]
-  },{
-    path: '/safetycheck/register',
-    component: Layout,    
-    hidden: true,
-    children:[{
-      path:'add',
-      name:'addRegister',
-      component: () => import('@/views/safetycheck/taskManager/components/register.vue'),
-      meta:{title:'检查登记'}
-    }]
-  },{
+  }
+  ,{
     path: '/safetycheck/tempregister',
     component: Layout,    
     hidden: true,
@@ -134,22 +125,10 @@ export const constantRoutes = [
     children:[{
       path:'add',
       name:'tempRegister',
-      component: () => import('@/views/safetycheck/taskManager/components/checkRegister.vue'),
+      component: () => import('@/views/safetycheck/task/components/checkRegister.vue'),
       meta:{title:'临时登记'}
     }]
-  },
-  {
-    path: '/board',
-    component: Layout,    
-    hidden: true,
-    permissions: ['core:cockpit'],
-    children:[{
-      path:'',
-      name:'board',
-      component: () => import('@/views/board/index.vue'),
-      meta:{title:'驾驶舱'}
-    }]
-  },
+  }
 ]
 
 // 动态路由,基于用户权限动态去加载
@@ -246,12 +225,24 @@ export const dynamicRoutes = [
     children: [
       {
         path: 'register/:taskId(\\d+)',
-        component: () => import('@/views/safetycheck/taskManager/components/register.vue'),
+        component: () => import('@/views/safetycheck/task/components/register.vue'),
         name: 'safetyCheckRegister',
         meta: { title: '检查任务', activeMenu: '/safetycheck/taskmanager' }
       }
     ]
   },
+  ,{
+    path: '/core/safetycheck',
+    component: Layout,    
+    hidden: true,
+    permissions: ['core:task:query'],
+    children:[{
+      path:'detail/:taskId(\\d+)',
+      name:'safetyTaskDetail',
+      component: () => import('@/views/safetycheck/task/components/detail.vue'),
+      meta:{title:'检查任务详情'}
+    }]
+  },
   {
     path: '/core/safetycheck/rule',
     component: Layout,

+ 2 - 2
src/views/core/outIn/letter/dialog.addletter.vue

@@ -216,7 +216,7 @@ export default {
         reasons: [{ required: true, message: "请输入出入事由" }],
         letterNo: [{ required: true, message: "请输入介绍信编号" }],
         receptionOrgIds: [{ required: true, message: "请选择接待机构" }],
-        startDate: [{ required: true, message: "请选择开具日期" }],      
+        startTime: [{ required: true, message: "请选择开具日期" }],      
         effectiveDays: [{ required: true, message: "请选择有效天数" }],   
         userInfos: [{ required: true, message: "请添加出入人员" }],
         letterFile:[{ required: true, message: "请上传介绍信" }],
@@ -277,7 +277,7 @@ export default {
 
     async show(id, other = {}) {     
       if (id) {
-        this.title = "修改介绍信";   
+        this.title = "编辑介绍信";   
         this.isShow = true;
         getLetter(id).then((response) => {
           // let tempRange=[];

+ 2 - 2
src/views/core/outIn/letter/dialog.letter.detail.vue

@@ -89,9 +89,9 @@
                     </template> 
                </el-table-column>            
           </el-table>
-          <el-row :gutter="10" class="mb8">
+          <el-row :gutter="10">
             <el-col :span="12">
-                <h3 class="title">
+                <h3 >
                   <i class="el-icon-collection-tag"></i>
                   接待机构
                 </h3> 

+ 2 - 2
src/views/core/outIn/letter/index.vue

@@ -11,7 +11,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="出入事由" prop="reasons">
+      <el-form-item label="来访事由" prop="reasons">
         <el-input
           v-model="queryParams.reasons"
           placeholder="请输入关键字"
@@ -241,7 +241,7 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除介绍信编号为"' + ids + '"的数据项?').then(function() {
+      this.$modal.confirm('是否确认删除介绍信编号为 "' + row.letterNo + '" 的数据项?').then(function() {
         return delLetter(ids);
       }).then(() => {
         this.getList();

+ 34 - 7
src/views/resumption/taskManager/index.vue

@@ -2,15 +2,15 @@
   <div class="app-container">
     <el-row :gutter="10">
       <!--机构数据-->
-      <el-col :span="4" :xs="24">
+      <!-- <el-col :span="4" :xs="24">
         <org-tree
           v-model="queryParams.orgId"
           @defaultOrg="getDefaultOrg"
           @checkChange="checkChange"
           @click="clickTreeNode"
         ></org-tree>
-      </el-col>
-      <el-col :span="20" :xs="24">
+      </el-col> -->
+      <el-col :span="24" :xs="24">
         <div class="main-right-box">
           <!--    搜索条件    -->
           <div class="main-search-box">
@@ -20,8 +20,24 @@
               size="small"
               :inline="true"
               v-show="showSearch"
-              label-width="100px"
             >
+              <el-form-item label="任务名称" prop="orgId">
+                <div style="display: flex; width: 460px">
+                  <div style="width: 300px; margin-right: 10px">
+                    <orgDropDown
+                      v-model="queryParams.orgId"
+                      placeholder="选择机构"
+                      @select="clickTreeNode"
+                      orgTreeType="org"
+                    />
+                  </div>
+
+                  <el-checkbox v-model="queryParams.checkSub"
+                    >关联下级所有数据</el-checkbox
+                  >
+                </div>
+              </el-form-item>
+
               <!-- <el-row>
                 <el-col :span="5"> -->
               <el-form-item label="任务名称" prop="planId">
@@ -132,7 +148,6 @@
             <el-table-column
               header-align="center"
               align="center"
-              type="index"
               fixed
               width="60px"
               label="序号"
@@ -270,6 +285,7 @@ import { mapGetters } from "vuex";
 import DialogDetail from "./dialog.detail";
 import DialogScanRecord from "./dialog.scanrecord";
 import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
+import orgDropDown from "@/components/orgTree/orgDropDown.vue";
 import OrgTree from "@/components/orgTree";
 import * as api from "@/api/resumption/taskManger.js";
 import { getLabel } from "@/views/commonOption.js";
@@ -278,7 +294,13 @@ import dayjs from "dayjs";
 export default {
   name: "overviewDetialList",
   dicts: ["resumption_plan_cycle", "resumption_status"],
-  components: { DialogDetail, DialogScanRecord, DataRangePicker, OrgTree },
+  components: {
+    DialogDetail,
+    DialogScanRecord,
+    DataRangePicker,
+    OrgTree,
+    orgDropDown,
+  },
   data() {
     let sDate = new Date();
     let eDate = new Date();
@@ -345,7 +367,7 @@ export default {
     },
   },
   computed: {
-    ...mapGetters(["orgName"]),
+    ...mapGetters(["orgName","orgId"]),
   },
   methods: {
     getLabel,
@@ -396,6 +418,9 @@ export default {
     },
     // 节点单击事件
     clickTreeNode(data) {
+      if(data==null){
+        return;
+      }
       this.queryParams.orgId = data.id;
       this.selectedOrgName = data.shortName;
       this.loadPlanList();
@@ -484,6 +509,8 @@ export default {
     },
   },
   async mounted() {
+    this.queryParams.orgId=this.orgId   
+    console.info("this.queryParams.orgId",this.queryParams.orgId)
     // let tabs=this.$tab;
     // debugger
     // const { params, query } = this.$route;

+ 1 - 0
src/views/resumptionEvaluate/evaluate/index.vue

@@ -377,6 +377,7 @@ export default {
     resetQuery() {
       this.resetForm("queryForm");
       this.queryParams.onlyManager = false;
+      this.queryParams.orgType = null;
       this.handleQuery();
     },
     reset() {

+ 35 - 30
src/views/resumptionEvaluate/evaluatePlan/index.vue

@@ -20,8 +20,9 @@
               ref="queryForm"
               size="small"
               :inline="true"
-              v-show="showSearch" >
-              <el-form-item label="外包评价名称" >
+              v-show="showSearch"
+            >
+              <el-form-item label="外包评价名称">
                 <el-input
                   :maxlength="20"
                   v-model="queryParams.evaluateName"
@@ -45,26 +46,28 @@
                 </el-select>
               </el-form-item>
 
-            
-                <el-form-item  label="计划时间">
-                  <el-date-picker
-                    v-model="queryParams.dataTime"
-                    type="daterange"
-                    range-separator="至"
-                    start-placeholder="开始日期"
-                    end-placeholder="结束日期"
-                    value-format="yyyy-MM-dd"
-                    
-                    @change="changeHandler"
-                  >
-                  </el-date-picker>
-                </el-form-item>
-                
-            
+              <el-form-item label="计划时间">
+                <DataRangePicker
+                  v-model="queryParams.dataTime"
+                  key="daterange"
+                  type="daterange"
+                  value-format="yyyy-MM-dd"
+                  @input="changeHandler"
+                />
+                <!-- <el-date-picker
+                  v-model="queryParams.dataTime"
+                  type="daterange"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                  value-format="yyyy-MM-dd"
+                  @input="changeHandler"
+                > -->
+                <!-- </el-date-picker> -->
+              </el-form-item>
             </el-form>
             <el-row :gutter="10" class="mb8">
               <el-col :span="1.5">
-                
                 <el-button
                   type="primary"
                   icon="el-icon-search"
@@ -73,7 +76,7 @@
                   >搜索</el-button
                 >
                 <el-button
-                type="primary"
+                  type="primary"
                   icon="el-icon-refresh"
                   size="mini"
                   @click="resetQuery"
@@ -117,7 +120,6 @@
               label="操作"
               width="180"
               fixed="right"
-         
               class-name="small-padding fixed-width"
             >
               <template slot-scope="{ row }">
@@ -129,7 +131,7 @@
                   icon="el-icon-plus"
                   >评价</el-button
                 >
-               
+
                 <el-button
                   size="mini"
                   @click="editHandler(row)"
@@ -157,6 +159,7 @@
 </template>
 <script>
 import { mapGetters } from "vuex";
+import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
 
 import { getEvaluatePage } from "@/api/core/evalulateTask.js";
 import OrgTree from "@/components/orgTree";
@@ -166,6 +169,7 @@ export default {
   dicts: ["sys_org_type", "evaluate_task_status"],
   components: {
     OrgTree,
+    DataRangePicker,
     editEvaluate,
   },
   data() {
@@ -209,7 +213,7 @@ export default {
           break;
       }
     },
-    changeHandler(time){
+    changeHandler(time) {
       console.log(time);
     },
     //获取列表
@@ -236,7 +240,7 @@ export default {
     //判断是否能评价
     isEvaluateHandler(row) {
       let falg = false;
-      let statsFalg=false
+      let statsFalg = false;
       row.roleName?.split(",").forEach((item) => {
         this.roleList.forEach((i) => {
           if (i.roleName == item) {
@@ -244,14 +248,13 @@ export default {
           }
         });
       });
-      if(row.status=='0'){
-        statsFalg=true
+      if (row.status == "0") {
+        statsFalg = true;
       }
-      if(statsFalg&&falg){
-
+      if (statsFalg && falg) {
         return true;
-      }else{
-        return false
+      } else {
+        return false;
       }
       // row
     },
@@ -288,6 +291,8 @@ export default {
     resetQuery() {
       this.resetForm("queryForm");
       this.queryParams.onlyManager = false;
+      this.queryParams.dataTime = [];
+      this.queryParams.evaluateName = "";
       this.handleQuery();
     },
   },

+ 233 - 0
src/views/safetyBook/aqbwbndjh/dialog.des.vue

@@ -0,0 +1,233 @@
+<template>
+    <div class="rule-type">
+      <DialogCom
+        :title="id ? '安全保卫部年度工作计划详情' : '新增安全保卫部年度工作计划'"
+        :visible.sync="isShow"
+        @close="onHide"
+        width="700px"
+      >
+        <div class="page-body">
+          <el-form
+            :model="formData"
+            :rules="formDataRules"
+            size="small"
+            ref="form"
+            label-position="right"
+            label-width="130px"
+            label-prefix=":"
+          >
+            <el-form-item prop="orgId" label="行社名称:">
+                <el-input
+              :readonly="true"
+              v-model="formData.orgName"
+              :disabled="true"
+            ></el-input>
+            </el-form-item>
+            <el-form-item prop="type" label="文件种类:">
+              <el-input :disabled="true" :readonly="true"
+                v-model="formData.type"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="工作年度" prop="year">
+                  <el-date-picker :disabled="true" :readonly="true"
+                    v-model="formData.year"
+                    :clearable="timeClearable"
+                    type="year"
+                    placeholder="请选择工作计划年度"
+                    value-format="yyyy"
+                  >
+                  </el-date-picker>
+                </el-form-item>
+            <el-form-item prop="userIds" label="参与人员:" v-if="false">
+              <div>
+                <el-input :disabled="true" :readonly="true"
+                  v-model="joinedStringArray"
+                  placeholder="点击选择"
+                ></el-input>
+                <el-button @click="selectUser">选择</el-button>
+              </div>
+            </el-form-item>
+            <el-form-item prop="date" label="文件日期:">
+              <el-date-picker :disabled="true" :readonly="true"
+                v-model="formData.date"
+                value-format="yyyy-MM-dd"
+                placeholder="请选择文件发布日期"
+                type="date"
+                :clearable="false"
+              ></el-date-picker>
+            </el-form-item>
+  
+            <el-form-item label="上传附件(word、pdf文件格式)" prop="images">
+              <imgs-upload
+                :limit="5"
+                v-model="formData.images"
+                :fileSize="2"
+              ></imgs-upload>
+            </el-form-item>
+            <div>
+              <el-form-item label="内容" prop="content" v-if="false">
+                <Editor style="height: 150px" v-model="formData.content"></Editor>
+              </el-form-item>
+            </div>
+          </el-form>
+        </div>
+  
+        <div style="margin-top: 100px" slot="footer" class="dialog-footer">
+         
+          <!-- <el-button type="primary" @click="onSubmit">确定</el-button> -->
+          <el-button @click="isShow = false">确定</el-button>
+        </div>
+      </DialogCom>
+      <UserSelector ref="UserSelector" @select="onUserSelect"></UserSelector>
+    </div>
+  </template>
+  
+  <script>
+  import { mapState, mapMutations } from "vuex";
+  import { Add, edit, getaqbwbndjh } from "@/api/safetyBook/aqbwbndjh";
+  import { deptTreeSelect } from "@/api/system/public";
+  import UserSelector from "@/components/userSelector/index.vue";
+  import ImgsUpload from "@/components/ImgsUpload";
+  import Editor from "@/components/Editor";
+  export default {
+    dicts: ["safety_book_type"],
+    components: { UserSelector, ImgsUpload, Editor },
+    data() {
+      return {
+        id: null,
+        isShow: false,
+        timeClearable: true,
+        formData: this.reset(),
+        //修改新增中的机构树
+        deptOptions: [],
+        formDataRules: {
+          userIds: [{ required: true, message: "请选择参与人员" }],
+          date: [{ required: true, message: "请选择记录日期" }],
+          images: [{ required: true, message: "请选择照片" }],
+          content: [{ required: true, message: "请输入内容" }],
+          orgId: [{ required: true, message: "请选择机构" }],
+        },
+      };
+    },
+  
+    watch: {},
+    computed: {
+      ...mapState([]),
+      joinedStringArray: {
+        get() {
+          if (this.formData.names == null || this.formData.names == undefined) {
+            this.formData.names = this.formData.userNames.split(", ");
+          }
+          return this.formData.names.join(", ");
+        },
+        set(value) {
+          this.formData.names = value.split(", ");
+        },
+      },
+    },
+    methods: {
+      ...mapMutations([]),
+  
+      /** 查询机构树数据 */
+      getDeptTree() {
+        deptTreeSelect().then((response) => {
+          this.deptOptions = response.data;
+        });
+      },
+      /** treeSelect组件自定义数据*/
+      tenantIdnormalizer(node, instanceId) {
+        if (node.children && !node.children.length) {
+          delete node.children;
+        }
+        return {
+          id: node.id,
+          label: node.shortName,
+          children: node.children,
+        };
+      },
+  
+      reset() {
+        return {
+          id: null,
+          // names: [],
+          // userIds: [],
+          date: null,
+          images: [],
+          // content: null,
+          title: null,
+          orgId:null,
+          type:"工作计划",
+          year:null,
+        };
+      },
+      async refresh(id) {
+        if (id != null && id != undefined) {
+          await getaqbwbndjh(id).then((res) => {
+            // this.formData.names = res.data.userNames.split(",");
+            this.formData = res.data;
+            // this.formData.year=res.data.year;
+          });
+        }
+      },
+      async show(id) {
+        // console.log(id, "id");
+        this.getDeptTree();
+        this.formData = this.reset();
+        this.id = id;
+        await this.refresh(id);
+        this.isShow = true;
+      },
+  
+      // 事件
+      onHide() {
+        this.formData = this.reset();
+        this.$refs.form.resetFields();
+      },
+      onSubmit() {
+        console.log(this.formData, "this.formData");
+        this.$refs.form.validate(async (isValidate) => {
+          if (!isValidate) return;
+          if (this.id == null || this.id == undefined) {
+            await Add(this.formData).then((res) => {
+              this.$emit("success");
+              this.isShow = false;
+            });
+          } else {
+            await edit(this.formData).then((res) => {
+              this.$emit("success");
+              this.isShow = false;
+            });
+          }
+        });
+      },
+      //选择用户回调
+      onUserSelect(data) {
+        var ids = data.map((obj) => obj.id);
+        var names = data.map((obj) => obj.name);
+        this.formData.userIds = ids;
+        this.formData.names = names;
+        this.formData.userNames = names.join(",");
+        //   console.log(this.formData.userIds, "this.formData.userIds");
+      },
+      //用户选择
+      selectUser(event) {
+        //   event.preventDefault();
+        this.$refs.UserSelector.show();
+      },
+  
+      // 事件
+      //apimark//
+    },
+    mounted() {},
+  };
+  </script>
+  
+  <style lang="scss" scoped>
+  .brand_info {
+    .el-form {
+      width: 600px;
+      padding-top: 40px;
+    }
+  }
+  </style>
+  

+ 35 - 15
src/views/safetyBook/aqbwbndjh/dialog.edit.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="rule-type">
     <DialogCom
-      :title="id ? '编辑安全保卫部年度计划' : '新增安全保卫部年度计划'"
+      :title="id ? '编辑安全保卫部年度工作计划' : '新增安全保卫部年度工作计划'"
       :visible.sync="isShow"
       @close="onHide"
       width="700px"
@@ -16,7 +16,7 @@
           label-width="130px"
           label-prefix=":"
         >
-          <el-form-item prop="orgId" label="选择机构:">
+          <el-form-item prop="orgId" label="行社名称:">
             <tree-select
                 v-model="formData.orgId"
                 :options="deptOptions"
@@ -29,7 +29,22 @@
                 noResultsText="没有搜索结果"
               />
           </el-form-item>
-          <el-form-item prop="userIds" label="参与人员:">
+          <el-form-item prop="type" label="文件种类:">
+            <el-input
+              v-model="formData.type"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="工作年度" prop="year">
+                <el-date-picker
+                  v-model="formData.year"
+                  :clearable="timeClearable"
+                  type="year"
+                  placeholder="请选择工作计划年度"
+                  value-format="yyyy"
+                >
+                </el-date-picker>
+              </el-form-item>
+          <el-form-item prop="userIds" label="参与人员:" v-if="false">
             <div>
               <el-input
                 :readonly="true"
@@ -39,18 +54,17 @@
               <el-button @click="selectUser">选择</el-button>
             </div>
           </el-form-item>
-          <el-form-item prop="date" label="开会日期:">
+          <el-form-item prop="date" label="文件日期:">
             <el-date-picker
               v-model="formData.date"
-              style="width: 240px"
-              value-format="yyyy-MM-dd hh:mm:ss"
-              placeholder="请选择记录日期"
-              type="datetime"
+              value-format="yyyy-MM-dd"
+              placeholder="请选择文件发布日期"
+              type="date"
               :clearable="false"
             ></el-date-picker>
           </el-form-item>
 
-          <el-form-item label="照片" prop="images">
+          <el-form-item label="上传附件(word、pdf文件格式)" prop="images">
             <imgs-upload
               :limit="5"
               v-model="formData.images"
@@ -58,7 +72,7 @@
             ></imgs-upload>
           </el-form-item>
           <div>
-            <el-form-item label="内容" prop="content">
+            <el-form-item label="内容" prop="content" v-if="false">
               <Editor style="height: 150px" v-model="formData.content"></Editor>
             </el-form-item>
           </div>
@@ -66,8 +80,9 @@
       </div>
 
       <div style="margin-top: 100px" slot="footer" class="dialog-footer">
-        <el-button @click="isShow = false">取消</el-button>
+       
         <el-button type="primary" @click="onSubmit">确定</el-button>
+        <el-button @click="isShow = false">取消</el-button>
       </div>
     </DialogCom>
     <UserSelector ref="UserSelector" @select="onUserSelect"></UserSelector>
@@ -82,11 +97,13 @@ import UserSelector from "@/components/userSelector/index.vue";
 import ImgsUpload from "@/components/ImgsUpload";
 import Editor from "@/components/Editor";
 export default {
+  dicts: ["safety_book_type"],
   components: { UserSelector, ImgsUpload, Editor },
   data() {
     return {
       id: null,
       isShow: false,
+      timeClearable: true,
       formData: this.reset(),
       //修改新增中的机构树
       deptOptions: [],
@@ -139,20 +156,23 @@ export default {
     reset() {
       return {
         id: null,
-        names: [],
-        userIds: [],
+        // names: [],
+        // userIds: [],
         date: null,
         images: [],
-        content: null,
+        // content: null,
         title: null,
         orgId:null,
+        type:"工作计划",
+        year:null,
       };
     },
     async refresh(id) {
       if (id != null && id != undefined) {
         await getaqbwbndjh(id).then((res) => {
-          this.formData.names = res.data.userNames.split(",");
+          // this.formData.names = res.data.userNames.split(",");
           this.formData = res.data;
+          // this.formData.year=res.data.year;
         });
       }
     },

+ 175 - 116
src/views/safetyBook/aqbwbndjh/index.vue

@@ -1,8 +1,7 @@
 <template>
   <div class="app-container">
-    <el-row :gutter="20">
-      <!--机构数据-->
-      <el-col :span="4" :xs="24" v-if="false">
+    <!--机构数据-->
+    <!-- <el-col :span="4" :xs="24" v-if="false">
         <org-tree
           v-model="queryParams.orgId"
           @defaultKey="getDefaultKey"
@@ -10,33 +9,82 @@
           @click="clickTreeNode"
           wholeTree
         ></org-tree>
-      </el-col>
-      <!--用户数据-->
-      <el-col :span="24" :xs="24">
+      </el-col> -->
+    <!--用户数据-->
+    <div class="main-right-box">
+      <!--    搜索条件    -->
+      <div class="main-search-box">
         <el-form
           :model="queryParams"
           ref="queryForm"
           size="small"
           :inline="true"
           v-show="showSearch"
-          label-width="68px"
-        >
-          <el-form-item label="所属年份" prop="year" v-if="false">
-            <el-date-picker
-              v-model="queryParams.year"
-              :clearable="timeClearable"
-              type="year"
-              placeholder="选择时间"
-              value-format="yyyy"
-              @change="handleQuery"
-            >
-            </el-date-picker>
-          </el-form-item>
+          ><el-row :gutter="50">
+            <el-col :span="6" :xs="24">
+              <el-form-item label="工作年度" prop="year">
+                <el-date-picker
+                  v-model="queryParams.year"
+                  :clearable="timeClearable"
+                  type="year"
+                  placeholder="请选择工作年度"
+                  value-format="yyyy"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8" :xs="24">
+              <el-form-item label="文件发布日期" prop="range">
+                <DataRangePicker
+                  type="daterange"
+                  :default-time="['00:00:00', '23:59:59']"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                  v-model="queryParams.range"
+                >
+                </DataRangePicker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6" :xs="24">
+              <el-form-item label="组织机构" prop="orgId" class="formTreeItem">
+                <tree-select
+                  v-model="queryParams.orgId"
+                  :options="deptOptions"
+                  :show-count="true"
+                  :normalizer="tenantIdnormalizer"
+                  :props="{ checkStrictly: true, label: 'name' }"
+                  placeholder="请选择组织机构"
+                  clearValueText="清除"
+                  :noChildrenText="''"
+                  noOptionsText="没有数据"
+                  noResultsText="没有搜索结果"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-form>
         <el-row :gutter="10" class="mb8">
           <el-col :span="1.5">
             <el-button
               type="primary"
+              icon="el-icon-search"
+              size="mini"
+              @click="getList"
+              >搜索</el-button
+            >
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              icon="el-icon-refresh"
+              size="mini"
+              @click="resetQuery"
+              >重置</el-button
+            >
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
               icon="el-icon-plus"
               size="mini"
               @click="handleAdd(null)"
@@ -50,94 +98,80 @@
             @queryTable="getList"
           ></right-toolbar>
         </el-row>
-        <!-- 表格数据 -->
-        <el-table
-          border
-          height="600"
-          size="small"
-          v-loading="loading"
-          :data="dataList"
-        >
-          <el-table-column
-            label="序号"
-            type="index"
-            align="center"
-            width="60"
-          />
-          <el-table-column
-            label="机构名称"
-            align="left"
-            width="300"
-            prop="orgName"
-          />
-          <el-table-column
-            label="记录人"
-            align="left"
-            prop="userName"
-          >
-
+      </div>
+      <!-- 表格数据 -->
+      <el-table
+        border
+        height="600"
+        size="small"
+        v-loading="loading"
+        :data="dataList"
+      >
+        <el-table-column label="序号" type="index" align="center" width="60" />
+        <el-table-column
+          label="行社名称"
+          align="left"
+          width="300"
+          prop="orgName"
+        />
+        <el-table-column
+          label="工作年度"
+          align="center"
+          width="200"
+          prop="year"
+        />
+        <el-table-column label="文件发布日期" align="center" prop="date">
+          <template slot-scope="r">
+            {{ r.row.date ? dayjs(r.row.date).format("YYYY年-MM月-DD日") : "" }}
+          </template>
         </el-table-column>
-          <el-table-column
-            label="记录时间"
-            align="center"
-            width="180"
-            prop="date"
-          />
 
+        <el-table-column
+          label="操作"
+          fixed="right"
+          align="center"
+          class-name="small-padding fixed-width"
+        >
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-info"
+              @click="handleInfo(scope.row.id)"
+              v-hasPermi="['core:aqbwbndjh:query']"
+              >详情
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-edit-outline"
+              @click="handleAdd(scope.row.id)"
+              v-hasPermi="['core:aqbwbndjh:add']"
+              >编辑
+            </el-button>
 
-          <el-table-column
-            label="操作"
-            fixed="right"
-            align="center"
-            class-name="small-padding fixed-width"
-          >
-            <template slot-scope="scope">
-              <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-edit-view"
-                @click="showImages(scope.row.images)"
-                v-hasPermi="['core:hsggbsdj:query']"
-                >查看照片
-              </el-button>
-              <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-edit-outline"
-                @click="handleAdd(scope.row.id)"
-                v-hasPermi="['core:aqbwbndjh:edit']"
-                >编辑
-              </el-button>
-              <!-- <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-info"
-                @click="handleInfo(scope.row)"
-                v-hasPermi="['core:aqbwbndjh:query']"
-                >详情
-              </el-button> -->
-              <el-button
-                size="mini"
-                type="text"
-                icon="el-icon-delete"
-                @click="handleDelete(scope.row)"
-                v-hasPermi="['core:aqbwbndjh:remove']"
-                >删除
-              </el-button>
-            </template>
-          </el-table-column>
-        </el-table>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDelete(scope.row)"
+              v-hasPermi="['core:aqbwbndjh: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"
-        />
-      </el-col>
-    </el-row>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
     <dialog-edit ref="editDialog" @success="getList()"></dialog-edit>
+    <dialog-des ref="desDialog" ></dialog-des>
     <el-image-viewer
       v-if="imageViewer"
       :on-close="closeImgViewer"
@@ -154,19 +188,29 @@ import {
   edit,
   delaqbwbndjh,
 } from "@/api/safetyBook/aqbwbndjh";
-import {  getLabel } from "@/views/commonOption";
+import { getLabel } from "@/views/commonOption";
 import DialogEdit from "./dialog.edit";
+import DialogDes from "./dialog.des";
 import { deptTreeSelect } from "@/api/system/public";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import OrgTree from "@/components/orgTree/index.vue";
 import kOrgTree from "@/components/k-orgTree/index.vue";
 import KFileUpload from "@/components/K-FileUpload/index.vue";
 import tableList from "@/mixins/tableList";
-
+import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
+import dayjs from "dayjs";
 export default {
   name: "aqbwbndjh",
-  components: { OrgTree, kOrgTree, KFileUpload, DialogEdit,    "el-image-viewer": () =>
-      import("element-ui/packages/image/src/image-viewer"), },
+  components: {
+    OrgTree,
+    kOrgTree,
+    KFileUpload,
+    DialogEdit,
+    DataRangePicker,
+    DialogDes,
+    "el-image-viewer": () =>
+      import("element-ui/packages/image/src/image-viewer"),
+  },
   mixins: [tableList],
   data() {
     return {
@@ -189,7 +233,7 @@ export default {
       // 是否显示弹出层
       open: false,
       // 机构树选项
-      deptOptions: undefined,
+      deptOptions: [],
       // 机构名称
       deptName: undefined,
       //是否关联下级
@@ -231,6 +275,22 @@ export default {
     this.getList();
   },
   methods: {
+    dayjs,
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.getList();
+    },
+    /** treeSelect组件自定义数据*/
+    tenantIdnormalizer(node, instanceId) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.id,
+        label: node.shortName,
+        children: node.children,
+      };
+    },
     showImages(file) {
       let array = file.split(",");
       this.srcList = array;
@@ -314,22 +374,21 @@ export default {
     },
 
     /** 详情按钮操作 */
-    handleInfo(row) {
-      this.reset();
-      const id = row.id || this.ids;
-      getaqbwbndjh(id).then((response) => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "安全责任书详情";
-      });
+    handleInfo(id) {
+      this.$refs.desDialog.show(id);
     },
   },
 };
 </script>
-<style>
+<style lang="scss" scoped>
 .ellipsis {
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
 }
+::v-deep.formTreeItem {
+  .el-form-item__content {
+    width: 264px;
+  }
+}
 </style>

+ 1 - 1
src/views/safetyBook/hsggbsdj/dialog.des.vue

@@ -74,7 +74,7 @@
           <div>
             <el-form-item label="会议重点" prop="content">
               <!-- <Editor style="height: 150px" v-model="formData.content"></Editor> -->
-              <el-input type="textarea" v-model="formData.content" rows="6" :autosize="{ minRows: 6, maxRows: 10 }"></el-input>
+              <el-input :disable="true" :readonly="true" type="textarea" v-model="formData.content" rows="6" :autosize="{ minRows: 6, maxRows: 10 }"></el-input>
             </el-form-item>
           </div>
         </el-form>

+ 2 - 1
src/views/safetyBook/hsggbsdj/dialog.edit.vue

@@ -77,8 +77,9 @@
       </div>
 
       <div style="margin-top: 100px" slot="footer" class="dialog-footer">
-        <el-button @click="isShow = false">取消</el-button>
+       
         <el-button type="primary" @click="onSubmit">确定</el-button>
+        <el-button @click="isShow = false">取消</el-button>
       </div>
     </DialogCom>
     <UserSelector ref="UserSelector" @select="onUserSelect"></UserSelector>

+ 0 - 1
src/views/safetyBook/hsggbsdj/index.vue

@@ -37,7 +37,6 @@
               <el-form-item label="会议时间" prop="range">
                 <DataRangePicker
                   type="daterange"
-                  value-format="yyyy-MM-dd HH:mm:ss"
                   :default-time="['00:00:00', '23:59:59']"
                   start-placeholder="开始日期"
                   end-placeholder="结束日期"

+ 473 - 0
src/views/safetycheck/task/components/checkRegister.vue

@@ -0,0 +1,473 @@
+<!--事后的检查登记-->
+<template>
+  <div class="app-container">
+    <el-form
+      ref="point_baseInfo"
+      :model="info"
+      :rules="baseInfoRules"
+      label-width="120px"
+    >
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="任务名称" prop="taskName">
+            <el-input
+              v-model="info.taskName"
+              placeholder="请输入任务名称"
+              maxlength="50"
+            ></el-input> </el-form-item
+        ></el-col>
+        <el-col :span="6"
+          ><el-form-item label="检查主体" prop="checkOrgId">
+            <orgDropDown
+              v-model="info.checkOrgId"
+              placeholder="选择检查主体"
+              @select="onCheckOrgSelect"
+              orgTreeType="org"
+            /> </el-form-item
+        ></el-col>
+        <el-col :span="6">
+          <el-form-item label="检查人员" prop="checkRoleId">
+            <el-select
+              v-model="info.checkRoleId"
+              placeholder="请选择检查人员"
+              style="width: 100%"
+              clearable
+            >
+              <el-option
+                v-for="role in roleOptions"
+                :key="role.id"
+                :label="role.name"
+                :value="role.id"
+              ></el-option>
+            </el-select> </el-form-item
+        ></el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="受检机构" prop="beCheckedOrgId">
+            <orgDropDown
+              v-model="info.beCheckedOrgId"
+              placeholder="选择受检机构"
+              @select="onBecheckOrgSelect"
+              orgTreeType="org"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="检查组成员" prop="checkTeam">
+            <el-input
+              style="width: 100%"
+              placeHolder="请输入检查组成员"
+              v-model="info.checkTeam"
+              maxlength="100"
+              clearable
+            ></el-input> </el-form-item
+        ></el-col>
+        <el-col :span="6">
+          <el-form-item label="检查日期" prop="planStartTime">
+            <el-date-picker
+              style="width: 100%"
+              v-model="info.planStartTime"
+              type="date"
+              placeholder="选择检查日期"
+              clearable
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <div style="margin-left: 42px">
+      <span style="margin-right: 20px">检查区域</span>
+      <el-button type="primary" size="mini" @click="onAddPoint()"
+        >选择检查内容</el-button
+      >
+    </div>
+    <div class="content">
+      <div class="area_content" v-for="area in info.checkList">
+        <div>
+          {{ area.areaName }}
+        </div>
+        <div>
+          <div class="safetycheck_item" v-for="(item, index) in area.itemList">
+            <span>{{ index + 1 }}、{{ item.itemName }}</span>
+            <div class="safetycheck_point" v-for="point in item.pointList">
+              <div>
+                <div class="pointName">
+                  <i class="circle" />
+                  <pre>{{ point.pointName }}</pre>
+                </div>
+                <el-radio-group v-model="point.status" style="margin-top: 5px">
+                  <el-radio :label="0">正常</el-radio>
+                  <el-radio :label="1">异常</el-radio>
+                </el-radio-group>
+                <div>
+                  <el-button
+                    type="danger"
+                    size="mini"
+                    v-if="point.isAdd"
+                    style="margin-left: 50px"
+                    @click="onDeletePoint(area, item, point)"
+                    >删除</el-button
+                  >
+                </div>
+              </div>
+              <div v-if="point.status == 1">
+                <el-form
+                  :ref="'point_' + point.pointId"
+                  :model="point"
+                  :rules="exceptionRules"
+                  label-width="100px"
+                >
+                  <el-form-item label="情况描述" prop="remark">
+                    <el-input
+                      v-model="point.remark"
+                      style="width: 250px"
+                      placeholder="请输入情况描述"
+                      maxlength="255"
+                    ></el-input>
+                  </el-form-item>
+                  <el-form-item label="整改期限" prop="rectificationDeadline">
+                    <el-select
+                      v-model="point.rectificationDeadline"
+                      placeholder="请选择整改期限"
+                    >
+                      <el-option
+                        v-for="item in dict.type.rectification_deadline"
+                        :key="item.value"
+                        :value="item.value"
+                        :label="item.label"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                  <el-form-item label="异常图片" prop="image">
+                    <imgUpload
+                      type="more"
+                      :value="
+                        point.imgData
+                          ? point.imgData.map((d) => d.imgPath).join(',')
+                          : ''
+                      "
+                      @input="onImageChanged(point, $event)"
+                    ></imgUpload>
+                  </el-form-item>                  
+                </el-form>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div class="dialog-footer">
+      <el-button @click="onClose">取消</el-button>
+      <!-- <el-button @click="onSave" v-if="showSaveBtn">保存</el-button> -->
+      <el-button
+        type="primary"
+        @click="onSubmit()"
+        v-hasPermi="['core:safetycheck:tempregister']"
+        >提交</el-button
+      >
+    </div>
+    <SelectPoint
+      ref="SelectPoint"
+      :orgType="[info.beCheckOrgType]"
+      @select="onSelectPoint"
+    ></SelectPoint>
+  </div>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import * as api from "@/api/safetycheck/checkRegister.js";
+import dayjs from "dayjs";
+import SelectPoint from "../../ruleManager/dialog.select.point.vue";
+import imgUpload from "@/components/ImageUpload/index.vue";
+import { getLabel } from "@/views/commonOption.js";
+import { getNamesByOrgId } from "@/api/system/role.js";
+import orgDropDown from "@/components/orgTree/orgDropDown.vue";
+export default {
+  name: "safetyCheckRegister",
+  data() {
+    return {
+      info: {
+        taskName: null,
+        checkOrgId: null,
+        checkRoleId: null,
+        beCheckedOrgId: null,
+        beCheckOrgType: null,
+        planStartTime: new Date(),
+        checkTeam: null,
+        checkList: [],
+      },
+      roleOptions: [],
+      prevCheckOrgType: null, //上一个选中检查机构的类型
+      prevBecheckedOrgType: null, //上一个受检机构的类型
+      exceptionRules: {
+        remark: [{ required: true, message: "请输入情况描述" }],
+        rectificationDeadline: [{ required: true, message: "请选择整改期限" }],
+      },
+      baseInfoRules: {
+        taskName: [{ required: true, message: "请输入任务名称" }],
+        checkOrgId: [{ required: true, message: "请选择检查主体" }],
+        checkRoleId: [{ required: true, message: "请选择检查人员" }],
+        beCheckedOrgId: [{ required: true, message: "请选择受检机构" }],
+        planStartTime: [{ required: true, message: "请选择检查日期" }],
+      },
+      pointIdsWhenAdd: [],
+      mode: null,
+    };
+  },
+  dicts: ["rectification_deadline", "sys_user_is_lock"],
+  components: { SelectPoint, imgUpload, orgDropDown },
+  computed: {
+    ...mapGetters(["orgId", "roleList", "userId"]),
+  },
+  mounted() {
+    this.info.checkOrgId = this.orgId;
+    this.info.checkRoleId = this.roleList[0].roleId;
+  },
+  methods: {
+    dayjs,
+    getLabel,
+    onCheckOrgSelect(node) {
+      if (node == null) {
+        this.prevCheckOrgType = null;
+        this.roleOptions = [];
+        this.checkRoleId = null;
+        return;
+      }
+      if (node.type == this.prevCheckOrgType) {
+        return;
+      }
+
+      getNamesByOrgId(node.id).then((r) => {
+        this.roleOptions = r.data;
+        this.prevCheckOrgType = node.type;
+        if (!this.roleOptions.find((op) => op.id == this.info.checkRoleId)) {
+          this.info.checkRoleId = null;
+        }
+      });
+    },
+    onBecheckOrgSelect(node) {
+      if (node == null) {
+        this.prevBecheckedOrgType = null;
+        this.info.checkList = [];
+        return;
+      }
+
+      if (node.type == this.prevBecheckedOrgType) {
+        return;
+      }
+
+      this.info.checkList = [];
+      this.prevBecheckedOrgType = node.type;
+      this.info.beCheckOrgType = node.type;
+    },
+    onAddPoint() {
+      if (!this.info.beCheckedOrgId) {
+        this.$message.info("请先选择受检机构");
+        return;
+      }
+      if (!this.info.beCheckOrgType) {
+        this.$message.warning("受检机构的机构类型未知");
+        return;
+      }
+      this.pointIdsWhenAdd = [];
+      this.info.checkList.forEach((a) => {
+        a.itemList.forEach((i) => {
+          i.pointList.forEach((p) => {
+            this.pointIdsWhenAdd.push(p.pointId);
+          });
+        });
+      });
+      this.$refs.SelectPoint.show(this.pointIdsWhenAdd);
+    },
+    onSelectPoint(selectedList) {
+      let hasNew = false;
+      for (let index in selectedList) {
+        let p = selectedList[index];
+        if (this.pointIdsWhenAdd.indexOf(p.id) >= 0) {
+          continue;
+        }
+        let info = this.info;
+        let area = info.checkList.find((a) => a.areaId === p.areaId);
+        if (!area) {
+          area = { areaId: p.areaId, areaName: p.areaName, itemList: [] };
+          info.checkList.push(area);
+        }
+
+        let item = area.itemList.find((i) => i.itemId == p.itemId);
+        if (!item) {
+          item = { itemId: p.itemId, itemName: p.itemName, pointList: [] };
+          area.itemList.push(item);
+        }
+
+        let point = item.pointList.find((i) => i.pointId == p.id);
+        if (!point) {
+          point = {
+            pointId: p.id,
+            pointName: p.pointName,
+            mustCheck: 1,
+            isAdd: 1,
+            status: 0,
+            remark: null,
+            imgData: null,
+            rectificationDeadline: null,
+            submitBy: null,
+            submitTime: null,
+          };
+
+          item.pointList.push(point);
+          hasNew = true;
+        }
+      }
+
+      if (!hasNew) {
+        this.$message.info("没有可新增的检查内容");
+      }
+    },
+
+    onDeletePoint(area, item, point) {
+      if (point.isAdd === 0) {
+        this.$message.warning("不可删除计划的检查内容");
+        return;
+      }
+
+      let index = item.pointList.indexOf(point);
+      if (index >= 0) {
+        item.pointList.splice(index, 1);
+      }
+
+      if (item.pointList.length === 0) {
+        index = area.itemList.indexOf(item);
+        area.itemList.splice(index, 1);
+      }
+
+      if (area.itemList.length === 0) {
+        index = this.info.checkList.indexOf(area);
+        this.info.checkList.splice(index, 1);
+      }
+    },
+    onImageChanged(point, value) {
+      point.imgData = value
+        .split(",")
+        .map((img) => ({ id: null, imgPath: img }));
+    },
+    onClose() {
+      this.$tab.closePageAndPushPrev();
+    },
+    onSave() {
+      this.info.isSubmit = 0;
+      api.tempSubmit(this.info).then((r) => {
+        this.$message.info("保存成功");
+      });
+    },
+    async onSubmit() {
+      let isOk = true;
+      let rs = this.$refs;
+      for (let p in this.$refs) {
+        if (p.startsWith("point")) {
+          try {
+            let form = this.$refs[p];
+            if (form.length) {
+              isOk &= await this.$refs[p][0].validate();
+            } else {
+              isOk &= await this.$refs[p].validate();
+            }
+          } catch (e) {
+            isOk &= false;
+            console.error(e);
+          }
+        }
+      }
+      if (isOk) {
+        this.info.isSubmit = 1;
+        let data = { ...this.info };
+        data.checkRoles = [{ id: this.info.checkRoleId }];
+        api.tempSubmit(data).then((r) => {
+          this.$message.info("提交成功");
+          this.$tab.closePageAndPushPrev();
+        });
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.content {
+  max-height: calc(100% - 300px);
+  overflow-y: auto;
+  margin-bottom: 20px;
+  margin-top: 20px;
+}
+.area_content {
+  border: #b8bdc0 1px solid;
+  display: flex;
+  flex-direction: row;
+}
+
+.content > .area_content:first-child {
+  border-bottom: none;
+}
+
+.content > .area_content:last-child {
+  border-bottom: #b8bdc0 1px solid;
+}
+
+.area_content > div:nth-child(1) {
+  background-color: #e6e6e6;
+  border-right: #b8bdc0 1px solid;
+  padding-top: auto;
+  width: 15%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  text-align: center;
+}
+
+.area_content > div:nth-child(2) {
+  width: 80%;
+  padding-left: 10px;
+}
+
+.safetycheck_item {
+  margin: 10px;
+  margin-bottom: 20px;
+}
+
+.safetycheck_point {
+  padding-top: 10px;
+  padding-left: 30px;
+
+  & > div {
+    display: flex;
+    flex-direction: row;
+  }
+}
+
+.pointName {
+  width: 200px;
+  display: flex;
+  flex-direction: row;
+}
+.dialog-footer {
+  width: 100%;
+  text-align: right;
+  border-top: #b8bdc0 1px solid;
+  padding-top: 10px;
+  padding-right: 30px;
+  position: absolute;
+  bottom: 30px;
+  right: 0px;
+}
+.circle {
+  display: inline-block;
+  width: 5px;
+  height: 5px;
+  border-radius: 5px;
+  background-color: #000;
+  border: none;
+  margin-top: 10px;
+  margin-right: 10px;
+}
+</style>

+ 174 - 0
src/views/safetycheck/task/components/detail.vue

@@ -0,0 +1,174 @@
+<template>
+  <div class="app-container">
+    <el-descriptions title="检查任务" border>
+      <el-descriptions-item label="任务名称">{{
+        taskInfo.taskName
+      }}</el-descriptions-item>
+      <el-descriptions-item label="任务进度"
+        >{{ getLabel(dict.type.safety_check_status, taskInfo.status) }}
+      </el-descriptions-item>
+      <el-descriptions-item label="任务时间"
+        >{{ dayjs(taskInfo.planStartTime).format("YYYY-MM-DD") }}
+      </el-descriptions-item>
+      <el-descriptions-item label="截止日期"
+        >{{ dayjs(taskInfo.planEndTime).format("YYYY-MM-DD") }}
+      </el-descriptions-item>
+
+      <el-descriptions-item label="检查主体">{{
+        taskInfo.checkOrgName
+      }}</el-descriptions-item>
+      <el-descriptions-item label="受检机构">{{
+        taskInfo.beCheckedOrgName
+      }}</el-descriptions-item>
+      <el-descriptions-item label="检查人员"
+        >{{
+          taskInfo.checkRoles
+            ? taskInfo.checkRoles.map((r) => r.name).join(",")
+            : ""
+        }}
+      </el-descriptions-item>
+      <el-descriptions-item label="检查组成员"
+        >{{ taskInfo.checkTeam }}
+      </el-descriptions-item>
+      <el-descriptions-item label="登记人"
+        >{{ taskInfo.submitBy }}
+      </el-descriptions-item>
+      <el-descriptions-item label="隐患问题数" 
+        >{{ taskInfo.exceptionCount }}
+      </el-descriptions-item>
+      <el-descriptions-item label="检查时间" 
+        >{{
+          taskInfo.submitTime
+            ? dayjs(taskInfo.submitTime).format("YYYY-MM-DD")
+            : ""
+        }}
+      </el-descriptions-item>
+    </el-descriptions>
+
+    <div class="itemDetail">
+      <el-collapse v-model="itemIds">
+        <el-collapse-item
+          v-for="item in taskInfo.checkList"
+          :title="item.itemName"
+          :value="item.itemId"
+          :name="item.itemId"
+        >
+          <el-table :data="item.pointList" size="small">
+            <el-table-column
+              header-align="center"
+              prop="pointName"
+              label="检查内容"
+            >
+            </el-table-column>
+            <el-table-column align="center" prop="areaName" label="检查区域">
+            </el-table-column>
+            <el-table-column align="center" prop="status" label="检查结果">
+              <template slot-scope="r">
+                {{
+                  r.row.status == null
+                    ? "-"
+                    : r.row.status == 0
+                    ? "正常"
+                    : "异常"
+                }}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" prop="remark" label="问题描述">
+              <template slot-scope="r">
+                {{ r.row.remark ? r.row.remark : "-" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              header-align="center"
+              prop="imgData"
+              label="异常图片"
+            >
+              <template slot-scope="r">
+                <div v-if="r.row.imgData && r.row.imgData.length > 0">
+                  <el-image
+                    style="width: 30px; height: 30px; margin: 0 10px"
+                    v-for="img in r.row.imgData"
+                    :src="img.imgPath"
+                    :preview-src-list="
+                      r.row.imgData ? r.row.imgData.map((r) => r.imgPath) : []
+                    "
+                  ></el-image>
+                </div>
+                <span v-else>-</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-collapse-item>
+      </el-collapse>
+    </div>
+    <div class="dialog-footer">
+      <el-button @click="onClose">关闭</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import { mapGetters } from "vuex";
+import * as api from "@/api/safetycheck/register.js";
+import dayjs from "dayjs";
+
+import { getLabel } from "@/views/commonOption.js";
+import { checkPermi } from "@/utils/permission.js";
+export default {
+  name: "safetyCheckRegister",
+  data() {
+    return {
+      taskInfo: {},
+      itemIds:[]
+    };
+  },
+  dicts: ["safety_check_status"],
+  components: {},
+  computed: {},
+  mounted() {
+    let id = this.$route.params.taskId;
+    let mode = this.$route.query.mode;
+    let request = api.appinfo;
+
+    request(id).then((r) => {
+      this.taskInfo = r.data;
+      this.itemIds=r.data.checkList.map(c=>c.itemId);
+    });
+  },
+  methods: {
+    dayjs,
+    getLabel,
+
+    onClose() {
+      this.$tab.closePageAndPushPrev();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.el-row-button {
+  margin-top: 20px;
+}
+
+.itemDetail {
+  max-height: calc(100% - 300px);
+  overflow-y: auto;
+  margin-top: 20px;
+}
+
+.dialog-footer {
+  width: 100%;
+  text-align: right;
+  border-top: #b8bdc0 1px solid;
+  padding-top: 10px;
+  padding-right: 30px;
+  position: absolute;
+  bottom: 30px;
+  right: 0px;
+}
+
+.el-descriptions {
+  ::v-deep .el-descriptions__body {
+    background-color: transparent !important;
+  }
+}
+</style>

+ 7 - 136
src/views/safetycheck/taskManager/components/register.vue → src/views/safetycheck/task/components/register.vue

@@ -33,25 +33,10 @@
           placeHolder="请输入检查组成员"
           v-model="taskInfo.checkTeam"
           maxlength="100"
-          v-if="isRegister"
         ></el-input>
-        <span v-else>{{ taskInfo.checkTeam }}</span>
-      </el-descriptions-item>
-      <el-descriptions-item label="登记人" v-if="!isRegister"
-        >{{ taskInfo.submitBy }}
-      </el-descriptions-item>
-      <el-descriptions-item label="隐患问题数" v-if="!isRegister"
-        >{{ taskInfo.exceptionCount }}
-      </el-descriptions-item>
-      <el-descriptions-item label="检查时间" v-if="!isRegister"
-        >{{
-          taskInfo.submitTime
-            ? dayjs(taskInfo.submitTime).format("YYYY-MM-DD")
-            : ""
-        }}
       </el-descriptions-item>
     </el-descriptions>
-    <el-row class="el-row-button" v-if="isRegister">
+    <el-row class="el-row-button">
       <el-col>
         <span style="margin-right: 20px">检查区域</span>
         <el-button type="primary" size="mini" @click="onAddPoint()"
@@ -60,7 +45,7 @@
       </el-col>
     </el-row>
 
-    <div class="content" v-if="isRegister">
+    <div class="content">
       <div class="area_content" v-for="area in taskInfo.checkList">
         <div>
           {{ area.areaName }}
@@ -76,23 +61,14 @@
                     <pre>{{ point.pointName }}</pre>
                   </div>
                 </div>
-                <el-radio-group v-model="point.status" v-if="isRegister">
+                <el-radio-group v-model="point.status">
                   <el-radio :label="0">正常</el-radio>
                   <el-radio :label="1">异常</el-radio>
                 </el-radio-group>
-                <span v-else>
-                  <span v-if="point.status === 0">
-                    <i class="circle" style="background-color: #1890ff" />
-                    <label style="color: #1890ff"> 正常</label> </span
-                  ><span v-else>
-                    <i class="circle" style="background-color: #f5222d" />
-                    <label style="color: #f5222d"> 异常</label>
-                  </span>
-                </span>
                 <el-button
                   type="danger"
                   size="mini"
-                  v-if="point.isAdd && isRegister"
+                  v-if="point.isAdd"
                   style="margin-left: 50px"
                   @click="onDeletePoint(area, item, point)"
                   >删除</el-button
@@ -104,7 +80,6 @@
                   :model="point"
                   :rules="exceptionRules"
                   label-width="100px"
-                  v-if="isRegister"
                 >
                   <el-form-item label="情况描述" prop="remark">
                     <el-input
@@ -139,92 +114,12 @@
                     ></imgUpload>
                   </el-form-item>
                 </el-form>
-                <!-- <el-descriptions v-else :column="1">
-                  <el-descriptions-item label="情况描述">{{
-                    point.remark
-                  }}</el-descriptions-item>
-                  <el-descriptions-item label="整改期限">{{
-                    getLabel(
-                      dict.type.rectification_deadline,
-                      point.rectificationDeadline
-                    )
-                  }}</el-descriptions-item>
-                  <el-descriptions-item label="异常图片">
-                    <div class="imageList">
-                      <el-image
-                        style="width: 100px; height: 100px; margin: 10px"
-                        v-if="point.imgData"
-                        v-for="url in point.imgData"
-                        :src="url.imgPath"
-                        :preview-src-list="point.imgData.map((d) => d.imgPath)"
-                      >
-                      </el-image></div
-                  ></el-descriptions-item>
-                </el-descriptions> -->
               </div>
             </div>
           </div>
         </div>
       </div>
     </div>
-    <div v-else class="itemDetail">
-      <el-collapse>
-        <el-collapse-item
-          v-for="item in taskInfo.checkList"
-          :title="item.itemName"
-          :value="item.itemId"
-        >
-          <el-table :data="item.pointList" size="small">
-            <el-table-column
-              header-align="center"
-              prop="pointName"
-              label="检查内容"
-            >
-            </el-table-column>
-            <el-table-column align="center" prop="areaName" label="检查区域">
-            </el-table-column>
-            <el-table-column align="center" prop="status" label="检查结果">
-              <template slot-scope="r">
-                {{
-                  r.row.status == null
-                    ? "-"
-                    : r.row.status == 0
-                    ? "正常"
-                    : "异常"
-                }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="center"
-              prop="remark"
-              label="问题描述"
-            >
-              <template slot-scope="r">
-                {{ r.row.remark ? r.row.remark : "-" }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              header-align="center"
-              prop="imgData"
-              label="异常图片"
-            >
-              <template slot-scope="r">
-                <div  v-if="r.row.imgData && r.row.imgData.length > 0">
-                  <el-image                 
-                  style="width: 30px; height: 30px; margin: 0 10px"
-                  v-for="img in r.row.imgData"
-                  :src="img.imgPath"
-                  :preview-src-list="
-                    r.row.imgData ? r.row.imgData.map((r) => r.imgPath) : []
-                  "
-                ></el-image></div>                
-                <span v-else>-</span>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-collapse-item>
-      </el-collapse>
-    </div>
     <div class="dialog-footer">
       <el-button type="primary" @click="onSubmit()" v-if="showSaveBtn"
         >提交</el-button
@@ -266,21 +161,15 @@ export default {
         rectificationDeadline: [{ required: true, message: "请选择整改期限" }],
       },
       pointIdsWhenAdd: [],
-      mode: null,
     };
   },
   dicts: ["rectification_deadline", "sys_user_is_lock", "safety_check_status"],
   components: { SelectPoint, imgUpload, UserSelector },
   computed: {
     ...mapGetters(["orgId", "roleList", "userId"]),
-    isRegister() {
-      let r = this.mode === "register";
-      return r;
-    },
 
     showSaveBtn() {
       return (
-        this.isRegister &&
         this.taskInfo.status != 3 &&
         (checkPermi(["core:safetycheck:register"]) ||
           this.taskInfo.grantUserId == this.userId)
@@ -292,7 +181,6 @@ export default {
         ? this.taskInfo.checkRoles.map((r) => r.id)
         : [];
       return (
-        this.isRegister &&
         this.taskInfo.status != 3 &&
         this.taskInfo.planType == 3 &&
         this.taskInfo.checkOrgId == this.orgId &&
@@ -302,27 +190,10 @@ export default {
   },
   mounted() {
     let id = this.$route.params.taskId;
-    let mode = this.$route.query.mode;
-    let request = api.info;
-    if (!mode) {
-      mode = "info";
-    }
-
-    if (mode == "info") {
-      request = api.appinfo;
-    }
-
+    let request = api.info;    
     request(id).then((r) => {
-      this.mode = mode;
-      if (mode != "register") {
-        this.taskInfo = r.data;
-        return;
-      }
-
       if (r.data.status == 3) {
-        this.mode = "info";
-        this.taskInfo = r.data;
-        this.$message.info("任务已完成,将显示详情");
+        this.onClose();
         return;
       }
 
@@ -337,7 +208,7 @@ export default {
         this.taskInfo = r.data;
       } else {
         this.$message.warning("用户不能执行该任务");
-        this.mode = "info";
+        this.onClose();
       }
     });
   },

+ 2 - 2
src/views/safetycheck/task/index.vue

@@ -502,7 +502,7 @@ export default {
     },
     getLabel,
     showDetail(row) {
-      let path = "/core/safetycheck/register/" + row.id;
+      let path = "/core/safetycheck/detail/" + row.id;
       console.log(path,"path")
       this.$router.push(path);
     },
@@ -534,7 +534,7 @@ export default {
         return;
       }
 
-      let path = "/core/safetycheck/register/" + row.id + "?mode=register";
+      let path = "/core/safetycheck/register/" + row.id;
       this.$router.push(path);
     },
     getDefaultKey(key) {

+ 2 - 2
src/views/system/workTimeSet/dialog.add.vue

@@ -319,8 +319,8 @@ export default {
       }
     },
     async onSubmit() {
-      if(this.orgIdList.length === 0)return  this.$message.warning('请选择机构');
-      if(this.workTimeList.length === 0)return  this.$message.warning('请添加日期');
+      if(this.orgIdList.length === 0)return  this.$message.warning('请选择机构');
+      if(this.workTimeList.length === 0)return  this.$message.warning('请添加日期');
       //判断是否有重复的日期
       let dateList = [];
       let workTimeList = JSON.parse(JSON.stringify(this.workTimeList))

+ 2 - 2
src/views/system/workTimeSet/dialog.template.vue

@@ -244,11 +244,11 @@ export default {
     },
     onSubmit() {
       if (this.formData.orgIds.length < 1) {
-        this.$message.warning("机构不能为空");
+        this.$message.warning("请选择机构");
         return;
       }
       if (!this.formData.effectiveDate ) {
-        this.$message.warning("生效日期不能为空");
+        this.$message.warning("请选择生效日期");
         return;
       }
       if (this.formData.dayOfWeeks.filter(w => w.isWorkday == 1 || w.isWorkday).length === 0) {