Forráskód Böngészése

更新检测档案

cfort 3 éve
szülő
commit
104f81396b

+ 96 - 25
src/views/platform/bpmn/bpmInstHis/listType/CMARecord.vue

@@ -60,9 +60,9 @@
                                 <i class="el-icon-caret-bottom"></i>查阅
                             </div>
                             <template v-for="(item ,index) in reportList">
-                                <div v-if="item.hasItem">
+                                <div v-if="item.key === 'testing'">
                                     <el-popover placement="left" width="200" trigger="click">
-                                        <div class="operate-item" slot="reference" @click="getDetail(scope.row, item.key)">
+                                        <div class="operate-item" slot="reference" @click="getTesting(scope.row.yang_pin_bian_hao)">
                                             <i class="el-icon-s-order"></i> {{item.name}}
                                         </div>
                                         <div class="three-item">
@@ -72,7 +72,24 @@
                                                 class="operate-item"
                                                 @click="consult(i)"
                                             >
-                                                {{ item.jian_ce_xiang_mu_ }}
+                                                {{ i.jian_ce_xiang_mu_ }}
+                                            </div>
+                                        </div>
+                                    </el-popover>
+                                </div>
+                                <div v-else-if="item.key === 'file'">
+                                    <el-popover placement="left" width="200" trigger="click">
+                                        <div class="operate-item" slot="reference" @click="getFile(scope.row)">
+                                            <i class="el-icon-s-order"></i> {{item.name}}
+                                        </div>
+                                        <div class="three-item">
+                                            <div
+                                                v-for="i in fileList"
+                                                :key="i.id"
+                                                class="operate-item"
+                                                @click="preview(i)"
+                                            >
+                                                {{ i.fileName }}.{{ i.ext }}
                                             </div>
                                         </div>
                                     </el-popover>
@@ -115,11 +132,20 @@
             >
             </el-pagination>
         </div>
+        <image-viewer
+            v-if="fileType === 'image'"
+            :z-index="zIndex"
+            :url-list="[fileUrl]"
+            :on-close="() => fileType = ''"
+        />
     </div>
 </template>
 
 <script>
     import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
+    import { previewFile } from '@/api/platform/file/attachment'
+    import PopupManager from '@/utils/popup'
+    import { SYSTEM_URL,BASE_API } from '@/api/baseUrl'
     const searchList = [
         {
             label: '年份',
@@ -176,7 +202,6 @@
             hasItem: true
         }
     ]
-
     // 非通用检测项目编号及报表路径
     const specialTest = [
         {
@@ -196,6 +221,7 @@
             path: '43罗湖/LHXBJY-JC-SOP-003-FQ-01 细菌内毒素检查记录表.rpx'
         }
     ]
+    const imageType = ['jpg', 'jpeg', 'bmp', 'png', 'gif']
     export default {
         filters: {
             getID (v, arr) {
@@ -206,6 +232,9 @@
                 return v ? v.slice(0, 4) : ''
             }
         },
+        components: {
+            ImageViewer: () => import('@/components/ibps-file-viewer/image')
+        },
         data () {
             return {
                 searchList,
@@ -223,22 +252,32 @@
                 },
                 tableData: [],
                 testingList: [],
+                fileList: [],
                 contractList: [],
                 trustList: [],
                 srcUrl: '',
-                globalSql: ''
+                globalSql: '',
+                fileUrl: '',
+                fileType: '',
+                zIndex: 2000,
+                fileOption: {
+                    user: {}
+                }
             }
         },
         created () {
-            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
+            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.type}'`
             // this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.type}'`
             let sql = `${this.globalSql} order by create_time_ desc limit 0,20`
             this.loadData(sql)
-            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
+            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.type}'`
             curdPost('sql', sumsql).then((response) => {
                 this.total = response.variables.data[0].total
             })
         },
