luowei 2 年之前
父節點
當前提交
aee7dfda4a

+ 5 - 1
.env.development

@@ -13,9 +13,13 @@ ENV = 'development'
 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://localhost:8080'
 # 55环境
+<<<<<<< HEAD
 #VUE_APP_BASE_API = 'http://10.87.10.55:8080'
+=======
+# VUE_APP_BASE_API = 'http://10.87.10.55:8080'
+>>>>>>> 4bda146fa837db2153388b1119c8ac2e77cc00d6
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 72 - 65
src/api/system/role.js

@@ -1,144 +1,151 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 查询角色列表
 export function listRole(query) {
   return request({
-    url: '/system/role/list',
-    method: 'get',
-    params: query
-  })
+    url: "/system/role/list",
+    method: "get",
+    params: query,
+  });
 }
 export function allRole() {
   return request({
-    url: '/system/role/allRole',
-    method: 'get',
-   // params: query
-  })
+    url: "/system/role/allRole",
+    method: "get",
+    // params: query
+  });
 }
 // 查询角色详细
 export function getRole(roleId) {
   return request({
-    url: '/system/role/' + roleId,
-    method: 'get'
-  })
+    url: "/system/role/" + roleId,
+    method: "get",
+  });
 }
 
 // 新增角色
 export function addRole(data) {
   return request({
-    url: '/system/role',
-    method: 'post',
-    data: data
-  })
+    url: "/system/role",
+    method: "post",
+    data: data,
+  });
 }
 
 // 修改角色
 export function updateRole(data) {
   return request({
-    url: '/system/role',
-    method: 'put',
-    data: data
-  })
+    url: "/system/role",
+    method: "put",
+    data: data,
+  });
 }
 
 // 角色数据权限
 export function dataScope(data) {
   return request({
-    url: '/system/role/dataScope',
-    method: 'put',
-    data
-  })
+    url: "/system/role/dataScope",
+    method: "put",
+    data,
+  });
 }
 
 // 角色状态修改
 export function changeRoleStatus(data) {
   return request({
-    url: '/system/role/changeStatus',
-    method: 'put',
-    data
-  })
+    url: "/system/role/changeStatus",
+    method: "put",
+    data,
+  });
 }
 
 // 删除角色
 export function delRole(id) {
   return request({
-    url: '/system/role/' + id,
-    method: 'delete'
-  })
+    url: "/system/role/" + id,
+    method: "delete",
+  });
 }
 
 // 查询角色已授权用户列表
 export function allocatedUserList(query) {
   return request({
-    url: '/system/role/authUser/allocatedList',
-    method: 'get',
-    params: query
-  })
+    url: "/system/role/authUser/allocatedList",
+    method: "get",
+    params: query,
+  });
 }
 
 // 查询角色未授权用户列表
 export function unallocatedUserList(query) {
   return request({
-    url: '/system/role/authUser/unallocatedList',
-    method: 'get',
-    params: query
-  })
+    url: "/system/role/authUser/unallocatedList",
+    method: "get",
+    params: query,
+  });
 }
 
 // 取消用户授权角色
 export function authUserCancel(data) {
   return request({
-    url: '/system/role/authUser/cancel',
-    method: 'put',
-    data: data
-  })
+    url: "/system/role/authUser/cancel",
+    method: "put",
+    data: data,
+  });
 }
 
 // 批量取消用户授权角色
 export function authUserCancelAll(data) {
   return request({
-    url: '/system/role/authUser/cancelAll',
-    method: 'put',
-    params: data
-  })
+    url: "/system/role/authUser/cancelAll",
+    method: "put",
+    params: data,
+  });
 }
 
 // 授权用户选择
 export function authUserSelectAll(data) {
   return request({
-    url: '/system/role/authUser/selectAll',
-    method: 'put',
-    params: data
-  })
+    url: "/system/role/authUser/selectAll",
+    method: "put",
+    params: data,
+  });
 }
 
 // 根据角色ID查询机构树结构
 export function deptTreeSelect(id) {
   return request({
-    url: '/system/role/deptTree/' + id,
-    method: 'get'
-  })
+    url: "/system/role/deptTree/" + id,
+    method: "get",
+  });
 }
 
 /**
  * {
  *  orgType:
  * }
- * @param {}} query 
- * @returns 
+ * @param {}} query
+ * @returns
  */
 // 根据角色ID查询机构树结构
-export function findAllRole(query) {    
+export function findAllRole(query) {
   return request({
-    url: '/system/role/all',
-    method: 'get',
-    params:query
-  })
+    url: "/system/role/all",
+    method: "get",
+    params: query,
+  });
+}
 
+export function findRoleByType(type) {
+  return request({
+    url: "/system/role/getRoleByType/" + type,
+    method: "get",
+  });
 }
 
-export function findRoleByType(type) {    
+export function getNamesByOrgId(orgId) {
   return request({
-    url: '/system/role/getRoleByType/'+ type,
-    method: 'get',
-  })}
+    url: "/system/role/getnamesbyorgid/" + orgId,
+    method: "get",
+  });
+}

