zhengyiming
5 天以前 d650e26862fc3288b32bc05813976260df7a5801
src/views/ProtocolManage/EditTemplate.vue
@@ -185,7 +185,7 @@
  }
);
const { dialogProps, handleEdit, handleAdd, editForm } = useFormDialog({
const { dialogProps, handleEdit, handleAdd, editForm, dialogState } = useFormDialog({
  onConfirm: handleAddOrEdit,
  defaultFormParams: {
    id: '',
@@ -197,7 +197,11 @@
    title: '新增模板',
    isEnterpriseUserCreated: false,
    templateEditData: '',
    enterpriseId: '',
    isAutoSign: false,
    autoSignPowerAttorneyUrl: [] as UploadUserFile[],
  },
  closeAfterConfirm: false,
});
async function openDialog(row?: API.GetEnterpriseContractTemplatesQueryResultItem) {
@@ -213,6 +217,9 @@
        access: row.access,
        isEnterpriseUserCreated: detail.isEnterpriseUserCreated,
        templateEditData: detail.templateEditData,
        isAutoSign: detail.isAutoSign ?? false,
        autoSignPowerAttorneyUrl: convertApi2FormUrlOnlyOne(detail.autoSignPowerAttorneyUrl),
        enterpriseId: enterpriseId,
      });
    } else {
      handleAdd();
@@ -231,6 +238,8 @@
      code: editForm.code,
      access: editForm.access,
      templateId: editForm.templateId,
      isAutoSign: editForm.isAutoSign,
      autoSignPowerAttorneyUrl: editForm.autoSignPowerAttorneyUrl?.[0]?.path ?? '',
      templateEditData: JSON.stringify(
        pdfToImage.map(
          (x) =>
@@ -249,8 +258,11 @@
    if (res) {
      Message.successMessage('操作成功');
      getList();
      dialogState.dialogVisible = false;
    }
  } catch (error) {}
  } catch (error) {
    dialogState.dialogVisible = true;
  }
}
function handleDownload(row: API.GetEnterpriseContractTemplatesQueryResultItem) {