瀏覽代碼

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

qymljy 2 年之前
父節點
當前提交
1a27c40ab0

+ 25 - 12
src/App.vue

@@ -10,15 +10,31 @@
     },
     methods:{},
     watch: {
-      $route(to,from) {
-        console.log(to,from)
-        let at_modules = JSON.parse(sessionStorage.getItem('active_modules'))
-        to.meta.modules = at_modules
-        let app = to.meta.modules.apps.filter(e=>{
-          if (e.name === to.name) return e
-        })
-        console.log(app)
-        // this.$store.dispatch('setActiveApp',{app:app[0],val:''})
+      $route(val) {
+        try {
+          if (!val.meta.modules) {
+            let at_modules = JSON.parse(sessionStorage.getItem('active_modules'))
+            val.meta.modules?'':val.meta.modules = at_modules
+          } else {
+            
+            let app = val.meta.modules.apps.filter(e=>{
+              if (e.name === val.name) return e
+            })
+            sessionStorage.setItem('active_modules',JSON.stringify(val.meta.modules))
+            
+            this.$store.dispatch('setActiveApp',{app:app[0],val:''})
+
+            let system = JSON.parse(sessionStorage.getItem('module_info'))
+            
+            let at_system = system.filter(e=>{
+              if (e.systemid === val.meta.modules.systemid)
+              return e
+            })
+            this.$store.dispatch('getModules',{mod:at_system[0].modules})
+          }          
+        } catch (error) {
+          
+        }
       }
     }
   }