+ 41 - 11
src/assets/styles/index.scss

@@ -1,21 +1,22 @@
-@import './variables.scss';
-@import './mixin.scss';
-@import './transition.scss';
-@import './element-ui.scss';
-@import './sidebar.scss';
-@import './btn.scss';
+@import "./variables.scss";
+@import "./mixin.scss";
+@import "./transition.scss";
+@import "./element-ui.scss";
+@import "./sidebar.scss";
+@import "./btn.scss";
 
 body {
   height: 100%;
   -moz-osx-font-smoothing: grayscale;
   -webkit-font-smoothing: antialiased;
   text-rendering: optimizeLegibility;
-  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
+  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
+    Microsoft YaHei, Arial, sans-serif;
 }
 
 label {
   font-weight: 500;
-  color:#333;
+  color: #333;
 }
 
 html {
@@ -105,7 +106,8 @@ aside {
   display: block;
   line-height: 32px;
   font-size: 16px;
-  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
+    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
   color: #2c3e50;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
@@ -137,7 +139,7 @@ aside {
 }
 
 .text-center {
-  text-align: center
+  text-align: center;
 }
 
 .sub-navbar {
@@ -148,7 +150,13 @@ aside {
   text-align: right;
   padding-right: 20px;
   transition: 600ms ease position;
-  background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
+  background: linear-gradient(
+    90deg,
+    rgba(32, 182, 249, 1) 0%,
+    rgba(32, 182, 249, 1) 0%,
+    rgba(33, 120, 241, 1) 100%,
+    rgba(33, 120, 241, 1) 100%
+  );
 
   .subtitle {
     font-size: 20px;
@@ -183,3 +191,25 @@ aside {
     margin-bottom: 10px;
   }
 }
+
+.el-button--danger {
+  background: rgba(215,0,15, 0.7) !important;
+  border-color: rgba(215,0,15, 0.7) !important;
+}
+
+.el-button--danger:focus,
+.el-button--danger:hover {
+  background: rgba(215,0,15, 1) !important;
+  border-color: rgba(215,0,15, 1) !important;
+}
+
+.el-button--primary {
+  background: rgba(0, 140, 214, 1) !important;
+  border-color: rgba(0, 140, 214,1) !important;
+}
+
+.el-button--primary:focus,
+.el-button--primary:hover {
+  background: rgba(0, 140, 214, 0.8) !important;
+  border-color: rgba(0, 140, 214, 0.8) !important;
+}

+ 4 - 0
src/assets/styles/sidebar.scss

@@ -189,6 +189,10 @@
     }
   }
 }
+/* 用于遮盖elementui下拉框的悬浮框*/
+.vue-treeselect__menu-container{
+  z-index: 3000 !important;
+}
 
 // when menu collapsed
 .el-menu--vertical {

+ 46 - 26
src/plugins/tab.js

@@ -1,5 +1,5 @@
-import store from '@/store'
-import router from '@/router';
+import store from "@/store";
+import router from "@/router";
 
 export default {
   // 刷新当前tab页签
@@ -8,19 +8,19 @@ export default {
     if (obj === undefined) {
       matched.forEach((m) => {
         if (m.components && m.components.default && m.components.default.name) {
-          if (!['Layout', 'ParentView'].includes(m.components.default.name)) {
+          if (!["Layout", "ParentView"].includes(m.components.default.name)) {
             obj = { name: m.components.default.name, path: path, query: query };
           }
         }
       });
     }
-    return store.dispatch('tagsView/delCachedView', obj).then(() => {
-      const { path, query } = obj
+    return store.dispatch("tagsView/delCachedView", obj).then(() => {
+      const { path, query } = obj;
       router.replace({
-        path: '/redirect' + path,
-        query: query
-      })
-    })
+        path: "/redirect" + path,
+        query: query,
+      });
+    });
   },
   // 关闭当前tab页签,打开新页签
   closeOpenPage(obj) {
@@ -32,40 +32,60 @@ export default {
   // 关闭指定tab页签
   closePage(obj) {
     if (obj === undefined) {
-      return store.dispatch('tagsView/delView', router.currentRoute).then(({ visitedViews }) => {
-        const latestView = visitedViews.slice(-1)[0]
-        if (latestView) {
-            return router.push(latestView.fullPath)
-        }
-        return router.push('/');
-      });
+      return store
+        .dispatch("tagsView/delView", router.currentRoute)
+        .then(({ visitedViews }) => {
+          const latestView = visitedViews.slice(-1)[0];
+          if (latestView) {
+            return router.push(latestView.fullPath);
+          }
+          return router.push("/");
+        });
     }
-    return store.dispatch('tagsView/delView', obj);
+
+    return store.dispatch("tagsView/delView", obj);
+  },
+  closePageAndPushPrev(obj) {
+    if (obj === undefined) {
+      obj = router.currentRoute;
+    }
+
+    return store.dispatch("tagsView/delView", obj).then(({ visitedViews }) => {
+      //因为首页一直会存在
+      if (visitedViews.length === 1) {
+        return router.push("/");
+      }
+
+      router.go(-1);
+    });
   },
   // 关闭所有tab页签
   closeAllPage() {
-    return store.dispatch('tagsView/delAllViews');
+    return store.dispatch("tagsView/delAllViews");
   },
   // 关闭左侧tab页签
   closeLeftPage(obj) {
-    return store.dispatch('tagsView/delLeftTags', obj || router.currentRoute);
+    return store.dispatch("tagsView/delLeftTags", obj || router.currentRoute);
   },
   // 关闭右侧tab页签
   closeRightPage(obj) {
-    return store.dispatch('tagsView/delRightTags', obj || router.currentRoute);
+    return store.dispatch("tagsView/delRightTags", obj || router.currentRoute);
   },
   // 关闭其他tab页签
   closeOtherPage(obj) {
-    return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
+    return store.dispatch(
+      "tagsView/delOthersViews",
+      obj || router.currentRoute
+    );
   },
   // 添加tab页签
   openPage(title, url, params) {
-    var obj = { path: url, meta: { title: title } }
-    store.dispatch('tagsView/addView', obj);
+    var obj = { path: url, meta: { title: title } };
+    store.dispatch("tagsView/addView", obj);
     return router.push({ path: url, query: params });
   },
   // 修改tab页签
   updatePage(obj) {
-    return store.dispatch('tagsView/updateVisitedView', obj);
-  }
-}
+    return store.dispatch("tagsView/updateVisitedView", obj);
+  },
+};

+ 11 - 1
src/router/index.js

@@ -116,7 +116,17 @@ 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/checkRegister.vue'),
+      meta:{title:'检查登记'}
+    }]
+  },
 ]
 
 // 动态路由,基于用户权限动态去加载

