Procházet zdrojové kódy

Revert "存储查看记录的关联字段改为文件修订历史的id,切换查看不同修订历史存入查看记录"

This reverts commit 596a45837d464480ae065a727ea1e364002cdd08.
shenqilong před 1 rokem
rodič
revize
af4af2ebed
1 změnil soubory, kde provedl 5 přidání a 9 odebrání
  1. 5 9
      src/views/component/fileTraining/index.vue

+ 5 - 9
src/views/component/fileTraining/index.vue

@@ -366,10 +366,6 @@ export default {
 
         toggleActive (activity, index) {
             if (this.activeIndex === index) { return }
-            // 查看成功时才保存查看记录
-            if (this.browseTime && this.browseTime > 0) {
-                this.handleUpdate(this.curFileID || this.leftData[0]?.zId, this.browseTime)
-            }
             this.activeIndex = index
             this.digData = activity
             this.fileShow(activity)
@@ -380,16 +376,16 @@ export default {
             clearInterval(this.clearTimeSet)
             this.browseTime = 0
             this.curFileName = activity.FILE_NAME_
-            this.curFileID = activity.id
+            this.curFileID = activity.zid
             this.checkNum(activity)// 阅读量
             // this.$forceUpdate()// 触发监听器
         },
         // 阅读量函数
         async checkNum (activity) {
-            // const sql = `select t_wjcyjl.* from t_wjcyjl
-            //     INNER JOIN t_wjxxb ON t_wjcyjl.parent_id_ = t_wjxxb.id_
-            //     WHERE t_wjxxb.shu_ju_lai_yuan_ = '${activity.id}' order by create_time_ desc`
-            const sql = `select * from t_wjcyjl where parent_id_= '${activity.id}' order by create_time_ desc`
+            const sql = `select t_wjcyjl.* from t_wjcyjl
+                INNER JOIN t_wjxxb ON t_wjcyjl.parent_id_ = t_wjxxb.id_
+                WHERE t_wjxxb.shu_ju_lai_yuan_ = '${activity.id}' order by create_time_ desc`
+            // const sql1 = `select * from t_wjcyjl where parent_id_= '${activity.id}' order by create_time_ desc`
             await this.$common.request('sql', sql).then((res) => {
                 const { data = [] } = res.variables || {}
                 this.lookNum = data.length