zhangqiOMG %!s(int64=2) %!d(string=hai) anos
pai
achega
4ddbb55233

+ 1 - 1
src/HManagement/archives_sc/list/list.vue

@@ -25,7 +25,7 @@
     <tableLayout :layout="tablecols" :data="list" :custom="true" :height="tableHieght">
       <template v-slot:customcol="scope">
         <div v-if="scope.column.columnname === 'status'">
-          <span :style="scope.column.data.status === '新建'?'color:#52C41A':''">{{scope.column.data.status}}</span>
+          <span :style="scope.column.data.status === '新建'?'':'color:#52C41A'">{{scope.column.data.status}}</span>
         </div>
         <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
       </template>

+ 1 - 1
src/HManagement/archives_sc/list/modules/release.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="inline-16">
-    <el-button type="text" size="mini" @click="releaseNotice">{{data.status === '新建'?'审 核':'退 回'}}</el-button>
+    <el-button type="text" size="mini" @click="releaseNotice">{{data.status === '新建'?'发 布':'取消发布'}}</el-button>
   </div>
 </template>
 

+ 16 - 2
src/HManagement/clueManage/clue_import/modules/importClue.vue

@@ -1,7 +1,9 @@
 <template>
   <div class="container normal-panel normal-margin">
     <!-- <el-button type="success" size="small">导 入</el-button> -->
-    <importFile accept=".xls,.xlsx" :folderid="folderid" :bindData="{ownertable:'sat_orderclueuploadbill',ownerid:'',usetype:'default'}" @onSuccess="uploadOrderclueuploadbillByExcel"></importFile>
+    <importFile accept=".xlsx" :folderid="folderid" :bindData="{ownertable:'sat_orderclueuploadbill',ownerid:'',usetype:'default'}" @onSuccess="uploadOrderclueuploadbillByExcel">
+      <a class="error-link" v-if="errorurl" :href="errorurl" slot="errorFile">下载错误数据</a>
+    </importFile>
   </div>
 </template>
 
@@ -13,7 +15,8 @@ export default {
   },
   data () {
     return {
-      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
+      errorurl:null
     }
   },
   methods:{
@@ -26,6 +29,11 @@ export default {
             "attachmentid":data.data.attachmentids[0]
         }
       })
+      if (res.msg !== true) {
+        this.errorurl = res.msg
+      } else {
+        this.errorurl = null
+      }
       this.tool.showMessage(res,()=>{
         this.$emit('onSuccess')
       })
@@ -35,4 +43,10 @@ export default {
 
 </script>
 <style>
+</style>
+<style scoped>
+.error-link{
+  display: block;
+  line-height: 30px;
+}
 </style>

+ 6 - 1
src/HManagement/department/modules/add_dep.vue

@@ -19,6 +19,11 @@
               <el-input class="item_width-full" v-model="form.remarks" placeholder="请输入部门描述" autocomplete="off"></el-input>
             </el-form-item>
           </el-col>
+          <el-col :span="12">  
+            <el-form-item class="item_width-full" label="排序">
+              <el-input class="item_width-full" v-model="form.sequence" placeholder="请输入部门排序号" autocomplete="off"></el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item label="是否启用">
               <el-checkbox v-model="form.isused" :false-label="0" :true-label="1">是否启用</el-checkbox>
@@ -58,7 +63,7 @@ export default {
         "depno":'',
         "parentid":this.data.departmentid,
         "remarks":"",
-        "sequence":1
+        "sequence":""
       }
     }
   },

+ 1 - 0
src/HManagement/department/modules/dep_list.vue

@@ -58,6 +58,7 @@ export default {
           createdate:node['createdate'],
           createby:node['createby'],
           depno:node['depno'],
+          sequence:node['sequence'],
           children: []
         }
           

+ 5 - 0
src/HManagement/department/modules/edit_dep.vue

