vue2-client 1.2.6 → 1.2.9
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/CHANGELOG.md +24 -0
- package/package.json +89 -89
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +39 -14
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +225 -26
- package/src/base-client/components/common/XForm/XFormItem.vue +51 -5
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +2 -3
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +2 -2
- package/src/config/CreateQueryConfig.js +40 -0
- package/src/config/default/setting.config.js +1 -0
- package/src/pages/login/Login.vue +8 -4
- package/src/pages/system/ticket/index.vue +427 -0
- package/src/pages/system/ticket/submitTicketSuccess.vue +249 -0
- package/src/router/async/config.async.js +1 -0
- package/src/router/async/router.map.js +59 -57
- package/src/services/api/EmployeeDetailsViewApi.js +0 -4
- package/src/utils/util.js +34 -4
- package/vue.config.js +0 -10
|
@@ -81,12 +81,17 @@
|
|
|
81
81
|
<a-select v-model="item.formType" placeholder="表单类型,可选">
|
|
82
82
|
<a-select-option key="input">输入框</a-select-option>
|
|
83
83
|
<a-select-option key="select">选择框</a-select-option>
|
|
84
|
+
<a-select-option key="checkbox">多选框</a-select-option>
|
|
85
|
+
<a-select-option key="radio">单选框</a-select-option>
|
|
84
86
|
<a-select-option key="rangePicker">日期范围选择框</a-select-option>
|
|
85
87
|
<a-select-option key="monthPicker">月份选择框</a-select-option>
|
|
86
88
|
<a-select-option key="datePicker">单日选择框</a-select-option>
|
|
87
|
-
<a-select-option key="cascader"
|
|
89
|
+
<a-select-option key="cascader">级联选择框(单个下拉)</a-select-option>
|
|
90
|
+
<a-select-option key="selects">级联选择框(多个下拉)</a-select-option>
|
|
88
91
|
<a-select-option key="textarea">文本域</a-select-option>
|
|
89
|
-
<a-
|
|
92
|
+
<a-select-option key="file">文件上传</a-select-option>
|
|
93
|
+
<a-select-option key="image">图片上传</a-select-option>
|
|
94
|
+
<a-popover slot="suffixIcon" title="关于表单类型" placement="right">
|
|
90
95
|
<template slot="content">
|
|
91
96
|
<p>预览设置的表单类型</p>
|
|
92
97
|
<a-input-group compact style="width: 400px;">
|
|
@@ -99,6 +104,16 @@
|
|
|
99
104
|
<a-select style="width: 80%" placeholder="请选择"/>
|
|
100
105
|
</a-input-group>
|
|
101
106
|
<br/>
|
|
107
|
+
<a-input-group compact style="width: 400px;">
|
|
108
|
+
<a-input value="多选框" style="width: 20%" readOnly/>
|
|
109
|
+
<a-checkbox-group style="margin-left: 10px;margin-top: 5px; width: 70%" :options="['数据1','数据2']"/>
|
|
110
|
+
</a-input-group>
|
|
111
|
+
<br/>
|
|
112
|
+
<a-input-group compact style="width: 400px;">
|
|
113
|
+
<a-input value="单选框" style="width: 20%" readOnly/>
|
|
114
|
+
<a-radio-group style="margin-left: 10px;margin-top: 5px; width: 70%" :options="[{label: '数据1', value: 'a'},{label: '数据2', value: 'b'}]" name="radioGroup" />
|
|
115
|
+
</a-input-group>
|
|
116
|
+
<br/>
|
|
102
117
|
<a-input-group compact style="width: 400px;">
|
|
103
118
|
<a-input value="日期范围选择框" style="width: 20%" readOnly/>
|
|
104
119
|
<a-range-picker style="width: 80%" :show-time="true" format="YYYY-MM-DD HH:mm:ss" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
|
@@ -118,9 +133,39 @@
|
|
|
118
133
|
<a-input value="级联选择框" style="width: 20%" readOnly/>
|
|
119
134
|
<a-cascader style="width: 80%" placeholder="请选择"/>
|
|
120
135
|
</a-input-group>
|
|
136
|
+
<br/>
|
|
121
137
|
<a-input-group compact style="width: 400px;">
|
|
122
138
|
<a-input value="文本域" style="width: 20%" readOnly/>
|
|
123
|
-
<a-textarea style="width: 80%" placeholder="请输入" :rows="
|
|
139
|
+
<a-textarea style="width: 80%" placeholder="请输入" :rows="1"/>
|
|
140
|
+
</a-input-group>
|
|
141
|
+
<br/>
|
|
142
|
+
<a-input-group compact style="width: 400px;">
|
|
143
|
+
<a-input value="文件上传" style="width: 20%" readOnly/>
|
|
144
|
+
<a-upload-dragger
|
|
145
|
+
name="file"
|
|
146
|
+
:multiple="true"
|
|
147
|
+
style="margin-left: 5px; width: 75%"
|
|
148
|
+
action="https://www.mocky.io/v2/5cc8019d300000980a055e76">
|
|
149
|
+
<p class="ant-upload-drag-icon">
|
|
150
|
+
<a-icon type="inbox" />
|
|
151
|
+
</p>
|
|
152
|
+
<p class="ant-upload-text">
|
|
153
|
+
点击或拖动文件到该区域上传
|
|
154
|
+
</p>
|
|
155
|
+
<p class="ant-upload-hint">
|
|
156
|
+
支持单个或多个文件
|
|
157
|
+
</p>
|
|
158
|
+
</a-upload-dragger>
|
|
159
|
+
</a-input-group>
|
|
160
|
+
<br/>
|
|
161
|
+
<a-input-group compact style="width: 400px;">
|
|
162
|
+
<a-input value="图片上传" style="width: 20%" readOnly/>
|
|
163
|
+
<a-upload style="margin-left: 5px; width: 75%" list-type="picture-card" :file-list="[]">
|
|
164
|
+
<a-icon type="plus" />
|
|
165
|
+
<div class="ant-upload-text">
|
|
166
|
+
Upload
|
|
167
|
+
</div>
|
|
168
|
+
</a-upload>
|
|
124
169
|
</a-input-group>
|
|
125
170
|
</template>
|
|
126
171
|
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
|
|
@@ -129,14 +174,112 @@
|
|
|
129
174
|
</a-form-model-item>
|
|
130
175
|
</a-col>
|
|
131
176
|
<a-col :span="8">
|
|
132
|
-
<a-form-model-item
|
|
177
|
+
<a-form-model-item
|
|
178
|
+
label="表单水印"
|
|
179
|
+
prop="placeholder"
|
|
180
|
+
v-if="item.formType !== 'checkbox' && item.formType !== 'radio' && item.formType !== 'file' && item.formType !== 'image'">
|
|
133
181
|
<a-input v-model="item.placeholder" placeholder="表单水印(placeholder),可选" />
|
|
134
182
|
</a-form-model-item>
|
|
135
183
|
</a-col>
|
|
136
184
|
</a-row>
|
|
185
|
+
<a-row :gutter="16" v-if="item.formType === 'file' || item.formType === 'image'">
|
|
186
|
+
<a-col :span="8">
|
|
187
|
+
<a-form-model-item
|
|
188
|
+
label="允许上传文件数量"
|
|
189
|
+
prop="accept"
|
|
190
|
+
v-if="item.formType === 'file' || item.formType === 'image'">
|
|
191
|
+
<a-slider
|
|
192
|
+
v-model="item.acceptCount"
|
|
193
|
+
:min="1"
|
|
194
|
+
:max="20"
|
|
195
|
+
:marks="{ 1: '1', 3: '3', 5: '5', 10: '10', 15: '15', 20: '20'}"
|
|
196
|
+
:default-value="3"
|
|
197
|
+
/>
|
|
198
|
+
</a-form-model-item>
|
|
199
|
+
</a-col>
|
|
200
|
+
<a-col :span="8">
|
|
201
|
+
<a-form-model-item
|
|
202
|
+
label="文件上传模式"
|
|
203
|
+
prop="resUploadMode"
|
|
204
|
+
v-if="item.formType === 'file' || item.formType === 'image'">
|
|
205
|
+
<a-select v-model="item.resUploadMode" placeholder="文件上传模式,默认为服务器" @change="changeFormType(item)">
|
|
206
|
+
<a-select-option key="server">服务器</a-select-option>
|
|
207
|
+
<a-select-option key="oss">腾讯云对象存储</a-select-option>
|
|
208
|
+
<a-select-option key="base64" :disabled="item.formType === 'file'">Base64</a-select-option>
|
|
209
|
+
<a-popover slot="suffixIcon" title="关于资源上传模式" placement="right">
|
|
210
|
+
<template slot="content">
|
|
211
|
+
<p>指定文件上传到服务器,对象存储还是以base64方式存储</p>
|
|
212
|
+
<br/>
|
|
213
|
+
<p><span style="font-weight: bold">服务器:</span>文件上传到服务器,数据库需存储文件于服务器的路径</p>
|
|
214
|
+
<p><span style="font-weight: bold">对象存储:</span>文件上传到云对象存储,数据库需存储文件于对象存储的路径</p>
|
|
215
|
+
<p><span style="font-weight: bold">base64:</span>文件以base64字符串方式存入数据库中(仅图片上传表单支持)</p>
|
|
216
|
+
</template>
|
|
217
|
+
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
|
|
218
|
+
</a-popover>
|
|
219
|
+
</a-select>
|
|
220
|
+
</a-form-model-item>
|
|
221
|
+
</a-col>
|
|
222
|
+
<a-col :span="8">
|
|
223
|
+
<a-form-model-item
|
|
224
|
+
label="允许上传文件类型"
|
|
225
|
+
prop="accept"
|
|
226
|
+
v-if="item.formType === 'file'">
|
|
227
|
+
<a-input v-model="item.accept" placeholder="指定文件类型,默认不限制,可选">
|
|
228
|
+
<a-popover slot="suffix" title="关于允许上传文件类型" placement="bottom">
|
|
229
|
+
<template slot="content">
|
|
230
|
+
<p>指定允许上传的文件类型扩展名,如:.doc,.docx等,详情请参考<a target="_blank" @click="visitAcceptFile">允许上传文件类型</a></p>
|
|
231
|
+
</template>
|
|
232
|
+
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
|
|
233
|
+
</a-popover>
|
|
234
|
+
</a-input>
|
|
235
|
+
</a-form-model-item>
|
|
236
|
+
</a-col>
|
|
237
|
+
<!-- TODO 配置文件上传表单-所属模块 -->
|
|
238
|
+
<!-- TODO 配置文件上传表单-上传扩展目录Key -->
|
|
239
|
+
</a-row>
|
|
240
|
+
<a-row :gutter="16" v-if="item.formType === 'selects'">
|
|
241
|
+
<a-col :span="8">
|
|
242
|
+
<a-form-model-item label="数据所属组别" prop="group">
|
|
243
|
+
<a-select v-model="item.group" placeholder="请输入数据字段名" ref="group">
|
|
244
|
+
<a-select-option v-for="i in groupArray" :key="i">{{ i }}</a-select-option>
|
|
245
|
+
<a-popover slot="suffixIcon" title="关于所属组别" placement="bottom">
|
|
246
|
+
<template slot="content">
|
|
247
|
+
<p>多个下拉框时按照次组别归为一组</p>
|
|
248
|
+
</template>
|
|
249
|
+
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
|
|
250
|
+
</a-popover>
|
|
251
|
+
</a-select>
|
|
252
|
+
</a-form-model-item>
|
|
253
|
+
</a-col>
|
|
254
|
+
<a-col :span="8">
|
|
255
|
+
<a-form-model-item label="组别内顺序" prop="groupIndex">
|
|
256
|
+
<a-select v-model="item.groupIndex" placeholder="表单类型,可选">
|
|
257
|
+
<template v-for="i in 5">
|
|
258
|
+
<a-select-option :key="i">{{ i }}</a-select-option>
|
|
259
|
+
</template>
|
|
260
|
+
<a-popover slot="suffix" title="关于组别内顺序" placement="bottom">
|
|
261
|
+
<template slot="content">
|
|
262
|
+
<p>多个下拉框为一组时,按照此顺序判断页面如何展示以及下拉框得父子顺序</p>
|
|
263
|
+
<p>只有顺序为1的数据字段才可以选择数据源类型</p>
|
|
264
|
+
</template>
|
|
265
|
+
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
|
|
266
|
+
</a-popover>
|
|
267
|
+
</a-select>
|
|
268
|
+
</a-form-model-item>
|
|
269
|
+
</a-col>
|
|
270
|
+
<a-col :span="8">
|
|
271
|
+
<a-form-model-item label="增加组" prop="groupName">
|
|
272
|
+
<a-input-search v-model="item.groupName" @search="addGroupName" placeholder="请输入数据字段名" ref="key">
|
|
273
|
+
<a-button slot="enterButton">
|
|
274
|
+
新增
|
|
275
|
+
</a-button>
|
|
276
|
+
</a-input-search>
|
|
277
|
+
</a-form-model-item>
|
|
278
|
+
</a-col>
|
|
279
|
+
</a-row>
|
|
137
280
|
<a-row :gutter="16">
|
|
138
281
|
<a-col :span="8">
|
|
139
|
-
<a-form-model-item label="数据源类型" prop="selectType" v-if="item.formType === 'select' || item.formType === 'cascader'">
|
|
282
|
+
<a-form-model-item label="数据源类型" prop="selectType" v-if="item.formType === 'select' || (item.formType === 'selects' && item.groupIndex == 1) || item.formType === 'cascader'">
|
|
140
283
|
<a-select v-model="item.selectType" placeholder="请选择数据源类型" @change="changeSelectKey(item)">
|
|
141
284
|
<a-select-option key="key">字典键</a-select-option>
|
|
142
285
|
<a-select-option key="fixArray">固定集合</a-select-option>
|
|
@@ -149,8 +292,11 @@
|
|
|
149
292
|
<p>设置下拉框或级联框的数据源</p>
|
|
150
293
|
<p>数据源类型分为三种,你可以根据需要选择</p>
|
|
151
294
|
<p>字典键:选项从字典表(t_dictionary)获取,你只需要选择字典键的名称即可</p>
|
|
152
|
-
<p>业务逻辑名称:选项通过发起http
|
|
295
|
+
<p>业务逻辑名称:选项通过发起http请求调用指定的业务逻辑(Logic)接口获取</p>
|
|
153
296
|
<p>固定集合:选项为静态值,JSONArray格式</p>
|
|
297
|
+
<p>当表单类型为 " 级联选择框(多个下拉) " 是数据模式为 [{lable,value,children[{lable,value,children[]},{lable,value,children[]}]}] 形式</p>
|
|
298
|
+
<p>如:</p>
|
|
299
|
+
<json-viewer :value="DemoJson" :expand-depth="parseInt('100')" style="overflow: auto;max-height: 440px"></json-viewer>
|
|
154
300
|
</template>
|
|
155
301
|
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
|
|
156
302
|
</a-popover>
|
|
@@ -158,7 +304,7 @@
|
|
|
158
304
|
</a-form-model-item>
|
|
159
305
|
</a-col>
|
|
160
306
|
<a-col :span="8">
|
|
161
|
-
<a-form-model-item label="数据源" prop="selectKey" v-if="(item.formType === 'select' || item.formType === 'cascader') && item.selectType">
|
|
307
|
+
<a-form-model-item label="数据源" prop="selectKey" v-if="(item.formType === 'select' || (item.formType === 'selects' && item.groupIndex == 1) || item.formType === 'cascader') && item.selectType">
|
|
162
308
|
<a-select
|
|
163
309
|
show-search
|
|
164
310
|
v-model="item.selectKey"
|
|
@@ -180,9 +326,23 @@
|
|
|
180
326
|
</a-form-model-item>
|
|
181
327
|
</a-col>
|
|
182
328
|
</a-row>
|
|
329
|
+
<a-form-model-item label="数据源加载方式" prop="selectLoadType" v-if="item.formType === 'select' && item.selectType === 'logic'">
|
|
330
|
+
<a-row :guttor="16">
|
|
331
|
+
<a-col :span="8">
|
|
332
|
+
<a-radio-group v-model="item.lazyLoad" default-value="false" button-style="solid">
|
|
333
|
+
<a-radio-button value="true">
|
|
334
|
+
懒加载搜索
|
|
335
|
+
</a-radio-button>
|
|
336
|
+
<a-radio-button value="false">
|
|
337
|
+
一次性加载
|
|
338
|
+
</a-radio-button>
|
|
339
|
+
</a-radio-group>
|
|
340
|
+
</a-col>
|
|
341
|
+
</a-row>
|
|
342
|
+
</a-form-model-item>
|
|
183
343
|
<a-form-model-item label="表单校验类型" prop="rule">
|
|
184
344
|
<a-row :gutter="16">
|
|
185
|
-
<a-col :span="8">
|
|
345
|
+
<a-col :span="8" v-if="item.formType === 'input' || item.formType === 'textarea'">
|
|
186
346
|
<a-select v-model="item.rule.type" placeholder="校验类型,可选">
|
|
187
347
|
<a-select-option key="string">字符串</a-select-option>
|
|
188
348
|
<a-select-option key="number">数字</a-select-option>
|
|
@@ -203,7 +363,7 @@
|
|
|
203
363
|
</a-select>
|
|
204
364
|
</a-col>
|
|
205
365
|
<a-col :span="8">
|
|
206
|
-
<a-radio-group v-model="item.rule.required"
|
|
366
|
+
<a-radio-group v-model="item.rule.required" default-value="false" button-style="solid">
|
|
207
367
|
<a-radio-button value="true">
|
|
208
368
|
必选项
|
|
209
369
|
</a-radio-button>
|
|
@@ -238,10 +398,11 @@
|
|
|
238
398
|
import XAddForm from '@vue2-client/base-client/components/common/XAddForm/XAddForm'
|
|
239
399
|
import JsonViewer from 'vue-json-viewer'
|
|
240
400
|
import FileSaver from 'file-saver'
|
|
401
|
+
import { queryType } from '@/config/CreateQueryConfig'
|
|
241
402
|
import { mapState } from 'vuex'
|
|
242
403
|
import { post } from '@vue2-client/services/api/restTools'
|
|
243
404
|
import { commonApi } from '@vue2-client/services/api/common'
|
|
244
|
-
|
|
405
|
+
const DemoJson = [{ value: 'zhejiang', label: 'Zhejiang', children: [{ value: 'hangzhou', label: 'Hangzhou', children: [{ value: 'xihu', label: 'West Lake' }] }] }]
|
|
245
406
|
export default {
|
|
246
407
|
name: 'CreateSimpleFormQuery',
|
|
247
408
|
components: {
|
|
@@ -250,6 +411,7 @@ export default {
|
|
|
250
411
|
},
|
|
251
412
|
data () {
|
|
252
413
|
return {
|
|
414
|
+
DemoJson,
|
|
253
415
|
// 页面宽度
|
|
254
416
|
screenWidth: document.documentElement.clientWidth,
|
|
255
417
|
// 效果预览模态框是否展示
|
|
@@ -269,11 +431,15 @@ export default {
|
|
|
269
431
|
item: {
|
|
270
432
|
key: '',
|
|
271
433
|
title: '',
|
|
272
|
-
rule: {
|
|
434
|
+
rule: {
|
|
435
|
+
required: 'false'
|
|
436
|
+
}
|
|
273
437
|
},
|
|
274
438
|
itemMap: {},
|
|
275
439
|
selectIndex: null,
|
|
276
440
|
selectType: undefined,
|
|
441
|
+
joinArray: [],
|
|
442
|
+
groupArray: ['默认组别'],
|
|
277
443
|
rules: {
|
|
278
444
|
group: [{ required: true, message: '请输入参数组名称', trigger: 'blur' }],
|
|
279
445
|
describe: [{ required: true, message: '请输入参数组描述', trigger: 'blur' }]
|
|
@@ -293,7 +459,13 @@ export default {
|
|
|
293
459
|
this.initView()
|
|
294
460
|
},
|
|
295
461
|
computed: {
|
|
296
|
-
...mapState('setting', ['isMobile'])
|
|
462
|
+
...mapState('setting', ['isMobile']),
|
|
463
|
+
queryTypeV () {
|
|
464
|
+
if (this.item.formType) {
|
|
465
|
+
return queryType.filter(item => item.match.includes(this.item.formType))
|
|
466
|
+
}
|
|
467
|
+
return queryType
|
|
468
|
+
}
|
|
297
469
|
},
|
|
298
470
|
props: {
|
|
299
471
|
visible: {
|
|
@@ -322,11 +494,16 @@ export default {
|
|
|
322
494
|
// 必选项兼容处理
|
|
323
495
|
if (columnItem.rule && !isNaN(columnItem.rule.required)) {
|
|
324
496
|
columnItem.rule.required = columnItem.rule.required.toString()
|
|
497
|
+
} else {
|
|
498
|
+
if (!columnItem.rule) {
|
|
499
|
+
columnItem.rule = {}
|
|
500
|
+
}
|
|
501
|
+
columnItem.rule.required = 'false'
|
|
325
502
|
}
|
|
326
503
|
// 下拉框数据源兼容处理
|
|
327
504
|
if ((columnItem.formType === 'select' || columnItem.formType === 'cascader') && columnItem.selectKey) {
|
|
328
505
|
// 数据源为logic
|
|
329
|
-
if (columnItem.selectKey
|
|
506
|
+
if (columnItem.selectKey.toString().startsWith('logic@')) {
|
|
330
507
|
columnItem.selectType = 'logic'
|
|
331
508
|
} else if (columnItem.selectKey instanceof Array || this.isJSON(columnItem.selectKey)) {
|
|
332
509
|
// 数据源为固定json集合
|
|
@@ -341,13 +518,22 @@ export default {
|
|
|
341
518
|
this.itemMap[columnItem.key] = Object.assign({
|
|
342
519
|
key: '',
|
|
343
520
|
title: '',
|
|
344
|
-
rule: {
|
|
521
|
+
rule: {
|
|
522
|
+
required: 'false'
|
|
523
|
+
}
|
|
345
524
|
}, columnItem)
|
|
346
525
|
}
|
|
347
526
|
}
|
|
348
527
|
}
|
|
349
528
|
},
|
|
350
529
|
methods: {
|
|
530
|
+
// 添加多个下拉框分组标识符
|
|
531
|
+
addGroupName (val) {
|
|
532
|
+
this.item.groupName = undefined
|
|
533
|
+
if (!this.groupArray.find(item => item === val)) {
|
|
534
|
+
this.groupArray.push(val)
|
|
535
|
+
}
|
|
536
|
+
},
|
|
351
537
|
// 初始化组件
|
|
352
538
|
initView () {
|
|
353
539
|
this.result = {}
|
|
@@ -424,20 +610,19 @@ export default {
|
|
|
424
610
|
delete item.formType
|
|
425
611
|
}
|
|
426
612
|
// 校验类型
|
|
427
|
-
if (
|
|
428
|
-
|
|
613
|
+
if (item.rule.required) {
|
|
614
|
+
item.rule.required = item.rule.required.toString() === 'true'
|
|
429
615
|
} else {
|
|
430
|
-
|
|
431
|
-
item.rule.required = item.rule.required.toString() === 'true'
|
|
432
|
-
} else {
|
|
433
|
-
item.rule.required = true
|
|
434
|
-
}
|
|
616
|
+
item.rule.required = false
|
|
435
617
|
}
|
|
436
618
|
// 下拉框
|
|
437
|
-
if ((item.formType === 'select' || item.formType === 'cascader') && item.selectKey) {
|
|
619
|
+
if ((item.formType === 'select' || (item.formType === 'selects' && item.groupIndex == '1') || item.formType === 'cascader') && item.selectKey) {
|
|
438
620
|
// 数据源为logic
|
|
439
621
|
if (item.selectType === 'logic') {
|
|
440
|
-
|
|
622
|
+
// 如果已经有了 logic@ 将不再拼接
|
|
623
|
+
if (item.selectKey.substring(0, 6) !== 'logic@') {
|
|
624
|
+
item.selectKey = 'logic@' + item.selectKey
|
|
625
|
+
}
|
|
441
626
|
} else if (item.selectType === 'fixArray') {
|
|
442
627
|
// 数据源为固定json集合
|
|
443
628
|
if (!this.isJSON(item.selectKey)) {
|
|
@@ -445,10 +630,17 @@ export default {
|
|
|
445
630
|
return
|
|
446
631
|
}
|
|
447
632
|
}
|
|
448
|
-
|
|
633
|
+
if (item.formType !== 'selects') {
|
|
634
|
+
delete item.selectType
|
|
635
|
+
}
|
|
449
636
|
} else {
|
|
637
|
+
if (item.formType !== 'selects') {
|
|
638
|
+
delete item.group
|
|
639
|
+
delete item.groupIndex
|
|
640
|
+
}
|
|
450
641
|
delete item.selectType
|
|
451
642
|
delete item.selectKey
|
|
643
|
+
delete item.selectKeyName
|
|
452
644
|
}
|
|
453
645
|
if (this.type === '新增') {
|
|
454
646
|
this.form.column.push(item)
|
|
@@ -458,7 +650,9 @@ export default {
|
|
|
458
650
|
this.item = {
|
|
459
651
|
key: '',
|
|
460
652
|
title: '',
|
|
461
|
-
rule: {
|
|
653
|
+
rule: {
|
|
654
|
+
required: 'false'
|
|
655
|
+
}
|
|
462
656
|
}
|
|
463
657
|
this.$message.success('增加成功')
|
|
464
658
|
this.dataColumnVisible = false
|
|
@@ -523,7 +717,9 @@ export default {
|
|
|
523
717
|
this.item = {
|
|
524
718
|
key: '',
|
|
525
719
|
title: '',
|
|
526
|
-
rule: {
|
|
720
|
+
rule: {
|
|
721
|
+
required: 'false'
|
|
722
|
+
}
|
|
527
723
|
}
|
|
528
724
|
}, 100)
|
|
529
725
|
},
|
|
@@ -532,6 +728,9 @@ export default {
|
|
|
532
728
|
item.slot.type = 'badge'
|
|
533
729
|
item.slotKeyMap = item.selectKey
|
|
534
730
|
}
|
|
731
|
+
},
|
|
732
|
+
visitAcceptFile () {
|
|
733
|
+
window.open('https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/input/file#attr-accept')
|
|
535
734
|
}
|
|
536
735
|
}
|
|
537
736
|
}
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
:label="attr.name"
|
|
45
45
|
:prop="attr.model">
|
|
46
46
|
<a-select
|
|
47
|
+
v-if="!attr.lazyLoad"
|
|
47
48
|
v-model="form[attr.model]"
|
|
48
49
|
:disabled="disabled"
|
|
49
50
|
show-search
|
|
@@ -82,6 +83,22 @@
|
|
|
82
83
|
</template>
|
|
83
84
|
</template>
|
|
84
85
|
</a-select>
|
|
86
|
+
<a-select
|
|
87
|
+
v-else
|
|
88
|
+
show-search
|
|
89
|
+
v-model="form[attr.model]"
|
|
90
|
+
:disabled="disabled"
|
|
91
|
+
@search="fetchFunction"
|
|
92
|
+
:placeholder="attr.placeholder ? attr.placeholder : '搜索' + attr.name"
|
|
93
|
+
:filter-option="filterOption"
|
|
94
|
+
>
|
|
95
|
+
<a-spin v-if="searching" slot="notFoundContent" size="small" />
|
|
96
|
+
<a-select-option
|
|
97
|
+
v-for="(item,index) in option"
|
|
98
|
+
:key="index"
|
|
99
|
+
:value="Object.keys(item)[0]">{{ item[Object.keys(item)[0]] }}
|
|
100
|
+
</a-select-option>
|
|
101
|
+
</a-select>
|
|
85
102
|
</a-form-model-item>
|
|
86
103
|
</x-form-col>
|
|
87
104
|
<!-- TODO 多选框 -->
|
|
@@ -149,12 +166,19 @@
|
|
|
149
166
|
<script>
|
|
150
167
|
|
|
151
168
|
import { post } from '@vue2-client/services/api/restTools'
|
|
169
|
+
import { debounce } from 'ant-design-vue/lib/vc-table/src/utils'
|
|
152
170
|
|
|
153
171
|
export default {
|
|
154
172
|
name: 'XFormItem',
|
|
155
173
|
data () {
|
|
174
|
+
// 检索去抖
|
|
175
|
+
this.fetchFunction = debounce(this.fetchFunction, 800)
|
|
156
176
|
return {
|
|
157
|
-
option: []
|
|
177
|
+
option: [],
|
|
178
|
+
// 最后检索版本
|
|
179
|
+
lastFetchId: 0,
|
|
180
|
+
// 检索中
|
|
181
|
+
searching: false
|
|
158
182
|
}
|
|
159
183
|
},
|
|
160
184
|
props: {
|
|
@@ -192,15 +216,37 @@ export default {
|
|
|
192
216
|
}
|
|
193
217
|
},
|
|
194
218
|
created () {
|
|
195
|
-
if (this.attr.keyName && this.attr.keyName.indexOf('logic@') !== -1) {
|
|
196
|
-
|
|
197
|
-
const logic = logicName.substring(6)
|
|
198
|
-
post('/webmeterapi/' + logic, {}).then(res => {
|
|
219
|
+
if (!this.attr.lazyLoad && this.attr.keyName && this.attr.keyName.indexOf('logic@') !== -1) {
|
|
220
|
+
this.getData({}, res => {
|
|
199
221
|
this.option = res
|
|
200
222
|
})
|
|
201
223
|
}
|
|
202
224
|
},
|
|
203
225
|
methods: {
|
|
226
|
+
// 懒加载检索方法
|
|
227
|
+
fetchFunction (value) {
|
|
228
|
+
this.lastFetchId += 1
|
|
229
|
+
const fetchId = this.lastFetchId
|
|
230
|
+
this.option = []
|
|
231
|
+
this.searching = true
|
|
232
|
+
this.getData({
|
|
233
|
+
word: value
|
|
234
|
+
}, res => {
|
|
235
|
+
if (fetchId !== this.lastFetchId) {
|
|
236
|
+
return
|
|
237
|
+
}
|
|
238
|
+
this.option = res
|
|
239
|
+
this.searching = false
|
|
240
|
+
})
|
|
241
|
+
},
|
|
242
|
+
// 获取数据
|
|
243
|
+
getData (value, callback) {
|
|
244
|
+
const logicName = this.attr.keyName
|
|
245
|
+
const logic = logicName.substring(6)
|
|
246
|
+
post('/webmeterapi/' + logic, value).then(res => {
|
|
247
|
+
callback(res)
|
|
248
|
+
})
|
|
249
|
+
},
|
|
204
250
|
filterOption (input, option) {
|
|
205
251
|
if (option.componentOptions.children[0].text) {
|
|
206
252
|
return (
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
:json-data="showColumns"
|
|
122
122
|
:queryParamsName="queryParamsName"
|
|
123
123
|
@loadData="loadData"
|
|
124
|
-
:
|
|
124
|
+
:fixedQueryForm="form"
|
|
125
125
|
/>
|
|
126
126
|
<div v-else-if="operationActiveTabKey === '3'" class="no-data"><a-icon type="frown-o"/>暂无数据</div>
|
|
127
127
|
</a-card>
|
|
@@ -188,8 +188,7 @@ export default {
|
|
|
188
188
|
loaded: false,
|
|
189
189
|
// 查询操作日志表单
|
|
190
190
|
form: {
|
|
191
|
-
|
|
192
|
-
f_org_name: this.selectOrgName
|
|
191
|
+
r_f_data_id: this.instructid
|
|
193
192
|
},
|
|
194
193
|
operationTabList: [
|
|
195
194
|
{
|
package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue
CHANGED
|
@@ -396,7 +396,7 @@ export default {
|
|
|
396
396
|
return '由于您的工单等待时间过长,系统已为您自动加急工单,请保持电话畅通,感谢您的理解'
|
|
397
397
|
} else {
|
|
398
398
|
// 超过十分钟
|
|
399
|
-
return '
|
|
399
|
+
return '很抱歉让您久等,请电询:14709288966'
|
|
400
400
|
}
|
|
401
401
|
} else {
|
|
402
402
|
// 高优先级
|
|
@@ -409,7 +409,7 @@ export default {
|
|
|
409
409
|
return '您的工单已经被加急处理,我们的工作人员会马上与您取得联系'
|
|
410
410
|
} else {
|
|
411
411
|
// 超过十分钟
|
|
412
|
-
return '
|
|
412
|
+
return '很抱歉让您久等,请电询:14709288966'
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
},
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
queryType: [
|
|
3
|
+
{
|
|
4
|
+
label: '相等(=)', key: '=', match: 'input;select;radio;monthPicker;datePicker;cascader;selects'
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
label: '不相等(!=)', key: '!=', match: 'input;select;radio;monthPicker;datePicker;cascader;selects'
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
label: '全模糊(like)', key: 'LIKE', match: 'input;select;radio;cascader;selects'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: '左模糊(left like)', key: 'LEFT_LIKE', match: 'input;select;radio;cascader;selects'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: '右模糊(right like)', key: 'RIGHT_LIKE', match: 'input;select;radio;cascader;selects'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: '大于(>)', key: '>', match: 'input;select;radio;monthPicker;datePicker;cascader;selects'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: '大于等于(>=)', key: '>=', match: 'input;select;radio;monthPicker;datePicker;cascader;selects'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
label: '小于(<)', key: '<', match: 'input;select;radio;monthPicker;datePicker;cascader;selects'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: '小于等于(<=)', key: '<=', match: 'input;select;radio;monthPicker;datePicker;cascader;selects'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: '包含(in)', key: 'IN', match: 'checkbox;select;cascader;selects'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: '不包含(not in)', key: 'NOT_IN', match: 'checkbox;select;cascader;selects'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: '之间(between)', key: 'BETWEEN', match: 'rangePicker'
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -18,6 +18,7 @@ module.exports = {
|
|
|
18
18
|
cachePage: true, // 是否缓存页面数据,仅多页签模式下生效,true 缓存, false 不缓存
|
|
19
19
|
hideSetting: false, // 隐藏设置抽屉,true:隐藏,false:不隐藏
|
|
20
20
|
homePage: '/system/dictionaryManage', // 首页路由, 登陆后默认打开
|
|
21
|
+
ticketPage: '/submitTicket', // 提交工单路由
|
|
21
22
|
systemName: '物联网监控平台', // 系统名称
|
|
22
23
|
copyright: '2021 Mr.Jiang', // copyright
|
|
23
24
|
asyncRoutes: true, // 异步加载路由,true:开启,false:不开启
|
|
@@ -61,9 +61,9 @@ import { mapMutations } from 'vuex'
|
|
|
61
61
|
import JSEncrypt from 'jsencrypt'
|
|
62
62
|
import { ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
|
|
63
63
|
import Vue from 'vue'
|
|
64
|
-
import Mock from 'mockjs'
|
|
65
64
|
import { positions } from '@vue2-client/mock/common'
|
|
66
|
-
|
|
65
|
+
import { timeFix } from '@/utils/util'
|
|
66
|
+
const { homePage, ticketPage } = require('@vue2-client/config')
|
|
67
67
|
// import { router } from '@vue2-client/mock/user/routes'
|
|
68
68
|
|
|
69
69
|
export default {
|
|
@@ -123,8 +123,12 @@ export default {
|
|
|
123
123
|
const dateAfter = new Date(timestamp)
|
|
124
124
|
setAuthorization({ token: data, expireAt: dateAfter })
|
|
125
125
|
loadRoutes(funcToRouter(user.functions))
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
if (result.deps === '用户工单登记') {
|
|
127
|
+
this.$router.push(ticketPage).catch(() => {})
|
|
128
|
+
} else {
|
|
129
|
+
this.$router.push(homePage).catch(() => {})
|
|
130
|
+
}
|
|
131
|
+
this.$message.success(timeFix().CN + ',欢迎回来', 3)
|
|
128
132
|
})
|
|
129
133
|
})
|
|
130
134
|
} else {
|