formui-vue2-vistastory 0.1.3-8.1

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.
Files changed (96) hide show
  1. package/FormUiForm.vue +565 -0
  2. package/FormUiQueryParam.vue +398 -0
  3. package/FormUiQueryParamItem.vue +344 -0
  4. package/FormUiSimpleForm.vue +139 -0
  5. package/FormUiTableCell.vue +105 -0
  6. package/index.js +17 -0
  7. package/package.json +93 -0
  8. package/service/base/OssService.js +15 -0
  9. package/service/base/httpUtil.js +123 -0
  10. package/service/formui/FormuiService.js +56 -0
  11. package/service/lib/math.js +67 -0
  12. package/service/lib/quill.eeSourceBtn.js +84 -0
  13. package/service/lib/quill.img.js +59 -0
  14. package/static/tinymce/icons/default/icons.min.js +1 -0
  15. package/static/tinymce/jquery.tinymce.min.js +91 -0
  16. package/static/tinymce/langs/README.md +3 -0
  17. package/static/tinymce/langs/zh_CN.js +463 -0
  18. package/static/tinymce/license.txt +504 -0
  19. package/static/tinymce/plugins/advlist/plugin.min.js +9 -0
  20. package/static/tinymce/plugins/anchor/plugin.min.js +9 -0
  21. package/static/tinymce/plugins/autolink/plugin.min.js +9 -0
  22. package/static/tinymce/plugins/autoresize/plugin.min.js +9 -0
  23. package/static/tinymce/plugins/autosave/plugin.min.js +9 -0
  24. package/static/tinymce/plugins/bbcode/plugin.min.js +9 -0
  25. package/static/tinymce/plugins/charmap/plugin.min.js +9 -0
  26. package/static/tinymce/plugins/code/plugin.min.js +9 -0
  27. package/static/tinymce/plugins/codesample/plugin.min.js +9 -0
  28. package/static/tinymce/plugins/colorpicker/plugin.min.js +9 -0
  29. package/static/tinymce/plugins/contextmenu/plugin.min.js +9 -0
  30. package/static/tinymce/plugins/directionality/plugin.min.js +9 -0
  31. package/static/tinymce/plugins/emoticons/js/emojiimages.js +9424 -0
  32. package/static/tinymce/plugins/emoticons/js/emojiimages.min.js +3 -0
  33. package/static/tinymce/plugins/emoticons/js/emojis.js +9423 -0
  34. package/static/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
  35. package/static/tinymce/plugins/emoticons/plugin.min.js +9 -0
  36. package/static/tinymce/plugins/fullpage/plugin.min.js +9 -0
  37. package/static/tinymce/plugins/fullscreen/plugin.min.js +9 -0
  38. package/static/tinymce/plugins/help/plugin.min.js +9 -0
  39. package/static/tinymce/plugins/hr/plugin.min.js +9 -0
  40. package/static/tinymce/plugins/image/plugin.min.js +9 -0
  41. package/static/tinymce/plugins/imagetools/plugin.min.js +9 -0
  42. package/static/tinymce/plugins/importcss/plugin.min.js +9 -0
  43. package/static/tinymce/plugins/insertdatetime/plugin.min.js +9 -0
  44. package/static/tinymce/plugins/legacyoutput/plugin.min.js +9 -0
  45. package/static/tinymce/plugins/link/plugin.min.js +9 -0
  46. package/static/tinymce/plugins/lists/plugin.min.js +9 -0
  47. package/static/tinymce/plugins/media/plugin.min.js +9 -0
  48. package/static/tinymce/plugins/nonbreaking/plugin.min.js +9 -0
  49. package/static/tinymce/plugins/noneditable/plugin.min.js +9 -0
  50. package/static/tinymce/plugins/pagebreak/plugin.min.js +9 -0
  51. package/static/tinymce/plugins/paste/plugin.min.js +9 -0
  52. package/static/tinymce/plugins/preview/plugin.min.js +9 -0
  53. package/static/tinymce/plugins/print/plugin.min.js +9 -0
  54. package/static/tinymce/plugins/quickbars/plugin.min.js +9 -0
  55. package/static/tinymce/plugins/save/plugin.min.js +9 -0
  56. package/static/tinymce/plugins/searchreplace/plugin.min.js +9 -0
  57. package/static/tinymce/plugins/spellchecker/plugin.min.js +9 -0
  58. package/static/tinymce/plugins/tabfocus/plugin.min.js +9 -0
  59. package/static/tinymce/plugins/table/plugin.min.js +9 -0
  60. package/static/tinymce/plugins/template/plugin.min.js +9 -0
  61. package/static/tinymce/plugins/textcolor/plugin.min.js +9 -0
  62. package/static/tinymce/plugins/textpattern/plugin.min.js +9 -0
  63. package/static/tinymce/plugins/toc/plugin.min.js +9 -0
  64. package/static/tinymce/plugins/visualblocks/plugin.min.js +9 -0
  65. package/static/tinymce/plugins/visualchars/plugin.min.js +9 -0
  66. package/static/tinymce/plugins/wordcount/plugin.min.js +9 -0
  67. package/static/tinymce/skins/content/dark/content.min.css +7 -0
  68. package/static/tinymce/skins/content/default/content.min.css +7 -0
  69. package/static/tinymce/skins/content/document/content.min.css +7 -0
  70. package/static/tinymce/skins/content/writer/content.min.css +7 -0
  71. package/static/tinymce/skins/ui/oxide/content.inline.min.css +7 -0
  72. package/static/tinymce/skins/ui/oxide/content.min.css +7 -0
  73. package/static/tinymce/skins/ui/oxide/content.mobile.min.css +7 -0
  74. package/static/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  75. package/static/tinymce/skins/ui/oxide/skin.min.css +7 -0
  76. package/static/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -0
  77. package/static/tinymce/skins/ui/oxide/skin.shadowdom.min.css +7 -0
  78. package/static/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -0
  79. package/static/tinymce/skins/ui/oxide-dark/content.min.css +7 -0
  80. package/static/tinymce/skins/ui/oxide-dark/content.mobile.min.css +7 -0
  81. package/static/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  82. package/static/tinymce/skins/ui/oxide-dark/skin.min.css +7 -0
  83. package/static/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +7 -0
  84. package/static/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
  85. package/static/tinymce/themes/mobile/theme.min.js +9 -0
  86. package/static/tinymce/themes/silver/theme.min.js +9 -0
  87. package/static/tinymce/tinymce.d.ts +3039 -0
  88. package/static/tinymce/tinymce.min.js +9 -0
  89. package/widget/FormUiFileUpload.vue +486 -0
  90. package/widget/FormUiForeignSelect.vue +171 -0
  91. package/widget/FormUiForeignStr.vue +80 -0
  92. package/widget/FormUiRichText.vue +238 -0
  93. package/widget/FormUiStyleSelect.vue +194 -0
  94. package/widget/ScriptLoader.js +65 -0
  95. package/widget/TinymceZhCn.js +472 -0
  96. package/widget/Utils.js +142 -0
