Explorar o código

删除按钮的调整

shaogen1995 %!s(int64=2) %!d(string=hai) anos
pai
achega
bee1e1066e

+ 199 - 0
backstage/src/assets/styles/reset.css

@@ -0,0 +1,199 @@
+html,
+body,
+div,
+span,
+applet,
+object,
+iframe,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+blockquote,
+pre,
+a,
+abbr,
+acronym,
+address,
+big,
+cite,
+code,
+del,
+dfn,
+em,
+img,
+ins,
+kbd,
+q,
+s,
+samp,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+var,
+b,
+u,
+i,
+center,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+label,
+legend,
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td,
+article,
+aside,
+canvas,
+details,
+embed,
+figure,
+figcaption,
+footer,
+header,
+hgroup,
+menu,
+nav,
+output,
+ruby,
+section,
+summary,
+time,
+mark,
+audio,
+video {
+  font-family: "Microsoft YaHei", "Microsoft JhengHei";
+  margin: 0;
+  padding: 0;
+  border: 0;
+  font-size: 100%;
+  vertical-align: baseline;
+}
+* {
+  box-sizing: border-box;
+}
+/* HTML5 display-role reset for older browsers */
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+menu,
+nav,
+section,
+main {
+  display: block;
+}
+html {
+  height: 100%;
+}
+body {
+  line-height: 1;
+  height: 100%;
+}
+html,
+body {
+  font-size: 16px;
+}
+ol,
+ul {
+  list-style: none;
+}
+blockquote,
+q {
+  quotes: none;
+}
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {
+  content: '';
+  content: none;
+}
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+button {
+  outline: none;
+  border: none;
+}
+input,
+button,
+select,
+textarea {
+  outline: none;
+  appearance: none;
+  -webkit-appearance: none;
+  border-radius: 0;
+  -webkit-appearance: textfield;
+  background-color: white;
+  -webkit-rtl-ordering: logical;
+  cursor: text;
+  padding: 1px;
+  border-color: initial;
+  border-image: initial;
+}
+input::-webkit-outer-spin-button,
+input::-webkit-inner-spin-button {
+  -webkit-appearance: textfield;
+}
+input[type="number"] {
+  -moz-appearance: textfield;
+}
+input:focus {
+  outline: none;
+}
+select::-ms-expand {
+  display: none;
+}
+::-webkit-scrollbar-track-piece {
+  background-color: #ffffff;
+}
+::-webkit-scrollbar {
+  width: 8px;
+  height: 13px;
+}
+::-webkit-scrollbar-thumb {
+  background-color: #e5e5e5;
+  background-clip: padding-box;
+  min-height: 20px;
+  border-radius: 3px;
+}
+::-webkit-scrollbar-thumb:hover {
+  background-color: #929292;
+}
+table th,
+table td {
+  text-align: center !important;
+}
+table th > .cell {
+  color: #000;
+}
+textarea {
+  height: 8rem!important;
+}
+.disabledAc {
+  color: #ccc !important;
+  pointer-events: none !important;
+}

+ 4 - 0
backstage/src/assets/styles/reset.less

