Browse Source

代办页面添加签章跳转连接

lizhenhao 2 years ago
parent
commit
6039a823db

+ 1 - 1
src/views/modules/cw/projectRecords/ProjectRecordsTaskForm.vue

@@ -443,7 +443,7 @@
       },
       async agreeForm (callback) {
         await this.projectRecordsService.queryById(this.inputForm.id).then(({data}) => {
-          if (this.inputForm.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+          if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error()
           } else {

+ 3 - 5
src/views/modules/cw/reportManagement/ReportManagementSignatureForm.vue

@@ -523,14 +523,12 @@
               this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
               // 跳转回指定页面
               if (param.num === '2') {
-                this.$router.push('/sys/dashboard/workBench/Pending')
+                this.$router.push({path: '/sys/dashboard/workBench/Pending', query: {signatureUrl: data}})
               } else if (param.num === '3') {
-                this.$router.push('/sys/dashboard/workBench/PendingList')
+                this.$router.push({path: '/sys/dashboard/workBench/PendingList', query: {signatureUrl: data}})
               } else {
-                this.$router.push('/flowable/task/TodoList')
+                this.$router.push({path: '/flowable/task/TodoList', query: {signatureUrl: data}})
               }
-              // 弹出签章页面,路径为后端返回
-              window.open(data.data, '_blank')
               this.loading = false
               throw new Error()
             }).catch(() => {

+ 16 - 0
src/views/modules/flowable/task/TodoList.vue

@@ -3,6 +3,7 @@
       <el-form size="small" :inline="true"  class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
         <el-form-item label="创建时间" prop="searchDates">
           <el-date-picker
+            placement="bottom-start"
             v-model="searchDates"
             type="daterange"
             size="small"
@@ -163,7 +164,22 @@
     created () {
       this.taskService = new TaskService()
     },
+    mounted () {
+    },
     activated () {
+      // 判断是否有签章页面带过来
+      if (this.commonJS.isNotEmpty(this.$route.query.signatureUrl)) {
+        this.$confirm(`确定要前往签章页面吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          console.log('前往签章页面')
+          window.open(this.$route.query.signatureUrl, '_blank')
+        }).catch(() => {
+          console.log('取消前往签章页面')
+        })
+      }
       this.refreshList()
     },
     components: {

+ 14 - 0
src/views/modules/sys/dashboard/workBench/Pending.vue

@@ -348,6 +348,19 @@
       this.noticeService = new NoticeService()
     },
     activated () {
+      // 判断是否有签章页面带过来
+      if (this.commonJS.isNotEmpty(this.$route.query.signatureUrl)) {
+        this.$confirm(`确定要前往签章页面吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          console.log('前往签章页面')
+          window.open(this.$route.query.signatureUrl, '_blank')
+        }).catch(() => {
+          console.log('取消前往签章页面')
+        })
+      }
       this.refreshList()
     },
     components: {
@@ -358,6 +371,7 @@
     // watch: {
     // },
     mounted () {
+      console.log('123')
       // 页面加载后
       // 1.在执行定时器前先执行一次获取接口数据的操作函数, 否则接口会1秒钟后才调用
       // 2.为了避免退出当前页面后,在其他页面也继续调用接口,退出前需要清除定时器.

+ 0 - 1
src/views/modules/sys/dashboard/workBench/PendingList.vue

@@ -37,7 +37,6 @@
     data () {
       // eslint-disable-next-line no-unused-expressions,no-unused-vars
       var num = this.$route.query.num
-      console.log(num)
       return {
         activeName: 'todoList',
         num: num