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
|
@@ -1,67 +1,136 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<hd-com-grid
|
|
2
|
+
<hd-com-grid
|
|
3
|
+
ref="grid"
|
|
4
|
+
:hdQuery="hdQuery"
|
|
5
|
+
@row-click="selRow"
|
|
6
|
+
url="/webresources/login/privilege/AuthRole/vue"
|
|
7
|
+
>
|
|
3
8
|
<div class="filter-container" slot="query">
|
|
4
|
-
<el-input
|
|
5
|
-
|
|
9
|
+
<el-input
|
|
10
|
+
@keyup.enter.native="doQuery"
|
|
11
|
+
style="width: 120px"
|
|
12
|
+
class="filter-item"
|
|
13
|
+
:placeholder="$t('名称')"
|
|
14
|
+
v-model="hdQuery.query.anyQuery"
|
|
15
|
+
>
|
|
6
16
|
</el-input>
|
|
7
|
-
<orgnselect
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
17
|
+
<orgnselect
|
|
18
|
+
style="width: 150px; display: inline-block"
|
|
19
|
+
:txtVal.sync="hdQuery.query.orgnName"
|
|
20
|
+
:idVal.sync="hdQuery.query.orgnId"
|
|
21
|
+
class="filter-item"
|
|
22
|
+
:placeholder="$t('选择部门')"
|
|
23
|
+
></orgnselect>
|
|
24
|
+
<el-button @click="doQuery" keyType="query" class="filter-item">{{
|
|
25
|
+
$t('搜索')
|
|
26
|
+
}}</el-button>
|
|
27
|
+
<el-button
|
|
28
|
+
class="filter-item"
|
|
29
|
+
type="primary"
|
|
30
|
+
@click="$refs.grid.doEdit('')"
|
|
31
|
+
keyType="add"
|
|
32
|
+
>{{ $t('增加') }}</el-button
|
|
33
|
+
>
|
|
11
34
|
</div>
|
|
12
35
|
<el-table-column width="90" align="center" label="操作" fixed="right">
|
|
13
36
|
<template slot-scope="scope">
|
|
14
|
-
<hd-btn
|
|
15
|
-
|
|
37
|
+
<hd-btn
|
|
38
|
+
icon="el-icon-edit"
|
|
39
|
+
hint="编辑"
|
|
40
|
+
@click="$refs.grid.doEdit(scope.row)"
|
|
41
|
+
v-if="!scope.row.isEdit"
|
|
42
|
+
>{{ $t('编辑') }}</hd-btn
|
|
43
|
+
>
|
|
44
|
+
<hd-btn
|
|
45
|
+
icon="el-icon-delete"
|
|
46
|
+
hint="删除"
|
|
47
|
+
@click="$refs.grid.doRemove(scope.row)"
|
|
48
|
+
v-if="!scope.row.isEdit"
|
|
49
|
+
>{{ $t('删除') }}
|
|
16
50
|
</hd-btn>
|
|
17
|
-
<hd-btn
|
|
18
|
-
|
|
51
|
+
<hd-btn
|
|
52
|
+
hint="撤销"
|
|
53
|
+
@click.stop="$refs.grid.doCancel(scope.row)"
|
|
54
|
+
v-if="scope.row.isEdit"
|
|
55
|
+
>
|
|
56
|
+
<svg-icon icon-class="undo" />
|
|
19
57
|
</hd-btn>
|
|
20
|
-
<hd-btn
|
|
21
|
-
|
|
58
|
+
<hd-btn
|
|
59
|
+
icon="el-icon-check"
|
|
60
|
+
hint="保存"
|
|
61
|
+
@click.stop="$refs.grid.doSave(scope.row)"
|
|
62
|
+
v-if="scope.row.isEdit"
|
|
63
|
+
>
|
|
64
|
+
{{ $t('保存') }}
|
|
22
65
|
</hd-btn>
|
|
23
66
|
</template>
|
|
24
67
|
</el-table-column>
|
|
25
|
-
<el-table-column
|
|
26
|
-
|
|
68
|
+
<el-table-column
|
|
69
|
+
width="120px"
|
|
70
|
+
align="left"
|
|
71
|
+
header-align="center"
|
|
72
|
+
label="名称"
|
|
73
|
+
prop="name"
|
|
74
|
+
sortable
|
|
75
|
+
:rules="$r(1, 0, 50)"
|
|
76
|
+
>
|
|
27
77
|
</el-table-column>
|
|
28
|
-
<el-table-column
|
|
78
|
+
<el-table-column
|
|
79
|
+
width="170px"
|
|
80
|
+
align="left"
|
|
81
|
+
header-align="center"
|
|
82
|
+
label="所属部门"
|
|
83
|
+
prop="orgnStr"
|
|
84
|
+
noEdit
|
|
85
|
+
>
|
|
29
86
|
</el-table-column>
|
|
30
|
-
<el-table-column
|
|
87
|
+
<el-table-column
|
|
88
|
+
width="150px"
|
|
89
|
+
align="left"
|
|
90
|
+
header-align="center"
|
|
91
|
+
label="描述"
|
|
92
|
+
prop="description"
|
|
93
|
+
>
|
|
31
94
|
</el-table-column>
|
|
32
|
-
<el-table-column
|
|
33
|
-
|
|
34
|
-
|
|
95
|
+
<el-table-column
|
|
96
|
+
width="100px"
|
|
97
|
+
align="center"
|
|
98
|
+
label="管理员"
|
|
99
|
+
prop="isAdmin"
|
|
100
|
+
input="el-switch"
|
|
101
|
+
v-if="$store.state.user.isAdmin"
|
|
102
|
+
:inputProp="{ activeValue: '1', inactiveValue: '0' }"
|
|
103
|
+
:inputFormat="$ckFt"
|
|
104
|
+
sortable
|
|
105
|
+
>
|
|
35
106
|
</el-table-column>
|
|
36
107
|
</hd-com-grid>
|
|
37
108
|
</template>
|
|
38
|
-
<script>
|
|
39
109
|
|
|
40
|
-
|
|
41
|
-
|
|
110
|
+
<script>
|
|
111
|
+
import btnRole from './btnRole'
|
|
112
|
+
import orgnselect from '../orgDept/orgnselect'
|
|
42
113
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
114
|
+
export default {
|
|
115
|
+
components: {
|
|
116
|
+
btnRole,
|
|
117
|
+
orgnselect,
|
|
118
|
+
},
|
|
119
|
+
name: 'rolelist',
|
|
120
|
+
data: function () {
|
|
121
|
+
return {
|
|
122
|
+
hdQuery: new HdQuery(this),
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
props: {},
|
|
126
|
+
mounted() {},
|
|
127
|
+
methods: {
|
|
128
|
+
doQuery() {
|
|
129
|
+
this.$refs.grid.doQuery()
|
|
53
130
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
131
|
+
selRow(row) {
|
|
132
|
+
this.$emit('selRoleId', row.roleId)
|
|
57
133
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
this.$refs.grid.doQuery()
|
|
61
|
-
},
|
|
62
|
-
selRow(row) {
|
|
63
|
-
this.$emit('selRoleId', row.roleId)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
134
|
+
},
|
|
135
|
+
}
|
|
67
136
|
</script>
|
|
@@ -1,31 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!--开发示例:pop选择的-->
|
|
3
3
|
<div>
|
|
4
|
-
<hd-grid-sel
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
<hd-grid-sel
|
|
5
|
+
:txtVal="txtVal"
|
|
6
|
+
:idVal="idVal"
|
|
7
|
+
placeholder="请点击选角色"
|
|
8
|
+
height="50vh"
|
|
9
|
+
:hdQuery="hdQuery"
|
|
10
|
+
url="/webresources/login/privilege/AuthRole/find"
|
|
11
|
+
@rowClick="doClick"
|
|
12
|
+
:beforeQuery="beforeQuery"
|
|
13
|
+
visualScroll
|
|
14
|
+
>
|
|
15
|
+
<el-table-column
|
|
16
|
+
width="130px"
|
|
17
|
+
align="left"
|
|
18
|
+
header-align="center"
|
|
19
|
+
label="角色名称"
|
|
20
|
+
prop="name"
|
|
21
|
+
sortable
|
|
22
|
+
>
|
|
8
23
|
</el-table-column>
|
|
9
|
-
<el-table-column
|
|
24
|
+
<el-table-column
|
|
25
|
+
width="130px"
|
|
26
|
+
align="left"
|
|
27
|
+
header-align="center"
|
|
28
|
+
label="创建部门"
|
|
29
|
+
prop="orgnStr"
|
|
30
|
+
sortable
|
|
31
|
+
>
|
|
10
32
|
</el-table-column>
|
|
11
33
|
</hd-grid-sel>
|
|
12
34
|
</div>
|
|
13
35
|
</template>
|
|
14
36
|
|
|
15
37
|
<script>
|
|
16
|
-
|
|
17
38
|
export default {
|
|
18
39
|
name: 'selship',
|
|
19
40
|
components: {},
|
|
20
41
|
data() {
|
|
21
42
|
return {
|
|
22
|
-
|
|
23
|
-
hdQuery: new HdQuery(this)
|
|
43
|
+
hdQuery: new HdQuery(this),
|
|
24
44
|
}
|
|
25
45
|
},
|
|
26
|
-
mounted() {
|
|
27
|
-
|
|
28
|
-
},
|
|
46
|
+
mounted() {},
|
|
29
47
|
props: { idVal: String, txtVal: String }, // 设置value为props属性-必须
|
|
30
48
|
// watch: {
|
|
31
49
|
// popAnyQuery: function () {
|
|
@@ -43,15 +61,14 @@ export default {
|
|
|
43
61
|
this.$emit('update:txtVal', row.name)
|
|
44
62
|
this.$emit('update:idVal', row.roleId)
|
|
45
63
|
this.$emit('onSelItem', { data: row }) // 主页面调用弹窗时添加
|
|
46
|
-
}
|
|
64
|
+
},
|
|
47
65
|
},
|
|
48
|
-
watch: {}
|
|
66
|
+
watch: {},
|
|
49
67
|
}
|
|
50
68
|
</script>
|
|
51
69
|
|
|
52
70
|
<style>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
71
|
+
.el-popper {
|
|
72
|
+
z-index: 3000 !important;
|
|
73
|
+
}
|
|
57
74
|
</style>
|
|
@@ -1,105 +1,196 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-container>
|
|
3
3
|
<el-aside style="border-right: 1px solid #eee" width="260px">
|
|
4
|
-
<hd-tree
|
|
4
|
+
<hd-tree
|
|
5
|
+
:data="menuData"
|
|
6
|
+
@node-click="handleNodeClick"
|
|
7
|
+
node-key="id"
|
|
8
|
+
></hd-tree>
|
|
5
9
|
</el-aside>
|
|
6
10
|
<el-main>
|
|
7
|
-
<hd-com-grid
|
|
11
|
+
<hd-com-grid
|
|
12
|
+
ref="grid"
|
|
13
|
+
:hdQuery="hdQuery"
|
|
14
|
+
url="/webresources/login/com/ComSearch"
|
|
15
|
+
>
|
|
8
16
|
<div class="filter-container" slot="query">
|
|
9
|
-
<el-input
|
|
10
|
-
|
|
11
|
-
|
|
17
|
+
<el-input
|
|
18
|
+
@keyup.enter.native="$refs.grid.doQuery()"
|
|
19
|
+
style="width: 200px"
|
|
20
|
+
class="filter-item"
|
|
21
|
+
:placeholder="$t('名称')"
|
|
22
|
+
v-model="hdQuery.query.name"
|
|
23
|
+
>
|
|
12
24
|
</el-input>
|
|
13
|
-
<el-button
|
|
25
|
+
<el-button
|
|
26
|
+
class="filter-item"
|
|
27
|
+
@click="$refs.grid.doQuery()"
|
|
28
|
+
:icon="ElIconSearch"
|
|
29
|
+
type="primary"
|
|
30
|
+
ref="q"
|
|
31
|
+
keyType="query"
|
|
32
|
+
>{{ $t('搜索') }}
|
|
14
33
|
</el-button>
|
|
15
|
-
<el-button
|
|
34
|
+
<el-button
|
|
35
|
+
class="filter-item"
|
|
36
|
+
type="primary"
|
|
37
|
+
@click="doAdd()"
|
|
38
|
+
:icon="ElIconEdit"
|
|
39
|
+
ref="a"
|
|
40
|
+
keyType="add"
|
|
41
|
+
>{{ $t('新增') }}
|
|
16
42
|
</el-button>
|
|
17
|
-
<el-button
|
|
43
|
+
<el-button
|
|
44
|
+
class="filter-item"
|
|
45
|
+
@click="$refs.grid.doRemoveAll()"
|
|
46
|
+
type="danger"
|
|
47
|
+
ref="d"
|
|
48
|
+
keyType="del"
|
|
49
|
+
>{{ $t('删除') }}
|
|
18
50
|
</el-button>
|
|
19
51
|
</div>
|
|
20
52
|
<el-table-column width="90px" align="center" label="操作" fixed="right">
|
|
21
53
|
<template slot-scope="scope">
|
|
22
|
-
<HdGridEditBtn
|
|
23
|
-
|
|
54
|
+
<HdGridEditBtn
|
|
55
|
+
style="display: inline"
|
|
56
|
+
:row="scope.row"
|
|
57
|
+
gridRef="grid"
|
|
58
|
+
></HdGridEditBtn>
|
|
59
|
+
<hd-btn
|
|
60
|
+
icon="el-icon-refresh"
|
|
61
|
+
hint="刷新"
|
|
62
|
+
@click.stop="doRefresh(scope.row)"
|
|
63
|
+
v-if="!scope.row.isEdit"
|
|
64
|
+
></hd-btn>
|
|
24
65
|
</template>
|
|
25
66
|
</el-table-column>
|
|
26
67
|
|
|
27
|
-
<el-table-column
|
|
68
|
+
<el-table-column
|
|
69
|
+
width="100px"
|
|
70
|
+
align="center"
|
|
71
|
+
label="索引名称"
|
|
72
|
+
prop="indexName"
|
|
73
|
+
sortable
|
|
74
|
+
:rules="$r(0, 0, 30)"
|
|
75
|
+
noEdit
|
|
76
|
+
>
|
|
28
77
|
</el-table-column>
|
|
29
|
-
<el-table-column
|
|
78
|
+
<el-table-column
|
|
79
|
+
width="120px"
|
|
80
|
+
align="center"
|
|
81
|
+
label="索引CODE"
|
|
82
|
+
prop="searchCode"
|
|
83
|
+
sortable
|
|
84
|
+
:rules="$r(0, 0, 50)"
|
|
85
|
+
>
|
|
30
86
|
</el-table-column>
|
|
31
|
-
<el-table-column
|
|
87
|
+
<el-table-column
|
|
88
|
+
width="120px"
|
|
89
|
+
align="center"
|
|
90
|
+
label="索引菜单"
|
|
91
|
+
:inputFormat="(v, r) => r.menuName"
|
|
92
|
+
prop="menuId"
|
|
93
|
+
sortable
|
|
94
|
+
noEdit
|
|
95
|
+
>
|
|
32
96
|
</el-table-column>
|
|
33
|
-
<el-table-column
|
|
97
|
+
<el-table-column
|
|
98
|
+
width="330px"
|
|
99
|
+
align="center"
|
|
100
|
+
label="索引实体"
|
|
101
|
+
prop="entityName"
|
|
102
|
+
sortable
|
|
103
|
+
:rules="$r(0, 0, 255)"
|
|
104
|
+
>
|
|
34
105
|
</el-table-column>
|
|
35
|
-
<el-table-column
|
|
106
|
+
<el-table-column
|
|
107
|
+
width="140px"
|
|
108
|
+
align="center"
|
|
109
|
+
label="上次刷新时间"
|
|
110
|
+
:inputProp="$date"
|
|
111
|
+
prop="flushTim"
|
|
112
|
+
sortable
|
|
113
|
+
noEdit
|
|
114
|
+
>
|
|
36
115
|
</el-table-column>
|
|
37
116
|
</hd-com-grid>
|
|
38
117
|
</el-main>
|
|
39
118
|
</el-container>
|
|
40
119
|
</template>
|
|
41
|
-
<script>
|
|
42
120
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
121
|
+
<script>
|
|
122
|
+
import { Search as ElIconSearch, Edit as ElIconEdit } from '@element-plus/icons'
|
|
123
|
+
export default {
|
|
124
|
+
data() {
|
|
125
|
+
return {
|
|
126
|
+
hdQuery: new HdQuery(this),
|
|
127
|
+
menuData: [],
|
|
128
|
+
selData: {},
|
|
129
|
+
ElIconSearch,
|
|
130
|
+
ElIconEdit,
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
name: 'comsearch',
|
|
134
|
+
components: {},
|
|
135
|
+
mounted() {
|
|
136
|
+
this.doMenuQuery()
|
|
137
|
+
},
|
|
138
|
+
methods: {
|
|
139
|
+
doAdd() {
|
|
140
|
+
if (!this.selData.children || this.selData.children.length > 0) {
|
|
141
|
+
this.$message({
|
|
142
|
+
type: 'error',
|
|
143
|
+
message: this.$t('只能添加到节点菜单'),
|
|
144
|
+
})
|
|
145
|
+
return
|
|
51
146
|
}
|
|
147
|
+
let rowData = {}
|
|
148
|
+
rowData.menuId = this.selData.id
|
|
149
|
+
rowData.menuName = this.selData.text
|
|
150
|
+
rowData.indexName = 'default'
|
|
151
|
+
this.$refs.grid.doEdit('', rowData)
|
|
52
152
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
methods: {
|
|
58
|
-
doAdd() {
|
|
59
|
-
if(!this.selData.children || this.selData.children.length > 0) {
|
|
60
|
-
this.$message({
|
|
61
|
-
type: 'error',
|
|
62
|
-
message: this.$t('只能添加到节点菜单')
|
|
63
|
-
});
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
let rowData = {};
|
|
67
|
-
rowData.menuId = this.selData.id;
|
|
68
|
-
rowData.menuName = this.selData.text;
|
|
69
|
-
rowData.indexName = 'default';
|
|
70
|
-
this.$refs.grid.doEdit('', rowData);
|
|
71
|
-
},
|
|
72
|
-
doMenuQuery() {
|
|
73
|
-
this.$http.post('/webresources/login/privilege/AuthPrivilege/getAllTree/1/0').then(response => {
|
|
153
|
+
doMenuQuery() {
|
|
154
|
+
this.$http
|
|
155
|
+
.post('/webresources/login/privilege/AuthPrivilege/getAllTree/1/0')
|
|
156
|
+
.then((response) => {
|
|
74
157
|
console.log('menuData', response.data)
|
|
75
158
|
this.menuData = response.data
|
|
76
159
|
})
|
|
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
|
-
|
|
160
|
+
},
|
|
161
|
+
handleNodeClick(obj) {
|
|
162
|
+
this.selData = obj
|
|
163
|
+
this.doListQuery()
|
|
164
|
+
},
|
|
165
|
+
doListQuery() {
|
|
166
|
+
this.hdQuery.query.menuId = this.selData.id
|
|
167
|
+
if (this.selData.id === '-1') {
|
|
168
|
+
this.hdQuery.query.menuId = null
|
|
169
|
+
}
|
|
170
|
+
this.$refs.grid.doQuery()
|
|
171
|
+
},
|
|
172
|
+
doRefresh(obj) {
|
|
173
|
+
// 刷新数据
|
|
174
|
+
const loading = this.$loading({
|
|
175
|
+
text: this.$t('正在生成索引,您可能需要一盏茶的时间请耐心等待...'),
|
|
176
|
+
})
|
|
177
|
+
this.$http
|
|
178
|
+
.post(`/webresources/login/com/ComSearch/flush/${obj.searchId}`)
|
|
179
|
+
.then(
|
|
180
|
+
(response) => {
|
|
181
|
+
loading.close()
|
|
182
|
+
this.$message({
|
|
183
|
+
type: 'success',
|
|
184
|
+
message: this.$t(`刷新完成,共{num}条数据`, {
|
|
185
|
+
num: response.data.data,
|
|
186
|
+
}),
|
|
187
|
+
})
|
|
188
|
+
},
|
|
189
|
+
(error) => {
|
|
190
|
+
loading.close()
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
}
|
|
105
196
|
</script>
|
|
@@ -1,52 +1,68 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div style="height: 100
|
|
3
|
-
<el-button class="filter-item" type="success" @click="save" size="mini">{{
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<div style="height: 100%">
|
|
3
|
+
<el-button class="filter-item" type="success" @click="save" size="mini">{{
|
|
4
|
+
$t('保存')
|
|
5
|
+
}}</el-button>
|
|
6
|
+
<hd-tree
|
|
7
|
+
:data="hdTree"
|
|
8
|
+
v-loading="listLoading"
|
|
9
|
+
node-key="id"
|
|
10
|
+
ref="menuTree"
|
|
11
|
+
show-checkbox
|
|
12
|
+
style="height: calc(100% - 30px)"
|
|
13
|
+
></hd-tree>
|
|
6
14
|
</div>
|
|
7
15
|
</template>
|
|
8
|
-
<script>
|
|
9
16
|
|
|
17
|
+
<script>
|
|
10
18
|
export default {
|
|
11
19
|
components: {},
|
|
12
20
|
name: 'menuSearch',
|
|
13
|
-
data: function() {
|
|
21
|
+
data: function () {
|
|
14
22
|
return {
|
|
15
23
|
hdTree: [],
|
|
16
|
-
listLoading: false
|
|
24
|
+
listLoading: false,
|
|
17
25
|
}
|
|
18
26
|
},
|
|
19
|
-
mounted() {
|
|
27
|
+
mounted() {
|
|
28
|
+
// 因为外层通过v-if控制
|
|
20
29
|
this.doQuery()
|
|
21
30
|
},
|
|
22
31
|
methods: {
|
|
23
32
|
doQuery() {
|
|
24
33
|
this.listLoading = true
|
|
25
34
|
|
|
26
|
-
this.$http
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
this.$http
|
|
36
|
+
.get(`/webresources/login/privilege/SysLogConfigVue/menuConfig`)
|
|
37
|
+
.then((response) => {
|
|
38
|
+
const data = response.data
|
|
39
|
+
this.hdTree = data
|
|
40
|
+
this.listLoading = false
|
|
41
|
+
})
|
|
31
42
|
},
|
|
32
43
|
save() {
|
|
33
44
|
const os = this.$refs.menuTree.getCheckedNodes()
|
|
34
45
|
let privilegeIds = ''
|
|
35
46
|
for (let i = 0; i < os.length; i++) {
|
|
36
|
-
if (os[i].id == -1) {
|
|
47
|
+
if (os[i].id == -1) {
|
|
48
|
+
// 总根节点不处理
|
|
37
49
|
continue
|
|
38
50
|
}
|
|
39
51
|
privilegeIds = privilegeIds + os[i].id + ','
|
|
40
52
|
}
|
|
41
|
-
this.$http
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
type: data.code == '-1' ? 'error' : 'success',
|
|
45
|
-
message: data.message
|
|
53
|
+
this.$http
|
|
54
|
+
.post(`/webresources/login/privilege/SysLogConfigVue/saveMenuConfig`, {
|
|
55
|
+
privilegeIds: privilegeIds,
|
|
46
56
|
})
|
|
47
|
-
|
|
48
|
-
|
|
57
|
+
.then((response) => {
|
|
58
|
+
const data = response.data
|
|
59
|
+
this.$message({
|
|
60
|
+
type: data.code == '-1' ? 'error' : 'success',
|
|
61
|
+
message: data.message,
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
},
|
|
49
65
|
},
|
|
50
|
-
watch: {}
|
|
66
|
+
watch: {},
|
|
51
67
|
}
|
|
52
68
|
</script>
|