+ 14 - 5
src/views/core/message/index.vue

@@ -100,6 +100,7 @@
               @click="lookThisOne(scope.row)"
               v-hasPermi="['core:notification:query']"
             >详情</el-button>
+            <div v-if="loginOrgId==scope.row.orgId">
             <el-button
               size="mini"
               type="text"
@@ -128,6 +129,7 @@
               v-hasPermi="['core:notification:cancelPublish']"
               v-if="scope.row.messagStatus=='1'"
             >取消发布</el-button>
+            </div>
           </template>
         </el-table-column>
       </el-table>
@@ -187,7 +189,7 @@
           <el-input v-model="form.content" type="textarea" placeholder="请输入内容" :disabled="!isSubmit" :autosize="{ minRows: 6, maxRows: 10}" :maxlength="2000" show-word-limit/>
         </el-form-item>
         <el-form-item label="附件" prop="fileList">
-          <K-file-upload ref="upload" :defaultValue="formFileListDefualtValue" :disabled="!isSubmit" v-model="form.fileList"/>
+          <K-file-upload ref="upload" :defaultValue="formFileListDefualtValue" :disabled="!isSubmit"  :isShowUploadBtn="!isSubmit? false:true" v-model="form.fileList"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -230,17 +232,20 @@ export default {
       // 是否显示弹出层
       open: false,
       orgId:null,
+      loginOrgId:null,
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
         title: null,
         dateRange: [],
-        messagStatus: null
+        messagStatus: null,
+        checkSub:true
       },
       isShow:false,
       isSubmit:true,
       roleList: [],
+      roleListInit: [],
       formFileListDefualtValue: [],
       // 表单参数
       form: {},
