瀏覽代碼

界面调整

luojun 1 年之前
父節點
當前提交
dda196629e
共有 2 個文件被更改,包括 62 次插入43 次删除
  1. 11 1
      src/views/check/dialog.edit.vue
  2. 51 42
      src/views/check/task/index.vue

+ 11 - 1
src/views/check/dialog.edit.vue

@@ -577,12 +577,22 @@ export default {
     },
     NowBuild() {
       //如果新增或者是草稿状态的立即生效的编辑
+      // if (
+      //   this.formData.planCycle != 6 &&
+      //   (this.id == null ||
+      //     this.id == undefined ||
+      //     (this.defbuildTaskNow && this.formData.planStatus == 0))
+      // )
       if (
         this.formData.planCycle != 6 &&
         (this.id == null ||
           this.id == undefined ||
-          (this.defbuildTaskNow && this.formData.planStatus == 0))
+          ( this.formData.planStatus == 0))
       )
+      // if (
+      //   this.formData.planCycle != 6 
+      //   )
+      
         return true;
       else return false;
     },

+ 51 - 42
src/views/check/task/index.vue

@@ -126,41 +126,53 @@
                 >
                 </DataRangePicker>
               </el-form-item>
-              <el-row>
-                <el-form-item >
-                  <el-button
-                    type="primary"
-                    icon="el-icon-search"
-                    size="mini"
-                    @click="getList"
-                    >搜索</el-button
-                  >
-                  <el-button
-                    type="primary"
-                    icon="el-icon-refresh"
-                    size="mini"
-                    @click="resetQuery"
-                    >重置</el-button
-                  >
-                  <el-button
-                    type="primary"
-                    icon="el-icon-plus"
-                    size="mini"
-                    @click="handleAdd"
-                    v-hasPermi="['core:safetycheck:tempregister']"
-                    >临时登记</el-button
-                  >
+            </el-form>
+            <el-row :gutter="10">
+              <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"
+                  v-hasPermi="['core:safetycheck:tempregister']"
+                  >临时登记</el-button
+                >
+              </el-col>
+              <el-col :span="1.5">
                 <el-button
                   type="primary"
                   icon="el-icon-download"
                   size="mini"
                   @click="handleExport"
                   v-hasPermi="['system:user:export']"
-                >导出</el-button
+                  >导出</el-button
                 >
-                </el-form-item>
-              </el-row>
-            </el-form>
+              </el-col>
+              <right-toolbar
+                :showSearch.sync="showSearch"
+                @queryTable="getList"
+                :columns="columns"
+              ></right-toolbar>
+            </el-row>
+
             <!--    按纽    -->
           </div>
           <el-table
@@ -487,6 +499,7 @@ export default {
     getLabel,
     showDetail(row) {
       let path = "/core/safetycheck/register/" + row.id;
+      console.log(path,"path")
       this.$router.push(path);
     },
     showscanRecord(row) {
@@ -497,30 +510,22 @@ export default {
       let taskRoleId = row.roles.map((r) => r.roleId);
 
       return (
-        row.status != 3  &&
+        row.status != 3 &&
         ((row.checkOrgId == this.orgId &&
           userRoleId.find((ur) => taskRoleId.includes(ur)) &&
-          checkPermi([
-            "core:safetycheck:register",
-          ])) ||
+          checkPermi(["core:safetycheck:register"])) ||
           row.grantUserId === this.userId)
       );
     },
-    showRegister(row) {    
+    showRegister(row) {
       if (
-        dayjs()
-          .startOf("day")
-          .isBefore(dayjs(row.planStartTime).startOf("day"))
+        dayjs().startOf("day").isBefore(dayjs(row.planStartTime).startOf("day"))
       ) {
         this.$modal.alert("任务未到开始时间,不能操作");
         return;
       }
 
-      if (
-        dayjs()
-          .endOf("day")
-          .isAfter(dayjs(row.planEndTime).endOf("day"))
-      ) {
+      if (dayjs().endOf("day").isAfter(dayjs(row.planEndTime).endOf("day"))) {
         this.$modal.alert("任务已逾期,不能操作");
         return;
       }
@@ -617,7 +622,11 @@ export default {
         {
           ...this.queryParams,
         },
-        `${this.orgName+'-检查登记跟踪-'+this.formatTime(new Date(),'YYYYMMDD')}.xlsx`
+        `${
+          this.orgName +
+          "-检查登记跟踪-" +
+          this.formatTime(new Date(), "YYYYMMDD")
+        }.xlsx`
       );
     },
     statusColor(status, isBackground) {