Procházet zdrojové kódy

删除选中判定优化,去除部分无用逻辑

cfort před 1 rokem
rodič
revize
c3d392e230
1 změnil soubory, kde provedl 6 přidání a 23 odebrání
  1. 6 23
      src/views/infosManage/fileIE.vue

+ 6 - 23
src/views/infosManage/fileIE.vue

@@ -131,8 +131,6 @@
             :son-data="sonData"
             @getcolse="getcolse"
         />
-        <!-- 图片查阅 -->
-        <!-- <el-image-viewer v-if="picture" :on-close="closeViewer" :url-list="[FlowPic]" /> -->
     </div>
 </template>
 <script>
@@ -265,16 +263,13 @@ export default {
                 { prop: 'wen_jian_ming_che', label: '文件名称' }
             ]
             this.listConfig.columns = [
-                // { prop: 'status', label: '阅览 / 收藏', slotName: 'readStatus', width: 100 },
                 // { prop: 'wen_jian_xi_lei_', label: '文件细类', sortable: 'custom', minWidth: 100 },
                 { prop: 'wen_jian_bian_hao', label: '文件编号', sortable: 'custom', width: 150 },
                 { prop: 'wen_jian_ming_che', label: '文件名称', minWidth: 150 },
                 { prop: 'ban_ben_', label: '版本', width: 65 },
                 { prop: 'file_info_', label: '查阅', slotName: 'wenjinachayue', minWidth: 150 },
                 { prop: 'fa_fang_shi_jian_', label: '发布日期', sortable: 'custom', width: 150 },
-                // { prop: 'read', label: '阅览状态', slotName: 'readStatus', minWidth: 60 },
-                // { prop: 'collect', label: '收藏状态', slotName: 'collectStatus', minWidth: 60 },
-                { prop: 'cha_yue_jie_zhi_s', label: '查阅截止时间', sortable: 'custom', width: 150 }
+                { prop: 'cha_yue_jie_zhi_s', label: '查阅截止时间', sortable: 'custom', minWidth: 120 }
             ]
         }
         if (this.$route.name === 'wjkzgl-ywyxjlsc' || this.$route.name === 'ywtxyxjl') {
@@ -638,10 +633,10 @@ export default {
                     this.refreshData()
                     break
                 case 'remove':
-                    if (!data) {
-                        return this.$message({
+                    if (!data || !data.length) {
+                        this.$message({
                             message: '请选择数据再进行删除',
-                            type: 'warning'
+                            type: 'error'
                         })
                     }
                     // eslint-disable-next-line no-case-declarations
@@ -680,8 +675,8 @@ export default {
             }
         },
         /**
-         * 处理排序
-         */
+        * 处理排序
+        */
         handleSortChange (sort) {
             this.sqlWhere.sorts = sort
             this.getDatas()
@@ -740,17 +735,6 @@ export default {
             this.refreshData()
         },
         handleClickTag (val) {
-            // 查看图片
-            // const type = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']
-            // const isPower = type.includes(val.ext_)
-            // if (isPower) {
-            //     const { baseApi } = this.$store.getters || {}
-            //     const baseUrl = baseApi.replace(/^(https?:\/\/[^\/]+)\/?.*/, '$1/') || baseApi + '/'
-            //     this.picture = true
-            //     this.FlowPic = baseUrl + val.file_path_
-            //     return
-            // }
-            // const sql = `select * from ibps_file_attachment where id_= '${val.fu_jian_}'`
             // this.$common.request('sql', sql).then(res => {
             //     console.log('res', res)
             //     this.fileInfos = {}
@@ -771,7 +755,6 @@ export default {
             const sql = `select w.* FROM t_wjxzxdjlb w JOIN (select zuo_fei_cao_zuo_ FROM t_wjxzxdjlb WHERE id_ = (select shu_ju_lai_yuan_ FROM t_wjxxb WHERE id_ = '${val.id}') and zuo_fei_cao_zuo_ IS NOT NULL and zuo_fei_cao_zuo_!='' ) sub ON w.zuo_fei_cao_zuo_ = sub.zuo_fei_cao_zuo_ where w.zuo_fei_cao_zuo_ IS NOT NULL and w.zuo_fei_cao_zuo_!=''and w.shi_fou_guo_shen_='已完成' `
             this.$common.request('sql', sql).then(res => {
                 const list = res.variables.data
-                // console.log('list123', list)
                 list.forEach(el => {
                     const obj = {
                         zId: val.id,