@@ -20,6 +20,11 @@
               <el-input class="item_width-full" v-model="form.remarks" placeholder="请输入部门描述" autocomplete="off"></el-input>
             </el-form-item>
           </el-col>
+          <el-col :span="12">  
+            <el-form-item class="item_width-full" label="排序">
+              <el-input class="item_width-full" v-model="form.sequence" placeholder="请输入部门排序号" autocomplete="off"></el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item label="是否启用">
               <el-checkbox v-model="form.isused" :false-label="0" :true-label="1">是否启用</el-checkbox>

+ 2 - 2
src/HManagement/notice/list/modules/add_notice.vue

@@ -19,8 +19,8 @@ export default {
         "summary": "",
         "content": "",
         "issecret": 1,
-        "begdate":"2022-1-1",
-        "enddate": "2022-1-1",
+        "begdate":(new Date()).toLocaleDateString(),
+        "enddate":(new Date()).toLocaleDateString(),
         "isontop":0
       }
     }

+ 3 - 1
src/HManagement/notice/list/modules/delete.vue

@@ -20,7 +20,9 @@ export default {
           "sat_noticeid":this.data.sat_noticeid
         }
       }).then(res=>{
-        this.$emit('onSuccess')
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+        })
       })
     },
   }

+ 9 - 6
src/HManagement/notice/list/modules/edit_notice.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="container normal-panel normal-margin">
-      <el-button type="warning" size="small" icon="el-icon-s-claim" style="background:#FA8C16" @click="onSubmit">保 存</el-button>
+      <el-button type="warning" size="small" icon="el-icon-s-claim" @click="onSubmit">保 存</el-button>
     </div>
     <div style="overflow-x:hidden">
       <el-row :gutter="16">
@@ -75,12 +75,12 @@
           <div class="container normal-panel normal-margin">
             <attachmentList :attinfos="attinfo_video" @onSuccess="queryNoticeMain">
               <p slot="title">视频附件</p>
-              <upload slot="upload" accept=".mp4,.ogg,.webm" :folderid="folderid" :bindData="{ownertable:'sat_notice',ownerid:form.sat_noticeid,usetype:'default'}" @onSuccess="onSubmit"></upload>
+              <upload slot="upload" accept=".mp4,.ogg,.webm" :folderid="folderid" :bindData="{ownertable:'sat_notice',ownerid:form.sat_noticeid,usetype:'default'}" @onSuccess="onUploadSuccess"></upload>
             </attachmentList>
           </div>
           <div class="container normal-panel normal-margin">
             <attachmentList :attinfos="attinfo_attachment" @onSuccess="queryNoticeMain">
-              <upload slot="upload" :folderid="folderid" :bindData="{ownertable:'sat_notice',ownerid:form.sat_noticeid,usetype:'default'}" @onSuccess="onSubmit"></upload>
+              <upload slot="upload" :folderid="folderid" :bindData="{ownertable:'sat_notice',ownerid:form.sat_noticeid,usetype:'default'}" @onSuccess="onUploadSuccess"></upload>
             </attachmentList>
           </div>
           <div class="container normal-panel normal-margin">
@@ -139,8 +139,8 @@ export default {
         "isattrequired":1,
         "onceonly":1,
         "sat_submiteditmodelid":"0",
-        "begdate":"2022-1-1",
-        "enddate":"2022-1-1",
+        "begdate":"",
+        "enddate":"",
         "issecret":false
       },
       defaultData:{},
@@ -152,6 +152,9 @@ export default {
     }
   },
   methods:{
+    onUploadSuccess () {
+      this.form.status !== '新建'?this.queryNoticeMain():this.onSubmit()
+    },
     onSubmit () {
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false;
@@ -220,7 +223,7 @@ export default {
       })
       res.data[0]?this.image = res.data[0]:this.image = {url:''}
     },