@@ -31,9 +47,6 @@ body{
 .rightBar{
   width:60px;
   height:100vh;
-  /* background:#afc7fb; */
-  /* opacity: .9; */
-  /* border-left:1px solid #f1f2f3; */
   background: rgba(255,255,255,.5);
   box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
 }

+ 2 - 2
src/HManagement/submit/index.vue

@@ -101,8 +101,8 @@ export default {
         {label:'发布',value:'发布'},
       ],
       typeList:[
-        {label:'一事一报',value:'0'},
-        {label:'一事多报',value:'1'},
+        {label:'一事一报',value:'1'},
+        {label:'一事多报',value:'0'},
       ],
       status:'',
       type:''

二進制
src/assets/wallhaven-0pq8gm.jpeg


+ 1 - 1
src/components/newLayout/index.vue

@@ -36,7 +36,7 @@ export default {
   },
   methods:{
     getModules (mod,type) {
-      this.$refs['menu'].setModules(mod,type)
+      // this.$refs['menu'].setModules(mod,type)
     },
      // 查询应用授权
     async query_userauth () {

+ 12 - 10
src/components/newLayout/modules/aside.vue

@@ -8,27 +8,28 @@
     <!-- <p v-if="!collapse" style="padding:0 20px;font-size:12px;color:#eeeeee">系统</p> -->
     <el-menu
      :collapse="collapse"
+     :collapse-transition="false"
       style="background:none"
       text-color="#fff"
       active-text-color="#fff"
       class="el-menu-vertical-demo">
-      <el-menu-item :index="String(item.systemid)" v-for="item in systemList" :key="item.index" @click="handelMenuClick(item,'system')" @mouseenter.native="debounce(selectStyle,1500)()" @mouseleave.native="outStyle">
+      <el-menu-item :index="String(item.systemid)" v-for="item in systemList" :key="item.index" @click="handelMenuClick(item,'system')" @mouseenter.native="debounce(selectStyle,100)()" @mouseleave.native="outStyle">
         <p style="text-align:center" v-if="collapse">{{item.systemname.substr(0, 1)}}</p>
         <span slot="title">{{item.systemname}}</span>
       </el-menu-item>
       <el-divider class="divider"></el-divider>
       <!-- <p v-if="!collapse" style="padding:0 20px;font-size:12px;color:#eeeeee">应用</p> -->
       <!-- <el-divider content-position="left">应用</el-divider> -->
-      <el-menu-item :index="String(index + 10)" v-for="(item,index) in menuApp" :key="index" @click="handelMenuAppClick(item,'app')" @mouseenter.native="debounce(selectStyle,1500)()" @mouseleave.native="outStyle">
+      <el-menu-item :index="String(index + 10)" v-for="(item,index) in menuApp" :key="index" @click="handelMenuAppClick(item,'app')" @mouseenter.native="debounce(selectStyle,100)()" @mouseleave.native="outStyle">
         <p class="" style="text-align:center" v-if="collapse">{{item.systemappname.substr(0, 1)}}</p>
         <span slot="title">{{item.systemappname}}</span>
         <i v-if="!collapse" style="float:right;line-height: 40px;" class="el-icon-error menuIconClose" @click.stop="deleteMenuApp(item)"></i>
       </el-menu-item>
-      <el-menu-item index="99" style="font-size:12px;margin-top:20px"  @click="handelMenuClick(item,'system')" @mouseenter.native="debounce(selectStyle,1500)()" @mouseleave.native="outStyle">
+      <el-menu-item index="99" style="font-size:12px;margin-top:20px"  @click="handelMenuClick(item,'system')" @mouseenter.native="debounce(selectStyle,100)()" @mouseleave.native="outStyle">
         <i v-if="collapse" class="el-icon-aim"  style="font-size:12px;color:#fff"></i>
         <span slot="title"><b>网站地图</b></span>
       </el-menu-item>
-      <el-menu-item index="100"  style="font-size:12px"  @click="handelMenuClick(item,'system')" @mouseenter.native="debounce(selectStyle,1500)()" @mouseleave.native="outStyle">
+      <el-menu-item index="100"  style="font-size:12px"  @click="handelMenuClick(item,'system')" @mouseenter.native="debounce(selectStyle,100)()" @mouseleave.native="outStyle">
         <i v-if="collapse" class="el-icon-menu"  style="font-size:12px;color:#fff"></i>
         <span slot="title"><b>配置菜单</b></span>
       </el-menu-item>
@@ -71,7 +72,7 @@ export default {
     return {
       systemList:[],
       active:"0",
-      collapse:true,
+      collapse:false,
       fixedMenu:'no__panel',
       timer:null
     }
@@ -85,7 +86,8 @@ export default {
   methods:{
     handelMenuClick (item,type) {
       this.active = String(item.systemid)
-      this.$emit('getModules',item.modules,type)
+      // this.$emit('getModules',item.modules,type)
+      this.$store.dispatch('getModules',{mod:item.modules,type:type})
     },
     handelMenuAppClick (app,type) {
       let system = JSON.parse(sessionStorage.getItem('module_info'))
@@ -105,8 +107,8 @@ export default {
       })[0]
 
       sessionStorage.setItem('active_modules',JSON.stringify(at_modules))
-
-      this.$emit('getModules',at_sys_modules,type)
+      
+      this.$store.dispatch('getModules',{mod:at_sys_modules,type:type})
 
       this.$store.dispatch('setActiveApp',{name:app.systemappname,app:at_app,val:''})
 
@@ -250,7 +252,7 @@ export default {
   box-shadow: 2px 8px 8px 0 rgb(0 0 0 / 20%);
   background: rgba(52,60,71,.95);
   z-index: 999;
-  transition: .2s ease-in-out;
+  transition: .1s ease-in-out;
 }
 .no__panel{
   position: absolute;
@@ -259,7 +261,7 @@ export default {
   top:0;
   background: rgba(32, 30, 30, 0.8);
   z-index: 999;
-  transition: .2s ease-in-out;
+  transition: .1s ease-in-out;
   
 }
 </style>

+ 14 - 12
src/components/newLayout/modules/menu.vue

@@ -2,11 +2,11 @@
   <div class="menu_panel">
     <div  v-if="show">
       <el-menu router v-if="show"  :default-active="activeIndex" active-text-color="#3874f6" text-color="#333" class="el-menu-demo shadow" mode="horizontal" @select="handleSelect">
-        <el-submenu v-show="hasMoreApp(mod)" v-for="(mod,index) in modules" :key="index" :index="String(index)">
+        <el-submenu v-show="hasMoreApp(mod)" v-for="(mod,index) in sys_modules" :key="index" :index="String(index)">
           <template slot="title"><b>{{mod.systemmodulename}}</b></template>
           <el-menu-item :index="app.path" v-for="(app) in mod.apps" :key="app.index" @click="setActiveModules(mod,app)">{{app.meta.title}}</el-menu-item>
         </el-submenu>
-        <el-menu-item v-show="!hasMoreApp(mod)" :index="mod.path" v-for="(mod) in modules" :key="mod.index" @click="setActiveModules(mod,mod.apps[0])"><b>{{mod.systemmodulename}}</b></el-menu-item>
+        <el-menu-item v-show="!hasMoreApp(mod)" :index="mod.path" v-for="(mod) in sys_modules" :key="mod.index" @click="setActiveModules(mod,mod.apps[0])"><b>{{mod.systemmodulename}}</b></el-menu-item>
       </el-menu>
     </div>
   </div>
@@ -24,19 +24,20 @@ export default {
   },
   computed:{
     ...mapGetters({
-      acitveApp:'acitveApp'
+      acitveApp:'acitveApp',
+      sys_modules:'sys_modules'
     })
   },
   methods:{
-    setModules (mod,type) {
-      this.modules = mod
-      if (type === 'system') {
-        this.setActiveModules(mod[0],mod[0].apps[0])
-        let inactivePath = mod[0].apps[0].path
-        this.$router.push({path:inactivePath})
-      }
+    // setModules (mod,type) {
+    //   this.modules = mod
+    //   if (type === 'system') {
+    //     this.setActiveModules(mod[0],mod[0].apps[0])
+    //     let inactivePath = mod[0].apps[0].path
+    //     this.$router.push({path:inactivePath})
+    //   }
       
-    },
+    // },
     hasMoreApp (mod) {
       if (mod.apps.length > 1) {
         return true
@@ -51,7 +52,8 @@ export default {
     },
     setDefaultData (mod) {
       let system = JSON.parse(sessionStorage.getItem('module_info'))
-      this.setModules(system[0].modules)
+      // this.setModules(system[0].modules)
+      this.$store.dispatch('getModules',{mod:system[0].modules})
     },
     handleSelect(key, keyPath) {
       this.activeIndex = key

+ 0 - 1
src/components/normal-basic-layout/index.vue

@@ -29,7 +29,6 @@
           </el-radio-group> -->
           <slot name="custom"></slot>
           <div>
-            <label for="">搜索:&nbsp;</label>
             <el-input placeholder="请输入搜索内容" suffix-icon="el-icon-search" @input="searchChange" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" style="width:200px" size="small" class="input-with-select inline-16" clearable>
             </el-input>
           </div>

+ 20 - 0
src/store/index.js

@@ -1,6 +1,7 @@
 import Vue from 'vue';
 import Vuex from 'vuex';
 import axios from 'axios'
+import router from '../router';
 import api from '../api/api'
 import tool from '../utils/tool'
 Vue.use(Vuex);
@@ -21,6 +22,7 @@ export default new Vuex.Store({
     acitveApp:null,
     appname:'',
     menuApp:[],
+    sys_modules:[],
     searchValue:'',
     closeDrawerTemp:false,
     DrawerShow:false
@@ -41,6 +43,7 @@ export default new Vuex.Store({
     searchValue:state => state.searchValue,
     closeDrawerTemp:state => state.closeDrawerTemp,
     DrawerShow:state => state.DrawerShow,
+    sys_modules:state => state.sys_modules
     
   },
   mutations: {
@@ -71,12 +74,17 @@ export default new Vuex.Store({
     sendDataToForm (state,data) {
       state.dataToForm = data
     },
+    
     setActiveApp (state,data) {
       state.appname = data.name
       state.acitveApp = data.app
         //头部区域搜索所传入的数值
       state.searchValue = data.val
     },
+    systemModules (state,data) {
+      state.sys_modules = data
+      console.log(state.sys_modules,'mod')
+    },
     setAppMenu (state,data) {
       state.menuApp = data
     },
@@ -200,6 +208,18 @@ export default new Vuex.Store({
     sendDataToForm ({commit}, data) {
       commit('sendDataToForm',data)
     },
+    getModules ({commit}, data) {
+      if (data.type === 'system') {
+        commit('setActiveApp',{name:data.mod[0].apps[0].systemappname,app:data.mod[0].apps[0],val:''})
+        sessionStorage.setItem('active_modules',JSON.stringify(data.mod[0]))
+
+        let inactivePath = data.mod[0].apps[0].path
+
+        router.push({path:inactivePath})
+
+      }
+      commit('systemModules',data.mod)
+    },
     // 设置活动中的应用
     setActiveApp ({commit}, data) {
       commit('setActiveApp',data)

+ 1 - 1
src/views/login/login.vue

@@ -265,7 +265,7 @@ export default {
   height: 100vh;
   /* background: #fff no-repeat 50% url(../../assets/bg.png); */
   background: url("../../assets/wallhaven-0pq8gm.jpeg") no-repeat;
-  background-size: cover;
+  background-size: 100% 100%;
 }
 .login-form{
   /* min-height: 500px; */

+ 3 - 2
src/views/mediaStock/modules/delete.vue

@@ -1,10 +1,11 @@
 <template>
-    <el-button icon="el-icon-delete" size="small" @click="clickDelete">删 除</el-button>
+    <el-button v-if="self" icon="el-icon-delete" size="small" type="text" @click="clickDelete"></el-button>
+    <el-button v-else icon="el-icon-delete" size="small" @click="clickDelete">删 除</el-button>
 </template>
 
 <script>
 export default {
-  props:['checklist'],
+  props:['checklist','self'],
   data () {
     return {
     }

+ 10 - 9
src/views/mediaStock/modules/fileInfo.vue

@@ -7,15 +7,16 @@
     <div v-else>
       <p class="bold">{{file.document}}</p>
       <p class="info-text">{{file.postfix}}</p>
-      <img v-if="file.postfix === 'DOC' || file.postfix === 'DOCX'"  src="../../../assets/file_icons/word.png" alt="">
-      <img v-else-if="file.postfix === 'PDF'"  src="../../../assets/file_icons/PDF.png" alt="">
-      <img v-else-if="file.postfix === 'MP4' || file.postfix === 'AVI'"  src="../../../assets/file_icons/video.png" alt="">
-      <img v-else-if="file.postfix === 'XLS' || file.postfix === 'XLSX'"  src="../../../assets/file_icons/excel.png" alt="">
-      <img v-else-if="file.postfix === 'PNG' || file.postfix === 'JPG'|| file.postfix === 'JPEG'"  src="../../../assets/file_icons/image.png" alt="">
-      <img v-else-if="file.postfix === 'PPT' || file.postfix === 'PPTX'"  src="../../../assets/file_icons/PPT.png" alt="">
-      <img v-else-if="file.postfix === 'TXT'"  src="../../../assets/file_icons/TXT@2x.png" alt="">
-      <img v-else-if="file.postfix === 'FOLDER'"  src="../../../assets/file_icons/folder.png" alt="">
-      <img v-else  src="../../../assets/file_icons/unknow.png" alt="">
+      <img v-if="file.postfix === 'DOC' || file.postfix === 'DOCX'"  src="@/assets/file_icons/word.png" alt="">
+      <img v-else-if="file.postfix === 'PDF'"  src="@/assets/file_icons/PDF.png" alt="">
+      <img v-else-if="file.postfix === 'MP4' || file.postfix === 'AVI'"  src="@/assets/file_icons/video.png" alt="">
+      <img v-else-if="file.postfix === 'XLS' || file.postfix === 'XLSX'"  src="@/assets/file_icons/excel.png" alt="">
+      <img style="width:150px" v-else-if="file.postfix === 'PNG' || file.postfix === 'JPG'|| file.postfix === 'JPEG'"  :src="file.url" alt="">
+      <img v-else-if="file.postfix === 'SVF'" src="@/assets/file_icons/image.png" alt="">
+      <img v-else-if="file.postfix === 'PPT' || file.postfix === 'PPTX'"  src="@/assets/file_icons/PPT.png" alt="">
+      <img v-else-if="file.postfix === 'TXT'"  src="@/assets/file_icons/TXT@2x.png" alt="">
+      <img v-else-if="file.postfix === 'FOLDER'"  src="@/assets/file_icons/folder.png" alt="">
+      <img v-else  src="@/assets/file_icons/unknow.png" alt="">
       <p v-if="file.contentlength" class="info-text">大小: {{file.contentlength > 1073741824?(file.contentlength / Math.pow(1024,3)).toFixed(2)+'GB':file.contentlength > 1048576?(file.contentlength / Math.pow(1024,2)).toFixed(2)+'MB':file.contentlength > 1024?(file.contentlength / Math.pow(1024,1)).toFixed(2)+'KB':file.contentlength+'B'}}</p>
       <p v-else class="info-text">大小:0</p>
       <p class="info-text">上传人: {{file.createby}}</p>

+ 146 - 29
src/views/mediaStock/modules/list.vue

@@ -13,25 +13,50 @@
       </div>
     </div>
     <div ref="ele" style="height:calc(100vh - 255px);overflow-y:scroll" class="container normal-panel">
-      <el-row :gutter="10" class="folder-list">
-        <el-col :span="3" v-for="folder in list" :key="folder.id">
-          <div class="folder-item" :class="folder.ischeck?'checked':''">
-            <el-checkbox class="folder-checkbox" v-model="folder.ischeck" @change="onChange(folder)"></el-checkbox>
-            <div @click.stop="folderDetails(folder)" class="img-panel">
-              <img v-if="folder.postfix === 'DOC' || folder.postfix === 'DOCX'"  src="../../../assets/file_icons/word.png" alt="">
-              <img v-else-if="folder.postfix === 'PDF'"  src="../../../assets/file_icons/PDF.png" alt="">
-              <img v-else-if="folder.postfix === 'MP4' || folder.postfix === 'AVI'"  src="../../../assets/file_icons/video.png" alt="">
-              <img v-else-if="folder.postfix === 'XLS' || folder.postfix === 'XLSX'"  src="../../../assets/file_icons/excel.png" alt="">
-              <img v-else-if="folder.postfix === 'PNG' || folder.postfix === 'JPG'|| folder.postfix === 'JPEG'"  src="../../../assets/file_icons/image.png" alt="">
-              <img v-else-if="folder.postfix === 'PPT' || folder.postfix === 'PPTX'"  src="../../../assets/file_icons/PPT.png" alt="">
-              <img v-else-if="folder.postfix === 'FOLDER'"  src="../../../assets/file_icons/folder.png" alt="">
-              <img v-else  src="../../../assets/file_icons/unknow.png" alt="">
+      <div class="flex-align-center normal-margin">
+        <el-button v-if="fileRouter.length > 1" type="text" size="mini" class="inline-16" @click="toPreFile">返回上一级</el-button>
+        <div class="fileRouter__history" v-for="(route,index) in fileRouter" :key="route.index" @click="folderDetails(route,index)">{{route.document}}&nbsp;<span v-show="fileRouter.length - 1 !== index"> > </span>&nbsp;</div>
+      </div>
+      <div class="flex-align-stretch flex-warp">
+        <div v-for="(folder,index) in list" :key="folder.id" class="folder-item" :class="folder.ischeck?'checked':''">
+          <el-checkbox class="folder-checkbox" v-model="folder.ischeck" @change="onChange(folder)"></el-checkbox>
+          <div class="op__panel">
+            <delete-temp :self="true" :checklist="[folder]" style="margin-right:5px" @onSuccess="queryAttachment"></delete-temp>
+            <operation-temp :ref="'edit' + index" :self="true" :checklist="[folder]" @restName="restName"  @onSuccess="queryAttachment"></operation-temp>
+          </div>
+          <div @click.stop="folderDetails(folder)" class="img-panel">
+            <div class="image__item__panel" v-if="folder.postfix === 'DOC' || folder.postfix === 'DOCX'">
+              <img  src="@/assets/file_icons/word.png" alt="">
+            </div>
+            <div class="image__item__panel" v-else-if="folder.postfix === 'PDF'">
+              <img  src="@/assets/file_icons/PDF.png" alt="">
+            </div>
+            <div class="image__item__panel" v-else-if="folder.postfix === 'MP4' || folder.postfix === 'AVI'" >
+              <img src="@/assets/file_icons/video.png" alt="">
+            </div>
+            <div class="image__item__panel" v-else-if="folder.postfix === 'XLS' || folder.postfix === 'XLSX'">
+              <img  src="@/assets/file_icons/excel.png" alt="">
+            </div>
+            <div class="image__item__panel" v-else-if="folder.postfix === 'PNG' || folder.postfix === 'JPG'|| folder.postfix === 'JPEG'" >
+              <img :src="folder.url" alt="">
+            </div>
+             <div class="image__item__panel" v-else-if="folder.postfix === 'SVG'" >
+              <img src="@/assets/file_icons/image.png" alt="">
+            </div>
+            <div class="image__item__panel" v-else-if="folder.postfix === 'PPT' || folder.postfix === 'PPTX'">
+              <img  src="@/assets/file_icons/PPT.png" alt="">
+            </div>
+            <div class="image__item__panel" v-else-if="folder.postfix === 'FOLDER'">
+              <img  src="@/assets/file_icons/folder.png" alt="">
+            </div>
+            <div class="image__item__panel" v-else >
+              <img  src="@/assets/file_icons/unknow.png" alt="">
             </div>
-            <input v-if="folder.newfolder" type="text" v-model="folder.document" autofocus size="mini" @blur="changeFolderName(folder)">
-            <p v-else>{{folder.document}}</p>
           </div>
-        </el-col>
-      </el-row>
+          <input v-if="folder.newfolder" type="text" v-model="folder.document" autofocus size="mini" @keyup.enter="changeFolderName(folder,index)" @blur="changeFolderName(folder,index)">
+          <p v-else>{{folder.document}}</p>
+        </div>
+      </div>
       <div v-if="list.length === 0" class="flex-align-center" style="height:calc(100vh - 200px);justify-content:space-around">
         <el-empty description="暂无文件,请点击左上角的“上传”按钮添加"></el-empty>
       </div>
@@ -52,6 +77,9 @@
 </template>
 
 <script>
+import operationTemp from './moreOperation.vue'
+import deleteTemp from './delete.vue'
+
 export default {
   data () {
     return {
@@ -71,8 +99,17 @@ export default {
       sort:[],
       total:0,
       currentPage:0,
+      clickArea:'',
+      fileRouter:[{
+        postfix:'FOLDER',
+        document:'全部文件'
+      }]
     }
   },
+  components:{
+    operationTemp,
+    deleteTemp
+  },
   methods:{
     // 排序
     onSort (sort) {
@@ -101,8 +138,31 @@ export default {
       this.params.content.pageNumber = val
       this.queryAttachment(this.params.content.where.parentid)
     },
-    changeFolderName (folder) {
-      this.$emit('onNameChange',folder)
+    async changeFolderName (folder,index) {
+      if (this.clickArea === 'self') {
+        let param = {
+          "classname": "system.attachment.MediaCenter",
+          "method": "changeAttachment",
+          "content": {
+            "files": [
+              {
+                "attachmentid": folder.attachmentid,
+                "document": folder.document,
+                "parentid":folder.parentid//文件夹iD
+              }
+            ]
+          }
+        }
+        const res = await this.$api.requested(param)
+        folder.newfolder = false
+        this.list.forEach((e,index) => {
+          if (e.attachmentid === folder.attachmentid) {
+            this.$set(this.list, index, folder);
+          }
+        })
+      } else {
+        this.$emit('onNameChange',folder)
+      }
     },
     onChange (folder) {
       let checkArray = []
@@ -113,11 +173,19 @@ export default {
       })
       this.$emit('folderChecked',checkArray)
     },
-    folderDetails (folder) {
-      event.stopPropagation();
+    folderDetails (folder,index) {
+      console.log(folder,index)
       if (folder.postfix === 'FOLDER') {
-        this.$router.push({path:'/mediaStock',query:{id:folder.attachmentid}})
-        this.$emit('toFolderDetail',folder.attachmentid)
+        if (index >= 0) {
+          this.fileRouter = this.fileRouter.slice(0,index + 1)
+          console.log(this.fileRouter)
+        } else {
+           let _isSame = this.fileRouter.some(m=>folder.attachmentid === m.attachmentid)
+
+          _isSame?'':this.fileRouter.push(folder)
+        }
+        this.$router.replace({path:'/mediaStock',query:{id:folder.attachmentid}})
+
         this.queryAttachment(folder.attachmentid)
       }
     },
@@ -125,7 +193,21 @@ export default {
       this.list.forEach((e,index)=>{
         e.ischeck = false
       })
+    },
+    restName (item) {
+      this.clickArea = 'self'
+      item.newfolder = true
+      this.list.forEach((e,index) => {
+        if (e.attachmentid === item.attachmentid) {
+          this.$set(this.list, index, item);
+        }
+      })
+    },
+    toPreFile () {
+      console.log(this.fileRouter.pop())
+      this.$router.replace({path:'/mediaStock',query:{id:this.fileRouter.pop().attachmentid}})
     }
+    
   },
   mounted () {
     // 根据容器高度计算需要的数据条数
@@ -146,19 +228,25 @@ export default {
 <style>
 .folder-item {
   position: relative;
+  width: 120px;
   padding:10px 5px;
   text-align: center;
   color:#333;
   margin-bottom: 15px;
+  margin-left:30px;
   cursor: pointer;
   font-size: 14px;
-  /* min-height: 110px; */
 }
-
+.flex-warp {
+  flex-wrap: wrap;
+}
 .folder-item p{
-  line-height: 25px;
-  width: calc(100% - 20px);
+  width: 100px;
+  margin:0 auto;
   padding: 0 10px;
+  line-height: 25px;
+  text-align: center;
+  font-size: 12px;
   /* margin-top:10px; */
   word-break: break-all;
 
@@ -168,7 +256,7 @@ export default {
 
   -webkit-box-orient: vertical;
 
-  -webkit-line-clamp: 1; /* 这里是超出几行省略 */
+  -webkit-line-clamp: 2; /* 这里是超出几行省略 */
 
   overflow: hidden;
 }
@@ -179,7 +267,7 @@ export default {
 }
 .img-panel {
   width: 64px;
-  /* height: 64px; */
+  height: 64px;
   margin:0 auto;
   text-align: center;
 }
@@ -211,4 +299,33 @@ export default {
 .border-bottom{
   border-bottom: 1px solid #f1f2f3;
 }
+.image__item__panel{
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+  height: 64px;
+  width: 64px;
+  margin: 0 auto;
+  overflow: hidden;
+}
+.image__item__panel img{
+  height: 70%;
+  max-width: 64px;
+}
+.op__panel{
+  display: none;
+  position: absolute;
+  right:0px;
+  top:0px;
+  padding: 0px 5px;
+  background: #fff;
+}
+.folder-item:hover .op__panel{
+  display: block;
+}
+.fileRouter__history {
+  font-size: 12px;
+  line-height: 30px;
+  cursor: pointer;
+}
 </style>

+ 2 - 2
src/views/mediaStock/modules/modifyLocation.vue

@@ -1,10 +1,10 @@
 <template>
-  <el-dialog title="移动到" :visible.sync="dialogTreeVisible" width="500px">
+  <el-dialog append-to-body title="移动到" :visible.sync="dialogTreeVisible" width="500px">
     <div class="border">
       <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" :load="loadNode" lazy highlight-current accordion>
         <div :class="data.class" slot-scope="{ node, data }">
           <div class="flex-align-center">
-            <img src="../../../assets/file_icons/folder.png" style="margin-right:10px" width="15" alt="">
+            <img src="@/assets/file_icons/folder.png" style="margin-right:10px" width="15" alt="">
             <p>{{ node.label }}</p>
           </div>              
         </div>

+ 20 - 11
src/views/mediaStock/modules/moreOperation.vue

@@ -1,6 +1,7 @@
 <template>
-  <el-dropdown style="border-left:1px solid #dcdfe6" v-show="checklist.length === 1" >
-    <el-button size="small">
+<div style="display:inline">
+  <el-dropdown :class="self?'':'bd-right'" v-show="checklist.length === 1" >
+    <el-button :type="self?'text':'default'" size="small">
       <i class="el-icon-more"></i>
     </el-button>
     <el-dropdown-menu slot="dropdown">
@@ -9,14 +10,15 @@
       <el-dropdown-item @click.native="showFileTree">移动到</el-dropdown-item>
     </el-dropdown-menu>
     <modifyLocation ref="modefy" :checklist="checklist" @onChangeFolderModify="onChangeFolderModify"></modifyLocation>
-    <el-dialog title="分享" :visible.sync="urlDialog" width="500px">
-      <div class="border">
-      <el-input placeholder="链接地址" v-model="checklist[0].url">
-        <el-button slot="append" @click="test">复制</el-button>
-      </el-input>
-      </div>
-    </el-dialog>
   </el-dropdown>
+  <el-dialog title="分享" append-to-body :visible.sync="urlDialog" width="500px">
+    <div class="border">
+    <el-input placeholder="链接地址" v-model="checklist[0].url">
+      <el-button slot="append" @click="test">复制</el-button>
+    </el-input>
+    </div>
+  </el-dialog>
+</div>
 </template>
 
 <script>
@@ -25,7 +27,7 @@ export default {
   components:{
     modifyLocation
   },
-  props:['checklist'],
+  props:['checklist','self'],
   data () {
     return {
       urlDialog:false,
@@ -36,7 +38,7 @@ export default {
       this.urlDialog = true
     },
     restName () {
-      this.$emit('restName')
+      this.$emit('restName',this.checklist[0])
     },
     async confirmRestName (folder) {
       let param = {
@@ -71,6 +73,7 @@ export default {
       this.$refs.modefy.queryAttachment(0)
     },
     onChangeFolderModify () {
+      console.log(11)
       this.$emit('onSuccess')
     },
     test () {
@@ -90,4 +93,10 @@ export default {
 
 </script>
 <style>
+</style>
+<style scoped>
+.bd-right{
+  border-left:1px solid #dcdfe6;
+  margin-left: -2px;
+}
 </style>