cloud-web-corejs 1.0.54-dev.593 → 1.0.54-dev.594

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.
@@ -1,220 +1,326 @@
1
- <template>
2
- <div class="detail-wrap">
3
- <el-form ref="editForm" :model="formScript">
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
11
- type="primary"
12
- plain
13
- class="button-sty"
14
- icon="el-icon-set-up"
15
- @click="openOtherAuthDialog"
16
- v-if="isDev && !!dataId && menuKindAuth.editAuth === 1 && !readonly && !otherFlag && !formTemplate"
17
- >
18
- {{ $t1("分派") }}
19
- </el-button>
20
- <el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">
21
- {{ $t1('重置') }}
22
- </el-button>
23
- <el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData"
24
- v-if="isDev && menuKindAuth.editAuth===1 && !readonly">{{ $t1('保存') }}
25
- </el-button>
26
- </div>
27
- </div>
28
- <baseTabs>
29
- <baseTabPane :label="$t1('基本信息')">
30
- <template #default>
31
- <table class="table-detail">
32
- <tbody>
33
- <tr>
34
- <th>
35
- <em class="f-red">*</em>
36
- {{ $t1('脚本名称') }}
37
- </th>
38
- <td>
39
- <el-form-item prop="scriptName" :rules="[{ required: true, trigger: 'blur' }]">
40
- <el-input type="text" autocomplete="off" v-model="formScript.scriptName" clearable/>
41
- </el-form-item>
42
- </td>
43
- <th>{{ $t1('脚本编码') }}</th>
44
- <td colspan="3">
45
- <el-form-item prop="scriptCode" :rules="[{ required: true, trigger: 'blur' }]">
46
- <el-input type="text" autocomplete="off" v-model="formScript.scriptCode" clearable/>
47
- </el-form-item>
48
- </td>
49
- </tr>
50
- <tr>
51
- <th>
52
- <em class="f-red">*</em>
53
- {{ $t1('表单分类') }}
54
- </th>
55
- <td colspan="5">
56
- <el-form-item v-if="formScript.formCode=='intf' || formScript.formCode=='busgeneral'" prop="menuKindName"
57
- :rules="[{ required:true, trigger: ['blur', 'change'] }]">
58
- <el-input
59
- class="search-input"
60
- max="200"
61
- v-model="formScript.menuKindName"
62
- @clear="
63
- formScript.menuKindCode = null;
64
- $forceUpdate();
65
- "
66
- v-el-readonly
67
- clearable
68
- :disabled="otherFlag"
69
- >
70
- <i slot="suffix" class="el-input__icon el-icon-search" @click="showMenuKindDialog = true"></i>
71
- </el-input>
72
- </el-form-item>
73
- <span v-else>{{ formScript.menuKindName }}</span>
74
- </td>
75
- </tr>
76
-
77
- <tr>
78
- <th>{{ $t1('表单模板编码') }}</th>
79
- <td colspan="3">
80
- <template v-if="!dataId && !formTemplate">
81
- <el-radio-group v-model="formScript.formCode">
82
- <el-radio label="intf">intf(接口)</el-radio>
83
- <el-radio label="busgeneral">busgeneral(业务通用)</el-radio>
84
- </el-radio-group>
85
- </template>
86
- <template v-else>
87
- <span v-if="formScript.formCode=='intf'">intf(接口)</span>
88
- <span v-else-if="formScript.formCode=='busgeneral'">busgeneral(业务通用)</span>
89
- <span v-else>{{ formScript.formCode }}</span>
90
- </template>
91
-
92
- </td>
93
- <th>{{ $t1('Url路径') }}</th>
94
- <td colspan="3">
95
- /{{ formScript.formCode }}/{{ formScript.scriptCode }}
96
- </td>
97
- </tr>
98
- <tr>
99
- <th>{{ $t1('是否启用') }}</th>
100
- <td>
101
- <el-form-item prop="enabled" :rules="[{ required: false, trigger: 'blur' }]">
102
- <el-radio-group v-model="formScript.enabled">
103
- <el-radio :label="true">{{ $t1('启用') }}</el-radio>
104
- <el-radio :label="false">{{ $t1('禁用') }}</el-radio>
105
- </el-radio-group>
106
- </el-form-item>
107
- </td>
108
- <th>{{ $t1('开启事务') }}</th>
109
- <td>
110
- <el-radio-group v-model="formScript.transactions">
111
- <el-radio :label="1">{{ $t1('是') }}</el-radio>
112
- <el-radio :label="0">{{ $t1('否') }}</el-radio>
113
- </el-radio-group>
114
- </td>
115
- <th>{{ $t1('服务名') }}</th>
116
- <td colspan="3">
117
- {{ formScript.serviceName }}
118
- </td>
119
- </tr>
120
- <tr>
121
- <th>{{ $t1('自定义URL') }}</th>
122
- <td colspan="7">
123
- <el-form-item prop="uri" :rules="[{ required: false, trigger: 'blur' }]">
124
- <el-input type="text" autocomplete="off" v-model="formScript.uri" clearable/>
125
- </el-form-item>
126
- </td>
127
- </tr>
128
- <tr>
129
- <th class="no"></th>
130
- <td colspan="7">
131
- <span class="fl tips">
132
- <div>{{ $t1('注') }}:</div>
133
- <div style="padding-left: 20px">
134
- <p>{{
135
- $t1('1.不配置"自定义URL",默认的请求地址为:http://域名/服务前缀/bd_api/表单编码/脚本编码。')
136
- }}</p>
137
- <p>{{ $t1('2.需要特殊配置URL,"自定义URL"必须以/a_api开头。') }}</p>
138
- <p>{{ $t1('3.第三方接口调用(DW),"自定义URL"必须/d_api开头。') }}</p>
139
- </div>
140
- </span>
141
- </td>
142
- </tr>
143
- <tr>
144
- <th>
145
- {{ $t1('项目标签') }}
146
- </th>
147
- <td colspan="7">
148
- <projectTagView v-model="formScript.formScriptTagDTOs"></projectTagView>
149
- </td>
150
- </tr>
151
- <tr>
152
- <th>{{ $t1('脚本说明') }}</th>
153
- <td colspan="7">
154
- <el-input type="textarea" :rows="2" :placeholder="$t1('请输入内容')" size="small"
155
- v-model="formScript.scriptRemark"
156
- clearable></el-input>
157
- </td>
158
- </tr>
159
- <tr>
160
- <th>
161
- <em class="f-red">*</em>
162
- {{ $t1('脚本') }}
163
- <!-- <scriptDescriptionButton path="static/readme/ApiRequest.txt"></scriptDescriptionButton>-->
164
- <scriptTestButton :script.sync="formScript.script"></scriptTestButton>
165
- </th>
166
- <td colspan="7">
167
- <el-form-item prop="script" :rules="[{ required: true, trigger: 'blur' }]">
168
- <code-editor mode="java" :readonly="!1" v-model="formScript.script"
169
- v-if="showCodeEditor"></code-editor>
170
- </el-form-item>
171
- </td>
172
- </tr>
173
- <tr>
174
- <th>{{ $t1('唯一标识') }}</th>
175
- <td colspan="7">{{ formScript.sid }}</td>
176
- </tr>
177
- <tr>
178
- <th>{{ $t1('创建人') }}</th>
179
- <td>{{ formScript.createBy }}</td>
180
- <th>{{ $t1('创建时间') }}</th>
181
- <td>{{ formScript.createDate }}</td>
182
- <th>{{ $t1('更新人') }}</th>
183
- <td>{{ formScript.modifyBy }}</td>
184
- <th>{{ $t1('更新时间') }}</th>
185
- <td>{{ formScript.modifyDate }}</td>
186
- </tr>
187
- </tbody>
188
- </table>
189
- </template>
190
- </baseTabPane>
191
- <baseTabPane :label="$t1('操作日志')">
192
- <template #default>
193
- <formOplogTable :parent-target="_self" ref="oplogTable"></formOplogTable>
194
- </template>
195
- </baseTabPane>
196
- </baseTabs>
197
- </el-form>
198
- <MenuKindDialog v-if="showMenuKindDialog"
199
- :visiable.sync="showMenuKindDialog"
200
- :serviceName="formScript.serviceName"
201
- @confirm="confirmInsertMenuKind"
202
- :param="{ taType: 0 }"
203
- :multi="false"
204
- />
205
- <preformDialog v-if="showPreformDialog" :visiable.sync="showPreformDialog"
206
- :formScript="formScript"
207
- @confirm="confirmPreformDialog"></preformDialog>
208
- <otherAuthDialog v-if="showOtherAuthDialog" :visiable.sync="showOtherAuthDialog" :sid="sid"
209
- @confirm="confirmOtherAuthDialog"></otherAuthDialog>
210
- </div>
211
- </template>
212
-
213
- <script>
214
- import mixin from "./mixins/edit1";
215
-
216
- export default {
217
- name: 'user_form_scriptEdit',
218
- mixins: [mixin]
219
- };
220
- </script>
1
+ <template>
2
+ <div class="detail-wrap">
3
+ <el-form ref="editForm" :model="formScript">
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
+ <formVersionButton
11
+ v-if="!hData && formScript.id && !readonly"
12
+ objType="FormScript"
13
+ :objCode="formScript.scriptCode"
14
+ :relationCode="formScript.formCode"
15
+ @reverCallback="$baseReload()"
16
+ ></formVersionButton>
17
+ <reverButton
18
+ v-if="!!hData"
19
+ objType="FormScript"
20
+ :objCode="formScript.scriptCode"
21
+ :hData="hData"
22
+ @reverCallback="$emit('reverCallback')"
23
+ ></reverButton>
24
+ <el-button
25
+ type="primary"
26
+ plain
27
+ class="button-sty"
28
+ icon="el-icon-set-up"
29
+ @click="openOtherAuthDialog"
30
+ v-if="
31
+ isDev &&
32
+ !!dataId &&
33
+ menuKindAuth.editAuth === 1 &&
34
+ !readonly &&
35
+ !otherFlag &&
36
+ !formTemplate
37
+ "
38
+ >
39
+ {{ $t1("分派") }}
40
+ </el-button>
41
+ <el-button
42
+ type="primary"
43
+ plain
44
+ class="button-sty"
45
+ @click="$baseReload()"
46
+ icon="el-icon-refresh-right"
47
+ >
48
+ {{ $t1("重置") }}
49
+ </el-button>
50
+ <el-button
51
+ type="primary"
52
+ class="button-sty"
53
+ icon="el-icon-check"
54
+ @click="saveData"
55
+ v-if="isDev && menuKindAuth.editAuth === 1 && !readonly"
56
+ >{{ $t1("保存") }}
57
+ </el-button>
58
+ </div>
59
+ </div>
60
+ <baseTabs>
61
+ <baseTabPane :label="$t1('基本信息')">
62
+ <template #default>
63
+ <table class="table-detail">
64
+ <tbody>
65
+ <tr>
66
+ <th>
67
+ <em class="f-red">*</em>
68
+ {{ $t1("脚本名称") }}
69
+ </th>
70
+ <td>
71
+ <el-form-item
72
+ prop="scriptName"
73
+ :rules="[{ required: true, trigger: 'blur' }]"
74
+ >
75
+ <el-input
76
+ type="text"
77
+ autocomplete="off"
78
+ v-model="formScript.scriptName"
79
+ clearable
80
+ />
81
+ </el-form-item>
82
+ </td>
83
+ <th>{{ $t1("脚本编码") }}</th>
84
+ <td colspan="3">
85
+ <el-form-item
86
+ prop="scriptCode"
87
+ :rules="[{ required: true, trigger: 'blur' }]"
88
+ >
89
+ <el-input
90
+ type="text"
91
+ autocomplete="off"
92
+ v-model="formScript.scriptCode"
93
+ clearable
94
+ />
95
+ </el-form-item>
96
+ </td>
97
+ </tr>
98
+ <tr>
99
+ <th>
100
+ <em class="f-red">*</em>
101
+ {{ $t1("表单分类") }}
102
+ </th>
103
+ <td colspan="5">
104
+ <el-form-item
105
+ v-if="
106
+ formScript.formCode == 'intf' ||
107
+ formScript.formCode == 'busgeneral'
108
+ "
109
+ prop="menuKindName"
110
+ :rules="[{ required: true, trigger: ['blur', 'change'] }]"
111
+ >
112
+ <el-input
113
+ class="search-input"
114
+ max="200"
115
+ v-model="formScript.menuKindName"
116
+ @clear="
117
+ formScript.menuKindCode = null;
118
+ $forceUpdate();
119
+ "
120
+ v-el-readonly
121
+ clearable
122
+ :disabled="otherFlag"
123
+ >
124
+ <i
125
+ slot="suffix"
126
+ class="el-input__icon el-icon-search"
127
+ @click="showMenuKindDialog = true"
128
+ ></i>
129
+ </el-input>
130
+ </el-form-item>
131
+ <span v-else>{{ formScript.menuKindName }}</span>
132
+ </td>
133
+ </tr>
134
+
135
+ <tr>
136
+ <th>{{ $t1("表单模板编码") }}</th>
137
+ <td colspan="3">
138
+ <template v-if="!dataId && !formTemplate">
139
+ <el-radio-group v-model="formScript.formCode">
140
+ <el-radio label="intf">intf(接口)</el-radio>
141
+ <el-radio label="busgeneral">busgeneral(业务通用)</el-radio>
142
+ </el-radio-group>
143
+ </template>
144
+ <template v-else>
145
+ <span v-if="formScript.formCode == 'intf'">intf(接口)</span>
146
+ <span v-else-if="formScript.formCode == 'busgeneral'"
147
+ >busgeneral(业务通用)</span
148
+ >
149
+ <span v-else>{{ formScript.formCode }}</span>
150
+ </template>
151
+ </td>
152
+ <th>{{ $t1("Url路径") }}</th>
153
+ <td colspan="3">
154
+ /{{ formScript.formCode }}/{{ formScript.scriptCode }}
155
+ </td>
156
+ </tr>
157
+ <tr>
158
+ <th>{{ $t1("是否启用") }}</th>
159
+ <td>
160
+ <el-form-item
161
+ prop="enabled"
162
+ :rules="[{ required: false, trigger: 'blur' }]"
163
+ >
164
+ <el-radio-group v-model="formScript.enabled">
165
+ <el-radio :label="true">{{ $t1("启用") }}</el-radio>
166
+ <el-radio :label="false">{{ $t1("禁用") }}</el-radio>
167
+ </el-radio-group>
168
+ </el-form-item>
169
+ </td>
170
+ <th>{{ $t1("开启事务") }}</th>
171
+ <td>
172
+ <el-radio-group v-model="formScript.transactions">
173
+ <el-radio :label="1">{{ $t1("是") }}</el-radio>
174
+ <el-radio :label="0">{{ $t1("否") }}</el-radio>
175
+ </el-radio-group>
176
+ </td>
177
+ <th>{{ $t1("服务名") }}</th>
178
+ <td colspan="3">
179
+ {{ formScript.serviceName }}
180
+ </td>
181
+ </tr>
182
+ <tr>
183
+ <th>{{ $t1("自定义URL") }}</th>
184
+ <td colspan="7">
185
+ <el-form-item
186
+ prop="uri"
187
+ :rules="[{ required: false, trigger: 'blur' }]"
188
+ >
189
+ <el-input
190
+ type="text"
191
+ autocomplete="off"
192
+ v-model="formScript.uri"
193
+ clearable
194
+ />
195
+ </el-form-item>
196
+ </td>
197
+ </tr>
198
+ <tr>
199
+ <th class="no"></th>
200
+ <td colspan="7">
201
+ <span class="fl tips">
202
+ <div>{{ $t1("注") }}:</div>
203
+ <div style="padding-left: 20px">
204
+ <p>
205
+ {{
206
+ $t1(
207
+ '1.不配置"自定义URL",默认的请求地址为:http://域名/服务前缀/bd_api/表单编码/脚本编码。'
208
+ )
209
+ }}
210
+ </p>
211
+ <p>
212
+ {{ $t1('2.需要特殊配置URL,"自定义URL"必须以/a_api开头。') }}
213
+ </p>
214
+ <p>
215
+ {{ $t1('3.第三方接口调用(DW),"自定义URL"必须/d_api开头。') }}
216
+ </p>
217
+ </div>
218
+ </span>
219
+ </td>
220
+ </tr>
221
+ <tr>
222
+ <th>
223
+ {{ $t1("项目标签") }}
224
+ </th>
225
+ <td colspan="7">
226
+ <projectTagView
227
+ v-model="formScript.formScriptTagDTOs"
228
+ ></projectTagView>
229
+ </td>
230
+ </tr>
231
+ <tr>
232
+ <th>{{ $t1("脚本说明") }}</th>
233
+ <td colspan="7">
234
+ <el-input
235
+ type="textarea"
236
+ :rows="2"
237
+ :placeholder="$t1('请输入内容')"
238
+ size="small"
239
+ v-model="formScript.scriptRemark"
240
+ clearable
241
+ ></el-input>
242
+ </td>
243
+ </tr>
244
+ <tr>
245
+ <th>
246
+ <em class="f-red">*</em>
247
+ {{ $t1("脚本") }}
248
+ <!-- <scriptDescriptionButton path="static/readme/ApiRequest.txt"></scriptDescriptionButton>-->
249
+ <scriptTestButton :script.sync="formScript.script"></scriptTestButton>
250
+ </th>
251
+ <td colspan="7">
252
+ <el-form-item
253
+ prop="script"
254
+ :rules="[{ required: true, trigger: 'blur' }]"
255
+ >
256
+ <code-editor
257
+ mode="java"
258
+ :readonly="!1"
259
+ v-model="formScript.script"
260
+ v-if="showCodeEditor"
261
+ ></code-editor>
262
+ </el-form-item>
263
+ </td>
264
+ </tr>
265
+ <tr>
266
+ <th>{{ $t1("唯一标识") }}</th>
267
+ <td colspan="7">{{ formScript.sid }}</td>
268
+ </tr>
269
+ <tr>
270
+ <th>{{ $t1("创建人") }}</th>
271
+ <td>{{ formScript.createBy }}</td>
272
+ <th>{{ $t1("创建时间") }}</th>
273
+ <td>{{ formScript.createDate }}</td>
274
+ <th>{{ $t1("更新人") }}</th>
275
+ <td>{{ formScript.modifyBy }}</td>
276
+ <th>{{ $t1("更新时间") }}</th>
277
+ <td>{{ formScript.modifyDate }}</td>
278
+ </tr>
279
+ </tbody>
280
+ </table>
281
+ </template>
282
+ </baseTabPane>
283
+ <baseTabPane :label="$t1('操作日志')">
284
+ <template #default>
285
+ <formOplogTable :parent-target="_self" ref="oplogTable"></formOplogTable>
286
+ </template>
287
+ </baseTabPane>
288
+ </baseTabs>
289
+ </el-form>
290
+ <MenuKindDialog
291
+ v-if="showMenuKindDialog"
292
+ :visiable.sync="showMenuKindDialog"
293
+ :serviceName="formScript.serviceName"
294
+ @confirm="confirmInsertMenuKind"
295
+ :param="{ taType: 0 }"
296
+ :multi="false"
297
+ />
298
+ <preformDialog
299
+ v-if="showPreformDialog"
300
+ :visiable.sync="showPreformDialog"
301
+ :formScript="formScript"
302
+ @confirm="confirmPreformDialog"
303
+ ></preformDialog>
304
+ <otherAuthDialog
305
+ v-if="showOtherAuthDialog"
306
+ :visiable.sync="showOtherAuthDialog"
307
+ :sid="sid"
308
+ @confirm="confirmOtherAuthDialog"
309
+ ></otherAuthDialog>
310
+ </div>
311
+ </template>
312
+
313
+ <script>
314
+ import mixin from "./mixins/edit1";
315
+ import formVersionButton from "@base/views/bd/setting/formVersion/button.vue";
316
+ import reverButton from "@base/views/bd/setting/formVersion/reverButton.vue";
317
+
318
+ export default {
319
+ name: "user_form_scriptEdit",
320
+ mixins: [mixin],
321
+ components: {
322
+ formVersionButton,
323
+ reverButton,
324
+ },
325
+ };
326
+ </script>