cloud-web-corejs 1.0.54-dev.253 → 1.0.54-dev.255
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 +1 -1
- package/src/components/table/index.js +1034 -1
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +18 -17
- package/src/components/xform/form-render/container-item/data-table-item.vue +51 -37
- package/src/components/xform/form-render/container-item/data-table-mixin.js +2371 -1
- package/src/components/xform/form-render/indexMixin.js +3 -2
- package/src/components/xform/mixins/scriptHttp.js +1 -172
@@ -128,7 +128,7 @@ export default {
|
|
128
128
|
let queryParam = this.$baseLodash.cloneDeep(this.dialogParam);
|
129
129
|
let murl = queryParam.urlmobile;
|
130
130
|
let purl = murl && isMobile ? murl : queryParam.url;
|
131
|
-
let dataId = queryParam.dataId;
|
131
|
+
let dataId = queryParam.dataId??null;
|
132
132
|
if (purl == '/index') {
|
133
133
|
location.hash = '/home';
|
134
134
|
location.reload();
|
@@ -3,8 +3,12 @@
|
|
3
3
|
:parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
|
4
4
|
:sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
|
5
5
|
:sub-form-row-id="subFormRowId">
|
6
|
-
<
|
7
|
-
|
6
|
+
<template v-for="(item,index) in field.options.statusParam">
|
7
|
+
<span
|
8
|
+
v-if="fieldModel===item.value"
|
9
|
+
:key="index" class="list-tag"
|
10
|
+
:class="item.type">{{ getI18nLabel(item.label) }}</span>
|
11
|
+
</template>
|
8
12
|
</form-item-wrapper>
|
9
13
|
</template>
|
10
14
|
|
@@ -56,7 +60,8 @@ export default {
|
|
56
60
|
fieldModel: null,
|
57
61
|
rules: [],
|
58
62
|
isH5: false,
|
59
|
-
option: {}
|
63
|
+
option: {},
|
64
|
+
statusParam: [],
|
60
65
|
}
|
61
66
|
},
|
62
67
|
watch: {
|
@@ -64,16 +69,6 @@ export default {
|
|
64
69
|
this.handleChangeEvent(val);
|
65
70
|
}
|
66
71
|
},
|
67
|
-
computed: {
|
68
|
-
statusParam() {
|
69
|
-
return this.field.options.statusParam ? this.field.options.statusParam.map(item => {
|
70
|
-
return {
|
71
|
-
...item,
|
72
|
-
label: this.getI18nLabel(item.label)
|
73
|
-
}
|
74
|
-
}) : [];
|
75
|
-
}
|
76
|
-
},
|
77
72
|
beforeCreate() {
|
78
73
|
/* 这里不能访问方法和属性!! */
|
79
74
|
},
|
@@ -90,6 +85,7 @@ export default {
|
|
90
85
|
this.buildFieldRules()
|
91
86
|
|
92
87
|
this.handleOnCreated()
|
88
|
+
// this.initStatusParam();
|
93
89
|
},
|
94
90
|
|
95
91
|
mounted() {
|
@@ -114,12 +110,17 @@ export default {
|
|
114
110
|
},
|
115
111
|
refreshWidget() {
|
116
112
|
this.initStatusForDesign();
|
117
|
-
this.$refs.statusTag.init();
|
113
|
+
// this.$refs.statusTag.init();
|
118
114
|
},
|
119
|
-
getFieldModelLabel(){
|
120
|
-
|
115
|
+
getFieldModelLabel() {
|
116
|
+
let label = null;
|
117
|
+
let fieldModel = this.fieldModel;
|
118
|
+
let item = this.field.options.statusParam.find(item => item.value === fieldModel)
|
119
|
+
if (item) {
|
120
|
+
label = this.getI18nLabel(item.label);
|
121
|
+
}
|
122
|
+
return label;
|
121
123
|
}
|
122
|
-
|
123
124
|
}
|
124
125
|
}
|
125
126
|
</script>
|
@@ -2,8 +2,9 @@
|
|
2
2
|
<vxe-grid :ref="widget.id" v-bind="vxeOption" :auto-resize="true" v-show="!widget.options.hidden"
|
3
3
|
@resizable-change="$vxeTableUtil.onColumnWitchChange" @custom="$vxeTableUtil.customHandle"
|
4
4
|
@checkbox-change="handleCheckboxChange" @checkbox-all="handleCheckboxAll"
|
5
|
-
@cell-dblclick="handleCellDblclick" :class="dataTableConfig.class"
|
6
|
-
|
5
|
+
@cell-dblclick="handleCellDblclick" :class="dataTableConfig.class"
|
6
|
+
:data="fieldModel"
|
7
|
+
>
|
7
8
|
<template #form>
|
8
9
|
<!-- <div v-if="widget.options.showSearchArea" class="clearfix screen-btns">
|
9
10
|
<div class="fl">
|
@@ -186,43 +187,56 @@
|
|
186
187
|
<treeMoveDialog v-if="showTreeMoveDialog" :visiable.sync="showTreeMoveDialog" :rows.sync="sortRows"
|
187
188
|
:parent-target="_self" @confirm="confirmTreeMoveDialog"></treeMoveDialog>
|
188
189
|
</template>
|
189
|
-
<!-- <template v-for="fieldWidget in widgets" v-slot:[fieldWidget.id]="obj">
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
190
|
+
<!-- <template v-for="fieldWidget in widgets" v-slot:[fieldWidget.id]="obj">
|
191
|
+
<component
|
192
|
+
:is="getColumnWidgetName(fieldWidget)"
|
193
|
+
:field="fieldWidget"
|
194
|
+
:form-model="globalModel.formModel"
|
195
|
+
:designer="null"
|
196
|
+
:key="fieldWidget.id+'-'+obj.rowIndex"
|
197
|
+
:parent-widget="widget"
|
198
|
+
:columnConfig="obj.column.params.columnConfig"
|
199
|
+
:subFormRowIndex="obj.rowIndex"
|
200
|
+
:formItemProp="getColumnProp(widget,obj)"
|
201
|
+
:tableParam="obj"
|
202
|
+
>
|
203
|
+
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
204
|
+
<slot :name="slot" v-bind="scope"/>
|
205
|
+
</template>
|
206
|
+
</component>
|
207
|
+
</template>-->
|
207
208
|
<template #widget="obj">
|
208
|
-
<
|
209
|
-
v-if="!!fieldSchemaMap[obj.row._X_ROW_KEY]"
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
:formItemProp="getColumnProp(widget,obj)"
|
219
|
-
:subFormRowId="obj.row._X_ROW_KEY"
|
220
|
-
:tableParam="obj"
|
221
|
-
>
|
222
|
-
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
223
|
-
<slot :name="slot" v-bind="scope"/>
|
209
|
+
<template
|
210
|
+
v-if="!!fieldSchemaMap[obj.row._X_ROW_KEY] && fieldSchemaMap[obj.row._X_ROW_KEY][obj.column.params.widget.id]">
|
211
|
+
<template v-if="obj.column.params.widget.type == 'status'">
|
212
|
+
<template
|
213
|
+
v-for="(item,index) in fieldSchemaMap[obj.row._X_ROW_KEY][obj.column.params.widget.id].options.statusParam">
|
214
|
+
<span
|
215
|
+
v-if="obj.row[getFieldKeyName(fieldSchemaMap[obj.row._X_ROW_KEY][obj.column.params.widget.id])]===item.value"
|
216
|
+
:key="fieldSchemaMap[obj.row._X_ROW_KEY][obj.column.params.widget.id].id+'-'+index" class="list-tag"
|
217
|
+
:class="item.type">{{ getI18nLabel(item.label) }}</span>
|
218
|
+
</template>
|
224
219
|
</template>
|
225
|
-
|
220
|
+
<component
|
221
|
+
v-else
|
222
|
+
:is="getColumnWidgetName(obj.column.params.widget)"
|
223
|
+
:field="fieldSchemaMap[obj.row._X_ROW_KEY][obj.column.params.widget.id]"
|
224
|
+
:form-model="globalModel.formModel"
|
225
|
+
:designer="null"
|
226
|
+
:key="fieldSchemaMap[obj.row._X_ROW_KEY][obj.column.params.widget.id].id"
|
227
|
+
:parent-widget="widget"
|
228
|
+
:columnConfig="obj.column.params.columnConfig"
|
229
|
+
:subFormRowIndex="obj.rowIndex"
|
230
|
+
:formItemProp="getColumnProp(widget,obj)"
|
231
|
+
:subFormRowId="obj.row._X_ROW_KEY"
|
232
|
+
:tableParam="obj"
|
233
|
+
>
|
234
|
+
<template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
|
235
|
+
<slot :name="slot" v-bind="scope"/>
|
236
|
+
</template>
|
237
|
+
</component>
|
238
|
+
</template>
|
239
|
+
|
226
240
|
</template>
|
227
241
|
<template #widgetList="obj">
|
228
242
|
<div>
|