Browse Source

界面统一、临时登记

jiawuxian 2 years ago
parent
commit
72dc210280

+ 20 - 0
src/api/safetycheck/checkRegister.js

@@ -0,0 +1,20 @@
+import request from "@/utils/request";
+
+// 登记信息
+export function tempSubmit(data) {
+  return request({
+    url: "/core/safetycheck/register/webtempsubmit",
+    method: "POST",
+    showLoading: true,
+    data,
+  });
+}
+
+// 获取机构可用的角色列表
+// export function rolesByOrgId(orgId) {
+//   return request({
+//     url: "/system/role//getnamesbyorgid/" + orgId,
+//     method: "get",
+//     showLoading: true,
+//   });
+// } 

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

@@ -110,7 +110,7 @@ export default {
     this.getDeptTree();
   },
   computed:{
-    ...mapGetters(["orgTree"]),
+    ...mapGetters(["businessTree"]),
   },
   mounted() {
     this.getHeight();

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

@@ -47,7 +47,7 @@ export default {
   methods: {
     /** 查询机构下拉树结构 */
     getDeptTree() {
-      this.deptOptions = this.$store.getters.wholeTree;
+      this.deptOptions = this.$store.getters.businessTree;
       if (this.deptOptions && this.deptOptions.length > 0) {
         if (this.val) {
           this.currentNode = this.findNodeInOptions(this.val);

+ 13 - 1
src/router/index.js

@@ -123,14 +123,26 @@ export const constantRoutes = [
     children:[{
       path:'add',
       name:'addRegister',
-      component: () => import('@/views/safetycheck/taskManager/components/checkRegister.vue'),
+      component: () => import('@/views/safetycheck/taskManager/components/register.vue'),
       meta:{title:'检查登记'}
     }]
+  },{
+    path: '/safetycheck/tempregister',
+    component: Layout,    
+    hidden: true,
+    permissions: ['core:safetycheck:register'],
+    children:[{
+      path:'add',
+      name:'tempRegister',
+      component: () => import('@/views/safetycheck/taskManager/components/checkRegister.vue'),
+      meta:{title:'临时登记'}
+    }]
   },
   {
     path: '/board',
     component: Layout,    
     hidden: true,
+    permissions: ['core:cockpit'],
     children:[{
       path:'',
       name:'board',

+ 4 - 4
src/views/check/task/index.vue

@@ -139,7 +139,7 @@
               <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
                 >重置</el-button
               >
-              <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
+              <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['core:safetycheck:tempregister']"
                 >临时登记</el-button
               >
             </el-form-item>
@@ -354,7 +354,6 @@ import { getLabel } from "@/views/commonOption.js";
 import OrgTreeSelect from "@/components/orgTreeSelect";
 import { checkPermi } from "@/utils/permission.js";
 import dayjs from "dayjs";
-import DialogTemporaryTask from "@/views/safetycheck/taskManager/components/dialog.temporarytask.vue"
 export default {
   name: "checkTaskList",
   dicts: ["resumption_plan_cycle", "resumption_status", "safety_check_status"],
@@ -364,7 +363,7 @@ export default {
     DataRangePicker,
     OrgTreeSelect,
     OrgTree,
-    DialogTemporaryTask
+    
   },
   data() {
     return {
@@ -503,7 +502,8 @@ export default {
       this.getList();
     },
     handleAdd(){
-this.$refs["dialogtemporarytask"].show();
+      let path = "/safetycheck/tempregister/add";
+      this.$router.push(path);
     },
     async getList() {
       console.log(this.queryParams, "this.queryParams");

+ 6 - 6
src/views/resumption/protection/dialog.edit.vue

@@ -29,7 +29,7 @@
               v-model="formData.alarmHostId"
               placeholder="请选择报警主机"
               clearable
-              style="width:330px"
+              style="width: 330px"
             >
               <el-option
                 v-for="host in alarmHostOptions"
@@ -61,8 +61,8 @@
       </div>
 
       <div 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>
   </div>
@@ -104,7 +104,7 @@ export default {
     reset() {
       return {
         id: null,
-        orgId:null,
+        orgId: null,
         orgPath: null,
         orgName: null,
         name: null,
@@ -140,9 +140,9 @@ export default {
       this.formData.orgName = node.shortName;
       listIdName({ orgId: node.id, deviceType: 1, assetType: 2 }).then((d) => {
         this.alarmHostOptions = d.data;
-        if(!d.data.find(i=>i.id==this.formData.alarmHostId)){
-          this.formData.alarmHostId  = null;
-        }       
+        if (!d.data.find((i) => i.id == this.formData.alarmHostId)) {
+          this.formData.alarmHostId = null;
+        }
       });
     },
   },

+ 12 - 8
src/views/resumption/protection/dialog.history.vue

@@ -60,8 +60,8 @@
       </div>
 
       <div slot="footer" class="dialog-footer">
-        <!-- <el-button @click="onHide">取消</el-button>
-          <el-button type="primary" @click="onSubmit">确定</el-button> -->
+        <el-button @click="onHide">关闭</el-button>
+        <!--<el-button type="primary" @click="onSubmit">确定</el-button> -->
       </div>
     </DialogCom>
   </div>
@@ -89,12 +89,12 @@ export default {
     },
   },
   watch: {
-    "queryParams.updateTime":{
-      deep:true,
-      handler(v){
+    "queryParams.updateTime": {
+      deep: true,
+      handler(v) {
         this.refresh();
-      }
-    }
+      },
+    },
   },
   computed: {},
   methods: {
@@ -109,6 +109,9 @@ export default {
         this.total = v.total;
       });
     },
+    onHide() {
+      this.isShow = false;
+    },
     close() {
       this.queryParams = this.resetSearch();
       this.tableData = [];
@@ -142,7 +145,8 @@ export default {
   },
   created() {},
   mounted() {},
-  components: {DataRangePicker
+  components: {
+    DataRangePicker,
     // EditAttribute,
   },
 };

+ 10 - 2
src/views/resumption/rule/dialog.edit.vue

@@ -63,14 +63,22 @@
             </el-select>
           </el-form-item>
           <el-form-item prop="remark" label="备注">
-            <el-input v-model="formData.remark" :maxlength="255" clearable  style="width:280px;" type="textarea" :rows="3" placeholder="请输入备注"/>
+            <el-input
+              v-model="formData.remark"
+              :maxlength="255"
+              clearable
+              style="width: 280px"
+              type="textarea"
+              :rows="3"
+              placeholder="请输入备注"
+            />
           </el-form-item>
         </el-form>
       </div>
 
       <div 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>
   </div>

+ 1 - 1
src/views/resumption/ruleManager/dialog.editItem.vue

@@ -70,8 +70,8 @@
       </div>
 
       <div slot="footer" class="dialog-footer">
-        <el-button  @click="dialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="onSubmit()">保 存</el-button>
+        <el-button @click="dialogVisible = false">取 消</el-button>
       </div>
     </DialogCom>
     <EditPoint

+ 1 - 1
src/views/resumption/ruleManager/dialog.editPoint.vue

@@ -45,10 +45,10 @@
         </el-form>
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dataVisible = false">取 消</el-button>
         <el-button type="primary" @click="onSubmit()">{{
           index >= 0 ? "保 存" : "添 加"
         }}</el-button>
+        <el-button @click="dataVisible = false">取 消</el-button>        
       </div>
     </DialogCom>
   </div>

+ 9 - 9
src/views/resumption/ruleManager/dialog.select.point.vue

@@ -24,6 +24,13 @@
       >
         <!-- 搜索 -->
         <template slot="searchs">
+          <el-form-item prop="key" label="关键字">
+            <el-input
+              v-model="search.key"
+              maxlength="50"
+              placeholder="请输入履职项或履职内容"
+            ></el-input>
+          </el-form-item>
           <el-form-item prop="ruleId" label="履职内容库">
             <el-select v-model="search.ruleId">
               <el-option
@@ -33,14 +40,7 @@
                 :label="item.name"
               ></el-option>
             </el-select>
-          </el-form-item>
-          <el-form-item prop="key" label="关键字">
-            <el-input
-              v-model="search.key"
-              maxlength="50"
-              placeholder="请输入履职项或履职内容"
-            ></el-input>
-          </el-form-item>
+          </el-form-item>          
         </template>
 
         <!-- 表格 -->
@@ -73,8 +73,8 @@
     </div>
 
     <div slot="footer" class="dialog-footer">
-      <el-button @click="onHide">关闭</el-button>
       <el-button type="primary" @click="onSubmit">确定</el-button>
+      <el-button @click="onHide">关闭</el-button>
     </div>
   </DialogCom>
 </template>

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

@@ -205,7 +205,7 @@
                 >
                 <el-button
                   type="text"
-                  icon="el-icon-document-copy"
+                  icon="el-icon-tickets"
                   @click="showscanRecord(r.row)"
                   v-show="r.row.status == 2 || r.row.status == 3"
                   v-hasPermi="['resumption:taskManager:query']"

+ 16 - 8
src/views/safetycheck/rule/dialog.edit.vue

@@ -22,7 +22,7 @@
               :maxlength="50"
               placeholder="请输入检查内容库名称"
               clearable
-              style="width:280px;"
+              style="width: 280px"
             />
           </el-form-item>
           <el-form-item prop="orgType" label="受检机构类型:">
@@ -32,7 +32,7 @@
               v-model="formData.orgType"
               placeholder="请选择受检机构类型"
               clearable
-              style="width:280px;"
+              style="width: 280px"
             >
               <el-option
                 v-for="item in orgTypeOptions"
@@ -51,7 +51,7 @@
               v-model="formData.status"
               placeholder="请选择状态"
               clearable
-              style="width:280px;"
+              style="width: 280px"
             >
               <el-option
                 v-for="item in statusOptions"
@@ -63,14 +63,22 @@
             </el-select>
           </el-form-item>
           <el-form-item prop="remark" label="备注">
-            <el-input type="textarea" v-model="formData.remark" :maxlength="255" clearable  style="width:280px;" :rows="3"  placeholder="请输入备注"/>
+            <el-input
+              type="textarea"
+              v-model="formData.remark"
+              :maxlength="255"
+              clearable
+              style="width: 280px"
+              :rows="3"
+              placeholder="请输入备注"
+            />
           </el-form-item>
         </el-form>
       </div>
 
       <div 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>
   </div>
@@ -131,9 +139,9 @@ export default {
     },
 
     // 事件
-    onHide() {   
-      this.formData=this.reset();
-      this.$refs.form.resetFields(); 
+    onHide() {
+      this.formData = this.reset();
+      this.$refs.form.resetFields();
     },
     onSubmit() {
       this.$refs.form.validate(async (isValidate) => {

+ 13 - 5
src/views/safetycheck/ruleManager/dialog.editItem.vue

@@ -49,8 +49,14 @@
                   @click="onEdit(scope.$index, scope.row)"
                   >编辑</el-button
                 >
-                <el-popconfirm title="是否删除检查内容" @confirm="delitem(scope.$index)" style="margin-left: 20px;">
-                  <el-button slot="reference" type="text" size="small">删除</el-button>
+                <el-popconfirm
+                  title="是否删除检查内容"
+                  @confirm="delitem(scope.$index)"
+                  style="margin-left: 20px"
+                >
+                  <el-button slot="reference" type="text" size="small"
+                    >删除</el-button
+                  >
                 </el-popconfirm>
               </template>
             </el-table-column>
@@ -59,8 +65,8 @@
       </div>
 
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="onSubmit()">保 存</el-button>
+        <el-button @click="dialogVisible = false">取 消</el-button>
       </div>
     </DialogCom>
     <EditPoint
@@ -122,7 +128,10 @@ export default {
         if (!isValidate) {
           return;
         }
-        if(!this.formData.pointDtoList || this.formData.pointDtoList.length==0){
+        if (
+          !this.formData.pointDtoList ||
+          this.formData.pointDtoList.length == 0
+        ) {
           MessageEx.info("检查内容不能为空!");
           return;
         }
@@ -156,7 +165,6 @@ export default {
 </script>
 
 <style lang="scss">
-
 .box {
   margin-bottom: 20px;
 }

+ 1 - 1
src/views/safetycheck/ruleManager/dialog.editPoint.vue

@@ -81,10 +81,10 @@
         </el-form>
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button @click="dataVisible = false">取 消</el-button>
         <el-button type="primary" @click="onSubmit()">{{
           index >= 0 ? "保 存" : "添 加"
         }}</el-button>
+        <el-button @click="dataVisible = false">取 消</el-button>
       </div>
     </DialogCom>
   </div>

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

@@ -68,8 +68,8 @@
     </div>
 
     <div slot="footer" class="dialog-footer">
-      <el-button @click="onHide">关闭</el-button>
       <el-button type="primary" @click="onSubmit">确定</el-button>
+      <el-button @click="onHide">关闭</el-button>
     </div>
   </DialogCom>
 </template>

+ 2 - 0
src/views/safetycheck/ruleManager/index.vue

@@ -71,6 +71,7 @@
                 <el-button
                   type="primary"
                   size="mini"
+                  icon="el-icon-plus"
                   @click="onAddItem()"
                   :disabled="rule ? false : true"
                   v-hasPermi="['safetycheck:ruleManager:add']"
@@ -84,6 +85,7 @@
               > -->
                 <el-button
                   type="primary"
+                  :icon="expandAll ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
                   @click="dakai"
                   size="mini"
                   :disabled="rule ? false : true"

+ 9 - 7
src/views/safetycheck/taskManager/components/checkRegister.vue

@@ -56,6 +56,7 @@
               style="width: 100%"
               placeHolder="请输入检查组成员"
               v-model="info.checkTeam"
+              maxlength="255"
             ></el-input> </el-form-item
         ></el-col>
         <el-col :span="6">
@@ -74,7 +75,7 @@
     <div>
       <span style="margin-right: 20px">巡检区域</span>
       <el-button type="primary" size="mini" @click="onAddPoint()"
-        >新增检查内容</el-button
+        >选择检查内容</el-button
       >
     </div>
     <div class="content">
@@ -156,7 +157,7 @@
       <el-button
         type="primary"
         @click="onSubmit()"
-        v-hasPermi="['safetycheck:register:add']"
+        v-hasPermi="['core:safetycheck:tempregister']"
         >提交</el-button
       >
     </div>
@@ -169,7 +170,7 @@
 </template>
 <script>
 import { mapGetters } from "vuex";
-import * as api from "@/api/safetycheck/register.js";
+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";
@@ -186,7 +187,7 @@ export default {
         checkRoleId: null,
         beCheckedOrgId: null,
         beCheckOrgType: null,
-        planStartTime: null,
+        planStartTime: new Date(),
         checkTeam: null,
         checkList: [],
       },
@@ -221,13 +222,14 @@ export default {
         return;
       }
 
+      this.info.checkRoleId=null;
       getNamesByOrgId(node.id).then((r) => {
         this.roleOptions = r.data;
         this.prevCheckOrgType = node.type;
       });
     },
     onBecheckOrgSelect(node) {
-      this.info.beCheckOrgType = node.type;
+      this.info.beCheckOrgType=node.type;
     },
     onAddPoint() {
       if (!this.info.beCheckedOrgId) {
@@ -324,7 +326,7 @@ export default {
 
     onSave() {
       this.info.isSubmit = 0;
-      api.submit(this.info).then((r) => {
+      api.tempSubmit(this.info).then((r) => {
         this.$message.info("保存成功");
       });
     },
@@ -343,7 +345,7 @@ export default {
       }
       if (isOk) {
         this.info.isSubmit = 1;
-        api.submit(this.info).then((r) => {
+        api.tempSubmit(this.info).then((r) => {
           this.$message.info("提交成功");
         });
       }

+ 0 - 0
src/views/safetycheck/taskManager/components/dialog.temporarytask.vue