+        beforeDestroy () {
+            this.fileType = ''
+        },
         methods: {
             // 请求表格数据函数
             loadData (sql) {
@@ -261,7 +300,7 @@
                     // 获取合同数据用于转换
                     let sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
                     let sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
-                    console.log(sql1, sql2)
+                    // console.log(sql1, sql2)
                     curdPost('sql', sql1).then(res1 => {
                         this.contractList = res1.variables && res1.variables.data
                     })
@@ -270,24 +309,29 @@
                     })
                 })
             },
-            getDetail (row, type) {
-                const { yang_pin_bian_hao } = row
-                // 获取检测项目数据
-                if (type === 'testing') {
-                    let sql = `select id_, xiang_mu_bian_hao, jian_ce_xiang_mu_ from t_mjjcnlfw where find_in_set(id_, (select jian_ce_xiang_mu_ from t_lhypb where yang_pin_bian_hao = '${yang_pin_bian_hao}'))`
-                    curdPost('sql', sql).then(res => {
-                        this.testingList = res.variables && res.variables.data
-                    })
-                    return
-                }
-                // 获取附件信息,委托表【fu_jian_, biao_qian_tu_pian】字段,检测总表【fu_jian_, wen_dang_fu_jian_, kuai_zhao_fu_jian】字段,报告表【bao_gao_pdf_, gai_zhang_jian_pd】字段
-                if (type === 'file') {
-                    let sql = `select `
-                }
-
+            // 获取检测项目数据
+            getTesting (v) {
+                this.testingList = []
+                let sql = `select id_, xiang_mu_bian_hao, jian_ce_xiang_mu_ from t_mjjcnlfw where find_in_set(id_, (select jian_ce_xiang_mu_ from t_lhypb where yang_pin_bian_hao = '${v}'))`
+                curdPost('sql', sql).then(res => {
+                    this.testingList = res.variables && res.variables.data
+                    // console.log(this.testingList)
+                })
+            },
+            // 获取附件信息,报告表【bao_gao_pdf_, suo_you_yuan_shi_】字段
+            getFile (row) {
+                this.fileList = []
+                const { bao_gao_pdf_, suo_you_yuan_shi_ } = row
+                let fileArr = [bao_gao_pdf_]
+                fileArr = fileArr.concat(suo_you_yuan_shi_.split(','))
+                // console.log(fileArr)
+                let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${fileArr.join(',')}')`
+                curdPost('sql', sql).then(res => {
+                    this.fileList = res.variables && res.variables.data
+                })
             },
             consult (data) {
-                let isSpecial = !!specialTest.find(i => i.id === data.xiang_mu_bian_hao)
+                let isSpecial = specialTest.find(i => i.id === data.xiang_mu_bian_hao)
                 let path = isSpecial ? isSpecial.path : '43罗湖/LHJC 检测记录.rpx'
                 this.alertReport(path, data.id_)
             },
@@ -306,7 +350,7 @@
                     }
                 })
                 let sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
