上传附件
This commit is contained in:
@ -10,16 +10,16 @@
|
||||
</slot>
|
||||
关闭
|
||||
</a-button>
|
||||
<a-button :disabled="data.submitLoading" type="primary" @click="saveLaunch">
|
||||
<a-button v-if="!disabled" :disabled="data.submitLoading" type="primary" @click="saveLaunch">
|
||||
<slot name="icon">
|
||||
<send-outlined />
|
||||
</slot>
|
||||
提交
|
||||
</a-button>
|
||||
<a-button v-if="customFormConfig.codeList.includes(curPageCode)" @click="onSave">
|
||||
<a-button v-if="customFormConfig.codeList.includes(curPageCode)&&!disabled" @click="onSave">
|
||||
<slot name="icon"><save-outlined /></slot>保存
|
||||
</a-button>
|
||||
<a-button v-else :disabled="data.submitLoading" @click="saveDraft">
|
||||
<a-button v-if="!customFormConfig.codeList.includes(curPageCode)&&!disabled" :disabled="data.submitLoading" @click="saveDraft">
|
||||
<slot name="icon">
|
||||
<clock-circle-outlined />
|
||||
</slot>
|
||||
@ -32,7 +32,7 @@
|
||||
</slot>
|
||||
流程图
|
||||
</a-button>
|
||||
<div v-if="customFormConfig.codeList.includes(curPageCode)">
|
||||
<div v-if="customFormConfig.codeList.includes(curPageCode)&&!disabled">
|
||||
<a-button>
|
||||
<slot name="icon"><download-outlined /></slot>下载模板
|
||||
</a-button>
|
||||
@ -43,7 +43,7 @@
|
||||
</a-space>
|
||||
</div>
|
||||
<div class="flow-content">
|
||||
<component v-if="customFormConfig.codeList.includes(curPageCode)" :is="componentName" ref="formInformation" />
|
||||
<component v-if="customFormConfig.codeList.includes(curPageCode)" :is="componentName" :disabled="disabled" ref="formInformation" />
|
||||
<FormInformation v-else :key="randKey" ref="formInformation" :disabled="false" :formAssignmentData="data.formAssignmentData" :formInfos="data.formInfos" :opinions="data.opinions" :opinionsComponents="data.opinionsComponents" />
|
||||
</div>
|
||||
</div>
|
||||
@ -98,6 +98,7 @@
|
||||
let pageMode = 'new';
|
||||
const showFlowChart = ref(false);
|
||||
const disableSubmit = ref(false);
|
||||
const disabled = ref(currentRoute.query?.disabled)
|
||||
const mainFormModels = ref();
|
||||
let randKey = ref('randkey'); // 强制表单重新渲染
|
||||
let approvalData = reactive({
|
||||
@ -157,7 +158,9 @@
|
||||
onMounted(async () => {
|
||||
try {
|
||||
// 发起流程
|
||||
loading.value = true
|
||||
let res = await getStartProcessInfo(rSchemaId);
|
||||
loading.value = false
|
||||
const title = res?.schemaInfo?.name;
|
||||
if (title) {
|
||||
const tabPrefix = pageMode === 'new' ? '新建' : '草稿';
|
||||
@ -165,7 +168,9 @@
|
||||
}
|
||||
curPageCode.value = res?.schemaInfo?.code
|
||||
initProcessData(res);
|
||||
} catch (error) {}
|
||||
} catch (error) {
|
||||
loading.value = false
|
||||
}
|
||||
randKey.value = Math.random() + '';
|
||||
// 这里的顺序不能变 表单不渲染的时候 设置表单初值没用
|
||||
await nextTick();
|
||||
|
||||
Reference in New Issue
Block a user