IndexColumn.vue
27.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
<template>
<div class="fullheight">
<ht-table
@load="loadData"
@row-click="rowClick"
:data="data"
:selection="true"
:pageResult="pageResult"
quick-search-props="name,alias"
ref="columnTable"
:show-export="false"
:header-cell-class-name="headerCellClassName"
@selection-change="handleSelectionChange"
>
<template v-slot:toolbar>
<!-- <el-button-group> -->
<el-button
size="small"
@click="handleCommand({command: 'add'})"
icon="el-icon-plus"
type="primary"
>添加</el-button
>
<el-button size="small" icon="el-icon-upload2" @click="importColumn"
>导入</el-button
>
<el-button
size="small"
icon="el-icon-download"
@click="exportColumn"
:disabled="isDisabled"
>导出</el-button
>
<el-button
size="small"
icon="el-icon-lock"
@click="batchAuth"
:disabled="isDisabled"
>授权设置</el-button
>
<ht-delete-button
:url="deleteUrl"
:htTable="$refs.columnTable"
style="margin-left: 10px"
:disabled="isDisabled"
@click.native="handleTenantOperation"
>删除
</ht-delete-button>
<!-- </el-button-group> -->
</template>
<template>
<ht-table-column type="index" width="50" align="center" label="序号" />
<ht-table-column prop="id" label="主键" :sortable="true" hidden />
<ht-table-column
prop="name"
label="栏目名称"
:sortable="true"
:show-overflow-tooltip="true"
>
<template v-slot="{row}">
<el-link
@click="handleCommand({row: row, command: 'edit'})"
type="primary"
title="点击编辑"
>
{{ row.name }}</el-link
>
</template>
</ht-table-column>
<ht-table-column prop="alias" label="别名" :sortable="true" />
<ht-table-column prop="dataMode" label="数据加载方式">
<template v-slot="{row}">
<el-tag
v-if="row.dataMode == 1"
type="info"
>对话框</el-tag
>
<el-tag
v-if="row.dataMode == 3"
type="primary"
>RESTful接口</el-tag
>
<el-tag
v-if="row.dataMode == 4"
type="success"
>表单列表</el-tag
>
<el-tag
v-if="row.dataMode == 5"
type="success"
>关联查询</el-tag
>
</template>
</ht-table-column>
<ht-table-column
prop="dataFrom"
label="方法路径"
:show-overflow-tooltip="true"
>
<template v-slot="{row}">
<div v-if="row.dataFrom">
{{ row.dataFrom }}
</div>
</template>
</ht-table-column>
<ht-table-column
prop="isPublic"
label="栏目使用平台"
:render-header="renderHeaderMethod"
:filters="[
{text: '管理端', value: 0},
{text: '应用端', value: 2},
{text: '手机端', value: 1},
]"
>
<template v-slot="{row}">
<el-tag v-if="row.isPublic == 0" type="info">管理端</el-tag>
<el-tag v-if="row.isPublic == 1" type="success">手机端</el-tag>
<el-tag v-if="row.isPublic == 2" type="warning">应用端</el-tag>
</template>
</ht-table-column>
<ht-table-column prop="isInit" label="数据类型">
<template v-slot="{row}">
<el-tag v-if="row.isInit == 0" type="warning">私有数据</el-tag>
<el-tag v-if="row.isInit == 1" type="success">平台公用数据</el-tag>
</template>
</ht-table-column>
<ht-table-column
prop="colType"
label="栏目类型"
:render-header="renderHeaderMethod"
:filters="filterColTypeList"
>
<template v-slot="{row}">
<span>{{ columnTypeMap[row.colType] || '-' }}</span>
</template>
</ht-table-column>
<ht-table-column width="200" label="操作" align="left">
<template v-slot="{row}">
<el-button
type="text"
@click="handleCommand({row: row, command: 'preview'})"
>预览</el-button
>
<el-button
type="text"
@click="handleCommand({row: row, command: 'auth'})"
>授权</el-button
>
</template>
</ht-table-column>
</template>
</ht-table>
<el-dialog
class="form-editor-dialog"
destroy-on-close
:visible="previewShow"
v-if="previewShow"
:before-close="() => (previewShow = false)"
>
<div
v-if="currentComponents"
class="box-card"
:class="{'column-height': baseColumn.colHeight}"
:style="{'--columnHeight': `${baseColumn.colHeight}px`}"
>
<component
:is="currentComponents"
:showData="showData"
:column-title="baseColumn.name"
:isHidePagination="isHidePagination"
:showTitle="baseColumn.showTitle"
:custom-column-height="baseColumn.colHeight"
:pageSize="baseColumn.refeshTime"
:combination-model="designColumn.model"
:more-url="baseColumn.colUrl"
:filter-type="designColumn.filterType"
:filter-scope="designColumn.filterScope"
:appid="baseColumn.appid"
:customStyle="baseColumn.style"
:alias="baseColumn.alias"
:isShowDelete="false"
:current-user="currentUser"
></component>
</div>
<el-empty
v-else
:image-size="380"
:image="noDataImg"
description="暂无实时预览哦~"
>
</el-empty>
</el-dialog>
<eip-auth-dialog @onConfirm="columnAuthConfirm" ref="columnAuth" />
<eip-flow-dialog
ref="eipFlowDialog"
name="eipFlowDialog"
@onConfirm="dialogOnConfirm"
:single="true"
append-to-body
>
</eip-flow-dialog>
<eip-data-template-dialog
:appendToBody="true"
ref="dataTemplateDialog"
:single="true"
@onConfirm="onDataTemplate"
>
</eip-data-template-dialog>
<el-dialog
title="上传文件"
:visible="uploadDialogVisible"
:before-close="beforeClose"
name="uploadDialog"
width="40%"
top="30vh"
custom-class="upload-dialog"
>
<el-upload
:action="uploadUrl"
:http-request="handleImport"
accept=".zip"
:file-list="fileList"
:limit="1"
:auto-upload="false"
:on-exceed="onExceed"
ref="elUpload"
class="upload-dialog__content"
>
<el-button size="small" icon="el-icon-upload">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传zip文件</div>
</el-upload>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="uploadSubmit">上传</el-button>
<el-button type="default" @click="beforeClose">取消</el-button>
</span>
</el-dialog>
<el-dialog
title="温馨提示"
:visible="myDialogVisible"
:before-close="beforeClose2"
name="myDialogVisible"
width="30%"
custom-class="upload-dialog"
top="30vh"
>
<span>部分栏目已存在,请确认重复项的导入操作!</span>
<span slot="footer" class="dialog-footer">
<el-button type="default" @click="beforeClose2">取消</el-button>
<el-button type="primary" @click="confirmSubmit('jump')"
>跳过重复项</el-button
>
<el-button type="primary" @click="confirmSubmit('cover')"
>覆盖更新</el-button
>
</span>
</el-dialog>
<LayoutPreviewDialog ref="previewDialog" />
<add-column-dialog
ref="addColumnDialog"
@after-save="$refs.columnTable.load()"
></add-column-dialog>
</div>
</template>
<script>
import {Message} from 'element-ui'
import req from '@/request.js'
import {mapState} from 'vuex'
import portal from '@/api/portal.js'
import IndexColumnSetparam from '@/components/portal/IndexColumnSetparam.vue'
import EipChartSelector from '@/components/selector/EipChartSelector.vue'
import EipSysTypeSelector from '@/components/selector/EipSysTypeSelector.vue'
import HtColumn from '@/components/common/HtColumn.vue'
const eipAuthDialog = () => import('@/components/dialog/EipAuthDialog.vue')
import CustomDialogDialog from '@/components/dialog/CustomDialogDialog.vue'
import CustomQuerySelectorDialog from '@/components/dialog/CustomQuerySelectorDialog.vue'
const eipFlowDialog = () => import('@/components/dialog/EipFlowDialog.vue')
const AddColumnDialog = () => import('@/views/portal/AddColumnDialog.vue')
let Base64 = require('js-base64').Base64
const EipDataTemplateDialog = () =>
import('@/components/dialog/EipDataTemplateDialog.vue')
const LayoutPreviewDialog = () =>
import('@/views/portal/LayoutPreviewDialog.vue')
import {codemirror} from 'vue-codemirror'
import 'codemirror/theme/ambiance.css'
require('codemirror/mode/javascript/javascript')
import tableHeaderFilter from '@/mixins/tableHeaderFilter.js'
import columnMixins from '@/views/portal/components/columnMixins.js'
import {COLUMN_TYPE_LIST} from './const.js'
export default {
components: {
IndexColumnSetparam,
EipChartSelector,
EipSysTypeSelector,
HtColumn,
codemirror,
eipAuthDialog,
CustomDialogDialog,
eipFlowDialog,
EipDataTemplateDialog,
CustomQuerySelectorDialog,
LayoutPreviewDialog,
AddColumnDialog,
},
mixins: [tableHeaderFilter, columnMixins],
data() {
return {
columnOptions: [],
uploadAddress: '',
dialogVisible: false,
previewShow: false,
myDialogVisible: false,
column: {},
data: [],
pageResult: {
page: 1,
pageSize: 50,
total: 0,
},
loadDataUrl: '',
previewAlias: '',
currentComponents: '',
designColumn: {},
showData: null,
baseColumn: {},
noDataImg: require('@/assets/nodata_images/no-data.png'),
curAuthColumnId: '',
uploadDialogVisible: false,
fileList: [],
uploadUrl: `${window.context.portal}/portal/sysIndexColumn/sysIndexColumn/v1/uplaodColumn`,
authType: '',
isDisabled: true,
selectedList: [],
}
},
watch: {
selectedList: {
handler(val) {
this.isDisabled = val.length < 1 ? true : false
const filterArr = val.filter((x) => x.isInit == 1)
if (filterArr && filterArr.length > 0 && this.columnTenantId != -1) {
this.isDisabled = true
}
},
deep: true,
},
},
mounted() {
this.$validator = this.$root.$validator
this.getColumnList()
},
computed: {
...mapState({
currentUser: (state) => state.login.currentUser,
}),
isHidePagination() {
return this.baseColumn.needPage == '1' ? false : true
},
deleteUrl: function () {
return (
window.context.portal +
'/portal/sysIndexColumn/sysIndexColumn/v1/remove'
)
},
saveUrl: function () {
return (
window.context.portal + '/portal/sysIndexColumn/sysIndexColumn/v1/save'
)
},
filterColTypeList() {
return COLUMN_TYPE_LIST.map((item) => {
return {
text: item.name,
value: item.componentsName,
}
})
},
columnTypeMap() {
return COLUMN_TYPE_LIST.reduce((pre, cur) => {
pre[cur.componentsName] = cur.name
return pre
}, {})
},
},
methods: {
handleSelectionChange(selection) {
this.selectedList = selection
},
confirmSubmit(arg) {
const this_ = this
let url =
window.context.portal +
'/portal/sysIndexColumn/sysIndexColumn/v1/importData?unZipFilePath=' +
this.uploadAddress +
'&status=' +
arg
req.post(url).then(function (rep) {
rep = rep.data
if (rep && rep.state) {
Message.success(rep.message)
this_.$refs.columnTable.load()
} else {
Message.error(rep.message || '保存失败')
}
this_.myDialogVisible = false
this_.beforeClose()
})
},
rowClick(row, column, event) {
this.$refs.columnTable.$refs.htTable.toggleRowSelection(row)
},
preview(alias) {
this.previewAlias = alias
this.previewShow = true
},
showDialog(row) {
this.dialogVisible = true
if (row != undefined && row.id != '') {
this.tempSaveObj = row
this.loadDataUrl = `/portal/sysIndexColumn/sysIndexColumn/v1/getJson?id=${row.id}`
} else {
this.tempSaveObj = {
...this.column,
showTitle: Number(this.column.showTitle),
}
}
},
loadData(param, cb) {
portal
.getIndexColumnPage(param)
.then((response) => {
this.data = response.rows
this.pageResult = {
page: response.page,
pageSize: response.pageSize,
total: response.total,
}
})
.finally(() => cb && cb())
},
getColumnList() {
const params = {
pageBean: {
page: 1,
pageSize: 10e6,
total: 0,
},
}
portal.getIndexColumnPage(params).then((res) => {
if (res.rows && res.rows.length > 0) {
this.columnOptions = res.rows
}
})
},
beforeClose2() {
this.myDialogVisible = false
},
handleCommand(params) {
switch (params.command) {
case 'edit':
// this.$router.push(`/portal/addColumn?type=edit&id=${params.row.id}`)
this.$refs.addColumnDialog.open('edit', params.row.id)
break
case 'add':
// this.$router.push('/portal/addColumn?type=add')
this.$refs.addColumnDialog.open('add')
break
case 'preview':
portal.getColumnById(params.row.id).then(({data}) => {
if (data.isPublic == 2) {
window.open(
window.context.front +
'/column/preview/' +
data.alias +
'?token=' +
this.currentUser.token,
// Base64.encode(this.currentUser.account),
'_blank'
)
} else if (data.isPublic == 1) {
let href = `${window.context.mobile}/previewColumn?alias=${data.alias}&token=${this.currentUser.token}`
// window.open(
// `${window.context.mobile}/previewColumn?alias=${params.row.alias}&token=${this.currentUser.token}`,
// '_blank'
// )
this.previewMobile(data, data.layoutType, href)
} else {
this.previewAlias = data.alias
let componentData = data
this.baseColumn = {
...componentData,
showTitle: componentData.showTitle == 1 ? true : false,
}
this.designColumn = JSON.parse(componentData.dataParam)
this.currentComponents = componentData.colType
if (
['processCenter', 'combination', 'processPublicity'].includes(
this.designColumn.colType
)
) {
this.showData = this.designColumn.selectType
}
if (this.designColumn.colType === 'statisticalChart') {
let data = []
data.push({
dataType: this.designColumn.dataType,
currentDataType: this.designColumn.currentDataType,
})
this.showData = data
}
if (
this.designColumn.colType === 'news' ||
this.designColumn.colType === 'swipeSlide'
) {
this.showData = this.designColumn.announcementOrPictures
}
if (this.designColumn.colType === 'custom') {
this.designColumn.templateHtml2 = Base64.decode(
componentData.templateHtml
)
this.designColumn.templateJavaScript2 = Base64.decode(
componentData.templateJavaScript
)
this.designColumn.templateStyle2 = Base64.decode(
componentData.templateStyle
)
this.showData = componentData
}
if (this.designColumn.colType === 'dataSheets') {
this.showData = this.designColumn.currentSelectedInfo
}
this.previewShow = true
}
})
break
case 'auth':
this.columnAuth(params.row)
break
}
},
columnAuth(row) {
this.authType = 'single'
let this_ = this
this.curAuthColumnId = row.id
this.$http
.get(
'${portal}/sys/authUser/v1/getRightsAndDefaultRightType?id=' +
row.id +
'&objType=indexColumn'
)
.then(function (resp) {
if (resp.data) {
let conf = {
right: resp.data.right,
permissionList: resp.data.type,
autoClose: false,
}
this_.$refs.columnAuth.showDialog(conf)
}
})
},
columnAuthConfirm(data) {
if (this.authType === 'single') {
this.authSingle(data)
} else if (this.authType === 'batch') {
this.authBatch(data)
}
},
authSingle(data) {
let param = {
id: this.curAuthColumnId,
objType: 'indexColumn',
ownerNameJson: JSON.stringify(data),
}
let this_ = this
this.$http
.post('${portal}/sys/authUser/v1/saveRights', param)
.then(function (resp) {
if (resp.data) {
if (resp.data.state) {
this_.$message.success('授权成功')
this_.$refs.columnAuth.closeDialog()
} else {
this_.$message.error(resp.data.message)
}
}
})
},
//批量授权
authBatch(data) {
let param = {
ids: this.$refs.columnTable.$refs.htTable.selection.map(
(item) => item.id
),
objType: 'indexColumn',
ownerNameJson: JSON.stringify(data),
}
let _this = this
this.$http
.post('${portal}/sys/authUser/v1/batchSaveRights', param)
.then((resp) => {
_this.showResponse(resp)
})
},
showResponse(resp) {
if (resp.data) {
if (resp.data.state) {
this.$message.success('授权成功')
this.$refs.columnAuth.closeDialog()
} else {
this.$message.error(resp.data.message)
}
}
},
batchAuth() {
let {selection} = this.$refs.columnTable.$refs.htTable
if (!selection || selection.length == 0) {
this.$message.warning('请选择要授权的栏目')
return
}
this.authType = 'batch'
let this_ = this
let id = selection[0].id
this.$http
.get(
'${portal}/sys/authUser/v1/getRightsAndDefaultRightType?id=' +
id +
'&objType=indexColumn'
)
.then(function (resp) {
if (resp.data) {
let conf = {
right: resp.data.right,
permissionList: resp.data.type,
autoClose: false,
}
this_.$refs.columnAuth.showDialog(conf)
}
})
},
removeStyle() {
document.getElementsByName('columnAlias')[0].style.border = ''
},
showFlowDialog() {
this.$refs.eipFlowDialog.showDialog()
},
dialogOnConfirm(data, name) {
if (name == 'eipFlowDialog') {
let defKey = ''
data.forEach((element) => {
defKey = element.defKey
this.$set(this.column, 'flowKey', element.defKey)
this.$set(this.column, 'flowName', element.name)
})
if (!defKey) {
return
}
this.$confirm('是否加载流程展示栏目的默认配置?', '确认信息', {
distinguishCancelAndClose: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(() => {
this.$set(
this.column,
'dataFrom',
'${bpmRunTime}/runtime/instance/v1/query'
)
this.$set(this.column, 'dataMode', 3)
let pam =
'[{"name":"querys","type":"string","mode":"0","value":"[\\n {\\n \\"group\\": \\"advance\\",\\n \\"operation\\": \\"EQUAL\\",\\n \\"property\\": \\"proc_def_key_\\",\\n \\"relation\\": \\"AND\\",\\n \\"value\\": \\"' +
defKey +
'\\"\\n },\\n\\t\\t{\\n \\"group\\": \\"advance\\",\\n \\"operation\\": \\"EQUAL\\",\\n \\"property\\": \\"status_\\",\\n \\"relation\\": \\"AND\\",\\n \\"value\\": \\"end\\"\\n }\\n ]"},{"name":"sorter","type":"string","mode":"0","value":"[\\n {\\n \\"direction\\": \\"DESC\\",\\n \\"property\\": \\"create_time_\\"\\n }\\n ]"},{"name":"pageBean","type":"string","mode":"0","value":"{\\n \\"page\\": 1,\\n \\"pageSize\\": 10,\\n \\"total\\": 0\\n}"}]'
this.$set(this.column, 'dataParam', pam)
this.$set(this.column, 'requestType', 'POST')
this.$set(this.column, 'isPublic', '2')
this.$set(this.column, 'templateHtml2', '<homeInst :data="data"/>')
this.$set(this.column, 'needPage', 1)
//设置更多路径
this.$set(this.column, 'colUrl', '/completeView/' + defKey)
})
}
},
onDataTemplate(res) {
if (res.length == 1) {
let obj = {
name: res[0].name,
alias: res[0].alias,
}
this.$set(this.column, 'dataFrom', JSON.stringify(obj))
}
},
exportColumn() {
let selection = this.$refs.columnTable.$refs.htTable.selection
if (!selection || selection.length == 0) {
this.$message.warning('请至少选择一条记录')
return
}
let ids = []
selection.forEach((column) => {
ids.push(column.id)
})
this.$http.request({
url: `${window.context.portal}/portal/sysIndexColumn/sysIndexColumn/v1/exportColumn`,
data: ids,
method: 'post',
responseType: 'arraybuffer',
})
},
beforeClose() {
this.uploadDialogVisible = false
this.fileList.splice(0)
},
uploadSubmit() {
if (this.$refs.elUpload.uploadFiles.length == 0) {
this.$message.warning('请上传文件')
return
}
this.$refs.elUpload.submit()
},
importColumn() {
this.uploadDialogVisible = true
},
handleImport(param) {
let formData = new FormData()
formData.append('file', param.file)
portal.importColumn(formData).then((resp) => {
if (resp.state) {
if (resp.message && resp.message == 'confirmUpload') {
this.uploadAddress = resp.value
this.myDialogVisible = true
} else {
this.$message.success(resp.message)
this.fileList.splice(0)
this.uploadDialogVisible = false
this.$refs.columnTable.load()
}
} else {
this.beforeClose()
}
})
},
pullWeixinMaterial() {
this.$http
.get(
`${window.context.portal}/portalWeixinMaterial/v1/pullWeixinMaterial`
)
.then((resp) => {
if (resp.data.state) {
this.$message.success(resp.data.message)
} else {
this.$message.error(resp.data.message)
}
})
},
onExceed() {
this.$message.warning('只能选择一个zip文件!')
},
handleTenantOperation() {
const filterArr = this.selectedList.filter((x) => x.isInit == 1)
if (filterArr && filterArr.length > 0 && this.columnTenantId != -1) {
this.$message.warning('租户不能操作平台共用数据')
}
},
previewMobile(row, layoutType, href) {
row['layoutType'] = 1
this.$refs.previewDialog.showDialog(row, layoutType, href)
},
},
}
</script>
<style lang="scss" scoped>
::v-deep {
.cell > .el-table__column-filter-trigger {
display: none;
}
}
div[aria-invalid='true'] >>> .el-input__inner,
div[aria-invalid='true'] >>> .el-input__inner:focus {
border-color: #f56c6c;
}
.el-select .el-input {
width: 400px;
}
.code /deep/ .CodeMirror {
font-family: monospace;
/*height: 100px !important;*/
color: black;
direction: ltr;
resize: both;
}
.preview_column {
/deep/.container {
padding-bottom: 5px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.container_icon {
width: 50px;
height: 50px;
border-radius: 50%;
font-size: 20px;
color: #fff;
line-height: 50px;
text-align: center;
}
.icon__blue__bg {
background: rgba(54, 143, 255, 1);
}
.icon__pink__bg {
background: rgba(255, 120, 110, 1);
}
.icon__deep__blue__bg {
background: rgba(77, 119, 255, 1);
}
.icon__yellow__bg {
background: rgba(255, 155, 89, 1);
}
.icon__purple__bg {
background: rgba(82, 98, 255, 1);
}
.icon__green__bg {
background: rgba(87, 202, 176, 1);
}
.container_box {
text-align: center;
.container_box_title,
.container_box_count {
margin: 6px 0 0 0;
font-size: 12px;
font-family: 'Microsoft YaHei';
font-weight: 500;
color: rgb(19, 18, 18);
}
}
}
}
/deep/.el-dialog__wrapper {
overflow: unset !important;
}
/deep/.el-dialog__body {
padding: 10px 20px;
color: #606266;
font-size: 14px;
word-break: break-all;
height: calc(100% - 140px);
overflow-y: auto;
}
/deep/.el-dialog {
height: 80%;
min-height: 400px;
}
/deep/.el-dialog__body .selector-table {
height: 100% !important;
}
/deep/.el-dialog .el-dialog__body .select-tree-div {
height: calc(100% - 60px);
min-height: unset;
}
@media (max-height: 960px) {
/deep/.el-dialog__body .el-container {
height: 100% !important;
}
}
.is-fullscreen__dialog {
/deep/ .el-dialog {
width: 100% !important;
height: 100% !important;
margin-top: 0vh !important;
.el-dialog__body {
padding-top: 20px;
}
.code .CodeMirror {
height: 100%;
}
}
}
.fullscreen-icon {
position: absolute;
right: 0;
top: -28px;
}
.top-link-icon {
font-size: 15px;
font-weight: bold;
&:hover {
color: #ff7717;
}
}
/deep/ .el-dialog.upload-dialog {
height: unset;
/deep/ .el-dialog__body {
height: unset;
}
.upload-dialog__content {
height: 150px;
}
min-height: unset;
}
.column-name__wrap {
display: flex;
/deep/ .el-checkbox {
line-height: 32px;
margin-left: 20px;
}
}
.column-height {
height: var(--columnHeight);
::v-deep {
.column-content {
height: calc(var(--columnHeight) - 104px);
overflow: auto;
//隐藏滚动条
&::-webkit-scrollbar {
width: 0;
background-color: transparent;
}
/*火狐下隐藏滚动条*/
scrollbar-width: none;
}
}
}
.form-editor-dialog {
::v-deep .el-dialog {
height: 100%;
min-height: 400px;
}
}
</style>