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.
Files changed (147) hide show
  1. package/dist/assets/index.9c127719.css +1 -0
  2. package/dist/hd-idevvue3.mjs +3521 -3305
  3. package/dist/hd-idevvue3.umd.js +29 -29
  4. package/npminstall-debug.log +2 -10
  5. package/package.json +3 -1
  6. package/pnpm-lock.yaml +37 -4
  7. package/src/App.vue +11 -15
  8. package/src/assets/sound/notify.wav +0 -0
  9. package/src/demo/demo.vue +9 -10
  10. package/src/demo/dropdemo.vue +42 -43
  11. package/src/demo/extsets.vue +140 -39
  12. package/src/demo/formedit.vue +157 -145
  13. package/src/demo/hightquery.vue +263 -66
  14. package/src/demo/inlineedit.vue +129 -35
  15. package/src/demo/selfdrop.vue +32 -15
  16. package/src/directive/el-dragDialog/drag.js +13 -13
  17. package/src/directive/el-dragDialog/index.js +13 -13
  18. package/src/errorLog.js +3 -3
  19. package/src/hdcom/BigGrid.js +54 -48
  20. package/src/hdcom/BillShow.vue +84 -63
  21. package/src/hdcom/BillUpload.vue +144 -86
  22. package/src/hdcom/BtnRight.vue +26 -23
  23. package/src/hdcom/ErrHint.vue +36 -24
  24. package/src/hdcom/ExtendColumn.vue +97 -90
  25. package/src/hdcom/ExtendCommon.js +24 -13
  26. package/src/hdcom/ExtendForm.vue +107 -80
  27. package/src/hdcom/FacePicUpload.vue +59 -50
  28. package/src/hdcom/FaceRecTest.vue +87 -77
  29. package/src/hdcom/GridChart.vue +175 -162
  30. package/src/hdcom/GridExField.vue +328 -234
  31. package/src/hdcom/GridShow.vue +89 -39
  32. package/src/hdcom/HdAside.vue +192 -145
  33. package/src/hdcom/HdBtn.vue +44 -32
  34. package/src/hdcom/HdButton.vue +141 -117
  35. package/src/hdcom/HdComFaceRec.vue +80 -32
  36. package/src/hdcom/HdComGrid.vue +329 -229
  37. package/src/hdcom/HdComQuery.vue +179 -90
  38. package/src/hdcom/HdComQueryDetail.vue +159 -115
  39. package/src/hdcom/HdComSortDetail.vue +136 -130
  40. package/src/hdcom/HdDatePicker.vue +32 -16
  41. package/src/hdcom/HdDialog.vue +62 -44
  42. package/src/hdcom/HdDrop.vue +163 -138
  43. package/src/hdcom/HdFileUpload.vue +138 -119
  44. package/src/hdcom/HdFilterBox.vue +62 -62
  45. package/src/hdcom/HdFooter.vue +152 -119
  46. package/src/hdcom/HdForm.vue +276 -203
  47. package/src/hdcom/HdFormBtn.vue +81 -39
  48. package/src/hdcom/HdFormItem.vue +14 -10
  49. package/src/hdcom/HdGrid.vue +353 -156
  50. package/src/hdcom/HdGridEditBtn.vue +34 -20
  51. package/src/hdcom/HdGridExt.js +78 -47
  52. package/src/hdcom/HdGridSel.vue +227 -193
  53. package/src/hdcom/HdHeader.vue +149 -117
  54. package/src/hdcom/HdHotKey.vue +70 -67
  55. package/src/hdcom/HdInputHint.vue +40 -36
  56. package/src/hdcom/HdMain.vue +25 -27
  57. package/src/hdcom/HdMessage.vue +180 -171
  58. package/src/hdcom/HdNum.vue +67 -57
  59. package/src/hdcom/HdPopSel.vue +46 -24
  60. package/src/hdcom/HdRightMenu.vue +63 -61
  61. package/src/hdcom/HdSel/SelGridFieldcod.vue +46 -28
  62. package/src/hdcom/HdTableColumn.vue +156 -109
  63. package/src/hdcom/HdTempSave.vue +138 -116
  64. package/src/hdcom/HdTree.vue +89 -72
  65. package/src/hdcom/HdTreeTable/eval.js +8 -3
  66. package/src/hdcom/HdTreeTable/index.vue +229 -174
  67. package/src/hdcom/ImportExcel.vue +69 -34
  68. package/src/hdcom/index.js +39 -44
  69. package/src/idev.common.js +54 -47
  70. package/src/index.js +3 -6
  71. package/src/utils/HdQuery.js +25 -14
  72. package/src/utils/comutils.js +50 -28
  73. package/src/utils/gogocodeTransfer.js +59 -0
  74. package/src/utils/utils.js +30 -19
  75. package/src/vendor/Blob.js +187 -179
  76. package/src/vendor/Export2Excel.js +231 -220
  77. package/src/vendor/Export2Zip.js +25 -22
  78. package/src/views/layout/AppMain.vue +34 -32
  79. package/src/views/layout/HdLayout.vue +64 -52
  80. package/src/views/layout/header/ElasticSearch.vue +196 -159
  81. package/src/views/layout/header/HZRecorder.js +163 -135
  82. package/src/views/layout/header/HeaderSearch.vue +165 -145
  83. package/src/views/layout/header/Levelbar.vue +55 -49
  84. package/src/views/layout/header/MainHeader.vue +233 -189
  85. package/src/views/layout/header/Navbar.vue +74 -78
  86. package/src/views/layout/header/ScrollPane.vue +103 -81
  87. package/src/views/layout/header/TagsView.vue +169 -164
  88. package/src/views/layout/header/VocRec.vue +86 -78
  89. package/src/views/layout/header/changepswform.vue +98 -64
  90. package/src/views/layout/index.js +5 -7
  91. package/src/views/layout/menu/Hamburger.vue +63 -45
  92. package/src/views/layout/menu/HdMenu.vue +155 -118
  93. package/src/views/layout/menu/index.vue +21 -19
  94. package/src/views/privilege/commsg/commsg.vue +115 -41
  95. package/src/views/privilege/commsg/commsgOrgn.vue +40 -31
  96. package/src/views/privilege/commsg/commsgRole.vue +180 -109
  97. package/src/views/privilege/commsg/commsgform.vue +125 -101
  98. package/src/views/privilege/commsg/commsgiframe.vue +30 -23
  99. package/src/views/privilege/commsg/commsgto.vue +163 -84
  100. package/src/views/privilege/commsg/commsgtoform.vue +64 -58
  101. package/src/views/privilege/commsg/commsgtrans.vue +187 -115
  102. package/src/views/privilege/exfield/comexcolumn.vue +133 -43
  103. package/src/views/privilege/exfield/comexcolumnform.vue +85 -58
  104. package/src/views/privilege/exfield/comexfield.vue +15 -17
  105. package/src/views/privilege/exfield/comexfieldform.vue +71 -53
  106. package/src/views/privilege/exfield/comexfieldsub.vue +137 -46
  107. package/src/views/privilege/index.js +19 -20
  108. package/src/views/privilege/menu/comMenu.vue +49 -41
  109. package/src/views/privilege/menu/menu.vue +166 -49
  110. package/src/views/privilege/menu/menuinfo.vue +41 -34
  111. package/src/views/privilege/menu/rolelist.vue +78 -33
  112. package/src/views/privilege/menu/userlist.vue +76 -33
  113. package/src/views/privilege/mobile/authmobileupdate.vue +119 -43
  114. package/src/views/privilege/mobile/authmobileupdateform.vue +76 -46
  115. package/src/views/privilege/orgDept/authOrgn.vue +157 -65
  116. package/src/views/privilege/orgDept/authorgnform.vue +50 -38
  117. package/src/views/privilege/orgDept/orgDept.vue +38 -37
  118. package/src/views/privilege/orgDept/orgTree.vue +99 -88
  119. package/src/views/privilege/orgDept/orgnselect.vue +132 -111
  120. package/src/views/privilege/personDept/authuser.vue +197 -91
  121. package/src/views/privilege/personDept/authuserform.vue +123 -71
  122. package/src/views/privilege/personDept/facerec.vue +128 -83
  123. package/src/views/privilege/personDept/orgncascader.vue +134 -115
  124. package/src/views/privilege/personDept/personDept.vue +9 -7
  125. package/src/views/privilege/quartz/comquartzjob.vue +123 -38
  126. package/src/views/privilege/quartz/comquartzjobform.vue +67 -51
  127. package/src/views/privilege/quartz/comquartzlog.vue +116 -32
  128. package/src/views/privilege/role/btnRole.vue +123 -67
  129. package/src/views/privilege/role/menuRole.vue +65 -45
  130. package/src/views/privilege/role/orgnRole.vue +63 -41
  131. package/src/views/privilege/role/role.vue +26 -9
  132. package/src/views/privilege/role/rolelist.vue +114 -45
  133. package/src/views/privilege/role/roleselect.vue +34 -17
  134. package/src/views/privilege/search/comsearch.vue +164 -73
  135. package/src/views/privilege/search/menu.vue +38 -22
  136. package/src/views/privilege/syscode/syscode.vue +157 -69
  137. package/src/views/privilege/syscode/sysfield.vue +96 -43
  138. package/src/views/privilege/syscode/sysfieldframe.vue +30 -30
  139. package/src/views/privilege/syslog/menulog.vue +38 -22
  140. package/src/views/privilege/syslog/syslog.vue +145 -78
  141. package/src/views/privilege/syslog/syslogconfig.vue +91 -24
  142. package/src/views/privilege/syslog/syslogform.vue +45 -43
  143. package/src/views/privilege/syslog/syslogframe.vue +26 -26
  144. package/src/views/privilege/userRole/userRole.vue +187 -89
  145. package/vite.config.js +7 -0
  146. package/dist/assets/index.774ef40e.css +0 -1
  147. package/src/views/privilege.zip +0 -0
