hd-idevvue3 3.0.3 → 3.0.4
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/dist/assets/index.9c127719.css +1 -0
- package/dist/hd-idevvue3.mjs +3521 -3305
- package/dist/hd-idevvue3.umd.js +29 -29
- package/npminstall-debug.log +2 -10
- package/package.json +3 -1
- package/pnpm-lock.yaml +37 -4
- package/src/App.vue +11 -15
- package/src/assets/sound/notify.wav +0 -0
- package/src/demo/demo.vue +9 -10
- package/src/demo/dropdemo.vue +42 -43
- package/src/demo/extsets.vue +140 -39
- package/src/demo/formedit.vue +157 -145
- package/src/demo/hightquery.vue +263 -66
- package/src/demo/inlineedit.vue +129 -35
- package/src/demo/selfdrop.vue +32 -15
- package/src/directive/el-dragDialog/drag.js +13 -13
- package/src/directive/el-dragDialog/index.js +13 -13
- package/src/errorLog.js +3 -3
- package/src/hdcom/BigGrid.js +54 -48
- package/src/hdcom/BillShow.vue +84 -63
- package/src/hdcom/BillUpload.vue +144 -86
- package/src/hdcom/BtnRight.vue +26 -23
- package/src/hdcom/ErrHint.vue +36 -24
- package/src/hdcom/ExtendColumn.vue +97 -90
- package/src/hdcom/ExtendCommon.js +24 -13
- package/src/hdcom/ExtendForm.vue +107 -80
- package/src/hdcom/FacePicUpload.vue +59 -50
- package/src/hdcom/FaceRecTest.vue +87 -77
- package/src/hdcom/GridChart.vue +175 -162
- package/src/hdcom/GridExField.vue +328 -234
- package/src/hdcom/GridShow.vue +89 -39
- package/src/hdcom/HdAside.vue +192 -145
- package/src/hdcom/HdBtn.vue +44 -32
- package/src/hdcom/HdButton.vue +141 -117
- package/src/hdcom/HdComFaceRec.vue +80 -32
- package/src/hdcom/HdComGrid.vue +329 -229
- package/src/hdcom/HdComQuery.vue +179 -90
- package/src/hdcom/HdComQueryDetail.vue +159 -115
- package/src/hdcom/HdComSortDetail.vue +136 -130
- package/src/hdcom/HdDatePicker.vue +32 -16
- package/src/hdcom/HdDialog.vue +62 -44
- package/src/hdcom/HdDrop.vue +163 -138
- package/src/hdcom/HdFileUpload.vue +138 -119
- package/src/hdcom/HdFilterBox.vue +62 -62
- package/src/hdcom/HdFooter.vue +152 -119
- package/src/hdcom/HdForm.vue +276 -203
- package/src/hdcom/HdFormBtn.vue +81 -39
- package/src/hdcom/HdFormItem.vue +14 -10
- package/src/hdcom/HdGrid.vue +353 -156
- package/src/hdcom/HdGridEditBtn.vue +34 -20
- package/src/hdcom/HdGridExt.js +78 -47
- package/src/hdcom/HdGridSel.vue +227 -193
- package/src/hdcom/HdHeader.vue +149 -117
- package/src/hdcom/HdHotKey.vue +70 -67
- package/src/hdcom/HdInputHint.vue +40 -36
- package/src/hdcom/HdMain.vue +25 -27
- package/src/hdcom/HdMessage.vue +180 -171
- package/src/hdcom/HdNum.vue +67 -57
- package/src/hdcom/HdPopSel.vue +46 -24
- package/src/hdcom/HdRightMenu.vue +63 -61
- package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
- package/src/hdcom/HdTableColumn.vue +156 -109
- package/src/hdcom/HdTempSave.vue +138 -116
- package/src/hdcom/HdTree.vue +89 -72
- package/src/hdcom/HdTreeTable/eval.js +8 -3
- package/src/hdcom/HdTreeTable/index.vue +229 -174
- package/src/hdcom/ImportExcel.vue +69 -34
- package/src/hdcom/index.js +39 -44
- package/src/idev.common.js +54 -47
- package/src/index.js +3 -6
- package/src/utils/HdQuery.js +25 -14
- package/src/utils/comutils.js +50 -28
- package/src/utils/gogocodeTransfer.js +59 -0
- package/src/utils/utils.js +30 -19
- package/src/vendor/Blob.js +187 -179
- package/src/vendor/Export2Excel.js +231 -220
- package/src/vendor/Export2Zip.js +25 -22
- package/src/views/layout/AppMain.vue +34 -32
- package/src/views/layout/HdLayout.vue +64 -52
- package/src/views/layout/header/ElasticSearch.vue +196 -159
- package/src/views/layout/header/HZRecorder.js +163 -135
- package/src/views/layout/header/HeaderSearch.vue +165 -145
- package/src/views/layout/header/Levelbar.vue +55 -49
- package/src/views/layout/header/MainHeader.vue +233 -189
- package/src/views/layout/header/Navbar.vue +74 -78
- package/src/views/layout/header/ScrollPane.vue +103 -81
- package/src/views/layout/header/TagsView.vue +169 -164
- package/src/views/layout/header/VocRec.vue +86 -78
- package/src/views/layout/header/changepswform.vue +98 -64
- package/src/views/layout/index.js +5 -7
- package/src/views/layout/menu/Hamburger.vue +63 -45
- package/src/views/layout/menu/HdMenu.vue +155 -118
- package/src/views/layout/menu/index.vue +21 -19
- package/src/views/privilege/commsg/commsg.vue +115 -41
- package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
- package/src/views/privilege/commsg/commsgRole.vue +180 -109
- package/src/views/privilege/commsg/commsgform.vue +125 -101
- package/src/views/privilege/commsg/commsgiframe.vue +30 -23
- package/src/views/privilege/commsg/commsgto.vue +163 -84
- package/src/views/privilege/commsg/commsgtoform.vue +64 -58
- package/src/views/privilege/commsg/commsgtrans.vue +187 -115
- package/src/views/privilege/exfield/comexcolumn.vue +133 -43
- package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
- package/src/views/privilege/exfield/comexfield.vue +15 -17
- package/src/views/privilege/exfield/comexfieldform.vue +71 -53
- package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
- package/src/views/privilege/index.js +19 -20
- package/src/views/privilege/menu/comMenu.vue +49 -41
- package/src/views/privilege/menu/menu.vue +166 -49
- package/src/views/privilege/menu/menuinfo.vue +41 -34
- package/src/views/privilege/menu/rolelist.vue +78 -33
- package/src/views/privilege/menu/userlist.vue +76 -33
- package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
- package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
- package/src/views/privilege/orgDept/authOrgn.vue +157 -65
- package/src/views/privilege/orgDept/authorgnform.vue +50 -38
- package/src/views/privilege/orgDept/orgDept.vue +38 -37
- package/src/views/privilege/orgDept/orgTree.vue +99 -88
- package/src/views/privilege/orgDept/orgnselect.vue +132 -111
- package/src/views/privilege/personDept/authuser.vue +197 -91
- package/src/views/privilege/personDept/authuserform.vue +123 -71
- package/src/views/privilege/personDept/facerec.vue +128 -83
- package/src/views/privilege/personDept/orgncascader.vue +134 -115
- package/src/views/privilege/personDept/personDept.vue +9 -7
- package/src/views/privilege/quartz/comquartzjob.vue +123 -38
- package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
- package/src/views/privilege/quartz/comquartzlog.vue +116 -32
- package/src/views/privilege/role/btnRole.vue +123 -67
- package/src/views/privilege/role/menuRole.vue +65 -45
- package/src/views/privilege/role/orgnRole.vue +63 -41
- package/src/views/privilege/role/role.vue +26 -9
- package/src/views/privilege/role/rolelist.vue +114 -45
- package/src/views/privilege/role/roleselect.vue +34 -17
- package/src/views/privilege/search/comsearch.vue +164 -73
- package/src/views/privilege/search/menu.vue +38 -22
- package/src/views/privilege/syscode/syscode.vue +157 -69
- package/src/views/privilege/syscode/sysfield.vue +96 -43
- package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
- package/src/views/privilege/syslog/menulog.vue +38 -22
- package/src/views/privilege/syslog/syslog.vue +145 -78
- package/src/views/privilege/syslog/syslogconfig.vue +91 -24
- package/src/views/privilege/syslog/syslogform.vue +45 -43
- package/src/views/privilege/syslog/syslogframe.vue +26 -26
- package/src/views/privilege/userRole/userRole.vue +187 -89
- package/vite.config.js +7 -0
- package/dist/assets/index.774ef40e.css +0 -1
- package/src/views/privilege.zip +0 -0
|
@@ -4,17 +4,38 @@
|
|
|
4
4
|
<el-table :data="list" row-key="property">
|
|
5
5
|
<el-table-column align="center" label="条件" width="120px" noQuery>
|
|
6
6
|
<template slot-scope="scope">
|
|
7
|
-
<el-select
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<el-select
|
|
8
|
+
v-model="scope.row.selCol"
|
|
9
|
+
clearable
|
|
10
|
+
:placeholder="$t('请选择')"
|
|
11
|
+
style="width: 100%"
|
|
12
|
+
value-key="$attrs.prop"
|
|
13
|
+
@change="(v) => change(v, scope.row)"
|
|
14
|
+
>
|
|
15
|
+
<el-option
|
|
16
|
+
v-for="one in allColumn"
|
|
17
|
+
:key="one.$attrs.prop"
|
|
18
|
+
:label="one.$attrs.label"
|
|
19
|
+
:value="one"
|
|
20
|
+
>
|
|
10
21
|
</el-option>
|
|
11
22
|
</el-select>
|
|
12
23
|
</template>
|
|
13
24
|
</el-table-column>
|
|
14
|
-
<el-table-column
|
|
25
|
+
<el-table-column
|
|
26
|
+
align="center"
|
|
27
|
+
label="关系"
|
|
28
|
+
prop="width"
|
|
29
|
+
width="80px"
|
|
30
|
+
noQuery
|
|
31
|
+
>
|
|
15
32
|
<template slot-scope="scope">
|
|
16
|
-
<el-select
|
|
17
|
-
|
|
33
|
+
<el-select
|
|
34
|
+
v-model="scope.row.rel"
|
|
35
|
+
:placeholder="$t('请选择')"
|
|
36
|
+
style="width: 100%"
|
|
37
|
+
>
|
|
38
|
+
<el-option :label="'='" :value="'='"></el-option>
|
|
18
39
|
<el-option :label="$t('包含')" value="%like%"></el-option>
|
|
19
40
|
<el-option label=">=" value=">="></el-option>
|
|
20
41
|
<el-option label="<=" value="<="></el-option>
|
|
@@ -25,137 +46,160 @@
|
|
|
25
46
|
</el-table-column>
|
|
26
47
|
<el-table-column align="center" label="值" noQuery width="160px">
|
|
27
48
|
<template slot-scope="scope">
|
|
28
|
-
<component
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
49
|
+
<component
|
|
50
|
+
:is="scope.row.selCol.input ? scope.row.selCol.input : 'ElInput'"
|
|
51
|
+
v-model="scope.row.value"
|
|
52
|
+
v-bind="scope.row.selCol.inputProp"
|
|
53
|
+
:idVal.sync="scope.row.value"
|
|
54
|
+
:txtVal.sync="scope.row.showName"
|
|
55
|
+
style="width: 100%"
|
|
56
|
+
></component>
|
|
32
57
|
</template>
|
|
33
58
|
</el-table-column>
|
|
34
59
|
<el-table-column width="100px" align="center" label="操作">
|
|
35
60
|
<template slot-scope="scope">
|
|
36
|
-
<hd-btn
|
|
37
|
-
|
|
61
|
+
<hd-btn
|
|
62
|
+
icon="el-icon-circle-plus-outline"
|
|
63
|
+
hint="复制"
|
|
64
|
+
@click.stop="doCopy(scope.row, scope.index)"
|
|
65
|
+
></hd-btn>
|
|
66
|
+
<hd-btn
|
|
67
|
+
icon="el-icon-delete"
|
|
68
|
+
hint="删除"
|
|
69
|
+
@click.stop="doRemove(scope.row)"
|
|
70
|
+
></hd-btn>
|
|
38
71
|
</template>
|
|
39
72
|
</el-table-column>
|
|
40
73
|
</el-table>
|
|
41
|
-
|
|
42
74
|
</el-main>
|
|
43
75
|
</el-container>
|
|
44
76
|
</template>
|
|
45
77
|
|
|
46
78
|
<script>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
79
|
+
export default {
|
|
80
|
+
data() {
|
|
81
|
+
return {
|
|
82
|
+
// showName: '',//自定义下拉会用到
|
|
83
|
+
// selCol: {},
|
|
84
|
+
// queryRel: {key: '', rel: '=', value: '', type: ''},//查询的关系 prop='结果'
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
inheritAttrs: false,
|
|
88
|
+
props: {
|
|
89
|
+
allColumn: Array,
|
|
90
|
+
list: Array,
|
|
91
|
+
title: String,
|
|
92
|
+
},
|
|
93
|
+
mounted() {},
|
|
94
|
+
methods: {
|
|
95
|
+
doCopy(row, index) {
|
|
96
|
+
this.list.splice(index, 0, Object.assign({}, row))
|
|
61
97
|
},
|
|
62
|
-
|
|
63
|
-
|
|
98
|
+
doRemove(index) {
|
|
99
|
+
this.list.splice(index, 1)
|
|
64
100
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
row.selCol = val
|
|
79
|
-
row.key = val.$attrs.prop
|
|
80
|
-
// this.queryRel.value = ''//切换时先清
|
|
81
|
-
if (!row.selCol.input) {
|
|
82
|
-
return false
|
|
83
|
-
}
|
|
101
|
+
change(val, row) {
|
|
102
|
+
if (!val) {
|
|
103
|
+
// clear触发
|
|
104
|
+
row.key = ''
|
|
105
|
+
// this.queryRel.value = ''
|
|
106
|
+
return false
|
|
107
|
+
}
|
|
108
|
+
row.selCol = val
|
|
109
|
+
row.key = val.$attrs.prop
|
|
110
|
+
// this.queryRel.value = ''//切换时先清
|
|
111
|
+
if (!row.selCol.input) {
|
|
112
|
+
return false
|
|
113
|
+
}
|
|
84
114
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
row.type = 'datetime'
|
|
95
|
-
}
|
|
96
|
-
// row = val
|
|
115
|
+
row.type = '' // 默认字符串
|
|
116
|
+
if (typeof val.input != 'string') {
|
|
117
|
+
// 自定义组件会传入function
|
|
118
|
+
return false
|
|
119
|
+
}
|
|
120
|
+
if (val.input.indexOf('date') >= 0 || val.input.indexOf('Date') >= 0) {
|
|
121
|
+
// 日期格式
|
|
122
|
+
if (val.inputProp.type == 'date') {
|
|
123
|
+
row.type = 'date'
|
|
97
124
|
}
|
|
98
|
-
if (val.
|
|
99
|
-
row.type = '
|
|
125
|
+
if (val.inputProp.type == 'datetime') {
|
|
126
|
+
row.type = 'datetime'
|
|
100
127
|
}
|
|
128
|
+
// row = val
|
|
101
129
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
</script>
|
|
106
|
-
<style rel="stylesheet/scss" lang="scss">
|
|
107
|
-
.gridShow {
|
|
108
|
-
.el-table {
|
|
109
|
-
height: 100%;
|
|
110
|
-
width: 100%;
|
|
111
|
-
.el-table__body-wrapper {
|
|
112
|
-
width: 100%;
|
|
113
|
-
}
|
|
114
|
-
.el-table__header-wrapper th { //列表标题
|
|
115
|
-
background-color: #f6f6f6;
|
|
130
|
+
if (val.input.indexOf('num') >= 0 || val.input.indexOf('Num') >= 0) {
|
|
131
|
+
// 数字格式
|
|
132
|
+
row.type = 'number'
|
|
116
133
|
}
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
}
|
|
137
|
+
</script>
|
|
117
138
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
<style lang="scss" rel="stylesheet/scss">
|
|
140
|
+
.gridShow {
|
|
141
|
+
.el-table {
|
|
142
|
+
height: 100%;
|
|
143
|
+
width: 100%;
|
|
144
|
+
.el-table__body-wrapper {
|
|
145
|
+
width: 100%;
|
|
146
|
+
}
|
|
147
|
+
.el-table__header-wrapper th {
|
|
148
|
+
//列表标题
|
|
149
|
+
background-color: #f6f6f6;
|
|
150
|
+
}
|
|
121
151
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
padding-left: 5px !important;
|
|
127
|
-
padding-right: 1px !important;
|
|
128
|
-
padding-top: 1.5px !important;
|
|
129
|
-
padding-bottom: 1.5px !important;
|
|
130
|
-
}
|
|
131
|
-
.el-table__empty-block {
|
|
132
|
-
position: static;
|
|
133
|
-
text-align: center;
|
|
134
|
-
width: 100%;
|
|
135
|
-
height: 80%
|
|
136
|
-
}
|
|
137
|
-
.el-table__body { //列表下面加了空白
|
|
138
|
-
margin-bottom: 10px;
|
|
139
|
-
}
|
|
140
|
-
.el-table__body-wrapper {
|
|
141
|
-
height: 100%;
|
|
142
|
-
overflow-y: auto;
|
|
143
|
-
}
|
|
144
|
-
.el-input__inner {
|
|
145
|
-
height: 27px;
|
|
146
|
-
margin-bottom: 0px;
|
|
147
|
-
}
|
|
148
|
-
.el-input, .el-form-item__content, .el-form-item__label, .el-input__icon {
|
|
149
|
-
line-height: 30px;
|
|
150
|
-
}
|
|
151
|
-
.el-input__inner {
|
|
152
|
-
padding: 5px;
|
|
153
|
-
}
|
|
154
|
-
.el-input--prefix .el-input__inner { //日期的有logo不一样
|
|
155
|
-
padding-left: 30px;
|
|
156
|
-
}
|
|
152
|
+
.el-table__fixed-header-wrapper th {
|
|
153
|
+
//固定的列表标题
|
|
154
|
+
background-color: #f6f6f6;
|
|
155
|
+
}
|
|
157
156
|
|
|
157
|
+
td,
|
|
158
|
+
th {
|
|
159
|
+
//列表标题及内容
|
|
160
|
+
padding: 1px 0;
|
|
161
|
+
}
|
|
162
|
+
.cell,
|
|
163
|
+
.el-table th div,
|
|
164
|
+
.el-table--border th:first-child .cell,
|
|
165
|
+
.el-table--border td:first-child .cell {
|
|
166
|
+
//列表的margin
|
|
167
|
+
padding-left: 5px !important;
|
|
168
|
+
padding-right: 1px !important;
|
|
169
|
+
padding-top: 1.5px !important;
|
|
170
|
+
padding-bottom: 1.5px !important;
|
|
171
|
+
}
|
|
172
|
+
.el-table__empty-block {
|
|
173
|
+
position: static;
|
|
174
|
+
text-align: center;
|
|
175
|
+
width: 100%;
|
|
176
|
+
height: 80%;
|
|
177
|
+
}
|
|
178
|
+
.el-table__body {
|
|
179
|
+
//列表下面加了空白
|
|
180
|
+
margin-bottom: 10px;
|
|
181
|
+
}
|
|
182
|
+
.el-table__body-wrapper {
|
|
183
|
+
height: 100%;
|
|
184
|
+
overflow-y: auto;
|
|
185
|
+
}
|
|
186
|
+
.el-input__inner {
|
|
187
|
+
height: 27px;
|
|
188
|
+
margin-bottom: 0px;
|
|
189
|
+
}
|
|
190
|
+
.el-input,
|
|
191
|
+
.el-form-item__content,
|
|
192
|
+
.el-form-item__label,
|
|
193
|
+
.el-input__icon {
|
|
194
|
+
line-height: 30px;
|
|
195
|
+
}
|
|
196
|
+
.el-input__inner {
|
|
197
|
+
padding: 5px;
|
|
198
|
+
}
|
|
199
|
+
.el-input--prefix .el-input__inner {
|
|
200
|
+
//日期的有logo不一样
|
|
201
|
+
padding-left: 30px;
|
|
158
202
|
}
|
|
159
203
|
}
|
|
160
|
-
|
|
204
|
+
}
|
|
161
205
|
</style>
|
|
@@ -2,154 +2,160 @@
|
|
|
2
2
|
<el-container>
|
|
3
3
|
<el-main class="gridShow" :title="title">
|
|
4
4
|
<el-tag
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
v-for="tag in list"
|
|
6
|
+
:key="tag.text"
|
|
7
|
+
closable
|
|
8
|
+
:disable-transitions="false"
|
|
9
|
+
@close="handleClose(tag)"
|
|
10
|
+
>
|
|
11
|
+
{{ tag.text }}
|
|
11
12
|
</el-tag>
|
|
12
|
-
<el-cascader
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
<el-cascader
|
|
14
|
+
v-model="inputValue"
|
|
15
|
+
:placeholder="$t('请选择')"
|
|
16
|
+
class="input-new-tag"
|
|
17
|
+
ref="saveTagInput"
|
|
18
|
+
v-if="inputVisible"
|
|
19
|
+
@keyup.enter.native="handleInputConfirm"
|
|
20
|
+
size="small"
|
|
21
|
+
@change="(v) => change(v)"
|
|
22
|
+
:options="sortOption"
|
|
23
|
+
:props="{ expandTrigger: 'hover' }"
|
|
24
|
+
>
|
|
23
25
|
</el-cascader>
|
|
24
|
-
<el-button v-else class="button-new-tag" size="small" @click="showInput"
|
|
26
|
+
<el-button v-else class="button-new-tag" size="small" @click="showInput"
|
|
27
|
+
>+ New Tag</el-button
|
|
28
|
+
>
|
|
25
29
|
</el-main>
|
|
26
30
|
</el-container>
|
|
27
31
|
</template>
|
|
28
32
|
|
|
29
33
|
<script>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
export default {
|
|
35
|
+
name: 'HdComSortDetail',
|
|
36
|
+
data() {
|
|
37
|
+
return {
|
|
38
|
+
inputVisible: false,
|
|
39
|
+
inputValue: '',
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
inheritAttrs: false,
|
|
43
|
+
props: {
|
|
44
|
+
allColumn: Array,
|
|
45
|
+
list: Array,
|
|
46
|
+
title: String,
|
|
47
|
+
},
|
|
48
|
+
mounted() {},
|
|
49
|
+
methods: {
|
|
50
|
+
handleClose(tag) {
|
|
51
|
+
this.list.splice(this.list.indexOf(tag), 1)
|
|
44
52
|
},
|
|
45
|
-
mounted() {
|
|
46
53
|
|
|
54
|
+
showInput() {
|
|
55
|
+
this.inputVisible = true
|
|
56
|
+
this.$nextTick((_) => {
|
|
57
|
+
this.$refs.saveTagInput.$refs.input.focus()
|
|
58
|
+
})
|
|
47
59
|
},
|
|
48
|
-
methods: {
|
|
49
|
-
handleClose(tag) {
|
|
50
|
-
this.list.splice(this.list.indexOf(tag), 1);
|
|
51
|
-
},
|
|
52
60
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
let item = this.genItem(inputValue);
|
|
65
|
-
this.list.forEach((v, i)=>{
|
|
66
|
-
if(v.sortProperty == item.sortProperty) {
|
|
67
|
-
this.list.splice(i, 1)
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
this.list.push(item);
|
|
71
|
-
}
|
|
72
|
-
console.log('list', this.list)
|
|
73
|
-
this.inputVisible = false;
|
|
74
|
-
this.inputValue = '';
|
|
75
|
-
// if (!val) { // clear触发
|
|
76
|
-
// row.key = ''
|
|
77
|
-
// // this.queryRel.value = ''
|
|
78
|
-
// return false
|
|
79
|
-
// }
|
|
80
|
-
// row.selCol = val
|
|
81
|
-
// row.key = val.$attrs.prop
|
|
82
|
-
// // this.queryRel.value = ''//切换时先清
|
|
83
|
-
// if (!row.selCol.input) {
|
|
84
|
-
// return false
|
|
85
|
-
// }
|
|
86
|
-
//
|
|
87
|
-
// row.type = ''// 默认字符串
|
|
88
|
-
// if (typeof val.input != 'string') { // 自定义组件会传入function
|
|
89
|
-
// return false
|
|
90
|
-
// }
|
|
91
|
-
// if (val.input.indexOf('date') >= 0 || val.input.indexOf('Date') >= 0) { // 日期格式
|
|
92
|
-
// if (val.inputProp.type == 'date') {
|
|
93
|
-
// row.type = 'date'
|
|
94
|
-
// }
|
|
95
|
-
// if (val.inputProp.type == 'datetime') {
|
|
96
|
-
// row.type = 'datetime'
|
|
97
|
-
// }
|
|
98
|
-
// // row = val
|
|
99
|
-
// }
|
|
100
|
-
// if (val.input.indexOf('num') >= 0 || val.input.indexOf('Num') >= 0) { // 数字格式
|
|
101
|
-
// row.type = 'number'
|
|
102
|
-
// }
|
|
103
|
-
},
|
|
104
|
-
genItem(val) {
|
|
105
|
-
return {
|
|
106
|
-
sortProperty: val[0],
|
|
107
|
-
sortType: val[1],
|
|
108
|
-
alias: 'a',
|
|
109
|
-
text: this.allColumn.find(v => v.$attrs.prop == val[0]).$attrs.label + '/' + (val[1] == 'ASC' ? '升序' : '降序')
|
|
110
|
-
}
|
|
61
|
+
change(val) {
|
|
62
|
+
console.log('inputValue', val)
|
|
63
|
+
let inputValue = this.inputValue
|
|
64
|
+
if (inputValue) {
|
|
65
|
+
let item = this.genItem(inputValue)
|
|
66
|
+
this.list.forEach((v, i) => {
|
|
67
|
+
if (v.sortProperty == item.sortProperty) {
|
|
68
|
+
this.list.splice(i, 1)
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
this.list.push(item)
|
|
111
72
|
}
|
|
112
|
-
|
|
73
|
+
console.log('list', this.list)
|
|
74
|
+
this.inputVisible = false
|
|
75
|
+
this.inputValue = ''
|
|
76
|
+
// if (!val) { // clear触发
|
|
77
|
+
// row.key = ''
|
|
78
|
+
// // this.queryRel.value = ''
|
|
79
|
+
// return false
|
|
80
|
+
// }
|
|
81
|
+
// row.selCol = val
|
|
82
|
+
// row.key = val.$attrs.prop
|
|
83
|
+
// // this.queryRel.value = ''//切换时先清
|
|
84
|
+
// if (!row.selCol.input) {
|
|
85
|
+
// return false
|
|
86
|
+
// }
|
|
87
|
+
//
|
|
88
|
+
// row.type = ''// 默认字符串
|
|
89
|
+
// if (typeof val.input != 'string') { // 自定义组件会传入function
|
|
90
|
+
// return false
|
|
91
|
+
// }
|
|
92
|
+
// if (val.input.indexOf('date') >= 0 || val.input.indexOf('Date') >= 0) { // 日期格式
|
|
93
|
+
// if (val.inputProp.type == 'date') {
|
|
94
|
+
// row.type = 'date'
|
|
95
|
+
// }
|
|
96
|
+
// if (val.inputProp.type == 'datetime') {
|
|
97
|
+
// row.type = 'datetime'
|
|
98
|
+
// }
|
|
99
|
+
// // row = val
|
|
100
|
+
// }
|
|
101
|
+
// if (val.input.indexOf('num') >= 0 || val.input.indexOf('Num') >= 0) { // 数字格式
|
|
102
|
+
// row.type = 'number'
|
|
103
|
+
// }
|
|
113
104
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
105
|
+
genItem(val) {
|
|
106
|
+
return {
|
|
107
|
+
sortProperty: val[0],
|
|
108
|
+
sortType: val[1],
|
|
109
|
+
alias: 'a',
|
|
110
|
+
text:
|
|
111
|
+
this.allColumn.find((v) => v.$attrs.prop == val[0]).$attrs.label +
|
|
112
|
+
'/' +
|
|
113
|
+
(val[1] == 'ASC' ? '升序' : '降序'),
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
computed: {
|
|
118
|
+
sortOption() {
|
|
119
|
+
let rtn = this.allColumn.map((v) => {
|
|
120
|
+
return {
|
|
121
|
+
value: v.$attrs.prop,
|
|
122
|
+
label: v.$attrs.label,
|
|
123
|
+
children: [
|
|
124
|
+
{
|
|
121
125
|
value: 'ASC',
|
|
122
|
-
label: '升序'
|
|
123
|
-
},
|
|
126
|
+
label: '升序',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
124
129
|
value: 'DESC',
|
|
125
|
-
label: '降序'
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
}
|
|
130
|
+
label: '降序',
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
return rtn
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
}
|
|
133
139
|
</script>
|
|
134
|
-
<style rel="stylesheet/scss" lang="scss">
|
|
135
|
-
.gridShow {
|
|
136
|
-
.el-tag + .el-tag {
|
|
137
|
-
margin-left: 10px;
|
|
138
|
-
}
|
|
139
140
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
padding-bottom: 0;
|
|
146
|
-
}
|
|
141
|
+
<style lang="scss" rel="stylesheet/scss">
|
|
142
|
+
.gridShow {
|
|
143
|
+
.el-tag + .el-tag {
|
|
144
|
+
margin-left: 10px;
|
|
145
|
+
}
|
|
147
146
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
.button-new-tag {
|
|
148
|
+
margin-left: 10px;
|
|
149
|
+
height: 32px;
|
|
150
|
+
line-height: 30px;
|
|
151
|
+
padding-top: 0;
|
|
152
|
+
padding-bottom: 0;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
.input-new-tag {
|
|
156
|
+
width: 90px;
|
|
157
|
+
margin-left: 10px;
|
|
158
|
+
vertical-align: bottom;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
155
161
|
</style>
|