update 流程按钮调整
This commit is contained in:
@@ -62,11 +62,11 @@
|
||||
|
||||
<div class="detail-page-bottom-operate-box">
|
||||
<!--取消-->
|
||||
<a-button v-if="1 & btn" type="primary" :loading="loading" ghost @click="handleCancel">{{ $t('cancel') }}</a-button>
|
||||
<a-button v-if="btn.includes('cancel')" type="primary" :loading="loading" ghost @click="handleCancel">{{ $t('cancel') }}</a-button>
|
||||
<!--保存-->
|
||||
<a-button v-if="2 & btn" type="primary" :loading="loading" @click="handleSave" ghost><i class="iconfont icon-save" />{{ $t('preservation') }}</a-button>
|
||||
<a-button v-if="btn.includes('save')" type="primary" :loading="loading" @click="handleSave" ghost><i class="iconfont icon-save" />{{ $t('preservation') }}</a-button>
|
||||
<!--提交-->
|
||||
<a-button v-if="4 & btn" type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
|
||||
<a-button v-if="btn.includes('submit')" type="primary" :loading="loading" @click="handleSubmit" icon="upload">{{ $t('submit') }}</a-button>
|
||||
</div>
|
||||
</internal-detail-page>
|
||||
</template>
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
currentNodeName: '',
|
||||
// 项目id
|
||||
projectId: '',
|
||||
btn: 0,
|
||||
btn: [],
|
||||
validatorRules: {
|
||||
// 流程名称
|
||||
processName: {
|
||||
@@ -175,11 +175,11 @@ export default {
|
||||
this.currentNode = nodeId || StandardPromotion.initiate.value
|
||||
this.currentNodeName = taskName || StandardPromotion.initiate.text
|
||||
this.projectId = projectId
|
||||
this.btn = StandardPromotion.propertyOfValue('btn', this.currentNode) || 0
|
||||
this.btn = StandardPromotion.propertyOfValue('btn', this.currentNode) || []
|
||||
// 如果有nodeId,但是匹配不到任何节点,就是是增加的审批节点
|
||||
if (nodeId && !StandardPromotion.keyOfValue(nodeId)) {
|
||||
// 提交按钮
|
||||
this.btn = 4
|
||||
this.btn = ['submit']
|
||||
}
|
||||
// 如果是待办进来,就获取详情数据
|
||||
if (this.$route.query.projectId) {
|
||||
@@ -299,7 +299,7 @@ export default {
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
@@ -321,7 +321,7 @@ export default {
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
@@ -355,7 +355,7 @@ export default {
|
||||
})
|
||||
},
|
||||
handleCancel () {
|
||||
this.goBack()
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user