-                console.log(sql)
+                // console.log(sql)
                 this.loadData(sql)
             },
             handleSizeChange (value) {
@@ -321,6 +365,33 @@
             alertReport (path, id) {
                 this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${path}&id_=${id}`
                 this.visible = true
+            },
+            // 文件预览
+            preview (file) {
+                if (imageType.includes(file.ext)) {
+                    this.zIndex = PopupManager.getZIndex()
+                    this.fileUrl = previewFile(file.id)
+                    this.fileType = 'image'
+                } else {
+                    this.getOption(file)
+                    this.openWindow()
+                    this.fileType = ''
+                }
+            },
+            getOption (file) {
+                this.fileOption.user.id = this.$store.getters.userId
+                this.fileOption.user.name = this.$store.getters.name
+                this.fileOption.url = BASE_API() + SYSTEM_URL() + `/file/download?attachmentId=${file.id}`
+                this.fileOption.editUrl = BASE_API() + SYSTEM_URL() + `/file/editCallback?fileName=${file.fileName}&fileType=${file.ext}&id=${file.id}`
+                this.fileOption.title = file.fileName
+                this.fileOption.fileType = file.ext
+            },
+            openWindow () {
+                let routeData = this.$router.resolve({
+                    path: "/fileView",
+                    query: this.fileOption
+                })
+                window.open(routeData.href);
             }
         }
     }

+ 96 - 25
src/views/platform/bpmn/bpmInstHis/listType/CNASRecord.vue

@@ -60,9 +60,9 @@
                                 <i class="el-icon-caret-bottom"></i>查阅
                             </div>
                             <template v-for="(item ,index) in reportList">
-                                <div v-if="item.hasItem">
+                                <div v-if="item.key === 'testing'">
                                     <el-popover placement="left" width="200" trigger="click">
-                                        <div class="operate-item" slot="reference" @click="getDetail(scope.row, item.key)">
+                                        <div class="operate-item" slot="reference" @click="getTesting(scope.row.yang_pin_bian_hao)">
                                             <i class="el-icon-s-order"></i> {{item.name}}
                                         </div>
                                         <div class="three-item">
@@ -72,7 +72,24 @@
                                                 class="operate-item"
                                                 @click="consult(i)"
                                             >
-                                                {{ item.jian_ce_xiang_mu_ }}
+                                                {{ i.jian_ce_xiang_mu_ }}
+                                            </div>
+                                        </div>
+                                    </el-popover>
+                                </div>
+                                <div v-else-if="item.key === 'file'">
+                                    <el-popover placement="left" width="200" trigger="click">
+                                        <div class="operate-item" slot="reference" @click="getFile(scope.row)">
+                                            <i class="el-icon-s-order"></i> {{item.name}}
+                                        </div>
+                                        <div class="three-item">
+                                            <div
+                                                v-for="i in fileList"
+                                                :key="i.id"
+                                                class="operate-item"
+                                                @click="preview(i)"
+                                            >
+                                                {{ i.fileName }}.{{ i.ext }}
                                             </div>
                                         </div>
                                     </el-popover>
@@ -115,11 +132,20 @@
             >
             </el-pagination>
         </div>
+        <image-viewer
+            v-if="fileType === 'image'"
+            :z-index="zIndex"
+            :url-list="[fileUrl]"
+            :on-close="() => fileType = ''"
+        />
     </div>
 </template>
 
 <script>
     import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
+    import { previewFile } from '@/api/platform/file/attachment'
+    import PopupManager from '@/utils/popup'
+    import { SYSTEM_URL,BASE_API } from '@/api/baseUrl'
     const searchList = [
         {
             label: '年份',
@@ -176,7 +202,6 @@
             hasItem: true
         }
     ]
-
     // 非通用检测项目编号及报表路径
     const specialTest = [
         {
@@ -196,6 +221,7 @@
             path: '43罗湖/LHXBJY-JC-SOP-003-FQ-01 细菌内毒素检查记录表.rpx'
         }
     ]
+    const imageType = ['jpg', 'jpeg', 'bmp', 'png', 'gif']
     export default {
         filters: {
             getID (v, arr) {
@@ -206,6 +232,9 @@
                 return v ? v.slice(0, 4) : ''
             }
         },
+        components: {
+            ImageViewer: () => import('@/components/ibps-file-viewer/image')
+        },
         data () {
             return {
                 searchList,
@@ -223,22 +252,32 @@
                 },
                 tableData: [],
                 testingList: [],
+                fileList: [],
                 contractList: [],
                 trustList: [],
                 srcUrl: '',
-                globalSql: ''
+                globalSql: '',
+                fileUrl: '',
+                fileType: '',
+                zIndex: 2000,
+                fileOption: {
+                    user: {}
+                }
             }
         },
         created () {
-            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
+            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.type}'`
             // this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.type}'`
             let sql = `${this.globalSql} order by create_time_ desc limit 0,20`
             this.loadData(sql)
-            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
+            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.type}'`
             curdPost('sql', sumsql).then((response) => {
                 this.total = response.variables.data[0].total
             })
         },
