Quellcode durchsuchen

优化界面效果

jiawuxian vor 1 Jahr
Ursprung
Commit
b51a4093b2

+ 2 - 1
src/api/safetycheck/plan.js

@@ -78,7 +78,8 @@ export function delelte(id) {
 export function getDesignateHangshe(planId){
   return request({
     url: '/core/SafecheckPlanToExecOrg/designatehangshe/' + planId,
-    method: 'get'
+    method: 'get',
+    showLoading:true
   })
 }
 

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

@@ -32,6 +32,7 @@ export default {
   watch: {
     value(v) {
       if(!v){
+        this.$emit("select", null);
         return;
       }
       if (!this.currentNode || this.currentNode.id != v) {        

+ 6 - 1
src/views/resumption/plan/distribute.vue

@@ -38,7 +38,7 @@
           >
         </el-col>
       </el-row>
-      <el-table :data="tableData" height="400px" size="small">
+      <el-table :data="tableData" height="400px" size="small" v-loading="loading">
         <el-table-column type="index" label="序号" width="80"></el-table-column>
         <el-table-column prop="orgName" label="机构名称"></el-table-column>
         <el-table-column prop="status" label="计划状态" width="150px">
@@ -72,6 +72,7 @@ export default {
   data() {
     return {
       isShow: false,
+      loading:false,
       info: this.emptyInfo(),
       tableData: [],
       filterName: null,
@@ -90,15 +91,19 @@ export default {
   methods: {
     show(plan) {
       this.isShow = true;
+      this.loading=true;
       this.info.id = plan.id;
       listByTypes({
         orgId: plan.planCreateOrgId,
         orgTypes: ["3"],
       }).then((r) => {
+        this.loading=false;
         this.info.orgAndStatus = r.data.map((d) => {
           return { orgId: d.id, orgName: d.shortName, status: "1" };
         });
         this.tableData = this.info.orgAndStatus;
+      }).catch(()=>{
+        this.loading=false;
       });
     },
     handleAllStatus(status) {

+ 23 - 1
src/views/safetycheck/taskManager/components/checkRegister.vue

@@ -31,6 +31,7 @@
               v-model="info.checkRoleId"
               placeholder="请选择检查人员"
               style="width: 100%"
+              clearable
             >
               <el-option
                 v-for="role in roleOptions"
@@ -59,6 +60,7 @@
               placeHolder="请输入检查组成员"
               v-model="info.checkTeam"
               maxlength="100"
+              clearable
             ></el-input> </el-form-item
         ></el-col>
         <el-col :span="6">
@@ -68,6 +70,7 @@
               v-model="info.planStartTime"
               type="date"
               placeholder="选择检查日期"
+              clearable
             >
             </el-date-picker>
           </el-form-item>
@@ -197,7 +200,8 @@ export default {
         checkList: [],
       },
       roleOptions: [],
-      prevCheckOrgType: null, //上一个选中机构的类型
+      prevCheckOrgType: null, //上一个选中检查机构的类型
+      prevBecheckedOrgType: null, //上一个受检机构的类型
       exceptionRules: {
         remark: [{ required: true, message: "请输入情况描述" }],
         rectificationDeadline: [{ required: true, message: "请选择整改期限" }],
@@ -226,6 +230,12 @@ export default {
     dayjs,
     getLabel,
     onCheckOrgSelect(node) {
+      if (node == null) {
+        this.prevCheckOrgType = null;
+        this.roleOptions = [];
+        this.checkRoleId = null;
+        return;
+      }
       if (node.type == this.prevCheckOrgType) {
         return;
       }
@@ -239,6 +249,18 @@ export default {
       });
     },
     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() {