hd-idevvue3 3.0.2 → 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 +4 -2
- 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
|
@@ -1,72 +1,163 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-container>
|
|
3
3
|
<el-main>
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
<hd-com-grid
|
|
5
|
+
ref="grid"
|
|
6
|
+
:hdQuery="hdQuery"
|
|
7
|
+
url="/webresources/login/tech/ComExField"
|
|
8
|
+
not-init
|
|
9
|
+
>
|
|
6
10
|
<div class="filter-container" slot="query">
|
|
7
|
-
<el-input
|
|
8
|
-
|
|
11
|
+
<el-input
|
|
12
|
+
@keyup.enter.native="doQuery"
|
|
13
|
+
style="width: 200px"
|
|
14
|
+
class="filter-item"
|
|
15
|
+
placeholder="名称"
|
|
16
|
+
v-model="hdQuery.query.anyQuery"
|
|
17
|
+
>
|
|
9
18
|
</el-input>
|
|
10
|
-
<el-button
|
|
11
|
-
|
|
19
|
+
<el-button
|
|
20
|
+
class="filter-item"
|
|
21
|
+
type="primary"
|
|
22
|
+
:icon="ElIconSearch"
|
|
23
|
+
@click="$refs.grid.doQuery()"
|
|
24
|
+
keyType="query"
|
|
25
|
+
>搜索</el-button
|
|
26
|
+
>
|
|
27
|
+
<el-button
|
|
28
|
+
class="filter-item"
|
|
29
|
+
@click="doEdit(null)"
|
|
30
|
+
type="primary"
|
|
31
|
+
:icon="ElIconEdit"
|
|
32
|
+
keyType="add"
|
|
33
|
+
>新增
|
|
12
34
|
</el-button>
|
|
13
|
-
<el-button
|
|
35
|
+
<el-button
|
|
36
|
+
class="filter-item"
|
|
37
|
+
@click="$refs.grid.doRemoveAll()"
|
|
38
|
+
type="danger"
|
|
39
|
+
keyType="del"
|
|
40
|
+
>删除
|
|
14
41
|
</el-button>
|
|
15
42
|
</div>
|
|
16
|
-
<el-table-column
|
|
43
|
+
<el-table-column
|
|
44
|
+
width="100px"
|
|
45
|
+
align="center"
|
|
46
|
+
label="操作"
|
|
47
|
+
fixed="right"
|
|
48
|
+
>
|
|
17
49
|
<template slot-scope="scope">
|
|
18
|
-
<hd-btn
|
|
19
|
-
|
|
50
|
+
<hd-btn
|
|
51
|
+
icon="el-icon-edit"
|
|
52
|
+
hint="编辑"
|
|
53
|
+
@click.stop="doEdit(scope.row)"
|
|
54
|
+
></hd-btn>
|
|
55
|
+
<hd-btn
|
|
56
|
+
icon="el-icon-delete"
|
|
57
|
+
hint="删除"
|
|
58
|
+
@click.stop="$refs.grid.doRemove(scope.row)"
|
|
59
|
+
></hd-btn>
|
|
20
60
|
</template>
|
|
21
61
|
</el-table-column>
|
|
22
|
-
<el-table-column
|
|
62
|
+
<el-table-column
|
|
63
|
+
width="100px"
|
|
64
|
+
align="center"
|
|
65
|
+
label="编码"
|
|
66
|
+
prop="gridCode"
|
|
67
|
+
sortable
|
|
68
|
+
>
|
|
23
69
|
</el-table-column>
|
|
24
|
-
<el-table-column
|
|
70
|
+
<el-table-column
|
|
71
|
+
width="100px"
|
|
72
|
+
align="center"
|
|
73
|
+
label="是否使用"
|
|
74
|
+
prop="useFlg"
|
|
75
|
+
:inputFormat="$ckFt"
|
|
76
|
+
sortable
|
|
77
|
+
>
|
|
25
78
|
</el-table-column>
|
|
26
|
-
<el-table-column
|
|
79
|
+
<el-table-column
|
|
80
|
+
width="100px"
|
|
81
|
+
align="center"
|
|
82
|
+
label="表达宽度"
|
|
83
|
+
prop="formXs"
|
|
84
|
+
sortable
|
|
85
|
+
>
|
|
27
86
|
</el-table-column>
|
|
28
|
-
<el-table-column
|
|
87
|
+
<el-table-column
|
|
88
|
+
width="100px"
|
|
89
|
+
align="center"
|
|
90
|
+
label="表单高度"
|
|
91
|
+
prop="formSpan"
|
|
92
|
+
sortable
|
|
93
|
+
>
|
|
29
94
|
</el-table-column>
|
|
30
|
-
<el-table-column
|
|
95
|
+
<el-table-column
|
|
96
|
+
width="100px"
|
|
97
|
+
align="center"
|
|
98
|
+
label="列表默认宽度"
|
|
99
|
+
prop="gridWidth"
|
|
100
|
+
sortable
|
|
101
|
+
>
|
|
31
102
|
</el-table-column>
|
|
32
|
-
<el-table-column
|
|
103
|
+
<el-table-column
|
|
104
|
+
width="100px"
|
|
105
|
+
align="center"
|
|
106
|
+
label="默认值"
|
|
107
|
+
prop="defaultValue"
|
|
108
|
+
sortable
|
|
109
|
+
>
|
|
33
110
|
</el-table-column>
|
|
34
|
-
<el-table-column
|
|
111
|
+
<el-table-column
|
|
112
|
+
width="100px"
|
|
113
|
+
align="center"
|
|
114
|
+
label="描述"
|
|
115
|
+
prop="placeHolder"
|
|
116
|
+
sortable
|
|
117
|
+
>
|
|
35
118
|
</el-table-column>
|
|
36
|
-
<el-table-column
|
|
119
|
+
<el-table-column
|
|
120
|
+
width="100px"
|
|
121
|
+
align="center"
|
|
122
|
+
label="规则"
|
|
123
|
+
prop="rules"
|
|
124
|
+
sortable
|
|
125
|
+
>
|
|
37
126
|
</el-table-column>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
127
|
+
<!-- <el-table-column width="100px" align="center" label="对应列" prop="columnId" sortable>
|
|
128
|
+
</el-table-column>-->
|
|
42
129
|
</hd-com-grid>
|
|
43
130
|
</el-main>
|
|
44
|
-
<comexfieldform
|
|
131
|
+
<comexfieldform
|
|
132
|
+
ref="comexfieldform"
|
|
133
|
+
@save-ok="$refs.grid.doQuery()"
|
|
134
|
+
></comexfieldform>
|
|
45
135
|
</el-container>
|
|
46
136
|
</template>
|
|
47
|
-
<script>
|
|
48
|
-
import comexfieldform from './comexfieldform'
|
|
49
|
-
export default {
|
|
50
|
-
name: 'comexfieldsub',
|
|
51
|
-
components: { comexfieldform },
|
|
52
|
-
data() {
|
|
53
|
-
return {
|
|
54
|
-
hdQuery: new HdQuery(this),
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
137
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
this.hdQuery.query.exColumnId = exColumnId;
|
|
68
|
-
this.$refs.grid.doQuery();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
138
|
+
<script>
|
|
139
|
+
import { Search as ElIconSearch, Edit as ElIconEdit } from '@element-plus/icons'
|
|
140
|
+
import comexfieldform from './comexfieldform'
|
|
141
|
+
export default {
|
|
142
|
+
data() {
|
|
143
|
+
return {
|
|
144
|
+
hdQuery: new HdQuery(this),
|
|
145
|
+
ElIconSearch,
|
|
146
|
+
ElIconEdit,
|
|
71
147
|
}
|
|
148
|
+
},
|
|
149
|
+
name: 'comexfieldsub',
|
|
150
|
+
components: { comexfieldform },
|
|
151
|
+
mounted() {},
|
|
152
|
+
methods: {
|
|
153
|
+
doEdit(row) {
|
|
154
|
+
// 增加或编辑
|
|
155
|
+
this.$refs['comexfieldform'].show(row)
|
|
156
|
+
},
|
|
157
|
+
query(exColumnId) {
|
|
158
|
+
this.hdQuery.query.exColumnId = exColumnId
|
|
159
|
+
this.$refs.grid.doQuery()
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
}
|
|
72
163
|
</script>
|
|
@@ -19,24 +19,23 @@ import comexcolumn from './exfield/comexcolumn.vue'
|
|
|
19
19
|
|
|
20
20
|
export default {
|
|
21
21
|
install(Vue) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
22
|
+
window.$vueApp.component('PrivilegeSyscode', sysfieldframe)
|
|
23
|
+
window.$vueApp.component('PrivilegeMenu', menu)
|
|
24
|
+
window.$vueApp.component('MenuInfo', menuinfo)
|
|
25
|
+
window.$vueApp.component('PrivilegeRole', role)
|
|
26
|
+
window.$vueApp.component('PrivilegeOrgDept', orgDept)
|
|
27
|
+
window.$vueApp.component('PrivilegePersonDept', personDept)
|
|
28
|
+
window.$vueApp.component('PrivilegeUserRole', userRole)
|
|
29
|
+
window.$vueApp.component('PrivilegeComMsg', commsg)
|
|
30
|
+
window.$vueApp.component('PrivilegeComMsgTo', commsgto)
|
|
31
|
+
// Vue.component('orgTree', orgTree) // 树组件
|
|
32
|
+
window.$vueApp.component('SysLog', syslog) // 日志
|
|
33
|
+
window.$vueApp.component('SysLogConfig', syslogframe) // 日志设置
|
|
34
|
+
window.$vueApp.component('QuartzLog', comquartzlog) //
|
|
35
|
+
window.$vueApp.component('QuartzJob', comquartzjob) //
|
|
36
|
+
window.$vueApp.component('Search', comsearch) //
|
|
37
|
+
window.$vueApp.component('AuthMobileUpdate', authmobileupdate) //
|
|
38
|
+
window.$vueApp.component('ComExField', comexfield) //
|
|
39
|
+
window.$vueApp.component('ComExColumn', comexcolumn) //
|
|
40
|
+
},
|
|
41
41
|
}
|
|
42
|
-
|
|
@@ -1,41 +1,49 @@
|
|
|
1
|
-
<template>
|
|
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
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<hd-tree
|
|
3
|
+
:data="hdTree"
|
|
4
|
+
v-loading="listLoading"
|
|
5
|
+
node-key="id"
|
|
6
|
+
ref="menuTree"
|
|
7
|
+
style="height: 100%"
|
|
8
|
+
@node-click="selMenu"
|
|
9
|
+
></hd-tree>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import btnRole from '../role/btnRole'
|
|
14
|
+
import rolelist from '../role/rolelist'
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
components: {
|
|
18
|
+
rolelist,
|
|
19
|
+
btnRole,
|
|
20
|
+
},
|
|
21
|
+
name: 'comMenu',
|
|
22
|
+
data: function () {
|
|
23
|
+
return {
|
|
24
|
+
hdTree: [],
|
|
25
|
+
listLoading: false,
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
mounted() {
|
|
29
|
+
this.doQuery()
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
doQuery() {
|
|
33
|
+
// 有权限的菜单树
|
|
34
|
+
this.listLoading = true
|
|
35
|
+
|
|
36
|
+
this.$http
|
|
37
|
+
.get(`../webresources/login/privilege/AuthRole/findtreeforrole`)
|
|
38
|
+
.then((response) => {
|
|
39
|
+
const data = response.data
|
|
40
|
+
this.hdTree = data
|
|
41
|
+
this.listLoading = false
|
|
42
|
+
})
|
|
43
|
+
},
|
|
44
|
+
selMenu(node) {
|
|
45
|
+
this.$emit('selMenu', node)
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
@@ -4,86 +4,190 @@
|
|
|
4
4
|
<!--<hd-hot-key :keyMap="['alt','e']" btnRef="add"></hd-hot-key>-->
|
|
5
5
|
<!--<hd-hot-key :keyMap="['alt','d']" btnRef="del"></hd-hot-key>-->
|
|
6
6
|
<el-aside width="260px" style="border-right: 1px solid #eee">
|
|
7
|
-
<hd-tree
|
|
7
|
+
<hd-tree
|
|
8
|
+
:data="data"
|
|
9
|
+
@node-click="handleNodeClick"
|
|
10
|
+
node-key="id"
|
|
11
|
+
></hd-tree>
|
|
8
12
|
</el-aside>
|
|
9
13
|
<el-main>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
<hd-com-grid
|
|
15
|
+
ref="grid"
|
|
16
|
+
:hdQuery="hdQuery"
|
|
17
|
+
url="/webresources/login/privilegeVue"
|
|
18
|
+
:validate="validate"
|
|
19
|
+
:findUrl="findUrl"
|
|
20
|
+
:findoneUrl="findoneUrl"
|
|
21
|
+
>
|
|
13
22
|
<div class="filter-container" slot="query">
|
|
14
|
-
<el-button
|
|
23
|
+
<el-button
|
|
24
|
+
class="filter-item"
|
|
25
|
+
@click="doEdit()"
|
|
26
|
+
type="primary"
|
|
27
|
+
ref="add"
|
|
28
|
+
keyType="add"
|
|
29
|
+
>{{ $t('新增') }}
|
|
15
30
|
</el-button>
|
|
16
|
-
<el-button
|
|
17
|
-
|
|
31
|
+
<el-button
|
|
32
|
+
class="filter-item"
|
|
33
|
+
@click="$refs.grid.doRemoveAll()"
|
|
34
|
+
type="danger"
|
|
35
|
+
ref="del"
|
|
36
|
+
keyType="del"
|
|
37
|
+
>{{ $t('删除') }}
|
|
18
38
|
</el-button>
|
|
19
39
|
</div>
|
|
20
40
|
<el-table-column width="60px" align="center" label="操作" fixed="right">
|
|
21
41
|
<template slot-scope="scope">
|
|
22
|
-
<hd-btn
|
|
23
|
-
|
|
42
|
+
<hd-btn
|
|
43
|
+
icon="el-icon-edit"
|
|
44
|
+
hint="编辑"
|
|
45
|
+
@click.stop="doEdit(scope.row)"
|
|
46
|
+
v-if="!scope.row.isEdit"
|
|
47
|
+
></hd-btn>
|
|
48
|
+
<hd-btn
|
|
49
|
+
icon="el-icon-check"
|
|
50
|
+
hint="保存"
|
|
51
|
+
@click.stop="$refs.grid.doSave(scope.row)"
|
|
52
|
+
v-if="scope.row.isEdit"
|
|
53
|
+
>
|
|
24
54
|
</hd-btn>
|
|
25
55
|
<!--hd-btn不能写icon-->
|
|
26
|
-
<hd-btn
|
|
27
|
-
|
|
56
|
+
<hd-btn
|
|
57
|
+
hint="撤销"
|
|
58
|
+
@click.stop="$refs.grid.doCancel(scope.row, scope.$index)"
|
|
59
|
+
v-if="scope.row.isEdit"
|
|
60
|
+
>
|
|
61
|
+
<svg-icon icon-class="undo" />
|
|
28
62
|
</hd-btn>
|
|
29
|
-
<hd-btn
|
|
30
|
-
|
|
63
|
+
<hd-btn
|
|
64
|
+
icon="el-icon-delete"
|
|
65
|
+
hint="删除"
|
|
66
|
+
@click.stop="$refs.grid.doRemove(scope.row)"
|
|
67
|
+
v-if="!scope.row.isEdit"
|
|
68
|
+
>
|
|
31
69
|
</hd-btn>
|
|
32
70
|
</template>
|
|
33
71
|
</el-table-column>
|
|
34
|
-
<el-table-column
|
|
35
|
-
|
|
72
|
+
<el-table-column
|
|
73
|
+
width="100px"
|
|
74
|
+
align="left"
|
|
75
|
+
header-align="center"
|
|
76
|
+
label="权限名"
|
|
77
|
+
prop="text"
|
|
78
|
+
:rules="$r(1, 0, 50)"
|
|
79
|
+
sortable
|
|
80
|
+
>
|
|
36
81
|
</el-table-column>
|
|
37
|
-
<el-table-column
|
|
82
|
+
<el-table-column
|
|
83
|
+
width="100px"
|
|
84
|
+
align="left"
|
|
85
|
+
header-align="center"
|
|
86
|
+
label="英文名"
|
|
87
|
+
prop="enText"
|
|
88
|
+
sortable
|
|
89
|
+
>
|
|
38
90
|
</el-table-column>
|
|
39
|
-
<el-table-column
|
|
91
|
+
<el-table-column
|
|
92
|
+
width="400px"
|
|
93
|
+
align="left"
|
|
94
|
+
header-align="center"
|
|
95
|
+
label="URL"
|
|
96
|
+
prop="url"
|
|
97
|
+
sortable
|
|
98
|
+
>
|
|
40
99
|
</el-table-column>
|
|
41
|
-
<el-table-column
|
|
100
|
+
<el-table-column
|
|
101
|
+
width="60px"
|
|
102
|
+
align="right"
|
|
103
|
+
header-align="center"
|
|
104
|
+
label="排序"
|
|
105
|
+
prop="sorter"
|
|
106
|
+
sortable
|
|
107
|
+
>
|
|
42
108
|
<template slot-scope="scope">
|
|
43
|
-
<el-input
|
|
44
|
-
|
|
109
|
+
<el-input
|
|
110
|
+
type="number"
|
|
111
|
+
v-model.numebr="scope.row.sorter"
|
|
112
|
+
v-if="scope.row.isEdit"
|
|
113
|
+
></el-input>
|
|
114
|
+
<span v-else>{{ scope.row.sorter }}</span>
|
|
45
115
|
</template>
|
|
46
116
|
</el-table-column>
|
|
47
117
|
<el-table-column align="center" label="使用" prop="state" sortable>
|
|
48
118
|
<template slot-scope="scope">
|
|
49
|
-
<el-switch
|
|
50
|
-
|
|
51
|
-
|
|
119
|
+
<el-switch
|
|
120
|
+
v-model="scope.row.state"
|
|
121
|
+
v-if="scope.row.isEdit"
|
|
122
|
+
active-value="open"
|
|
123
|
+
inactive-value="closed"
|
|
124
|
+
></el-switch>
|
|
125
|
+
<span v-else>{{ scope.row.state == 'open' ? '√' : '×' }}</span>
|
|
52
126
|
</template>
|
|
53
127
|
</el-table-column>
|
|
54
|
-
<el-table-column
|
|
128
|
+
<el-table-column
|
|
129
|
+
width="100px"
|
|
130
|
+
align="center"
|
|
131
|
+
label="tab打开"
|
|
132
|
+
prop="openType"
|
|
133
|
+
sortable
|
|
134
|
+
>
|
|
55
135
|
<template slot-scope="scope">
|
|
56
136
|
<!--easyui版本为0 tab 1 iframe 2 window-->
|
|
57
|
-
<el-switch
|
|
58
|
-
|
|
59
|
-
|
|
137
|
+
<el-switch
|
|
138
|
+
v-model="scope.row.openType"
|
|
139
|
+
v-if="scope.row.isEdit"
|
|
140
|
+
active-value="0"
|
|
141
|
+
inactive-value="2"
|
|
142
|
+
></el-switch>
|
|
143
|
+
<span v-else>{{ scope.row.openType == '0' ? '√' : '×' }}</span>
|
|
60
144
|
</template>
|
|
61
145
|
</el-table-column>
|
|
62
|
-
<el-table-column
|
|
146
|
+
<el-table-column
|
|
147
|
+
align="left"
|
|
148
|
+
header-align="center"
|
|
149
|
+
label="图标"
|
|
150
|
+
prop="iconCls"
|
|
151
|
+
width="100px"
|
|
152
|
+
>
|
|
63
153
|
<template slot-scope="scope">
|
|
64
|
-
<el-input
|
|
65
|
-
|
|
154
|
+
<el-input
|
|
155
|
+
type="text"
|
|
156
|
+
v-model="scope.row.iconCls"
|
|
157
|
+
v-if="scope.row.isEdit"
|
|
158
|
+
></el-input>
|
|
159
|
+
<span v-else>{{ scope.row.iconCls }}</span>
|
|
66
160
|
</template>
|
|
67
161
|
</el-table-column>
|
|
68
|
-
<el-table-column
|
|
162
|
+
<el-table-column
|
|
163
|
+
width="200px"
|
|
164
|
+
align="left"
|
|
165
|
+
header-align="center"
|
|
166
|
+
label="备注"
|
|
167
|
+
prop="description"
|
|
168
|
+
sortable
|
|
169
|
+
>
|
|
69
170
|
<template slot-scope="scope">
|
|
70
|
-
<el-input
|
|
71
|
-
|
|
171
|
+
<el-input
|
|
172
|
+
type="text"
|
|
173
|
+
v-model="scope.row.description"
|
|
174
|
+
v-if="scope.row.isEdit"
|
|
175
|
+
></el-input>
|
|
176
|
+
<span v-else>{{ scope.row.description }}</span>
|
|
72
177
|
</template>
|
|
73
178
|
</el-table-column>
|
|
74
179
|
</hd-com-grid>
|
|
75
180
|
</el-main>
|
|
76
181
|
</el-container>
|
|
77
182
|
</template>
|
|
78
|
-
<script>
|
|
79
183
|
|
|
184
|
+
<script>
|
|
80
185
|
export default {
|
|
81
186
|
data() {
|
|
82
187
|
return {
|
|
83
188
|
data: [],
|
|
84
189
|
parentId: '', // 选中的树节点
|
|
85
|
-
hdQuery: new HdQuery(this)
|
|
86
|
-
|
|
190
|
+
hdQuery: new HdQuery(this),
|
|
87
191
|
}
|
|
88
192
|
},
|
|
89
193
|
mounted() {
|
|
@@ -94,9 +198,11 @@ export default {
|
|
|
94
198
|
},
|
|
95
199
|
methods: {
|
|
96
200
|
doQuery() {
|
|
97
|
-
this.$http
|
|
98
|
-
|
|
99
|
-
|
|
201
|
+
this.$http
|
|
202
|
+
.post('/webresources/login/privilege/AuthPrivilege/getAllTree')
|
|
203
|
+
.then((response) => {
|
|
204
|
+
this.data = response.data
|
|
205
|
+
})
|
|
100
206
|
},
|
|
101
207
|
doListQuery() {
|
|
102
208
|
this.hdQuery.query.parentId = this.parentId
|
|
@@ -107,27 +213,38 @@ export default {
|
|
|
107
213
|
this.doListQuery()
|
|
108
214
|
},
|
|
109
215
|
doEdit(row) {
|
|
110
|
-
if (!row && !this.parentId) {
|
|
216
|
+
if (!row && !this.parentId) {
|
|
217
|
+
// 新增
|
|
111
218
|
this.$message({
|
|
112
219
|
type: 'error',
|
|
113
|
-
message: this.$t('未选择数据')
|
|
220
|
+
message: this.$t('未选择数据'),
|
|
114
221
|
})
|
|
115
222
|
return false
|
|
116
223
|
}
|
|
117
224
|
// 调用父组件的
|
|
118
225
|
this.$refs.grid.doEdit(row)
|
|
119
|
-
}
|
|
226
|
+
},
|
|
120
227
|
},
|
|
121
|
-
computed: {
|
|
228
|
+
computed: {
|
|
229
|
+
// 给外层v-model赋值
|
|
122
230
|
validate() {
|
|
123
|
-
return {
|
|
231
|
+
return {
|
|
232
|
+
text: [
|
|
233
|
+
{ message: this.$t('权限名必填'), required: true },
|
|
234
|
+
{ max: 50, message: this.$t('名称长度不能超过50个字符') },
|
|
235
|
+
],
|
|
236
|
+
}
|
|
124
237
|
},
|
|
125
|
-
findUrl() {
|
|
238
|
+
findUrl() {
|
|
239
|
+
// 因为查询的路径和默认的不一致,如果代码生成器生成其实不需要写
|
|
126
240
|
return '/webresources/login/privilege/AuthPrivilege/find'
|
|
127
241
|
},
|
|
128
|
-
findoneUrl() {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
242
|
+
findoneUrl() {
|
|
243
|
+
// 需要关联节点,所以需要写url,普通列表也不需要写
|
|
244
|
+
return (
|
|
245
|
+
'/webresources/login/privilegeVue/findone?parentId=' + this.parentId
|
|
246
|
+
)
|
|
247
|
+
},
|
|
248
|
+
},
|
|
132
249
|
}
|
|
133
250
|
</script>
|