Explorar el Código

受控文件查阅代码调整

lidie hace 1 año
padre
commit
2f17c18c17
Se han modificado 1 ficheros con 4 adiciones y 54 borrados
  1. 4 54
      src/views/infosManage/fileIE.vue

+ 4 - 54
src/views/infosManage/fileIE.vue

@@ -76,20 +76,6 @@
                                 >{{ scope.row.file_info_ }}</el-tag>
                             </div>
                         </template>
-                        <!-- 阅览/收藏具名插槽 -->
-                        <!-- <template
-                            slot="readStatus"
-                            slot-scope="scope"
-                        >
-                            <img
-                                :src="scope.row.cy_id_ ? openFilePng : closeFilePng"
-                                style="vertical-align: middle; height: 30px;"
-                            > /
-                            <img
-                                :src="scope.row.sc_id_ ? hadColetcPng : noColectPng"
-                                style="vertical-align: middle; height: 30px;"
-                            >
-                        </template> -->
                         <template v-if="showCaoZuoColumn" slot="caozuo" slot-scope="scope">
                             <div style="color:#1E90FF; " class="hover-hand" @click="updateDate(scope)">
                                 <i class="el-icon-edit-outline" style="cursor: pointer;" />
@@ -150,29 +136,22 @@
 </template>
 <script>
 import ActionUtils from '@/utils/action'
-// import { getFileType, getFileByUserId } from '@/api/permission/file'
 import IbpsAttachment from '@/business/platform/file/attachment/selector'
 import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
 import FixHeight from '@/mixins/height'
 import IbpsTypeTree from '@/business/platform/cat/type/tree'
-// import { findTreeData } from '@/api/platform/cat/type'
 import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
 import closeFilePng from '@/assets/images/icons/closeFile.png'
 import openFilePng from '@/assets/images/icons/openFile.png'
-// import hadColetcPng from '@/assets/images/icons/hadColetc.png'
-// import noColectPng from '@/assets/images/icons/noColect.png'
 import wordPng from '@/assets/images/icons/word.png'
 import fileTraining from '@/views/component/fileTraining'
-// import column from '@/components/ibps-crud/mixin/column'
 import UpdateFile from './updateFile'
-// import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
 
 export default {
     components: {
         IbpsTypeTree,
         BpmnFormrender,
         UpdateFile,
-        // ElImageViewer,
         'ibps-attachment': IbpsAttachment,
         'file-lookup': fileTraining
     },
@@ -182,19 +161,6 @@ export default {
         const { isSuper, role, deptList = [] } = this.$store.getters || {}
         const hasRole = isSuper || role.some(r => roleList.includes(r.alias))
         const depArrs = deptList.map(i => `wj.bian_zhi_bu_men_ like '${i.positionId}'`)
-        // const depArrs = []
-        // var fileDownloadAuthority = false
-        // const { deptList, role } = this.$store.getters
-        // for (var i of deptList) {
-        //     depArrs.push(`wj.bian_zhi_bu_men_ like '${i.positionId}'`)
-        // }
-        // const roleKey = ['xtgljs', 'syszr', 'dagly', 'xxgljs']
-        // for (const i of roleKey) {
-        //     if (role.some(so => { return so.alias === i })) {
-        //         fileDownloadAuthority = true
-        //         break
-        //     }
-        // }
         return {
             isSuper,
             hasRole,
@@ -208,7 +174,6 @@ export default {
             //   rightsArr: ['join', 'delete'],
             //   rowHandle: true,
             width: 210,
-            // oldorgId: '',
             oldorgId: null,
             height: document.clientHeight,
             loading: false,
@@ -236,11 +201,6 @@ export default {
                 // 工具栏
                 toolbars: [
                     { key: 'search' }
-                    // {
-                    //     key: 'colect',
-                    //     label: '收藏或取消收藏',
-                    //     type: 'success'
-                    // }
                 ],
                 // 查询条件
                 searchForm: {
@@ -249,10 +209,6 @@ export default {
                 // 表格字段配置
                 columns: []
             },
-            //   listOptions: {
-            //     border: true,
-            //     stripe: true
-            //   },
             pagination: {
                 limit: 20, page: 1
             },
@@ -272,13 +228,10 @@ export default {
             // depArrs,
             // fileDownloadAuthority,
             closeFilePng,
-            // hadColetcPng,
-            // noColectPng,
             openFilePng,
             wordPng,
             dialogVisible: false,
             fileInfos: {},
-            // 本人修改
             fileArray: []
         }
     },
@@ -705,10 +658,10 @@ export default {
                     this.refreshData()
                     break
                 case 'remove':
-                    if (data.length === 0) {
-                        this.$message({
+                    if (!data) {
+                        return this.$message({
                             message: '请选择数据再进行删除',
-                            type: 'error'
+                            type: 'warning'
                         })
                     }
                     // eslint-disable-next-line no-case-declarations
@@ -772,9 +725,6 @@ export default {
             }
             ActionUtils.handleListData(this, this.bianlistData)
         },
-        // getScSrc (id) {
-        //     return id ? this.hadColetcPng : this.noColectPng
-        // },
         async handleColect (data) {
             const addScDatas = []
             const delIds = []
@@ -870,7 +820,7 @@ export default {
             })
         },
         handleFileInfo (val) {
-            console.log('打开文件', val)
+            // console.log('打开文件', val)
             const sql = `select * from ibps_file_attachment where id_= '${val.fu_jian_}'`
             // if (val.cao_zuo_lei_xing_ === '修订') {
             //     sql = `select * from ibps_file_attachment where id_= '${val.xiu_ding_fu_jian_}'`