Bladeren bron

Merge branch 'FuYong' of http://119.23.210.103:3000/wy/zdqy_firm_former into FuYong

cfort 1 jaar geleden
bovenliggende
commit
f4562e84cf

+ 4 - 1
src/business/platform/file/attachment/selector.vue

@@ -37,6 +37,7 @@
                 :file="attachment"
                 :visible="filePreviewVisible"
                 :option-file="optionFileView"
+                :file-list="fileList"
                 @close="visible => filePreviewVisible = visible"
             />
         </div>
@@ -173,7 +174,8 @@ export default {
             showFile: false,
             file: '',
             optionFile: {},
-            optionFileView: {}
+            optionFileView: {},
+            fileList: []
         }
     },
     computed: {
@@ -551,6 +553,7 @@ export default {
             this.optionFileView.data = this.attachment // 记录编制的位置,需要替换。
             this.optionFileView.data.index = index
             this.filePreviewVisible = true
+            this.fileList = this.multiple ? this.selectorValue : [this.selectorValue]
         },
         /**
          *  确定

+ 11 - 1
src/business/platform/file/file-preview/index.vue

@@ -3,6 +3,7 @@
         :visible.sync="dialogVisible"
         :title="title"
         :url="url"
+        :url-list="urlList"
         :option-file="optionFile"
         :file-ext="fileExt"
         @close="$emit('close', false)"
@@ -11,6 +12,8 @@
 <script>
 import IbpsFileViewer from '@/components/ibps-file-viewer'
 import { previewFile } from '@/api/platform/file/attachment'
+import { imageType } from '@/components/ibps-file-viewer/constants/index.js'
+
 export default {
     components: {
         IbpsFileViewer
@@ -28,6 +31,10 @@ export default {
             default: () => {
                 return {}
             }
+        },
+        fileList: {
+            type: Array,
+            default: () => []
         }
     },
     data () {
@@ -37,7 +44,8 @@ export default {
             fileId: '',
             fileExt: '',
             fileType: '',
-            url: ''
+            url: '',
+            urlList: []
         }
     },
     watch: {
@@ -49,6 +57,8 @@ export default {
                     this.fileId = this.file.id
                     this.fileExt = this.file.ext
                     this.url = previewFile(this.file.id) || ''
+                    // 过滤出图片url
+                    this.urlList = this.fileList.filter(i => imageType.includes(i.ext)).map(ii => previewFile(ii.id) || '') || []
                 }
             },
             immediate: true

+ 14 - 1
src/components/ibps-file-viewer/index.vue

@@ -3,8 +3,9 @@
         <image-viewer
             v-if="fileType === 'image'"
             :z-index="zIndex"
-            :url-list="[url]"
+            :url-list="imgList"
             :on-close="closeDialog"
+            :initial-index="imgIndex"
         />
         <template v-if="fileType !== 'image' && fileType">
             <el-dialog
@@ -79,6 +80,10 @@ export default {
         file: {
             type: String,
             require: ''
+        },
+        urlList: {
+            type: Array,
+            default: () => []
         }
     },
     data () {
@@ -103,6 +108,14 @@ export default {
             }
         }
     },
+    computed: {
+        imgList () {
+            return this.urlList.length > 0 ? this.urlList : [this.url]
+        },
+        imgIndex () {
+            return this.urlList.length > 0 ? this.urlList.indexOf(this.url) : 0
+        }
+    },
     watch: {
         optionFile: {
             handler: function (val, oldVal) {

+ 17 - 9
src/views/component/qrcodeedDialog.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <el-dialog
-            title="扫码签到"
+            :title="title"
             :visible.sync="dialogVisible"
             :close-on-click-modal="false"
             :close-on-press-escape="false"
@@ -40,13 +40,21 @@ export default {
         type: {
             type: String,
             default: ''
+        },
+        title: {
+            type: String,
+            default: '扫码签到'
+        },
+        prefixUrl: {
+            type: String,
+            default: ''
         }
     },
     data () {
         return {
             qrCode: '',
             dialogVisible: this.visible,
-            url:'http://192.168.2.16:8080/',
+            url: 'http://192.168.2.16:8080/'
         }
     },
     // mounted () {
@@ -54,18 +62,18 @@ export default {
     //         this.qrcodeRender()
     //     })
     // },
-    watch:{
+    watch: {
         dialogVisible: {
-            handler: function(val, oldVal) {
-                if(val == true){
+            handler: function (val, oldVal) {
+                if (val === true) {
                     this.$nextTick(() => {
                         this.qrcodeRender()
                     })
                 }
             },
-            deep:true,
-            immediate:true
-        },
+            deep: true,
+            immediate: true
+        }
     },
     methods: {
         downloadCode () {
@@ -83,7 +91,7 @@ export default {
                 width: 200,
                 height: 200,
                 // text: `${this.url}h5/#/pages/signin/signin?codeId=${this.codeId}`,
-                text: `${PUBLIC_URL}#/bpmn/siginin/index?codeId=${this.codeId}&type=${this.type}`,
+                text: `${PUBLIC_URL}#/bpmn${this.prefixUrl || '/siginin/index'}?codeId=${this.codeId}&type=${this.type}`,
                 // text: `http://demo2.local/#/bpmn/siginin/index?codeId=${this.codeId}&type=${this.type}`,
                 colorDark: '#000000', // 前景色
                 colorLight: '#FFFFFF', // 背景色

+ 9 - 13
src/views/component/reagent/reagentChange.vue

@@ -183,21 +183,17 @@ export default {
                 if (this.formData.zuJianShuJu) {
                     const data = JSON.parse(this.formData.zuJianShuJu)
                     this.spanLength = data[1] || 0
-                    if (val.length && this.reagentData.length <= 0) {
-                        const arry = []
-                        val.forEach(item => {
-                            arry.push({ jyxm: item.jianCeXiangMu, nd: item.nongDu, ypbh: item.biaoBenHao, jsjcdjg: item.jiuJieGuo, xsjcdjg: item.xinJieGuo, pq: item.jieGuo, fhl: item.biaoZhun, sfxf: item.xiangFu, jl: item.jieLun, xdfw: item.zuiXiaoFanWei, xmfhl: item.xiangMuFuHeLv, sjcz: item.shiJiChaZhi, yxpq: item.yunXuPianYi })
-                        })
-                        setTimeout(() => {
-                            this.reagentData = arry
-                            this.$nextTick(() => {
-                                this.$refs.reagent && this.$refs.reagent.$forceUpdate()
-                            })
-                        })
-                    }
+                }
+                if (val.length && this.reagentData.length <= 0) {
+                    const arry = []
+                    val.forEach(item => {
+                        arry.push({ jyxm: item.jianCeXiangMu, nd: item.nongDu, ypbh: item.biaoBenHao, jsjcdjg: item.jiuJieGuo, xsjcdjg: item.xinJieGuo, pq: item.jieGuo, fhl: item.biaoZhun, sfxf: item.xiangFu, jl: item.jieLun, xdfw: item.zuiXiaoFanWei, xmfhl: item.xiangMuFuHeLv, sjcz: item.shiJiChaZhi, yxpq: item.yunXuPianYi })
+                    })
+                    this.reagentData = arry
                 }
             },
-            deep: true
+            deep: true,
+            immediate: true
         },
         'formData.fangAn': {
             handler (val) {

+ 2 - 1
src/views/component/reagentQualitative/reagentQualitative.vue

@@ -103,7 +103,8 @@ export default {
                 if (value && value.length) {
                     this.reagentBatchData = value
                 }
-            }
+            },
+            immediate: true
         },
         reagentBatchData: {
             handler (value, old) {

+ 32 - 35
src/views/platform/risk/riskV2.vue

@@ -516,47 +516,44 @@ export default {
                         console.log(addParams)
                         if (addParams.paramWhere.length) {
                             await this.$common.request('add', addParams)
-                            // 3.推送给组长 评估报告流程
-                            const addParams2 = {
-                                tableName: 't_fxkzbg',
-                                paramWhere: [{
-                                    di_dian_: this.level,
-                                    shi_fou_guo_shen_: '已编制',
-                                    bian_zhi_ren_: this.infoFxssbData.zu_chang_id_,
-                                    bian_zhi_bu_men_: this.getPersonPosition(this.infoFxssbData.zu_chang_id_),
-                                    bian_zhi_shi_jian: dayjs().format('YYYY-MM-DD HH:mm'),
-                                    zu_chang_: this.infoFxssbData.zu_chang_,
-                                    zu_chang_id_: this.infoFxssbData.zu_chang_id_,
-                                    feng_xian_lei_xin: this.infoFxssbData.feng_xian_lei_xin,
-                                    kai_shi_ri_qi_: this.infoFxssbData.kai_shi_ri_qi_,
-                                    jie_shu_ri_qi_: this.infoFxssbData.jie_shu_ri_qi_,
-                                    wan_cheng_ri_qi_: this.infoFxssbData.bao_gao_shi_jian_,
-                                    shi_wu_shuo_ming_: this.infoFxssbData.shi_wu_shuo_ming_,
-                                    ji_hua_bian_hao_: this.infoFxssbData.ji_hua_bian_hao_,
-                                    hui_yi_wen_jian_: this.infoFxssbData.hui_yi_fu_jian_
-                                }],
-                                formKey: 'fxbg',
-                                defKey: 'Process_0mrlsj7'
-                            }
-                            console.log(addParams2)
-                            await this.$common.request('add', addParams2)
-                            console.log('流程推送成功')
+                            console.log('改进流程推送成功')
                         } else {
                             console.log('无需推送')
                         }
 
+                        // 3.推送给组长 评估报告流程
+                        const addParams2 = {
+                            tableName: 't_fxkzbg',
+                            paramWhere: [{
+                                di_dian_: this.level,
+                                shi_fou_guo_shen_: '已编制',
+                                bian_zhi_ren_: this.infoFxssbData.zu_chang_id_,
+                                bian_zhi_bu_men_: this.getPersonPosition(this.infoFxssbData.zu_chang_id_),
+                                bian_zhi_shi_jian: dayjs().format('YYYY-MM-DD HH:mm'),
+                                zu_chang_: this.infoFxssbData.zu_chang_,
+                                zu_chang_id_: this.infoFxssbData.zu_chang_id_,
+                                feng_xian_lei_xin: this.infoFxssbData.feng_xian_lei_xin,
+                                kai_shi_ri_qi_: this.infoFxssbData.kai_shi_ri_qi_,
+                                jie_shu_ri_qi_: this.infoFxssbData.jie_shu_ri_qi_,
+                                wan_cheng_ri_qi_: this.infoFxssbData.bao_gao_shi_jian_,
+                                shi_wu_shuo_ming_: this.infoFxssbData.shi_wu_shuo_ming_,
+                                ji_hua_bian_hao_: this.infoFxssbData.ji_hua_bian_hao_,
+                                hui_yi_wen_jian_: this.infoFxssbData.hui_yi_fu_jian_
+                            }],
+                            formKey: 'fxbg',
+                            defKey: 'Process_0mrlsj7'
+                        }
+                        console.log('报告流程推送成功')
+                        await this.$common.request('add', addParams2)
+
                         this.$message.success('提交成功')
                         // 提醒用户推送信息
-                        if (addParams.paramWhere.length) {
-                            this.$alert(`需要改进项${addParams.paramWhere.length}条,已向其中的每位措施制定人推送风险改进流程,同时向组长 ${this.infoFxssbData.zu_chang_} 推送风险报告流程!`, '提交成功', {
-                                confirmButtonText: '确定',
-                                callback: action => {
-                                    this.closeDialog(true)
-                                }
-                            })
-                        } else {
-                            this.closeDialog(true)
-                        }
+                        this.$alert(`需要改进项${addParams.paramWhere.length}条,已向其中的每位措施制定人推送风险改进流程,同时向组长 ${this.infoFxssbData.zu_chang_} 推送风险报告流程!`, '提交成功', {
+                            confirmButtonText: '确定',
+                            callback: action => {
+                                this.closeDialog(true)
+                            }
+                        })
                     } else {
                         this.$message.warning('存在未完成风险识别项的评估人员,无法提交!')
                         return