shaogen1995 2 rokov pred
rodič
commit
4c3119f4e3

+ 322 - 0
backstage/src/assets/styles/public.css

@@ -0,0 +1,322 @@
+* {
+  font-family: 'Microsoft YaHei';
+}
+input::-webkit-inner-spin-button {
+  appearance: none;
+  margin: 0;
+}
+.layout {
+  width: 100%;
+  height: 100%;
+}
+.layout-con {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+}
+.middle-title,
+.register-title,
+.forget-title {
+  color: #4d4d4d;
+  font-size: 1.75rem;
+  text-align: center;
+  margin-bottom: 3.4375rem;
+  line-height: 1.5;
+}
+.register-title,
+.forget-title {
+  margin-top: 1.25rem;
+}
+.middle {
+  position: absolute;
+  top: 30vh;
+  left: 50vw;
+  width: 23.75rem;
+  height: 18.75rem;
+  transform: translate(-50%, -50%);
+}
+.middle-subtitle {
+  font-size: 0.875rem;
+  font-weight: 500;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.middle-subtitle::before,
+.middle-subtitle::after {
+  content: '';
+  height: 0rem;
+  width: 1.25rem;
+  border: 0.03125rem solid #000;
+  display: inline-block;
+  margin: 0 0.625rem;
+}
+.form-bottom {
+  display: flex;
+  justify-content: space-between;
+  padding: 0 0.625rem;
+  color: #888;
+}
+.form-bottom span {
+  cursor: pointer;
+}
+.bottom-div {
+  text-align: center;
+  cursor: pointer;
+  color: #888888;
+}
+.test-btn {
+  color: #67c23a !important;
+}
+.view-btn {
+  color: #409eff !important;
+}
+.re-apply-btn {
+  color: #f56c6c !important;
+}
+.apply-btn {
+  color: #ec652d !important;
+}
+.noCursor .el-upload {
+  cursor: no-drop !important;
+}
+.o-span {
+  cursor: pointer;
+  color: #0798f4;
+}
+.o-delete {
+  cursor: pointer;
+  color: #f56c6c;
+  margin-left: 5px;
+}
+.o-delete:hover {
+  color: #f56c6c;
+}
+.e-pagination {
+  display: flex;
+  justify-content: flex-end;
+  margin-top: 1.5625rem;
+}
+:root {
+  --bg_color: #ffffff;
+  --font_color: rgba(0, 0, 0, 0.88);
+  --font_color1: rgba(0, 0, 0, 0.38);
+}
+.theme {
+  background: #f2ecde !important;
+}
+.theme-color {
+  color: var(--font_color) !important;
+}
+.theme-color1 {
+  color: var(--font_color1) !important;
+}
+.card,
+.top-body {
+  background: var(--bg_color) !important;
+  border-radius: 2px!important;
+  color: #000 !important;
+  border: none!important;
+}
+.top-body {
+  margin: 0 auto 1rem!important;
+}
+.info-right {
+  padding-right: 15px;
+}
+.el-icon-upload {
+  margin: 20px auto!important;
+}
+.el-upload__text p {
+  line-height: 1.2 !important;
+  font-size: 12px!important;
+  margin-bottom: 10px!important;
+  color: #ccc !important;
+}
+.li-img {
+  max-height: 237px;
+  overflow: hidden;
+  width: 100%;
+  position: relative;
+}
+.li-img .eye {
+  z-index: 9999;
+  position: absolute;
+  right: 10px;
+  top: 10px;
+  width: 20px!important;
+}
+.collection-con .nodata {
+  width: 100%;
+  padding-top: 10%;
+  text-align: center;
+}
+.tab {
+  padding-top: 20px;
+}
+.tab > li {
+  display: inline-block;
+  margin-right: 20px;
+  padding-bottom: 10px;
+  cursor: pointer;
+}
+.tab .active {
+  color: #B63C25;
+  border-bottom: 2px solid #B63C25;
+}
+.main-title {
+  margin: 50px 0;
+}
+.main-title .eidtor {
+  margin: 20px;
+}
+.title {
+  color: #707070;
+  font-weight: bold;
+  font-size: 14px;
+  margin-bottom: 20px;
+}
+.reason {
+  background: #fff;
+  height: 40px;
+  width: 100%;
+  margin-bottom: 10px;
+  line-height: 40px;
+  padding-left: 20px;
+}
+.text-con {
+  border: 1px solid #ccc;
+  padding: 10px;
+  min-height: 100px;
+  width: calc(100% - 10px);
+  margin-left: 20px;
+  color: #ccc;
+}
+.icenter /deep/ .el-input__inner {
+  text-align: center;
+}
+.image-slot {
+  min-height: 100px;
+  height: 100%;
+  min-width: 230px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: #dddddd;
+  padding: 0 10px;
+}
+.image-slot > i {
+  font-size: 40px;
+}
+.searchslot span:not(.searchslot span:first-of-type) {
+  margin-left: 20px;
+}
+.searchslot button {
+  margin-left: 20px;
+}
+.tablecon {
+  background: #fff;
+  height: 100%;
+}
+.flexcon {
+  display: flex;
+}
+.tablebody {
+  width: calc(100% - 1px);
+  padding-top: 10px;
+  padding-right: 20px;
+  box-sizing: content-box;
+}
+.noSubmune {
+  padding: 0 20px;
+}
+.fadeDom {
+  display: none!important;
+}
+.fadeVisable {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  opacity: 0;
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+.disable {
+  opacity: 0.8;
+  pointer-events: none !important;
+}
+.disable * {
+  pointer-events: none !important;
+}
+.disabletxt {
+  color: #c0c4cc !important;
+  pointer-events: none !important;
+  cursor: not-allowed !important;
+}
+.disabletxt * {
+  pointer-events: none !important;
+}
+.required::before {
+  content: '*';
+  color: #F56C6C;
+  margin-right: 4px;
+}
+.paddingmore .el-input__inner {
+  padding: 0 60px 0 15px!important;
+}
+.el-textarea__inner {
+  padding: 5px 55px 5px 15px!important;
+}
+@media screen and (max-width: 1700px) {
+  html,
+  body {
+    font-size: 15px;
+  }
+}
+.con-btn {
+  margin-right: 20px;
+}
+.o-span {
+  padding: 0 5px;
+}
+.el-tabs__item {
+  font-size: 16px!important;
+  font-weight: bold!important;
+}
+.elInput {
+  width: 200px!important;
+}
+.elSelect {
+  width: 150px!important;
+}
+@media screen and (max-width: 1400px) {
+  html,
+  body {
+    font-size: 13px;
+  }
+  .collection-con {
+    height: 58vh!important;
+  }
+  .elInput {
+    width: 150px!important;
+  }
+  .elSelect {
+    width: 100px!important;
+  }
+}
+@media screen and (max-width: 1300px) {
+  html,
+  body {
+    font-size: 12px;
+  }
+  .collection-con {
+    height: 61vh!important;
+  }
+  .elInput {
+    width: 130px!important;
+  }
+}
+.caozuozelInput {
+  width: 300px !important;
+}

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

@@ -375,4 +375,8 @@ input::-webkit-inner-spin-button{
   .elInput{
     width:130px!important;
   }
+}
+
+.caozuozelInput{
+  width: 300px !important;
 }

+ 2 - 2
backstage/src/components/uploadFile/index.vue

@@ -38,11 +38,11 @@ export default {
       let adueee = this.desc.indexOf('mp3') > -1
 
 
-      let size = tupeee ? 500 : (adueee ? 100 : 2048)
+      let size = tupeee ? 500 : (adueee ? 100 : 500)
       const isLt500M = file.size / 1024 / 1024 < size;
 
       if (!isLt500M) {
-        this.$message.error(`上传文件大小不能超过${tupeee ? '500MB' : (adueee ? '100MB' : '2GB')}!`);
+        this.$message.error(`上传文件大小不能超过${tupeee ? '500MB' : (adueee ? '100MB' : '500MB')}!`);
         return isLt500M;
       }
       this.showLoading()

+ 63 - 62
backstage/src/components/uploadThumb/index.vue

@@ -11,99 +11,100 @@
       :on-error="handleError"
       :before-upload="beforeAvatarUpload"
     >
-    <template v-if="thumb" >
-      <img :src="thumb" class="avatar" />
-      <div class="del" @click.stop="thumb='',$emit('update','')">
-        <i class="el-icon-delete"></i>
-      </div>
-    </template>
+      <template v-if="thumb">
+        <img :src="thumb" class="avatar" />
+        <div class="del" @click.stop="(thumb = ''), $emit('update', '')">
+          <i class="el-icon-delete"></i>
+        </div>
+      </template>
       <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-     
     </el-upload>
-    <span style="color:#999;">格式要求:支持png、jpg、gif和jpeg的图片格式;最大支持20M。</span>
+    <span style="color: #999"
+      >格式要求:支持png、jpg、gif和jpeg的图片格式;最大支持20M。</span
+    >
   </div>
 </template>
 
 <script>
 export default {
-  props:['thumb','url','data'],
-  data(){
+  name: "uploadThumb",
+  props: ["thumb", "url", "data"],
+  data() {
     return {
-      token:window.localStorage.getItem('token')
-    }
+      token: window.localStorage.getItem("token"),
+    };
   },
-  methods:{
-    showLoading(){
-      this.loading = this.$loading(this.loadOption)
+  methods: {
+    showLoading() {
+      this.loading = this.$loading(this.loadOption);
     },
-    beforeAvatarUpload(file){
-      this.currentIdx = 0
+    beforeAvatarUpload(file) {
+      this.currentIdx = 0;
       let type = this.isImage(file.name);
       if (!type) {
-        this.$message.error('只允许上传图片');
-        return type
+        this.$message.error("只允许上传图片");
+        return type;
       }
       const isLt2M = file.size / 1024 / 1024 < 20;
       if (!isLt2M) {
         this.$message.error("上传图片大小不能超过 20MB!");
         return isLt2M;
       }
-      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)
-    }
-  }
-}
+      this.$emit("update", data.filePath);
+    },
+  },
+};
 </script>
 
 <style lang="less">
-  .avatar-uploader .el-upload {
-    border: 1px dashed #d9d9d9;
-    border-radius: 6px;
-    cursor: pointer;
-    position: relative;
-    overflow: hidden;
-  }
-  .avatar-uploader {
-    .del{
-      position: absolute;
-      right: 0;
-      top: 0;
-      display: none;
-      width: 40px;
-      >i{
-
-      }
-    }
-  }
-  .avatar-uploader .el-upload:hover {
-    border-color: #409EFF;
-    .del{
-      display: block;
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader {
+  .del {
+    position: absolute;
+    right: 0;
+    top: 0;
+    display: none;
+    width: 40px;
+    > i {
     }
   }
-  .avatar-uploader-icon {
-    font-size: 28px;
-    color: #8c939d;
-    width: 178px;
-    height: 178px;
-    line-height: 178px;
-    text-align: center;
-  }
-  .avatar {
-    width: 178px;
-    height: 178px;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+  .del {
     display: block;
   }
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
 </style>

+ 14 - 0
backstage/src/configue/api.js

@@ -41,6 +41,20 @@ export function getDictList(type,cb) {
   });
 }
 
+// 获取字典列表全部
+export function getDictListAll(type,cb) {
+  axios({
+    method: "post",
+    data: {
+      "searchKey": "",
+      type
+    },
+    url: `cms/dict/all`,
+  }).then((res) => {
+    cb(res);
+  });
+}
+
 
 //获取系统配置
 export function getConfigDetail(cb) {

+ 2 - 1
backstage/src/pages/content/collection/componets/audio.vue

@@ -36,7 +36,7 @@
       <el-switch v-model="form.display"> </el-switch>
     </el-form-item>
     <el-form-item label="描述:">
-      <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.description"></el-input>
+      <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.description" maxlength="200" show-word-limit></el-input>
     </el-form-item>
 
     <el-form-item label="封面图片:" prop="thumb">
@@ -66,6 +66,7 @@ import uploadThumb from "@/components/uploadThumb";
 import uploadFile from "@/components/uploadFile";
 
 export default {
+  name:'audioCom',
   props: ["data", 'rule', 'ageList', 'textureList', 'museumList'],
   components: { uploadThumb, uploadFile },
   data() {

+ 76 - 23
backstage/src/pages/content/collection/componets/img.vue

@@ -1,7 +1,11 @@
 <template>
-  <div style="width:50%;">
+  <div style="width: 50%">
     <el-form-item label="藏品名称:" prop="name">
-      <el-input v-model="form.name" :maxlength="INPUTLENGTH * 5" show-word-limit></el-input>
+      <el-input
+        v-model="form.name"
+        :maxlength="INPUTLENGTH * 5"
+        show-word-limit
+      ></el-input>
     </el-form-item>
 
     <el-form-item label="藏品类型:">
@@ -10,24 +14,47 @@
 
     <el-form-item label="藏品年代:">
       <el-input v-model="form.ageId" class="fadeDom"></el-input>
-      <el-select v-model="form.ageId" placeholder="请选择" style="width:100%">
-        <el-option v-for="item in ageList" :key="item.id" :label="item.name" :value="item.id">
+      <el-select v-model="form.ageId" placeholder="请选择" style="width: 100%">
+        <el-option
+          v-for="item in ageList"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        >
         </el-option>
       </el-select>
     </el-form-item>
 
     <el-form-item label="藏品种类:">
       <el-input v-model="form.textureId" class="fadeDom"></el-input>
-      <el-select v-model="form.textureId" placeholder="请选择" style="width:100%">
-        <el-option v-for="item in textureList" :key="item.id" :label="item.name" :value="item.id">
+      <el-select
+        v-model="form.textureId"
+        placeholder="请选择"
+        style="width: 100%"
+      >
+        <el-option
+          v-for="item in textureList"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        >
         </el-option>
       </el-select>
     </el-form-item>
 
     <el-form-item label="所属博物馆:">
       <el-input v-model="form.museumId" class="fadeDom"></el-input>
-      <el-select v-model="form.museumId" placeholder="请选择" style="width:100%">
-        <el-option v-for="item in museumList" :key="item.id" :label="item.name" :value="item.id">
+      <el-select
+        v-model="form.museumId"
+        placeholder="请选择"
+        style="width: 100%"
+      >
+        <el-option
+          v-for="item in museumList"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        >
         </el-option>
       </el-select>
     </el-form-item>
@@ -36,39 +63,66 @@
       <el-switch v-model="form.display"> </el-switch>
     </el-form-item>
 
-
     <el-form-item label="描述:">
-      <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.description"></el-input>
+      <el-input
+        type="textarea"
+        :autosize="{ minRows: 2, maxRows: 4 }"
+        v-model="form.description"
+        maxlength="200"
+        show-word-limit
+      ></el-input>
     </el-form-item>
 
     <el-form-item label="封面图片:" prop="thumb">
       <div v-if="!form.museumId">请选择所属博物馆</div>
-      <uploadThumb  v-else :data="{'type':'thumb','museumId':form.museumId}" :url="fileUrl" @update="data=>{form.thumb = data}" :thumb="form.thumb" />
+      <uploadThumb
+        v-else
+        :data="{ type: 'thumb', museumId: form.museumId }"
+        :url="fileUrl"
+        @update="
+          (data) => {
+            form.thumb = data;
+          }
+        "
+        :thumb="form.thumb"
+      />
     </el-form-item>
 
-
     <el-form-item label="图片:" prop="thumb">
-
       <div v-if="!form.museumId">请选择所属博物馆</div>
       <template v-else>
-
         <el-input v-model="form.thumb" class="fadeDom"></el-input>
         <ul class="tuku">
           <li v-for="(item, i) in filelist" :key="i">
             <div class="imgcon">
-              <el-image class="img" :src="item.filePath" :fit="'cover'" :preview-src-list="[item.filePath]">
+              <el-image
+                class="img"
+                :src="item.filePath"
+                :fit="'cover'"
+                :preview-src-list="[item.filePath]"
+              >
               </el-image>
               <div class="cover" v-if="item.isIndex">封面图片</div>
-              <el-button @click="del(item, i)" size="mini" type="primary" icon="el-icon-delete" circle></el-button>
+              <el-button
+                @click="del(item, i)"
+                size="mini"
+                type="primary"
+                icon="el-icon-delete"
+                circle
+              ></el-button>
             </div>
           </li>
           <li>
-            <uploadImg id="uli" :url="fileUrl" :data="{'type':'img','museumId':form.museumId}" @update="updateImg"
-              :thumb="form.thumb" />
+            <uploadImg
+              id="uli"
+              :url="fileUrl"
+              :data="{ type: 'img', museumId: form.museumId }"
+              @update="updateImg"
+              :thumb="form.thumb"
+            />
           </li>
         </ul>
       </template>
-
     </el-form-item>
   </div>
 </template>
@@ -80,7 +134,8 @@ import uploadThumb from "@/components/uploadThumb";
 import { delImg } from "@/configue/api";
 
 export default {
-  props: ["data", "rule", "filelist", 'ageList', 'textureList', 'museumList'],
+  name: "imgCom",
+  props: ["data", "rule", "filelist", "ageList", "textureList", "museumList"],
   components: { uploadImg, uploadThumb },
   data() {
     return {
@@ -89,8 +144,7 @@ export default {
       fileUrl: this.$serverName + "cms/goods/upload",
     };
   },
-  watch: {
-  },
+  watch: {},
   methods: {
     del(item, i) {
       console.log(item);
@@ -112,7 +166,6 @@ export default {
 
     reupload(data, item) {
       try {
-
         if (item.isIndex == 1) {
           this.form.thumb = data.filePath;
         }

+ 1 - 1
backstage/src/pages/content/collection/componets/model.vue

@@ -37,7 +37,7 @@
     </el-form-item>
 
     <el-form-item label="描述:">
-      <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.description"></el-input>
+      <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.description" maxlength="200" show-word-limit></el-input>
     </el-form-item>
 
 

+ 2 - 2
backstage/src/pages/content/collection/componets/video.vue

@@ -37,7 +37,7 @@
     </el-form-item>
 
     <el-form-item label="描述:">
-      <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.description"></el-input>
+      <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.description" maxlength="200" show-word-limit></el-input>
     </el-form-item>
 
     
@@ -53,7 +53,7 @@
       <template v-else>
         <uploadFile :data="{'type':'video','museumId':form.museumId}" :url="fileUrl"
           @update="data=>{form.fileName = data.fileName,form.filePath = data.filePath}" :filePath="form.filePath"
-          :desc="'支持mov、mp4等格式的视频文件,大小不超过2GB'" />
+          :desc="'支持mov、mp4等格式的视频文件,大小不超过500MB'" />
         <video class="svideo" v-if="form.filePath" controls :src="form.filePath">
         </video>
       </template>

+ 60 - 28
backstage/src/pages/content/collection/edit.vue

@@ -1,16 +1,35 @@
 <template>
   <div v-if="form">
     <main-top></main-top>
-    <editcon :key="type" ref="child" :type="type" :rule="rule" :form="form" @cancel="backList" @save="save"
-      @submit="submit({id},val)" @determine="determine">
+    <editcon
+      :key="type"
+      ref="child"
+      :type="type"
+      :rule="rule"
+      :form="form"
+      @cancel="backList"
+      @save="save"
+      @submit="submit({ id }, val)"
+      @determine="determine"
+    >
       <template slot-scope="{ form }" slot="content">
-        <component :data="form" :is="cp" :ageList="ageList" :museumList="museumList" :textureList="textureList"
-          :filelist="filelist" />
+        <component
+          :data="form"
+          :is="cp"
+          :ageList="ageListAll"
+          :museumList="museumList"
+          :textureList="textureListAll"
+          :filelist="filelist"
+        />
       </template>
     </editcon>
 
-    <editdialog :type="val" :show='showAudit' @close="showAudit=false" :id="id" />
-
+    <editdialog
+      :type="val"
+      :show="showAudit"
+      @close="showAudit = false"
+      :id="id"
+    />
   </div>
 </template>
 
@@ -23,23 +42,29 @@ import vvideo from "./componets/video";
 import vaudio from "./componets/audio";
 
 import { formKey, rules } from "./data";
-import { save, getDetail, getDictList, getMuseumAllList } from "@/configue/api";
+import {
+  save,
+  getDetail,
+  getDictList,
+  getMuseumAllList,
+  getDictListAll,
+} from "@/configue/api";
 
 import { randomWord } from "@/util/index.js";
 
-let ran = randomWord(true, 8, 8)
+let ran = randomWord(true, 8, 8);
 
 export default {
   components: {
     vmodel,
     vimg,
     vvideo,
-    vaudio
+    vaudio,
   },
   data() {
     let { type, id } = this.$route.params;
     return {
-      val: 'goods',
+      val: "goods",
       type,
       id: String(id),
       form: "",
@@ -47,7 +72,9 @@ export default {
       ageList: [],
       textureList: [],
       museumList: [],
-      showAudit: false
+      showAudit: false,
+      ageListAll:[],
+      textureListAll:[]
     };
   },
   computed: {
@@ -63,13 +90,19 @@ export default {
   },
   mounted() {
     this.getDetail();
-    this.getlist('age')
-    this.getlist('texture')
-    this.getMuseumAllList()
+    this.getlist("age");
+    this.getlist("texture");
+    this.getMuseumAllList();
+
+    getDictListAll("age", (data) => {
+      this.ageListAll = data.data;
+    });
+    getDictListAll("texture", (data) => {
+      this.textureListAll = data.data;
+    });
   },
   methods: {
-
-    save(submit = '', cb = null) {
+    save(submit = "", cb = null) {
       this.validate(() => {
         let fileIds = this.filelist.map((item) => item.id).join(",");
         let params = {
@@ -86,13 +119,12 @@ export default {
         };
         save(this.val, params, () => {
           if (submit) {
-            cb && cb()
-          }
-          else {
+            cb && cb();
+          } else {
             this.$alert("编辑成功", "提示", {
               confirmButtonText: "确定",
               callback: () => {
-                this.backList()
+                this.backList();
               },
             });
           }
@@ -102,18 +134,18 @@ export default {
 
     getlist(type) {
       getDictList(type, (data) => {
-        if (type == 'age') {
-          this.ageList = data.data.records
+        if (type == "age") {
+          this.ageList = data.data.records;
         } else {
-          this.textureList = data.data.records
+          this.textureList = data.data.records;
         }
-      })
+      });
     },
 
     getMuseumAllList() {
       getMuseumAllList((data) => {
-        this.museumList = data.data
-      })
+        this.museumList = data.data;
+      });
     },
 
     async getDetail() {
@@ -122,11 +154,11 @@ export default {
       } else {
         await getDetail(this.val, { id: this.id }, (res) => {
           this.form = { ...this.form, ...res.data.entity };
-          this.form['display'] = Boolean(this.form['display'])
+          this.form["display"] = Boolean(this.form["display"]);
           this.filelist = res.data.file;
         });
       }
-    }
+    },
   },
 };
 </script>

+ 1 - 1
backstage/src/pages/content/museum/componets/detail.vue

@@ -32,7 +32,7 @@
         </el-form-item>
 
         <el-form-item label="描述:" >
-          <el-input :disabled="true" type="textarea"
+          <el-input :disabled="true" type="textarea" maxlength="200" show-word-limit
             :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.description"></el-input>
         </el-form-item>
       </div>

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

@@ -40,7 +40,7 @@
         </el-form-item>
 
         <el-form-item label="描述:">
-          <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.description"></el-input>
+          <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.description"  maxlength="200" show-word-limit></el-input>
         </el-form-item>
       </div>
 
@@ -58,6 +58,7 @@ import {getMuseumAllList} from "@/configue/api";
 
 
 export default {
+  name:'sceneEdit',
   props: ["data", "rule", "roleList"],
   components: { uploadThumb },
   data() {

+ 2 - 0
backstage/src/pages/content/scene/data.js

@@ -38,6 +38,7 @@ let formKey = {
     "timeStart": "",
     "type": "",
     opening:'',
+    thumb:'',
     description:''
   }
 }
@@ -48,6 +49,7 @@ let rules = {
     type: [{ required: true, message: "请选择场景类型", trigger: "blur" }],
     opening: [{ required: true, message: "请选择展览时间", trigger: "blur" }],
     museumId: [{ required: true, message: "请选择所属博物馆", trigger: "blur" }],
+    thumb: [{ required: true, message: "请上传封面图片", trigger: "blur" }],
   }
 }
 

+ 2 - 2
backstage/src/pages/content/scene/edit.vue

@@ -65,8 +65,8 @@ export default {
           "type": "",
           id: this.id == "none" ? null : this.id,
           ...this.form,
-          "timeEnd": this.form.type == 'temp' ? this.form.opening[0] : null,
-          "timeStart": this.form.type == 'temp' ? this.form.opening[1] : null,
+          "timeEnd": this.form.type == 'temp' ? this.form.opening[1] : null,
+          "timeStart": this.form.type == 'temp' ? this.form.opening[0] : null,
         };
         save(this.val, params, () => {
           if (submit) {

+ 88 - 71
backstage/src/pages/layout/aside.vue

@@ -2,117 +2,136 @@
 <template>
   <div class="aside">
     <div class="aside-list">
-      <div class="aside-item" v-for="(item,i) in menu" :key="i">
-        <div :class="{active:belong==item.id}"><i class="iconfont" :class="item.icon"></i>{{item.name}}</div>
-        <div @click="goto(sub)" v-for="(sub,idx) in item.routes" :key="idx" :class="{activeFont:activeIdx === sub.key}">
-          {{sub.name}}</div>
+      <div class="aside-item" v-for="(item, i) in menu" :key="i">
+        <div :class="{ active: belong == item.id }">
+          <i class="iconfont" :class="item.icon"></i>{{ item.name }}
+        </div>
+        <div
+          @click="goto(sub)"
+          v-for="(sub, idx) in item.routes"
+          :key="idx"
+          :class="{ activeFont: activeIdx === sub.key }"
+        >
+          {{ sub.name }}
+        </div>
       </div>
     </div>
   </div>
 </template>
 
 <script>
-import { routes, main } from '@/configue/menu'
+import { routes, main } from "@/configue/menu";
 
 export default {
+  name: "Aside",
   components: {},
   data() {
     return {
       routes,
       main,
       menu: [],
-      tmpRoute: []
-    }
+      tmpRoute: [],
+    };
   },
   computed: {
     activeIdx: {
       get: function () {
-        return this.$route.meta.index
+        return this.$route.meta.index;
       },
-      set: function () {
-      }
+      set: function () {},
     },
     belong: {
       get: function () {
-        return this.$route.meta.belong
+        return this.$route.meta.belong;
       },
-      set: function () {
-      }
-    }
+      set: function () {},
+    },
   },
   watch: {
-    'activeIdx': {
+    activeIdx: {
       immediate: true,
       handler: function (newVal) {
-        console.log(newVal, 'activeIdx');
+        // console.log(newVal, "activeIdx");
         if (this.tmpRoute.length > 0) {
-          let temp = this.tmpRoute.filter(item => {
-            return item.key == newVal
-          })
+          let temp = this.tmpRoute.filter((item) => {
+            return item.key == newVal;
+          });
 
           this.$store.commit("SetActiveMenu", temp[0] || this.tmpRoute[0]);
         }
-      }
+      },
     },
     tmpRoute(newVal, oldVal) {
-      console.log(newVal, oldVal, 'newVal,oldVal');
+      if (newVal.length <= 0) {
+        console.log("一个权限都没有");
+        this.$alert("没有权限,请联系管理员", "提示", {
+          confirmButtonText: "确定",
+          callback: () => {
+            this.$emit("close");
+          },
+        });
+        localStorage.removeItem("token");
+        this.$router.push("/login");
+        return;
+      }
+      console.log(newVal, oldVal, "newVal,oldVal");
       if (oldVal.length <= 0 && newVal[0].key != "museum") {
-        this.goto(newVal[0], true)
+        this.goto(newVal[0], true);
       }
-    }
+    },
   },
   methods: {
     goto(item, replace = null) {
-      let path = { path: `/${item.key}${item.param ? `/${item.param.map(tt => tt.default).join('/')}` : ''}` }
-      replace ? this.$router.replace(path) : this.$router.push(path)
+      let path = {
+        path: `/${item.key}${
+          item.param ? `/${item.param.map((tt) => tt.default).join("/")}` : ""
+        }`,
+      };
+      replace ? this.$router.replace(path) : this.$router.push(path);
     },
     async getResource() {
       let result = await this.$http({
-        method: 'GET',
-        url: 'sys/resource/getTreePermissions'
-      })
-
-      this.tmpRoute = routes.filter(item => {
-        let tmp = ''
-        result.data.forEach(sub => {
+        method: "GET",
+        url: "sys/resource/getTreePermissions",
+      });
+      this.tmpRoute = routes.filter((item) => {
+        let tmp = "";
+        result.data.forEach((sub) => {
           if (item.name == sub.name) {
-            sub.authority = item.authority
-            tmp = sub
+            if (sub.authority) {
+              tmp = sub;
+            }
           }
-        })
+        });
 
-        return tmp ? Object.assign(item, tmp) : tmp
+        return tmp ? Object.assign(item, tmp) : tmp;
       });
 
-      let temp = this.tmpRoute.filter(item => {
-        return item.key == this.activeIdx
-      })
+      // let temp = this.tmpRoute.filter((item) => {
+      //   return item.key == this.activeIdx;
+      // });
 
-      console.log(temp, 'temp');
+      // this.$store.commit("SetActiveMenu", temp[0] || this.tmpRoute[0]);
 
-      this.$store.commit("SetActiveMenu", temp[0] || this.tmpRoute[0]);
-
-
-      this.menu = main.filter(item => {
-        let route = []
+      this.menu = main.filter((item) => {
+        let route = [];
         this.tmpRoute.forEach((sub) => {
           if (item.key == sub.type) {
-            route.push(sub)
+            route.push(sub);
           }
-        })
-        item.routes = route
-        return route.length > 0 && item
-      })
-
-    }
-  },
-  created() {
+        });
+        item.routes = route;
+        return route.length > 0 && item;
+      });
 
+      // console.log(this.menu);
+    },
   },
+  created() {},
   mounted() {
-    this.getResource()
-  }
-}
+    this.getResource();
+  },
+};
 </script>
 
 <style scoped>
@@ -122,11 +141,10 @@ export default {
 }
 
 .aside-item {
-  padding: .625rem 0;
+  padding: 0.625rem 0;
   text-align: center;
 }
 
-
 .aside-item:last-child {
   border-bottom: none;
 }
@@ -134,24 +152,24 @@ export default {
 .aside-item div {
   height: 2.875rem;
   line-height: 2.875rem;
-  margin: .0625rem 0;
+  margin: 0.0625rem 0;
   width: 89%;
   padding-left: 5.7rem;
-  font-size: .875rem;
+  font-size: 0.875rem;
   cursor: pointer;
   color: #707070;
   text-align: left;
 }
 
 .aside-item div:not(:first-child):hover {
-  color: #B63C25;
+  color: #b63c25;
 }
 
 .aside-item div:first-child {
   padding-left: 3.81rem;
   display: flex;
   align-items: center;
-  color: #532F1C;
+  color: #532f1c;
   font-size: 1.25rem;
   font-weight: bold;
   margin-bottom: 0.2rem;
@@ -160,27 +178,26 @@ export default {
 .aside-item div:first-child img {
   width: 1.1rem;
   height: 1.1rem;
-  margin-right: .625rem;
+  margin-right: 0.625rem;
 }
 
 .aside-item .iconfont {
-  color: #532F1C;
-  margin-right: .8125rem;
+  color: #532f1c;
+  margin-right: 0.8125rem;
 }
 
 .aside-item .active {
-  background-color: #B63C25;
+  background-color: #b63c25;
   border-top-right-radius: 80px;
   border-bottom-right-radius: 80px;
-  color: #F2ECDE !important;
+  color: #f2ecde !important;
 }
 
 .aside-item .active .iconfont {
-  color: #F2ECDE;
+  color: #f2ecde;
 }
 
-
 .aside-item .activeFont {
-  color: #B63C25;
+  color: #b63c25;
 }
 </style>

+ 1 - 1
backstage/src/pages/system/dict/componets/detail.vue

@@ -44,7 +44,7 @@ export default {
         name: '藏品年代'
       }, {
         id: 'texture',
-        name: '藏品类'
+        name: '藏品类'
       }],
     };
   },

+ 8 - 8
backstage/src/pages/system/worklog/index.vue

@@ -19,12 +19,12 @@
             </el-date-picker>
             <span>操作者:</span>
             <el-input
-              class="elInput paddingmore"
+              class="elInput paddingmore caozuozelInput"
               :maxlength="20"
               show-word-limit
               @keydown.enter.native="getList"
               v-model="search.inputKey"
-              placeholder="请输入真实姓名"
+              placeholder="请输入操作者关键字"
             ></el-input>
             <el-button @click="getList" type="primary">查询</el-button>
             <el-button
@@ -93,7 +93,7 @@ export default {
   },
   methods: {
     getList() {
-      let { inputKey,date } = this.search;
+      let { inputKey, date } = this.search;
       getSysList(
         "log",
         {
@@ -113,14 +113,14 @@ export default {
       activeMenu: "activeMenu",
     }),
     data() {
-      return raw['log'];
-    }
+      return raw["log"];
+    },
   },
   watch: {
     subMenu: {
       deep: true,
       immediate: true,
-      handler: function() {
+      handler: function () {
         this.getAuth(this.activeMenu, "日志");
         this.getList();
       },
@@ -128,13 +128,13 @@ export default {
     activeMenu: {
       deep: true,
       immediate: true,
-      handler: function(newVal) {
+      handler: function (newVal) {
         this.getAuth(newVal, "日志");
       },
     },
     page: {
       deep: true,
-      handler: function() {
+      handler: function () {
         this.getList();
       },
     },