|
@@ -85,8 +85,8 @@
|
|
|
<slot></slot>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <div class="fixed-btn">
|
|
|
- <van-button round block type="primary" @click="submitHandle">
|
|
|
+ <div class="fixed-btn" v-if="isSubmitVisabled">
|
|
|
+ <van-button :disabled="isSubmitDisabled" round block type="primary" @click="submitHandle">
|
|
|
转件
|
|
|
</van-button>
|
|
|
</div>
|
|
@@ -103,6 +103,8 @@ import { getTemplateOpinionListByFlowInstanceId, getOpinionListByFlowInstanceId
|
|
|
defineOptions({
|
|
|
name: 'FlowForm'
|
|
|
})
|
|
|
+const isSubmitVisabled = ref<boolean>(true)
|
|
|
+const isSubmitDisabled = ref<boolean>(false)
|
|
|
const userInfo = JSON.parse(localStorage.getItem('_userInfo') as string);
|
|
|
const currentUserName = userInfo ? userInfo['nickname'] ?? '' : ''
|
|
|
defineProps<{
|
|
@@ -116,10 +118,14 @@ const tabs = ref<{
|
|
|
title?: string
|
|
|
}[]>([{}])
|
|
|
const currentActive = ref<string>('基础信息')
|
|
|
-const { flowInstanceId, activityInstanceId, participant } = route.query as {
|
|
|
+const { flowInstanceId, activityInstanceId, participant, _o } = route.query as {
|
|
|
flowInstanceId: string
|
|
|
activityInstanceId: string
|
|
|
participant: string
|
|
|
+ _o: string
|
|
|
+}
|
|
|
+if (_o && _o == 'v') {
|
|
|
+ isSubmitVisabled.value = false
|
|
|
}
|
|
|
const currentOpinion = ref({
|
|
|
id: '',
|
|
@@ -161,6 +167,12 @@ getTemplateOpinionListByFlowInstanceId(flowInstanceId).then((tResult) => {
|
|
|
tItem['opinions'].push(oItem);
|
|
|
oList.splice(j, 1)
|
|
|
j--;
|
|
|
+ } else {
|
|
|
+ if (j === oList.length - 1) {
|
|
|
+ tList.splice(i, 1)
|
|
|
+ i--;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -177,6 +189,7 @@ const activityData: FlowDTO = {
|
|
|
const router = useRouter();
|
|
|
const submitHandle = async (): Promise<any> => {
|
|
|
emit('submit', async () => {
|
|
|
+ isSubmitDisabled.value = true;
|
|
|
//工作流转件
|
|
|
activityData.activityInstanceId = activityInstanceId;
|
|
|
activityData.participantId = participant;
|
|
@@ -188,12 +201,11 @@ const submitHandle = async (): Promise<any> => {
|
|
|
message: '转件成功',
|
|
|
position: 'top',
|
|
|
onClose() {
|
|
|
- router.back();
|
|
|
+ isSubmitDisabled.value = false;
|
|
|
+ router.back();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- console.log("转件-----------------------")
|
|
|
- console.log(result);
|
|
|
return result;
|
|
|
});
|
|
|
}
|