@@ -1,78 +1,90 @@
1
1
  <template>
2
- <div :class="[{hideSidebar:!sidebar.opened}, $store.state.user.skin]" class="hd-layout app-wrapper"
3
- v-if="!onlyContent">
4
- <main-header class="hd-header mainHeader" v-if="$store.state.app.headerShow!=false"></main-header>
2
+ <div
3
+ :class="[{ hideSidebar: !sidebar.opened }, $store.state.user.skin]"
4
+ class="hd-layout app-wrapper"
5
+ v-if="!onlyContent"
6
+ >
7
+ <main-header
8
+ class="hd-header mainHeader"
9
+ v-if="$store.state.app.headerShow != false"
10
+ ></main-header>
5
11
  <div class="hd-content">
6
12
  <hdmenu class="hd-menu sidebar-container"></hdmenu>
7
13
  <div class="hd-main main-container">
8
14
  <Navbar></Navbar>
9
- <AppMain style="flex:1"></AppMain>
15
+ <AppMain style="flex: 1"></AppMain>
10
16
  <slot></slot>
11
17
  </div>
12
18
  </div>
13
19
  </div>
14
- <app-main :class="[{hideSidebar:!sidebar.opened}, $store.state.user.skin]" class="app-wrapper" v-else></app-main>
20
+ <app-main
21
+ :class="[{ hideSidebar: !sidebar.opened }, $store.state.user.skin]"
22
+ class="app-wrapper"
23
+ v-else
24
+ ></app-main>
15
25
  </template>