-    onCoverSubmit () {
+    onCoverSubmit (res) {
       this.form.cover = JSON.parse(res.attinfos).data[0].url
       this.image = JSON.parse(res.attinfos).data[0]
     },

+ 2 - 14
src/HManagement/notice/list/modules/tp.vue

@@ -19,21 +19,9 @@ export default {
           "sat_noticeid":this.data.sat_noticeid
         }
       })
-      console.log(res)
-      if (res.code === 1) {
-        this.$notify({
-          title: '成功',
-          message: this.data.status === "发布"?'取消成功':'置顶成功',
-          type: 'success'
-        });
+      this.tool.showMessage(res,()=>{
         this.$emit('onSuccess')
-      } else {
-        this.$notify({
-          title: '失败',
-          message: res.data,
-          type: 'error'
-        });
-      }
+      })
     }
   }
 }

+ 7 - 15
src/HManagement/siteManage/securityConfig/modules/edit.vue

@@ -19,7 +19,7 @@
       <el-row style="margin:32px 0 0 0" :gutter="16">
         <el-col :span="12">
           <p>企业操作页LOGO:</p>
-          <uploadFile v-if="show" style="margin-top:10px" :folderid="folderid" accept=".JPG,.PNG" btntype="image" :bindData="{ownertable:'sys_site',ownerid:siteinfo.siteuid,usetype:'actionlogo'}" @onSuccess="uploadSuccess"></uploadFile>
+          <uploadFile v-if="show" style="margin-top:10px" :folderid="folderid" accept=".JPG,.PNG,.jpg,.png" btntype="image" :bindData="{ownertable:'sys_site',ownerid:siteinfo.siteuid,usetype:'actionlogo'}" @onSuccess="uploadSuccess"></uploadFile>
           <div v-else class="image-panel">
             <i class="el-icon-error close-btn" @click="deleteFileLink"></i>
             <img v-show="img.usetype === 'actionlogo'" v-for="img in siteinfo.attinfos" :key="img.index" style="width:100%" :src="img.url" alt="">
@@ -84,24 +84,13 @@ export default {
           "method": "updateSite",
           "content": this.form
         })
-        if (res.code === 1) {
-          this.$notify({
-            title: '成功',
-            message: '修改成功',
-            type:'success'
-          })
+        this.tool.showMessage(res,()=>{
           this.dialogEditVisible = false
           this.$emit('onSuccess')
-        } else {
-          this.$notify({
-            title:'失败',
-            message: res.data,
-            type:'error'
-          })
-        }
+        })
       });
     },
