Преглед изворни кода

风险评估与措施结束后主动生成快照

luoaoxuan пре 1 година
родитељ
комит
bfe638e0a7

+ 2 - 5
src/views/component/shiftHandover/earlyHandover.vue

@@ -836,9 +836,6 @@ export default {
         position: absolute;
         right:20px;
     }
-    // span{
-    //     margin: 0 auto;
-    // }
 }
 .container {
         display: flex;
@@ -846,7 +843,7 @@ export default {
         justify-content: center;
 
         .left{
-            height: calc(100vh - 135px);
+            height: calc(100vh - 70px);
             box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
             padding:20px 10px 0 10px;
             overflow-y: auto;
@@ -860,7 +857,7 @@ export default {
             }
         }
         .right{
-            height: calc(100vh - 135px);
+            height: calc(100vh - 70px);
             flex: 1;
             padding:20px 10px 0 10px;
             .text{

+ 2 - 2
src/views/component/trainingManage/registerInfoDialog.vue

@@ -191,7 +191,7 @@ export default {
         }
     },
     async mounted () {
-        // console.log(this.params)
+        console.log(this.params)
         await this.getAllPeople()
     },
     methods: {
@@ -282,7 +282,7 @@ export default {
                         }
                     })
                 }
-            } else if (this.params.tableName === 't_fwxyhyqdb' || this.params.tableName === 't_nshyjyb' || this.params.tableName === 't_gshyjyb') {
+            } else if (this.params.tableName === 't_fwxyhyqdb' || this.params.tableName === 't_nshyjyb' || this.params.tableName === 't_gshyjyb' || this.params.tableName === 't_jykzjbdjb') {
                 if (data[0].shi_fou_guo_shen_ !== '已完成') {
                     this.addPeople()
                 }

+ 50 - 7
src/views/platform/risk/riskV2.vue

@@ -11,6 +11,12 @@
         class="dialog paper-detail-dialog"
         top="0"
     >
+        <div slot="title" class="dialog-title">
+            <span>{{ title }}</span>
+            <div>
+                <ibps-toolbar :actions="toolbars" @action-event="handleActionEvent" />
+            </div>
+        </div>
         <div class="container">
             <div class="left" :style="{width:initWidth}">
                 <el-descriptions title="" direction="vertical" :column="5" border size="mini">
@@ -220,9 +226,6 @@
 
             </div>
         </div>
-        <div slot="footer" class="el-dialog--center">
-            <ibps-toolbar :actions="toolbars" @action-event="handleActionEvent" />
-        </div>
 
         <!-- <data-template-formrender-dialog
             :visible="DialogVisible"
@@ -372,6 +375,19 @@ export default {
         }
     },
     methods: {
+        // 快照URL
+        getReportParams (path, selection, data) {
+            const { level } = this.$store.getters
+            const str = `org_=${level.first}&second_=${level.second}&id_=`
+            const arr = path.split('&')
+            if (arr.length === 2) {
+                const fieldArr = arr[1].split('=')
+                return str + `${data[fieldArr[1]]}`
+            } else {
+            // 如果是没有传参,还是原报表路径
+                return str + `${selection}`
+            }
+        },
         // 提交
         async goSubmit () {
             if (!this.checkRequired(true)) {
@@ -396,7 +412,23 @@ export default {
                     cancelButtonText: '取消',
                     type: 'warning'
                 }).then(async () => {
-                    // 1.修改状态为已完成
+                    // 0.生成快照
+                    const formName = '风险管理/风险识别评估表V2.rpx'
+                    const res = await this.$common.snapshoot({
+                        url: this.$getReportFile(formName, this.getReportParams(formName, this.params.id_, {
+                            ...this.preParams,
+                            shi_fou_guo_shen_: '已完成'
+                        })),
+                        name: this.params.id_,
+                        type: 'pdf'
+                    })
+                    console.log(res)
+                    if (!res.data || !res.data.id) {
+                        console.log('快照生成失败')
+                    } else {
+                        console.log('快照生成成功')
+                    }
+                    // 1.修改状态为已完成 并保存快照
                     const updateParamsRecord = {
                         tableName: 't_fxpgjlb2',
                         updList: [{
@@ -404,7 +436,8 @@ export default {
                                 id_: this.params.id_
                             },
                             param: {
-                                shi_fou_guo_shen_: '已完成'
+                                shi_fou_guo_shen_: '已完成',
+                                kuai_zhao_: res.data.id
                             }
                         }]
                     }
@@ -703,6 +736,7 @@ export default {
                 }
             }
             this.msg = this.$notify({
+                offset: 50,
                 type: type,
                 title: `您有一份风险识别评估表待${status}!`,
                 message: `点击前去${status}`,
@@ -767,13 +801,13 @@ export default {
         justify-content: center;
 
         .left{
-            height: calc(100vh - 135px);
+            height: calc(100vh - 70px);
             box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
             padding:10px;
             overflow-y: auto;
         }
         .right{
-            height: calc(100vh - 135px);
+            height: calc(100vh - 70px);
             flex: 1;
             padding:10px;
             .text{
@@ -787,4 +821,13 @@ export default {
   color: red;
   margin-right: 4px;
 }
+.dialog-title{
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    div{
+        position: absolute;
+        right:20px;
+    }
+}
 </style>