lijingjia 3 weeks ago
commit 2f08edf724

@ -19,6 +19,8 @@
watch(
() => props.ApiData,
() => {
console.log(props.ApiData)
initData()
},
{ deep: true },

@ -102,6 +102,9 @@
markerNotifyURL: '',
callbackURL: '',
id: '',
permissionName: '',
orderNo: '',
status: 0,
})
const state = reactive({
initSetp1: true,
@ -114,15 +117,18 @@
if (res.succeeded) {
// ApiData = { ...res.data }
// await setFieldsValue(res.data)
ApiData.id = res.data.id
ApiData.name = res.data.name
ApiData.note = res.data.note
ApiData.auditType = res.data.auditType.toString()
ApiData.markerNotifyURL = res.data.markerNotifyURL
ApiData.callbackURL = res.data.callbackURL
ApiData.content = res.data.content
ApiData.permissionId = res.data.permissionId
ApiData.permissionName = res.data.permissionName
ApiData.columnView = res.data.columnView
ApiData.id = res.data.id
ApiData.content = res.data.content
ApiData.orderNo = res.data.orderNo
ApiData.status = res.data.status
ApiData.markerNotifyURL = res.data.markerNotifyURL
ApiData.callbackURL = res.data.callbackURL
ApiData.auditType = res.data.auditType ? res.data.auditType.toString() : ''
ApiData.note = res.data.note
}
}
async function GetTable(tableViewName) {
@ -218,16 +224,18 @@
// }
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
console.log('closeModal')
ApiData.id = ''
ApiData.name = ''
ApiData.note = ''
ApiData.auditType = ''
ApiData.markerNotifyURL = ''
ApiData.callbackURL = ''
ApiData.content = ''
ApiData.permissionId = ''
ApiData.permissionName = ''
ApiData.columnView = ''
ApiData.id = ''
ApiData.content = ''
ApiData.orderNo = ''
ApiData.status = 0
ApiData.markerNotifyURL = ''
ApiData.callbackURL = ''
ApiData.auditType = ''
ApiData.note = ''
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
@ -262,12 +270,15 @@
}
}
function handleStep1Next(step1Values: any) {
ApiData.id = step1Values.id
ApiData.name = step1Values.name
ApiData.note = step1Values.note
ApiData.orderNo = step1Values.orderNo
ApiData.columnView = step1Values.columnView
ApiData.status = step1Values.status
ApiData.auditType = step1Values.auditType
ApiData.markerNotifyURL = step1Values.markerNotifyURL
ApiData.callbackURL = step1Values.callbackURL
ApiData.note = step1Values.note
if (step1Values.id) {
ApiData.id = step1Values.id
}
@ -387,15 +398,18 @@
const res: API.DataResult = await EditFlowTemplate(ApiData)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
ApiData.id = ''
ApiData.name = ''
ApiData.note = ''
ApiData.auditType = ''
ApiData.markerNotifyURL = ''
ApiData.callbackURL = ''
ApiData.content = ''
ApiData.permissionId = ''
ApiData.permissionName = ''
ApiData.columnView = ''
ApiData.id = ''
ApiData.content = ''
ApiData.orderNo = ''
ApiData.status = ''
ApiData.markerNotifyURL = ''
ApiData.callbackURL = ''
ApiData.auditType = ''
ApiData.note = ''
closeModal()
emit('success')
} else {

@ -14,7 +14,6 @@
class="LeftUnit"
@click="ClickTasksUnit(item)"
>
<!-- active -->
<div class="activeBox" :class="activeId == item.id ? 'active' : ''">
<span v-if="item.isMainBL" class="type MainBL"></span>
<span v-else class="type NoMainBL"></span>
@ -30,7 +29,11 @@
</div>
</div>
<div class="bottom">
<a-steps :current="activeSteps" class="steps">
<!-- isMainBL.value && -->
<div v-if="isMainBL && activeStepsArr.length == 0">
<a-button type="primary" @click="FnSetSteps"> </a-button>
</div>
<a-steps :current="activeSteps" class="steps" v-else>
<a-step v-for="(item, index) in activeStepsArr" :key="item.id">
<template #title>{{ item.typeName }}</template>
<template #description>
@ -144,23 +147,22 @@
ApiData = { ...item }
}
})
// if (!isMainBL.value) {
ApiData.steps[activeSteps.value].isCompleted = true
// }
if (!(isMainBL.value && activeStepsArr.value.length == 0)) {
ApiData.steps[activeSteps.value].isCompleted = true
}
// ( )
ApiData.autoSync = true
let res: any = null
// if (isMainBL.value) {
// res = await SetTaskStatus(ApiData)
// } else {
res = await SetSteps(ApiData)
// }
if (isMainBL.value && activeStepsArr.value.length == 0) {
res = await SetTaskStatus(ApiData)
} else {
res = await SetSteps(ApiData)
}
if (res.succeeded) {
createMessage.success(res.message)
init(true)
}
}
function FnSetTaskStatus() {}
</script>
<style lang="less" scoped>
.Main {

Loading…
Cancel
Save