+        beforeDestroy () {
+            this.fileType = ''
+        },
         methods: {
             // 请求表格数据函数
             loadData (sql) {
@@ -261,7 +300,7 @@
                     // 获取合同数据用于转换
                     let sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
                     let sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
-                    console.log(sql1, sql2)
+                    // console.log(sql1, sql2)
                     curdPost('sql', sql1).then(res1 => {
                         this.contractList = res1.variables && res1.variables.data
                     })
@@ -270,24 +309,29 @@
                     })
                 })
             },
-            getDetail (row, type) {
-                const { yang_pin_bian_hao } = row
-                // 获取检测项目数据
-                if (type === 'testing') {
-                    let sql = `select id_, xiang_mu_bian_hao, jian_ce_xiang_mu_ from t_mjjcnlfw where find_in_set(id_, (select jian_ce_xiang_mu_ from t_lhypb where yang_pin_bian_hao = '${yang_pin_bian_hao}'))`
-                    curdPost('sql', sql).then(res => {
-                        this.testingList = res.variables && res.variables.data
-                    })
-                    return
-                }
-                // 获取附件信息,委托表【fu_jian_, biao_qian_tu_pian】字段,检测总表【fu_jian_, wen_dang_fu_jian_, kuai_zhao_fu_jian】字段,报告表【bao_gao_pdf_, gai_zhang_jian_pd】字段
-                if (type === 'file') {
-                    let sql = `select `
-                }
-
+            // 获取检测项目数据
+            getTesting (v) {
+                this.testingList = []
+                let sql = `select id_, xiang_mu_bian_hao, jian_ce_xiang_mu_ from t_mjjcnlfw where find_in_set(id_, (select jian_ce_xiang_mu_ from t_lhypb where yang_pin_bian_hao = '${v}'))`
+                curdPost('sql', sql).then(res => {
+                    this.testingList = res.variables && res.variables.data
+                    // console.log(this.testingList)
+                })
+            },
+            // 获取附件信息,报告表【bao_gao_pdf_, suo_you_yuan_shi_】字段
+            getFile (row) {
+                this.fileList = []
+                const { bao_gao_pdf_, suo_you_yuan_shi_ } = row
+                let fileArr = [bao_gao_pdf_]
+                fileArr = fileArr.concat(suo_you_yuan_shi_.split(','))
+                // console.log(fileArr)
+                let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${fileArr.join(',')}')`
+                curdPost('sql', sql).then(res => {
+                    this.fileList = res.variables && res.variables.data
+                })
             },
             consult (data) {
-                let isSpecial = !!specialTest.find(i => i.id === data.xiang_mu_bian_hao)
+                let isSpecial = specialTest.find(i => i.id === data.xiang_mu_bian_hao)
                 let path = isSpecial ? isSpecial.path : '43罗湖/LHJC 检测记录.rpx'
                 this.alertReport(path, data.id_)
             },
@@ -306,7 +350,7 @@
                     }
                 })
                 let sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