-    async deleteFileLink () {
+    async deleteFileLink (item) {
       const res = await this.$api.requested({
         "classname": "system.attachment.Attachment",
         "method": "deleteFileLink",
@@ -113,6 +102,9 @@ export default {
     },
     uploadSuccess () {
       this.$emit('onSuccess')
+      setTimeout(() => {
+        this.form = Object.assign({},this.form,this.siteinfo)
+      }, 100);
     }
   }
 }

+ 1 - 1
src/HManagement/submit/list/list.vue

@@ -16,7 +16,7 @@
           <span :style="scope.column.data.status === '发布'?'color:#52C41A':''">{{scope.column.data.status}}</span>
         </div>
         <div v-else-if="scope.column.columnname === 'onceonly'">
-          <span>{{scope.column.data.onceonly === '1'?'一事一报':'一事多报'}}</span>
+          <span>{{scope.column.data.onceonly === 1?'一事一报':'一事多报'}}</span>
         </div>
         <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
       </template>

+ 1 - 0
src/components/import/importFile.vue

@@ -44,6 +44,7 @@
             <el-progress :percentage="file.progress" :show-text="false"></el-progress>
           </div>
         </div>
+        <slot name="errorFile"></slot>
         <p class="tips">• 为保证数据导入顺利,推荐您下载并使用<a href="">《Excel标准模板》</a></p>
         <p class="tips">• 文件中数据不能超过5000行</p>
         <div class="dialog-footer">

+ 8 - 2
src/components/previewImage/index.vue

@@ -29,8 +29,14 @@ export default {
       res.code === 1?this.$emit('onSuccess'):''
     },
   },
-  mounted () {
-    this.srcList.push(this.image.url)
+  watch: {
+    image: {
+      deep: true,
+      immediate: true,
+      handler(newValue, oldValue) {
+        this.srcList.push(this.image.url)
+      },
+    }
   }
 }
 

+ 13 - 1
src/components/upload/hw_obs_upload.vue

@@ -11,6 +11,7 @@
     <!-- 按钮类型 -->
     <el-button v-else type="primary" size="small" @click="dialogUploadVisible = true" icon="el-icon-upload">上 传</el-button>
     <el-dialog title="文件上传" :visible.sync="dialogUploadVisible" width="500px" append-to-body :close-on-click-modal="false" :before-close="clearFiles">
+      <selectMedia @onShow="onShow" :accept="accept" :bindData="bindData" @onBindSuccess="onBindSuccess"></selectMedia>
       <el-upload
         style="width:100%"
         ref="my-upload"
@@ -49,7 +50,7 @@
 </template>
 
 <script>
-
+import selectMedia from '@/components/uploadBindMediaStock/index.vue'
 export default {
   /*
     folderid:文件夹id; 必填
@@ -58,6 +59,9 @@ export default {
     bindData:附件上传成功后对应需要绑定的数据信息
   */
   props:['folderid','btntype','accept','bindData'],
+  components:{
+    selectMedia
+  },
   data () {
     return {
       dialogUploadVisible: false,
@@ -133,6 +137,14 @@ export default {
       this.$refs['my-upload'].clearFiles()
       this.filelist = []
       this.dialogUploadVisible = false
+    },
+
+    // 监听打开媒体库的时候关闭上传弹窗
+    onShow () {
+      this.dialogUploadVisible = false
+    },
+    onBindSuccess (res) {
+      this.$emit('onSuccess',res)
     }
   }
 }

+ 61 - 0
src/components/uploadBindMediaStock/components/filelist.vue

@@ -0,0 +1,61 @@
+<template>
+  <div>
+    <el-row :gutter="10" class="folder-list">
+      <el-col :span="2" v-for="folder in list" :key="folder.id" v-show="folder. postfix === 'FOLDER'">
+        <div class="folder-item" :class="folder.checked?'checked':''">
+          <el-checkbox class="folder-checkbox" v-model="folder.checked" @change="onChange(folder)"></el-checkbox>
+          <div class="img-panel">
+            <img src="../../../assets/file_icons/folder.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>
+    <el-row :gutter="10" class="folder-list">
+      <el-col :span="2" v-for="folder in list" :key="folder.id" v-show="folder. postfix !== 'FOLDER'">
+        <div class="folder-item" :class="folder.checked?'checked':''">
+          <el-checkbox class="folder-checkbox" v-model="folder.checked" @change="onChange(folder)"></el-checkbox>
+          <div 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/xls.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>
+          <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>
+  </div>
+</template>
+
+<script>
+export default {
+  props:['list'],
+  methods:{
+    changeFolderName (folder) {
+      this.$emit('onNameChange',folder)
+    },
+    onChange (folder) {
+      let checkArray = []
+      this.list.forEach(e=>{
+        if (e.attachmentid === folder.attachmentid) {
+         e.ischeck === true? e.ischeck = false : e.ischeck = true
+        }
+        if (e.ischeck === true) {
+          checkArray.push(e)
+        }
+      })
+      this.$emit('folderChecked',checkArray)
+    }
+  }
+}
+
+</script>
+<style>
+</style>

+ 80 - 0
src/components/uploadBindMediaStock/index.vue

@@ -0,0 +1,80 @@
+<template>
+<div>
+  <el-button class="normal-margin" size="small" type="primary" @click="onShow">从媒体库选择</el-button>
+  <el-dialog title="媒体库" append-to-body :visible.sync="dialogMediaVisible" width="90%" top="30px">
+    <list ref="list" :accept="accept" @folderChecked="folderChecked" @toFolderDetail="toFolderDetail">
+      <div slot="upload">
+        <el-button v-if="clickHistory.length > 1" size="mini" type="text" icon="el-icon-back" @click="backFolder">返回上一级</el-button>
+      </div>
+    </list>
+    <div class="dialog-footer">
+      <el-button size="small" @click="dialogMediaVisible = false" class="normal-btn-width">取 消</el-button>
+      <el-button :disabled="checklist.length !== 1" class="normal-btn-width" type="primary" size="small" @click="bindFileToData">确 定</el-button>
+    </div>
+  </el-dialog>
+</div>
+</template>
+
+<script>
+import list from './modules/list.vue'
+
+export default {
+  props:['bindData','accept'],
+  components:{
+    list
+  },
+  data () {
+    return {
+      dialogMediaVisible:false,
+      showBtnGroup:false,
+      folderid:'',
+      checklist:[],
+      clickHistory:[0]
+    }
+  },
+  methods:{
+    onShow () {
+      this.dialogMediaVisible = true
+      this.$emit('onShow')
+    },
+    
+    // 监听文件选择
+    folderChecked (arr) {
+      this.checklist = arr
+      if (arr.length > 0) {
+        this.showBtnGroup = true
+      } else {
+        this.showBtnGroup = false
+      }
+    },
+    // 监听打开文件夹
+    toFolderDetail (id) {
+      this.folderid = id
+      this.clickHistory.push(id)
+      this.$refs['list'].queryAttachment(id)
+    },
+
+    // 返回上层文件夹
+    backFolder () {
+      this.clickHistory.pop()
+      this.$refs['list'].queryAttachment(this.clickHistory.at(-1))
+    },
+    async bindFileToData () {
+      let obj = {attachmentids:[this.checklist[0].attachmentid]}
+      obj = Object.assign({},obj,this.bindData)
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "createFileLink",
+        "content": obj
+      })
+      this.tool.showMessage(res,()=>{
+        this.dialogMediaVisible = false
+        this.$emit('onBindSuccess',{attinfos:JSON.stringify(res)})
+      })
+    },
+  }
+}
+
+</script>
+<style>
+</style>

