|
|
@@ -159,16 +159,19 @@ export default {
|
|
|
let res = await requestUrl(this.routerQuery.id);
|
|
|
|
|
|
this.businessId = this.routerQuery.type == 'add' ? '' : res.id;
|
|
|
-
|
|
|
+ console.log('type~~~', this.routerQuery.type);
|
|
|
// 如果是新增,将发文编号设置到 fields 中
|
|
|
if (this.routerQuery.type == 'add' && res.fields) {
|
|
|
const documentNumberField = res.fields.find((item) => item.fieldKey == 'documentNumber');
|
|
|
if (documentNumberField) {
|
|
|
documentNumberField.defaultValue = await getCode('fm_document_number_code');
|
|
|
+ console.log('documentNumberField~~~', documentNumberField, await getCode('fm_document_number_code'));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
this.formData = res;
|
|
|
+
|
|
|
+ console.log('this.formData~~~', this.formData);
|
|
|
let ids =this.formData.fields.find((item) => item.fieldKey == 'attachments')?.defaultValue || '';
|
|
|
this.getFiles(ids);
|
|
|
console.log(this.formData, this.$refs.mainBodyTemplate);
|