shaogen1995 2 vuotta sitten
vanhempi
commit
640f896ad8

BIN
backstage/public/favicon.ico


+ 1 - 1
backstage/public/index.html

@@ -4,7 +4,7 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <link rel="icon" href="<%= BASE_URL %>favicon.png">
+    <link rel="icon" href="./favicon.ico">
     <title>广东省博物馆</title>
   </head>
   <body>

+ 44 - 49
backstage/src/pages/content/scene/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,21 +50,21 @@
           >
             <el-table-column slot="operate" label="操作" width="190">
               <template slot-scope="scope">
-
                 <el-upload
-                  style="display: inline-block;"
+                  style="display: inline-block"
                   :action="uploadUrl"
                   :headers="{ token }"
-                  :data="{type:'zip',id:scope.row.id}"
+                  :data="{ type: 'zip', id: scope.row.id }"
                   :show-file-list="false"
                   :on-success="handleThumbSuccess"
                   :on-error="handleError"
                   :before-upload="beforeAvatarUpload"
-                  >
+                >
                   <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:'scene'})">删除</span>
+                <span class="o-span" @click="goto(scope.row)">编辑</span>
+                <span class="o-delete" @click="del({item:scope.row,type:'exhibition'})">删除</span>
+     
               </template>
             </el-table-column>
           </vtable>
@@ -85,11 +85,11 @@ import { mapGetters } from "vuex";
 export default {
   data() {
     return {
-      token:window.localStorage.getItem('token'),
+      token: window.localStorage.getItem("token"),
       uploadUrl: this.$serverName + "cms/exhibition/upload",
       search: {
         inputKey: "",
-        date: ""
+        date: "",
       },
       list: {},
       page: {
@@ -104,40 +104,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({
@@ -152,41 +149,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 'exhibition';
+      return "exhibition";
     },
     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>