diff --git a/src/resources/api/framework/form/form.js b/src/resources/api/framework/form/form.js index 00c30c22349ade07dde731bae34bb20ee142d7ef..b8aecd1cc86e87db977d54b1f132581b3b6ac84b 100644 --- a/src/resources/api/framework/form/form.js +++ b/src/resources/api/framework/form/form.js @@ -75,6 +75,9 @@ const form = { }, getReferenceCount(params) { //查询引用数量 return axios.post('/api/rest/dependency/count', params); + }, + getFormDefaultscene(params) { //保持默认场景 + return axios.post('/api/rest/form/version/defaultscene/save', params); } }; export default form; diff --git a/src/resources/assets/languages/message/en.json b/src/resources/assets/languages/message/en.json index 26840efed99f07237616d5d73021702e31cca96f..5373b4a690cb51a0dff944cd4e34e2ecbef9fe1f 100644 --- a/src/resources/assets/languages/message/en.json +++ b/src/resources/assets/languages/message/en.json @@ -195,8 +195,8 @@ "pastecelltip": "The current cell is not empty. Are you sure to replace the current content with the copied content?", "replacenewcomp": "The current cell is not empty. Do you want to replace it with a new component?", "clearcelltip": "Merging cells will clear the following components", - "cusscenecomptip": "Customized scenarios only support selecting components from existing components in [default scenario]", - "defultscenetip": "Customize the form scene, which can modify the form layout, hide, disable components, or modify component data sources based on the default scene components. Form scenarios can be associated with process nodes to achieve the same process, and the processing pages of different nodes display different form layouts. The viewing page of the work order uniformly displays the default scenario of the form.", + "cusscenecomptip": "Customized scenarios only support selecting components from existing components in [main scenario]", + "defultscenetip": "Customize the form scene, which can modify the form layout, hide, disable components, or modify component data sources based on the main scene components. Form scenarios can be associated with process nodes to achieve the same process, and the processing pages of different nodes display different form layouts. The viewing page of the work order uniformly displays the main scenario of the form.", "notdelscenetip": "The current form scene has been referenced and cannot be deleted", "forminputdatatip": "Help: Input data to test whether the form processes the data properly. The input data supports two formats: 1. Directly use the output data. 2. Simplified format: {ComponentUuid1: value1, ComponentUuid2: value2}", "formcostomhelp": "The template needs to comply with the Vue template syntax specification and must specify a root label, usually div, which supports all iView components and also supports the following internal components", diff --git a/src/resources/assets/languages/message/zh.json b/src/resources/assets/languages/message/zh.json index 9927c657a716f1aa6ba62b68853af85c899dd238..3049f8745e6275cb371075e600ea31b02266c89d 100644 --- a/src/resources/assets/languages/message/zh.json +++ b/src/resources/assets/languages/message/zh.json @@ -195,8 +195,8 @@ "pastecelltip": "当前单元格不为空,确认使用复制内容替换当前内容?", "replacenewcomp": "当前单元格不为空,是否替换成新组件?", "clearcelltip": "合并单元格会清空以下组件", - "cusscenecomptip": "自定义场景仅支持从[默认场景]的已有组件中,选择组件", - "defultscenetip": "自定义表单场景,可基于默认场景组件,修改表单布局,隐藏、禁用组件或修改组件数据源。表单场景可关联流程节点,实现同一流程,不同节点的处理页面展示不同的表单布局。工单的查看页面统一展示表单默认场景。", + "cusscenecomptip": "自定义场景仅支持从[主场景]的已有组件中,选择组件", + "defultscenetip": "自定义表单场景,可基于主场景组件,修改表单布局,隐藏、禁用组件或修改组件数据源。表单场景可关联流程节点,实现同一流程,不同节点的处理页面展示不同的表单布局。工单的查看页面统一展示表单主场景。", "notdelscenetip": "当前表单场景已被引用,无法删除", "forminputdatatip": "帮助:输入数据测试表单对数据的处理是否正常,输入数据支持两种格式:1、直接使用输出数据。2、简化格式:{ComponentUuid1:value1,ComponentUuid2:value2}", "formcostomhelp": "模板需要符合vue模板语法规范,必须指定一个根标签,一般是div,支持所有iView组件,也支持以下内部组件", diff --git a/src/resources/assets/languages/page/en.json b/src/resources/assets/languages/page/en.json index 089507329b37f6ebf564c8ebb1104aed82317a89..7b82f58f1d178e448ae1c1fb2e7a2c7bcf3e46ca 100644 --- a/src/resources/assets/languages/page/en.json +++ b/src/resources/assets/languages/page/en.json @@ -947,6 +947,7 @@ "filltype": "Background Fill Method", "backgroundresizable": "Background Follow Zoom", "auto": "automatic", + "mainscene": "Main scene", "enter": "enter", "viewdata": "View Data" } \ No newline at end of file diff --git a/src/resources/assets/languages/page/zh.json b/src/resources/assets/languages/page/zh.json index 12326dca7a002750044b12c8deda6527006ec9c0..565addabf0b4866ca574f223cfce383669236b40 100644 --- a/src/resources/assets/languages/page/zh.json +++ b/src/resources/assets/languages/page/zh.json @@ -949,6 +949,7 @@ "filltype": "背景填充方式", "backgroundresizable": "背景跟随缩放", "auto": "自动", + "mainscene": "主场景", "enter": "进入", "viewdata": "查看数据" } \ No newline at end of file diff --git a/src/resources/plugins/TsSheet/form-edit.vue b/src/resources/plugins/TsSheet/form-edit.vue index 848515a6578947cd74bf4c0e4c6455cdee21554f..593df3cf3a719d197c5dff01d2b2663bb73a81a3 100644 --- a/src/resources/plugins/TsSheet/form-edit.vue +++ b/src/resources/plugins/TsSheet/form-edit.vue @@ -296,6 +296,7 @@ :sceneUuid="sceneUuid" @close="closeScene" @deleteScene="deleteScene" + @updateDefaultSceneUuid="updateDefaultSceneUuid" > @@ -537,8 +538,9 @@ export default { type != 'saveother' && (data.currentVersionUuid = this.currentVersion.uuid); // 场景uuid,name !formConfig.uuid && (formConfig.uuid = this.$utils.setUuid()); - !formConfig.name && (formConfig.name = this.$t('page.defaultscenario')); + !formConfig.name && (formConfig.name = this.$t('page.mainscene')); this.$set(formConfig, 'sceneList', this.initFormConfig.sceneList || []); + this.$set(formConfig, 'defaultSceneUuid', this.initFormConfig.defaultSceneUuid || formConfig.uuid); if (type === 'saveother') { this.$set(formConfig, 'uuid', this.$utils.setUuid()); formConfig.sceneList.forEach(item => { @@ -991,6 +993,9 @@ export default { this.$nextTick(() => { this.isFormLoaded = true; }); + }, + updateDefaultSceneUuid(uuid) { + this.$set(this.initData, 'defaultsceneUuid', uuid); } }, filter: {}, diff --git a/src/resources/plugins/TsSheet/form-scene-dialog.vue b/src/resources/plugins/TsSheet/form-scene-dialog.vue index 06364bd2031cdbde89ca2fb31b1184473134e114..646472ba742ebddc6cd2923efd8057b773bf1949 100644 --- a/src/resources/plugins/TsSheet/form-scene-dialog.vue +++ b/src/resources/plugins/TsSheet/form-scene-dialog.vue @@ -13,6 +13,10 @@