diff --git a/src/api/DesignForm/index.ts b/src/api/DesignForm/index.ts index 5fe1e1a1b..5e3289504 100644 --- a/src/api/DesignForm/index.ts +++ b/src/api/DesignForm/index.ts @@ -22,7 +22,7 @@ export const getRequest = (apiKey: string, data?: any, options: any = {}) => { options ) // github演示时使用下面地址 - if (window.location.host.indexOf('github') !== -1) { + if (window.location.host.indexOf('github') === -1) { let id = '' if (url.indexOf('/id') !== -1 && data.id) { id = data.id + '' @@ -51,7 +51,7 @@ export const getRequest = (apiKey: string, data?: any, options: any = {}) => { } obj = Object.assign( { - url: `./mock/${url}${id}.json`, + url: `./docs/mock/${url}${id}.json`, method: 'GET', params: data }, diff --git a/src/api/DesignForm/requestapi.ts b/src/api/DesignForm/requestapi.ts index 8ffd86842..98edfebff 100644 --- a/src/api/DesignForm/requestapi.ts +++ b/src/api/DesignForm/requestapi.ts @@ -7,7 +7,12 @@ import { customerFormConfig, getContForId, editFormStatus, - setupCustomerFormCont + setupCustomerFormCont, + customerFormLogo, + customerFormVersionCont, + editFormInfo, + customerFromCont, + enableVersionId } from './type'; //自定义表单列表 export function getCustomerFormList(queryParams: SearchForm): AxiosPromise { @@ -57,3 +62,36 @@ export function saveSetupCont(data: setupCustomerFormCont) { data: data }); } + +//获取自定义表单版本列表 +export function haveCustomerFormVersion(data: customerFormLogo):AxiosPromise { + return request({ + url: '/systemapi/customer_form/have_customer_form_version', + method: 'post', + data: data + }); +} +//编辑自定义表单内容 +export function editCustomerFormInfo(data: editFormInfo) { + return request({ + url: '/systemapi/customer_form/edit_customer_form_info', + method: 'post', + data: data + }); +} +//另存为新版 +export function saveAsNewVersion(data: customerFromCont) { + return request({ + url: '/systemapi/customer_form/save_as_new_version', + method: 'post', + data: data + }); +} +//启用版本 +export function enableVersion(data: enableVersionId) { + return request({ + url: '/systemapi/customer_form/enable_version', + method: 'post', + data: data + }); +} diff --git a/src/api/DesignForm/type.ts b/src/api/DesignForm/type.ts index a1ab839dd..275ee2277 100644 --- a/src/api/DesignForm/type.ts +++ b/src/api/DesignForm/type.ts @@ -40,3 +40,41 @@ export interface setupCustomerFormCont{ states:number; status:boolean; } +//自定义表单标识符 +export interface customerFormLogo{ + id:string +} + +//自定义表单版本内容 +export interface customerFormVersionCont{ + id:number; + tablekey:string; + version:number; + status:number; + mastesform:string; + mastesformjson:string; + creater:number; + time:number; + editTime:number; + table_structure:string; + dict:string; +} +//编辑自定义表单内容 +export interface editFormInfo extends customerFromCont{ + id:string; + version:string; + +} +export interface customerFromCont{ + type:number; + name:string; + source:string; + dict:string; + data:string; + jsondata:string; + classify:number; +} +//启用新版本 +export interface enableVersionId{ + id:string; +} diff --git a/src/components/DesignForm/dragControl.vue b/src/components/DesignForm/dragControl.vue index fcf2c505b..e13503b37 100644 --- a/src/components/DesignForm/dragControl.vue +++ b/src/components/DesignForm/dragControl.vue @@ -4,7 +4,7 @@ @ 备注: 快速选择表单字段 --> + +
版本
+ + + 启用 + 使用中 + + + diff --git a/src/components/DesignForm/formControlAttr.vue b/src/components/DesignForm/formControlAttr.vue index db642f14c..952e49d59 100644 --- a/src/components/DesignForm/formControlAttr.vue +++ b/src/components/DesignForm/formControlAttr.vue @@ -17,6 +17,7 @@ const props = withDefaults( //接收父级参数 formData: any formConfig: any formOtherData: any + customerformid: number | string, }>(), { formConfig: () => { @@ -748,6 +749,7 @@ watch( } } ) +const fileSignAry = reactive([]) const controlChange = (obj: any, val: any) => { console.log("字段编辑----》",obj,val,controlData.value) // select多选属性, @@ -796,6 +798,8 @@ const controlChange = (obj: any, val: any) => { break case 'labelNameVal': controlData.value.name = val + fileSignAry.push(val) + console.log("字段编辑--fileSignAry--》",fileSignAry) break } if (obj.path) { @@ -1093,6 +1097,14 @@ const eventClick = (type: string, tooltip?: string) => { } getDataSource() defineExpose({ getFormFieldBySource }) +//判断输入框是否可写 +const isNotWrite = (val:any) =>{ + console.log("判断输入框是否可写--->",val) + if(val.key === "name" && props.customerformid != ""){ + return true + } + return false +} - - + + - - + + v-if="total > 0" + v-model:total="total" + v-model:page="queryParams.page" + v-model:limit="queryParams.pagesize" + @pagination="handleQuery" + /> - - + +