cloud-web-corejs 1.0.54-dev.336 → 1.0.54-dev.337
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/xform/form-designer/form-widget/field-widget/fieldMixin.js +27 -5
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +13 -4
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +376 -366
- package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +37 -30
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +15 -10
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +5 -0
- package/src/components/xform/form-render/container-item/data-table-item.vue +10 -7
- package/src/components/xform/form-render/container-item/data-table-mixin.js +112 -4
- package/src/components/xform/mixins/scriptHttp.js +62 -61
- package/src/utils/request.js +43 -8
- package/src/utils/vab.js +1095 -1
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +295 -2
@@ -1,5 +1,29 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
+
<el-form-item label-width="0">
|
4
|
+
<el-divider class="custom-divider-margin-top">选项设置</el-divider>
|
5
|
+
</el-form-item>
|
6
|
+
<el-form-item label="选项值类型">
|
7
|
+
<el-radio-group v-model="optionModel.optionItemValueType" @change="changeValueType">
|
8
|
+
<el-radio :label="0">文本</el-radio>
|
9
|
+
<el-radio :label="1">数值</el-radio>
|
10
|
+
<el-radio :label="2">布尔值</el-radio>
|
11
|
+
</el-radio-group>
|
12
|
+
</el-form-item>
|
13
|
+
<el-form-item label="默认值">
|
14
|
+
<el-input v-model="optionModel.defaultValue" size="mini" style="width: 100px" v-if="!optionModel.optionItemValueType"></el-input>
|
15
|
+
<base-input-number v-model="optionModel.defaultValue" size="mini" style="width: 100%" v-if="optionModel.optionItemValueType==1" />
|
16
|
+
<el-select v-model="optionModel.defaultValue" style="width: 100%" v-if="optionModel.optionItemValueType===2" clearable @clear="optionModel.defaultValue=null">
|
17
|
+
<el-option :value="true" label="true"></el-option>
|
18
|
+
<el-option :value="false" label="false"></el-option>
|
19
|
+
</el-select>
|
20
|
+
</el-form-item>
|
21
|
+
<el-form-item :label="i18nt('显示字段')" v-if="optionModel.commonAttributeEnabled || optionModel.formScriptEnabled">
|
22
|
+
<el-input type="text" v-model="optionModel.labelKey" placeholder="默认label" :disabled="optionModel.commonAttributeEnabled"></el-input>
|
23
|
+
</el-form-item>
|
24
|
+
<el-form-item :label="i18nt('关联字段')" v-if="optionModel.commonAttributeEnabled || optionModel.formScriptEnabled">
|
25
|
+
<el-input type="text" v-model="optionModel.valueKey" placeholder="默认value" :disabled="optionModel.commonAttributeEnabled"></el-input>
|
26
|
+
</el-form-item>
|
3
27
|
<el-form-item label="状态配置">
|
4
28
|
<a href="javascript:void(0);" class="a-link link-oneLind" @click="openDialog">
|
5
29
|
<span>{{ optionModel.statusParam.length ? "已维护" : "" }}</span>
|
@@ -15,30 +39,12 @@
|
|
15
39
|
:close-on-click-modal="!1"
|
16
40
|
:close-on-press-escape="!1"
|
17
41
|
:destroy-on-close="!0"
|
18
|
-
|
19
|
-
|
42
|
+
width="800px"
|
43
|
+
top="0px"
|
20
44
|
v-dialog-drag
|
21
45
|
@closed="closeHandle"
|
22
46
|
>
|
23
47
|
<div class="cont">
|
24
|
-
<el-form-item label="选项值类型" style="width: 350px;">
|
25
|
-
<!-- <el-switch v-model="optionItemValueType" @change="changeValueType"></el-switch>-->
|
26
|
-
<el-radio-group v-model="optionItemValueType" @change="changeValueType">
|
27
|
-
<el-radio :label="0">文本</el-radio>
|
28
|
-
<el-radio :label="1">数值</el-radio>
|
29
|
-
<el-radio :label="2">布尔值</el-radio>
|
30
|
-
</el-radio-group>
|
31
|
-
</el-form-item>
|
32
|
-
<el-form-item label="默认值" style="width: 300px;">
|
33
|
-
<el-input v-model="defaultValue" v-if="!optionItemValueType"></el-input>
|
34
|
-
<base-input-number v-model="defaultValue" ref="defaultNumberInput"
|
35
|
-
v-if="optionItemValueType==1"/>
|
36
|
-
<el-select v-model="defaultValue" v-if="optionItemValueType===2" clearable
|
37
|
-
@clear="defaultValue=null">
|
38
|
-
<el-option :value="true" label="true"></el-option>
|
39
|
-
<el-option :value="false" label="false"></el-option>
|
40
|
-
</el-select>
|
41
|
-
</el-form-item>
|
42
48
|
<el-table
|
43
49
|
ref="singleTable"
|
44
50
|
width="100%"
|
@@ -64,9 +70,9 @@
|
|
64
70
|
</el-table-column>
|
65
71
|
<el-table-column label="字段值" width="150" prop="value">
|
66
72
|
<template slot-scope="scope">
|
67
|
-
<el-input v-model="scope.row.value" v-if="optionItemValueType===0"></el-input>
|
68
|
-
<base-input-number v-model="scope.row.value" v-if="optionItemValueType===1"></base-input-number>
|
69
|
-
<template v-if="optionItemValueType===2">{{ scope.row.value }}</template>
|
73
|
+
<el-input v-model="scope.row.value" v-if="optionModel.optionItemValueType===0"></el-input>
|
74
|
+
<base-input-number v-model="scope.row.value" v-if="optionModel.optionItemValueType===1"></base-input-number>
|
75
|
+
<template v-if="optionModel.optionItemValueType===2">{{ scope.row.value }}</template>
|
70
76
|
</template>
|
71
77
|
</el-table-column>
|
72
78
|
<el-table-column label="状态颜色" width="100" prop="type">
|
@@ -181,8 +187,8 @@ export default {
|
|
181
187
|
})
|
182
188
|
},
|
183
189
|
confirmDialog() {
|
184
|
-
this.optionModel.optionItemValueType = this.optionItemValueType;
|
185
|
-
this.optionModel.defaultValue = (this.defaultValue === "" || this.defaultValue === undefined) ? null : this.defaultValue;
|
190
|
+
// this.optionModel.optionItemValueType = this.optionItemValueType;
|
191
|
+
// this.optionModel.defaultValue = (this.defaultValue === "" || this.defaultValue === undefined) ? null : this.defaultValue;
|
186
192
|
this.optionModel.statusParam = this.$baseLodash.cloneDeep(this.tableData);
|
187
193
|
this.showDialog = false;
|
188
194
|
this.$nextTick(() => {
|
@@ -195,23 +201,24 @@ export default {
|
|
195
201
|
this.tableData.splice(rowIndex, 1);
|
196
202
|
},
|
197
203
|
changeValueType(val) {
|
198
|
-
this.tableData =
|
204
|
+
// this.tableData = this.$baseLodash.cloneDeep(this.optionModel.statusParam);
|
205
|
+
this.optionModel.statusParam = [];
|
199
206
|
if (val == 2) {
|
200
|
-
this.
|
207
|
+
this.optionModel.statusParam.push({
|
201
208
|
label: "是",
|
202
209
|
value: true,
|
203
210
|
type: "success"
|
204
211
|
});
|
205
|
-
this.
|
212
|
+
this.optionModel.statusParam.push({
|
206
213
|
label: "否",
|
207
214
|
value: false,
|
208
215
|
type: "danger"
|
209
216
|
});
|
210
217
|
}
|
211
218
|
if (val == 1) {
|
212
|
-
this.defaultValue = undefined
|
219
|
+
this.optionModel.defaultValue = undefined
|
213
220
|
} else {
|
214
|
-
this.defaultValue = null
|
221
|
+
this.optionModel.defaultValue = null
|
215
222
|
}
|
216
223
|
|
217
224
|
}
|
@@ -29,14 +29,14 @@
|
|
29
29
|
<el-form-item :label="i18nt('词汇编码')" v-if="optionModel.commonAttributeEnabled">
|
30
30
|
<el-input type="text" v-model="optionModel.commonAttributeCode"></el-input>
|
31
31
|
</el-form-item>
|
32
|
-
<el-form-item :label="i18nt('显示字段')" v-if="optionModel.formScriptEnabled || optionModel.commonAttributeEnabled">
|
32
|
+
<!-- <el-form-item :label="i18nt('显示字段')" v-if="optionModel.formScriptEnabled || optionModel.commonAttributeEnabled">
|
33
33
|
<el-input type="text" v-model="optionModel.labelKey" :disabled="optionModel.commonAttributeEnabled"></el-input>
|
34
34
|
</el-form-item>
|
35
35
|
<el-form-item :label="i18nt('关联字段')" v-if="optionModel.formScriptEnabled || optionModel.commonAttributeEnabled">
|
36
36
|
<el-input type="text" v-model="optionModel.valueKey" :disabled="optionModel.commonAttributeEnabled"></el-input>
|
37
|
-
</el-form-item>
|
37
|
+
</el-form-item> -->
|
38
38
|
</template>
|
39
|
-
<el-form-item label="查询回调">
|
39
|
+
<el-form-item label="查询回调" v-if="optionModel.formScriptEnabled || optionModel.commonAttributeEnabled">
|
40
40
|
<a href="javascript:void(0);" class="a-link link-oneLind"
|
41
41
|
@click="editEventHandler('formScriptSuccess', ['dataId', 'formCode','res'])">
|
42
42
|
<span>{{ optionModel.formScriptSuccess }}</span>
|
@@ -61,7 +61,7 @@ export default {
|
|
61
61
|
},
|
62
62
|
data() {
|
63
63
|
return {
|
64
|
-
formScriptEnabledTypes: ['select', 'checkbox', 'radio', 'census']
|
64
|
+
formScriptEnabledTypes: ['select', 'checkbox', 'radio', 'census','status']
|
65
65
|
}
|
66
66
|
},
|
67
67
|
methods: {
|
@@ -70,20 +70,25 @@ export default {
|
|
70
70
|
},
|
71
71
|
changeFormScriptEnabled(val){
|
72
72
|
if(val){
|
73
|
-
|
74
|
-
this.optionModel.commonAttributeEnabled = false
|
75
|
-
}
|
73
|
+
this.optionModel.commonAttributeEnabled = false
|
76
74
|
}
|
75
|
+
this.handleLabelAndValueKey();
|
77
76
|
},
|
78
77
|
changeCommonAttributeEnabled(val){
|
79
78
|
if(val){
|
80
79
|
this.optionModel.formScriptEnabled = false;
|
80
|
+
}
|
81
|
+
this.handleLabelAndValueKey();
|
82
|
+
},
|
83
|
+
handleLabelAndValueKey(){
|
84
|
+
if(this.optionModel.commonAttributeEnabled){
|
81
85
|
this.optionModel.labelKey = "value";
|
82
86
|
this.optionModel.valueKey = "sn";
|
83
|
-
}else{
|
84
|
-
|
85
|
-
|
87
|
+
}else {
|
88
|
+
this.optionModel.labelKey = "label";
|
89
|
+
this.optionModel.valueKey = "value";
|
86
90
|
}
|
91
|
+
|
87
92
|
}
|
88
93
|
}
|
89
94
|
}
|
@@ -907,6 +907,7 @@ const projectTagConfig = {
|
|
907
907
|
const httpConfig = {
|
908
908
|
httpFormCode: null,
|
909
909
|
formScriptEnabled: true,
|
910
|
+
commonAttributeEnabled:false,
|
910
911
|
formScriptCode: null,
|
911
912
|
formScriptParam: null,
|
912
913
|
formScriptSuccess: null,
|
@@ -3240,6 +3241,10 @@ export const advancedFields = [
|
|
3240
3241
|
optionItemValueType: 0,
|
3241
3242
|
statusType: "common",
|
3242
3243
|
statusParam: [],
|
3244
|
+
|
3245
|
+
...httpConfig,
|
3246
|
+
formScriptEnabled:false,
|
3247
|
+
|
3243
3248
|
onCreated: "",
|
3244
3249
|
onMounted: "",
|
3245
3250
|
...defaultWfConfig,
|
@@ -206,15 +206,18 @@
|
|
206
206
|
</component>
|
207
207
|
</template>-->
|
208
208
|
<template #widget="obj">
|
209
|
-
<template
|
210
|
-
v-if="!!fieldSchemaMap[obj.row._X_ROW_KEY] && fieldSchemaMap[obj.row._X_ROW_KEY][obj.column.params.widget.id]">
|
209
|
+
<template v-if="!!getTableColumnWidget(obj)">
|
211
210
|
<template v-if="obj.column.params.widget.type == 'status'">
|
212
|
-
<template
|
213
|
-
v-
|
214
|
-
|
215
|
-
v-if="
|
216
|
-
:key="
|
211
|
+
<template v-for="(item,index) in getTableColumnWidget(obj).options.statusParam">
|
212
|
+
<template v-if="isShowColumnStatusWidget(obj,item)">
|
213
|
+
<span
|
214
|
+
v-if="getTableColumnWidget(obj).options.formScriptEnabled || getTableColumnWidget(obj).options.commonAttributeEnabled"
|
215
|
+
:key="getTableColumnWidget(obj).id+'-'+index">{{ getI18nLabel(item.label) }}</span>
|
216
|
+
<span
|
217
|
+
v-else
|
218
|
+
:key="getTableColumnWidget(obj).id+'-'+index" class="list-tag"
|
217
219
|
:class="item.type">{{ getI18nLabel(item.label) }}</span>
|
220
|
+
</template>
|
218
221
|
</template>
|
219
222
|
</template>
|
220
223
|
<component
|
@@ -13,6 +13,7 @@ import {
|
|
13
13
|
deepClone,
|
14
14
|
loopHandleWidget,
|
15
15
|
columnFormatMap,
|
16
|
+
traverseAllWidgetsNew
|
16
17
|
} from "../../../../components/xform/utils/util";
|
17
18
|
import { tableTreeMixins } from "../../../../mixins/tableTree/index.js";
|
18
19
|
|
@@ -176,12 +177,114 @@ modules = {
|
|
176
177
|
},
|
177
178
|
mounted: async function () {
|
178
179
|
this.handleOnMounted();
|
179
|
-
this.
|
180
|
+
this.initColumnWidgetConfig(()=>{
|
181
|
+
this.initTableList();
|
182
|
+
});
|
180
183
|
},
|
181
184
|
beforeDestroy: function () {
|
182
185
|
this.unregisterFromRefList();
|
183
186
|
},
|
184
187
|
methods: {
|
188
|
+
getTableColumnWidget(obj){
|
189
|
+
let item = this.fieldSchemaMap[obj.row._X_ROW_KEY];
|
190
|
+
return item ? item[obj.column.params?.widget.id]: null;
|
191
|
+
},
|
192
|
+
isShowColumnStatusWidget(obj,item){
|
193
|
+
let widget = this.getTableColumnWidget(obj);
|
194
|
+
let valueKey = widget.options.valueKey || "value"
|
195
|
+
return obj.row[this.getTableColumnWidgetFieldKeyName(obj)] === item[valueKey]
|
196
|
+
},
|
197
|
+
getTableColumnWidgetFieldKeyName(obj){
|
198
|
+
let widget = this.getTableColumnWidget(obj);
|
199
|
+
return widget ? this.getFieldKeyName(widget): null;
|
200
|
+
},
|
201
|
+
initColumnWidgetConfig(callback){
|
202
|
+
let tableColumns = this.widget.options.tableColumns;
|
203
|
+
let requests = [];
|
204
|
+
this.loodHandleColumns(tableColumns, (row)=>{
|
205
|
+
requests.push(this.handleColumnWidgetConfig(row.widget))
|
206
|
+
requests.push(this.handleColumnWidgetConfig(row.editWidget))
|
207
|
+
let widgetList = row.widgetList;
|
208
|
+
if(widgetList && widgetList.length){
|
209
|
+
traverseAllWidgetsNew(widgetList, (widget)=>{
|
210
|
+
requests.push(this.handleColumnWidgetConfig(widget))
|
211
|
+
})
|
212
|
+
}
|
213
|
+
})
|
214
|
+
if(requests.length){
|
215
|
+
Promise.all(requests).then(()=>{
|
216
|
+
callback()
|
217
|
+
})
|
218
|
+
}else{
|
219
|
+
callback()
|
220
|
+
}
|
221
|
+
|
222
|
+
},
|
223
|
+
fillColumnWidgetOptionItems(widget,rows){
|
224
|
+
let widgetType = widget.type;
|
225
|
+
let formScriptEnabledTypes = ['select', 'checkbox', 'radio']
|
226
|
+
if(formScriptEnabledTypes.includes(widgetType)){
|
227
|
+
widget.options.optionItems = rows || [];
|
228
|
+
}else if(widgetType=="status"){
|
229
|
+
widget.options.statusParam = rows || [];
|
230
|
+
}
|
231
|
+
widget._syncInited = true;
|
232
|
+
},
|
233
|
+
async handleColumnWidgetConfig(widget,callback){
|
234
|
+
if(!widget)return
|
235
|
+
let widgetType = widget.type;
|
236
|
+
let formScriptEnabledTypes = ['select', 'checkbox', 'radio', 'status']
|
237
|
+
if(!formScriptEnabledTypes.includes(widgetType))return
|
238
|
+
|
239
|
+
let formScriptEnabled = widget.options.formScriptEnabled || false;
|
240
|
+
let commonAttributeEnabled = widget.options.commonAttributeEnabled || false;
|
241
|
+
let commonAttributeCode = widget.options.commonAttributeCode;
|
242
|
+
if (commonAttributeEnabled) {
|
243
|
+
if (!commonAttributeCode) return;
|
244
|
+
}
|
245
|
+
|
246
|
+
if(!formScriptEnabled && !commonAttributeEnabled)return
|
247
|
+
|
248
|
+
let reportTemplate = this.getFormRef().reportTemplate;
|
249
|
+
let formCode = reportTemplate.formCode;
|
250
|
+
let scriptCode = widget.options.formScriptCode || "getList";
|
251
|
+
let fieldKeyName = this.getFieldKeyName(widget)
|
252
|
+
|
253
|
+
if (formScriptEnabled) {
|
254
|
+
let accessParam = this.handleCustomEvent(
|
255
|
+
widget.options.formScriptParam
|
256
|
+
);
|
257
|
+
return this.formHttp({
|
258
|
+
scriptCode: scriptCode,
|
259
|
+
data: {
|
260
|
+
formCode: formCode,
|
261
|
+
formVersion: reportTemplate.formVersion,
|
262
|
+
taBm: fieldKeyName,
|
263
|
+
data: {
|
264
|
+
...accessParam,
|
265
|
+
},
|
266
|
+
},
|
267
|
+
success: (res) => {
|
268
|
+
let rows = res.objx || [];
|
269
|
+
this.fillColumnWidgetOptionItems(widget,rows)
|
270
|
+
}
|
271
|
+
});
|
272
|
+
} else if (commonAttributeEnabled) {
|
273
|
+
let accessParam = this.handleCustomEvent(
|
274
|
+
widget.options.formScriptParam
|
275
|
+
);
|
276
|
+
|
277
|
+
return this.$getBaseDicts({
|
278
|
+
code: commonAttributeCode,
|
279
|
+
data:{
|
280
|
+
...accessParam
|
281
|
+
},
|
282
|
+
success: ({dicts, dictMap}) => {
|
283
|
+
this.fillColumnWidgetOptionItems(widget,dicts)
|
284
|
+
}
|
285
|
+
});
|
286
|
+
}
|
287
|
+
},
|
185
288
|
initConfig() {
|
186
289
|
let formRef = this.getFormRef();
|
187
290
|
this.widget.options.tableColumns.forEach((row) => {
|
@@ -626,7 +729,11 @@ modules = {
|
|
626
729
|
this.rowWidgetList = rowWidgetList;
|
627
730
|
return this.$baseLodash.cloneDeep(newColumns);
|
628
731
|
},
|
629
|
-
initTableList() {
|
732
|
+
async initTableList() {
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
|
630
737
|
let that = this;
|
631
738
|
let path = null;
|
632
739
|
let paramFun = null;
|
@@ -1215,9 +1322,10 @@ modules = {
|
|
1215
1322
|
let columnLoopDo = (t, e) => {
|
1216
1323
|
callback && callback(t);
|
1217
1324
|
if (t.children && t.children.length) {
|
1218
|
-
|
1325
|
+
this.loodHandleColumns(t.children,callback)
|
1326
|
+
/* for (let item of t.children) {
|
1219
1327
|
columnLoopDo(item);
|
1220
|
-
}
|
1328
|
+
} */
|
1221
1329
|
}
|
1222
1330
|
};
|
1223
1331
|
for (let item of columns) {
|
@@ -45,66 +45,66 @@ modules = {
|
|
45
45
|
return this.getFormRef ? this.getFormRef() : this;
|
46
46
|
},
|
47
47
|
formHttp(opts) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
return new Promise((resolve, reject) => {
|
49
|
+
let data = opts.data;
|
50
|
+
let scriptCode = opts.scriptCode ? opts.scriptCode.trim() : null;
|
51
|
+
let formCode = opts.formCode ? opts.formCode.trim() : null;
|
52
|
+
let isLoading = opts.isLoading ?? true;
|
53
|
+
let success = opts.success;
|
54
|
+
let fail = opts.fail;
|
55
|
+
let error = opts.error;
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
57
|
+
let that = this;
|
58
|
+
let reportTemplate = that.getFormRef ? that.getFormRef().reportTemplate : that.reportTemplate;
|
59
|
+
if (scriptCode && !formCode) {
|
60
|
+
let arr = scriptCode.split("/").filter(item => item)
|
61
|
+
if (arr.length > 1) {
|
62
|
+
formCode = arr[0];
|
63
|
+
scriptCode = arr[1];
|
64
|
+
}
|
65
|
+
}
|
66
|
+
if (!formCode) {
|
67
|
+
formCode = reportTemplate.formCode
|
63
68
|
}
|
64
|
-
}
|
65
|
-
if (!formCode) {
|
66
|
-
formCode = reportTemplate.formCode
|
67
|
-
}
|
68
69
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
70
|
+
delete opts.data
|
71
|
+
delete opts.scriptCode
|
72
|
+
delete opts.formCode
|
73
|
+
delete opts.isLoading
|
74
|
+
delete opts.success
|
75
|
+
delete opts.fail
|
76
|
+
delete opts.error
|
76
77
|
|
77
78
|
|
78
|
-
|
79
|
+
let getServiceName = (callback) => {
|
79
80
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
81
|
+
if (formCode && formCode !== reportTemplate.formCode) {
|
82
|
+
this.getHttpTarget().$http({
|
83
|
+
// aes: true,
|
84
|
+
url: USER_PREFIX + `/formScript/getServiceName`,
|
85
|
+
method: `post`,
|
86
|
+
data: {
|
87
|
+
formCode,
|
88
|
+
scriptCode
|
89
|
+
},
|
90
|
+
isLoading,
|
91
|
+
// loadingTarget: this.getLoadingTarget(),
|
92
|
+
// modalStrictly: true,
|
93
|
+
success: res => {
|
94
|
+
let serviceName = res.objx;
|
95
|
+
if (serviceName) {
|
96
|
+
callback(serviceName)
|
97
|
+
} else {
|
98
|
+
this.$baseAlert("服务名不存在")
|
99
|
+
}
|
98
100
|
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
|
103
|
-
}
|
101
|
+
});
|
102
|
+
} else {
|
103
|
+
callback(reportTemplate.serviceName)
|
104
|
+
}
|
104
105
|
|
105
|
-
|
106
|
-
|
107
|
-
return new Promise((resolve, reject) => {
|
106
|
+
}
|
107
|
+
let toDo = () => {
|
108
108
|
getServiceName(searviceName => {
|
109
109
|
let reqData;
|
110
110
|
reqData = data;
|
@@ -164,15 +164,16 @@ modules = {
|
|
164
164
|
}
|
165
165
|
});
|
166
166
|
})
|
167
|
-
}
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
}
|
173
|
-
|
174
|
-
|
175
|
-
}
|
167
|
+
}
|
168
|
+
if (opts.isConfirm) {
|
169
|
+
this.$baseConfirm(opts.confirmText).then(() => {
|
170
|
+
toDo();
|
171
|
+
});
|
172
|
+
} else {
|
173
|
+
toDo();
|
174
|
+
}
|
175
|
+
});
|
176
|
+
|
176
177
|
}
|
177
178
|
}
|
178
179
|
}
|
package/src/utils/request.js
CHANGED
@@ -182,14 +182,20 @@ function handleCreateInfo(config, res) {
|
|
182
182
|
let data = res.objx;
|
183
183
|
if (typeof res.objx === "object") {
|
184
184
|
if (Array.isArray(data)) {
|
185
|
-
|
185
|
+
for(let item of res.objx){
|
186
186
|
toDo(item);
|
187
|
-
}
|
187
|
+
}
|
188
|
+
/* res.objx.forEach(item => {
|
189
|
+
toDo(item);
|
190
|
+
}) */
|
188
191
|
} else if (data && res.objx.hasOwnProperty("records")) {
|
189
192
|
let records = res.objx.records || [];
|
190
|
-
|
193
|
+
for(let item of records){
|
194
|
+
toDo(item);
|
195
|
+
}
|
196
|
+
/* records.forEach(item => {
|
191
197
|
toDo(item);
|
192
|
-
})
|
198
|
+
}) */
|
193
199
|
} else {
|
194
200
|
toDo(res.objx);
|
195
201
|
}
|
@@ -231,7 +237,18 @@ async function handleNickName2(option) {
|
|
231
237
|
data = res.objx.records;
|
232
238
|
}
|
233
239
|
let requestData = [];
|
234
|
-
|
240
|
+
for(let item of data){
|
241
|
+
let createBy = getCreateBy(item);
|
242
|
+
let modifyBy = getModifyBy(item);
|
243
|
+
|
244
|
+
if (createBy && !requestData.includes(createBy)) {
|
245
|
+
requestData.push(createBy)
|
246
|
+
}
|
247
|
+
if (modifyBy && !requestData.includes(modifyBy)) {
|
248
|
+
requestData.push(modifyBy)
|
249
|
+
}
|
250
|
+
}
|
251
|
+
/* data.forEach(item => {
|
235
252
|
let createBy = getCreateBy(item);
|
236
253
|
let modifyBy = getModifyBy(item);
|
237
254
|
|
@@ -241,7 +258,7 @@ async function handleNickName2(option) {
|
|
241
258
|
if (modifyBy && !requestData.includes(modifyBy)) {
|
242
259
|
requestData.push(modifyBy)
|
243
260
|
}
|
244
|
-
})
|
261
|
+
}) */
|
245
262
|
if (!requestData.length) {
|
246
263
|
callback && callback(res)
|
247
264
|
return
|
@@ -259,7 +276,25 @@ async function handleNickName2(option) {
|
|
259
276
|
isLoading: isLoading,
|
260
277
|
success: res2 => {
|
261
278
|
let arr = res2.objx || [];
|
262
|
-
|
279
|
+
for(let item of data){
|
280
|
+
let createBy = getCreateBy(item);
|
281
|
+
let modifyBy = getModifyBy(item);
|
282
|
+
if (createBy) {
|
283
|
+
let obj = arr.find(item => item.loginAccount === createBy);
|
284
|
+
if (obj && obj.nickName) {
|
285
|
+
item._createNickName = obj.nickName;
|
286
|
+
item._createMobile = obj.mobile;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
if (modifyBy) {
|
290
|
+
let obj = arr.find(item => item.loginAccount === modifyBy);
|
291
|
+
if (obj && obj.nickName) {
|
292
|
+
item._modifyNickName = obj.nickName;
|
293
|
+
item._modifyMobile = obj.mobile;
|
294
|
+
}
|
295
|
+
}
|
296
|
+
}
|
297
|
+
/* data.forEach(item => {
|
263
298
|
let createBy = getCreateBy(item);
|
264
299
|
let modifyBy = getModifyBy(item);
|
265
300
|
if (createBy) {
|
@@ -276,7 +311,7 @@ async function handleNickName2(option) {
|
|
276
311
|
item._modifyMobile = obj.mobile;
|
277
312
|
}
|
278
313
|
}
|
279
|
-
})
|
314
|
+
}) */
|
280
315
|
}
|
281
316
|
});
|
282
317
|
}
|