shaogen1995 2 éve
szülő
commit
88c065993e

+ 10 - 8
backstage/src/pages/system/statistics/index.vue

@@ -99,12 +99,14 @@ export default {
     getReport() {
       getReportDetail((data) => {
         this.focus = data.data.ranking.map((item, i) => {
-          return {
-            num: i + 1,
-            zan: item.visit,
-            name: item.exhibitionName,
-            img: item.thumb,
-          };
+          if (i < 3) {
+            return {
+              num: i + 1,
+              zan: item.visit,
+              name: item.exhibitionName,
+              img: item.thumb,
+            };
+          }
         });
 
         let all = 0;
@@ -163,7 +165,7 @@ export default {
 
   .ttop {
     width: 100%;
-    height: 40%;
+    height: 50%;
     display: flex;
     justify-content: space-between;
 
@@ -217,7 +219,7 @@ export default {
 
   .tbottom {
     width: 100%;
-    height: 58%;
+    height: 48%;
     border-radius: 8px;
     box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
   }

+ 25 - 4
code/src/assets/css/reset.css

@@ -366,24 +366,45 @@ progress {
     border-radius: 10px;
     background: transparent;
 }
-.select-float{
+
+.select-float {
     background: rgba(182, 30, 34, 0.9) !important;
     border-radius: 10px !important;
     padding-bottom: 15px !important;
 }
-.select-replace{
+
+.select-replace {
     width: calc(100% - 3px) !important;
     background-color: transparent !important;
 }
+
 .select-replace::-webkit-scrollbar-thumb {
     /*滚动条里面小方块*/
     border-radius: 30px !important;
     box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
     background: var(--font-active) !important;
 }
-.gdmuseum{
+
+.gdmuseum {
     width: calc(100% - 3px) !important;
 }
-body{
+
+body {
     background-color: #e8e3d1;
+}
+
+.searNone {
+    width: 100%;
+    padding-top: 100px;
+    text-align: center;
+}
+
+.searNone img {
+    width: 100px;
+}
+
+.searNone p {
+    color: #333333;
+    font-size: 18px;
+    margin-top: 8px;
 }

+ 146 - 91
code/src/views/collection/index.vue

@@ -3,7 +3,11 @@
     <div class="collections">
       <div class="slebar">
         <div class="sleft">
-          <ui-select :options="museumList" :placeholder="'请选择'" v-model="currentMuseum">
+          <ui-select
+            :options="museumList"
+            :placeholder="'请选择'"
+            v-model="currentMuseum"
+          >
             <template v-slot:option="{ raw }">
               <div>{{ raw.label }}</div>
             </template>
@@ -15,41 +19,74 @@
             </template>
           </ui-select>
 
-          <ui-select :options="types" :placeholder="'藏品种类'" v-model="currentType">
+          <ui-select
+            :options="types"
+            :placeholder="'藏品种类'"
+            v-model="currentType"
+          >
             <template v-slot:option="{ raw }">
               <div>{{ raw.label }}</div>
             </template>
           </ui-select>
 
-          <ui-search v-model="searchKey" :placeholder="'请输入展览名称11'"></ui-search>
-
+          <ui-search
+            v-model="searchKey"
+            :placeholder="'请输入展览名称'"
+          ></ui-search>
         </div>
 
         <div class="sright">
           <div>分类:</div>
           <ul>
-            <li @click="menuActive = item.id" :class="{ active: menuActive == item.id }" v-for="(item, i) in menu"
-              :key="i">
+            <li
+              @click="menuActive = item.id"
+              :class="{ active: menuActive == item.id }"
+              v-for="(item, i) in menu"
+              :key="i"
+            >
               {{ item.name }}
             </li>
           </ul>
         </div>
       </div>
 
-      <div v-if="list" class="masonry" v-infinite-scroll="getData" infinite-scroll-disabled="busy"
-        :infinite-scroll-immediate-check="true" infinite-scroll-distance="30" v-masonry="containerId" fit-width="true"
-        gutter="40" initLayout="true" transition-duration="0.3s" item-selector=".item">
-        <div @click="onClickCollection(item)" v-masonry-tile class="item" :class="{ odd: index % 2 != 0 }"
-          v-for="(item, index) in list" :key="index">
+      <div
+        v-if="list && list.length > 0"
+        class="masonry"
+        v-infinite-scroll="getData"
+        infinite-scroll-disabled="busy"
+        :infinite-scroll-immediate-check="true"
+        infinite-scroll-distance="30"
+        v-masonry="containerId"
+        fit-width="true"
+        gutter="40"
+        initLayout="true"
+        transition-duration="0.3s"
+        item-selector=".item"
+      >
+        <div
+          @click="onClickCollection(item)"
+          v-masonry-tile
+          class="item"
+          :class="{ odd: index % 2 != 0 }"
+          v-for="(item, index) in list"
+          :key="index"
+        >
           <div class="itemimg">
             <div :style="`background-image:url(${item.thumb})`"></div>
           </div>
           <p>{{ item.name }}</p>
         </div>
       </div>
+
+      <div class="searNone" style="padding-top: 200px" v-else>
+        <img src="@/assets/images/resource/searNone.svg" alt="" />
+        <p>暂时没有数据</p>
+        <p>请试一下其他关键字</p>
+      </div>
     </div>
     <transition name="fade">
-      <teleport to='body'>
+      <teleport to="body">
         <showCollection v-if="activeCollection" :item="activeCollection" />
       </teleport>
     </transition>
@@ -59,20 +96,22 @@
 
 <script>
 import { defineProps, onMounted, watch, nextTick, ref } from "vue";
-import { getCollectionList, getMuseumList, getAge, getType } from "@/config/api";
+import {
+  getCollectionList,
+  getMuseumList,
+  getAge,
+  getType,
+} from "@/config/api";
 import showCollection from "@/components/showCollection/index.vue";
 import emitter from "@/mitt/index";
 
 export default {
-
   setup(props) {
-
     const containerId = ref("vuemasonry");
     const currentMuseum = ref("");
 
     const museumList = ref([]);
 
-
     // const props = defineProps({
     //   currentMuseumItem: {
     //     type: Object,
@@ -82,19 +121,16 @@ export default {
     //   },
     // });
 
-
     const searchKey = ref("");
     const currentAge = ref("");
     const currentType = ref("");
 
-
-    const busy = ref(false)
+    const busy = ref(false);
 
     const ages = ref([]);
 
     const types = ref([]);
 
-
     const menu = ref([
       {
         id: "",
@@ -121,108 +157,127 @@ export default {
     const menuActive = ref("");
 
     onMounted(() => {
-      getAge(data => {
-        ages.value = data.data.data.map(item => {
+      getAge((data) => {
+        ages.value = data.data.data.map((item) => {
           return {
             ...item,
             label: item.name,
-            value: item.id
-          }
-        })
-      })
+            value: item.id,
+          };
+        });
+      });
 
-      getType(data => {
-        types.value = data.data.data.map(item => {
-          return {
-            ...item,
-            label: item.name,
-            value: item.id
-          }
-        })
-      })
-
-      getMuseumList({
-        "cityId": '',
-        "pageNum": 1,
-        "pageSize": 1000,
-      }, data => {
-        museumList.value = data.data.records.map(item => {
+      getType((data) => {
+        types.value = data.data.data.map((item) => {
           return {
             ...item,
             label: item.name,
-            value: item.id
+            value: item.id,
+          };
+        });
+      });
+
+      getMuseumList(
+        {
+          cityId: "",
+          pageNum: 1,
+          pageSize: 1000,
+        },
+        (data) => {
+          museumList.value = data.data.records.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+          if (!props.currentMuseumItem) {
+            currentMuseum.value = museumList.value[0].value;
+          } else {
+            currentMuseum.value = props.currentMuseumItem.id;
           }
-        })
-        if (!props.currentMuseumItem) {
-          currentMuseum.value = museumList.value[0].value
-        } else {
-          currentMuseum.value = props.currentMuseumItem.id
         }
-      })
-    })
-
-    return { ages, types, currentMuseum, menu, currentAge, menuActive, currentType, searchKey, busy, museumList }
+      );
+    });
 
+    return {
+      ages,
+      types,
+      currentMuseum,
+      menu,
+      currentAge,
+      menuActive,
+      currentType,
+      searchKey,
+      busy,
+      museumList,
+    };
   },
   components: { showCollection },
   data() {
     return {
-      activeCollection: '',
+      activeCollection: "",
       list: [],
       paging: {
         pageSize: 10,
         pageNum: 1,
         showSize: 4,
         current: 1,
-      }
-    }
+      },
+    };
   },
 
   watch: {
     searchKey() {
-      this.getData(true)
+      this.getData(true);
     },
     currentAge() {
-      this.getData(true)
+      this.getData(true);
     },
     currentType() {
-      this.getData(true)
+      this.getData(true);
     },
     currentMuseum() {
-      this.getData(true)
-      this.$emit('updateMuseum', this.museumList.find((item => item.id == this.currentMuseum)))
+      this.getData(true);
+      this.$emit(
+        "updateMuseum",
+        this.museumList.find((item) => item.id == this.currentMuseum)
+      );
     },
     menuActive() {
-      this.getData(true)
-    }
+      this.getData(true);
+    },
   },
 
   methods: {
     getData(reset) {
       if (reset) {
-        this.list = []
-        this.busy = false
+        this.list = [];
+        this.busy = false;
       }
-      getCollectionList({
-        "ageId": this.currentAge,
-        "museumId": this.currentMuseum,
-        "type": this.menuActive,
-        "pageNum": this.paging.pageNum,
-        "pageSize": this.paging.pageSize,
-        "searchKey": this.searchKey,
-        "textureId": this.currentType,
-      }, data => {
-        if (data.data.total <= this.list.length) {
-          this.busy = true
-          return
-        }
-        this.list = this.list.concat(data.data.records)
-        this.paging.pageNum += 1
+      getCollectionList(
+        {
+          ageId: this.currentAge,
+          museumId: this.currentMuseum,
+          type: this.menuActive,
+          pageNum: this.paging.pageNum,
+          pageSize: this.paging.pageSize,
+          searchKey: this.searchKey,
+          textureId: this.currentType,
+        },
+        (data) => {
+          if (data.data.total <= this.list.length) {
+            this.busy = true;
+            return;
+          }
+          this.list = this.list.concat(data.data.records);
+          this.paging.pageNum += 1;
 
-        this.$nextTick(() => {
-          this.$redrawVueMasonry(this.containerId);
-        });
-      })
+          this.$nextTick(() => {
+            this.$redrawVueMasonry(this.containerId);
+          });
+        }
+      );
 
       // console.log(this);
       // this.list = this.list.concat([]);
@@ -232,14 +287,14 @@ export default {
       // });
     },
     onClickCollection(data) {
-      this.activeCollection = data
+      this.activeCollection = data;
       console.log(this.activeCollection);
-    }
+    },
   },
   mounted() {
-    emitter.on('closeCollection', () => {
-      this.activeCollection = ''
-    })
+    emitter.on("closeCollection", () => {
+      this.activeCollection = "";
+    });
   },
 };
 </script>
@@ -273,11 +328,11 @@ export default {
         align-items: center;
         color: #333;
 
-        >ul {
+        > ul {
           display: flex;
           align-items: center;
 
-          >li {
+          > li {
             text-align: center;
             margin: 0 10px;
             cursor: pointer;
@@ -312,7 +367,7 @@ export default {
           height: calc(100% - 60px);
           width: 100%;
 
-          >div {
+          > div {
             height: 100%;
             width: 100%;
             background-repeat: no-repeat;

+ 2 - 2
code/src/views/collection/mobile.vue

@@ -44,7 +44,7 @@
       <transition name="fade">
         <div class="searchcon" v-if="showInput">
           <img :src="require('@/assets/images/icon/label_search.png')" alt="">
-          <input v-model="searchKey" type="text" placeholder="请输入展览名称10">
+          <input v-model="searchKey" type="text" placeholder="请输入展览名称">
           <span @click="showInput=false">取消</span>
         </div>
       </transition>
@@ -75,7 +75,7 @@
       <transition name="fade">
         <div class="searchcon" v-if="showInput">
           <img :src="require('@/assets/images/icon/label_search.png')" alt="">
-          <input v-model="searchKey" type="text" placeholder="请输入展览名称9">
+          <input v-model="searchKey" type="text" placeholder="请输入展览名称">
           <span @click="showInput=false,searchKey=''">取消</span>
         </div>
       </transition>

+ 150 - 93
code/src/views/exhibition/exhibition/collections.vue

@@ -2,7 +2,11 @@
   <div class="collections">
     <div class="slebar">
       <div class="sleft">
-        <ui-select :options="museumList" :placeholder="'请选择'" v-model="currentMuseum">
+        <ui-select
+          :options="museumList"
+          :placeholder="'请选择'"
+          v-model="currentMuseum"
+        >
           <template v-slot:option="{ raw }">
             <div>{{ raw.label }}</div>
           </template>
@@ -14,64 +18,99 @@
           </template>
         </ui-select>
 
-        <ui-select :options="types" :placeholder="'藏品种类'" v-model="currentType">
+        <ui-select
+          :options="types"
+          :placeholder="'藏品种类'"
+          v-model="currentType"
+        >
           <template v-slot:option="{ raw }">
             <div>{{ raw.label }}</div>
           </template>
         </ui-select>
 
-        <ui-search v-model="searchKey" :placeholder="'请输入藏品名称1'"></ui-search>
+        <ui-search
+          v-model="searchKey"
+          :placeholder="'请输入藏品名称'"
+        ></ui-search>
       </div>
 
       <div class="sright">
         <div>分类:</div>
         <ul>
-          <li @click="menuActive = item.id" :class="{ active: menuActive == item.id }" v-for="(item, i) in menu"
-            :key="i">
+          <li
+            @click="menuActive = item.id"
+            :class="{ active: menuActive == item.id }"
+            v-for="(item, i) in menu"
+            :key="i"
+          >
             {{ item.name }}
           </li>
         </ul>
       </div>
     </div>
 
-    <div v-if="list" class="masonry" v-infinite-scroll="getData" infinite-scroll-disabled="busy"
-      :infinite-scroll-immediate-check="true" infinite-scroll-distance="30" v-masonry="containerId" fit-width="true"
-      gutter="40" initLayout="true" transition-duration="0.3s" item-selector=".item">
-      <div @click="onClickCollection(item)" v-masonry-tile class="item" :class="{ odd: index % 2 != 0 }"
-        v-for="(item, index) in list" :key="index">
+    <div
+      v-if="list && list.length > 0"
+      class="masonry"
+      v-infinite-scroll="getData"
+      infinite-scroll-disabled="busy"
+      :infinite-scroll-immediate-check="true"
+      infinite-scroll-distance="30"
+      v-masonry="containerId"
+      fit-width="true"
+      gutter="40"
+      initLayout="true"
+      transition-duration="0.3s"
+      item-selector=".item"
+    >
+      <div
+        @click="onClickCollection(item)"
+        v-masonry-tile
+        class="item"
+        :class="{ odd: index % 2 != 0 }"
+        v-for="(item, index) in list"
+        :key="index"
+      >
         <div class="itemimg">
           <div :style="`background-image:url(${item.thumb})`"></div>
         </div>
         <p>{{ item.name }}</p>
       </div>
     </div>
+
+    <div class="searNone" v-else>
+      <img src="@/assets/images/resource/searNone.svg" alt="" />
+      <p>暂时没有数据</p>
+      <p>请试一下其他关键字</p>
+    </div>
   </div>
   <transition name="fade">
-    <teleport to='body'>
+    <teleport to="body">
       <showCollection v-if="activeCollection" :item="activeCollection" />
     </teleport>
   </transition>
-
 </template>
 
 
 <script>
 import { defineProps, onMounted, watch, nextTick, ref } from "vue";
-import { getCollectionList, getMuseumList, getAge, getType } from "@/config/api";
+import {
+  getCollectionList,
+  getMuseumList,
+  getAge,
+  getType,
+} from "@/config/api";
 import showCollection from "@/components/showCollection/index.vue";
 import emitter from "@/mitt/index";
 
 export default {
   props: ["currentMuseumItem"],
   setup(props) {
-
     const containerId = ref("vuemasonry");
     const currentMuseum = ref("");
 
     const museumList = ref([]);
 
-
-
     // const props = defineProps({
     //   currentMuseumItem: {
     //     type: Object,
@@ -81,19 +120,16 @@ export default {
     //   },
     // });
 
-
     const searchKey = ref("");
     const currentAge = ref("");
     const currentType = ref("");
 
-
-    const busy = ref(false)
+    const busy = ref(false);
 
     const ages = ref([]);
 
     const types = ref([]);
 
-
     const menu = ref([
       {
         id: "",
@@ -120,110 +156,131 @@ export default {
     const menuActive = ref("");
 
     onMounted(() => {
-      getAge(data => {
-        ages.value = data.data.data.map(item => {
+      getAge((data) => {
+        ages.value = data.data.data.map((item) => {
           return {
             ...item,
             label: item.name,
-            value: item.id
-          }
-        })
-      })
+            value: item.id,
+          };
+        });
+      });
 
-      getType(data => {
-        types.value = data.data.data.map(item => {
-          return {
-            ...item,
-            label: item.name,
-            value: item.id
-          }
-        })
-      })
-
-      getMuseumList({
-        "cityId": '',
-        "pageNum": 1,
-        "pageSize": 1000,
-      }, data => {
-        museumList.value = data.data.records.map(item => {
+      getType((data) => {
+        types.value = data.data.data.map((item) => {
           return {
             ...item,
             label: item.name,
-            value: item.id
+            value: item.id,
+          };
+        });
+      });
+
+      getMuseumList(
+        {
+          cityId: "",
+          pageNum: 1,
+          pageSize: 1000,
+        },
+        (data) => {
+          museumList.value = data.data.records
+            .map((item) => {
+              return {
+                ...item,
+                label: item.name,
+                value: item.id,
+              };
+            })
+            .filter((item) => {
+              return item.name !== "广东省博物馆";
+            });
+          if (!props.currentMuseumItem) {
+            currentMuseum.value = museumList.value[0].value;
+          } else {
+            currentMuseum.value = props.currentMuseumItem.id;
           }
-        }).filter(item => {
-          return item.name !== '广东省博物馆'
-        })
-        if (!props.currentMuseumItem) {
-          currentMuseum.value = museumList.value[0].value
-        } else {
-          currentMuseum.value = props.currentMuseumItem.id
         }
-      })
-    })
-
-    return { ages, types, currentMuseum, menu, currentAge, menuActive, currentType, searchKey, busy, museumList }
+      );
+    });
 
+    return {
+      ages,
+      types,
+      currentMuseum,
+      menu,
+      currentAge,
+      menuActive,
+      currentType,
+      searchKey,
+      busy,
+      museumList,
+    };
   },
   components: { showCollection },
   data() {
     return {
-      activeCollection: '',
+      activeCollection: "",
       list: [],
       paging: {
         pageSize: 10,
         pageNum: 1,
         showSize: 4,
         current: 1,
-      }
-    }
+      },
+    };
   },
 
   watch: {
     searchKey() {
-      this.getData(true)
+      this.getData(true);
     },
     currentAge() {
-      this.getData(true)
+      this.getData(true);
     },
     currentType() {
-      this.getData(true)
+      this.getData(true);
     },
     currentMuseum() {
-      this.getData(true)
-      this.$emit('updateMuseum', this.museumList.find((item => item.id == this.currentMuseum)))
+      this.getData(true);
+      this.$emit(
+        "updateMuseum",
+        this.museumList.find((item) => item.id == this.currentMuseum)
+      );
     },
     menuActive() {
-      this.getData(true)
-    }
+      this.getData(true);
+    },
   },
 
   methods: {
     getData(reset) {
       if (reset) {
-        this.list = []
-        this.busy = false
+        this.list = [];
+        this.busy = false;
       }
-      getCollectionList({
-        "ageId": this.currentAge,
-        "museumId": this.currentMuseum,
-        "type": this.menuActive,
-        "pageNum": this.paging.pageNum,
-        "pageSize": this.paging.pageSize,
-        "searchKey": this.searchKey,
-        "textureId": this.currentType,
-      }, data => {
-        if (data.data.total <= this.list.length) {
-          this.busy = true
-          return
-        }
-        this.list = this.list.concat(data.data.records)
-        this.paging.pageNum += 1
+      getCollectionList(
+        {
+          ageId: this.currentAge,
+          museumId: this.currentMuseum,
+          type: this.menuActive,
+          pageNum: this.paging.pageNum,
+          pageSize: this.paging.pageSize,
+          searchKey: this.searchKey,
+          textureId: this.currentType,
+        },
+        (data) => {
+          if (data.data.total <= this.list.length) {
+            this.busy = true;
+            return;
+          }
+          this.list = this.list.concat(data.data.records);
+          this.paging.pageNum += 1;
 
-        this.$nextTick(() => {
-          this.$redrawVueMasonry(this.containerId);
-        });
-      })
+          this.$nextTick(() => {
+            this.$redrawVueMasonry(this.containerId);
+          });
+        }
+      );
 
       // console.log(this);
       // this.list = this.list.concat([]);
@@ -233,14 +290,14 @@ export default {
       // });
     },
     onClickCollection(data) {
-      this.activeCollection = data
+      this.activeCollection = data;
       console.log(this.activeCollection);
-    }
+    },
   },
   mounted() {
-    emitter.on('closeCollection', () => {
-      this.activeCollection = ''
-    })
+    emitter.on("closeCollection", () => {
+      this.activeCollection = "";
+    });
   },
 };
 </script>
@@ -269,11 +326,11 @@ export default {
       align-items: center;
       color: #333;
 
-      >ul {
+      > ul {
         display: flex;
         align-items: center;
 
-        >li {
+        > li {
           text-align: center;
           margin: 0 10px;
           cursor: pointer;
@@ -308,7 +365,7 @@ export default {
         height: calc(100% - 60px);
         width: 100%;
 
-        >div {
+        > div {
           height: 100%;
           width: 100%;
           background-repeat: no-repeat;

+ 1 - 1
code/src/views/exhibition/exhibition/mobile/permanent.vue

@@ -21,7 +21,7 @@
       <transition name="fade">
         <div class="searchcon" v-if="showInput">
           <img :src="require('@/assets/images/icon/label_search.png')" alt="">
-          <input v-model="searchKey" type="text" placeholder="请输入展览名称7">
+          <input v-model="searchKey" type="text" placeholder="请输入展览名称">
           <span @click="showInput=false">取消</span>
         </div>
       </transition>

+ 79 - 54
code/src/views/exhibition/exhibition/permanent.vue

@@ -1,18 +1,35 @@
 <template>
   <div class="temporary">
     <div class="slebar">
-      <ui-select :options="museumList" :placeholder="'请选择'" v-model="currentMuseum">
+      <ui-select
+        :options="museumList"
+        :placeholder="'请选择'"
+        v-model="currentMuseum"
+      >
         <template v-slot:option="{ raw }">
           <div>{{ raw.label }}</div>
         </template>
       </ui-select>
 
-      <ui-search v-model="searchKey" :placeholder="'请输入展览名称8'"></ui-search>
+      <ui-search
+        v-model="searchKey"
+        :placeholder="'请输入展览名称'"
+      ></ui-search>
     </div>
-
-    <ul v-infinite-scroll="getData" infinite-scroll-disabled="busy" :infinite-scroll-immediate-check="true"
-      infinite-scroll-distance="30" :key="ran">
-      <li v-for="(item,i) in list" :key="i">
+    <div class="searNone" v-if="list.length === 0">
+      <img src="@/assets/images/resource/searNone.svg" alt="" />
+      <p>暂时没有数据</p>
+      <p>请试一下其他关键字</p>
+    </div>
+    <ul
+      v-else
+      v-infinite-scroll="getData"
+      infinite-scroll-disabled="busy"
+      :infinite-scroll-immediate-check="true"
+      infinite-scroll-distance="30"
+      :key="ran"
+    >
+      <li v-for="(item, i) in list" :key="i">
         <exItem :exData="item" />
       </li>
     </ul>
@@ -33,21 +50,19 @@ const props = defineProps({
   currentMuseumItem: {
     type: Object,
     default: () => {
-      return {}
+      return {};
     },
   },
 });
 
-const emit = defineEmits(['updateMuseum'])
-
+const emit = defineEmits(["updateMuseum"]);
 
-const busy = ref(false)
+const busy = ref(false);
 
 const list = ref([]);
 
 const museumList = ref([]);
 
-
 let paging = ref({
   pageSize: 10,
   pageNum: 1,
@@ -55,63 +70,73 @@ let paging = ref({
 });
 
 watch(searchKey, () => {
-  getData(true)
+  getData(true);
 });
 
 watch(currentMuseum, () => {
-  getData(true)
-  emit('updateMuseum', museumList.value.find(item => item.id == currentMuseum.value))
+  getData(true);
+  emit(
+    "updateMuseum",
+    museumList.value.find((item) => item.id == currentMuseum.value)
+  );
 });
 
-
 const getData = (reset = null) => {
   if (reset) {
-    list.value = []
-    busy.value = false
+    list.value = [];
+    busy.value = false;
   }
 
   if (busy.value) {
-    return
+    return;
   }
 
-  getExhibitionList({
-    "pageNum": paging.value.pageNum,
-    "pageSize": paging.value.pageSize,
-    "museumId": currentMuseum.value,
-    "searchKey": searchKey.value,
-    "type": ""
-  }, data => {
-    if (data.data.total <= list.value.length) {
-      busy.value = true
-      return
+  getExhibitionList(
+    {
+      pageNum: paging.value.pageNum,
+      pageSize: paging.value.pageSize,
+      museumId: currentMuseum.value,
+      searchKey: searchKey.value,
+      type: "",
+    },
+    (data) => {
+      if (data.data.total <= list.value.length) {
+        busy.value = true;
+        return;
+      }
+      list.value = list.value.concat(data.data.records);
+      paging.value.pageNum += 1;
     }
-    list.value = list.value.concat(data.data.records)
-    paging.value.pageNum += 1
-  })
-}
+  );
+};
 
 onMounted(() => {
-  getMuseumList({
-    "cityId": '',
-    "pageNum": 1,
-    "pageSize": 1000,
-  }, data => {
-    museumList.value = data.data.records.map(item => {
-      return {
-        ...item,
-        label: item.name,
-        value: item.id
+  getMuseumList(
+    {
+      cityId: "",
+      pageNum: 1,
+      pageSize: 1000,
+    },
+    (data) => {
+      museumList.value = data.data.records
+        .map((item) => {
+          return {
+            ...item,
+            label: item.name,
+            value: item.id,
+          };
+        })
+        .filter((item) => {
+          return item.name !== "广东省博物馆";
+        });
+      if (!props.currentMuseumItem) {
+        currentMuseum.value = museumList.value[0].value;
+      } else {
+        currentMuseum.value = props.currentMuseumItem.id;
       }
-    }).filter(item => {
-      return item.name !== '广东省博物馆'
-    })
-    if (!props.currentMuseumItem) {
-      currentMuseum.value = museumList.value[0].value
-    } else {
-      currentMuseum.value = props.currentMuseumItem.id
     }
-  })
-})
+  );
+});
 </script>
   
 <style lang="scss" scoped>
@@ -122,15 +147,15 @@ onMounted(() => {
   .slebar {
     display: flex;
 
-    >div {
+    > div {
       margin-left: 20px;
     }
   }
 
-  >ul {
+  > ul {
     width: 100%;
 
-    >li {
+    > li {
       width: 100%;
       position: relative;
 

+ 109 - 71
code/src/views/gdmuseum/exhibition/collections.vue

@@ -8,74 +8,100 @@
           </template>
         </ui-select>
 
-        <ui-select :options="types" :placeholder="'藏品种类'" v-model="currentType">
+        <ui-select
+          :options="types"
+          :placeholder="'藏品种类'"
+          v-model="currentType"
+        >
           <template v-slot:option="{ raw }">
             <div>{{ raw.label }}</div>
           </template>
         </ui-select>
 
-        <ui-search v-model="searchKey" :placeholder="'请输入藏品名称'"></ui-search>
+        <ui-search
+          v-model="searchKey"
+          :placeholder="'请输入藏品名称'"
+        ></ui-search>
       </div>
 
       <div class="sright">
         <div>分类:</div>
         <ul>
-          <li @click="menuActive = item.id" :class="{ active: menuActive == item.id }" v-for="(item, i) in menu"
-            :key="i">
+          <li
+            @click="menuActive = item.id"
+            :class="{ active: menuActive == item.id }"
+            v-for="(item, i) in menu"
+            :key="i"
+          >
             {{ item.name }}
           </li>
         </ul>
       </div>
     </div>
 
-    <div v-if="list" class="masonry" v-infinite-scroll="getData" infinite-scroll-disabled="busy"
-      :infinite-scroll-immediate-check="true" infinite-scroll-distance="30" v-masonry="containerId" fit-width="true"
-      gutter="40" initLayout="true" transition-duration="0.3s" item-selector=".item">
-      <div @click="onClickCollection(item)" v-masonry-tile class="item" :class="{ odd: index % 2 != 0 }"
-        v-for="(item, index) in list" :key="index">
+    <div
+      v-if="list && list.length > 0"
+      class="masonry"
+      v-infinite-scroll="getData"
+      infinite-scroll-disabled="busy"
+      :infinite-scroll-immediate-check="true"
+      infinite-scroll-distance="30"
+      v-masonry="containerId"
+      fit-width="true"
+      gutter="40"
+      initLayout="true"
+      transition-duration="0.3s"
+      item-selector=".item"
+    >
+      <div
+        @click="onClickCollection(item)"
+        v-masonry-tile
+        class="item"
+        :class="{ odd: index % 2 != 0 }"
+        v-for="(item, index) in list"
+        :key="index"
+      >
         <div class="itemimg">
           <div :style="`background-image:url(${item.thumb})`"></div>
         </div>
         <p>{{ item.name }}</p>
       </div>
     </div>
+    <div class="searNone" v-else>
+      <img src="@/assets/images/resource/searNone.svg" alt="" />
+      <p>暂时没有数据</p>
+      <p>请试一下其他关键字</p>
+    </div>
   </div>
 
   <transition name="fade">
-    <teleport to='body'>
+    <teleport to="body">
       <showCollection v-if="activeCollection" :item="activeCollection" />
     </teleport>
   </transition>
-
-
 </template>
 
 <script>
-
 import { onMounted, watch, nextTick, ref } from "vue";
 import { getCollectionList, getAge, getType } from "@/config/api";
 
 import showCollection from "@/components/showCollection/index.vue";
 import emitter from "@/mitt/index";
 
-
 export default {
   setup() {
-
     const containerId = ref("vuemasonry");
 
     const searchKey = ref("");
     const currentAge = ref("");
     const currentType = ref("");
 
-
-    const busy = ref(false)
+    const busy = ref(false);
 
     const ages = ref([]);
 
     const types = ref([]);
 
-
     const menu = ref([
       {
         id: "",
@@ -102,30 +128,39 @@ export default {
     const menuActive = ref("");
 
     onMounted(() => {
-      getAge(data => {
-        ages.value = data.data.data.map(item => {
+      getAge((data) => {
+        ages.value = data.data.data.map((item) => {
           return {
             ...item,
             label: item.name,
-            value: item.id
-          }
-        })
-      })
+            value: item.id,
+          };
+        });
+      });
 
-      getType(data => {
-        types.value = data.data.data.map(item => {
+      getType((data) => {
+        types.value = data.data.data.map((item) => {
           return {
             ...item,
             label: item.name,
-            value: item.id
-          }
-        })
-      })
-    })
+            value: item.id,
+          };
+        });
+      });
+    });
 
-    return { ages, types, menu,currentAge,menuActive,currentType,searchKey,busy}
+    return {
+      ages,
+      types,
+      menu,
+      currentAge,
+      menuActive,
+      currentType,
+      searchKey,
+      busy,
+    };
   },
-  components:{showCollection},
+  components: { showCollection },
   data() {
     return {
       list: [],
@@ -135,51 +170,54 @@ export default {
         pageNum: 1,
         showSize: 4,
         current: 1,
-      }
-    }
+      },
+    };
   },
 
   watch: {
     searchKey() {
-      this.getData(true)
+      this.getData(true);
     },
     currentAge() {
-      this.getData(true)
+      this.getData(true);
     },
     currentType() {
-      this.getData(true)
+      this.getData(true);
     },
     menuActive() {
-      this.getData(true)
-    }
+      this.getData(true);
+    },
   },
   methods: {
     getData(reset) {
       if (reset) {
-        this.list = []
+        this.list = [];
       }
-      this.busy = true
-      getCollectionList({
-        "ageId": this.currentAge,
-        "museumId": 1,
-        "type": this.menuActive,
-        "pageNum": this.paging.pageNum,
-        "pageSize": this.paging.pageSize,
-        "searchKey": this.searchKey,
-        "textureId": this.currentType,
-      }, data => {
-        this.busy = false
-        if (data.data.total <= this.list.length) {
-          this.busy = true
-          return
-        }
-        this.list = this.list.concat(data.data.records)
-        this.paging.pageNum += 1
+      this.busy = true;
+      getCollectionList(
+        {
+          ageId: this.currentAge,
+          museumId: 1,
+          type: this.menuActive,
+          pageNum: this.paging.pageNum,
+          pageSize: this.paging.pageSize,
+          searchKey: this.searchKey,
+          textureId: this.currentType,
+        },
+        (data) => {
+          this.busy = false;
+          if (data.data.total <= this.list.length) {
+            this.busy = true;
+            return;
+          }
+          this.list = this.list.concat(data.data.records);
+          this.paging.pageNum += 1;
 
-        this.$nextTick(() => {
-          this.$redrawVueMasonry(this.containerId);
-        });
-      })
+          this.$nextTick(() => {
+            this.$redrawVueMasonry(this.containerId);
+          });
+        }
+      );
 
       // console.log(this);
       // this.list = this.list.concat([]);
@@ -189,14 +227,14 @@ export default {
       // });
     },
     onClickCollection(data) {
-      this.activeCollection = data
-    }
+      this.activeCollection = data;
+    },
   },
   mounted() {
-    emitter.on('closeCollection', () => {
-      this.activeCollection = ''
-    })
-    this.getData()
+    emitter.on("closeCollection", () => {
+      this.activeCollection = "";
+    });
+    this.getData();
   },
 };
 </script>
@@ -224,11 +262,11 @@ export default {
       align-items: center;
       color: #333;
 
-      >ul {
+      > ul {
         display: flex;
         align-items: center;
 
-        >li {
+        > li {
           text-align: center;
           margin: 0 10px;
           cursor: pointer;
@@ -263,7 +301,7 @@ export default {
         height: calc(100% - 60px);
         width: 100%;
 
-        >div {
+        > div {
           height: 100%;
           width: 100%;
           background-repeat: no-repeat;

+ 1 - 1
code/src/views/gdmuseum/exhibition/mobile/permanent.vue

@@ -21,7 +21,7 @@
       <transition name="fade">
         <div class="searchcon" v-if="showInput">
           <img :src="require('@/assets/images/icon/label_search.png')" alt="">
-          <input v-model="searchKey" type="text" placeholder="请输入展览名称3">
+          <input v-model="searchKey" type="text" placeholder="请输入展览名称">
           <span @click="showInput=false">取消</span>
         </div>
       </transition>

+ 1 - 1
code/src/views/gdmuseum/exhibition/mobile/review.vue

@@ -21,7 +21,7 @@
       <transition name="fade">
         <div class="searchcon" v-if="showInput">
           <img :src="require('@/assets/images/icon/label_search.png')" alt="">
-          <input v-model="searchKey" type="text" placeholder="请输入展览名称2">
+          <input v-model="searchKey" type="text" placeholder="请输入展览名称">
           <span @click="showInput=false">取消</span>
         </div>
       </transition>

+ 1 - 1
code/src/views/gdmuseum/exhibition/mobile/temporary.vue

@@ -21,7 +21,7 @@
       <transition name="fade">
         <div class="searchcon" v-if="showInput">
           <img :src="require('@/assets/images/icon/label_search.png')" alt="">
-          <input v-model="searchKey" type="text" placeholder="请输入展览名称1">
+          <input v-model="searchKey" type="text" placeholder="请输入展览名称">
           <span @click="showInput=false">取消</span>
         </div>
       </transition>

+ 43 - 35
code/src/views/gdmuseum/exhibition/permanent.vue

@@ -1,13 +1,21 @@
 <template>
   <div class="temporary">
-    <ui-search v-model="searchKey" :placeholder="'请输入展览名称6'"></ui-search>
-        <div class="searNone">
-          <img src="../../" alt="">
-        </div>
-
-    <ul v-infinite-scroll="getData" infinite-scroll-disabled="busy" :infinite-scroll-immediate-check="true"
-      infinite-scroll-distance="30" :key="ran">
-      <li v-for="(item,i) in list" :key="i">
+    <ui-search v-model="searchKey" :placeholder="'请输入展览名称'"></ui-search>
+    <div class="searNone" v-if="list.length === 0">
+      <img src="@/assets/images/resource/searNone.svg" alt="" />
+      <p>暂时没有数据</p>
+      <p>请试一下其他关键字</p>
+    </div>
+
+    <ul
+      v-else
+      v-infinite-scroll="getData"
+      infinite-scroll-disabled="busy"
+      :infinite-scroll-immediate-check="true"
+      infinite-scroll-distance="30"
+      :key="ran"
+    >
+      <li v-for="(item, i) in list" :key="i">
         <exItem :exData="item" />
       </li>
     </ul>
@@ -22,12 +30,10 @@ import { getExhibitionList } from "@/config/api";
 
 const searchKey = ref("");
 
-
-const busy = ref(false)
+const busy = ref(false);
 
 const list = ref([]);
 
-
 let paging = ref({
   pageSize: 10,
   pageNum: 1,
@@ -35,37 +41,39 @@ let paging = ref({
 });
 
 watch(searchKey, () => {
-  getData(true)
+  getData(true);
 });
 
-
 const getData = (reset = null) => {
   if (reset) {
-    list.value = []
-    busy.value = false
+    list.value = [];
+    busy.value = false;
   }
   if (busy.value) {
-    return
+    return;
   }
-  getExhibitionList({
-    "pageNum": paging.value.pageNum,
-    "pageSize": paging.value.pageSize,
-    "museumId": 1,
-    "searchKey": searchKey.value,
-    "type": "long"
-  }, data => {
-    if (data.data.total <= list.value.length) {
-      busy.value = true
-      return
+  getExhibitionList(
+    {
+      pageNum: paging.value.pageNum,
+      pageSize: paging.value.pageSize,
+      museumId: 1,
+      searchKey: searchKey.value,
+      type: "long",
+    },
+    (data) => {
+      if (data.data.total <= list.value.length) {
+        busy.value = true;
+        return;
+      }
+      list.value = list.value.concat(data.data.records);
+      paging.value.pageNum += 1;
     }
-    list.value = list.value.concat(data.data.records)
-    paging.value.pageNum += 1
-  })
-}
+  );
+};
 
 onMounted(() => {
-  getData()
-})
+  getData();
+});
 </script>
   
 <style lang="scss" scoped>
@@ -76,15 +84,15 @@ onMounted(() => {
   .slebar {
     display: flex;
 
-    >div {
+    > div {
       margin-left: 20px;
     }
   }
 
-  >ul {
+  > ul {
     width: 100%;
 
-    >li {
+    > li {
       width: 100%;
       position: relative;
 

+ 7 - 3
code/src/views/gdmuseum/exhibition/review.vue

@@ -7,10 +7,14 @@
         </template>
       </ui-select> -->
 
-      <ui-search v-model="searchKey" :placeholder="'请输入展览名称5'"></ui-search>
+      <ui-search v-model="searchKey" :placeholder="'请输入展览名称'"></ui-search>
     <!-- </div> -->
-
-    <ul v-infinite-scroll="getData" infinite-scroll-disabled="busy" :infinite-scroll-immediate-check="true"
+    <div class="searNone" v-if="list.length === 0">
+      <img src="@/assets/images/resource/searNone.svg" alt="" />
+      <p>暂时没有数据</p>
+      <p>请试一下其他关键字</p>
+    </div>
+    <ul v-else v-infinite-scroll="getData" infinite-scroll-disabled="busy" :infinite-scroll-immediate-check="true"
       infinite-scroll-distance="30" :key="ran">
       <li v-for="(item,i) in list" :key="i">
         <exItem :exData="item" />

+ 51 - 41
code/src/views/gdmuseum/exhibition/temporary.vue

@@ -1,18 +1,28 @@
 <template>
   <div class="temporary">
     <!-- <div class="slebar"> -->
-      <!-- <ui-select :options="ages" :placeholder="'请选择'" v-model="currentAge">
+    <!-- <ui-select :options="ages" :placeholder="'请选择'" v-model="currentAge">
         <template v-slot:option="{ raw }">
           <div>{{ raw.label }}</div>
         </template>
       </ui-select> -->
 
-      <ui-search v-model="searchKey" :placeholder="'请输入展览名称4'"></ui-search>
+    <ui-search v-model="searchKey" :placeholder="'请输入展览名称'"></ui-search>
     <!-- </div> -->
-
-    <ul v-infinite-scroll="getData" infinite-scroll-disabled="busy" :infinite-scroll-immediate-check="true"
-      infinite-scroll-distance="30" :key="ran">
-      <li v-for="(item,i) in list" :key="i">
+    <div class="searNone" v-if="list.length === 0">
+      <img src="@/assets/images/resource/searNone.svg" alt="" />
+      <p>暂时没有数据</p>
+      <p>请试一下其他关键字</p>
+    </div>
+    <ul
+      v-else
+      v-infinite-scroll="getData"
+      infinite-scroll-disabled="busy"
+      :infinite-scroll-immediate-check="true"
+      infinite-scroll-distance="30"
+      :key="ran"
+    >
+      <li v-for="(item, i) in list" :key="i">
         <exItem :exData="item" />
       </li>
     </ul>
@@ -28,15 +38,14 @@ import { getExhibitionList, getAge } from "@/config/api";
 const searchKey = ref("");
 const currentAge = ref("");
 
-const props = defineProps()
+const props = defineProps();
 
-const busy = ref(false)
+const busy = ref(false);
 
 const list = ref([]);
 
 const ages = ref([]);
 
-
 let paging = ref({
   pageSize: 10,
   pageNum: 1,
@@ -45,52 +54,53 @@ let paging = ref({
 });
 
 watch(searchKey, () => {
-  getData(true)
+  getData(true);
 });
 
 watch(currentAge, () => {
-  getData(true)
+  getData(true);
 });
 
-
 const getData = (reset = null) => {
   if (reset) {
-    list.value = []
-    busy.value = false
+    list.value = [];
+    busy.value = false;
   }
   if (busy.value) {
-    return
+    return;
   }
-  getExhibitionList({
-    "cityId": 1,
-    "pageNum": paging.value.pageNum,
-    "pageSize": paging.value.pageSize,
-    "searchKey": searchKey.value,
-    "type": "temp"
-  }, data => {
-    if (data.data.total <= list.value.length) {
-      busy.value = true
-      return
+  getExhibitionList(
+    {
+      cityId: 1,
+      pageNum: paging.value.pageNum,
+      pageSize: paging.value.pageSize,
+      searchKey: searchKey.value,
+      type: "temp",
+    },
+    (data) => {
+      if (data.data.total <= list.value.length) {
+        busy.value = true;
+        return;
+      }
+      list.value = list.value.concat(data.data.records);
+      paging.value.pageNum += 1;
     }
-    list.value = list.value.concat(data.data.records)
-    paging.value.pageNum += 1
-  })
-}
+  );
+};
 
 onMounted(() => {
-
-  getAge(data => {
-    ages.value = data.data.data.map(item => {
+  getAge((data) => {
+    ages.value = data.data.data.map((item) => {
       return {
         ...item,
         label: item.name,
-        value: item.id
-      }
-    })
-  })
+        value: item.id,
+      };
+    });
+  });
 
-  getData()
-})
+  getData();
+});
 </script>
   
 <style lang="scss" scoped>
@@ -101,15 +111,15 @@ onMounted(() => {
   .slebar {
     display: flex;
 
-    >div {
+    > div {
       margin-left: 20px;
     }
   }
 
-  >ul {
+  > ul {
     width: 100%;
 
-    >li {
+    > li {
       width: 100%;
       position: relative;