-                console.log(sql)
+                // console.log(sql)
                 this.loadData(sql)
             },
             handleSizeChange (value) {
@@ -321,6 +365,33 @@
             alertReport (path, id) {
                 this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${path}&id_=${id}`
                 this.visible = true
+            },
+            // 文件预览
+            preview (file) {
+                if (imageType.includes(file.ext)) {
+                    this.zIndex = PopupManager.getZIndex()
+                    this.fileUrl = previewFile(file.id)
+                    this.fileType = 'image'
+                } else {
+                    this.getOption(file)
+                    this.openWindow()
+                    this.fileType = ''
+                }
+            },
+            getOption (file) {
+                this.fileOption.user.id = this.$store.getters.userId
+                this.fileOption.user.name = this.$store.getters.name
+                this.fileOption.url = BASE_API() + SYSTEM_URL() + `/file/download?attachmentId=${file.id}`
+                this.fileOption.editUrl = BASE_API() + SYSTEM_URL() + `/file/editCallback?fileName=${file.fileName}&fileType=${file.ext}&id=${file.id}`
+                this.fileOption.title = file.fileName
+                this.fileOption.fileType = file.ext
+            },
+            openWindow () {
+                let routeData = this.$router.resolve({
+                    path: "/fileView",
+                    query: this.fileOption
+                })
+                window.open(routeData.href);
             }
         }
     }

+ 96 - 25
src/views/platform/bpmn/bpmInstHis/listType/FEIRecord.vue

@@ -60,9 +60,9 @@
                                 <i class="el-icon-caret-bottom"></i>查阅
                             </div>
                             <template v-for="(item ,index) in reportList">
-                                <div v-if="item.hasItem">
+                                <div v-if="item.key === 'testing'">
                                     <el-popover placement="left" width="200" trigger="click">
-                                        <div class="operate-item" slot="reference" @click="getDetail(scope.row, item.key)">
+                                        <div class="operate-item" slot="reference" @click="getTesting(scope.row.yang_pin_bian_hao)">
                                             <i class="el-icon-s-order"></i> {{item.name}}
                                         </div>
                                         <div class="three-item">
@@ -72,7 +72,24 @@
                                                 class="operate-item"
                                                 @click="consult(i)"
                                             >
-                                                {{ item.jian_ce_xiang_mu_ }}
+                                                {{ i.jian_ce_xiang_mu_ }}
+                                            </div>
+                                        </div>
+                                    </el-popover>
+                                </div>
+                                <div v-else-if="item.key === 'file'">
+                                    <el-popover placement="left" width="200" trigger="click">
+                                        <div class="operate-item" slot="reference" @click="getFile(scope.row)">
+                                            <i class="el-icon-s-order"></i> {{item.name}}
+                                        </div>
+                                        <div class="three-item">
+                                            <div
+                                                v-for="i in fileList"
+                                                :key="i.id"
+                                                class="operate-item"
+                                                @click="preview(i)"
+                                            >
+                                                {{ i.fileName }}.{{ i.ext }}
                                             </div>
                                         </div>
                                     </el-popover>
@@ -115,11 +132,20 @@
             >
             </el-pagination>
         </div>
+        <image-viewer
+            v-if="fileType === 'image'"
+            :z-index="zIndex"
+            :url-list="[fileUrl]"
+            :on-close="() => fileType = ''"
+        />
     </div>
 </template>
 
 <script>
     import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
+    import { previewFile } from '@/api/platform/file/attachment'
+    import PopupManager from '@/utils/popup'
+    import { SYSTEM_URL,BASE_API } from '@/api/baseUrl'
     const searchList = [
         {
             label: '年份',
@@ -176,7 +202,6 @@
             hasItem: true
         }
     ]
-
     // 非通用检测项目编号及报表路径
     const specialTest = [
         {
@@ -196,6 +221,7 @@
             path: '43罗湖/LHXBJY-JC-SOP-003-FQ-01 细菌内毒素检查记录表.rpx'
         }
     ]
+    const imageType = ['jpg', 'jpeg', 'bmp', 'png', 'gif']
     export default {
         filters: {
             getID (v, arr) {
@@ -206,6 +232,9 @@
                 return v ? v.slice(0, 4) : ''
             }
         },
+        components: {
+            ImageViewer: () => import('@/components/ibps-file-viewer/image')
+        },
         data () {
             return {
                 searchList,
@@ -223,22 +252,32 @@
                 },
                 tableData: [],
                 testingList: [],
+                fileList: [],
                 contractList: [],
                 trustList: [],
                 srcUrl: '',
-                globalSql: ''
+                globalSql: '',
+                fileUrl: '',
+                fileType: '',
+                zIndex: 2000,
+                fileOption: {
+                    user: {}
+                }
             }
         },
         created () {
-            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
+            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.type}'`
             // this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.type}'`
             let sql = `${this.globalSql} order by create_time_ desc limit 0,20`
             this.loadData(sql)
-            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
+            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.type}'`
             curdPost('sql', sumsql).then((response) => {
                 this.total = response.variables.data[0].total
             })
         },
+        beforeDestroy () {
+            this.fileType = ''
+        },
         methods: {
             // 请求表格数据函数
             loadData (sql) {
@@ -261,7 +300,7 @@
                     // 获取合同数据用于转换
                     let sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
                     let sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
-                    console.log(sql1, sql2)
+                    // console.log(sql1, sql2)
                     curdPost('sql', sql1).then(res1 => {
                         this.contractList = res1.variables && res1.variables.data
                     })
@@ -270,24 +309,29 @@
                     })
                 })
             },