16
26
 
17
27
  <script>
18
- import Navbar from './header/Navbar'
19
- import TagsView from './header/TagsView'
20
- import MainHeader from './header/MainHeader'
21
- import AppMain from './AppMain'
22
- import hdmenu from './menu'
28
+ import Navbar from './header/Navbar'
29
+ import TagsView from './header/TagsView'
30
+ import MainHeader from './header/MainHeader'
31
+ import AppMain from './AppMain'
32
+ import hdmenu from './menu'
23
33
 
24
- export default {
25
- name: 'layout',
26
- components: {
27
- MainHeader,
28
- Navbar,
29
- hdmenu,
30
- AppMain,
31
- TagsView,
34
+ export default {
35
+ name: 'layout',
36
+ components: {
37
+ MainHeader,
38
+ Navbar,
39
+ hdmenu,
40
+ AppMain,
41
+ TagsView,
42
+ },
43
+ computed: {
44
+ sidebar() {
45
+ return this.$store.state.app.sidebar
32
46
  },
33
- computed: {
34
- sidebar() {
35
- return this.$store.state.app.sidebar
47
+ onlyContent() {
48
+ return this.$route.query.onlycontent == 1
49
+ },
50
+ },
51
+ watch: {
52
+ '$store.state.user.skin': {
53
+ //弹窗的因为和#app平级,无法换肤
54
+ handler: function (newVal, oldVal) {
55
+ document.getElementsByTagName('body')[0].className = 'body-' + newVal
56
+ this.$emit('chgTheme', newVal)
36
57
  },
37
- onlyContent() {
38
- return this.$route.query.onlycontent == 1
39
- }
58
+ immediate: true,
40
59
  },
41
- watch: {
42
- '$store.state.user.skin': {//弹窗的因为和#app平级,无法换肤
43
- handler: function (newVal, oldVal) {
44
- document.getElementsByTagName('body')[0].className = 'body-' + newVal;
45
- this.$emit("chgTheme", newVal)
46
- },
47
- immediate: true
48
- }
49
- }
50
- }
60
+ },
61
+ }
51
62
  </script>
52
- <style rel="stylesheet/scss" lang="scss" scoped>
53
- .hd-layout {
63
+
64
+ <style lang="scss" rel="stylesheet/scss" scoped>
65
+ .hd-layout {
66
+ display: flex;
67
+ flex-direction: column;
68
+
69
+ .hd-header {
70
+ height: 52px;
71
+ width: 100%;
72
+ }
73
+
74
+ .hd-content {
75
+ flex: 1;
54
76
  display: flex;
55
- flex-direction: column;
77
+ flex-direction: row;
56
78
 
57
- .hd-header {
58
- height: 52px;
59
- width: 100%
79
+ .hd-menu {
80
+ width: 50px;
60
81
  }
61
82
 
62
- .hd-content {
83
+ .hd-main {
63
84
  flex: 1;
64
85
  display: flex;
65
- flex-direction: row;
66
-
67
- .hd-menu {
68
- width: 50px
69
- }
70
-
71
- .hd-main {
72
- flex: 1;
73
- display: flex;
74
- flex-direction: column;
75
- }
86
+ flex-direction: column;
76
87
  }
77
88
  }
89
+ }
78
90
  </style>
@@ -1,9 +1,16 @@
1
1
  <template>
2
- <div :class="{'show':show}" class="header-search">
3
- <svg @click="click" class="search-icon screenfull-svg" height="32" viewBox="-10 -10 150 150"
4
- width="32" xmlns="http://www.w3.org/2000/svg">
2
+ <div :class="{ show: show }" class="header-search">
3
+ <svg
4
+ @click="click"
5
+ class="search-icon screenfull-svg"
6
+ height="32"
7
+ viewBox="-10 -10 150 150"
8
+ width="32"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ >
5
11
  <path
6
- d="M124.884 109.812L94.256 79.166c-.357-.357-.757-.629-1.129-.914a50.366 50.366 0 0 0 8.186-27.59C101.327 22.689 78.656 0 50.67 0 22.685 0 0 22.688 0 50.663c0 27.989 22.685 50.663 50.656 50.663 10.186 0 19.643-3.03 27.6-8.201.286.385.557.771.9 1.114l30.628 30.632a10.633 10.633 0 0 0 7.543 3.129c2.728 0 5.457-1.043 7.543-3.115 4.171-4.157 4.171-10.915.014-15.073M50.671 85.338C31.557 85.338 16 69.78 16 50.663c0-19.102 15.557-34.661 34.67-34.661 19.115 0 34.657 15.559 34.657 34.675 0 19.102-15.557 34.661-34.656 34.661"/>
12
+ d="M124.884 109.812L94.256 79.166c-.357-.357-.757-.629-1.129-.914a50.366 50.366 0 0 0 8.186-27.59C101.327 22.689 78.656 0 50.67 0 22.685 0 0 22.688 0 50.663c0 27.989 22.685 50.663 50.656 50.663 10.186 0 19.643-3.03 27.6-8.201.286.385.557.771.9 1.114l30.628 30.632a10.633 10.633 0 0 0 7.543 3.129c2.728 0 5.457-1.043 7.543-3.115 4.171-4.157 4.171-10.915.014-15.073M50.671 85.338C31.557 85.338 16 69.78 16 50.663c0-19.102 15.557-34.661 34.67-34.661 19.115 0 34.657 15.559 34.657 34.675 0 19.102-15.557 34.661-34.656 34.661"
13
+ />
7
14
  </svg>
8
15
  <el-select
9
16
  :placeholder="$t('菜单查询')"
@@ -16,152 +23,182 @@
16
23
  remote
17
24
  v-model="search"
18
25
  >
19
- <el-option-group :key="$t('检索菜单')" :label="$t('检索菜单')" v-if="options1.length>0">
20
- <el-option :key="index" :label="item.title.join(' > ')" :value="item" v-for="item,index in options1"/>
26
+ <el-option-group
27
+ :key="$t('检索菜单')"
28
+ :label="$t('检索菜单')"
29
+ v-if="options1.length > 0"
30
+ >
31
+ <el-option
32
+ :key="index"
33
+ :label="item.title.join(' > ')"
34
+ :value="item"
35
+ v-for="(item, index) in options1"
36
+ />
21
37
  </el-option-group>
22
- <el-option-group :key="$t('更多结果')" :label="$t('更多结果')" v-if="options2.length>0">
23
- <el-option :key="index" :label="item.text" :value="item" v-for="item,index in options2"/>
38
+ <el-option-group
39
+ :key="$t('更多结果')"
40
+ :label="$t('更多结果')"
41
+ v-if="options2.length > 0"
42
+ >
43
+ <el-option
44
+ :key="index"
45
+ :label="item.text"
46
+ :value="item"
47
+ v-for="(item, index) in options2"
48
+ />
24
49
  </el-option-group>
25
50
  </el-select>
26
51
  </div>
27
52
  </template>
28
53
 
29
54
  <script>
30
- import Fuse from 'fuse.js'
31
- import path from 'path'
55
+ import Fuse from 'fuse.js'
56
+ import path from 'path'
32
57
 
33
- export default {
34
- name: 'ElasticSearch',
35
- data() {
36
- return {
37
- search: '',
38
- options1: [],
39
- options2: [],
40
- searchPool: [],
41
- show: false,
42
- fuse: undefined
43
- }
58
+ export default {
59
+ name: 'ElasticSearch',
60
+ data() {
61
+ return {
62
+ search: '',
63
+ options1: [],
64
+ options2: [],
65
+ searchPool: [],
66
+ show: false,
67
+ fuse: undefined,
68
+ }
69
+ },
70
+ computed: {
71
+ routes() {
72
+ return this.$store.state.permission.hdMenu
73
+ },
74
+ lang() {
75
+ return this.$store.getters.language
76
+ },
77
+ },
78
+ watch: {
79
+ lang() {
80
+ this.searchPool = this.generateRoutes(this.routes)
81
+ },
82
+ routes() {
83
+ this.searchPool = this.generateRoutes(this.routes)
44
84
  },
45
- computed: {
46
- routes() {
47
- return this.$store.state.permission.hdMenu;
48
- },
49
- lang() {
50
- return this.$store.getters.language
85
+ searchPool(list) {
86
+ this.initFuse(list)
87
+ },
88
+ show(value) {
89
+ if (value) {
90
+ document.body.addEventListener('click', this.close)
91
+ } else {
92
+ document.body.removeEventListener('click', this.close)
51
93
  }
52
94
  },
53
- watch: {
54
- lang() {
55
- this.searchPool = this.generateRoutes(this.routes)
56
- },
57
- routes() {
58
- this.searchPool = this.generateRoutes(this.routes)
59
- },
60
- searchPool(list) {
61
- this.initFuse(list)
62
- },
63
- show(value) {
64
- if (value) {
65
- document.body.addEventListener('click', this.close)
66
- } else {
67
- document.body.removeEventListener('click', this.close)
68
- }
95
+ },
96
+ mounted() {
97
+ this.searchPool = this.generateRoutes(this.routes)
98
+ },
99
+ methods: {
100
+ click() {
101
+ this.show = !this.show
102
+ if (this.show) {
103
+ this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
69
104
  }
70
105
  },
71
- mounted() {
72
- this.searchPool = this.generateRoutes(this.routes)
106
+ close() {
107
+ this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
108
+ this.options1 = []
109
+ this.options2 = []
110
+ this.show = false
73
111
  },
74
- methods: {
75
- click() {
76
- this.show = !this.show
77
- if (this.show) {
78
- this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.focus()
79
- }
80
- },
81
- close() {
82
- this.$refs.headerSearchSelect && this.$refs.headerSearchSelect.blur()
83
- this.options1 = [];
84
- this.options2 = [];
112
+ change(val) {
113
+ this.$router.push(val.path)
114
+ this.search = ''
115
+ this.options1 = []
116
+ this.options2 = []
117
+ this.$nextTick(() => {
85
118
  this.show = false
86
- },
87
- change(val) {
88
- this.$router.push(val.path)
89
- this.search = ''
90
- this.options1 = [];
91
- this.options2 = [];
92
- this.$nextTick(() => {
93
- this.show = false
94
- })
95
- },
96
- initFuse(list) {
97
- this.fuse = new Fuse(list, {
98
- shouldSort: true,
99
- threshold: 0.4,
100
- location: 0,
101
- distance: 100,
102
- maxPatternLength: 32,
103
- minMatchCharLength: 1,
104
- keys: [{
119
+ })
120
+ },
121
+ initFuse(list) {
122
+ this.fuse = new Fuse(list, {
123
+ shouldSort: true,
124
+ threshold: 0.4,
125
+ location: 0,
126
+ distance: 100,
127
+ maxPatternLength: 32,
128
+ minMatchCharLength: 1,
129
+ keys: [
130
+ {
105
131
  name: 'title',
106
- weight: 0.7
107
- }, {
132
+ weight: 0.7,
133
+ },
134
+ {
108
135
  name: 'path',
109
- weight: 0.3
110
- }]
111
- })
112
- },
113
- // Filter out the routes that can be displayed in the sidebar
114
- // And generate the internationalized title
115
- generateRoutes(routes, basePath = '/', prefixTitle = []) {
116
- let res = []
117
- for (const router of routes) {
118
- // skip hidden router
119
- if (router.hidden) {
120
- continue
121
- }
122
-
123
- const data = {
124
- path: path.resolve(basePath, router.path),
125
- title: [...prefixTitle]
126
- }
136
+ weight: 0.3,
137
+ },
138
+ ],
139
+ })
140
+ },
141
+ // Filter out the routes that can be displayed in the sidebar
142
+ // And generate the internationalized title
143
+ generateRoutes(routes, basePath = '/', prefixTitle = []) {
144
+ let res = []
145
+ for (const router of routes) {
146
+ // skip hidden router
147
+ if (router.hidden) {
148
+ continue
149
+ }
127
150
 
128
- if (router.meta && router.meta.title) {
129
- // generate internationalized title
130
- const i18ntitle = this.$i18n.locale == 'zh' ? router.meta.title : router.meta.enTitle;
151
+ const data = {
152
+ path: path.resolve(basePath, router.path),
153
+ title: [...prefixTitle],
154
+ }
131
155
 
132
- data.title = [...data.title, i18ntitle]
156
+ if (router.meta && router.meta.title) {
157
+ // generate internationalized title
158
+ const i18ntitle =
159
+ this.$i18n.locale == 'zh' ? router.meta.title : router.meta.enTitle
133
160
 
134
- if (router.redirect !== 'noredirect') {
135
- // only push the routes with title
136
- // special case: need to exclude parent router without redirect
137
- res.push(data)
138
- }
139
- }
161
+ data.title = [...data.title, i18ntitle]
140
162
 
141
- // recursive child routes
142
- if (router.children) {
143
- const tempRoutes = this.generateRoutes(router.children, data.path, data.title)
144
- if (tempRoutes.length >= 1) {
145
- res = [...res, ...tempRoutes]
146
- }
163
+ if (router.redirect !== 'noredirect') {
164
+ // only push the routes with title
165
+ // special case: need to exclude parent router without redirect
166
+ res.push(data)
147
167
  }
148
168
  }
149
169
 
150
- return res
151
- },
152
- querySearch(query) {
153
- if (query !== '') {
154
- this.options1 = this.fuse.search(query)
155
- } else {
156
- this.options1 = []
170
+ // recursive child routes
171
+ if (router.children) {
172
+ const tempRoutes = this.generateRoutes(
173
+ router.children,
174
+ data.path,
175
+ data.title
176
+ )
177
+ if (tempRoutes.length >= 1) {
178
+ res = [...res, ...tempRoutes]
179
+ }
157
180
  }
181
+ }
158
182
 
159
- if (this.$store.state.app.elsearch) {//
160
- this.options2 = [{text: this.$t('加载中...')}];
161
- this.$http.get(`/webresources/login/com/ComSearch/search?q=${query}&type=${this.$i18n.locale}`).then(response => {
183
+ return res
184
+ },
185
+ querySearch(query) {
186
+ if (query !== '') {
187
+ this.options1 = this.fuse.search(query)
188
+ } else {
189
+ this.options1 = []
190
+ }
162
191
 
163
- this.options2 = [];
164
- response.data.forEach(v => {
192
+ if (this.$store.state.app.elsearch) {
193
+ //
194
+ this.options2 = [{ text: this.$t('加载中...') }]
195
+ this.$http
196
+ .get(
197
+ `/webresources/login/com/ComSearch/search?q=${query}&type=${this.$i18n.locale}`
198
+ )
199
+ .then((response) => {
200
+ this.options2 = []
201
+ response.data.forEach((v) => {
165
202
  let t = v.menuPath.reverse().join('=>')
166
203
  if (this.$i18n.locale == 'en') {
167
204
  t = v.menuEnPath.reverse().join('=>')
@@ -169,57 +206,57 @@
169
206
 
170
207
  this.options2.push({
171
208
  path: '/' + v.menuUrl + '?q=' + query,
172
- text: t + '=>' + v.content
209
+ text: t + '=>' + v.content,
173
210
  })
174
211
  })
175
212
  })
176
- }
177
213
  }
178
- }
179
- }
214
+ },
215
+ },
216
+ }
180
217
  </script>
181
218
 
182
219
  <style lang="scss" scoped>
183
- .header-search {
184
- font-size: 0 !important;
220
+ .header-search {
221
+ font-size: 0 !important;
185
222
 
186
- .search-icon {
187
- font-size: 18px;
188
- vertical-align: middle;
189
- display: inline-block;
190
- cursor: pointer;
191
- fill: #e4e9ef;
192
- /* width: 20px;
223
+ .search-icon {
224
+ font-size: 18px;
225
+ vertical-align: middle;
226
+ display: inline-block;
227
+ cursor: pointer;
228
+ fill: #e4e9ef;
229
+ /* width: 20px;
193
230
  height: 20px;
194
231
  vertical-align: 10px;*/
195
- }
232
+ }
196
233
 
197
- .header-search-select {
198
- font-size: 18px;
199
- transition: width 0.2s;
200
- width: 0;
201
- overflow: hidden;
202
- background: transparent;
234
+ .header-search-select {
235
+ font-size: 18px;
236
+ transition: width 0.2s;
237
+ width: 0;
238
+ overflow: hidden;
239
+ background: transparent;
240
+ border-radius: 0;
241
+ display: inline-block;
242
+ vertical-align: middle;
243
+
244
+ :deep(.el-input__inner) {
203
245
  border-radius: 0;
204
- display: inline-block;
246
+ border: 0;
247
+ padding-left: 0;
248
+ padding-right: 0;
249
+ box-shadow: none !important;
250
+ border-bottom: 1px solid #d9d9d9;
205
251
  vertical-align: middle;
206
-
207
- :deep(.el-input__inner) {
208
- border-radius: 0;
209
- border: 0;
210
- padding-left: 0;
211
- padding-right: 0;
212
- box-shadow: none !important;
213
- border-bottom: 1px solid #d9d9d9;
214
- vertical-align: middle;
215
- }
216
252
  }
253
+ }
217
254
 
218
- &.show {
219
- .header-search-select {
220
- width: 150px;
221
- margin-left: 10px;
222
- }
255
+ &.show {
256
+ .header-search-select {
257
+ width: 150px;
258
+ margin-left: 10px;
223
259
  }
224
260
  }
261
+ }
225
262
  </style>