|
@@ -6,7 +6,7 @@ import Print from '@/utils/print'
|
|
|
export default {
|
|
export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
// 内嵌url表单,外部url表单 【自定义】
|
|
// 内嵌url表单,外部url表单 【自定义】
|
|
|
- emitButtonEventHandler (actionName, args) {
|
|
|
|
|
|
|
+ emitButtonEventHandler(actionName, args) {
|
|
|
// 前置事件
|
|
// 前置事件
|
|
|
this.beforeScript(actionName, (result) => {
|
|
this.beforeScript(actionName, (result) => {
|
|
|
if (result) {
|
|
if (result) {
|
|
@@ -15,7 +15,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
// 设置是否过审的状态
|
|
// 设置是否过审的状态
|
|
|
- setData (title) {
|
|
|
|
|
|
|
+ setData(title) {
|
|
|
let data = title
|
|
let data = title
|
|
|
console.log(this.getFormEL())
|
|
console.log(this.getFormEL())
|
|
|
if (!title) {
|
|
if (!title) {
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.getFormEL().setData("shiFouGuoShen", data)
|
|
this.getFormEL().setData("shiFouGuoShen", data)
|
|
|
},
|
|
},
|
|
|
- emitEventHandler (actionName, args) {
|
|
|
|
|
|
|
+ emitEventHandler(actionName, args) {
|
|
|
const this_ = this
|
|
const this_ = this
|
|
|
this.actionName = actionName
|
|
this.actionName = actionName
|
|
|
const buttonType = args && args.attributes ? args.attributes.button_type || actionName : actionName
|
|
const buttonType = args && args.attributes ? args.attributes.button_type || actionName : actionName
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
// } else {
|
|
// } else {
|
|
|
// this.agreeDialogVisible = true
|
|
// this.agreeDialogVisible = true
|
|
|
// }
|
|
// }
|
|
|
- }).catch(() => {})
|
|
|
|
|
|
|
+ }).catch(() => { })
|
|
|
break
|
|
break
|
|
|
case 'abandon':// 弃权
|
|
case 'abandon':// 弃权
|
|
|
this_.$confirm(
|
|
this_.$confirm(
|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
this.agreeDialogVisible = true
|
|
this.agreeDialogVisible = true
|
|
|
}
|
|
}
|
|
|
- }).catch(() => {})
|
|
|
|
|
|
|
+ }).catch(() => { })
|
|
|
break
|
|
break
|
|
|
case 'close': // 关闭窗口
|
|
case 'close': // 关闭窗口
|
|
|
this.closeDialog()
|
|
this.closeDialog()
|
|
@@ -92,7 +92,12 @@ export default {
|
|
|
this.instanceDetailVisible = true
|
|
this.instanceDetailVisible = true
|
|
|
break
|
|
break
|
|
|
case 'startFlow': // 启动流程
|
|
case 'startFlow': // 启动流程
|
|
|
- this.setData("已编制")
|
|
|
|
|
|
|
+ if (this.actionTitle == '同意并结束') {
|
|
|
|
|
+ this.setData("1")
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.setData("已编制")
|
|
|
|
|
+ }
|
|
|
|
|
+ // this.setData("已编制")
|
|
|
this.handleStartFlow()
|
|
this.handleStartFlow()
|
|
|
break
|
|
break
|
|
|
case 'saveDraft': // 保存草稿
|
|
case 'saveDraft': // 保存草稿
|
|
@@ -154,11 +159,11 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 是否隐藏
|
|
* 是否隐藏
|
|
|
*/
|
|
*/
|
|
|
- isHide () {
|
|
|
|
|
|
|
+ isHide() {
|
|
|
return (this.isBpmOpinionHide && this.attributes.isHidePath) || (this.attributes.isCommonJumpType && this.attributes.isHideOpinion && this.attributes.isHidePath) || (this.attributes.isEnd && this.attributes.isHideOpinion)
|
|
return (this.isBpmOpinionHide && this.attributes.isHidePath) || (this.attributes.isCommonJumpType && this.attributes.isHideOpinion && this.attributes.isHidePath) || (this.attributes.isEnd && this.attributes.isHideOpinion)
|
|
|
},
|
|
},
|
|
|
// 是否保存[节点-按钮设置-保存]
|
|
// 是否保存[节点-按钮设置-保存]
|
|
|
- handleSave () {
|
|
|
|
|
|
|
+ handleSave() {
|
|
|
const formData = this.getFormData()
|
|
const formData = this.getFormData()
|
|
|
const loading = this.$loading({
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
lock: true,
|
|
@@ -181,13 +186,13 @@ export default {
|
|
|
// 回调上个页面
|
|
// 回调上个页面
|
|
|
// this.callbackPage()
|
|
// this.callbackPage()
|
|
|
})
|
|
})
|
|
|
- }).catch(() => {})
|
|
|
|
|
|
|
+ }).catch(() => { })
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 处理启动流程
|
|
* 处理启动流程
|
|
|
*/
|
|
*/
|
|
|
- handleStartFlow () {
|
|
|
|
|
|
|
+ handleStartFlow() {
|
|
|
const firstNodeUserAssign = this.attributes.firstNodeUserAssign || false
|
|
const firstNodeUserAssign = this.attributes.firstNodeUserAssign || false
|
|
|
if (firstNodeUserAssign) {
|
|
if (firstNodeUserAssign) {
|
|
|
const formData = this.getFormData()
|
|
const formData = this.getFormData()
|
|
@@ -202,7 +207,7 @@ export default {
|
|
|
* 保存启动流程
|
|
* 保存启动流程
|
|
|
* @param {*}
|
|
* @param {*}
|
|
|
*/
|
|
*/
|
|
|
- saveStartFlow (params = {}) {
|
|
|
|
|
|
|
+ saveStartFlow(params = {}) {
|
|
|
const formData = this.getFormData()
|
|
const formData = this.getFormData()
|
|
|
if (!formData) return
|
|
if (!formData) return
|
|
|
const jsonData = {
|
|
const jsonData = {
|
|
@@ -248,7 +253,7 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 保存草稿
|
|
* 保存草稿
|
|
|
*/
|
|
*/
|
|
|
- handleSaveDraft () {
|
|
|
|
|
|
|
+ handleSaveDraft() {
|
|
|
// 表单数据
|
|
// 表单数据
|
|
|
const formData = this.getFormData()
|
|
const formData = this.getFormData()
|
|
|
if (!formData) return
|
|
if (!formData) return
|
|
@@ -279,7 +284,7 @@ export default {
|
|
|
// 回调上个页面
|
|
// 回调上个页面
|
|
|
this.callbackPage()
|
|
this.callbackPage()
|
|
|
})
|
|
})
|
|
|
- }).catch(() => {})
|
|
|
|
|
|
|
+ }).catch(() => { })
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
loading.close()
|
|
loading.close()
|
|
|
})
|
|
})
|
|
@@ -288,7 +293,7 @@ export default {
|
|
|
* 直接同意流程
|
|
* 直接同意流程
|
|
|
* @param {*} actionName
|
|
* @param {*} actionName
|
|
|
*/
|
|
*/
|
|
|
- handleDirectActionEvent (actionName) {
|
|
|
|
|
|
|
+ handleDirectActionEvent(actionName) {
|
|
|
const opinion = this.hasFormOpinion() ? this.getFormOpinionData() : ''
|
|
const opinion = this.hasFormOpinion() ? this.getFormOpinionData() : ''
|
|
|
this.handleActionEvent(actionName, {
|
|
this.handleActionEvent(actionName, {
|
|
|
opinion: opinion
|
|
opinion: opinion
|
|
@@ -299,7 +304,7 @@ export default {
|
|
|
* @param {*} actionName
|
|
* @param {*} actionName
|
|
|
* @param {*} params
|
|
* @param {*} params
|
|
|
*/
|
|
*/
|
|
|
- handleActionEvent (actionName, params) {
|
|
|
|
|
|
|
+ handleActionEvent(actionName, params) {
|
|
|
if (actionName === 'agree' || actionName === 'oppose' || actionName === 'abandon' || actionName === 'rejectToPrevious' || actionName === 'rejectToStart' || actionName === 'reject') {
|
|
if (actionName === 'agree' || actionName === 'oppose' || actionName === 'abandon' || actionName === 'rejectToPrevious' || actionName === 'rejectToStart' || actionName === 'reject') {
|
|
|
this.handleComplete(actionName, params)
|
|
this.handleComplete(actionName, params)
|
|
|
} else if (actionName === 'endProcess') {
|
|
} else if (actionName === 'endProcess') {
|
|
@@ -308,7 +313,7 @@ export default {
|
|
|
this.handleAddSignTask(params)
|
|
this.handleAddSignTask(params)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- handleComplete (actionName, params = {}) {
|
|
|
|
|
|
|
+ handleComplete(actionName, params = {}) {
|
|
|
const formData = this.getFormData()
|
|
const formData = this.getFormData()
|
|
|
if (!formData) return
|
|
if (!formData) return
|
|
|
const loading = this.$loading({
|
|
const loading = this.$loading({
|
|
@@ -356,7 +361,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- handleResponse (actionName, loading, response) {
|
|
|
|
|
|
|
+ handleResponse(actionName, loading, response) {
|
|
|
loading.close()
|
|
loading.close()
|
|
|
this.$alert(response.message, {
|
|
this.$alert(response.message, {
|
|
|
showClose: false
|
|
showClose: false
|
|
@@ -377,7 +382,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
}).catch(() => { })
|
|
}).catch(() => { })
|
|
|
},
|
|
},
|
|
|
- handleEndProcess () {
|
|
|
|
|
|
|
+ handleEndProcess() {
|
|
|
if (this.isBpmOpinionHide) {
|
|
if (this.isBpmOpinionHide) {
|
|
|
this.$confirm('确定终止流程!', '提示', {
|
|
this.$confirm('确定终止流程!', '提示', {
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
@@ -395,7 +400,7 @@ export default {
|
|
|
* 处理终止任务
|
|
* 处理终止任务
|
|
|
* @param {*} params
|
|
* @param {*} params
|
|
|
*/
|
|
*/
|
|
|
- handleDoEndProcess (params) {
|
|
|
|
|
|
|
+ handleDoEndProcess(params) {
|
|
|
const loading = this.$loading({
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
lock: true,
|
|
|
text: this.$t('common.saving')
|
|
text: this.$t('common.saving')
|
|
@@ -427,7 +432,7 @@ export default {
|
|
|
* 补签
|
|
* 补签
|
|
|
* @param {*} params
|
|
* @param {*} params
|
|
|
*/
|
|
*/
|
|
|
- handleAddSignTask (params) {
|
|
|
|
|
|
|
+ handleAddSignTask(params) {
|
|
|
const loading = this.$loading({
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
lock: true,
|
|
|
text: this.$t('common.saving')
|
|
text: this.$t('common.saving')
|
|
@@ -460,7 +465,7 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 打印
|
|
* 打印
|
|
|
*/
|
|
*/
|
|
|
- handlePrint () {
|
|
|
|
|
|
|
+ handlePrint() {
|
|
|
if (this.$utils.isNotEmpty(this.printTemplateId)) {
|
|
if (this.$utils.isNotEmpty(this.printTemplateId)) {
|
|
|
this.submitFormData = this.getFormData()
|
|
this.submitFormData = this.getFormData()
|
|
|
// 打开打印模版页面
|
|
// 打开打印模版页面
|
|
@@ -483,7 +488,7 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 锁定任务
|
|
* 锁定任务
|
|
|
*/
|
|
*/
|
|
|
- handleLock () {
|
|
|
|
|
|
|
+ handleLock() {
|
|
|
this.$confirm('确定锁定任务!', '提示', {
|
|
this.$confirm('确定锁定任务!', '提示', {
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
@@ -513,7 +518,7 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 解锁任务
|
|
* 解锁任务
|
|
|
*/
|
|
*/
|
|
|
- handleUnlock () {
|
|
|
|
|
|
|
+ handleUnlock() {
|
|
|
this.$confirm('确定解锁任务!', '提示', {
|
|
this.$confirm('确定解锁任务!', '提示', {
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
@@ -543,7 +548,7 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 强制解锁任务
|
|
* 强制解锁任务
|
|
|
*/
|
|
*/
|
|
|
- handleForceUnlock () {
|
|
|
|
|
|
|
+ handleForceUnlock() {
|
|
|
this.$confirm('确定强制解锁任务!', '提示', {
|
|
this.$confirm('确定强制解锁任务!', '提示', {
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
@@ -573,7 +578,7 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 挂起任务
|
|
* 挂起任务
|
|
|
*/
|
|
*/
|
|
|
- handleSuspendProcess () {
|
|
|
|
|
|
|
+ handleSuspendProcess() {
|
|
|
this.$confirm('确定挂起任务', '提示', {
|
|
this.$confirm('确定挂起任务', '提示', {
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
@@ -603,7 +608,7 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 恢复任务
|
|
* 恢复任务
|
|
|
*/
|
|
*/
|
|
|
- handleRecoverProcess () {
|
|
|
|
|
|
|
+ handleRecoverProcess() {
|
|
|
this.$confirm('确定恢复任务', '提示', {
|
|
this.$confirm('确定恢复任务', '提示', {
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
@@ -634,8 +639,8 @@ export default {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- finishTask (actionName, params, callback) {
|
|
|
|
|
|
|
+ finishTask(actionName, params, callback) {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|