@@ -255,9 +260,11 @@ export default {
     };
   },
   created() {
+    this.orgId = this.$store.getters.orgId;
+    this.loginOrgId = this.$store.getters.orgId;
+    this.queryParams.orgId = this.$store.getters.orgId;
     this.getList();
     this.initRoleList();
-    this.orgId = this.$store.getters.orgId;
   },
   methods: {
     /** 查询公告通知列表 */
@@ -272,8 +279,8 @@ export default {
     getRolename(roleIds){
       if(roleIds!=null && roleIds.length>0){
         return roleIds.map(v => {
-          if(this.roleList.find(item => item.id === v)){
-            return this.roleList.find(item => item.id === v).name
+          if(this.roleListInit.find(item => item.id === v)){
+            return this.roleListInit.find(item => item.id === v).name
           }else {
             return "";
           }
@@ -290,6 +297,7 @@ export default {
       //this.roleList=[];
       this.reset();
       this.isSubmit=true;
+      this.isShow=false;
     },
     handleClose(){
       this.cancel();
@@ -461,6 +469,7 @@ export default {
       this.form.tagRoleIds = [];
       roleList(query).then(response => {
         this.roleList = response.data;
+        this.roleListInit = response.data;
       });
     },
 

+ 437 - 0
src/views/safetycheck/checkRegister/index.vue

@@ -0,0 +1,437 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <!--机构数据-->
+      <el-col :span="4" :xs="24">
+        <org-tree
+          v-model="queryParams.orgId"
+          @defaultKey="getDefaultKey"
+          @checkChange="checkChange"
+          @click="clickTreeNode"
+          :businessTree="true"
+        ></org-tree>
+      </el-col>
+      <el-col :span="20" :xs="24">
+        <!--    搜索条件    -->
+        <el-form
+          :model="queryParams"
+          ref="queryParams"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="100px"
+        >
+          <el-form-item label="检查名称" prop="title">
+            <el-input
+              v-model="queryParams.title"
+              placeholder="请输入检查名称"
+              clearable
+              @keyup.enter.native="handleQuery"
+              :maxlength="50"
+              @input="inputTitle"
+            />
+          </el-form-item>
+          <el-form-item
+            class="searchTitle"
+            label="任务开始时间"
+            prop="planStartTime"
+          >
+            <el-date-picker
+              v-model="queryParams.planStartTime"
+              :clearable="timeClearable"
+              type="date"
+              placeholder="选择时间"
+              value-format="yyyy-MM-dd"
+              @change="updatePlanStartTime"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="检查状态" prop="status">
+            <el-select
+              v-model="queryParams.status"
+              placeHolder="请选择"
+              clearable
+            >
+              <el-option
+                v-for="item in dict.type.safety_check_status"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-row>
+            <el-form-item label="受检机构" prop="orgName">             
+              <org-tree-select
+                v-model="queryParams.checkOrgIds"
+                ref="checkorgTreeSelect"
+                :disable="true"
+                @change="getList"
+              >
+              </org-tree-select>
+            </el-form-item>
+            <el-form-item style="margin-left: 50px">
+              <el-button
+                type="primary"
+                icon="el-icon-search"
+                size="mini"
+                @click="getList"
+                >搜索</el-button
+              >
+              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+                >重置</el-button
+              >
+            </el-form-item>
+          </el-row>
+        </el-form>
+        <!--    按纽    -->
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-download"
+              size="mini"
+              @click="onRegister()"
+              v-hasPermi="['resumption:taskManager:export']"
+              >登记安全检查结果</el-button
+            >
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-download"
+              size="mini"
+              @click="exportExcel()"
+              v-hasPermi="['resumption:taskManager:export']"
+              >导出</el-button
+            >
+          </el-col>
+
+          <right-toolbar
+            :showSearch.sync="showSearch"
+            @queryTable="getList"
+            :columns="columns"
+          ></right-toolbar>
+        </el-row>
+        <el-table
+          border
+          height="600"
+          size="small"
+          v-loading="loading"
+          :data="pageData"
+        >
+          <el-table-column
+            type="index"
+            fixed
+            min-width="50"
+            label="序号"
+            v-if="columns[0].visible"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="title"
+            label="检查名称"
+            min-width="120"
+            v-if="columns[1].visible"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="checkOrgName"
+            label="检查机构"
+            min-width="120"
+            v-if="columns[5].visible"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="roleName"
+            label="检查角色"
+            min-width="120"
+            v-if="columns[6].visible"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="orgName"
+            label="受检机构"
+            min-width="120"
+            v-if="columns[4].visible"
+          >
+          </el-table-column>
+
+          <el-table-column
+            prop="planStartTime"
+            label="开始日期"
+            min-width="140"
+            v-if="columns[2].visible"
+          />
+          <el-table-column
+            prop="planEndTime"
+            label="截止日期"
+            min-width="140"
+            v-if="columns[3].visible"
+          />
+
+          <el-table-column
+            prop="status"
+            label="检查状态"
+            width="100px"
+            v-if="columns[10].visible"
+          >
+            <template slot-scope="r">
+              <span>
+                <i class="circle" :style="statusColor(r.row.status, true)" />
+                <label :style="statusColor(r.row.status, false)">
+                  {{
+                    getLabel(dict.type.safety_check_status, r.row.status)
+                  }}</label
+                >
+              </span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            prop="submitName"
+            label="检查人"
+            min-width="120"
+            v-if="columns[7].visible"
+          ></el-table-column>
+          <el-table-column
+            label="检查时间"
+            min-width="120"
+            v-if="columns[8].visible"
+          >
+            <template slot-scope="r">{{
+              r.row.submitTime | dateTime
+            }}</template>
+          </el-table-column>
+          <el-table-column
+            prop="exceptionCount"
+            label="问题数量"
+            min-width="80"
+            v-if="columns[9].visible"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="des"
+            label="备注"
+            min-width="80"
+            v-if="columns[9].visible"
+          >
+          </el-table-column>
+          <el-table-column label="操作" fixed="right" min-width="120px">
+            <template slot-scope="r">
+              <el-button
+                type="text"
+                @click="showDetail(r.row)"
+                v-hasPermi="['resumption:taskManager:query']"
+                >详情</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>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
+import OrgTree from "@/components/orgTree";
+import * as api from "@/api/safetycheck/task.js";
+import { getLabel } from "@/views/commonOption.js";
+import OrgTreeSelect from "@/components/orgTreeSelect";
+export default {
+  name: "checkTaskList",
+  dicts: ["resumption_plan_cycle", "resumption_status", "safety_check_status"],
+  components: {
+    DataRangePicker,
+    OrgTreeSelect,
+    OrgTree,
+  },
+  data() {
+    return {
+      loading: false,
+      showSearch: true,
+      total: 0,
+      timeClearable: false,
+      options: [],
+      roleList: [],
+      planList: [],
+
+      queryParams: {
+        checkSub: true,
+        orgId: null,
+        orgName: null,
+        status: null,
+        planId: null,
+        pageNum: 1,
+        pageSize: 10,
+        planStartTime: null,
+        title: null,
+        checkOrgIds: null,
+      },
+      selectedOrgName: null,
+      pageData: [],
+      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 },
+        { key: 9, label: `异常个数`, visible: true },
+        { key: 10, label: `任务状态`, visible: true },
+      ],
+    };
+  },
+  props: {},
+  watch: {
+    statusVal(value) {
+      if (value == undefined) return;
+      if (value == "all") this.queryParams.status = null;
+      else this.queryParams.status = value;
+    },
+    planVal(value) {
+      if (value == undefined) return;
+      if (value == -1) this.queryParams.planId = null;
+      else this.queryParams.planId = value;
+    },
+    $route(v) {
+      //this.queryParams.type = this.$route.params.type.toUpperCase();
+    },
+    // 0每日;1每周;2每月;3每季度;4每半年;5每年
+  },
+  computed: {
+    ...mapGetters(["orgName","userId","roleList","orgId"]),
+  },
+  methods: {
+    updatePlanStartTime(value) {
+      // console.log(this.queryParams.planStartTime,"前");
+      this.queryParams.planStartTime = value;
+      // console.log(this.queryParams.planStartTime,"后");
+    },
+    inputRestriction() {
+      // 限制只允许输入汉字、英文和数字
+      this.queryParams.orgName = this.queryParams.orgName.replace(
+        /[^\u4e00-\u9fa5a-zA-Z0-9]/g,
+        ""
+      );
+    },
+    inputTitle() {
+      // 限制只允许输入汉字、英文和数字
+      this.queryParams.title = this.queryParams.title.replace(
+        /[^\u4e00-\u9fa5a-zA-Z0-9]/g,
+        ""
+      );
+    },
+    getLabel,
+    showDetail(row) {
+      let path = "/core/safetycheck/register/" + row.id;
+      this.$router.push(path);
+    },
+    showRegister(row) {
+      let path = "/core/safetycheck/register/" + row.id+"?mode=register";
+      this.$router.push(path);
+    },
+    getDefaultKey(key) {
+      this.queryParams.orgId = key;
+      this.selectedOrgName = this.orgName;
+      this.getList();
+      this.loadRoles(key);
+      // this.loadPlanList();
+    },
+    //单选框状态改变
+    checkChange(state) {
+      this.queryParams.checkSub = state;
+
+      this.getList();
+    },
+    // 节点单击事件
+    clickTreeNode(data) {
+      this.queryParams.orgId = data.id;
+      this.selectedOrgName = data.name;
+      // this.loadPlanList();
+      this.loadRoles();
+      this.getList();
+    },
+    resetQuery() {
+      this.queryParams.checkOrgIds = [];
+      this.resetForm("queryParams");
+      this.getList();
+    },
+    async getList() {
+      console.log(this.queryParams, "this.queryParams");
+      this.loading = true;
+      api
+        .page(this.queryParams)
+        .then((r) => {
+          this.isTableHaveData = r.rows.length > 0;
+          this.pageData = r.rows;
+          this.total = r.total;
+          this.loading = false;
+        })
+        .catch((e) => {
+          this.loading = false;
+        });
+    },
+    loadRoles() {
+      api
+        .getRoles({
+          orgId: this.queryParams.orgId,
+          planCycle: this.queryParams.executeCycle,
+        })
+        .then((r) => (this.roleList = r.data));
+    },
+
+    // loadPlanList() {
+    //   api
+    //     .getPlans({
+    //       orgId: this.queryParams.orgId,
+    //       // planCycle: this.queryParams.executeCycle,
+    //     })
+    //     .then((r) => {
+    //       this.planList = r.data;
+    //     });
+    // },
+
+    statusColor(status, isBackground) {
+      let color = "";
+      switch (status) {
+        case "1":
+          color = "#BFBFBF";
+          break;
+        case "2":
+          color = "#1890FF";
+          break;
+        case "3":
+          color = "#52C41A";
+          break;
+        case "4":
+          color = "#F5222D";
+          break;
+      }
+
+      if (isBackground) {
+        return "background-color:" + color;
+      } else {
+        return "color:" + color;
+      }
+    },
+  },
+  async mounted() {},
+};
+</script>
+
+<style lang="scss"></style>

+ 1 - 0
src/views/safetycheck/ruleManager/dialog.select.point.vue

@@ -137,5 +137,6 @@ export default {
 <style lang="scss" scoped>
 .el-dialog-div {
   overflow: auto;
+  margin-bottom:20px;
 }
 </style>

+ 426 - 0
src/views/safetycheck/taskManager/components/checkRegister.vue

@@ -0,0 +1,426 @@
+<!--事后的检查登记-->
+<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"
+            /> </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%"
+            >
+              <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"
+            />
+          </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"
+            ></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="选择检查日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <div>
+      <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>
+                <span class="pointName"
+                  ><i class="circle" /> {{ point.pointName }}</span
+                >
+                <el-radio-group v-model="point.status">
+                  <el-radio :label="0">正常</el-radio>
+                  <el-radio :label="1">异常</el-radio>
+                </el-radio-group>
+                <el-button
+                  type="danger"
+                  size="mini"
+                  v-if="point.isAdd"
+                  style="margin-left: 50px"
+                  @click="onDeletePoint(area, item, point)"
+                  >移除</el-button
+                >
+              </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="image">
+                    <imgUpload
+                      type="more"
+                      :value="
+                        point.imgData
+                          ? point.imgData.map((d) => d.imgPath).join(',')
+                          : ''
+                      "
+                      @input="onImageChanged(point, $event)"
+                    ></imgUpload>
+                  </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>
+              </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="['safetycheck:register:add']"
+        >提交</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/register.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: null,
+        checkTeam: null,
+        checkList: [],
+      },
+      roleOptions: [],
+      prevCheckOrgType: 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() {},
+  methods: {
+    dayjs,
+    getLabel,
+    onCheckOrgSelect(node) {
+      if (node.type == this.prevCheckOrgType) {
+        return;
+      }
+
+      getNamesByOrgId(node.id).then((r) => {
+        this.roleOptions = r.data;
+        this.prevCheckOrgType = node.type;
+      });
+    },
+    onBecheckOrgSelect(node) {
+      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("没有可新增的检查内容");
+      }
+    },
+    onClose() {
+      this.$tab.closePageAndPushPrev();
+    },
+    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 }));
+    },
+
+    onSave() {
+      this.info.isSubmit = 0;
+      api.submit(this.info).then((r) => {
+        this.$message.info("保存成功");
+      });
+    },
+    async onSubmit() {
+      let isOk = true;
+      // let r = this.$refs;
+      for (let p in this.$refs) {
+        if (p.startsWith("point")) {
+          try {
+            isOk &= await this.$refs[p][0].validate();
+          } catch (e) {
+            isOk &= false;
+            console.error(e);
+          }
+        }
+      }
+      if (isOk) {
+        this.info.isSubmit = 1;
+        api.submit(this.info).then((r) => {
+          this.$message.info("提交成功");
+        });
+      }
+    },
+  },
+};
+</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;
+}
+// .safetycheck_point > div:nth-child(1) {
+//   margin-bottom: 15px;
+// }
+.pointName {
+  width: 200px;
+  display: inline-block;
+}
+.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: #B8BDC0;
+  border: none;
+  margin-bottom: 3px;
+}
+</style>