package/FormUiForm.vue ADDED
@@ -0,0 +1,565 @@
1
+ <template>
2
+ <div class="hf-form-ui-form" >
3
+ <!-- <el-button type="primary" @click="$router.back(-1)"-->
4
+ <!-- size="mini">返回-->
5
+ <!-- </el-button>-->
6
+ <!--{{ruleForm}}-->
7
+ <!--{{ruleForm}}-->
8
+ <!--{{labelWidthCurrent}}-->
9
+ <div v-if="loadSuccess">
10
+ <el-form :model="ruleForm" ref="ruleForm" style="margin-top: 10px;"
11
+ :label-width="labelWidthCurrent"
12
+ size="" :rules="rules" >
13
+
14
+ <!--{{formuiFields}}-->
15
+ <div v-for="fieldItem in formuiFields">
16
+ <!--{{ruleForm[fieldItem.name]}}___-->
17
+ <!--{{fieldItem.name}}-->
18
+ <span v-if="fieldItem.valueType=='HIDDEN'">
19
+
20
+ <!--<el-input-number v-model="ruleForm[fieldItem.name]" controls-position="right" :min="-99999" :max="99999"></el-input-number>-->
21
+ </span>
22
+ <!--<span v-else-if="getIsHide(fieldItem,ruleForm)">-->
23
+ <!--&lt;!&ndash;隐藏&ndash;&gt;-->
24
+ <!--</span>-->
25
+
26
+ <!--:style="getIsHide(fieldItem,ruleForm)?'display: none':''"-->
27
+ <el-form-item
28
+ :style="getIsHide(fieldItem,ruleForm)?'height:0px;display:block;position:fixed;opacity:0;':''"
29
+
30
+ :label="fieldItem.title"
31
+ :prop="fieldItem.name"
32
+
33
+ v-else>
34
+ <!--{{fieldItem.name}}-->
35
+ <el-tooltip class="formui_notes" effect="dark" :content="fieldItem.notes" placement="top-start" v-if="fieldItem.notes">
36
+ <span class="el-icon-info"></span>
37
+ </el-tooltip>
38
+ <!--{{fieldItem.valueType}}-->
39
+
40
+ <span v-if="fieldItem.foreignStyleClass!='FormUiStyle'">
41
+ <!--{{fieldItem.foreignStyleClass}}-->
42
+ <!--{{fieldItem.name}}_{{ruleForm[fieldItem.name]}}-->
43
+ <!--v-bind:multiple="'DEFAULT'==fieldItem.valueType?true:false"-->
44
+ <component v-bind:is="'formUiStyleSelect'"
45
+ ref="formUiStyleSelect"
46
+ v-bind:inputType="fieldItem.valueType=='CHECKBOX'?'checkbox':'select'"
47
+ v-bind:defaultLabel="'请选择'"
48
+ v-bind:required="fieldItem.required"
49
+ v-bind:fieldName="fieldItem.name"
50
+ v-bind:beanName="fieldItem.foreignStyleClass"
51
+ v-bind:fieldValue="ruleForm[fieldItem.name]"
52
+ @setFieldValue="setFieldValue"
53
+ ></component>
54
+
55
+ </span>
56
+ <span v-else-if="fieldItem.foreignServiceClass!='FormUiForeignService'">
57
+
58
+ <component v-bind:is="'formUiForeignSelect'"
59
+ :ref="'formUiForeignSelect'+fieldItem.name"
60
+ v-bind:multiple="'DEFAULT'==fieldItem.valueType?true:false"
61
+ v-bind:defaultLabel="'无'"
62
+ v-bind:fieldName="fieldItem.name"
63
+ v-bind:beanName="fieldItem.foreignServiceClass"
64
+ v-bind:fieldValue="ruleForm[fieldItem.name]"
65
+ v-bind:fieldItem="fieldItem"
66
+ v-bind:formData="ruleForm"
67
+ @setFieldValue="setFieldValue"
68
+ ></component>
69
+
70
+ </span>
71
+ <!--formUiForeignSelect-->
72
+ <span v-else-if="fieldItem.valueType=='INTEGER'">
73
+
74
+ <el-input-number v-model="ruleForm[fieldItem.name]" controls-position="right" :min="-99999" :max="99999" :controls="false" ></el-input-number>
75
+ </span>
76
+
77
+ <span v-else-if="fieldItem.valueType=='PERCENT'">
78
+
79
+ <el-input-number v-model="ruleForm[fieldItem.name]" controls-position="right" :min="-100" :max="100" :controls="false" style="width:80px;" ></el-input-number>%
80
+ </span>
81
+ <span v-else-if="fieldItem.valueType=='MONEY'">
82
+ <el-input-number v-model="ruleFormMoney[fieldItem.name]" controls-position="right" :min="-99999" :max="99999" :controls="false"></el-input-number>
83
+ </span>
84
+ <span v-else-if="fieldItem.valueType=='STRING'">
85
+ <el-input style="width: 100%" :placeholder="'请输入'+fieldItem.title" name="title"
86
+ v-model="ruleForm[fieldItem.name]"
87
+ ></el-input>
88
+ </span>
89
+ <span v-else-if="fieldItem.valueType=='TEXT'">
90
+ <el-input style="width: 100%" :placeholder="'请输入'+fieldItem.title" name="title"
91
+ v-model="ruleForm[fieldItem.name]"
92
+ type="textarea"
93
+ ></el-input>
94
+ </span>
95
+ <span v-else-if="fieldItem.valueType=='DATETIME'">
96
+ <el-date-picker
97
+ v-model="ruleForm[fieldItem.name]"
98
+ type="datetime"
99
+ placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" />
100
+ </span>
101
+
102
+ <span v-else-if="fieldItem.valueType=='DATE_BEGIN'">
103
+ <el-date-picker
104
+ v-model="ruleForm[fieldItem.name]"
105
+ type="date"
106
+ placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" />
107
+ </span>
108
+ <span v-else-if="fieldItem.valueType=='DATE_END'">
109
+ <el-date-picker
110
+ v-model="ruleForm[fieldItem.name]"
111
+ type="date"
112
+ placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" />
113
+ </span>
114
+
115
+ <span v-else-if="fieldItem.valueType=='MONTH_BEGIN'">
116
+ <el-date-picker
117
+ v-model="ruleForm[fieldItem.name]"
118
+ type="month"
119
+ placeholder="选择日期" value-format="yyyy-MM" format="yyyy-MM" />
120
+ </span>
121
+ <span v-else-if="fieldItem.valueType=='MONTH_END'">
122
+ <el-date-picker
123
+ v-model="ruleForm[fieldItem.name]"
124
+ type="month"
125
+ placeholder="选择日期" value-format="yyyy-MM" format="yyyy-MM" />
126
+ </span>
127
+
128
+ <span v-else-if="fieldItem.valueType=='FILE'">
129
+ <!--{{ruleForm[fieldItem.name+'Url']}}-->
130
+ <span v-if="!fieldItem.fileRule">需要设置fileRule</span>
131
+ <component
132
+ v-else
133
+ v-bind:is="'FormUiFileUpload'"
134
+ v-bind:fieldName="fieldItem.name"
135
+ v-bind:imageUrl="ruleForm[fieldItem.name+'Url']"
136
+ v-bind:imagePath="ruleForm[fieldItem.name]"
137
+ v-bind:initObj="fieldItem.name"
138
+ v-bind:filesCountLimit="fieldItem.fileRule.filesCountLimit"
139
+ v-bind:accept="fieldItem.fileRule.extensionNames"
140
+ v-bind:limitSize="fieldItem.fileRule.fileSizeLimit"
141
+ v-bind:isPreviewImg="fieldItem.fileRule.isPreviewImg"
142
+ ref="ruleForm"
143
+ @setFieldValue="setFieldValue">
144
+ </component>
145
+
146
+ </span>
147
+ <span v-else-if="fieldItem.valueType=='RICH_TEXT'">
148
+ <!--富文本编辑-->
149
+
150
+ <div style="line-height:normal;font-size: unset;">
151
+ <component
152
+
153
+ v-bind:is="'FormUiRichText'"
154
+ v-bind:fieldName="fieldItem.name"
155
+ v-bind:fieldContent="ruleForm[fieldItem.name]"
156
+ ref="ruleForm"
157
+ @setFieldValue="setFieldValue">
158
+ </component>
159
+
160
+ <!--<quill-editor ref="myTextEditor" v-model="ruleForm[fieldItem.name]" :options="editorOption" style="" ></quill-editor>-->
161
+ </div>
162
+ <!--<el-date-picker-->
163
+ <!--v-model="ruleForm[fieldItem.name]"-->
164
+ <!--type="month"-->
165
+ <!--placeholder="选择日期" value-format="yyyy-MM" format="yyyy-MM" />-->
166
+ </span>
167
+ <span v-else-if="fieldItem.valueType=='TAG'">
168
+
169
+ <el-tag
170
+ :key="tag"
171
+ v-for="tag in ruleForm[fieldItem.name]"
172
+ closable
173
+ :disable-transitions="false"
174
+ @close="handleClose(ruleForm[fieldItem.name],tag)">
175
+ {{tag}}
176
+ </el-tag>
177
+
178
+ <el-input
179
+ class="input-new-tag"
180
+ v-if="inputVisible"
181
+ v-model="inputValue"
182
+ ref="saveTagInput"
183
+ size="small"
184
+ @keyup.enter.native="handleInputConfirm([fieldItem.name])"
185
+ @blur="handleInputConfirm([fieldItem.name])"
186
+ >
187
+ </el-input>
188
+ <el-button v-else class="button-new-tag" size="small" @click="showInput">+ 新标签</el-button>
189
+ </span>
190
+ <span v-else>
191
+ {{fieldItem.valueType}}
192
+ </span>
193
+
194
+
195
+
196
+ </el-form-item>
197
+ </div>
198
+
199
+
200
+ <!--<el-form-item label="账单日期" prop="returnedPlanTime">-->
201
+ <!--<el-date-picker-->
202
+ <!--v-model="queryParams.returnedPlanTime"-->
203
+ <!--ref="queryParams.returnedPlanTime"-->
204
+ <!--type="datetime"-->
205
+ <!--placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"/>-->
206
+ <!--</el-form-item>-->
207
+
208
+ <!--<el-form-item label="备注">-->
209
+ <!--<el-input style="width: 220px" placeholder="备注" name="remarks" v-model="queryParams.remarks"-->
210
+ <!--ref="queryParams.remarks"></el-input>-->
211
+ <!--</el-form-item>-->
212
+
213
+ <el-form-item>
214
+ <el-button type="primary" @click="submitForm('ruleForm')">{{btnTitleStr}}</el-button>
215
+ </el-form-item>
216
+
217
+ </el-form>
218
+ </div>
219
+ </div>
220
+ </template>
221
+
222
+ <script>
223
+
224
+ import mathUtil from './service/lib/math.js'
225
+ import formuiService from './service/formui/FormuiService.js'
226
+ import formUiStyleSelect from './widget/FormUiStyleSelect.vue'
227
+ import formUiForeignSelect from './widget/FormUiForeignSelect.vue'
228
+ import FormUiFileUpload from './widget/FormUiFileUpload.vue'
229
+ import FormUiRichText from './widget/FormUiRichText.vue'
230
+ import moment from 'moment'
231
+
232
+ // 组件导入
233
+
234
+ // Quill.register('modules/eeSourceBtn', eeSourceBtn);
235
+
236
+ export default {
237
+ name: 'FormUiForm',
238
+ props: ['beanName','removeFileds','ruleFormSrc','btnTitle','labelWidth'],
239
+ components:{FormUiFileUpload,formUiStyleSelect,formUiForeignSelect,FormUiRichText},
240
+ data () {
241
+ return {
242
+ labelWidthCurrent:'auto',
243
+ inputVisible:false,
244
+ inputValue:'',
245
+ btnTitleStr:'确定',
246
+ loadSuccess:false,
247
+ // removeFileds:[],
248
+ rules:{},
249
+ ruleForm:{},
250
+ ruleFormMoney:{},
251
+ // ruleFormTime:{},
252
+ formuiFields: [], // 渠道类型
253
+ isHaveChannel: false,
254
+ tt:'',
255
+ }
256
+ },
257
+
258
+ methods: {
259
+ onEditorChange({ editor, html, text }) {
260
+ this.content = html;
261
+ },
262
+ uploadImg (newimagePath, newimageUrl,name) {
263
+ this.ruleForm[name] = newimagePath
264
+ this.ruleForm[name+'Url'] = newimageUrl
265
+ // console.log('imagePath=' + imagePath)
266
+ // console.log('imageUrl=' + imageUrl)
267
+ },
268
+ // 提交
269
+ submitForm (formName) {
270
+ // console.log(this.queryParams)
271
+ let that = this
272
+
273
+ // alert(that.formuiFields.length)
274
+ // console.log(that.formuiFields)
275
+ for(let i=0;i< that.formuiFields.length;i++){
276
+ let fieldItem=that.formuiFields[i]
277
+ // alert(fieldItem.name)
278
+ if(fieldItem.valueType=='MONEY'){
279
+ // alert(mathUtil.methods.mul)
280
+ if(that.ruleFormMoney[fieldItem.name]){
281
+ that.ruleForm[fieldItem.name]=mathUtil.mul(that.ruleFormMoney[fieldItem.name],100)
282
+ }
283
+
284
+ }else if(fieldItem.valueType=='DATETIME'){
285
+ // alert(1)
286
+ // alert(that.ruleFormTime[fieldItem.name])
287
+ // that.ruleForm[fieldItem.name]=that.ruleFormTime[fieldItem.name]
288
+ }
289
+
290
+ }
291
+
292
+ for(let i=0;i< that.formuiFields.length;i++){
293
+ let fieldItem=that.formuiFields[i]
294
+ if(fieldItem.bindColumn&&this.getIsHide(fieldItem,that.ruleForm)==false){
295
+
296
+ this.$set(that.ruleForm,fieldItem.bindColumn,that.ruleForm[fieldItem.name])
297
+ }
298
+ }
299
+ // alert(4444)
300
+ // alert(this.$refs[formName].validate())
301
+ try{
302
+ this.$refs[formName].validate((valid) => {
303
+ // alert(22)
304
+ if (valid) {
305
+ // alert(33)
306
+ this.$emit('submitForm', this.ruleForm)
307
+ }
308
+ })
309
+ }catch (e){
310
+ alert(e)
311
+ }
312
+
313
+ // return
314
+
315
+
316
+ },
317
+ setFieldValue:function (key,value) {
318
+ let that=this
319
+
320
+ this.$set(this.ruleForm,key,value)
321
+
322
+ // 多级关联参数
323
+ this.loadSuccess=false
324
+ for(let i=0;i< that.formuiFields.length;i++) {
325
+ let fieldItem = that.formuiFields[i]
326
+ // alert(0)
327
+ if(fieldItem.joinItems){
328
+ // alert(1)
329
+ for(let j=0;j<fieldItem.joinItems.length;j++){
330
+ if(fieldItem.joinItems[j].parentFieldName===key){
331
+ // alert(1)
332
+ that.formuiFields[i].joinItems[j].value=value
333
+ // console.log('formUiForeignSelect'+that.formuiFields[i].name+'<<<<')
334
+ if(that.$refs['formUiForeignSelect'+that.formuiFields[i].name]){
335
+ that.$refs['formUiForeignSelect'+that.formuiFields[i].name][0].updateJsonList(that.formuiFields[i].joinItems)
336
+
337
+ }
338
+
339
+ // that.$set(that.formuiFields[i].joinItems[j],'value',value)
340
+ }
341
+
342
+ }
343
+
344
+ }
345
+
346
+
347
+
348
+ }
349
+
350
+
351
+ this.loadSuccess=true
352
+
353
+ //手动验证
354
+ // let kv={}
355
+ // kv['publish']=value
356
+
357
+
358
+ },
359
+ formatTime(date){
360
+ return moment(date).format("YYYY-MM-DD HH:mm:ss");
361
+
362
+ },
363
+ setRules(){
364
+ let that=this
365
+ //表单验证对象,因为创建和编辑都需要验证,所以单独写了方法
366
+ let fields=this.formuiFields
367
+ //console.log('------------------------------------1')
368
+ for(var i=0;i<fields.length;i++){
369
+ // alert(fields[i])
370
+ if(this.getIsHide(fields[i],this.ruleForm)){
371
+ //隐藏字段不验证空
372
+ continue;
373
+ }
374
+ if(fields[i].required==true){
375
+ // alert(fields[i].name)
376
+ that.rules[fields[i].name]=[
377
+
378
+ { required: true, message: '请输入'+fields[i].title, trigger:['blur','change'] }
379
+ ]
380
+ }
381
+
382
+ }
383
+ // console.log('------------------------------------2')
384
+ // console.log(that.rules)
385
+ // return rules
386
+ },
387
+ getIsHide(fieldItem,ruleForm){
388
+
389
+ if(fieldItem.pre&&fieldItem.pre.length>0){
390
+ for(let i=0;i<fieldItem.pre.length;i++){
391
+ // if(fieldItem.pre[i].value.indexOf(',')!=-1){
392
+ var fieldItemPreArr=(fieldItem.pre[i].value+'').split(",");
393
+
394
+ var flagEqual=false
395
+ for(var j=0;j<fieldItemPreArr.length;j++){
396
+ // if(fieldItemPreArr[i])
397
+ if(ruleForm[fieldItem.pre[i].key]===parseInt(fieldItemPreArr[j])){
398
+ flagEqual=true
399
+ }
400
+ }
401
+ if(!flagEqual){
402
+ return true;
403
+ }
404
+ // }
405
+ // if(ruleForm[fieldItem.pre[i].key]!==parseInt(fieldItem.pre[i].value)){
406
+ // return true
407
+ // }
408
+ }
409
+
410
+ }
411
+ // alert(fieldItem.name+'__show')
412
+ return false
413
+ },
414
+ handleClose(dynamicTags,tag) {
415
+ dynamicTags.splice(dynamicTags.indexOf(tag), 1);
416
+ },
417
+
418
+ showInput() {
419
+ this.inputVisible = true;
420
+ // this.$nextTick(_ => {
421
+ // this.$refs.saveTagInput.$refs.input.focus();
422
+ // });
423
+ },
424
+
425
+ handleInputConfirm(dynamicTags) {
426
+ // alert(dynamicTags)
427
+ let inputValue = this.inputValue;
428
+ if (inputValue) {
429
+ if(!this.ruleForm[dynamicTags]){
430
+ this.ruleForm[dynamicTags]=[]
431
+ }
432
+ this.ruleForm[dynamicTags].push(inputValue);
433
+ }
434
+ this.inputVisible = false;
435
+ this.inputValue = '';
436
+ }
437
+ },
438
+
439
+ created () {
440
+ // console.log('-----------mounted-------------')
441
+ // let isEmpty = util.isStringEmpty(this.$route.query.channelId)
442
+
443
+ let that=this
444
+ if(!this.ruleFormSrc){
445
+ alert('未设置ruleFormSrc!')
446
+ }
447
+ if(this.btnTitle){
448
+ this.btnTitleStr=this.btnTitle
449
+ }
450
+ that.ruleForm=this.ruleFormSrc
451
+ let params={beanName:this.beanName}
452
+ let formuiFieldList=[]
453
+
454
+ if(this.labelWidth){
455
+ this.labelWidthCurrent=this.labelWidth
456
+ }
457
+ // this.ruleForm.fileImg2='formui/2021/05/31/1622449172256.jpg,formui/2021/05/31/1622449172256.jpg'
458
+ // this.ruleForm.fileImg2Url='http://ttest2.oss-cn-hangzhou.aliyuncs.com/formui/2021/05/31/1622449172256.jpg,http://ttest2.oss-cn-hangzhou.aliyuncs.com/formui/2021/05/31/1622449172256.jpg'
459
+ // this.ruleForm.dateTime =1;
460
+ // this.ruleForm.beginTime=122331112;
461
+ // this.ruleForm.beginMonth=123
462
+ // this.ruleForm.fileImgUrl='https://www.baidu.com/img/flexible/logo/pc/result.png';
463
+ formuiService.getFormuiForm(this,params,function (resp) {
464
+
465
+ for(let i=0;i<resp.formuiFields.length;i++){
466
+
467
+ // alert(resp.formuiFields[i].name+'_'+that.removeFileds)
468
+ if(that.removeFileds.indexOf(resp.formuiFields[i].name)==-1){
469
+ // alert(11111)
470
+ formuiFieldList.push(resp.formuiFields[i])
471
+
472
+ let fieldItem=resp.formuiFields[i]
473
+ let fieldNameCurrent=fieldItem.name
474
+ let ruleFormFieldValue=that.ruleForm[fieldNameCurrent]
475
+
476
+ // alert(11)
477
+ if(resp.formuiFields[i].bindColumn){
478
+
479
+ ruleFormFieldValue=that.ruleForm[resp.formuiFields[i].bindColumn]
480
+
481
+ if(ruleFormFieldValue){
482
+ that.$set(that.ruleForm,fieldNameCurrent,ruleFormFieldValue)
483
+ }
484
+ // alert(fieldNameCurrent+'='+ruleFormFieldValue)
485
+ }
486
+
487
+ //没有默认表单才设置默认值
488
+ if(!that.ruleFormSrc && fieldItem.defaultValue){
489
+ that.$set(that.ruleForm,fieldNameCurrent,fieldItem.defaultValue)
490
+ // fieldItem.value=fieldItem.defaultValue
491
+ }
492
+
493
+ // alert(fieldItem.valueType)
494
+ if(fieldItem.valueType=='DATETIME'){
495
+ if(ruleFormFieldValue){
496
+ that.$set(that.ruleForm,fieldNameCurrent,that.formatTime(ruleFormFieldValue))
497
+ }
498
+
499
+ }else if(fieldItem.valueType=='DATE_BEGIN'||fieldItem.valueType=='DATE_END'){
500
+ if(ruleFormFieldValue){
501
+ that.$set(that.ruleForm,fieldNameCurrent,that.formatTime(ruleFormFieldValue))
502
+ }
503
+
504
+ }else if(fieldItem.valueType=='MONTH_BEGIN'||fieldItem.valueType=='MONTH_END'){
505
+ if(ruleFormFieldValue){
506
+ that.$set(that.ruleForm,fieldNameCurrent,that.formatTime(ruleFormFieldValue))
507
+ }
508
+
509
+ }else if(fieldItem.valueType=='MONEY'){
510
+ // console.log('111111111111111111111111'+fieldItem.name+'_'+that.ruleForm[fieldItem.name])
511
+ // alert(fieldItem.name+' '+that.ruleForm[fieldItem.name]+' '+that.ruleForm)
512
+ if(ruleFormFieldValue||ruleFormFieldValue===0){
513
+ // that.ruleFormMoney[fieldItem.name]=mathUtil.div(that.ruleForm[fieldItem.name],100)//
514
+ that.$set(that.ruleFormMoney,fieldNameCurrent,mathUtil.div(ruleFormFieldValue,100))
515
+ }else{
516
+ // that.ruleFormMoney[fieldItem.name]=0
517
+ that.$set(that.ruleForm,fieldNameCurrent,0)
518
+ that.$set(that.ruleFormMoney,fieldNameCurrent,0)
519
+ }
520
+ // alert(that.ruleForm[fieldItem.name])
521
+ // console.log('22222222222222'+fieldItem.name)
522
+ //
523
+ }
524
+
525
+ }else{
526
+ // alert(resp.formuiFields[i].name)
527
+ }
528
+ }
529
+
530
+
531
+ that.formuiFields= formuiFieldList;
532
+
533
+ that.setRules()
534
+ that.loadSuccess=true
535
+ })
536
+ },
537
+
538
+ updated () {
539
+ // console.log('-----------updated-------------')
540
+ },
541
+
542
+ destory () {
543
+
544
+ }
545
+ }
546
+ </script>
547
+
548
+ <style scoped>
549
+ .formui_notes{position: absolute;left: -15px;top:5px; color: #3a87ad;}
550
+ .el-tag + .el-tag {
551
+ margin-left: 10px;
552
+ }
553
+ .button-new-tag {
554
+ margin-left: 10px;
555
+ height: 32px;
556
+ line-height: 30px;
557
+ padding-top: 0;
558
+ padding-bottom: 0;
559
+ }
560
+ .input-new-tag {
561
+ width: 90px;
562
+ margin-left: 10px;
563
+ vertical-align: bottom;
564
+ }
565
+ </style>