-            getDetail (row, type) {
-                const { yang_pin_bian_hao } = row
-                // 获取检测项目数据
-                if (type === 'testing') {
-                    let sql = `select id_, xiang_mu_bian_hao, jian_ce_xiang_mu_ from t_mjjcnlfw where find_in_set(id_, (select jian_ce_xiang_mu_ from t_lhypb where yang_pin_bian_hao = '${yang_pin_bian_hao}'))`
-                    curdPost('sql', sql).then(res => {
-                        this.testingList = res.variables && res.variables.data
-                    })
-                    return
-                }
-                // 获取附件信息,委托表【fu_jian_, biao_qian_tu_pian】字段,检测总表【fu_jian_, wen_dang_fu_jian_, kuai_zhao_fu_jian】字段,报告表【bao_gao_pdf_, gai_zhang_jian_pd】字段
-                if (type === 'file') {
-                    let sql = `select `
-                }
-
+            // 获取检测项目数据
+            getTesting (v) {
+                this.testingList = []
+                let sql = `select id_, xiang_mu_bian_hao, jian_ce_xiang_mu_ from t_mjjcnlfw where find_in_set(id_, (select jian_ce_xiang_mu_ from t_lhypb where yang_pin_bian_hao = '${v}'))`
+                curdPost('sql', sql).then(res => {
+                    this.testingList = res.variables && res.variables.data
+                    // console.log(this.testingList)
+                })
+            },
+            // 获取附件信息,报告表【bao_gao_pdf_, suo_you_yuan_shi_】字段
+            getFile (row) {
+                this.fileList = []
+                const { bao_gao_pdf_, suo_you_yuan_shi_ } = row
+                let fileArr = [bao_gao_pdf_]
+                fileArr = fileArr.concat(suo_you_yuan_shi_.split(','))
+                // console.log(fileArr)
+                let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${fileArr.join(',')}')`
+                curdPost('sql', sql).then(res => {
+                    this.fileList = res.variables && res.variables.data
+                })
             },
             consult (data) {
-                let isSpecial = !!specialTest.find(i => i.id === data.xiang_mu_bian_hao)
+                let isSpecial = specialTest.find(i => i.id === data.xiang_mu_bian_hao)
                 let path = isSpecial ? isSpecial.path : '43罗湖/LHJC 检测记录.rpx'
                 this.alertReport(path, data.id_)
             },
@@ -306,7 +350,7 @@
                     }
                 })
                 let sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
-                console.log(sql)
+                // console.log(sql)
                 this.loadData(sql)
             },
             handleSizeChange (value) {
@@ -321,6 +365,33 @@
             alertReport (path, id) {
                 this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${path}&id_=${id}`
                 this.visible = true
+            },
+            // 文件预览
+            preview (file) {
+                if (imageType.includes(file.ext)) {
+                    this.zIndex = PopupManager.getZIndex()
+                    this.fileUrl = previewFile(file.id)
+                    this.fileType = 'image'
+                } else {
+                    this.getOption(file)
+                    this.openWindow()
+                    this.fileType = ''
+                }
+            },
+            getOption (file) {
+                this.fileOption.user.id = this.$store.getters.userId
+                this.fileOption.user.name = this.$store.getters.name
+                this.fileOption.url = BASE_API() + SYSTEM_URL() + `/file/download?attachmentId=${file.id}`
+                this.fileOption.editUrl = BASE_API() + SYSTEM_URL() + `/file/editCallback?fileName=${file.fileName}&fileType=${file.ext}&id=${file.id}`
+                this.fileOption.title = file.fileName
+                this.fileOption.fileType = file.ext
+            },
+            openWindow () {
+                let routeData = this.$router.resolve({
+                    path: "/fileView",
+                    query: this.fileOption
+                })
+                window.open(routeData.href);
             }
         }
     }