cloud-web-corejs 1.0.54-dev.254 → 1.0.54-dev.256
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/VabUpload/mixins.js +1470 -1
- package/src/components/VabUpload/propertiesDialog.vue +1 -1
- package/src/components/VabUpload/view.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +2 -2
- package/src/components/xform/form-render/container-item/data-table-item.vue +1 -1
- package/src/utils/request.js +324 -1
- package/src/views/bd/setting/config_manage/list.vue +4 -2
- package/src/views/bd/setting/request_async_setting/edit.vue +267 -0
- package/src/views/bd/setting/request_async_setting/list.vue +254 -0
- package/src/views/bd/setting/request_setting/edit.vue +258 -0
- package/src/views/bd/setting/request_setting/list.vue +248 -0
@@ -0,0 +1,267 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="detail-wrap">
|
3
|
+
<el-form ref="editForm" :model="requestAsyncSetting">
|
4
|
+
<div class="d-header clearfix">
|
5
|
+
<div class="fl">
|
6
|
+
<i class="el-icon-info"/>
|
7
|
+
{{ dataId ? $t1('查看异步推送数据') : $t1('新增异步推送数据') }}
|
8
|
+
</div>
|
9
|
+
<div class="fr">
|
10
|
+
<el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">
|
11
|
+
{{ $t1('重置') }}
|
12
|
+
</el-button>
|
13
|
+
<el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData">{{ $t1('保存') }}
|
14
|
+
</el-button>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<div class="d-cont">
|
18
|
+
<div class="d-item">
|
19
|
+
<div class="title first"><b>{{ $t1('基本信息') }}</b></div>
|
20
|
+
<table class="table-detail">
|
21
|
+
<tbody>
|
22
|
+
<tr>
|
23
|
+
<th>
|
24
|
+
<em class="f-red">*</em>
|
25
|
+
{{ $t1('请求编码') }}
|
26
|
+
</th>
|
27
|
+
<td colspan="5">
|
28
|
+
<el-form-item prop="reqCode" :rules="[{ required: true, trigger: 'blur' }]">
|
29
|
+
<el-input type="text" autocomplete="off" v-model="requestAsyncSetting.reqCode" clearable/>
|
30
|
+
</el-form-item>
|
31
|
+
</td>
|
32
|
+
</tr>
|
33
|
+
<tr>
|
34
|
+
<th>
|
35
|
+
<em class="f-red">*</em>
|
36
|
+
{{ $t1('请求名称') }}
|
37
|
+
</th>
|
38
|
+
<td colspan="5">
|
39
|
+
<el-form-item prop="reqName" :rules="[{ required: true, trigger: 'blur' }]">
|
40
|
+
<el-input type="text" autocomplete="off" v-model="requestAsyncSetting.reqName" clearable/>
|
41
|
+
</el-form-item>
|
42
|
+
</td>
|
43
|
+
</tr>
|
44
|
+
<tr>
|
45
|
+
<th>
|
46
|
+
<em class="f-red">*</em>
|
47
|
+
{{ $t1('执行组织编码') }}
|
48
|
+
</th>
|
49
|
+
<td colspan="5">
|
50
|
+
<el-form-item prop="exeCompanyCode" :rules="[{ required: true, trigger: 'blur' }]">
|
51
|
+
<el-input type="text" autocomplete="off" v-model="requestAsyncSetting.exeCompanyCode" clearable/>
|
52
|
+
</el-form-item>
|
53
|
+
</td>
|
54
|
+
<td colspan="2"><span class="tips_1">{{ $t1('注:多个用逗号","隔开') }}</span></td>
|
55
|
+
</tr>
|
56
|
+
<tr>
|
57
|
+
<th>
|
58
|
+
<em class="f-red">*</em>
|
59
|
+
{{ $t1('请求Url') }}
|
60
|
+
</th>
|
61
|
+
<td colspan="7">
|
62
|
+
<el-form-item prop="url" :rules="[{ required: true, trigger: 'blur' }]">
|
63
|
+
<el-input type="text" autocomplete="off" v-model="requestAsyncSetting.url" clearable/>
|
64
|
+
</el-form-item>
|
65
|
+
</td>
|
66
|
+
</tr>
|
67
|
+
<tr>
|
68
|
+
<th>
|
69
|
+
{{ $t1('请求头') }}
|
70
|
+
</th>
|
71
|
+
<td colspan="7">
|
72
|
+
<el-form-item prop="header" :rules="[{ required: false, trigger: 'blur' }]">
|
73
|
+
<el-input type="textarea" :rows="2" :placeholder="$t1('请输入内容')" size="small"
|
74
|
+
v-model="requestAsyncSetting.header"
|
75
|
+
clearable></el-input>
|
76
|
+
</el-form-item>
|
77
|
+
</td>
|
78
|
+
</tr>
|
79
|
+
<tr>
|
80
|
+
<th>
|
81
|
+
{{ $t1('连接超时(ms)') }}
|
82
|
+
</th>
|
83
|
+
<td>
|
84
|
+
<el-form-item prop="connectTimeout" :rules="[{ required: false, trigger: 'blur' }]">
|
85
|
+
<base-input-number v-model="requestAsyncSetting.connectTimeout" clearable/>
|
86
|
+
</el-form-item>
|
87
|
+
</td>
|
88
|
+
<td colspan="2"><span class="tips_1">{{ $t1('注:不填默认10000毫秒') }}</span></td>
|
89
|
+
<th>
|
90
|
+
{{ $t1('读取超时(ms)') }}
|
91
|
+
</th>
|
92
|
+
<td>
|
93
|
+
<el-form-item prop="readTimeout" :rules="[{ required: false, trigger: 'blur' }]">
|
94
|
+
<base-input-number v-model="requestAsyncSetting.readTimeout" clearable/>
|
95
|
+
</el-form-item>
|
96
|
+
</td>
|
97
|
+
<td colspan="2"><span class="tips_1">{{ $t1('注:不填默认60000毫秒') }}</span></td>
|
98
|
+
</tr>
|
99
|
+
<tr>
|
100
|
+
<th>
|
101
|
+
<em class="f-red">*</em>
|
102
|
+
{{ $t1('是否启用') }}
|
103
|
+
</th>
|
104
|
+
<td>
|
105
|
+
<el-form-item prop="enabled" :rules="[{ required: true, trigger: 'blur' }]">
|
106
|
+
<el-radio-group v-model="requestAsyncSetting.enabled">
|
107
|
+
<el-radio :label="true">{{ $t1('启用') }}</el-radio>
|
108
|
+
<el-radio :label="false">{{ $t1('禁用') }}</el-radio>
|
109
|
+
</el-radio-group>
|
110
|
+
</el-form-item>
|
111
|
+
</td>
|
112
|
+
<th>
|
113
|
+
<em class="f-red">*</em>
|
114
|
+
{{ $t1('调度任务编码') }}
|
115
|
+
</th>
|
116
|
+
<td>
|
117
|
+
<el-form-item prop="taskCode" :rules="[{ required: true, trigger: 'blur' }]">
|
118
|
+
<el-input type="text" autocomplete="off" v-model="requestAsyncSetting.taskCode" clearable/>
|
119
|
+
</el-form-item>
|
120
|
+
</td>
|
121
|
+
</tr>
|
122
|
+
<tr>
|
123
|
+
<th>
|
124
|
+
{{ $t1('备注') }}
|
125
|
+
</th>
|
126
|
+
<td colspan="7">
|
127
|
+
<el-form-item prop="remark" :rules="[{ required: false, trigger: 'blur' }]">
|
128
|
+
<el-input type="textarea" :rows="2" :placeholder="$t1('请输入内容')" size="small"
|
129
|
+
v-model="requestAsyncSetting.remark"
|
130
|
+
clearable></el-input>
|
131
|
+
</el-form-item>
|
132
|
+
</td>
|
133
|
+
</tr>
|
134
|
+
<!-- <tr>
|
135
|
+
<th>
|
136
|
+
{{ $t1('前置脚本') }}
|
137
|
+
<scriptTestButton :script.sync="requestAsyncSetting.preScript"></scriptTestButton>
|
138
|
+
</th>
|
139
|
+
<td colspan="7">
|
140
|
+
<el-form-item prop="preScript" :rules="[{ required: false, trigger: 'blur' }]">
|
141
|
+
<code-editor mode="java" :readonly="!1" v-model="requestAsyncSetting.preScript"
|
142
|
+
v-if="showCodeEditor"></code-editor>
|
143
|
+
</el-form-item>
|
144
|
+
</td>
|
145
|
+
</tr>-->
|
146
|
+
<tr>
|
147
|
+
<th>
|
148
|
+
{{ $t1('脚本') }}
|
149
|
+
<scriptTestButton :script.sync="requestAsyncSetting.script"></scriptTestButton>
|
150
|
+
</th>
|
151
|
+
<td colspan="7">
|
152
|
+
<el-form-item prop="postScript" :rules="[{ required: false, trigger: 'blur' }]">
|
153
|
+
<code-editor mode="java" :readonly="!1" v-model="requestAsyncSetting.script"
|
154
|
+
v-if="showCodeEditor"></code-editor>
|
155
|
+
</el-form-item>
|
156
|
+
</td>
|
157
|
+
</tr>
|
158
|
+
<tr>
|
159
|
+
<th>{{ $t1('创建人') }}</th>
|
160
|
+
<td>{{ requestAsyncSetting.createBy }}</td>
|
161
|
+
<th>{{ $t1('创建时间') }}</th>
|
162
|
+
<td>{{ requestAsyncSetting.createDate }}</td>
|
163
|
+
<th>{{ $t1('更新人') }}</th>
|
164
|
+
<td>{{ requestAsyncSetting.modifyBy }}</td>
|
165
|
+
<th>{{ $t1('更新时间') }}</th>
|
166
|
+
<td>{{ requestAsyncSetting.modifyDate }}</td>
|
167
|
+
</tr>
|
168
|
+
</tbody>
|
169
|
+
</table>
|
170
|
+
</div>
|
171
|
+
</div>
|
172
|
+
</el-form>
|
173
|
+
</div>
|
174
|
+
</template>
|
175
|
+
|
176
|
+
<script>
|
177
|
+
export default {
|
178
|
+
name: 'request_async_settingEdit',
|
179
|
+
props: {
|
180
|
+
_dataId: [String, Number],
|
181
|
+
copyId: [String, Number]
|
182
|
+
},
|
183
|
+
components: {},
|
184
|
+
data() {
|
185
|
+
return {
|
186
|
+
isEdit: false,
|
187
|
+
tabIndex: 'first',
|
188
|
+
dataId: '',
|
189
|
+
requestAsyncSetting: {
|
190
|
+
enabled: true,
|
191
|
+
connectTimeout: 10000,
|
192
|
+
readTimeout: 60000,
|
193
|
+
script: null,
|
194
|
+
postScript: null,
|
195
|
+
exeCompanyCode: null
|
196
|
+
},
|
197
|
+
showCodeEditor: false
|
198
|
+
};
|
199
|
+
},
|
200
|
+
created() {
|
201
|
+
if (this._dataId && !isNaN(this._dataId)) this.dataId = this._dataId;
|
202
|
+
},
|
203
|
+
mounted() {
|
204
|
+
this.getData();
|
205
|
+
},
|
206
|
+
methods: {
|
207
|
+
getData() {
|
208
|
+
if (this.copyId) {
|
209
|
+
return;
|
210
|
+
}
|
211
|
+
if (this.dataId && !isNaN(this.dataId)) {
|
212
|
+
this.isEdit = true;
|
213
|
+
this.$commonHttp({
|
214
|
+
url: USER_PREFIX + `/request_async_setting/get`,
|
215
|
+
method: `post`,
|
216
|
+
data: {
|
217
|
+
id: this.dataId
|
218
|
+
},
|
219
|
+
isLoading: true,
|
220
|
+
modalStrictly: true,
|
221
|
+
success: res => {
|
222
|
+
this.requestAsyncSetting = res.objx || {};
|
223
|
+
this.showCodeEditor = true;
|
224
|
+
}
|
225
|
+
});
|
226
|
+
} else {
|
227
|
+
this.showCodeEditor = true;
|
228
|
+
}
|
229
|
+
},
|
230
|
+
saveData() {
|
231
|
+
this.$refs.editForm.$baseValidate(valid => {
|
232
|
+
if (valid) {
|
233
|
+
this.$baseConfirm(this.$t1('您确定要保存吗?')).then(() => {
|
234
|
+
var url = USER_PREFIX + (this.isEdit ? `/request_async_setting/update` : `/request_async_setting/save`);
|
235
|
+
this.$http({
|
236
|
+
url: url,
|
237
|
+
method: `post`,
|
238
|
+
data: this.requestAsyncSetting,
|
239
|
+
isLoading: true,
|
240
|
+
success: res => {
|
241
|
+
this.$message({
|
242
|
+
message: res.content,
|
243
|
+
type: 'success',
|
244
|
+
duration: 500,
|
245
|
+
onClose: t => {
|
246
|
+
if (this.isEdit) {
|
247
|
+
this.$baseReload();
|
248
|
+
} else {
|
249
|
+
this.$baseReload({
|
250
|
+
updateParam: {
|
251
|
+
_dataId: res.objx,
|
252
|
+
copyId: null
|
253
|
+
}
|
254
|
+
});
|
255
|
+
}
|
256
|
+
}
|
257
|
+
});
|
258
|
+
}
|
259
|
+
});
|
260
|
+
});
|
261
|
+
}
|
262
|
+
});
|
263
|
+
}
|
264
|
+
}
|
265
|
+
};
|
266
|
+
|
267
|
+
</script>
|
@@ -0,0 +1,254 @@
|
|
1
|
+
<template>
|
2
|
+
<div id="containt">
|
3
|
+
<el-tabs v-model="activeName" class="tab-box">
|
4
|
+
<el-tab-pane :label="$t1('常规')" name="first">
|
5
|
+
<editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :copyId.sync="copyId"
|
6
|
+
:parent-target="_self" @reload="$reloadHandle"></editView>
|
7
|
+
</el-tab-pane>
|
8
|
+
<el-tab-pane :label="$t1('列表')" name="second">
|
9
|
+
<div class="grid-height">
|
10
|
+
<vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
|
11
|
+
@custom="$vxeTableUtil.customHandle">
|
12
|
+
<template #form>
|
13
|
+
<div class="clearfix screen-btns">
|
14
|
+
<div class="fl">
|
15
|
+
<vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog">
|
16
|
+
{{ $t1('新增') }}
|
17
|
+
</vxe-button>
|
18
|
+
</div>
|
19
|
+
<div class="fr">
|
20
|
+
<vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
|
21
|
+
plain>{{ $t1('重置') }}
|
22
|
+
</vxe-button>
|
23
|
+
<vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
|
24
|
+
{{ $t1('搜索') }}
|
25
|
+
</vxe-button>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
|
29
|
+
@submit="searchEvent" @reset="searchEvent">
|
30
|
+
<vxe-form-item title="请求编码:" field="reqCode">
|
31
|
+
<template v-slot>
|
32
|
+
<el-input v-model="formData.reqCode" size="small" clearable/>
|
33
|
+
</template>
|
34
|
+
</vxe-form-item>
|
35
|
+
<vxe-form-item title="请求名称:" field="reqName">
|
36
|
+
<template v-slot>
|
37
|
+
<el-input v-model="formData.reqName" size="small" clearable/>
|
38
|
+
</template>
|
39
|
+
</vxe-form-item>
|
40
|
+
<vxe-form-item title="是否启用:" field="enabled">
|
41
|
+
<template v-slot>
|
42
|
+
<el-select v-model="formData.enabled" clearable>
|
43
|
+
<el-option :value="true" label="启用"></el-option>
|
44
|
+
<el-option :value="false" label="禁用"></el-option>
|
45
|
+
</el-select>
|
46
|
+
</template>
|
47
|
+
</vxe-form-item>
|
48
|
+
</vxe-form>
|
49
|
+
</template>
|
50
|
+
</vxe-grid>
|
51
|
+
</div>
|
52
|
+
</el-tab-pane>
|
53
|
+
</el-tabs>
|
54
|
+
</div>
|
55
|
+
</template>
|
56
|
+
|
57
|
+
<script>
|
58
|
+
import editView from './edit.vue';
|
59
|
+
|
60
|
+
export default {
|
61
|
+
name: 'request_async_setting:list',
|
62
|
+
components: {editView},
|
63
|
+
data() {
|
64
|
+
return {
|
65
|
+
activeName: 'second',
|
66
|
+
dataId: 0,
|
67
|
+
copyId: 0,
|
68
|
+
showEdit: false,
|
69
|
+
showAdvancedSearch: false,
|
70
|
+
vxeOption: {},
|
71
|
+
formData: {},
|
72
|
+
advancedFormData: {},
|
73
|
+
};
|
74
|
+
},
|
75
|
+
mounted() {
|
76
|
+
this.initTableList();
|
77
|
+
},
|
78
|
+
methods: {
|
79
|
+
searchEvent() {
|
80
|
+
this.$refs['table-m1'].commitProxy('reload');
|
81
|
+
},
|
82
|
+
resetEvent() {
|
83
|
+
this.formData = {};
|
84
|
+
this.advancedFormData = {};
|
85
|
+
this.$refs['table-m1'].commitProxy('reload');
|
86
|
+
},
|
87
|
+
openEditDialog(id) {
|
88
|
+
this.copyId = 0;
|
89
|
+
this.dataId = !id || typeof id == 'object' ? 0 : id;
|
90
|
+
this.activeName = 'first';
|
91
|
+
this.$openEditView('showEdit');
|
92
|
+
},
|
93
|
+
initTableList() {
|
94
|
+
let that = this;
|
95
|
+
let pushTypeMap = {0: '异步推送', 1: '同步调用'};
|
96
|
+
let tableOption = {
|
97
|
+
vue: this,
|
98
|
+
tableRef: 'table-m1',
|
99
|
+
tableName: 'bd_request_async_setting_list-m1',
|
100
|
+
path: USER_PREFIX + '/request_async_setting/listPage',
|
101
|
+
param: () => {
|
102
|
+
return {
|
103
|
+
...this.formData,
|
104
|
+
...this.advancedFormData
|
105
|
+
}
|
106
|
+
},
|
107
|
+
columns: [
|
108
|
+
{type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
|
109
|
+
{
|
110
|
+
title: '请求名称',
|
111
|
+
field: 'reqName',
|
112
|
+
width: 150,
|
113
|
+
fixed: 'left'
|
114
|
+
},
|
115
|
+
{
|
116
|
+
title: '请求编码',
|
117
|
+
field: 'reqCode',
|
118
|
+
width: 150,
|
119
|
+
fixed: 'left'
|
120
|
+
},
|
121
|
+
{
|
122
|
+
title: '请求Url',
|
123
|
+
field: 'url',
|
124
|
+
width: 150
|
125
|
+
},
|
126
|
+
{
|
127
|
+
title: '请求头',
|
128
|
+
field: 'header',
|
129
|
+
width: 150
|
130
|
+
},
|
131
|
+
{
|
132
|
+
title: '连接超时',
|
133
|
+
field: 'connectTimeout',
|
134
|
+
width: 150
|
135
|
+
},
|
136
|
+
{
|
137
|
+
title: '读取超时',
|
138
|
+
field: 'readTimeout',
|
139
|
+
width: 150
|
140
|
+
},
|
141
|
+
{
|
142
|
+
field: 'enabled',
|
143
|
+
title: this.$t1('是否启用'),
|
144
|
+
width: 150,
|
145
|
+
slots: {
|
146
|
+
default: ({row}) => {
|
147
|
+
if (row.enabled) {
|
148
|
+
return [
|
149
|
+
<div class="txt-status">
|
150
|
+
<span>启用</span>
|
151
|
+
</div>
|
152
|
+
];
|
153
|
+
} else {
|
154
|
+
return [
|
155
|
+
<div class="txt-status disable">
|
156
|
+
<span>禁用</span>
|
157
|
+
</div>
|
158
|
+
];
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
162
|
+
},
|
163
|
+
{
|
164
|
+
title: '调度任务编码',
|
165
|
+
field: 'taskCode',
|
166
|
+
width: 150
|
167
|
+
},
|
168
|
+
{
|
169
|
+
title: '备注',
|
170
|
+
field: 'remark',
|
171
|
+
width: 150
|
172
|
+
},
|
173
|
+
{
|
174
|
+
title: '执行组织编码',
|
175
|
+
field: 'exeCompanyCode',
|
176
|
+
width: 150
|
177
|
+
},
|
178
|
+
{
|
179
|
+
field: 'enabled',
|
180
|
+
title: this.$t1('是否启用'),
|
181
|
+
width: 150,
|
182
|
+
slots: {
|
183
|
+
default: ({row}) => {
|
184
|
+
if (row.enabled) {
|
185
|
+
return [
|
186
|
+
<div class="txt-status">
|
187
|
+
<span>启用</span>
|
188
|
+
</div>
|
189
|
+
];
|
190
|
+
} else {
|
191
|
+
return [
|
192
|
+
<div class="txt-status disable">
|
193
|
+
<span>禁用</span>
|
194
|
+
</div>
|
195
|
+
];
|
196
|
+
}
|
197
|
+
}
|
198
|
+
}
|
199
|
+
},
|
200
|
+
{
|
201
|
+
field: 'createBy',
|
202
|
+
title: this.$t1('创建人'),
|
203
|
+
width: 150
|
204
|
+
},
|
205
|
+
{
|
206
|
+
field: 'createDate',
|
207
|
+
title: this.$t1('创建时间'),
|
208
|
+
width: 150
|
209
|
+
},
|
210
|
+
{
|
211
|
+
field: 'modifyBy',
|
212
|
+
title: this.$t1('更新人'),
|
213
|
+
width: 150
|
214
|
+
},
|
215
|
+
{
|
216
|
+
field: 'modifyDate',
|
217
|
+
title: this.$t1('更新时间'),
|
218
|
+
width: 150
|
219
|
+
},
|
220
|
+
{
|
221
|
+
width: 47,
|
222
|
+
fixed: 'right',
|
223
|
+
title: '',
|
224
|
+
sortable: false,
|
225
|
+
slots: {
|
226
|
+
default: ({row}) => {
|
227
|
+
return [
|
228
|
+
<div>
|
229
|
+
<a
|
230
|
+
href="javascript:void(0);"
|
231
|
+
class="a-link"
|
232
|
+
onclick={() => {
|
233
|
+
this.openEditDialog(row.id);
|
234
|
+
}}
|
235
|
+
>
|
236
|
+
<el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
|
237
|
+
popper-class="tooltip-skin">
|
238
|
+
<i class="el-icon-edit"/>
|
239
|
+
</el-tooltip>
|
240
|
+
</a>
|
241
|
+
</div>
|
242
|
+
];
|
243
|
+
}
|
244
|
+
}
|
245
|
+
}
|
246
|
+
]
|
247
|
+
};
|
248
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
249
|
+
this.vxeOption = opts;
|
250
|
+
});
|
251
|
+
}
|
252
|
+
}
|
253
|
+
};
|
254
|
+
</script>
|