cloud-web-corejs 1.0.54-dev.626 → 1.0.54-dev.628

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.
@@ -10,13 +10,17 @@
10
10
 
11
11
  <template>
12
12
  <container-item-wrapper :widget="widget">
13
- <div class="detail-wrap grid-container" :class="[customClass]" :ref="widget.id">
13
+ <div
14
+ class="detail-wrap grid-container"
15
+ :class="[customClass]"
16
+ :ref="widget.id"
17
+ >
14
18
  <div class="d-header clearfix">
15
19
  <div class="fl">
16
- <i class="el-icon-info"/>
20
+ <i class="el-icon-info" />
17
21
  {{ getI18nLabel(widget.options.label) }}
18
22
  </div>
19
- <!-- <div class="fr">
23
+ <!-- <div class="fr">
20
24
  <el-button type="primary" plain class="button-sty" icon="el-icon-refresh-right" @click="reload">重置
21
25
  </el-button>
22
26
  <el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData" v-if="!wfInfo.id">保存
@@ -25,54 +29,76 @@
25
29
  <div class="fr">
26
30
  <template v-for="(subWidget, swIdx) in widget.widgetList">
27
31
  <template v-if="'container' === subWidget.category">
28
- <component :is="subWidget.type + '-item'" :widget="subWidget" :key="swIdx"
29
- :parent-list="widget.widgetList"
30
- :index-of-parent-list="swIdx" :parent-widget="widget">
32
+ <component
33
+ :is="subWidget.type + '-item'"
34
+ :widget="subWidget"
35
+ :key="swIdx"
36
+ :parent-list="widget.widgetList"
37
+ :index-of-parent-list="swIdx"
38
+ :parent-widget="widget"
39
+ >
31
40
  <!-- 递归传递插槽!!! -->
32
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
33
- <slot :name="slot" v-bind="scope"/>
41
+ <template
42
+ v-for="slot in Object.keys($scopedSlots)"
43
+ v-slot:[slot]="scope"
44
+ >
45
+ <slot :name="slot" v-bind="scope" />
34
46
  </template>
35
47
  </component>
36
48
  </template>
37
49
  <template v-else>
38
- <component :is="subWidget.type + '-widget'" :field="subWidget" :designer="null" :key="swIdx"
39
- :parent-list="widget.widgetList"
40
- :index-of-parent-list="swIdx" :parent-widget="widget">
50
+ <component
51
+ :is="subWidget.type + '-widget'"
52
+ :field="subWidget"
53
+ :designer="null"
54
+ :key="swIdx"
55
+ :parent-list="widget.widgetList"
56
+ :index-of-parent-list="swIdx"
57
+ :parent-widget="widget"
58
+ >
41
59
  <!-- 递归传递插槽!!! -->
42
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
43
- <slot :name="slot" v-bind="scope"/>
60
+ <template
61
+ v-for="slot in Object.keys($scopedSlots)"
62
+ v-slot:[slot]="scope"
63
+ >
64
+ <slot :name="slot" v-bind="scope" />
44
65
  </template>
45
66
  </component>
46
67
  </template>
47
68
  </template>
48
69
  </div>
49
70
  </div>
50
- <baseTabs style="height: auto;">
51
- <detail-pane-widget v-for="(paneWidget, index) in widget.panes" :key="index" :widget="paneWidget"
52
- :parent-list="widget.panes"
53
- :index-of-parent-list="index" :parent-widget="widget"
54
- :col-height="widget.options.colHeight" tabRef="baseTabRef" :tabPaneGrade="2"></detail-pane-widget>
71
+ <baseTabs :showNav="!widget.options.hideNav">
72
+ <detail-pane-widget
73
+ v-for="(paneWidget, index) in widget.panes"
74
+ :key="index"
75
+ :widget="paneWidget"
76
+ :parent-list="widget.panes"
77
+ :index-of-parent-list="index"
78
+ :parent-widget="widget"
79
+ :col-height="widget.options.colHeight"
80
+ tabRef="baseTabRef"
81
+ :tabPaneGrade="2"
82
+ ></detail-pane-widget>
55
83
  </baseTabs>
56
84
  </div>
57
85
  </container-item-wrapper>
58
86
  </template>
59
87
 
60
88
  <script>
