cloud-web-corejs 1.0.54-dev.241 → 1.0.54-dev.242

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.241",
4
+ "version": "1.0.54-dev.242",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -808,7 +808,7 @@ import {
808
808
  } from "../../../../components/xform/utils/util";
809
809
  import formTemplateDialog from "../../../../views/bd/setting/form_template/dialog.vue";
810
810
  import wfObjConfigDialog from "./wfObjConfigDialog.vue";
811
- import bdCompanyEnvDialog from "@/views/bd/setting/bd_company_env/dialog";
811
+ import bdCompanyEnvDialog from "@base/views/bd/setting/bd_company_env/dialog";
812
812
 
813
813
  export default {
814
814
  name: "form-setting",
@@ -166,7 +166,7 @@
166
166
 
167
167
  <script>
168
168
  import i18n from "../../../../../components/xform/utils/i18n"
169
- import bdCompanyEnvDialog from "@/views/bd/setting/bd_company_env/dialog";
169
+ import bdCompanyEnvDialog from "@base/views/bd/setting/bd_company_env/dialog";
170
170
 
171
171
  export default {
172
172
  name: "textFlag-editor",
@@ -301,7 +301,7 @@
301
301
  <script>
302
302
  import i18n from "../../../../../components/xform/utils/i18n";
303
303
  import companyInfoDialog from "@base/views/user/company_info/dialog.vue";
304
- import bdCompanyEnvDialog from "@/views/bd/setting/bd_company_env/dialog";
304
+ import bdCompanyEnvDialog from "@base/views/bd/setting/bd_company_env/dialog";
305
305
 
306
306
  export default {
307
307
  name: "wfFlag-editor",
@@ -133,7 +133,7 @@
133
133
  </template>
134
134
  <script>
135
135
  import i18n from "@base/components/xform/utils/i18n";
136
- import bdCompanyEnvDialog from "@/views/bd/setting/bd_company_env/dialog"
136
+ import bdCompanyEnvDialog from "@base/views/bd/setting/bd_company_env/dialog"
137
137
 
138
138
  export default {
139
139
  name: "widgetShowRuleFlag-editor",
@@ -724,7 +724,7 @@ modules = {
724
724
  let companyCodes = companyCodeStr ? companyCodeStr.split(",").filter(item => !!item) : [];
725
725
  let flag1 = !item.serveName || item.serveName == bdService;
726
726
  // let flag2 = !item.modelKey || item.modelKey == modelKey;
727
-
727
+
728
728
  let flag2 = item.modelOrders === undefined || item.modelOrders === null || item.modelOrders === modelOrders;
729
729
  let flag3 = !companyCodes.length || companyCodes.includes(companyCode)
730
730
  if (flag1 && flag2 && flag3) {
@@ -2391,9 +2391,37 @@ modules = {
2391
2391
  },
2392
2392
  validate(callback) {
2393
2393
  this.$refs['renderForm'].$baseValidate(valid => {
2394
+ if(!valid){
2395
+ // this.scrollToFirstError();
2396
+ }
2394
2397
  callback && callback(valid);
2395
2398
  })
2396
2399
  },
2400
+ scrollToFirstError() {
2401
+ // 获取第一个验证失败的字段
2402
+ let formTarget = this.$refs['renderForm'];
2403
+ const firstErrorField = Object.keys(formTarget.fields).find(key => {
2404
+ return formTarget.fields[key].validateState === 'error';
2405
+ });
2406
+
2407
+ if (firstErrorField) {
2408
+ const field = this.$refs.form.fields[firstErrorField];
2409
+
2410
+ // 滚动到该字段位置
2411
+ field.$el.scrollIntoView({
2412
+ behavior: 'smooth',
2413
+ block: 'center'
2414
+ });
2415
+
2416
+ // 添加高亮效果
2417
+ field.$el.classList.add('highlight');
2418
+
2419
+ // 3秒后移除高亮效果
2420
+ setTimeout(() => {
2421
+ field.$el.classList.remove('highlight');
2422
+ }, 3000);
2423
+ }
2424
+ },
2397
2425
  openSearchDialog(option) {
2398
2426
  this.searchDialogOption = option;
2399
2427
  this.showSearchDialog = true;