feat: 端点登录

This commit is contained in:
caijun
2026-01-25 20:22:58 +08:00
parent f9e1a0cc18
commit f43f2ff3c2
12 changed files with 551 additions and 444 deletions

View File

@@ -56,13 +56,16 @@
</view>
<!-- 底部操作按钮区域 -->
<view v-if="!loading && (!(dataForm.approveStatus == 1 || dataForm.approveStatus == 2 || dataForm.approveStatus == 4) || !dataForm.id || config.current && config.current == 2)" class="buttom-actions">
<view v-if="!loading && (dataForm.approveStatus != 4 || !dataForm.id || config.current && config.current == 2) && !isProcess" class="buttom-actions">
<u-button v-if="(!dataForm.approveStatus && dataForm.id) || dataForm.approveStatus == 3" class="buttom-btn launch-flow-btn" type="primary" @click.stop="handleLaunchFlow" :disabled="idDsabled" :loading="btnLoading">
发起流程
</u-button>
<u-button v-if="!config.current" class="buttom-btn" type="primary" @click.stop="submit" :disabled="idDsabled" :loading="btnLoading">
<u-button v-if="!config.current && !dataForm.approveStatus" class="buttom-btn" type="primary" @click.stop="submit" :disabled="idDsabled" :loading="btnLoading">
保存
</u-button>
<u-button v-if="!config.current && (dataForm.approveStatus == 1 || dataForm.approveStatus == 2)" class="buttom-btn" type="primary" @click.stop="goProcess">
查看流程
</u-button>
<u-button v-if="config.current == 2" class="buttom-btn" type="error" @click.stop="handleFail" :disabled="idDsabled" :loading="btnLoading">
不通过
</u-button>
@@ -344,6 +347,7 @@
currentProcessId: '',
selectedCandidates: {},
approvalData: [], // 存储审批记录
isProcess: false, // 点击查看流程
//审批意见弹窗相关数据
showApprovalReasonDialog: false, // 弹窗显示状态
@@ -381,7 +385,7 @@
},
isApproval(){
const {current} = this.config
return !!current
return !!current || this.isProcess
}
},
onLoad(option) {
@@ -426,7 +430,7 @@
const getNavigationTitle = () =>{
let titleName = ''
if(this.config.current){
if(this.config.current || this.isProcess){
titleName = this.config.name + '详情'
}else {
const name = this.dataForm.id ? this.$t('common.editText') : this.$t('common.addText')
@@ -483,8 +487,19 @@
getListCreateData(params){
getListCreate(params,this.modelId).then(res=>{
if(res.code == 0) {
// const name = this.approvalType == 'through' ? '申请通过成功' '发起成功'
let name = '发起成功'
switch(this.approvalType){
case 'through':
name = '审批通过成功'
break;
case 'fail':
name = '审批不通过成功'
break;
}
uni.showToast({
title: '发起成功',
title: name,
icon: 'success'
})
setTimeout(() => {
@@ -743,6 +758,14 @@
this.approvalReason = '' // 清空之前的意见
this.showApprovalReasonDialog = true
},
// 查看流程
goProcess(){
this.isProcess = true
console.log(this.config,'config-')
uni.setNavigationBarTitle({
title: `${this.config.name}流程详情`
})
},
// 提交审批结果(通过/不通过)
async submitApprovalResult() {