Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/hg-monitor-w…
…eb into master-500-dev
Showing
12 changed files
with
476 additions
and
61 deletions
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/treeSelectMenu/index.html
0 → 100644
1 | +<el-tree-select | ||
2 | + :filterable="filterable" | ||
3 | + :size="$global.elementConfig.size.input" | ||
4 | + node-key="nodeKey" | ||
5 | + :placeholder="placeholderText" | ||
6 | + :props="defaultProps" | ||
7 | + v-model="value" | ||
8 | + :data="data" | ||
9 | + @change="change" | ||
10 | + check-strictly | ||
11 | + :render-after-expand="false" | ||
12 | +> | ||
13 | + <template #default="{ node, data }"> | ||
14 | +<!-- //lsq 菜单类型,1:监控菜单,2:巡检菜单,3:个人工作台,4:系统菜单,5:跳转菜单,6:报表菜单 可以删除和编辑 2022-08-26--> | ||
15 | + <el-tag v-if="isTag" style="height: 18px;margin-right:6px;"> | ||
16 | + {{getTypeName(data.type)}}</el-tag> | ||
17 | + <span>{{ node.label }}</span> | ||
18 | + </template> | ||
19 | +</el-tree-select> |
hg-monitor-web-base/src/main/resources/static/vue3/src/components/common/treeSelectMenu/index.js
0 → 100644
1 | +/** | ||
2 | + * 下拉树组件 | ||
3 | + */ | ||
4 | +export default { | ||
5 | + name: 'treeSelect', | ||
6 | + template: '', | ||
7 | + components: {}, | ||
8 | + props: { | ||
9 | + | ||
10 | + // 选中的值 | ||
11 | + value: { | ||
12 | + type: String, | ||
13 | + default: '' | ||
14 | + }, | ||
15 | + // 数据 | ||
16 | + data: { | ||
17 | + type: Array, | ||
18 | + default: [] | ||
19 | + }, | ||
20 | + //显示的提示语 | ||
21 | + placeholderText:{ | ||
22 | + type: String, | ||
23 | + default: '请选择' | ||
24 | + }, | ||
25 | + //指定标签,子树节点 | ||
26 | + defaultProps:{ | ||
27 | + type:Object, | ||
28 | + default:{ | ||
29 | + children: 'subMenus', | ||
30 | + label: 'name', | ||
31 | + value: 'id' | ||
32 | + } | ||
33 | + }, | ||
34 | + //唯一标识 | ||
35 | + nodeKey:{ | ||
36 | + type: String, | ||
37 | + default: 'id' | ||
38 | + }, | ||
39 | + //是否有标签 | ||
40 | + isTag:{ | ||
41 | + type:Boolean, | ||
42 | + default:false | ||
43 | + }, | ||
44 | + //是否可搜索 | ||
45 | + filterable:{ | ||
46 | + type:Boolean, | ||
47 | + default:false | ||
48 | + } | ||
49 | + | ||
50 | + }, | ||
51 | + data() { | ||
52 | + return {} | ||
53 | + }, | ||
54 | + setup(props, {attrs, slots, emit}) { | ||
55 | + const {proxy} = Vue.getCurrentInstance(); | ||
56 | + let data=Vue.ref([]); | ||
57 | + let change=(val)=>{ | ||
58 | + emit("changeSelect",val) | ||
59 | + } | ||
60 | + //获取菜单类型 | ||
61 | + let getTypeName=(type)=>{ | ||
62 | + switch (type) { | ||
63 | + case 1: | ||
64 | + return '监控菜单'; | ||
65 | + case 2: | ||
66 | + return '巡检菜单'; | ||
67 | + case 3: | ||
68 | + return '个人工作台'; | ||
69 | + case 4: | ||
70 | + return '系统菜单'; | ||
71 | + case 5: | ||
72 | + return '跳转菜单'; | ||
73 | + case 6: | ||
74 | + return '报表菜单'; | ||
75 | + case 7: | ||
76 | + return '资产菜单'; | ||
77 | + default: | ||
78 | + return ''; | ||
79 | + } | ||
80 | + } | ||
81 | + let init=()=>{ | ||
82 | + //lsq 菜单树数据 2022-09-05 | ||
83 | + proxy.$http.get(`/api-user/menus/current`, {type: 1}, function (res) { | ||
84 | + if(res && res.data){ | ||
85 | + data.value = res.data; | ||
86 | + } | ||
87 | + }) | ||
88 | + } | ||
89 | + // 监听编辑状态 | ||
90 | + Vue.watch(() => props.value, (newValue, oldVlaue) => { | ||
91 | + // 编辑 | ||
92 | + }); | ||
93 | + // 挂载完 | ||
94 | + Vue.onMounted(() => { | ||
95 | + init() | ||
96 | + }) | ||
97 | + return { | ||
98 | + data, | ||
99 | + change, | ||
100 | + getTypeName, | ||
101 | + init | ||
102 | + } | ||
103 | + } | ||
104 | +} |
@@ -167,6 +167,12 @@ const routes = [{ | @@ -167,6 +167,12 @@ const routes = [{ | ||
167 | name: 'snapshotOverview', | 167 | name: 'snapshotOverview', |
168 | component: () => myImport('views/snapshotOverview/index') | 168 | component: () => myImport('views/snapshotOverview/index') |
169 | }, | 169 | }, |
170 | + //license | ||
171 | + { | ||
172 | + path: '/vue3/license', | ||
173 | + name: 'license', | ||
174 | + component: () => myImport('views/license/index') | ||
175 | + } | ||
170 | ]; | 176 | ]; |
171 | 177 | ||
172 | // hash模式: createWebHashHistory | 178 | // hash模式: createWebHashHistory |
@@ -103,21 +103,10 @@ | @@ -103,21 +103,10 @@ | ||
103 | 103 | ||
104 | 104 | ||
105 | <el-form-item label="父菜单" prop="menuPid" v-if="ajConfigFrom.type==0"> | 105 | <el-form-item label="父菜单" prop="menuPid" v-if="ajConfigFrom.type==0"> |
106 | - <el-select :reserve-keyword="false" | ||
107 | - :size="$global.elementConfig.size.input" | ||
108 | - allow-create | ||
109 | - default-first-option | ||
110 | - filterable | ||
111 | - placeholder="请选择" | ||
112 | - style="width: 100%;" v-model="ajConfigFrom.menuPid"> | ||
113 | - <el-option | ||
114 | - :disabled="item.disabled" | ||
115 | - :key="item.value" | ||
116 | - :label="item.label" | ||
117 | - :value="item.value" | ||
118 | - v-for="item in menuOptions"> | ||
119 | - </el-option> | ||
120 | - </el-select> | 106 | + <!--lsq 引入菜单树公共组件 2022-09-05--> |
107 | + <cm-tree-select-menu style="width: 80%" @changeSelect="dataFilter" :filterable="true" | ||
108 | + :value="ajConfigFrom.menuPid" :placeholderText="'请选择菜单'" :isTag="true"></cm-tree-select-menu> | ||
109 | + | ||
121 | </el-form-item> | 110 | </el-form-item> |
122 | 111 | ||
123 | <el-form-item label="菜单名称" prop="menuName" v-if="ajConfigFrom.type==0"> | 112 | <el-form-item label="菜单名称" prop="menuName" v-if="ajConfigFrom.type==0"> |
@@ -206,8 +206,6 @@ export default { | @@ -206,8 +206,6 @@ export default { | ||
206 | let radio = Vue.ref(0); | 206 | let radio = Vue.ref(0); |
207 | //下拉框 | 207 | //下拉框 |
208 | let options = Vue.ref([]); | 208 | let options = Vue.ref([]); |
209 | - //菜单下拉框 | ||
210 | - let menuOptions = Vue.ref([]); | ||
211 | let search = Vue.ref({ | 209 | let search = Vue.ref({ |
212 | keyword: '', | 210 | keyword: '', |
213 | type: '', | 211 | type: '', |
@@ -250,7 +248,6 @@ export default { | @@ -250,7 +248,6 @@ export default { | ||
250 | clearForm(); | 248 | clearForm(); |
251 | cacheVisible.value = true; | 249 | cacheVisible.value = true; |
252 | pageList(); | 250 | pageList(); |
253 | - menuList(); | ||
254 | 251 | ||
255 | } | 252 | } |
256 | //新增或修改aj配置信息 | 253 | //新增或修改aj配置信息 |
@@ -329,7 +326,6 @@ export default { | @@ -329,7 +326,6 @@ export default { | ||
329 | cacheVisible.value = true; | 326 | cacheVisible.value = true; |
330 | disabled.value = true; | 327 | disabled.value = true; |
331 | pageList(); | 328 | pageList(); |
332 | - menuList(); | ||
333 | } | 329 | } |
334 | 330 | ||
335 | //预览 | 331 | //预览 |
@@ -357,21 +353,6 @@ export default { | @@ -357,21 +353,6 @@ export default { | ||
357 | }) | 353 | }) |
358 | } | 354 | } |
359 | 355 | ||
360 | - //菜单 | ||
361 | - let menuList = () => { | ||
362 | - proxy.$http.get(`/api-user/menus/findAlls`, null, function (res) { | ||
363 | - if (res && res.count > 0) { | ||
364 | - let params = res.data; | ||
365 | - params.forEach(function (e) { | ||
366 | - let menu = {} | ||
367 | - menu.label = e.name; | ||
368 | - menu.value = e.id; | ||
369 | - menuOptions.value.push(menu) | ||
370 | - }); | ||
371 | - } | ||
372 | - }) | ||
373 | - | ||
374 | - } | ||
375 | //AJ设计登录 | 356 | //AJ设计登录 |
376 | let handleView = () => { | 357 | let handleView = () => { |
377 | window.open(sessionStorage.getItem("ajWeb") + '/#/login?access_token=' + localStorage.getItem("access_token")); | 358 | window.open(sessionStorage.getItem("ajWeb") + '/#/login?access_token=' + localStorage.getItem("access_token")); |
@@ -456,7 +437,10 @@ export default { | @@ -456,7 +437,10 @@ export default { | ||
456 | ddicOS.value = res.data; | 437 | ddicOS.value = res.data; |
457 | } | 438 | } |
458 | }); | 439 | }); |
459 | - | 440 | + //lsq 菜单树change事件 |
441 | + let dataFilter = (val) => { | ||
442 | + ajConfigFrom.value.menuPid = val; | ||
443 | + } | ||
460 | return { | 444 | return { |
461 | ddicProvider, | 445 | ddicProvider, |
462 | ddicOS, | 446 | ddicOS, |
@@ -484,8 +468,6 @@ export default { | @@ -484,8 +468,6 @@ export default { | ||
484 | pageList, | 468 | pageList, |
485 | radio, | 469 | radio, |
486 | options, | 470 | options, |
487 | - menuList, | ||
488 | - menuOptions, | ||
489 | getResType, | 471 | getResType, |
490 | configs, | 472 | configs, |
491 | typeOptions, | 473 | typeOptions, |
@@ -494,7 +476,8 @@ export default { | @@ -494,7 +476,8 @@ export default { | ||
494 | butColumns, | 476 | butColumns, |
495 | detailColumns, | 477 | detailColumns, |
496 | couponSelected, | 478 | couponSelected, |
497 | - disabled | 479 | + disabled, |
480 | + dataFilter | ||
498 | } | 481 | } |
499 | } | 482 | } |
500 | 483 |
1 | +<div :style="{'height':height+'px','max-height':height+'px','background-color':'#fff'}" class="container"> | ||
2 | + <div :style="{'min-height':height+'px','max-height':height+'px','height':'100%','padding-top':'3px'}" | ||
3 | + class="cm-card"> | ||
4 | + <div class="search" > | ||
5 | + <div class="condition" style="width: 100%;justify-content: flex-end;"> | ||
6 | + <el-form-item> | ||
7 | + <el-upload | ||
8 | + :auto-upload="true" | ||
9 | + :before-upload="beforeAvatarUpload" | ||
10 | + :http-request="getFile" | ||
11 | + :multiple="false" | ||
12 | + :show-file-list="false" | ||
13 | + class="upload-demo-license"> | ||
14 | + <el-button size="mini" type="primary">导入</el-button> | ||
15 | + </el-upload> | ||
16 | + </el-form-item> | ||
17 | + </div> | ||
18 | + </div> | ||
19 | + <div class="search-table"> | ||
20 | + <el-row> | ||
21 | + <el-col :span="24" class="license-detail"> | ||
22 | + <el-descriptions title="license文件信息" :column="3" border> | ||
23 | + | ||
24 | + <el-descriptions-item label="授权状态" label-align="right" align="center"> | ||
25 | + 正常 | ||
26 | + </el-descriptions-item> | ||
27 | + <el-descriptions-item label="授权时间" label-align="right" align="center"> | ||
28 | + 2022-08-23 | ||
29 | + </el-descriptions-item> | ||
30 | + <el-descriptions-item label="剩余" label-align="right" align="center"> | ||
31 | + <el-tag size="small">2天</el-tag> | ||
32 | + </el-descriptions-item> | ||
33 | + </el-descriptions> | ||
34 | + </el-col> | ||
35 | + </el-row> | ||
36 | + <el-row> | ||
37 | + <el-col :span="24" style="text-align: left;padding: 10px 0;font-size: 16px;font-weight: bold;">授权详情</el-col> | ||
38 | + </el-row> | ||
39 | + <cm-table-page :columns="tableData.columns" :dataList="tableData.dataList" | ||
40 | + :height="200" | ||
41 | + :loading="false" | ||
42 | + :showBorder="true" | ||
43 | + :showIndex="false" | ||
44 | + :showPage="false" | ||
45 | + :showSelection="false" | ||
46 | + :showTools="false" | ||
47 | + > | ||
48 | + <template #default="{row,prop,column}"> | ||
49 | + <div v-if="prop == 'resNum'"> | ||
50 | +<!-- <span class="" style="color:#1e9fff;text-decoration: underline;cursor: pointer;">{{row.resNum }}</span>--> | ||
51 | + <span :style="{'color':row.resNum>=1000?'red':''}">{{row.resNum}}</span> | ||
52 | + </div> | ||
53 | + <div v-else> | ||
54 | + {{row[prop]}} | ||
55 | + <el-tooltip | ||
56 | + effect="dark" | ||
57 | + placement="bottom" | ||
58 | + > | ||
59 | + <template #content> | ||
60 | + <div> | ||
61 | + <span>该协议写包含</span> | ||
62 | + <span style="word-break: break-all;">{{splitDetail(prop)}}</span> | ||
63 | + </div> | ||
64 | + </template> | ||
65 | + <i v-if="row[prop] && prop !='usage'" style="margin-left:6px;" class="el-icon-info"></i> | ||
66 | + </el-tooltip> | ||
67 | + </div> | ||
68 | + </template> | ||
69 | + </cm-table-page> | ||
70 | + </div> | ||
71 | + </div> | ||
72 | +</div> | ||
73 | + |
1 | +export default { | ||
2 | + name: 'license', | ||
3 | + template: '', | ||
4 | + components: { | ||
5 | + }, | ||
6 | + props: [], | ||
7 | + setup(props, {attrs, slots, emit}) { | ||
8 | + const {proxy} = Vue.getCurrentInstance(); | ||
9 | + let height = Vue.ref(window.innerHeight); | ||
10 | + //导入或者详细信息 | ||
11 | + let isExport=Vue.ref(false); | ||
12 | + //表格字段 | ||
13 | + let tableData = Vue.ref({ | ||
14 | + count: 0, | ||
15 | + dataList: [], | ||
16 | + columns: [ | ||
17 | + { | ||
18 | + prop: 'usage', | ||
19 | + label: '使用情况', | ||
20 | + sortable: true, | ||
21 | + align: 'center', | ||
22 | + width: '100' | ||
23 | + }, | ||
24 | + { | ||
25 | + prop: 'resNum', | ||
26 | + label: '资源数量', | ||
27 | + sortable: true, | ||
28 | + align: 'center', | ||
29 | + width: '100', | ||
30 | + }, | ||
31 | + { | ||
32 | + prop: 'protocolCate', | ||
33 | + label: '协议', | ||
34 | + align: 'center', | ||
35 | + columns:[] | ||
36 | + } | ||
37 | + ] | ||
38 | + }) | ||
39 | + | ||
40 | + // license分类详细协议 | ||
41 | + let licenseCateData=Vue.ref([ | ||
42 | + {license:'SSH',protocolCode:'SSH'}, | ||
43 | + {license:'SSH',protocolCode:'SSHPUBKEY'}, | ||
44 | + {license:'SSH',protocolCode:'SSHLocalShellPlugin'}, | ||
45 | + {license:'SSH',protocolCode:'LOCALSSH'}, | ||
46 | + {license:'SSH',protocolCode:'ShellCommandPlugin'}, | ||
47 | + {license:'SNMP',protocolCode:'SNMP'}, | ||
48 | + {license:'SNMP',protocolCode:'SNMP V3'}, | ||
49 | + {license:'SNMP',protocolCode:'SNMP TRAP'}, | ||
50 | + {license:'SDK',protocolCode:'SDK'}, | ||
51 | + {license:'SDK',protocolCode:'SDK'}, | ||
52 | + {license:'SDK',protocolCode:'SDK'}, | ||
53 | + {license:'DB',protocolCode:'JDBC'}, | ||
54 | + {license:'DB',protocolCode:'MONGODB'}, | ||
55 | + {license:'DB',protocolCode:'REDISX_CLI'}, | ||
56 | + {license:'JMX',protocolCode:'TOMCAT_JMX'}, | ||
57 | + {license:'JMX',protocolCode:'ZOOKEEPER_JMX'}, | ||
58 | + {license:'JMX',protocolCode:'KAFKA_JMX'}, | ||
59 | + {license:'SYSLOG',protocolCode:'SYSLOG'}, | ||
60 | + {license:'SYSLOG',protocolCode:'SYSLOGD'}, | ||
61 | + {license:'HTTP',protocolCode:'HTTP'}, | ||
62 | + {license:'HTTP',protocolCode:'HTTPS'}, | ||
63 | + {license:'HTTP',protocolCode:'HUAWEI_CLOUD'}, | ||
64 | + {license:'HTTP',protocolCode:'ALI_CLOUD'}, | ||
65 | + {license:'HTTP',protocolCode:'HTTP-电子税务局大屏'}, | ||
66 | + {license:'HTTP',protocolCode:'HTTP-阿里回迁云'}, | ||
67 | + {license:'HTTP',protocolCode:'tongwebHttp'}, | ||
68 | + {license:'HTTP',protocolCode:'QuantumPlugin'}, | ||
69 | + {license:'HTTP',protocolCode:'CollHuaweiE9000Plugin'}, | ||
70 | + {license:'HTTP',protocolCode:'CollHuaweiCloudStackPlugin'}, | ||
71 | + {license:'HTTP',protocolCode:'Coll360'}, | ||
72 | + {license:'HTTP',protocolCode:'Ezsonar'}, | ||
73 | + {license:'HTTP',protocolCode:'RongcuoLibraryPlugin'}, | ||
74 | + {license:'HTTP',protocolCode:'AnGuanPinTaiPlugin'}, | ||
75 | + {license:'HTTP',protocolCode:'nginxPlugin'}, | ||
76 | + {license:'IPMI',protocolCode:'IPMI'}, | ||
77 | + ]) | ||
78 | + | ||
79 | + //获取license分类下的字段 | ||
80 | + let cateColumn=Vue.ref([]); | ||
81 | + let getLicenseColumn=()=>{ | ||
82 | + cateColumn.value=[ | ||
83 | + { | ||
84 | + prop: 'SSH', | ||
85 | + label: 'SSH', | ||
86 | + sortable: true, | ||
87 | + align: 'center', | ||
88 | + }, | ||
89 | + { | ||
90 | + prop: 'SNMP', | ||
91 | + label: 'SNMP', | ||
92 | + sortable: true, | ||
93 | + align: 'center', | ||
94 | + }, | ||
95 | + { | ||
96 | + prop: 'SDK', | ||
97 | + label: 'SDK', | ||
98 | + sortable: true, | ||
99 | + align: 'center', | ||
100 | + }, | ||
101 | + { | ||
102 | + prop: 'DB', | ||
103 | + label: 'DB', | ||
104 | + sortable: true, | ||
105 | + align: 'center', | ||
106 | + }, | ||
107 | + { | ||
108 | + prop: 'JMX', | ||
109 | + label: 'JMX', | ||
110 | + sortable: true, | ||
111 | + align: 'center', | ||
112 | + }, | ||
113 | + { | ||
114 | + prop: 'SYSLOG', | ||
115 | + label: 'SYSLOG', | ||
116 | + sortable: true, | ||
117 | + align: 'center', | ||
118 | + }, | ||
119 | + { | ||
120 | + prop: 'HTTP', | ||
121 | + label: 'HTTP', | ||
122 | + sortable: true, | ||
123 | + align: 'center', | ||
124 | + }, | ||
125 | + { | ||
126 | + prop: 'IPMI', | ||
127 | + label: 'IPMI', | ||
128 | + sortable: true, | ||
129 | + align: 'center', | ||
130 | + } | ||
131 | + ] | ||
132 | + tableData.value.columns.map(item=>{ | ||
133 | + if(item.prop=='protocolCate'){ | ||
134 | + item.columns=cateColumn.value | ||
135 | + } | ||
136 | + }) | ||
137 | + } | ||
138 | + //给列表数据追加相关的详细协议 | ||
139 | + // 获取列表 | ||
140 | + let getDataList = () => { | ||
141 | + tableData.value.dataList = [ | ||
142 | + {usage:'授权数量',resNum:'2',SSH:'12'}, | ||
143 | + {usage:'剩余数量',resNum:'1000',SNMP:'1',HTTP:'23'}, | ||
144 | + ]; | ||
145 | + | ||
146 | + return | ||
147 | + | ||
148 | + let params = { | ||
149 | + page: search.value.page, | ||
150 | + limit: search.value.limit, | ||
151 | + } | ||
152 | + | ||
153 | + proxy.$http.list(`/license/list`, params, function (res) { | ||
154 | + if (res && res.object) { | ||
155 | + let dataList = res.object.content; | ||
156 | + let arr = []; | ||
157 | + dataList.map(item => { | ||
158 | + arr.push(item[0]) | ||
159 | + }) | ||
160 | + tableData.value.dataList = arr; | ||
161 | + tableData.value.count = parseInt(res.object.total); | ||
162 | + } else { | ||
163 | + tableData.value.dataList = []; | ||
164 | + tableData.value.count = 0; | ||
165 | + } | ||
166 | + }); | ||
167 | + } | ||
168 | + | ||
169 | + //拆分详细协议数组 | ||
170 | + let splitDetail=(propkey)=>{ | ||
171 | + let arr=[]; | ||
172 | + licenseCateData.value.map(v=>{ | ||
173 | + if(propkey==v.license){ | ||
174 | + arr.push(v.protocolCode) | ||
175 | + } | ||
176 | + }) | ||
177 | + let str=''; | ||
178 | + if(arr && arr.length>0){ | ||
179 | + str=arr.join(',') | ||
180 | + } | ||
181 | + return str; | ||
182 | + } | ||
183 | + | ||
184 | + // 下载license | ||
185 | + let handleDownLoad=(row)=>{ | ||
186 | + proxy.$global.confirm("确定下载license?", function () { | ||
187 | + proxy.$http.downloadFile("/api-web/export", row); | ||
188 | + | ||
189 | + }) | ||
190 | + } | ||
191 | + | ||
192 | + let beforeAvatarUpload = (file) => { | ||
193 | + const isJPG = file.type.indexOf('image/') != -1 | ||
194 | + if (!isJPG) { | ||
195 | + proxy.$global.showMsg('您上传的不是图片文件,请选择图片!', 'error'); | ||
196 | + } | ||
197 | + return isJPG | ||
198 | + } | ||
199 | + let getFile = (param) => { | ||
200 | + let fileObj = param.file | ||
201 | + let params = { | ||
202 | + file: fileObj, | ||
203 | + code: param.data | ||
204 | + } | ||
205 | + // 上传文件 | ||
206 | + proxy.$http.uploadFile("/api-u/sysConf/uploadFile", params, function (res) { | ||
207 | + if (res && res.success) { | ||
208 | + proxy.$global.showMsg("上传成功!"); | ||
209 | + } | ||
210 | + }) | ||
211 | + } | ||
212 | + //获取license详情 | ||
213 | + let getLicenseDetail=()=>{ | ||
214 | + let params={} | ||
215 | + proxy.$http.get(`/license/selectById`, params, function (res) { | ||
216 | + if (res && res.object) { | ||
217 | + let dataList = res.object.content; | ||
218 | + | ||
219 | + } | ||
220 | + }); | ||
221 | + } | ||
222 | + | ||
223 | + // 挂载完 | ||
224 | + Vue.onMounted(() => { | ||
225 | + getLicenseColumn(); | ||
226 | + getDataList(); | ||
227 | + }) | ||
228 | + | ||
229 | + | ||
230 | + return { | ||
231 | + isExport, | ||
232 | + beforeAvatarUpload, | ||
233 | + getFile, | ||
234 | + licenseCateData, | ||
235 | + getLicenseColumn, | ||
236 | + cateColumn, | ||
237 | + splitDetail, | ||
238 | + handleDownLoad, | ||
239 | + height, | ||
240 | + tableData, | ||
241 | + getDataList, | ||
242 | + } | ||
243 | + } | ||
244 | + | ||
245 | +} |
@@ -19,7 +19,8 @@ export default { | @@ -19,7 +19,8 @@ export default { | ||
19 | {name: "skin1", imageUrl: 'skin1-login-logo', imageUrlSkin: 'skin1-login-skin'}, | 19 | {name: "skin1", imageUrl: 'skin1-login-logo', imageUrlSkin: 'skin1-login-skin'}, |
20 | {name: "skin2", imageUrl: 'skin2-login-logo', imageUrlSkin: 'skin2-login-skin'}, | 20 | {name: "skin2", imageUrl: 'skin2-login-logo', imageUrlSkin: 'skin2-login-skin'}, |
21 | {name: "首页1", imageUrlIndex: 'home1-logo'}, | 21 | {name: "首页1", imageUrlIndex: 'home1-logo'}, |
22 | - {name: "首页2", imageUrlIndex: 'home2-logo'} | 22 | + {name: "首页2", imageUrlIndex: 'home2-logo'}, |
23 | + {name: "拓扑视图", imageUrlIndex: 'topology-logo'} | ||
23 | ]) | 24 | ]) |
24 | //上传完后的图片预览 | 25 | //上传完后的图片预览 |
25 | let imageUrl = Vue.ref(''); | 26 | let imageUrl = Vue.ref(''); |
@@ -262,6 +262,12 @@ const routes = [{ | @@ -262,6 +262,12 @@ const routes = [{ | ||
262 | name: 'snapshotOverview', | 262 | name: 'snapshotOverview', |
263 | component: () => myImport('views/snapshotOverview/index') | 263 | component: () => myImport('views/snapshotOverview/index') |
264 | }, | 264 | }, |
265 | + //license | ||
266 | + { | ||
267 | + path: '/vue3/license', | ||
268 | + name: 'license', | ||
269 | + component: () => myImport('views/license/index') | ||
270 | + } | ||
265 | ]; | 271 | ]; |
266 | 272 | ||
267 | // hash模式: createWebHashHistory | 273 | // hash模式: createWebHashHistory |
@@ -152,10 +152,8 @@ | @@ -152,10 +152,8 @@ | ||
152 | </div> | 152 | </div> |
153 | <div style="padding: 3px 10px 3px 39px" v-if="!isAdd "> | 153 | <div style="padding: 3px 10px 3px 39px" v-if="!isAdd "> |
154 | <span class="saab"> 菜单:</span> | 154 | <span class="saab"> 菜单:</span> |
155 | - <el-select :size="$global.elementConfig.size.input" @change="dataFilter" filterable | ||
156 | - placeholder="请选择菜单" style="width: 80%" v-model="form.addFirstPId"> | ||
157 | - <el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in firstMenu"/> | ||
158 | - </el-select> | 155 | + <cm-tree-select-menu style="width: 80%" :size="$global.elementConfig.size.input" @changeSelect="dataFilter" |
156 | + :value="form.addFirstPId" :placeholderText="'请选择菜单'" :isTag="true"></cm-tree-select-menu> | ||
159 | </div> | 157 | </div> |
160 | <div style="padding: 3px 10px;" v-if="!isAdd "> | 158 | <div style="padding: 3px 10px;" v-if="!isAdd "> |
161 | <span class="saab"> 场景分类:</span> | 159 | <span class="saab"> 场景分类:</span> |
@@ -159,7 +159,7 @@ export default { | @@ -159,7 +159,7 @@ export default { | ||
159 | let countFirst = Vue.ref(0); | 159 | let countFirst = Vue.ref(0); |
160 | 160 | ||
161 | let form = Vue.ref({ | 161 | let form = Vue.ref({ |
162 | - addFirstPId: '', | 162 | + addFirstPId: '100130900', |
163 | parentId: '', | 163 | parentId: '', |
164 | parentName: '', | 164 | parentName: '', |
165 | desc: '', | 165 | desc: '', |
@@ -305,14 +305,15 @@ export default { | @@ -305,14 +305,15 @@ export default { | ||
305 | 305 | ||
306 | //根菜单选择事件 | 306 | //根菜单选择事件 |
307 | let dataFilter = (val) => { | 307 | let dataFilter = (val) => { |
308 | + form.value.addFirstPId=val; | ||
308 | if (val) { //val存在 | 309 | if (val) { //val存在 |
309 | - this.options = this.firstMenu.filter((item) => { | ||
310 | - if (!!~item.label.indexOf(val) || !!~item.label.toUpperCase().indexOf(val.toUpperCase())) { | 310 | + firstMenu.value.filter((item) => { |
311 | + if (!!~item.id.indexOf(val) || !!~item.id.toUpperCase().indexOf(val.toUpperCase())) { | ||
311 | return true | 312 | return true |
312 | } | 313 | } |
313 | }) | 314 | }) |
314 | } else { //val为空时,还原数组 | 315 | } else { //val为空时,还原数组 |
315 | - this.options = this.firstMenu; | 316 | + // this.options = firstMenu.value; |
316 | } | 317 | } |
317 | } | 318 | } |
318 | 319 | ||
@@ -552,6 +553,7 @@ export default { | @@ -552,6 +553,7 @@ export default { | ||
552 | let resTypeList = Vue.ref([]); | 553 | let resTypeList = Vue.ref([]); |
553 | let kpiList = Vue.ref([]); | 554 | let kpiList = Vue.ref([]); |
554 | let busTypeList = Vue.ref([]); | 555 | let busTypeList = Vue.ref([]); |
556 | + | ||
555 | let init = () => { | 557 | let init = () => { |
556 | /* | 558 | /* |
557 | proxy.$http.get("/api-web/home/resType/getTree?typeParentFlag=1", {}, function(res) { | 559 | proxy.$http.get("/api-web/home/resType/getTree?typeParentFlag=1", {}, function(res) { |
@@ -584,20 +586,7 @@ export default { | @@ -584,20 +586,7 @@ export default { | ||
584 | } | 586 | } |
585 | }) | 587 | }) |
586 | 588 | ||
587 | - | ||
588 | - //LH 加载新增树菜单 | ||
589 | - proxy.$http.get(`/api-web/ContrastAnalysis/getRootMenu`, {menuName: ''}, function (res) { | ||
590 | - if (res.length > 0) { | ||
591 | - firstMenu.value = res; | ||
592 | - firstMenu.value.forEach(function (item, index) { | ||
593 | - if (item.id == '100130900') { | ||
594 | - form.value.addFirstPId = firstMenu.value[index].id; | ||
595 | - return; | ||
596 | - } | ||
597 | - }); | ||
598 | - } | ||
599 | - }); | ||
600 | - //LH | 589 | + //LH |
601 | setTimeout(function () { | 590 | setTimeout(function () { |
602 | let arrs = timeRangeArr.value | 591 | let arrs = timeRangeArr.value |
603 | timeRangeChange(arrs[0]); | 592 | timeRangeChange(arrs[0]); |
-
Please register or login to post a comment