+ 9 - 6
src/views/safetycheck/taskManager/components/register.vue

@@ -153,7 +153,7 @@
     </div>
 
     <div class="dialog-footer">
-      <el-button>关闭</el-button>
+      <el-button @click="onClose">关闭</el-button>
       <el-button
         @click="onGrant"
         v-if="showGrantBtn"
@@ -320,6 +320,9 @@ export default {
         this.$message.info("没有可新增的检查内容");
       }
     },
+    onClose(){
+      this.$tab.closePageAndPushPrev();
+    },
     onDeletePoint(area, item, point) {
       if (point.isAdd === 0) {
         this.$message.warning("不可删除计划的检查内容");
@@ -405,7 +408,7 @@ export default {
   margin-top: 20px;
 }
 .area_content {
-  border: #797979 1px solid;
+  border: #B8BDC0 1px solid;
   display: flex;
   flex-direction: row;
 }
@@ -415,12 +418,12 @@ export default {
 }
 
 .content > .area_content:last-child {
-  border-bottom: #797979 1px solid;
+  border-bottom: #B8BDC0 1px solid;
 }
 
 .area_content > div:nth-child(1) {
   background-color: #f7f7f7;
-  border-right: #797979 1px solid;
+  border-right: #B8BDC0 1px solid;
   padding-top: auto;
   width: 15%;
   display: flex;
@@ -453,7 +456,7 @@ export default {
 .dialog-footer {
   width: 100%;
   text-align: right;
-  border-top: #797979 1px solid;
+  border-top: #B8BDC0 1px solid;
   padding-top: 10px;
   padding-right: 30px;
   position: absolute;
@@ -465,7 +468,7 @@ export default {
   width: 5px;
   height: 5px;
   border-radius: 5px;
-  background-color: #333333;
+  background-color: #B8BDC0;
   border: none;
   margin-bottom: 3px;
 }

+ 0 - 6
src/views/system/bind/index.vue

@@ -441,9 +441,3 @@ export default {
   }
 };
 </script>
-
-<style lang="scss">
-.vue-treeselect__menu-container{
-  z-index: 3000 !important;
-}
-</style>

+ 41 - 16
src/views/system/dept/extend.vue

@@ -1273,7 +1273,7 @@ export default {
   },
   watch: {
     "detachedform.certificateEvidence"(newValue) {
-      if (newValue === 1) {
+      if (newValue === 1&&this.detachedform.certificate==null&&this.detachedimgs.length==0) {
         this.reqmsg = true;
       }
       if (newValue === 0) {
@@ -1281,7 +1281,9 @@ export default {
       }
     },
     "Bankform.certificateEvidence"(newValue) {
-      if (newValue === 1) {
+      // console.log(this.Bankimgs.length,"this.imgs")
+      // console.log(this.Bankform.certificate,"Bankform.certificate")
+      if (newValue === 1&&this.Bankform.certificate==null&&this.Bankimgs.length==0) {
         this.reqmsg = true;
       }
       if (newValue === 0) {
@@ -1289,7 +1291,7 @@ export default {
       }
     },
     "Businessform.certificateEvidence"(newValue) {
-      if (newValue === 1) {
+      if (newValue === 1&&this.Businessform.certificate==null&&this.Businessimgs.length==0) {
         this.reqmsg = true;
       }
       if (newValue === 0) {
@@ -1297,7 +1299,7 @@ export default {
       }
     },
     "orgform.certificateEvidence"(newValue) {
-      if (newValue === 1) {
+      if (newValue === 1&&this.orgform.certificate==null&&this.orgimgs.length==0) {
         this.reqmsg = true;
       }
       if (newValue === 0) {
@@ -1345,7 +1347,7 @@ export default {
     // },
     getImgUrl(img) {
       this.imgs.push(img);
-      console.log(this.imgs, "imgs");
+      // console.log(this.imgs, "imgs");
     },
     getAreaList() {
       selectCityInfoVoList({}).then((response) => {
@@ -1365,15 +1367,19 @@ export default {
     //证书上传
     uploadBusinessSuccess(img) {
       this.Businessimgs.push(img);
+      this.reqmsg = false;
     },
     uploadBankSuccess(img) {
       this.Bankimgs.push(img);
+      this.reqmsg = false;
     },
     uploadorgSuccess(img) {
       this.orgimgs.push(img);
+      this.reqmsg = false;
     },
     uploaddetachedSuccess(img) {
       this.detachedimgs.push(img);
+      this.reqmsg = false;
     },
 
     handleInput() {
@@ -1539,13 +1545,14 @@ export default {
       getOrgPhysicalDefenseConstruction(id).then((response) => {
         // console.log(response.data,"response.data")
         this.Businessform = response.data;
+        // this.Businessform.certificateEvidence=parseInt(response.data.certificateEvidence);
         this.Businessopen = true;
         this.Businesstitle = "编辑安全防范设施建设达标情况";
       });
     },
     /** 提交按钮 */
     submitBusinessForm() {
-      if(this.Businessimgs.length>1){
+      if(this.Businessimgs.length>0){
         this.Businessform.certificate= this.Businessimgs[this.Businessimgs.length - 1].toString(",");
       }
      
@@ -1573,6 +1580,7 @@ export default {
               }
             );
           }
+          this.Businessimgs=[];
         } else {
           // 表单验证未通过,显示错误信息
         }
@@ -1632,6 +1640,7 @@ export default {
     },
     /** 新增按钮操作 */
     handleBankAdd() {
+      
       this.Bankreset();
       this.Bankopen = true;
       this.Banktitle = "新增安全防范设施建设达标情况";
@@ -1642,13 +1651,14 @@ export default {
       const id = row.id || this.Bankids;
       getOrgPhysicalDefenseConstruction(id).then((response) => {
         this.Bankform = response.data;
+        // this.Bankform.certificateEvidence=parseInt(response.data.certificateEvidence);
         this.Bankopen = true;
         this.Banktitle = "编辑安全防范设施建设达标情况";
       });
     },
     /** 提交按钮 */
     submitBankForm() {
-      if(this.Bankimgs.length>1){
+      if(this.Bankimgs.length>0){
         this.Bankform.certificate= this.Bankimgs[this.Bankimgs.length - 1].toString(",");
       }
 
@@ -1676,11 +1686,12 @@ export default {
               }
             );
           }
+          this.Bankimgs = [];
         } else {
           // 表单验证未通过,显示错误信息
         }
       });
-
+      
       // this.$refs["Bankform"].validate((valid) => {
       //   if (valid) {
 
@@ -1743,13 +1754,15 @@ export default {
       const id = row.id || this.detachedids;
       getOrgPhysicalDefenseConstruction(id).then((response) => {
         this.detachedform = response.data;
+        // this.detachedform.certificateEvidence=parseInt(response.data.certificateEvidence);
         this.detachedopen = true;
+        
         this.detachedtitle = "编辑安全防范设施建设达标情况";
       });
     },
     /** 提交按钮 */
     submitdetachedForm() {
-      if(this.detachedimgs.length>1){
+      if(this.detachedimgs.length>0){
         this.detachedform.certificate= this.detachedimgs[this.detachedimgs.length - 1].toString(",");
       }
 
@@ -1768,6 +1781,7 @@ export default {
                 this.getdetachedPhysicalDefenseConstructionInfo();
               }
             );
+            
           } else {
             addOrgPhysicalDefenseConstruction(this.detachedform).then(
               (response) => {
@@ -1777,6 +1791,7 @@ export default {
               }
             );
           }
+          this.detachedimgs=[];
         } else {
           // 表单验证未通过,显示错误信息
         }
@@ -1809,7 +1824,7 @@ export default {
         id: null,
         standard: null,
         dateOfCompliance: null,
-        certificateEvidence: null,
+        certificateEvidence: 0,
         certificate: null,
         evidence: null,
         createTime: null,
@@ -1843,18 +1858,24 @@ export default {
       this.orgreset();
       const id = row.id || this.orgids;
       getOrgPhysicalDefenseConstruction(id).then((response) => {
-        // console.log(response)
+        
         this.orgform = response.data;
         this.orgopen = true;
+        // console.log(response.data.certificateEvidence,"response.data.certificateEvidence")
+        //  this.orgform.certificateEvidence=parseInt(response.data.certificateEvidence);
+        // console.log(this.orgform,"this.orgform")
         this.orgtitle = "编辑安全防范设施建设达标情况";
       });
     },
     /** 提交按钮 */
     submitOrgForm() {
-      if(this.orgimgs.length>1){
+      // console.log(this.orgimgs,"this.orgimgs")
+      // console.log(this.orgform.certificate,"this.orgform.certificate")
+      if(this.orgimgs.length>0){
         this.orgform.certificate= this.orgimgs[this.orgimgs.length - 1].toString(",");
       }
-      
+      // console.log(this.orgimgs,"this.orgimgs1")
+      // console.log(this.orgform.certificate,"this.orgform.certificate1")
       this.$refs.orgform.validate((valid) => {
         if (valid) {
           // 表单验证通过,提交数据或执行其他操作
@@ -1876,6 +1897,7 @@ export default {
               this.getOrgPhysicalDefenseConstructionInfo();
             });
           }
+          this.orgimgs=[];
         } else {
           // 表单验证未通过,显示错误信息
         }
@@ -1931,17 +1953,20 @@ export default {
       if (this.extendId) {
         updateExtend(dat).then((res) => {
           this.$modal.msgSuccess("保存成功");
-          this.$router.go(-1);
+          // this.$router.go(-1);
+          this.$tab.closePageAndPushPrev();
         });
       } else {
         addExtend(dat).then((res) => {
           this.$modal.msgSuccess("保存成功");
-          this.$router.go(-1);
+          // this.$router.go(-1);
+          this.$tab.closePageAndPushPrev();
         });
       }
     },
     nosaveExtend() {
-      this.$router.go(-1);
+      // this.$router.go(-1);
+      this.$tab.closePageAndPushPrev();
     },
     triggerFileInput() {
       this.$refs.fileInput.click();

+ 5 - 28
src/views/system/device/index.vue

@@ -1,12 +1,11 @@
 <template>
   <div class="app-container">
     <el-row :gutter="20">
-  <!--机构数据-->
-  <el-col :span="4" :xs="24">
+      <!--机构数据-->
+      <el-col :span="4" :xs="24">
                   <org-tree v-model="queryParams.orgId" @defaultKey="getDefaultKey" @defaultOrg="getDefaultOrg" @checkChange="checkChange"
                     @click="clickTreeNode"></org-tree>
       </el-col>
-     
         <el-col :span="20" :xs="24">
           <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
             label-width="68px">
@@ -39,12 +38,8 @@
 
           <el-row :gutter="10" class="mb8">
             <el-col :span="1.5">
-              <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-                v-hasPermi="['system:device:add']">新增</el-button>
-            </el-col>
-            <el-col :span="1.5">
-              <el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport"
-                v-hasPermi="['system:device:import']">导入</el-button>
+           
+                <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:device:add']">新增</el-button>
             </el-col>
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
           </el-row>
@@ -200,7 +195,6 @@
 </template>
 
 <script>
-import { getToken } from "@/utils/auth";
 import orgDropDown from "../../../components/orgTree/orgDropDown.vue";
 import OrgTree from "@/components/orgTree";
 import tableList from '@/mixins/tableList'
@@ -278,19 +272,6 @@ export default {
       dept:{
         id:null
       },
-      upload: {
-        // 是否显示弹出层(用户导入)
-        open: false,
-        // 弹出层标题(用户导入)
-        title: "",
-        // 是否禁用上传
-        isUploading: false,
-       
-        // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
-        // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/system/device/importData",
-      },
       queryParams: {
         pageNum: 1,
         pageSize: 10,
@@ -400,11 +381,7 @@ export default {
         this.loading = false;
       });
     },
- /** 导入按钮操作 */
- handleImport() {
-      this.upload.title = "用户导入";
-      this.upload.open = true;
-    },
+
     /** 查询部门下拉树结构 */
     getDeptTree() {
       deptTreeSelect().then(response => {