Преглед на файлове

fix:修改消息确认文件发放按钮,文件查阅逻辑

liujiayin преди 2 години
родител
ревизия
b575838808
променени са 2 файла, в които са добавени 70 реда и са изтрити 74 реда
  1. 5 7
      src/views/infosManage/fileIE.vue
  2. 65 67
      src/views/platform/message/inner/detail/dialog.vue

+ 5 - 7
src/views/infosManage/fileIE.vue

@@ -167,7 +167,7 @@ export default {
         { prop: 'wen_jian_bian_hao', label: '文件编号', sortable: 'custom', width: 180 },
         { prop: 'wen_jian_ming_che', label: '文件名称', width: 400 },
         { prop: 'ban_ben_', label: '版本', width: 120 },
-        { prop: 'bian_zhi_shi_jian', label: '发布日期', width: 100, sortable: 'custom' },
+        { prop: 'fa_fang_shi_jian_', label: '发布日期', width: 100, sortable: 'custom' },
         { prop: 'fu_jian_', label: '查阅', slotName: "wenjinachayue", width: 400 }
       ]
     }
@@ -262,15 +262,13 @@ export default {
       // 重复发放的文件,在权限表会存在重复的文件信息
       //   let fileSearchSql = `select  wj.wen_jian_xi_lei_,wj.wen_jian_bian_hao,wj.wen_jian_ming_che,wj.ban_ben_,wj.wen_jian_fu_jian_ AS fu_jian_,qx.bian_zhi_shi_jian 
       //    FROM (SELECT *FROM (SELECT * FROM t_wjcysqb  ORDER BY create_time_ DESC LIMIT 99999999) a GROUP BY a.yong_hu_id_,a.wen_jian_id_) qx LEFT JOIN t_wjxxb wj ON qx.wen_jian_id_=wj.wen_jian_fu_jian_ WHERE qx.yong_hu_id_='${this.userId}' AND qx.shou_quan_='1' ${wheres1} GROUP BY qx.yong_hu_id_,qx.wen_jian_id_`
-      let selectSql = 'select wj.wen_jian_xi_lei_,wj.wen_jian_bian_hao,wj.wen_jian_ming_che,wj.ban_ben_,wj.wen_jian_fu_jian_ AS fu_jian_,wj.bian_zhi_shi_jian  from'
-      let leftJoinSql = `select wjj.xi_lei_id_,wjj.wen_jian_xi_lei_,wjj.wen_jian_bian_hao,wjj.wen_jian_ming_che,wjj.ban_ben_,wjj.wen_jian_fu_jian_ ,wjj.shi_fou_guo_shen_,ff.bian_zhi_shi_jian,wjj.bian_zhi_bu_men_ from
-        t_wjxxb wjj left join t_ffwjxx ff on wjj.id_ = ff.wen_jian_id_`
+      let selectSql = 'select wj.wen_jian_xi_lei_,wj.wen_jian_bian_hao,wj.wen_jian_ming_che,wj.ban_ben_,wj.wen_jian_fu_jian_ AS fu_jian_,wj.fa_fang_shi_jian_  from'
       // 共用文件
-      let comSql = `${selectSql} (${leftJoinSql}) wj where wj.shi_fou_guo_shen_ ='有效' ${wheres1}`
+      let comSql = `${selectSql} t_wjxxb wj where wj.shi_fou_guo_shen_ ='有效' ${wheres1}`
       // 部门权限文件
-      let buMenSql = `${selectSql}  (${leftJoinSql}) wj where wj.shi_fou_guo_shen_ ='有效' ${wheres2}`
+      let buMenSql = `${selectSql}  t_wjxxb wj where wj.shi_fou_guo_shen_ ='有效' ${wheres2}`
       // 受限文件
-      let authoritySql = `${selectSql}  t_wjcysqb qx LEFT JOIN (${leftJoinSql}) wj ON qx.wen_jian_id_=wj.wen_jian_fu_jian_ WHERE qx.yong_hu_id_='${this.userId}'  ${wheres3} `
+      let authoritySql = `${selectSql}  t_wjxxb wj WHERE wj.quan_xian_xin_xi_ like '%${this.userId}%'  ${wheres3} `
       let sqlArr = [comSql, buMenSql, authoritySql]
       let oldRecordSql = `select * FROM t_ywyxjlb wj  LEFT JOIN lh_bm_ry ry ON ry.ry_id = wj.bian_zhi_ren_ where wj.bian_zhi_ren_='${this.userId}' ${wheres1}  order by bian_zhi_shi_jian desc`
       for (var i in Object.keys(this.fileTypesDatas)) {

+ 65 - 67
src/views/platform/message/inner/detail/dialog.vue

@@ -136,74 +136,72 @@ export default {
         // 消息确认,受控文件用
         confirmMsg () {
             // TODO
-            // this.$confirm('点击确认将在系统信息管理模块查看到所通知文件的具体信息', '提示', {
-            //     confirmButtonText: '确定',
-            //     cancelButtonText: '取消',
-            //     type: 'warning',
-            //     showClose: false,
-            //     closeOnClickModal: false
-            // }).then(() => {
-            //     console.log('userInfo', this.$store.getters.userInfo)
-            //     // TODO 受控文件逻辑处理
-            //     const perInfosId = this.$store.getters.userInfo.user.id
-            //     const perInfosName = this.$store.getters.userInfo.user.name
-            //     // const perInfosorgId = this.$store.getters.userInfo.org.id
-            //     // const perInfosPositions = this.$store.getters.userInfo.positions
-
-            //     const sql = "select qian_zi_tu_wen_ FROM t_ryjbqk WHERE parent_id_ = '" + perInfosId + "'"
-            //     curdPost('sql', sql).then((ryjbqkRes) => {
-            //         const ryjbqkDatas = ryjbqkRes.variables.data
-            //         if (ryjbqkDatas.length == 0) {
-            //             alert('该人并没有签字图文在系统,请先上传系统再进行确认!')
-            //             return
-            //         }
-            //         const tempObj = {
-            //             id_: generateUUID(),
-            //             parent_id_: this.tableId,
-            //             // tong_zhi_bu_men_: this.getId(perInfosPositions),
-            //             que_ren_qian_ming: JSON.stringify([{
-            //                 id: ryjbqkDatas[0].qian_zi_tu_wen_,
-            //                 fileName: '确认签名'
-            //             }]),
-            //             que_ren_ri_qi_: this.$common.getDateNow(10),
-            //             que_ren_ren_xing_: perInfosName
-            //         }
-            //         const returnParams = {
-            //             tableName: this.tableName.slice(0, this.tableName.indexOf('(')), // 字符串 "表名(发放时间)"
-            //             paramWhere: [tempObj]
-            //         }
-            //         // 获取所发放的文件
-            //         const files = this.$refs.innerMessage.form.fileMsg
-            //         const addwjcysqbs = []
-            //         const { userId = '' } = this.$store.getters
-            //         files.split(',').forEach(i => {
-            //             const addwjcysqb = {
-            //                 yong_hu_id_: userId,
-            //                 wen_jian_id_: i,
-            //                 shou_quan_: '1',
-            //                 fa_bu_ri_qi_: this.tableName.slice(this.tableName.indexOf('(') + 1, this.tableName.lastIndexOf(')'))
-            //             }
-            //             addwjcysqbs.push(addwjcysqb)
-            //         })
-            //          curdPost('add', JSON.stringify(returnParams)).then(() => { console.log('确认接收到发放文件') }).then(
-            //             () => {
-            //             this.type = ''
-            //             this.getFormData()
-            //             }
-            //         )
+            this.$confirm('点击确认将在系统信息管理模块查看到所通知文件的具体信息', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning',
+                showClose: false,
+                closeOnClickModal: false
+            }).then(() => {
+                console.log('userInfo', this.$store.getters.userInfo)
+                // TODO 受控文件逻辑处理
+                const perInfosId = this.$store.getters.userInfo.user.id
+                const perInfosName = this.$store.getters.userInfo.user.name
+                let positionsIds = []
+                for(let i of this.$store.getters.userInfo.positions){
+                    positionsIds.push(i.id)
+                }
+                const sql = "select qian_zi_tu_wen_ FROM t_ryjbqk WHERE parent_id_ = '" + perInfosId + "'"
+                curdPost('sql', sql).then((ryjbqkRes) => {
+                    const ryjbqkDatas = ryjbqkRes.variables.data
+                    if (ryjbqkDatas.length == 0) {
+                        alert('该人并没有签字图文在系统,请先上传系统再进行确认!')
+                        return
+                    }
+                    const tempObj = {
+                        id_: generateUUID(),
+                        parent_id_: this.tableId,
+                        tong_zhi_bu_men_: positionsIds.join(','),
+                        que_ren_qian_ming: JSON.stringify([{
+                            id: ryjbqkDatas[0].qian_zi_tu_wen_,
+                            fileName: '确认签名'
+                        }]),
+                        que_ren_ri_qi_: this.$common.getDateNow(10),
+                        que_ren_ren_xing_: perInfosName
+                    }
+                    const returnParams = {
+                        tableName: this.tableName.slice(0, this.tableName.indexOf('(')), // 字符串 "表名(发放时间)"
+                        paramWhere: [tempObj]
+                    }
+                    // 获取所发放的文件
+                    // const files = this.$refs.innerMessage.form.fileMsg
+                    // const addwjcysqbs = []
+                    // const { userId = '' } = this.$store.getters
+                    // files.split(',').forEach(i => {
+                    //     const addwjcysqb = {
+                    //         yong_hu_id_: userId,
+                    //         wen_jian_id_: i,
+                    //         shou_quan_: '1',
+                    //         fa_bu_ri_qi_: this.tableName.slice(this.tableName.indexOf('(') + 1, this.tableName.lastIndexOf(')'))
+                    //     }
+                    //     addwjcysqbs.push(addwjcysqb)
+                    // })
+                     curdPost('add', JSON.stringify(returnParams)).then(() => { console.log('确认接收到发放文件') }).then(
+                        () => {
+                        this.type = ''
+                        this.getFormData()
+                        }
+                    )
 
-            //         curdPost('add',
-            //             '{"tableName": "t_wjcysqb","paramWhere":' + JSON.stringify(addwjcysqbs) + '}'
-            //         ).then(response => {
-            //             console.log(response)
-            //         }).catch(error => {
-            //         })
-            //     })
-            //     this.closeDialog()
-            // }).catch(() => { })
-             this.type = ''
-             this.closeDialog()
-             this.getFormData()
+                    // curdPost('add',
+                    //     '{"tableName": "t_wjcysqb","paramWhere":' + JSON.stringify(addwjcysqbs) + '}'
+                    // ).then(response => {
+                    //     console.log(response)
+                    // }).catch(error => {
+                    // })
+                })
+                this.closeDialog()
+            }).catch(() => { })
         },
         handleCallback (res) {
             this.$emit('callback', res)