Prechádzať zdrojové kódy

个人信息流程结束增加快照

cyy 1 týždeň pred
rodič
commit
756bf73c8a
1 zmenil súbory, kde vykonal 40 pridanie a 1 odobranie
  1. 40 1
      src/views/component/personnelFile/index.vue

+ 40 - 1
src/views/component/personnelFile/index.vue

@@ -375,6 +375,7 @@ export default {
           default:
             break
         }
+
         if (this.infoNumArr.length === 4) {
           if (this.btnType === 'submit') {
             startFlow({
@@ -494,7 +495,21 @@ export default {
       }
     },
     saveData(val, r) {
-      setInfo(val).then((res) => {
+      setInfo(val).then(async (res) => {
+        if (this.$attrs.params.attrs.flow * 1 === 3) {
+          let photo = await this.createSnapshoot(this.userId)
+          // 字段需要继续添加
+          const addParams = {
+            tableName: 't_rydakzb',
+            paramWhere: [
+              {
+                bian_zhi_ren_: this.userId,
+                kuai_zhao_: photo
+              }
+            ]
+          }
+          await this.$common.request('add', addParams)
+        }
         if (r !== 'saveWorkflow') {
           this.showTF(false)
         }
@@ -503,6 +518,30 @@ export default {
         }
       })
     },
+    async createSnapshoot(id) {
+      const { first = '' } = this.$store.getters.level
+      const url = this.$getReportFile(
+        '/人员/人员档案.rpx',
+        `id_=${id}&org_=${first}`
+      )
+      return new Promise((resolve, reject) => {
+        this.$common
+          .snapshoot({
+            url: url,
+            name:
+              this.userInfo.user.name +
+              '人员档案' +
+              this.$common.getDateNow(10),
+            type: 'pdf'
+          })
+          .then((res) => {
+            resolve(res.data.id)
+          })
+          .catch((error) => {
+            reject(error)
+          })
+      })
+    },
     changeBtn(val, data) {
       if (
         val === 'save' ||