From 2648ab26c878627e7ea50e471e1f488663118bfd Mon Sep 17 00:00:00 2001
From: xiebin <123456>
Date: Sun, 09 Oct 2022 10:36:35 +0800
Subject: [PATCH] 代码优化

---
 src/views/repairsorder/repairsorderDetail.vue |    9 ----
 src/views/eventgm/eventgmDetail.vue           |    9 ----
 src/views/taskinfo/taskinfoPlanDetail.vue     |    8 ---
 src/const/taskinfo/taskinfo.js                |   10 ++++-
 src/styles/common.scss                        |    9 ++++
 src/views/taskinfo/taskinfo.vue               |   20 +++++++++-
 src/views/taskinfo/taskinfoDetail.vue         |    8 ---
 7 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/src/const/taskinfo/taskinfo.js b/src/const/taskinfo/taskinfo.js
index ecdd3d0..6d02d53 100644
--- a/src/const/taskinfo/taskinfo.js
+++ b/src/const/taskinfo/taskinfo.js
@@ -7,6 +7,8 @@
   border: true,
   index: true,
   viewBtn: false,
+  delBtn: false,
+  editBtn: false,
   selection: true,
   dialogClickModal: false,
   column: [
@@ -91,7 +93,9 @@
       prop: "state",
       type: "select",
       dicUrl: "/api/blade-system/dict-biz/dictionary?code=TACK_STATE",
-      disabled: true,
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
       props: {
         label: "dictValue",
         value: "dictKey"
@@ -102,7 +106,9 @@
       prop: "source",
       type: "select",
       dicData: [{id:'SYSTEMNEW',name:'系统创建'},{id:'SYSTEMAUTO',name:'计划任务新增'}],
-      disabled: true,
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
       props: {
         label: "name",
         value: "id"
diff --git a/src/styles/common.scss b/src/styles/common.scss
index 4507ae7..eda81c7 100644
--- a/src/styles/common.scss
+++ b/src/styles/common.scss
@@ -27,4 +27,11 @@
   outline: none;
 }
 //滚动条样式
-@include scrollBar;
\ No newline at end of file
+@include scrollBar;
+
+.backBtn{
+  position: fixed;
+  top: 16%;
+  left: 50%;
+  z-index: 99999;
+}
diff --git a/src/views/eventgm/eventgmDetail.vue b/src/views/eventgm/eventgmDetail.vue
index 6bce9a7..5a6e814 100644
--- a/src/views/eventgm/eventgmDetail.vue
+++ b/src/views/eventgm/eventgmDetail.vue
@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button class="backBtn" size="small" type="success" icon="el-icon-back" plain @click="handleBack">返 回
+    <el-button class="backBtn" size="small" type="success" icon="el-icon-back" @click="handleBack">返 回
     </el-button>
     <el-row>
       <el-col :span="12">
@@ -388,13 +388,6 @@
 
 #old_video::-webkit-media-controls-timeline {
   display: block;
-}
-
-.backBtn{
-  position: fixed;
-  top: 20%;
-  right: 3%;
-  z-index: 99999;
 }
 
 .scene-image-box {
diff --git a/src/views/repairsorder/repairsorderDetail.vue b/src/views/repairsorder/repairsorderDetail.vue
index 6850533..9fada21 100644
--- a/src/views/repairsorder/repairsorderDetail.vue
+++ b/src/views/repairsorder/repairsorderDetail.vue
@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button class="backBtn" size="small" type="success" icon="el-icon-back" plain @click="handleBack">返 回
+    <el-button class="backBtn" size="small" type="success" icon="el-icon-back" @click="handleBack">返 回
     </el-button>
     <el-row>
       <el-col :span="12">
@@ -262,13 +262,6 @@
 
 #old_video::-webkit-media-controls-timeline {
   display: block;
-}
-
-.backBtn{
-  position: fixed;
-  top: 20%;
-  right: 3%;
-  z-index: 99999;
 }
 
 .scene-image-box {
diff --git a/src/views/taskinfo/taskinfo.vue b/src/views/taskinfo/taskinfo.vue
index 47fdf65..b1bc710 100644
--- a/src/views/taskinfo/taskinfo.vue
+++ b/src/views/taskinfo/taskinfo.vue
@@ -29,13 +29,29 @@
                    @click="handleDelete">删 除
         </el-button>
       </template>
-      <template slot-scope="{ type, size, row }" slot="menu">
+      <template slot-scope="{ type, size, row, index }" slot="menu">
         <el-button
           icon="el-icon-view"
           type="text"
           size="mini"
           @click="goTaskinfoDetail(row)"
-        >查看</el-button>
+          v-if="permission.taskinfo_view"
+        >查 看</el-button>
+        <el-button
+          icon="el-icon-edit"
+          type="text"
+          size="mini"
+          @click="$refs.crud.rowEdit(row,index)"
+          v-if="permission.taskinfo_edit"
+        >编 辑</el-button>
+        <el-button
+          icon="el-icon-delete"
+          type="text"
+          size="mini"
+          @click="$refs.crud.rowDel(row,index)"
+          v-if="permission.taskinfo_delete"
+        >删 除</el-button>
+
       </template>
       <template slot="routeRangeForm">
         <open-layers-map ref="OpenLayersMap" @toData="toData" :routeRange="form.routeRange"></open-layers-map>
diff --git a/src/views/taskinfo/taskinfoDetail.vue b/src/views/taskinfo/taskinfoDetail.vue
index 61120b1..fbb0bbf 100644
--- a/src/views/taskinfo/taskinfoDetail.vue
+++ b/src/views/taskinfo/taskinfoDetail.vue
@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button class="backBtn" size="small" type="success" icon="el-icon-back" plain @click="handleBack">返 回
+    <el-button class="backBtn" size="small" type="success" icon="el-icon-back" @click="handleBack">返 回
     </el-button>
     <el-row>
      <el-col :span="12">
@@ -194,10 +194,4 @@
   display: block;
 }
 
-.backBtn{
-  position: fixed;
-  top: 20%;
-  right: 3%;
-  z-index: 99999;
-}
 </style>
diff --git a/src/views/taskinfo/taskinfoPlanDetail.vue b/src/views/taskinfo/taskinfoPlanDetail.vue
index a9a0f1d..fdfe18d 100644
--- a/src/views/taskinfo/taskinfoPlanDetail.vue
+++ b/src/views/taskinfo/taskinfoPlanDetail.vue
@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button class="backBtn" size="small" type="success" icon="el-icon-back" plain @click="handleBack">返 回
+    <el-button class="backBtn" size="small" type="success" icon="el-icon-back" @click="handleBack">返 回
     </el-button>
     <el-row>
       <el-col :span="12">
@@ -196,10 +196,4 @@
   display: block;
 }
 
-.backBtn{
-  position: fixed;
-  top: 20%;
-  right: 3%;
-  z-index: 99999;
-}
 </style>

--
Gitblit v1.9.3