申请人:
@@ -127,7 +274,7 @@
- {{ item.approvalOpinion || "暂无意见" }}
+ {{ item.approvalOpinion || "暂无意见" }}
审批结果:
@@ -290,6 +437,7 @@
import { getOwnInfo, getEnlistmentReserve, delEnlistmentReserve, addEnlistmentReserve, updateEnlistmentReserve } from "@/api/routine/enlistmentReserve/enlistmentReserve";
import { batchAddEnlistmentReserveAttach } from "@/api/routine/enlistmentReserve/enlistmentReserveAttach";
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
+import { flowRecord } from '@/api/flowable/finished'
export default {
name: 'EnlistmentReserveForm',
dicts: ['rt_nation'],
@@ -363,7 +511,28 @@ export default {
},
roleGroup: '',
user: null,
- currentId: null // 用于存储当前接收的 id
+ currentId: null, // 用于存储当前接收的 id
+ type: null, // 用于存储当前接收的 type
+ deployId: null, // 用于存储当前接收的 deployId
+ flowRecordList: [], // 流程流转数据
+ //打印
+ printobj: {
+ id: 'enlistmentReserve',
+ popTitle: '打印', // 打印配置页上方标题
+ extraHead: '', //最上方的头部文字,附加在head标签上的额外标签,使用逗号分隔
+ preview: '', // 是否启动预览模式,默认是false(开启预览模式,可以先预览后打印)
+ previewTitle: '', // 打印预览的标题(开启预览模式后出现),
+ previewPrintBtnLabel: '', // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
+ zIndex: '', // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面)
+ previewBeforeOpenCallback() {}, //预览窗口打开之前的callback(开启预览模式调用)
+ previewOpenCallback() {}, // 预览窗口打开之后的callback(开启预览模式调用)
+ beforeOpenCallback() {}, // 开启打印前的回调事件
+ openCallback() {}, // 调用打印之后的回调事件
+ closeCallback() {}, //关闭打印的回调事件(无法确定点击的是确认还是取消)
+ url: '',
+ standard: '',
+ extraCss: '',
+ },
};
},
watch: {
@@ -381,6 +550,7 @@ export default {
immediate: true, // 初始化时立即执行一次
handler(newId, oldId) {
if (newId) {
+ this.loading = true;
this.currentId = newId;
// 调用接口加载数据
getEnlistmentReserve(this.currentId).then(res => {
@@ -413,6 +583,28 @@ export default {
this.getUser()
}
}
+ },
+ "$route.query.type": {
+ immediate: true, // 初始化时立即执行一次
+ handler(newId, oldId) {
+ if (newId) {
+ this.type = newId
+ } else {
+ this.type = null
+ }
+ }
+ },
+ "$route.query.deployId": {
+ immediate: true, // 初始化时立即执行一次
+ handler(newId, oldId) {
+ if (newId) {
+ this.deployId = newId
+ // 获取流程记录
+ this.getFlowRecordList()
+ } else {
+ this.deployId = null
+ }
+ }
}
},
mounted() {
@@ -441,6 +633,44 @@ export default {
}
})
},
+ setIcon(val) {
+ if (val) {
+ return 'el-icon-check'
+ } else {
+ return 'el-icon-time'
+ }
+ },
+ setColor(val) {
+ if (val) {
+ return '#2bc418'
+ } else {
+ return '#b3bdbb'
+ }
+ },
+ /** 流程流转记录 */
+ getFlowRecordList() {
+ let procInsId = this.formData.processInstanceId ? this.formData.processInstanceId : this.$route.query.processInstanceId
+ let deployId = this.deployId ? this.deployId : this.$route.query.deployId
+ const that = this
+ const params = { procInsId: procInsId, deployId: deployId }
+ flowRecord(params)
+ .then((res) => {
+ that.flowRecordList = res.data.flowList
+ this.loading = false
+ })
+ .catch((res) => {
+ this.loading = false
+ this.goBack()
+ })
+ },
+ goBack() {
+ // 关闭当前标签页并返回上个页面
+ // const obj = { path: 'disciplinaryApplication', query: { t: Date.now() } }
+ // this.$tab.closeOpenPage(obj)
+ this.$router.back()
+ // 关闭窗体 index 当前层索引
+ this.$tab.closePage()
+ },
submitForm(applyStatus) {
this.$refs.formRef.validate((valid) => {
this.loading = true;
@@ -454,7 +684,7 @@ export default {
this.formData.applyStatus = applyStatus;
this.formData.updateTime = new Date().toISOString().split('T')[0];
this.formData.applyReason = "本人应征入伍,申请保留学籍从 " + this.formData.reserveStartDate + " 至退役后两年。"
-
+
const submitData = {
formData: this.formData,
@@ -548,7 +778,7 @@ export default {
this.$message.warning('该文件已添加,请勿重复上传');
}
console.log(this.enlistmentReserveAttachList);
-
+
}
}
};
diff --git a/src/views/routine/enlistmentReserve/index.vue b/src/views/routine/enlistmentReserve/index.vue
index e5a05a8..ece50dc 100644
--- a/src/views/routine/enlistmentReserve/index.vue
+++ b/src/views/routine/enlistmentReserve/index.vue
@@ -459,7 +459,7 @@ export default {
detail(row) {
this.$router.push({
path: "/routine/enlistmentReserve/applicationForm",
- query: { id: row.id } // 将 row.id 放在 query 中
+ query: { id: row.id, type: 'detail',deployId: row.deployId, processInstanceId: row.processInstanceId } // 将 row.id 放在 query 中
})
},
}
|