+ 212 - 0
src/components/uploadBindMediaStock/modules/list.vue

@@ -0,0 +1,212 @@
+<template>
+  <div> 
+    <div  class="flex-align-center flex-between border-bottom container normal-panel">
+      <div class="flex-align-center">
+        <slot name="upload"></slot>
+      </div>
+      <div class="flex-align-center">
+        <el-input size="small" style="width:160px;margin-right:16px" prefix-icon="el-icon-search" v-model="params.content.where.condition" @keyup.enter.native="queryAttachment(params.content.pageNumber = 1)" @clear="queryAttachment(params.content.pageNumber = 1)" placeholder="搜索全部" clearable></el-input>
+        <sort :sort="sort" @onSort="onSort"></sort>
+        <i class="el-icon-refresh" style="margin-left:16px" @click="queryAttachment(params.content.where.condition = '')"></i>
+      </div>
+    </div>
+    <div ref="ele" style="height:calc(100vh - 405px);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 v-show="folder.postfix !== 'FOLDER'" 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>
+            <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>
+      <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>
+    </div>
+    <div style="margin:16px 0;text-align:right">
+      <el-pagination
+        background
+        small
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="params.content.pageSize"
+        layout="total, prev, pager, next, jumper"
+        :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props:['accept'],
+  data () {
+    return {
+      params:{
+        "classname": "system.attachment.MediaCenter",
+        "method": "queryAttachment",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition":"",
+            "parentid":''
+          }
+        }
+      },
+      list:[],
+      sort:[],
+      total:0,
+      currentPage:0,
+    }
+  },
+  methods:{
+    // 排序
+    onSort (sort) {
+      this.params.content.sort = [sort]
+      this.queryAttachment(this.params.content.where.parentid)
+    },
+    async queryAttachment (id) {
+      this.params.content.where.parentid = id?id:0
+      this.params.content.where.postfixs = this.accept.split(",")
+      const res = await this.$api.requested(this.params)
+      res.data.map(e=>{
+        e.postfix  = e.postfix.toUpperCase()
+        e.ischeck = false
+      })
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      this.sort = res.sort
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.params.content.pageSize = val
+      this.queryAttachment(this.params.content.where.parentid)
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.params.content.pageNumber = val
+      this.queryAttachment(this.params.content.where.parentid)
+    },
+    changeFolderName (folder) {
+      this.$emit('onNameChange',folder)
+    },
+    onChange (folder) {
+      let checkArray = []
+      this.list.forEach((e,index)=>{
+        if (e.ischeck === true) {
+          checkArray.push(e)
+        }
+      })
+      this.$emit('folderChecked',checkArray)
+    },
+    async folderDetails (folder) {
+      event.stopPropagation();
+      if (folder.postfix === 'FOLDER') {
+        this.$emit('toFolderDetail',folder.attachmentid)
+      }
+    },
+    restChecked () {
+      this.list.forEach((e,index)=>{
+        e.ischeck = false
+      })
+    }
+  },
+  mounted () {
+    // 根据容器高度计算需要的数据条数
+    var heightCss = window.getComputedStyle(this.$refs.ele).height
+    this.params.content.pageSize = Math.ceil((heightCss.match(/\d+/g) / 114)) *12
+    this.queryAttachment()
+  },
+  watch:{
+    $route () {
+      this.queryAttachment()
+      // 路由发生变化的时候初始化选择数组
+      this.$emit('folderChecked',[])
+    }
+  }
+}
+
+</script>
+<style>
+.folder-item {
+  position: relative;
+  padding:10px 5px;
+  text-align: center;
+  color:#333;
+  margin-bottom: 15px;
+  cursor: pointer;
+  font-size: 14px;
+  /* min-height: 110px; */
+}
+
+.folder-item p{
+  line-height: 25px;
+  width: calc(100% - 20px);
+  padding: 0 10px;
+  /* margin-top:10px; */
+  word-break: break-all;
+
+  text-overflow: ellipsis;
+
+  display: -webkit-box;
+
+  -webkit-box-orient: vertical;
+
+  -webkit-line-clamp: 1; /* 这里是超出几行省略 */
+
+  overflow: hidden;
+}
+.folder-item input{
+  width: calc(100% - 8px);
+  padding: 2px;
+  margin-top:10px;
+}
+.img-panel {
+  width: 64px;
+  /* height: 64px; */
+  margin:0 auto;
+  text-align: center;
+}
+.img-panel > img{
+  width: 80%;
+}
+.folder-checkbox{
+  display: none;
+  position: absolute;
+  top:10px;
+  left: 10px;
+}
+.checked{
+  background: #f1f2f3;
+  border-radius: 3px;
+}
+.checked .folder-checkbox {
+  display: block;
+}
+.folder-item:hover .folder-checkbox {
+  display: block;
+}
+.folder-item:hover {
+  background: #f1f2f3;
+  border-radius: 3px;
+}
+</style>
+<style scoped>
+.border-bottom{
+  border-bottom: 1px solid #f1f2f3;
+}
+</style>

+ 2 - 1
src/router/HManagement.js

@@ -149,7 +149,8 @@ const HManagement = [
     name: 'noticemag',
     meta: {
       title: '编辑通告',
-      ast_nav:true
+      ast_nav:true,
+      keeproute:true
     },
     component: () => import(/* webpackChunkName: "about" */ '@/HManagement/notice/list/modules/add_notice.vue')
   },{