Browse Source

文件查阅(快速切换),阅读时长异常的解决

lidie 1 year ago
parent
commit
1971e97571
2 changed files with 18 additions and 19 deletions
  1. 14 18
      src/views/component/fileTraining/index.vue
  2. 4 1
      src/views/infosManage/fileIE.vue

+ 14 - 18
src/views/component/fileTraining/index.vue

@@ -60,13 +60,8 @@
                             :type="index === activeIndex ? type : ''"
                             @click.stop.native="toggleActive(activity, index)"
                         >
-                            <!-- <div>
-                                <el-tooltip class="item" effect="dark" placement="right-end" :content="showContent(activity,index)">
-                                    <div>版本号:{{ activity.ban_ben_ }}/修订人:{{ activity.fileInfos.CREATOR_NAME_ }}==={{ activity.bian_zhi_ren_ }}</div>
-                                </el-tooltip>
-                            </div> -->
                             <div>
-                                <el-tooltip class="item" effect="dark" placement="right-end" :content="showContent(activity,index)">
+                                <el-tooltip class="itemStyle" effect="dark" placement="right-end" :content="showContent(activity,index)">
                                     <div>版本号:{{ activity.ban_ben_ }}/修订人:{{ getUserName(activity.bian_zhi_ren_) }}</div>
                                 </el-tooltip>
                             </div>
@@ -254,7 +249,6 @@ export default {
         this.checkDialogBody()
     },
     methods: {
-
         getUserName (data) {
             const user = this.userList.find(item => item.userId === data)
             return user ? user.userName : '未知用户'
@@ -263,9 +257,6 @@ export default {
             if (activity.cao_zuo_lei_xing_ === '新增') {
                 return '第一版本'
             }
-            // if (index <= 0) {
-            //     return '第一版'
-            // }
             return activity.xiu_ding_nei_rong ? activity.xiu_ding_nei_rong : '无修订原因'
         },
 
@@ -278,6 +269,7 @@ export default {
         },
 
         closeDialog () {
+            this.$emit('colseVisible', false)
             const fvView = this.$refs.fvView
             // 销毁子组件方法
             fvView.destoryZiComponent()
@@ -290,13 +282,14 @@ export default {
                 clearInterval(this.clearTimeSet)
                 this.clearTimeSet = null
             }
+            this.leftShow = true
             this.out = false
             this.browseTime = 0
-            this.curFileName = ''// 本人添加
-            this.lookNum = null
-            this.showList = []
-            this.leftData = []
-            this.digData = null
+            // this.curFileName = ''// 本人添加
+            // this.lookNum = null
+            // this.showList = []
+            // this.leftData = []
+            // this.digData = null
         },
         hadLoadedFile (v) {
             this.setBrowseTime()
@@ -422,9 +415,9 @@ export default {
                 type: 'warning'
             })
         },
-        closeDialog1 (val) {
-            this.innerVisible = val
-        },
+        // closeDialog1 (val) {
+        //     this.innerVisible = val
+        // },
         updateFile () {
             const a = document.createElement('a')
             a.href = this.optionFile.url
@@ -531,6 +524,9 @@ export default {
         .file-type-txt {
             height: calc(88vh) !important;
         }
+        .itemStyle:hover{
+            cursor: pointer;
+        }
     }
     .left-content{
         padding-top: 2%;

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

@@ -137,6 +137,7 @@
                 v-if="dialogVisible"
                 :visible="dialogVisible"
                 :file-infos="fileArray"
+                @colseVisible="colseVisible"
             />
         </div>
         <UpdateFile
@@ -328,6 +329,9 @@ export default {
     },
     mounted () { },
     methods: {
+        colseVisible (val) {
+            this.dialogVisible = val
+        },
         getcolse () {
             this.dialogFormVisibles = false
         },
@@ -729,7 +733,6 @@ export default {
             //     this.fileInfos = { id: val.id, FILE_NAME_: val.wen_jian_ming_che, fileInfos: data[0], func: this.handleUpdate, ban_ben_: val.ban_ben_ }
             //     this.dialogVisible = true
             // 本人修改
-            // console.log('文件修订', val)
             this.fileArray = []
             // this.handleFileInfo(val)
             const sql1 = `select t_wjxxb.*, t_wjxzxdjlb.xiu_ding_ban_ben_, t_wjxzxdjlb.xiu_ding_nei_rong,t_wjxzxdjlb.yuan_yin_