@@ -106,4 +106,8 @@ table th > .cell{
 
 textarea{
   height: 8rem!important;
+}
+.disabledAc{
+	color: #ccc !important;
+	pointer-events: none !important;
 }

+ 1 - 1
backstage/src/pages/content/collection/index.vue

@@ -34,7 +34,7 @@
             <el-table-column slot="operate" label="操作" width="190">
               <template slot-scope="scope">
                 <span class="o-span" @click="goto(scope.row)">编辑</span>
-                <span class="o-delete" @click="del({item:scope.row,type:'goods'})">删除</span>
+                <span class="o-delete" :class="{disabledAc:scope.row.display}" @click="del({item:scope.row,type:'goods'})">删除</span>
               </template>
             </el-table-column>
           </vtable>

+ 2 - 1
backstage/src/pages/content/scene/index.vue

@@ -63,7 +63,7 @@
                   <span class="o-span">上传</span>
                 </el-upload>
                 <span class="o-span" @click="goto(scope.row)">编辑</span>
-                <span class="o-delete" @click="del({item:scope.row,type:'exhibition'})">删除</span>
+                <span class="o-delete" :class="{disabledAc:scope.row.display}" @click="del({item:scope.row,type:'exhibition'})">删除</span>
      
               </template>
             </el-table-column>
@@ -83,6 +83,7 @@ import { raw } from "./data";
 import { mapGetters } from "vuex";
 
 export default {
+  name:'Scene',
   data() {
     return {
       token: window.localStorage.getItem("token"),

+ 44 - 44
backstage/src/pages/system/dict/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div>
     <main-top>
-      <div slot='con'>
-        <el-button @click="goto({ id: 'none'})" type="primary">新增</el-button>
+      <div slot="con">
+        <el-button @click="goto({ id: 'none' })" type="primary">新增</el-button>
       </div>
     </main-top>
     <div class="tablecon noSubmune">
@@ -21,10 +21,10 @@
             <el-button @click="getList" type="primary">查询</el-button>
             <el-button
               @click="
-                search = {
+                (search = {
                   inputKey: '',
-                },
-                getList()
+                }),
+                  getList()
               "
               >重置</el-button
             >
@@ -50,8 +50,13 @@
           >
             <el-table-column slot="operate" label="操作" width="190">
               <template slot-scope="scope">
-                <span class="o-span"  @click="goto(scope.row)">编辑</span>
-                <span class="o-delete" @click="del({item:scope.row,type:'dict'})">删除</span>
+                <span class="o-span" @click="goto(scope.row)">编辑</span>
+                <span
+                  class="o-delete"
+                  :class="{ disabledAc: scope.row.display }"
+                  @click="del({ item: scope.row, type: 'dict' })"
+                  >删除</span
+                >
               </template>
             </el-table-column>
           </vtable>
@@ -74,7 +79,7 @@ export default {
     return {
       search: {
         inputKey: "",
-        date: ""
+        date: "",
       },
       list: {},
       page: {
@@ -89,40 +94,37 @@ export default {
     vtable,
   },
   methods: {
-    
-    showLoading(){
-      this.loading = this.$loading(this.loadOption)
+    showLoading() {
+      this.loading = this.$loading(this.loadOption);
     },
-    beforeAvatarUpload(file){
-      this.currentIdx = 0
+    beforeAvatarUpload(file) {
+      this.currentIdx = 0;
       let type = this.isZip(file.name);
       if (!type) {
-        this.$message.error('只允许上传zip宝');
-        return type
+        this.$message.error("只允许上传zip宝");
+        return type;
       }
-      const isLt2G = file.size / 1024 / 1024 / 1024 <  2;
+      const isLt2G = file.size / 1024 / 1024 / 1024 < 2;
       if (!isLt2G) {
         this.$message.error("上传图片大小不能超过 2GB!");
         return isLt2G;
       }
-      this.showLoading()
+      this.showLoading();
     },
-    handleError(){
+    handleError() {
       this.$alert("上传失败,请稍后再试", "提示", {
         confirmButtonText: "确定",
         callback: () => {
-          this.loading.close()
+          this.loading.close();
         },
       });
     },
-    handleThumbSuccess(res){
-      this.loading.close()
+    handleThumbSuccess(res) {
+      this.loading.close();
       let { data } = res;
-      this.$emit('update',data.filePath)
-    },
-    uploadZip(){
-
+      this.$emit("update", data.filePath);
     },
+    uploadZip() {},
     getList() {
       let { inputKey } = this.search;
       this.$http({
@@ -137,41 +139,39 @@ export default {
         this.list = res.data;
       });
     },
-    openLink(item){
+    openLink(item) {
       window.open(`/panorama/edit.html?id=${item.id}`, "_blank");
     },
-
   },
   computed: {
     ...mapGetters({
       activeMenu: "activeMenu",
-      activeSub:"activeSub"
+      activeSub: "activeSub",
     }),
     subMenu() {
-      return 'dict';
+      return "dict";
     },
     data() {
       return raw["scene"];
     },
   },
   watch: {
-    subMenu:{
-      deep:true,
-      immediate:true,
-      handler:function () {
-        this.getAuth(this.activeMenu,'场景')
+    subMenu: {
+      deep: true,
+      immediate: true,
+      handler: function () {
+        this.getAuth(this.activeMenu, "场景");
         this.getList();
-      }
+      },
+    },
+    activeMenu: {
+      deep: true,
+      immediate: true,
+      handler: function (newVal) {
+        this.getAuth(newVal, "场景");
+      },
     },
-    activeMenu:{
-      deep:true,
-      immediate:true,
-      handler:function (newVal) {
-        this.getAuth(newVal,'场景')
-      }
-    }
-  },
-  mounted() {
   },
+  mounted() {},
 };
 </script>

+ 1 - 1
backstage/src/pages/system/role/index.vue

@@ -38,7 +38,7 @@
                 <template v-if="scope.row.roleKey!='sys_admin'" >
                   <span class="o-span" @click="gotoEdit(scope.row)">权限设置</span>
                   <span class="o-span" @click="openDilog(scope.row)">编辑</span>
-                  <span class="o-delete" @click="delSys(scope.row)">删除</span>
+                  <span class="o-delete" :class="{disabledAc:scope.row.isEnabled}" @click="delSys(scope.row)">删除</span>
                 </template>
                 <template v-else>-</template>
               </template>

+ 2 - 1
backstage/src/pages/system/user/index.vue

@@ -76,7 +76,7 @@
               <template slot-scope="scope">
                 <template v-if="scope.row.roleKey!='sys_admin'" >
                   <span class="o-span" @click="gotoEdit(scope.row)">编辑</span>
-                  <span class="o-span" @click="delSys(scope.row)">删除</span>
+                  <span class="o-span" :class="{disabledAc:scope.row.isEnabled}" @click="delSys(scope.row)">删除</span>
                 </template>
                 <template v-else>-</template>
               </template>
@@ -94,6 +94,7 @@ import { getSysList, delSys } from "@/configue/api";
 import { mapGetters } from "vuex";
 
 export default {
+  name:'User',
   data() {
     return {
       search: {