89
+ import emitter from "../../../../components/xform/utils/emitter";
90
+ import i18n from "../../../../components/xform/utils/i18n";
91
+ import refMixin from "../../../../components/xform/form-render/refMixin";
92
+ import ContainerItemWrapper from "./container-item-wrapper";
93
+ import containerItemMixin from "./containerItemMixin";
94
+ import detailPaneWidget from "../../../../components/xform/form-render/container-item/detail-pane-item";
95
+ import FieldComponents from "../../../../components/xform/form-designer/form-widget/field-widget/index";
61
96
 
62
- import emitter from '../../../../components/xform/utils/emitter'
63
- import i18n from "../../../../components/xform/utils/i18n"
64
- import refMixin from "../../../../components/xform/form-render/refMixin"
65
- import ContainerItemWrapper from './container-item-wrapper'
66
- import containerItemMixin from "./containerItemMixin"
67
- import detailPaneWidget from "../../../../components/xform/form-render/container-item/detail-pane-item"
68
- import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index'
69
-
70
-
71
- import {initWf} from '../../../../components/wf/wfUtil'
97
+ import { initWf } from "../../../../components/wf/wfUtil";
72
98
 
73
99
  export default {
74
100
  name: "detail-item",
75
- componentName: 'ContainerItem',
101
+ componentName: "ContainerItem",
76
102
  mixins: [emitter, i18n, refMixin, containerItemMixin],
77
103
  components: {
78
104
  ContainerItemWrapper,
@@ -82,35 +108,35 @@ export default {
82
108
  props: {
83
109
  widget: Object,
84
110
  },
85
- inject: ['refList', 'sfRefList', 'globalModel', 'previewState'],
111
+ inject: ["refList", "sfRefList", "globalModel", "previewState"],
86
112
  created() {
87
- this.initRefList()
113
+ this.initRefList();
88
114
  this.handleOnCreated();
89
115
  },
90
116
  mounted() {
91
117
  this.handleOnMounted();
92
118
  this.$nextTick(() => {
93
119
  this.createWf();
94
- })
120
+ });
95
121
  },
96
122
  beforeDestroy() {
97
- this.unregisterFromRefList()
123
+ this.unregisterFromRefList();
98
124
  },
99
125
  data() {
100
126
  return {
101
- wfInfo: {}
102
- }
127
+ wfInfo: {},
128
+ };
103
129
  },
104
130
  methods: {
105
131
  reload() {
106
- this.getFormRef().$parent.$baseReload()
132
+ this.getFormRef().$parent.$baseReload();
107
133
  },
108
134
  saveData() {
109
- if (!!this.previewState) return
135
+ if (!!this.previewState) return;
110
136
  this.getFormRef().saveForm();
111
137
  },
112
138
  createWf() {
113
- if (!!this.previewState || !this.widget.options.wfEnabled) return
139
+ if (!!this.previewState || !this.widget.options.wfEnabled) return;
114
140
  let formTarget = this.getFormRef();
115
141
  let formData = formTarget.formData;
116
142
  if (formData && formData.object_foreign_id) {
@@ -120,17 +146,16 @@ export default {
120
146
  objId: formData.object_foreign_id, //单据ID
121
147
  wfCode: formCode, //流程编码
122
148
  showStartBtn: true, //是否放出启动按钮,流程已启动时此参数失效
123
- serviceId: 'user',
124
- callback: ({wfInfo}) => {
149
+ serviceId: "user",
150
+ callback: ({ wfInfo }) => {
125
151
  this.wfInfo = wfInfo;
126
- }
127
- }
152
+ },
153
+ };
128
154
  initWf.call(formTarget.$parent, option);
129
155
  }
130
-
131
- }
156
+ },
132
157
  },
133
- }
158
+ };
134
159
  </script>
135
160
 
136
161
  <style lang="scss" scoped>
@@ -148,11 +173,10 @@ export default {
148
173
  // min-height: 28px;
149
174
  height: 100%;
150
175
  }
151
-
152
176
  }
153
177
 
