cloud-web-corejs 1.0.54-dev.220 → 1.0.54-dev.222

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.
@@ -31,7 +31,7 @@ export default {
31
31
  data: {
32
32
  dw: dw
33
33
  },
34
- isLoading: true,
34
+ // isLoading: true,
35
35
  success: res => {
36
36
  let token = res.objx;
37
37
  this.$store
@@ -72,9 +72,9 @@ export default {
72
72
  url: url,
73
73
  method: `post`,
74
74
  data: data,
75
- isLoading: true,
76
- loadingTarget: document.body,
77
- modalStrictly: true,
75
+ // isLoading: true,
76
+ // loadingTarget: document.body,
77
+ // modalStrictly: true,
78
78
  success: async res => {
79
79
  let formTemplate = res.objx || {};
80
80
  this.formTemplate = formTemplate;
@@ -99,9 +99,9 @@ export default {
99
99
  url: USER_PREFIX + `/formTemplate/getByFormCode`,
100
100
  method: `post`,
101
101
  data: {stringOne: this.formCode},
102
- isLoading: true,
103
- loadingTarget: document.body,
104
- modalStrictly: true,
102
+ // isLoading: true,
103
+ // loadingTarget: document.body,
104
+ // modalStrictly: true,
105
105
  success: async res => {
106
106
  let formTemplate = res.objx || {};
107
107
  this.formTemplate = formTemplate;
@@ -0,0 +1,252 @@
1
+ <template>
2
+ <div class="detail-wrap">
3
+ <el-form ref="editForm" :model="requestSetting">
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="requestSetting.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="requestSetting.reqName" clearable/>
41
+ </el-form-item>
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <th>
46
+ <em class="f-red">*</em>
47
+ {{ $t1('请求Url') }}
48
+ </th>
49
+ <td colspan="5">
50
+ <el-form-item prop="url" :rules="[{ required: true, trigger: 'blur' }]">
51
+ <el-input type="text" autocomplete="off" v-model="requestSetting.url" clearable/>
52
+ </el-form-item>
53
+ </td>
54
+ </tr>
55
+ <tr>
56
+ <th>
57
+ {{ $t1('执行企业编码') }}
58
+ </th>
59
+ <td colspan="5">
60
+ <el-form-item prop="exeCompanyCode" :rules="[{ required: false, trigger: 'blur' }]">
61
+ <el-input type="text" autocomplete="off" v-model="requestSetting.exeCompanyCode" clearable/>
62
+ </el-form-item>
63
+ </td>
64
+ </tr>
65
+ <tr>
66
+ <th>
67
+ {{ $t1('请求头') }}
68
+ </th>
69
+ <td colspan="5">
70
+ <el-form-item prop="header" :rules="[{ required: false, trigger: 'blur' }]">
71
+ <el-input type="textarea" :rows="2" :placeholder="$t1('请输入内容')" size="small"
72
+ v-model="requestSetting.header"
73
+ clearable></el-input>
74
+ </el-form-item>
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <th>
79
+ <em class="f-red">*</em>
80
+ {{ $t1('是否启用') }}
81
+ </th>
82
+ <td>
83
+ <el-form-item prop="enabled" :rules="[{ required: true, trigger: 'blur' }]">
84
+ <el-radio-group v-model="requestSetting.enabled">
85
+ <el-radio :label="true">{{ $t1('启用') }}</el-radio>
86
+ <el-radio :label="false">{{ $t1('禁用') }}</el-radio>
87
+ </el-radio-group>
88
+ </el-form-item>
89
+ </td>
90
+ <th>
91
+ {{ $t1('连接超时') }}
92
+ </th>
93
+ <td>
94
+ <el-form-item prop="connectTimeout" :rules="[{ required: false, trigger: 'blur' }]">
95
+ <base-input-number v-model="requestSetting.connectTimeout" clearable/>
96
+ </el-form-item>
97
+ </td>
98
+ <th>
99
+ {{ $t1('读取超时') }}
100
+ </th>
101
+ <td>
102
+ <el-form-item prop="readTimeout" :rules="[{ required: false, trigger: 'blur' }]">
103
+ <base-input-number v-model="requestSetting.readTimeout" clearable/>
104
+ </el-form-item>
105
+ </td>
106
+ </tr>
107
+ <tr>
108
+ <th>
109
+ {{ $t1('备注') }}
110
+ </th>
111
+ <td colspan="5">
112
+ <el-form-item prop="remark" :rules="[{ required: false, trigger: 'blur' }]">
113
+ <el-input type="textarea" :rows="2" :placeholder="$t1('请输入内容')" size="small"
114
+ v-model="requestSetting.remark"
115
+ clearable></el-input>
116
+ </el-form-item>
117
+ </td>
118
+ </tr>
119
+ <!-- <tr>
120
+ <th>
121
+ {{ $t1('前置脚本') }}
122
+ <scriptTestButton :script.sync="requestSetting.preScript"></scriptTestButton>
123
+ </th>
124
+ <td colspan="7">
125
+ <el-form-item prop="preScript" :rules="[{ required: false, trigger: 'blur' }]">
126
+ <code-editor mode="java" :readonly="!1" v-model="requestSetting.preScript"
127
+ v-if="showCodeEditor"></code-editor>
128
+ </el-form-item>
129
+ </td>
130
+ </tr>-->
131
+ <tr>
132
+ <th>
133
+ {{ $t1('后置脚本') }}
134
+ <scriptTestButton :script.sync="requestSetting.postScript"></scriptTestButton>
135
+ </th>
136
+ <td colspan="7">
137
+ <el-form-item prop="postScript" :rules="[{ required: false, trigger: 'blur' }]">
138
+ <code-editor mode="java" :readonly="!1" v-model="requestSetting.postScript"
139
+ v-if="showCodeEditor"></code-editor>
140
+ </el-form-item>
141
+ </td>
142
+ </tr>
143
+ <tr>
144
+ <th>{{ $t1('创建人') }}</th>
145
+ <td>{{ requestSetting.createBy }}</td>
146
+ <th>{{ $t1('创建时间') }}</th>
147
+ <td>{{ requestSetting.createDate }}</td>
148
+ <th>{{ $t1('更新人') }}</th>
149
+ <td>{{ requestSetting.modifyBy }}</td>
150
+ <th>{{ $t1('更新时间') }}</th>
151
+ <td>{{ requestSetting.modifyDate }}</td>
152
+ </tr>
153
+ </tbody>
154
+ </table>
155
+ </div>
156
+ </div>
157
+ </el-form>
158
+ </div>
159
+ </template>
160
+
161
+ <script>
162
+ export default {
163
+ name: 'request_setttingEdit',
164
+ props: {
165
+ _dataId: [String, Number],
166
+ copyId: [String, Number]
167
+ },
168
+ components: {},
169
+ data() {
170
+ return {
171
+ isEdit: false,
172
+ tabIndex: 'first',
173
+ dataId: '',
174
+ requestSetting: {
175
+ enabled: true,
176
+ connectTimeout: 10000,
177
+ readTimeout: 60000,
178
+ preScript: null,
179
+ postScript: null,
180
+ exeCompanyCode:null
181
+ },
182
+ showCodeEditor: false
183
+ };
184
+ },
185
+ created() {
186
+ if (this._dataId && !isNaN(this._dataId)) this.dataId = this._dataId;
187
+ },
188
+ mounted() {
189
+ this.getData();
190
+ },
191
+ methods: {
192
+ getData() {
193
+ if (this.copyId) {
194
+ return;
195
+ }
196
+ if (this.dataId && !isNaN(this.dataId)) {
197
+ this.isEdit = true;
198
+ this.$commonHttp({
199
+ url: USER_PREFIX + `/request_setting/get`,
200
+ method: `post`,
201
+ data: {
202
+ id: this.dataId
203
+ },
204
+ isLoading: true,
205
+ modalStrictly: true,
206
+ success: res => {
207
+ this.requestSetting = res.objx || {};
208
+ this.showCodeEditor = true;
209
+ }
210
+ });
211
+ } else {
212
+ this.showCodeEditor = true;
213
+ }
214
+ },
215
+ saveData() {
216
+ this.$refs.editForm.$baseValidate(valid => {
217
+ if (valid) {
218
+ this.$baseConfirm(this.$t1('您确定要保存吗?')).then(() => {
219
+ var url = USER_PREFIX + (this.isEdit ? `/request_setting/update` : `/request_setting/save`);
220
+ this.$http({
221
+ url: url,
222
+ method: `post`,
223
+ data: this.requestSetting,
224
+ isLoading: true,
225
+ success: res => {
226
+ this.$message({
227
+ message: res.content,
228
+ type: 'success',
229
+ duration: 500,
230
+ onClose: t => {
231
+ if (this.isEdit) {
232
+ this.$baseReload();
233
+ } else {
234
+ this.$baseReload({
235
+ updateParam: {
236
+ _dataId: res.objx,
237
+ copyId: null
238
+ }
239
+ });
240
+ }
241
+ }
242
+ });
243
+ }
244
+ });
245
+ });
246
+ }
247
+ });
248
+ }
249
+ }
250
+ };
251
+
252
+ </script>
@@ -0,0 +1,249 @@
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">{{ $t1('新增') }}
16
+ </vxe-button>
17
+ <base-table-export :option="{ title: '同步调用接口导出', targetRef: 'table-m1'}" :parent-target="_self"/>
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_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: 'user_requestSetting_list-m1',
100
+ path: USER_PREFIX + '/request_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: 'remark',
166
+ width: 150
167
+ },
168
+ {
169
+ title: '执行企业编码',
170
+ field: 'exeCompanyCode',
171
+ width: 150
172
+ },
173
+ {
174
+ field: 'enabled',
175
+ title: this.$t1('是否启用'),
176
+ width: 150,
177
+ slots: {
178
+ default: ({row}) => {
179
+ if (row.enabled) {
180
+ return [
181
+ <div class="txt-status">
182
+ <span>启用</span>
183
+ </div>
184
+ ];
185
+ } else {
186
+ return [
187
+ <div class="txt-status disable">
188
+ <span>禁用</span>
189
+ </div>
190
+ ];
191
+ }
192
+ }
193
+ }
194
+ },
195
+ {
196
+ field: 'createBy',
197
+ title: this.$t1('创建人'),
198
+ width: 150
199
+ },
200
+ {
201
+ field: 'createDate',
202
+ title: this.$t1('创建时间'),
203
+ width: 150
204
+ },
205
+ {
206
+ field: 'modifyBy',
207
+ title: this.$t1('更新人'),
208
+ width: 150
209
+ },
210
+ {
211
+ field: 'modifyDate',
212
+ title: this.$t1('更新时间'),
213
+ width: 150
214
+ },
215
+ {
216
+ width: 47,
217
+ fixed: 'right',
218
+ title: '',
219
+ sortable: false,
220
+ slots: {
221
+ default: ({row}) => {
222
+ return [
223
+ <div>
224
+ <a
225
+ href="javascript:void(0);"
226
+ class="a-link"
227
+ onclick={() => {
228
+ this.openEditDialog(row.id);
229
+ }}
230
+ >
231
+ <el-tooltip enterable={false} effect="dark" content={ this.$t1('查看') } placement="top"
232
+ popper-class="tooltip-skin">
233
+ <i class="el-icon-edit"/>
234
+ </el-tooltip>
235
+ </a>
236
+ </div>
237
+ ];
238
+ }
239
+ }
240
+ }
241
+ ]
242
+ };
243
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
244
+ this.vxeOption = opts;
245
+ });
246
+ }
247
+ }
248
+ };
249
+ </script>