154
- .grid-container.selected, .grid-cell.selected {
178
+ .grid-container.selected,
179
+ .grid-cell.selected {
155
180
  outline: 2px solid $--color-primary !important;
156
181
  }
157
-
158
182
  </style>
@@ -1,6 +1,10 @@
1
1
  <template>
2
2
  <container-item-wrapper :widget="widget">
3
- <div :key="widget.id" class="table-container" v-show="!widget.options.hidden">
3
+ <div
4
+ :key="widget.id"
5
+ class="table-container"
6
+ v-show="!widget.options.hidden"
7
+ >
4
8
  <table
5
9
  :ref="widget.id"
6
10
  class="table-layout table-d-box"
@@ -22,7 +26,10 @@
22
26
  :row.sync="rowData"
23
27
  >
24
28
  <!-- 递归传递插槽!!! -->
25
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
29
+ <template
30
+ v-for="slot in Object.keys($scopedSlots)"
31
+ v-slot:[slot]="scope"
32
+ >
26
33
  <slot :name="slot" v-bind="scope" />
27
34
  </template>
28
35
  </table-cell-item>
@@ -92,7 +99,7 @@ export default {
92
99
  1: "textarea",
93
100
  2: "date",
94
101
  3: "number",
95
- 4: "text"
102
+ 4: "text",
96
103
  },
97
104
  };
98
105
  },
@@ -195,7 +202,9 @@ export default {
195
202
  let formScriptEnabled = this.widget.options.formScriptEnabled || false;
196
203
  let scriptCode = this.widget.options.formScriptCode;
197
204
  if (!scriptCode) return;
198
- let accessParam = this.handleCustomEvent(this.widget.options.formScriptParam);
205
+ let accessParam = this.handleCustomEvent(
206
+ this.widget.options.formScriptParam
207
+ );
199
208
  return this.formHttp({
200
209
  scriptCode: scriptCode,
201
210
  data: {
@@ -209,6 +218,11 @@ export default {
209
218
  },
210
219
  success: (res) => {
211
220
  let rows = res.objx || [];
221
+ this.handleCustomEvent(
222
+ this.widget.options.formScriptSuccess,
223
+ ["res"],
224
+ [res]
225
+ );
212
226
  this.setValue(rows);
213
227
  },
214
228
  });
@@ -265,12 +279,12 @@ export default {
265
279
  f_field_value: "6",
266
280
  },
267
281
  {
268
- f_field_name: "姓名",//显示名称
269
- f_key: "name",//字段名
270
- f_field_type: 4,//类型,0: "文本输入框",1: "多行输入框",2: "日期输入框",3: "数字输入框",4:"纯文本"
271
- f_is_required: false,//是否必填
272
- f_field_value: "张三",//字段值
273
- }
282
+ f_field_name: "姓名", //显示名称
283
+ f_key: "name", //字段名
284
+ f_field_type: 4, //类型,0: "文本输入框",1: "多行输入框",2: "日期输入框",3: "数字输入框",4:"纯文本"
285
+ f_is_required: false, //是否必填
286
+ f_field_value: "张三", //字段值
287
+ },
274
288
  ];
275
289
  let a = 1;
276
290
  this.setValue(items);
@@ -1,5 +1,6 @@
1
1
  import {deepAssign, get} from './utils'
2
- import {extendDeeply} from "../../../../utils/index.js";
2
+ import xeUtils from "xe-utils";
3
+ import {extendDeeply} from "@base/utils/index.js";
3
4
 
4
5
 
5
6
  const install = (Vue, options) => {
@@ -694,6 +694,8 @@ export const columnFormatMap = {
694
694
  text: "text",
695
695
  checkbox: "checkbox",
696
696
  radio: "radio",
697
+ dropdown: "dropdown",
698
+ textarea: "textarea",
697
699
  };
698
700
 
699
701
  export function getFieldWidgetById(widgetList, fieldId, staticWidgetsIncluded) {
@@ -876,7 +878,11 @@ export function buildDefaultFormJson() {
876
878
  export function cloneFormConfigWithoutEventHandler(e) {
877
879
  var t = deepClone(e);
878
880
  return (
879
- (t.onFormCreated = ""), (t.onFormBeforeMounted = ""), (t.onFormMounted = ""), (t.onFormDataChange = ""), t
881
+ (t.onFormCreated = ""),
882
+ (t.onFormBeforeMounted = ""),
883
+ (t.onFormMounted = ""),
884
+ (t.onFormDataChange = ""),
885
+ t
880
886
  );
881
887
  }
882
888