style:部署
Showing
50 changed files
with
1714 additions
and
1944 deletions
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-27 09:42:59 | ||
5 | --> | ||
1 | # 安装依赖 | 6 | # 安装依赖 |
2 | npm install | 7 | npm install |
3 | # 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 | 8 | # 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 |
... | @@ -15,4 +20,3 @@ npm install --registry=https://registry.npm.taobao.org | ... | @@ -15,4 +20,3 @@ npm install --registry=https://registry.npm.taobao.org |
15 | - `chore` 依赖更新/脚手架配置修改等 | 20 | - `chore` 依赖更新/脚手架配置修改等 |
16 | - `wip` 开发中 | 21 | - `wip` 开发中 |
17 | 22 | ||
18 | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-24 15:07:01 | ||
5 | --> | ||
1 | <template> | 6 | <template> |
2 | <div id="app"> | 7 | <div id="app"> |
3 | <router-view /> | 8 | <router-view /> |
4 | </div> | 9 | </div> |
5 | </template> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
10 | </template> | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: 这个是所有api的前缀配置文件 | 2 | * @Description: 这个是所有api的前缀配置文件 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-21 16:26:55 | 4 | * @LastEditTime: 2023-03-24 16:51:18 |
5 | */ | 5 | */ |
6 | export default { | 6 | export default { |
7 | SERVERAPI: '/bdcsjsb', //赵千 | 7 | SERVERAPI: '/bdcsjsb', //赵千 |
8 | MANAGEMENTAPI: 'http://192.168.2.236/management' | 8 | MANAGEMENTAPI: 'http://192.168.2.38:8090/management' |
9 | } | 9 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-23 13:17:59 | 4 | * @LastEditTime: 2023-03-24 09:28:25 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | // let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 7 | // let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) |
8 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 8 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) |
9 | console.log(JSON.parse(localStorage.getItem('ApiUrl'))); | ||
10 | // 获取用户信息 | 9 | // 获取用户信息 |
11 | export function getUserInfo () { | 10 | export function getUserInfo () { |
12 | return request({ | 11 | return request({ | ... | ... |
1 | /* | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-27 09:53:16 | ||
5 | */ | ||
1 | import dialogBox from '@/components/DialogBox' | 6 | import dialogBox from '@/components/DialogBox' |
2 | import LbTable from '@/components/LbTable' | 7 | import LbTable from '@/components/LbTable' |
3 | import Theme from '@/components/Theme.vue' | ||
4 | import Breadcrumb from "@/components/Breadcrumb.vue"; | 8 | import Breadcrumb from "@/components/Breadcrumb.vue"; |
5 | // 引入按钮 | 9 | // 引入按钮 |
6 | import btn from '@/components/Button.vue' | 10 | import btn from '@/components/Button.vue' |
... | @@ -12,8 +16,6 @@ export default { | ... | @@ -12,8 +16,6 @@ export default { |
12 | Vue.component('Breadcrumb', Breadcrumb); | 16 | Vue.component('Breadcrumb', Breadcrumb); |
13 | Vue.component('btn', btn); | 17 | Vue.component('btn', btn); |
14 | Vue.component('lbTable', LbTable); | 18 | Vue.component('lbTable', LbTable); |
15 | Vue.component('Theme', Theme); | ||
16 | Vue.prototype.$popup = Popup.install; | ||
17 | Vue.prototype.$alertMes = MessageBox.alert; | 19 | Vue.prototype.$alertMes = MessageBox.alert; |
18 | } | 20 | } |
19 | } | 21 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <template> | 1 | <template> |
2 | <el-dialog :close-on-click-modal="false" top="0" @close="closeDialog" custom-class="dialogBox editDialogBox mainCenter" | 2 | <el-dialog :close-on-click-modal="false" top="0" @close="closeDialog" custom-class="dialogBox dataReporting editDialogBox mainCenter" |
3 | :visible.sync="dialogVisible" width="92%"> | 3 | :visible.sync="dialogVisible" width="92%"> |
4 | <div slot="title" class="dialog_title" ref="dialogTitle"> | 4 | <div slot="title" class="dialog_title" ref="dialogTitle"> |
5 | {{ title || '详情' }} | 5 | {{ title || '详情' }} |
... | @@ -335,194 +335,11 @@ | ... | @@ -335,194 +335,11 @@ |
335 | } | 335 | } |
336 | </script> | 336 | </script> |
337 | <style scoped lang="scss"> | 337 | <style scoped lang="scss"> |
338 | // @import "~@/styles/mixin.scss"; | ||
339 | // @import "~@/styles/dialogBox.scss"; | ||
340 | |||
341 | /deep/.el-dialog__body { | ||
342 | display: flex; | ||
343 | flex-direction: column; | ||
344 | padding-bottom: 30px; | ||
345 | } | ||
346 | |||
347 | /deep/ .el-tabs { | ||
348 | color: #cef8ff; | ||
349 | } | ||
350 | |||
351 | .d-center { | ||
352 | z-index: 1000; | ||
353 | } | ||
354 | |||
355 | .sjmx { | ||
356 | display: flex; | ||
357 | flex-direction: column; | ||
358 | height: 49vh; | ||
359 | |||
360 | /deep/.el-tabs__item { | ||
361 | height: 50px; | ||
362 | padding-top: 6px; | ||
363 | } | ||
364 | } | ||
365 | |||
366 | .result { | ||
367 | flex: 1; | ||
368 | height: 100%; | ||
369 | } | ||
370 | |||
371 | .editDialogBox-con { | ||
372 | flex: 1; | ||
373 | height: 100%; | ||
374 | overflow-y: hidden; | ||
375 | } | ||
376 | |||
377 | /deep/.el-tabs__item { | ||
378 | color: #cef8ff !important; | ||
379 | |||
380 | display: flex; | ||
381 | flex-direction: row; | ||
382 | justify-content: center; | ||
383 | background: url("~@/image/tabitem.png") no-repeat; | ||
384 | background-size: 100% 100%; | ||
385 | border: none !important; | ||
386 | } | ||
387 | |||
388 | .obligee-item-name { | ||
389 | background: #05275b; | ||
390 | color: #ffffff; | ||
391 | background: url("~@/image/itembg.png") no-repeat; | ||
392 | background-size: 100% 100%; | ||
393 | } | ||
394 | |||
395 | /deep/.el-tabs__nav-scroll { | ||
396 | background: none; | ||
397 | } | ||
398 | |||
399 | /deep/.el-tabs__nav { | ||
400 | display: flex; | ||
401 | border: none !important; | ||
402 | } | ||
403 | |||
404 | /deep/.el-tabs__item.is-top { | ||
405 | border: 1px solid #dfe4ed; | ||
406 | border-top: 1px solid #dfe4ed; | ||
407 | border-bottom: 1px solid transparent; | ||
408 | } | ||
409 | |||
410 | /deep/.el-tabs__header { | ||
411 | border: none; | ||
412 | margin-bottom: 0; | ||
413 | } | ||
414 | |||
415 | /deep/.el-tabs__item.is-top:not(:last-child) { | ||
416 | margin-right: 5px; | ||
417 | } | ||
418 | |||
419 | /deep/.el-tabs__item.is-top { | ||
420 | background-color: none !important; | ||
421 | } | ||
422 | |||
423 | /deep/.el-tabs__item.is-active { | ||
424 | background: url("~@/image/tabitemse.png") no-repeat; | ||
425 | background-size: 100% 100%; | ||
426 | } | ||
427 | |||
428 | .success-images { | ||
429 | width: 30px; | ||
430 | height: 30px; | ||
431 | position: relative; | ||
432 | top: 10px; | ||
433 | right: 3px; | ||
434 | } | ||
435 | |||
436 | .tab-pane-item { | ||
437 | line-height: 20px; | ||
438 | color: #02d9fd; | ||
439 | |||
440 | p { | ||
441 | text-align: center; | ||
442 | } | ||
443 | } | ||
444 | |||
445 | .edit-content { | ||
446 | overflow-y: auto; | ||
447 | overflow-x: hidden; | ||
448 | padding-right: 1px; | ||
449 | border-top: none; | ||
450 | } | ||
451 | |||
452 | /deep/.editDialogBox { | 338 | /deep/.editDialogBox { |
453 | border-radius: 8px; | ||
454 | overflow: hidden; | ||
455 | min-width: 1228px; | ||
456 | |||
457 | .el-dialog__header { | 339 | .el-dialog__header { |
458 | display: flex; | 340 | display: flex; |
459 | margin-bottom: 10px; | 341 | margin-bottom: 10px; |
460 | } | 342 | } |
461 | |||
462 | .dialog_footer { | ||
463 | flex-direction: column; | ||
464 | |||
465 | .dialog_button { | ||
466 | margin-top: 8px; | ||
467 | } | ||
468 | } | ||
469 | |||
470 | .divider { | ||
471 | width: 100%; | ||
472 | border-bottom: 1px solid #ccc; | ||
473 | } | ||
474 | } | ||
475 | |||
476 | .el-dialog__wrapper { | ||
477 | overflow: hidden; | ||
478 | } | ||
479 | |||
480 | .dialog-from { | ||
481 | padding-top: 0; | ||
482 | |||
483 | .el-col { | ||
484 | justify-content: space-between; | ||
485 | } | ||
486 | |||
487 | .bz { | ||
488 | height: 100%; | ||
489 | position: relative; | ||
490 | top: 3px; | ||
491 | } | ||
492 | |||
493 | /deep/.el-select { | ||
494 | padding-right: 15px; | ||
495 | } | ||
496 | |||
497 | /deep/.el-icon-circle-close { | ||
498 | display: none; | ||
499 | } | ||
500 | |||
501 | /deep/.el-input__suffix { | ||
502 | right: -25px !important; | ||
503 | top: -5px; | ||
504 | } | ||
505 | |||
506 | /deep/.el-select, | ||
507 | /deep/.el-input { | ||
508 | flex: 1; | ||
509 | width: 100%; | ||
510 | } | ||
511 | |||
512 | /deep/.el-textarea__inner { | ||
513 | border: none !important; | ||
514 | margin: 0; | ||
515 | } | ||
516 | |||
517 | &_header { | ||
518 | margin: 0 -5px !important; | ||
519 | } | ||
520 | |||
521 | &_title { | ||
522 | font-size: 18px; | ||
523 | color: #d7eaee; | ||
524 | margin: 3px 0; | ||
525 | } | ||
526 | } | 343 | } |
527 | </style> | 344 | </style> |
528 | 345 | ... | ... |
src/components/Theme.vue
deleted
100644 → 0
1 | <template> | ||
2 | <el-color-picker v-model="theme" | ||
3 | :predefine="['#409EFF', '#1890ff', '#304156', '#212121', '#11a983', '#13c2c2', '#6959CD', '#f5222d',]" | ||
4 | class="theme-picker" popper-class="theme-picker-dropdown" /> | ||
5 | </template> | ||
6 | |||
7 | <script> | ||
8 | const version = require('element-ui/package.json').version // element-ui version from node_modules | ||
9 | const ORIGINAL_THEME = '#409EFF' // default color | ||
10 | |||
11 | export default { | ||
12 | data () { | ||
13 | return { | ||
14 | chalk: '', // content of theme-chalk css | ||
15 | theme: '' | ||
16 | } | ||
17 | }, | ||
18 | computed: { | ||
19 | defaultTheme () { | ||
20 | return this.$store.state.app.theme | ||
21 | } | ||
22 | }, | ||
23 | watch: { | ||
24 | defaultTheme: { | ||
25 | handler: function (val, oldVal) { | ||
26 | this.theme = val | ||
27 | }, | ||
28 | immediate: true | ||
29 | }, | ||
30 | async theme (val) { | ||
31 | const oldVal = this.chalk ? this.theme : ORIGINAL_THEME | ||
32 | if (typeof val !== 'string') return | ||
33 | const themeCluster = this.getThemeCluster(val.replace('#', '')) | ||
34 | const originalCluster = this.getThemeCluster(oldVal.replace('#', '')) | ||
35 | const $message = this.$message({ | ||
36 | message: ' Compiling the theme', | ||
37 | customClass: 'theme-message', | ||
38 | type: 'success', | ||
39 | duration: 0, | ||
40 | iconClass: 'el-icon-loading' | ||
41 | }) | ||
42 | |||
43 | const getHandler = (variable, id) => { | ||
44 | return () => { | ||
45 | const originalCluster = this.getThemeCluster(ORIGINAL_THEME.replace('#', '')) | ||
46 | const newStyle = this.updateStyle(this[variable], originalCluster, themeCluster) | ||
47 | |||
48 | let styleTag = document.getElementById(id) | ||
49 | if (!styleTag) { | ||
50 | styleTag = document.createElement('style') | ||
51 | styleTag.setAttribute('id', id) | ||
52 | document.head.appendChild(styleTag) | ||
53 | } | ||
54 | styleTag.innerText = newStyle | ||
55 | } | ||
56 | } | ||
57 | |||
58 | if (!this.chalk) { | ||
59 | const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css` | ||
60 | await this.getCSSString(url, 'chalk') | ||
61 | } | ||
62 | |||
63 | const chalkHandler = getHandler('chalk', 'chalk-style') | ||
64 | |||
65 | chalkHandler() | ||
66 | |||
67 | const styles = [].slice.call(document.querySelectorAll('style')) | ||
68 | .filter(style => { | ||
69 | const text = style.innerText | ||
70 | return new RegExp(oldVal, 'i').test(text) && !/Chalk Variables/.test(text) | ||
71 | }) | ||
72 | styles.forEach(style => { | ||
73 | const { innerText } = style | ||
74 | if (typeof innerText !== 'string') return | ||
75 | style.innerText = this.updateStyle(innerText, originalCluster, themeCluster) | ||
76 | }) | ||
77 | |||
78 | this.$emit('change', val) | ||
79 | |||
80 | $message.close() | ||
81 | } | ||
82 | }, | ||
83 | |||
84 | methods: { | ||
85 | updateStyle (style, oldCluster, newCluster) { | ||
86 | let newStyle = style | ||
87 | oldCluster.forEach((color, index) => { | ||
88 | newStyle = newStyle.replace(new RegExp(color, 'ig'), newCluster[index]) | ||
89 | }) | ||
90 | return newStyle | ||
91 | }, | ||
92 | |||
93 | getCSSString (url, variable) { | ||
94 | return new Promise(resolve => { | ||
95 | const xhr = new XMLHttpRequest() | ||
96 | xhr.onreadystatechange = () => { | ||
97 | if (xhr.readyState === 4 && xhr.status === 200) { | ||
98 | this[variable] = xhr.responseText.replace(/@font-face{[^}]+}/, '') | ||
99 | resolve() | ||
100 | } | ||
101 | } | ||
102 | xhr.open('GET', url) | ||
103 | xhr.send() | ||
104 | }) | ||
105 | }, | ||
106 | |||
107 | getThemeCluster (theme) { | ||
108 | const tintColor = (color, tint) => { | ||
109 | let red = parseInt(color.slice(0, 2), 16) | ||
110 | let green = parseInt(color.slice(2, 4), 16) | ||
111 | let blue = parseInt(color.slice(4, 6), 16) | ||
112 | |||
113 | if (tint === 0) { // when primary color is in its rgb space | ||
114 | return [red, green, blue].join(',') | ||
115 | } else { | ||
116 | red += Math.round(tint * (255 - red)) | ||
117 | green += Math.round(tint * (255 - green)) | ||
118 | blue += Math.round(tint * (255 - blue)) | ||
119 | |||
120 | red = red.toString(16) | ||
121 | green = green.toString(16) | ||
122 | blue = blue.toString(16) | ||
123 | |||
124 | return `#${red}${green}${blue}` | ||
125 | } | ||
126 | } | ||
127 | |||
128 | const shadeColor = (color, shade) => { | ||
129 | let red = parseInt(color.slice(0, 2), 16) | ||
130 | let green = parseInt(color.slice(2, 4), 16) | ||
131 | let blue = parseInt(color.slice(4, 6), 16) | ||
132 | |||
133 | red = Math.round((1 - shade) * red) | ||
134 | green = Math.round((1 - shade) * green) | ||
135 | blue = Math.round((1 - shade) * blue) | ||
136 | |||
137 | red = red.toString(16) | ||
138 | green = green.toString(16) | ||
139 | blue = blue.toString(16) | ||
140 | |||
141 | return `#${red}${green}${blue}` | ||
142 | } | ||
143 | |||
144 | const clusters = [theme] | ||
145 | for (let i = 0; i <= 9; i++) { | ||
146 | clusters.push(tintColor(theme, Number((i / 10).toFixed(2)))) | ||
147 | } | ||
148 | clusters.push(shadeColor(theme, 0.1)) | ||
149 | return clusters | ||
150 | } | ||
151 | } | ||
152 | } | ||
153 | </script> | ||
154 | |||
155 | <style> | ||
156 | .theme-message, | ||
157 | .theme-picker-dropdown { | ||
158 | z-index: 99999 !important; | ||
159 | } | ||
160 | |||
161 | .theme-picker .el-color-picker__trigger { | ||
162 | height: 26px !important; | ||
163 | width: 26px !important; | ||
164 | padding: 2px; | ||
165 | } | ||
166 | |||
167 | .theme-picker-dropdown .el-color-dropdown__link-btn { | ||
168 | display: none; | ||
169 | } | ||
170 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-24 17:10:02 | ||
5 | --> | ||
1 | <template> | 6 | <template> |
2 | <div v-if="!item.hidden"> | 7 | <div v-if="!item.hidden"> |
3 | <template | 8 | <template |
... | @@ -65,9 +70,9 @@ export default { | ... | @@ -65,9 +70,9 @@ export default { |
65 | }) | 70 | }) |
66 | 71 | ||
67 | // When there is only one child router, the child router is displayed by default | 72 | // When there is only one child router, the child router is displayed by default |
68 | if (showingChildren.length === 1) { | 73 | // if (showingChildren.length === 1) { |
69 | return true | 74 | // return true |
70 | } | 75 | // } |
71 | 76 | ||
72 | // Show parent if there are no child router to display | 77 | // Show parent if there are no child router to display |
73 | if (showingChildren.length === 0) { | 78 | if (showingChildren.length === 0) { | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-23 16:17:42 | 4 | * @LastEditTime: 2023-03-24 17:10:32 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div> | 7 | <div> |
... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
9 | <el-menu router :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" | 9 | <el-menu router :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" |
10 | :unique-opened="true" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical"> | 10 | :unique-opened="true" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical"> |
11 | <!-- 权限菜单 --> | 11 | <!-- 权限菜单 --> |
12 | <sidebar-item v-for="route in permission_routes.slice(4)" :key="route.path" :item="route" | 12 | <sidebar-item v-for="route in permission_routes.slice(5)" :key="route.path" :item="route" |
13 | :base-path="route.path" /> | 13 | :base-path="route.path" /> |
14 | <!-- 菜单全部展示 --> | 14 | <!-- 菜单全部展示 --> |
15 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> | 15 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> |
... | @@ -50,7 +50,7 @@ export default { | ... | @@ -50,7 +50,7 @@ export default { |
50 | } | 50 | } |
51 | }, | 51 | }, |
52 | mounted () { | 52 | mounted () { |
53 | console.log(this.permission_routes, 'permission_routespermission_routes'); | 53 | console.log(this.permission_routes.slice(5), 'permission_routes'); |
54 | } | 54 | } |
55 | } | 55 | } |
56 | </script> | 56 | </script> | ... | ... |
... | @@ -3,7 +3,8 @@ | ... | @@ -3,7 +3,8 @@ |
3 | <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll"> | 3 | <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll"> |
4 | <router-link v-for="tag in visitedViews" ref="tag" :key="tag.path" :class="isActive(tag) ? 'active' : ''" | 4 | <router-link v-for="tag in visitedViews" ref="tag" :key="tag.path" :class="isActive(tag) ? 'active' : ''" |
5 | :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" tag="span" class="tags-view-item" | 5 | :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" tag="span" class="tags-view-item" |
6 | @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''" @contextmenu.prevent.native="openMenu(tag, $event)"> | 6 | @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''" |
7 | @contextmenu.prevent.native="openMenu(tag, $event)"> | ||
7 | {{ tag.title }} | 8 | {{ tag.title }} |
8 | <span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" /> | 9 | <span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" /> |
9 | </router-link> | 10 | </router-link> |
... | @@ -190,30 +191,32 @@ export default { | ... | @@ -190,30 +191,32 @@ export default { |
190 | </script> | 191 | </script> |
191 | 192 | ||
192 | <style lang="scss" scoped> | 193 | <style lang="scss" scoped> |
194 | @import "~@/styles/_handle.scss"; | ||
195 | |||
193 | .tags-view-container { | 196 | .tags-view-container { |
194 | height: 40px; | 197 | height: 40px; |
195 | width: 100%; | 198 | width: 100%; |
196 | background: #fff; | 199 | background: #fff; |
197 | border-bottom: 1px solid #d8dce5; | 200 | border-bottom: 1px solid #d8dce5; |
198 | box-sizing: border-box; | 201 | box-sizing: border-box; |
199 | padding-top: 3px; | 202 | padding-top: 2px; |
200 | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04); | 203 | margin-bottom: 7px; |
201 | margin-bottom: 5px; | 204 | border-radius: 4px; |
202 | 205 | ||
203 | .tags-view-wrapper { | 206 | .tags-view-wrapper { |
204 | .tags-view-item { | 207 | .tags-view-item { |
205 | display: inline-block; | 208 | display: inline-block; |
206 | position: relative; | 209 | position: relative; |
207 | cursor: pointer; | 210 | cursor: pointer; |
208 | height: 26px; | ||
209 | line-height: 26px; | 211 | line-height: 26px; |
210 | border: 1px solid #d8dce5; | 212 | color: #4A4A4A; |
211 | color: #495060; | 213 | @include font_color("tagsText"); |
212 | background: #fff; | ||
213 | padding: 0 8px; | 214 | padding: 0 8px; |
214 | font-size: 12px; | 215 | font-size: 12px; |
215 | margin-left: 5px; | 216 | margin-left: 5px; |
216 | margin-top: 4px; | 217 | margin-top: 4px; |
218 | border-radius: 4px; | ||
219 | @include borderColor("tagsBorderColor"); | ||
217 | 220 | ||
218 | &:first-of-type { | 221 | &:first-of-type { |
219 | margin-left: 15px; | 222 | margin-left: 15px; |
... | @@ -224,13 +227,13 @@ export default { | ... | @@ -224,13 +227,13 @@ export default { |
224 | } | 227 | } |
225 | 228 | ||
226 | &.active { | 229 | &.active { |
227 | background-color: #0794FF; | 230 | @include background("tagsBg"); |
228 | color: #fff; | 231 | @include borderColor("tagsActiveText"); |
229 | border-color: #0794FF; | 232 | @include font_color("tagsActiveText"); |
230 | 233 | ||
231 | &::before { | 234 | &::before { |
232 | content: ''; | 235 | content: ''; |
233 | background: #fff; | 236 | @include background("tagsActiveText"); |
234 | display: inline-block; | 237 | display: inline-block; |
235 | width: 8px; | 238 | width: 8px; |
236 | height: 8px; | 239 | height: 8px; | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-23 16:37:20 | 4 | * @LastEditTime: 2023-03-24 17:28:37 |
5 | */ | 5 | */ |
6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
7 | import router from "./router"; | 7 | import router from "./router"; |
... | @@ -25,7 +25,7 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -25,7 +25,7 @@ router.beforeEach(async (to, from, next) => { |
25 | localStorage.removeItem("token"); | 25 | localStorage.removeItem("token"); |
26 | next(); | 26 | next(); |
27 | } else { | 27 | } else { |
28 | let code = Vue.prototype.BASE_API.THEME == "sb" ? "BDCSBPT" : "BDCJGPT" | 28 | let code = Vue.prototype.BASE_API.CODE |
29 | //判断token是否存在 | 29 | //判断token是否存在 |
30 | const hasToken = localStorage.getItem("token"); | 30 | const hasToken = localStorage.getItem("token"); |
31 | if (hasToken) { | 31 | if (hasToken) { | ... | ... |
... | @@ -32,11 +32,7 @@ export const constantRoutes = [ | ... | @@ -32,11 +32,7 @@ export const constantRoutes = [ |
32 | { | 32 | { |
33 | path: '/', | 33 | path: '/', |
34 | redirect: to => { | 34 | redirect: to => { |
35 | if (Vue.prototype.BASE_API.THEME == 'jg') { | 35 | return { path: `/${Vue.prototype.BASE_API.THEME}` } |
36 | return { path: '/jg' } | ||
37 | } else { | ||
38 | return { path: '/sb' } | ||
39 | } | ||
40 | }, | 36 | }, |
41 | }, | 37 | }, |
42 | // 监管首页 | 38 | // 监管首页 | ... | ... |
... | @@ -20,6 +20,15 @@ | ... | @@ -20,6 +20,15 @@ |
20 | @function themed($key) { | 20 | @function themed($key) { |
21 | @return map-get($theme-map, $key); | 21 | @return map-get($theme-map, $key); |
22 | } | 22 | } |
23 | |||
24 | //获取边框颜色 | ||
25 | @mixin borderColor($color) { | ||
26 | @include themeify { | ||
27 | border: 1px solid themed($color) !important; | ||
28 | } | ||
29 | } | ||
30 | |||
31 | |||
23 | //获取渐变背景 | 32 | //获取渐变背景 |
24 | @mixin background($color) { | 33 | @mixin background($color) { |
25 | @include themeify { | 34 | @include themeify { |
... | @@ -33,9 +42,10 @@ | ... | @@ -33,9 +42,10 @@ |
33 | background-color: themed($color) !important; | 42 | background-color: themed($color) !important; |
34 | } | 43 | } |
35 | } | 44 | } |
45 | |||
36 | //获取字体颜色 | 46 | //获取字体颜色 |
37 | @mixin font_color($color) { | 47 | @mixin font_color($color) { |
38 | @include themeify { | 48 | @include themeify { |
39 | color: themed($color)!important; | 49 | color: themed($color) !important; |
40 | } | 50 | } |
41 | } | 51 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -7,15 +7,19 @@ $themes: (blue: ( //背景 | ... | @@ -7,15 +7,19 @@ $themes: (blue: ( //背景 |
7 | menuActiveText: #4162D8, | 7 | menuActiveText: #4162D8, |
8 | // 没有子集 | 8 | // 没有子集 |
9 | submenuBg: #3D59C4, | 9 | submenuBg: #3D59C4, |
10 | submenuColor: #FFFFFF | 10 | submenuColor: #FFFFFF, |
11 | ), | 11 | // tags |
12 | tagsBorderColor: #E5E5E5, | ||
13 | tagsBg: rgba(65, 98, 216, 0.1), | ||
14 | tagsText: #4A4A4A, | ||
15 | tagsActiveText: #4162D8, | ||
16 | // 操纵btn | ||
17 | btnBg: #4162D8, | ||
18 | btnColor: #4162D8), | ||
12 | 19 | ||
13 | green: ( | 20 | green: (navbg: #0F8B80, |
14 | navbg: #0F8B80, | ||
15 | menuBg:#121A2E, | 21 | menuBg:#121A2E, |
16 | menuActive: linear-gradient(90deg, rgba(61,90,198,0.7) 0%, rgba(61,90,198,0) 100%), | 22 | menuActive: linear-gradient(90deg, rgba(61, 90, 198, 0.7) 0%, rgba(61, 90, 198, 0) 100%), |
17 | //字体 | 23 | //字体 |
18 | menuText: #A1A7C2, | 24 | menuText: #A1A7C2, |
19 | menuActiveText: #FFFFFF | ||
20 | ) | ||
21 | ) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
25 | menuActiveText: #FFFFFF)) | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
4 | **/ | 4 | **/ |
5 | 5 | ||
6 | /* theme color */ | 6 | /* theme color */ |
7 | $--color-primary: #0F93F6; | 7 | $--color-primary: #4162D8; |
8 | $--color-success: #67C23B; | 8 | $--color-success: #67C23B; |
9 | $--color-warning: #E6A23C; | 9 | $--color-warning: #E6A23C; |
10 | $--color-danger: #F46C6C; | 10 | $--color-danger: #F46C6C; | ... | ... |
... | @@ -5,6 +5,7 @@ | ... | @@ -5,6 +5,7 @@ |
5 | background: none !important; | 5 | background: none !important; |
6 | } | 6 | } |
7 | 7 | ||
8 | // 列表样式 | ||
8 | .tableClass { | 9 | .tableClass { |
9 | .el-table { | 10 | .el-table { |
10 | border: none !important; | 11 | border: none !important; |
... | @@ -52,6 +53,7 @@ | ... | @@ -52,6 +53,7 @@ |
52 | background-color: rgba(0, 0, 0, 0); | 53 | background-color: rgba(0, 0, 0, 0); |
53 | } | 54 | } |
54 | 55 | ||
56 | // 查询表单样式 | ||
55 | .from-clues { | 57 | .from-clues { |
56 | height: 100%; | 58 | height: 100%; |
57 | width: 100%; | 59 | width: 100%; |
... | @@ -264,7 +266,7 @@ | ... | @@ -264,7 +266,7 @@ |
264 | } | 266 | } |
265 | } | 267 | } |
266 | 268 | ||
267 | // 角色配置 | 269 | // 角色管理人员菜单配置弹框样式 |
268 | .roleconfiguration { | 270 | .roleconfiguration { |
269 | .el-dialog__body { | 271 | .el-dialog__body { |
270 | display: flex; | 272 | display: flex; |
... | @@ -358,82 +360,7 @@ | ... | @@ -358,82 +360,7 @@ |
358 | border-top: none; | 360 | border-top: none; |
359 | } | 361 | } |
360 | 362 | ||
361 | .editDialogBox { | ||
362 | border-radius: 8px; | ||
363 | overflow: hidden; | ||
364 | min-width: 1228px; | ||
365 | height: 825px !important; | ||
366 | |||
367 | .dialog-from { | ||
368 | padding: 13px; | ||
369 | border-radius: 2px; | ||
370 | box-sizing: border-box; | ||
371 | |||
372 | .el-row { | ||
373 | display: flex; | ||
374 | flex-wrap: nowrap; | ||
375 | } | ||
376 | 363 | ||
377 | .el-col { | ||
378 | line-height: 18px; | ||
379 | display: flex; | ||
380 | align-items: center; | ||
381 | margin-bottom: 3px; | ||
382 | color: #b5d6dc; | ||
383 | border-radius: 2px; | ||
384 | border: 1px solid #224c7c; | ||
385 | margin: 5px; | ||
386 | |||
387 | span { | ||
388 | display: inline-block; | ||
389 | padding: 3px; | ||
390 | border-radius: 3px; | ||
391 | overflow: hidden; | ||
392 | white-space: nowrap; | ||
393 | text-align: left; | ||
394 | color: #02d9fd; | ||
395 | } | ||
396 | |||
397 | p { | ||
398 | flex: 1; | ||
399 | width: 100%; | ||
400 | padding-left: 5px; | ||
401 | line-height: 20px; | ||
402 | color: #c0c4cc; | ||
403 | cursor: not-allowed; | ||
404 | white-space: nowrap; | ||
405 | margin-right: 5px; | ||
406 | text-align: right; | ||
407 | } | ||
408 | } | ||
409 | } | ||
410 | |||
411 | .dialog_title { | ||
412 | display: flex; | ||
413 | position: relative; | ||
414 | font-size: 24px; | ||
415 | top: -8px; | ||
416 | width: 38%; | ||
417 | height: 40px; | ||
418 | margin-left: 28px; | ||
419 | justify-content: center; | ||
420 | } | ||
421 | |||
422 | .el-dialog__header { | ||
423 | display: flex; | ||
424 | margin-bottom: 10px; | ||
425 | } | ||
426 | |||
427 | .el-dialog__footer { | ||
428 | padding-right: 40px; | ||
429 | } | ||
430 | |||
431 | .divider { | ||
432 | width: 100%; | ||
433 | border-bottom: 1px solid #ccc; | ||
434 | } | ||
435 | |||
436 | } | ||
437 | 364 | ||
438 | .el-dialog__wrapper { | 365 | .el-dialog__wrapper { |
439 | overflow: hidden; | 366 | overflow: hidden; |
... | @@ -514,16 +441,7 @@ | ... | @@ -514,16 +441,7 @@ |
514 | font-size: 12px; | 441 | font-size: 12px; |
515 | } | 442 | } |
516 | 443 | ||
517 | .button:hover { | 444 | // 按钮样式 |
518 | // width: 76px; | ||
519 | // height: 32px; | ||
520 | // color: #ffffff; | ||
521 | // cursor: pointer; | ||
522 | // border: 0; | ||
523 | // font-size: 12px; | ||
524 | // background: none; | ||
525 | } | ||
526 | |||
527 | .cx { | 445 | .cx { |
528 | background: url("../image/btn.png") no-repeat 0 -34px; | 446 | background: url("../image/btn.png") no-repeat 0 -34px; |
529 | background-size: cover; | 447 | background-size: cover; |
... | @@ -627,7 +545,7 @@ | ... | @@ -627,7 +545,7 @@ |
627 | } | 545 | } |
628 | 546 | ||
629 | .item-content-input { | 547 | .item-content-input { |
630 | /deep/.el-input__inner { | 548 | .el-input__inner { |
631 | border: none !important; | 549 | border: none !important; |
632 | text-align: right; | 550 | text-align: right; |
633 | } | 551 | } |
... | @@ -742,6 +660,7 @@ | ... | @@ -742,6 +660,7 @@ |
742 | } | 660 | } |
743 | 661 | ||
744 | } | 662 | } |
663 | |||
745 | .contentCenter { | 664 | .contentCenter { |
746 | position: absolute; | 665 | position: absolute; |
747 | top: 50%; | 666 | top: 50%; |
... | @@ -761,3 +680,347 @@ | ... | @@ -761,3 +680,347 @@ |
761 | } | 680 | } |
762 | } | 681 | } |
763 | 682 | ||
683 | // 登簿日志弹出框 | ||
684 | .entryJournal { | ||
685 | .el-tabs__header { | ||
686 | margin: 0; | ||
687 | } | ||
688 | |||
689 | .el-dialog { | ||
690 | display: flex; | ||
691 | flex-direction: column; | ||
692 | } | ||
693 | |||
694 | .el-dialog__body { | ||
695 | display: flex; | ||
696 | flex-direction: column; | ||
697 | padding-bottom: 30px; | ||
698 | height: 100%; | ||
699 | flex: 1; | ||
700 | position: relative; | ||
701 | } | ||
702 | |||
703 | .regularHeight { | ||
704 | display: flex; | ||
705 | flex-direction: column; | ||
706 | height: 87vh; | ||
707 | margin-bottom: 5px; | ||
708 | |||
709 | .editDialogBox-con, | ||
710 | .JsonEditor { | ||
711 | flex: 1; | ||
712 | } | ||
713 | } | ||
714 | |||
715 | .d-center {} | ||
716 | |||
717 | .dialog_title { | ||
718 | top: -6px | ||
719 | } | ||
720 | |||
721 | .el-tabs__item { | ||
722 | color: #CEF8FF !important; | ||
723 | |||
724 | display: flex; | ||
725 | flex-direction: row; | ||
726 | justify-content: center; | ||
727 | background: url("~@/image/tabitem.png") no-repeat; | ||
728 | background-size: 100% 100%; | ||
729 | border: none !important; | ||
730 | } | ||
731 | |||
732 | .el-tabs__nav { | ||
733 | display: flex; | ||
734 | border: none !important; | ||
735 | } | ||
736 | |||
737 | .el-tabs__item.is-top:not(:last-child) { | ||
738 | margin-right: 5px; | ||
739 | } | ||
740 | |||
741 | .el-icon-circle-close { | ||
742 | display: none; | ||
743 | } | ||
744 | |||
745 | .el-tabs__item.is-active { | ||
746 | background: url("~@/image/tabitemse.png") no-repeat; | ||
747 | background-size: 100% 100%; | ||
748 | } | ||
749 | |||
750 | .from-clues-content { | ||
751 | margin-top: 0; | ||
752 | background: none; | ||
753 | padding: 0; | ||
754 | } | ||
755 | |||
756 | .editDialogBox-box { | ||
757 | position: relative; | ||
758 | top: 10px; | ||
759 | height: 100%; | ||
760 | } | ||
761 | |||
762 | .dialog-from { | ||
763 | padding-top: 0; | ||
764 | |||
765 | .el-col { | ||
766 | justify-content: space-between; | ||
767 | } | ||
768 | |||
769 | .bz { | ||
770 | height: 100%; | ||
771 | position: relative; | ||
772 | top: 3px; | ||
773 | } | ||
774 | |||
775 | .el-input { | ||
776 | flex: 1; | ||
777 | width: 100%; | ||
778 | } | ||
779 | |||
780 | .el-textarea__inner { | ||
781 | border: none !important; | ||
782 | margin: 0; | ||
783 | } | ||
784 | |||
785 | &_header { | ||
786 | margin: 0 -5px !important; | ||
787 | } | ||
788 | |||
789 | &_title { | ||
790 | font-size: 14px; | ||
791 | color: #d7eaee; | ||
792 | margin: 3px 0; | ||
793 | } | ||
794 | } | ||
795 | } | ||
796 | |||
797 | // 数据上报弹出框 | ||
798 | .dataReporting { | ||
799 | .el-dialog__body { | ||
800 | display: flex; | ||
801 | flex-direction: column; | ||
802 | padding-bottom: 30px; | ||
803 | } | ||
804 | |||
805 | .el-tabs { | ||
806 | color: #cef8ff; | ||
807 | } | ||
808 | |||
809 | .d-center { | ||
810 | z-index: 1000; | ||
811 | } | ||
812 | |||
813 | .sjmx { | ||
814 | display: flex; | ||
815 | flex-direction: column; | ||
816 | height: 49vh; | ||
817 | |||
818 | .el-tabs__item { | ||
819 | height: 50px; | ||
820 | padding-top: 6px; | ||
821 | } | ||
822 | } | ||
823 | |||
824 | .result { | ||
825 | flex: 1; | ||
826 | height: 100%; | ||
827 | } | ||
828 | |||
829 | .editDialogBox-con { | ||
830 | flex: 1; | ||
831 | height: 100%; | ||
832 | overflow-y: hidden; | ||
833 | } | ||
834 | |||
835 | .el-tabs__item { | ||
836 | color: #cef8ff !important; | ||
837 | |||
838 | display: flex; | ||
839 | flex-direction: row; | ||
840 | justify-content: center; | ||
841 | background: url("~@/image/tabitem.png") no-repeat; | ||
842 | background-size: 100% 100%; | ||
843 | border: none !important; | ||
844 | } | ||
845 | |||
846 | .obligee-item-name { | ||
847 | background: #05275b; | ||
848 | color: #ffffff; | ||
849 | background: url("~@/image/itembg.png") no-repeat; | ||
850 | background-size: 100% 100%; | ||
851 | } | ||
852 | |||
853 | .el-tabs__nav-scroll { | ||
854 | background: none; | ||
855 | } | ||
856 | |||
857 | .el-tabs__nav { | ||
858 | display: flex; | ||
859 | border: none !important; | ||
860 | } | ||
861 | |||
862 | .el-tabs__item.is-top { | ||
863 | border: 1px solid #dfe4ed; | ||
864 | border-top: 1px solid #dfe4ed; | ||
865 | border-bottom: 1px solid transparent; | ||
866 | } | ||
867 | |||
868 | .el-tabs__header { | ||
869 | border: none; | ||
870 | margin-bottom: 0; | ||
871 | } | ||
872 | |||
873 | .el-tabs__item.is-top:not(:last-child) { | ||
874 | margin-right: 5px; | ||
875 | } | ||
876 | |||
877 | .el-tabs__item.is-top { | ||
878 | background-color: none !important; | ||
879 | } | ||
880 | |||
881 | .el-tabs__item.is-active { | ||
882 | background: url("~@/image/tabitemse.png") no-repeat; | ||
883 | background-size: 100% 100%; | ||
884 | } | ||
885 | |||
886 | .success-images { | ||
887 | width: 30px; | ||
888 | height: 30px; | ||
889 | position: relative; | ||
890 | top: 10px; | ||
891 | right: 3px; | ||
892 | } | ||
893 | |||
894 | .tab-pane-item { | ||
895 | line-height: 20px; | ||
896 | color: #02d9fd; | ||
897 | |||
898 | p { | ||
899 | text-align: center; | ||
900 | } | ||
901 | } | ||
902 | |||
903 | .edit-content { | ||
904 | overflow-y: auto; | ||
905 | overflow-x: hidden; | ||
906 | padding-right: 1px; | ||
907 | border-top: none; | ||
908 | } | ||
909 | |||
910 | .editDialogBox { | ||
911 | border-radius: 8px; | ||
912 | overflow: hidden; | ||
913 | min-width: 1228px; | ||
914 | |||
915 | .el-dialog__header { | ||
916 | display: flex; | ||
917 | margin-bottom: 10px; | ||
918 | } | ||
919 | |||
920 | .dialog_footer { | ||
921 | flex-direction: column; | ||
922 | |||
923 | .dialog_button { | ||
924 | margin-top: 8px; | ||
925 | } | ||
926 | } | ||
927 | |||
928 | .divider { | ||
929 | width: 100%; | ||
930 | border-bottom: 1px solid #ccc; | ||
931 | } | ||
932 | } | ||
933 | |||
934 | .el-dialog__wrapper { | ||
935 | overflow: hidden; | ||
936 | } | ||
937 | |||
938 | .dialog-from { | ||
939 | padding-top: 0; | ||
940 | |||
941 | .el-col { | ||
942 | justify-content: space-between; | ||
943 | } | ||
944 | |||
945 | .bz { | ||
946 | height: 100%; | ||
947 | position: relative; | ||
948 | top: 3px; | ||
949 | } | ||
950 | |||
951 | .el-select { | ||
952 | padding-right: 15px; | ||
953 | } | ||
954 | |||
955 | .el-icon-circle-close { | ||
956 | display: none; | ||
957 | } | ||
958 | |||
959 | .el-input__suffix { | ||
960 | right: -25px !important; | ||
961 | top: -5px; | ||
962 | } | ||
963 | |||
964 | .el-select, | ||
965 | .el-input { | ||
966 | flex: 1; | ||
967 | width: 100%; | ||
968 | } | ||
969 | |||
970 | .el-textarea__inner { | ||
971 | border: none !important; | ||
972 | margin: 0; | ||
973 | } | ||
974 | |||
975 | &_header { | ||
976 | margin: 0 -5px !important; | ||
977 | } | ||
978 | |||
979 | &_title { | ||
980 | font-size: 18px; | ||
981 | color: #d7eaee; | ||
982 | margin: 3px 0; | ||
983 | } | ||
984 | } | ||
985 | } | ||
986 | |||
987 | // 人员管理上下移动按钮样式 | ||
988 | .el-button.is-disabled.el-button--text { | ||
989 | width: 64px; | ||
990 | height: 28px; | ||
991 | background: rgba(255, 255, 255, 0.1); | ||
992 | border-radius: 16px; | ||
993 | } | ||
994 | |||
995 | // 人员管理角色管理菜单管理修改新增弹框样式 | ||
996 | .PersonnelDialog { | ||
997 | .el-dialog__header { | ||
998 | .dialog_title { | ||
999 | display: -webkit-box; | ||
1000 | display: -ms-flexbox; | ||
1001 | display: flex; | ||
1002 | position: relative; | ||
1003 | top: -7px; | ||
1004 | width: 29%; | ||
1005 | height: 40px; | ||
1006 | margin-left: 28px; | ||
1007 | -webkit-box-pack: center; | ||
1008 | -ms-flex-pack: center; | ||
1009 | justify-content: center; | ||
1010 | white-space: nowrap; | ||
1011 | |||
1012 | b { | ||
1013 | font-size: 16px; | ||
1014 | } | ||
1015 | } | ||
1016 | |||
1017 | .el-dialog__headerbtn { | ||
1018 | right: 20px !important; | ||
1019 | top: 23px !important; | ||
1020 | } | ||
1021 | } | ||
1022 | |||
1023 | .selbig { | ||
1024 | width: 500px; | ||
1025 | } | ||
1026 | } | ... | ... |
1 | @import '~@/styles/sbElement-ui.scss'; | 1 | @import '~@/styles/sbElement-ui.scss'; |
2 | @import "~@/styles/_handle.scss"; | ||
2 | 3 | ||
3 | .from-clues { | 4 | .from-clues { |
4 | height: 100%; | 5 | height: 100%; |
... | @@ -9,7 +10,7 @@ | ... | @@ -9,7 +10,7 @@ |
9 | 10 | ||
10 | &-header { | 11 | &-header { |
11 | width: 100%; | 12 | width: 100%; |
12 | padding: 15px; | 13 | padding: 10px 15px 10px 15px; |
13 | box-sizing: border-box; | 14 | box-sizing: border-box; |
14 | background-size: 100% 100%; | 15 | background-size: 100% 100%; |
15 | background: #FFFFFF; | 16 | background: #FFFFFF; |
... | @@ -96,7 +97,7 @@ | ... | @@ -96,7 +97,7 @@ |
96 | .cx { | 97 | .cx { |
97 | width: 86px; | 98 | width: 86px; |
98 | height: 32px; | 99 | height: 32px; |
99 | background-color: #4162D8; | 100 | @include background_color("btnBg"); |
100 | color: white; | 101 | color: white; |
101 | border: none; | 102 | border: none; |
102 | } | 103 | } |
... | @@ -104,7 +105,7 @@ | ... | @@ -104,7 +105,7 @@ |
104 | .cx:hover { | 105 | .cx:hover { |
105 | width: 86px; | 106 | width: 86px; |
106 | height: 32px; | 107 | height: 32px; |
107 | background-color: #4162D8; | 108 | @include background_color("btnBg"); |
108 | color: white; | 109 | color: white; |
109 | border: none; | 110 | border: none; |
110 | } | 111 | } |
... | @@ -113,8 +114,7 @@ | ... | @@ -113,8 +114,7 @@ |
113 | width: 86px; | 114 | width: 86px; |
114 | height: 32px; | 115 | height: 32px; |
115 | background-color: white; | 116 | background-color: white; |
116 | color: #4162D8; | 117 | @include font_color("btnColor"); |
117 | |||
118 | border: 1px solid rgba(65, 98, 216, 0.3); | 118 | border: 1px solid rgba(65, 98, 216, 0.3); |
119 | } | 119 | } |
120 | 120 | ||
... | @@ -122,23 +122,17 @@ | ... | @@ -122,23 +122,17 @@ |
122 | width: 86px; | 122 | width: 86px; |
123 | height: 32px; | 123 | height: 32px; |
124 | background-color: white; | 124 | background-color: white; |
125 | color: #4162D8; | 125 | @include font_color("btnColor"); |
126 | border: 1px solid rgba(65, 98, 216, 0.3); | 126 | border: 1px solid rgba(65, 98, 216, 0.3); |
127 | } | 127 | } |
128 | 128 | ||
129 | .el-button:focus { | ||
130 | // background: none; | ||
131 | } | ||
132 | |||
133 | .cx:focus { | 129 | .cx:focus { |
134 | color: white; | 130 | color: white; |
135 | background-color: #4162D8; | 131 | @include background_color("btnBg"); |
136 | background-size: cover; | 132 | background-size: cover; |
137 | } | 133 | } |
138 | 134 | ||
139 | .cz:focus { | 135 | .cz:focus { |
140 | color: #4162D8; | ||
141 | background-color: white; | 136 | background-color: white; |
142 | ; | ||
143 | background-size: cover; | 137 | background-size: cover; |
144 | } | 138 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-21 13:42:13 | 4 | * @LastEditTime: 2023-03-24 16:44:54 |
5 | */ | 5 | */ |
6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
7 | export default function getTheme (theme = Vue.prototype.BASE_API.THEME) { | 7 | export default function getTheme (theme = Vue.prototype.BASE_API.THEME) { |
8 | const resultMap = { | 8 | const resultMap = { |
9 | 'jg': function () { | 9 | 'jg': function () { |
10 | import("@/styles/jgPublic.scss") | 10 | return import("@/styles/jgPublic.scss"); |
11 | }, | 11 | }, |
12 | 'sb': function () { | 12 | 'sb': function () { |
13 | import("@/styles/sbPublic.scss") | 13 | return import("@/styles/sbPublic.scss"); |
14 | }, | 14 | }, |
15 | default: function () { | 15 | 'default': function () { |
16 | throw new Error(`Unsupported theme: ${theme}`); | ||
16 | }, | 17 | }, |
18 | }; | ||
19 | const result = resultMap[theme](); | ||
20 | if (result instanceof Promise) { | ||
21 | return result; | ||
22 | } else { | ||
23 | return resultMap.default(); | ||
17 | } | 24 | } |
18 | return resultMap[theme]() || resultMap.default() | 25 | } |
19 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="Cfdj from-clues"> | 2 | <div class="Cfdj from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="80px"> | 4 | <el-form ref="form" :model="form" label-width="80px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row> | 8 | <el-row> | ... | ... |
... | @@ -2,7 +2,8 @@ | ... | @@ -2,7 +2,8 @@ |
2 | <div class="dyaq from-clues"> | 2 | <div class="dyaq from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="120px"> | 4 | <el-form ref="form" :model="form" label-width="120px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | |||
6 | <Breadcrumb /> | 7 | <Breadcrumb /> |
7 | </el-form-item> | 8 | </el-form-item> |
8 | <el-row class="mb-5"> | 9 | <el-row class="mb-5"> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="from-clues"> | 2 | <div class="from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="150px"> | 4 | <el-form ref="form" :model="form" label-width="150px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row> | 8 | <el-row> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="fdcqdz from-clues"> | 2 | <div class="fdcqdz from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="120px"> | 4 | <el-form ref="form" :model="form" label-width="120px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row class="mb-5"> | 8 | <el-row class="mb-5"> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="fdcqqfsyq from-clues"> | 2 | <div class="fdcqqfsyq from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="80px"> | 4 | <el-form ref="form" :model="form" label-width="80px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row class="mb-5"> | 8 | <el-row class="mb-5"> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="fdcqyz from-clues"> | 2 | <div class="fdcqyz from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="120px"> | 4 | <el-form ref="form" :model="form" label-width="120px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row class="mb-5"> | 8 | <el-row class="mb-5"> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="gzwsyq from-clues"> | 2 | <div class="gzwsyq from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="105px"> | 4 | <el-form ref="form" :model="form" label-width="105px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row> | 8 | <el-row> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="hysyq from-clues"> | 2 | <div class="hysyq from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="105px"> | 4 | <el-form ref="form" :model="form" label-width="105px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row> | 8 | <el-row> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="jsydzjdsyq from-clues"> | 2 | <div class="jsydzjdsyq from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="120px"> | 4 | <el-form ref="form" :model="form" label-width="120px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row class="mb-5"> | 8 | <el-row class="mb-5"> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="lq from-clues"> | 2 | <div class="lq from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="105px"> | 4 | <el-form ref="form" :model="form" label-width="105px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row> | 8 | <el-row> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="from-clues"> | 2 | <div class="from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="105px"> | 4 | <el-form ref="form" :model="form" label-width="105px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row> | 8 | <el-row> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="tdsyq from-clues"> | 2 | <div class="tdsyq from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="120px"> | 4 | <el-form ref="form" :model="form" label-width="120px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row class="mb-5"> | 8 | <el-row class="mb-5"> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="from-clues"> | 2 | <div class="from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="110px"> | 4 | <el-form ref="form" :model="form" label-width="110px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row class="mb-5"> | 8 | <el-row class="mb-5"> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="from-clues"> | 2 | <div class="from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="105px"> | 4 | <el-form ref="form" :model="form" label-width="105px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row> | 8 | <el-row> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="cancellationReg from-clues"> | 2 | <div class="cancellationReg from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="105px"> | 4 | <el-form ref="form" :model="form" label-width="105px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row> | 8 | <el-row> | ... | ... |
... | @@ -22,7 +22,6 @@ | ... | @@ -22,7 +22,6 @@ |
22 | </div> | 22 | </div> |
23 | </template> | 23 | </template> |
24 | <script> | 24 | <script> |
25 | import { getMenuInfo } from "@/api/user"; | ||
26 | import { loginIn } from "@/api/login.js"; | 25 | import { loginIn } from "@/api/login.js"; |
27 | export default { | 26 | export default { |
28 | name: "jgLogin", | 27 | name: "jgLogin", | ... | ... |
... | @@ -108,10 +108,10 @@ export default { | ... | @@ -108,10 +108,10 @@ export default { |
108 | if (valid) { | 108 | if (valid) { |
109 | let res = await loginIn(self.user.account, self.user.password) | 109 | let res = await loginIn(self.user.account, self.user.password) |
110 | if (res.status == 1) { | 110 | if (res.status == 1) { |
111 | let code = this.BASE_API.THEME == "sb" ? "BDCSBPT" : "BDCJGPT" | 111 | let code = this.BASE_API.CODE; |
112 | localStorage.setItem("token", `Bearer ${res.content}`); | 112 | localStorage.setItem("token", `Bearer ${res.content}`); |
113 | const { result: getMenuData } = (await getMenuInfo(code)) || []; | 113 | const { result: getMenuData } = (await getMenuInfo(code)) || []; |
114 | let path1 = JSON.parse(getMenuData[0].metadata)?.path + '/' + JSON.parse(getMenuData[0].children[0].metadata)?.path | 114 | let path1 = JSON.parse(getMenuData[1].metadata)?.path + '/' + JSON.parse(getMenuData[1].children[0].metadata)?.path |
115 | //登录成功后需判断有无重定向,没有重定向则跳转首页 | 115 | //登录成功后需判断有无重定向,没有重定向则跳转首页 |
116 | const accessRoutes = await this.$store.dispatch( | 116 | const accessRoutes = await this.$store.dispatch( |
117 | "permission/generateRoutes", | 117 | "permission/generateRoutes", | ... | ... |
1 | <template> | 1 | <template> |
2 | <el-dialog :close-on-click-modal="false" top="0" @close="closeDialog" custom-class="dialogBox editDialogBox mainCenter" | 2 | <el-dialog :close-on-click-modal="false" top="0" @close="closeDialog" custom-class="dialogBox entryJournal editDialogBox mainCenter" |
3 | :visible.sync="dialogVisible" width="90%"> | 3 | :visible.sync="dialogVisible" width="90%"> |
4 | <div slot="title" class="dialog_title" ref="dialogTitle"> | 4 | <div slot="title" class="dialog_title" ref="dialogTitle"> |
5 | {{ title || '登薄日志' }} | 5 | {{ title || '登薄日志' }} |
... | @@ -458,119 +458,5 @@ | ... | @@ -458,119 +458,5 @@ |
458 | } | 458 | } |
459 | </script> | 459 | </script> |
460 | <style scoped lang="scss"> | 460 | <style scoped lang="scss"> |
461 | // @import "~@/styles/mixin.scss"; | ||
462 | // @import "~@/styles/dialogBox.scss"; | ||
463 | |||
464 | /deep/.el-tabs__header { | ||
465 | margin: 0; | ||
466 | } | ||
467 | |||
468 | /deep/.el-dialog { | ||
469 | display: flex; | ||
470 | flex-direction: column; | ||
471 | } | ||
472 | |||
473 | /deep/.el-dialog__body { | ||
474 | display: flex; | ||
475 | flex-direction: column; | ||
476 | padding-bottom: 30px; | ||
477 | height: 100%; | ||
478 | flex: 1; | ||
479 | position: relative; | ||
480 | } | ||
481 | |||
482 | .regularHeight { | ||
483 | display: flex; | ||
484 | flex-direction: column; | ||
485 | height: 87vh; | ||
486 | margin-bottom: 5px; | ||
487 | |||
488 | .editDialogBox-con, | ||
489 | .JsonEditor { | ||
490 | flex: 1; | ||
491 | } | ||
492 | } | ||
493 | |||
494 | .d-center { | ||
495 | } | ||
496 | |||
497 | .dialog_title { | ||
498 | top: -13px; | ||
499 | } | ||
500 | |||
501 | /deep/.el-tabs__item { | ||
502 | color: #cef8ff !important; | ||
503 | |||
504 | display: flex; | ||
505 | flex-direction: row; | ||
506 | justify-content: center; | ||
507 | background: url("~@/image/tabitem.png") no-repeat; | ||
508 | background-size: 100% 100%; | ||
509 | border: none !important; | ||
510 | } | ||
511 | |||
512 | /deep/.el-tabs__nav { | ||
513 | display: flex; | ||
514 | border: none !important; | ||
515 | } | ||
516 | |||
517 | /deep/.el-tabs__item.is-top:not(:last-child) { | ||
518 | margin-right: 5px; | ||
519 | } | ||
520 | |||
521 | /deep/.el-icon-circle-close { | ||
522 | display: none; | ||
523 | } | ||
524 | |||
525 | /deep/.el-tabs__item.is-active { | ||
526 | background: url("~@/image/tabitemse.png") no-repeat; | ||
527 | background-size: 100% 100%; | ||
528 | } | ||
529 | |||
530 | .from-clues-content { | ||
531 | margin-top: 0; | ||
532 | background: none; | ||
533 | padding: 0; | ||
534 | } | ||
535 | |||
536 | .editDialogBox-box { | ||
537 | position: relative; | ||
538 | top: 10px; | ||
539 | height: 100%; | ||
540 | } | ||
541 | |||
542 | .dialog-from { | ||
543 | padding-top: 0; | ||
544 | |||
545 | .el-col { | ||
546 | justify-content: space-between; | ||
547 | } | ||
548 | |||
549 | .bz { | ||
550 | height: 100%; | ||
551 | position: relative; | ||
552 | top: 3px; | ||
553 | } | ||
554 | |||
555 | /deep/.el-input { | ||
556 | flex: 1; | ||
557 | width: 100%; | ||
558 | } | ||
559 | |||
560 | /deep/.el-textarea__inner { | ||
561 | border: none !important; | ||
562 | margin: 0; | ||
563 | } | ||
564 | |||
565 | &_header { | ||
566 | margin: 0 -5px !important; | ||
567 | } | ||
568 | |||
569 | &_title { | ||
570 | font-size: 14px; | ||
571 | color: #d7eaee; | ||
572 | margin: 3px 0; | ||
573 | } | ||
574 | } | ||
575 | </style> | 461 | </style> |
576 | 462 | ... | ... |
... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
4 | <!-- 头部搜索 --> | 4 | <!-- 头部搜索 --> |
5 | <div class="from-clues-header"> | 5 | <div class="from-clues-header"> |
6 | <el-form ref="ruleForm" :model="form" label-width="80px"> | 6 | <el-form ref="ruleForm" :model="form" label-width="80px"> |
7 | <el-form-item> | 7 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
8 | <Breadcrumb /> | 8 | <Breadcrumb /> |
9 | </el-form-item> | 9 | </el-form-item> |
10 | <el-row> | 10 | <el-row> | ... | ... |
... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
4 | <!-- 头部搜索 --> | 4 | <!-- 头部搜索 --> |
5 | <div class="from-clues-header"> | 5 | <div class="from-clues-header"> |
6 | <el-form ref="ruleForm" :model="form" label-width="100px"> | 6 | <el-form ref="ruleForm" :model="form" label-width="100px"> |
7 | <el-form-item> | 7 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
8 | <Breadcrumb /> | 8 | <Breadcrumb /> |
9 | </el-form-item> | 9 | </el-form-item> |
10 | <el-row class="mb-5"> | 10 | <el-row class="mb-5"> | ... | ... |
... | @@ -3,7 +3,7 @@ | ... | @@ -3,7 +3,7 @@ |
3 | <!-- 表单部分 --> | 3 | <!-- 表单部分 --> |
4 | <div class="from-clues-header"> | 4 | <div class="from-clues-header"> |
5 | <el-form @submit.native.prevent :model="ruleForm" label-width="120px"> | 5 | <el-form @submit.native.prevent :model="ruleForm" label-width="120px"> |
6 | <el-form-item> | 6 | <el-form-item v-if="BASE_API.THEME == 'jg'"> |
7 | <Breadcrumb /> | 7 | <Breadcrumb /> |
8 | </el-form-item> | 8 | </el-form-item> |
9 | <el-row :gutter="20"> | 9 | <el-row :gutter="20"> | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Author: xiaomiao 1158771342@qq.com | 2 | * @Author: xiaomiao 1158771342@qq.com |
3 | * @Date: 2023-03-09 20:54:28 | 3 | * @Date: 2023-03-09 20:54:28 |
4 | * @LastEditors: xiaomiao 1158771342@qq.com | 4 | * @LastEditors: Please set LastEditors |
5 | * @LastEditTime: 2023-03-16 19:40:40 | 5 | * @LastEditTime: 2023-03-27 09:13:22 |
6 | * @FilePath: \上报\bdcjg-web\src\views\system\information\index.vue | 6 | * @FilePath: \上报\bdcjg-web\src\views\system\information\index.vue |
7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
8 | --> | 8 | --> |
... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
10 | <div class="information from-clues"> | 10 | <div class="information from-clues"> |
11 | <div class="from-clues-header"> | 11 | <div class="from-clues-header"> |
12 | <el-form ref="ruleForm" label-width="100px"> | 12 | <el-form ref="ruleForm" label-width="100px"> |
13 | <el-form-item> | 13 | <el-form-item v-if="BASE_API.THEME == 'jg'"> |
14 | <Breadcrumb /> | 14 | <Breadcrumb /> |
15 | </el-form-item> | 15 | </el-form-item> |
16 | <el-row class="mb-5"> | 16 | <el-row class="mb-5"> |
... | @@ -34,60 +34,64 @@ | ... | @@ -34,60 +34,64 @@ |
34 | </div> | 34 | </div> |
35 | </template> | 35 | </template> |
36 | <script> | 36 | <script> |
37 | import "@/utils/flexible.js"; | 37 | import "@/utils/flexible.js"; |
38 | import BaseSet from "./base-set.vue"; | 38 | import BaseSet from "./base-set.vue"; |
39 | import PasswordEdit from "./password-edit.vue"; | 39 | import PasswordEdit from "./password-edit.vue"; |
40 | export default { | 40 | export default { |
41 | components: { | 41 | components: { |
42 | BaseSet, | 42 | BaseSet, |
43 | PasswordEdit, | 43 | PasswordEdit, |
44 | }, | ||
45 | data () { | ||
46 | return { | ||
47 | isshow: true, | ||
48 | }; | ||
49 | }, | ||
50 | computed: { | ||
51 | userData () { | ||
52 | return this.$store.state.user.userInfo; | ||
44 | }, | 53 | }, |
45 | data () { | 54 | }, |
46 | return { | 55 | watch: {}, |
47 | isshow: true, | 56 | created () { }, |
48 | }; | 57 | mounted () { }, |
58 | methods: { | ||
59 | information () { | ||
60 | this.isshow = true; | ||
49 | }, | 61 | }, |
50 | computed: { | 62 | password () { |
51 | userData () { | 63 | this.isshow = false; |
52 | return this.$store.state.user.userInfo; | ||
53 | }, | ||
54 | }, | 64 | }, |
55 | watch: {}, | 65 | }, |
56 | created () { }, | 66 | }; |
57 | mounted () { }, | ||
58 | methods: { | ||
59 | information () { | ||
60 | this.isshow = true; | ||
61 | }, | ||
62 | password () { | ||
63 | this.isshow = false; | ||
64 | }, | ||
65 | }, | ||
66 | }; | ||
67 | </script> | 67 | </script> |
68 | 68 | ||
69 | <style scoped lang="scss"> | 69 | <style scoped lang="scss"> |
70 | @import "~@/styles/mixin.scss"; | 70 | @import "~@/styles/mixin.scss"; |
71 | .information { | 71 | |
72 | .information { | ||
73 | display: flex; | ||
74 | flex-direction: column; | ||
75 | |||
76 | .btnColRight { | ||
77 | margin-top: 10px; | ||
72 | display: flex; | 78 | display: flex; |
73 | flex-direction: column; | 79 | justify-content: center; |
74 | .btnColRight { | 80 | // background-color: cadetblue; |
75 | margin-top: 10px; | 81 | height: 30px; |
76 | display: flex; | 82 | } |
77 | justify-content: center; | 83 | |
78 | // background-color: cadetblue; | 84 | /deep/.content { |
79 | height: 30px; | 85 | .el-input__inner { |
80 | } | 86 | background: none; |
81 | /deep/.content { | ||
82 | .el-input__inner { | ||
83 | background: none; | ||
84 | } | ||
85 | .user-info { | ||
86 | background: none; | ||
87 | } | ||
88 | } | 87 | } |
89 | .boxin { | 88 | |
90 | flex: 1; | 89 | .user-info { |
90 | background: none; | ||
91 | } | 91 | } |
92 | } | 92 | } |
93 | </style> | 93 | |
94 | .boxin { | ||
95 | flex: 1; | ||
96 | } | ||
97 | }</style> | ... | ... |
1 | <template> | 1 | <template> |
2 | <dialogBox class="modifydialog" :isMain="true" width="40%" :title="title" @closeDialog="close" @submitForm="submitForm" | 2 | <dialogBox class="modifydialog PersonnelDialog" :isMain="true" width="40%" :title="title" @closeDialog="close" @submitForm="submitForm" |
3 | v-model="myValue"> | 3 | v-model="myValue"> |
4 | <div class="dialogCon"> | 4 | <div class="dialogCon"> |
5 | <el-form ref="form" :model="form" :rules="rules"> | 5 | <el-form ref="form" :model="form" :rules="rules"> |
... | @@ -63,208 +63,208 @@ | ... | @@ -63,208 +63,208 @@ |
63 | </template> | 63 | </template> |
64 | 64 | ||
65 | <script> | 65 | <script> |
66 | import { getParentMenuListAction } from '@/api/authorityManage' | 66 | import { getParentMenuListAction } from '@/api/authorityManage' |
67 | import IconList from '../../../components/IconList' | 67 | import IconList from '../../../components/IconList' |
68 | import JsonEditor from '@/components/JsonEditors' | 68 | import JsonEditor from '@/components/JsonEditors' |
69 | import { validateCode } from '@/utils/validate'; | 69 | import { validateCode } from '@/utils/validate'; |
70 | import { api, httpAction } from '@/api/manageApi' | 70 | import { api, httpAction } from '@/api/manageApi' |
71 | export default { | 71 | export default { |
72 | name: 'MenuModal', | 72 | name: 'MenuModal', |
73 | components: { | 73 | components: { |
74 | JsonEditor, | 74 | JsonEditor, |
75 | IconList, | 75 | IconList, |
76 | }, | ||
77 | props: { | ||
78 | value: { type: Boolean, default: false }, | ||
79 | productId: { | ||
80 | type: String, | ||
81 | default: '' | ||
82 | } | ||
83 | }, | ||
84 | data () { | ||
85 | return { | ||
86 | myValue: this.value, | ||
87 | form: { | ||
88 | icon: '', | ||
89 | code: '' | ||
90 | }, | ||
91 | rules: { | ||
92 | name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }], | ||
93 | code: [ | ||
94 | { required: true, message: '必填', trigger: 'blur' }, | ||
95 | { validator: validateCode, trigger: 'blur' } | ||
96 | ] | ||
97 | }, | ||
98 | title: '', | ||
99 | type: '', | ||
100 | visible: false, | ||
101 | parentMenuList: [], | ||
102 | menuKey: 0, | ||
103 | jumpModeList: [ | ||
104 | { name: '在当前页面显示', value: 1 }, | ||
105 | { name: '跳转到新页面', value: 2 } | ||
106 | ], | ||
107 | setProps: { | ||
108 | value: 'id', | ||
109 | label: 'name', | ||
110 | children: 'children', | ||
111 | expandTrigger: 'hover', | ||
112 | checkStrictly: true, // 可取消关联,选择任意一级选项 | ||
113 | emitPath: false | ||
114 | }, | ||
115 | dataUrl: api.menus | ||
116 | } | ||
117 | }, | ||
118 | computed: { | ||
119 | codeComputed: { | ||
120 | get: function () { | ||
121 | return this.form.code | ||
122 | }, | ||
123 | set: function (val) { | ||
124 | this.form.code = val.toUpperCase() | ||
125 | } | ||
126 | } | ||
127 | }, | ||
128 | watch: { | ||
129 | value (val) { | ||
130 | this.myValue = val | ||
131 | } | ||
132 | }, | ||
133 | methods: { | ||
134 | // 获取父级菜单 | ||
135 | getParentMenuList (id) { | ||
136 | |||
137 | getParentMenuListAction(id).then((res) => { | ||
138 | if (res.status === 1) { | ||
139 | const list = this.$dealArrChildren(res.content) | ||
140 | if (id) { | ||
141 | this.parentMenuList = this.$dealArrDisabled( | ||
142 | this.$deepCopy(list), | ||
143 | id | ||
144 | ) | ||
145 | this.menuKey++ | ||
146 | } else { | ||
147 | this.parentMenuList = list | ||
148 | } | ||
149 | } else { | ||
150 | this.$message.error({ message: res.message, showClose: true }) | ||
151 | } | ||
152 | }) | ||
153 | }, | ||
154 | // 选择图标 | ||
155 | getIconName (data) { | ||
156 | this.form.icon = data; | ||
157 | }, | 76 | }, |
158 | getIconList () { | 77 | props: { |
159 | this.$refs.iconList.show(true) | 78 | value: { type: Boolean, default: false }, |
160 | }, | 79 | productId: { |
161 | getIconName (data) { | 80 | type: String, |
162 | this.form.icon = data | 81 | default: '' |
163 | }, | 82 | } |
164 | // 配置参数 | ||
165 | getJsonString (data) { | ||
166 | this.form.metadata = data | ||
167 | }, | 83 | }, |
168 | // 新增菜单 | 84 | data () { |
169 | add () { | 85 | return { |
170 | this.getParentMenuList(this.productId) | 86 | myValue: this.value, |
171 | this.type = 0 | 87 | form: { |
172 | this.form.jumpMode = 1 | 88 | icon: '', |
89 | code: '' | ||
90 | }, | ||
91 | rules: { | ||
92 | name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }], | ||
93 | code: [ | ||
94 | { required: true, message: '必填', trigger: 'blur' }, | ||
95 | { validator: validateCode, trigger: 'blur' } | ||
96 | ] | ||
97 | }, | ||
98 | title: '', | ||
99 | type: '', | ||
100 | visible: false, | ||
101 | parentMenuList: [], | ||
102 | menuKey: 0, | ||
103 | jumpModeList: [ | ||
104 | { name: '在当前页面显示', value: 1 }, | ||
105 | { name: '跳转到新页面', value: 2 } | ||
106 | ], | ||
107 | setProps: { | ||
108 | value: 'id', | ||
109 | label: 'name', | ||
110 | children: 'children', | ||
111 | expandTrigger: 'hover', | ||
112 | checkStrictly: true, // 可取消关联,选择任意一级选项 | ||
113 | emitPath: false | ||
114 | }, | ||
115 | dataUrl: api.menus | ||
116 | } | ||
173 | }, | 117 | }, |
174 | // 编辑菜单 | 118 | computed: { |
175 | edit (record) { | 119 | codeComputed: { |
176 | this.type = 1 | 120 | get: function () { |
177 | // 若有id为编辑 | 121 | return this.form.code |
178 | if (record.id) { | 122 | }, |
179 | this.$nextTick(() => { | 123 | set: function (val) { |
180 | this.form = Object.assign({}, record) | 124 | this.form.code = val.toUpperCase() |
181 | this.getParentMenuList(this.productId) | 125 | } |
182 | }) | ||
183 | } | 126 | } |
184 | }, | 127 | }, |
185 | // 选择上级菜单 | 128 | watch: { |
186 | handleChange (value) { | 129 | value (val) { |
187 | this.form.parentId = value | 130 | this.myValue = val |
131 | } | ||
188 | }, | 132 | }, |
189 | // 保存 | 133 | methods: { |
190 | submitForm (submitType) { | 134 | // 获取父级菜单 |
191 | this.$refs.form.validate((valid) => { | 135 | getParentMenuList (id) { |
192 | if (valid) { | 136 | |
193 | let method = '' | 137 | getParentMenuListAction(id).then((res) => { |
194 | let url = '' | 138 | if (res.status === 1) { |
195 | const formData = this.form | 139 | const list = this.$dealArrChildren(res.content) |
196 | formData.productId = this.productId | 140 | if (id) { |
197 | if (!formData.id) { | 141 | this.parentMenuList = this.$dealArrDisabled( |
198 | method = 'post' | 142 | this.$deepCopy(list), |
199 | url = this.dataUrl | 143 | id |
144 | ) | ||
145 | this.menuKey++ | ||
146 | } else { | ||
147 | this.parentMenuList = list | ||
148 | } | ||
200 | } else { | 149 | } else { |
201 | method = 'put' | 150 | this.$message.error({ message: res.message, showClose: true }) |
202 | url = `${this.dataUrl}/${formData.id}` | ||
203 | } | 151 | } |
204 | httpAction(url, formData, method) | 152 | }) |
205 | .then((res) => { | 153 | }, |
206 | if (res.status === 1) { | 154 | // 选择图标 |
207 | this.$message.success({ | 155 | getIconName (data) { |
208 | message: res.message, | 156 | this.form.icon = data; |
209 | showClose: true | 157 | }, |
210 | }) | 158 | getIconList () { |
159 | this.$refs.iconList.show(true) | ||
160 | }, | ||
161 | getIconName (data) { | ||
162 | this.form.icon = data | ||
163 | }, | ||
164 | // 配置参数 | ||
165 | getJsonString (data) { | ||
166 | this.form.metadata = data | ||
167 | }, | ||
168 | // 新增菜单 | ||
169 | add () { | ||
170 | this.getParentMenuList(this.productId) | ||
171 | this.type = 0 | ||
172 | this.form.jumpMode = 1 | ||
173 | }, | ||
174 | // 编辑菜单 | ||
175 | edit (record) { | ||
176 | this.type = 1 | ||
177 | // 若有id为编辑 | ||
178 | if (record.id) { | ||
179 | this.$nextTick(() => { | ||
180 | this.form = Object.assign({}, record) | ||
181 | this.getParentMenuList(this.productId) | ||
182 | }) | ||
183 | } | ||
184 | }, | ||
185 | // 选择上级菜单 | ||
186 | handleChange (value) { | ||
187 | this.form.parentId = value | ||
188 | }, | ||
189 | // 保存 | ||
190 | submitForm (submitType) { | ||
191 | this.$refs.form.validate((valid) => { | ||
192 | if (valid) { | ||
193 | let method = '' | ||
194 | let url = '' | ||
195 | const formData = this.form | ||
196 | formData.productId = this.productId | ||
197 | if (!formData.id) { | ||
198 | method = 'post' | ||
199 | url = this.dataUrl | ||
200 | } else { | ||
201 | method = 'put' | ||
202 | url = `${this.dataUrl}/${formData.id}` | ||
203 | } | ||
204 | httpAction(url, formData, method) | ||
205 | .then((res) => { | ||
206 | if (res.status === 1) { | ||
207 | this.$message.success({ | ||
208 | message: res.message, | ||
209 | showClose: true | ||
210 | }) | ||
211 | 211 | ||
212 | this.resetForm() | 212 | this.resetForm() |
213 | this.$emit('ok') | 213 | this.$emit('ok') |
214 | } else { | 214 | } else { |
215 | this.$message.error({ message: res.message, showClose: true }) | 215 | this.$message.error({ message: res.message, showClose: true }) |
216 | } | 216 | } |
217 | }) | 217 | }) |
218 | .catch((err) => { | 218 | .catch((err) => { |
219 | console.log(err) | 219 | console.log(err) |
220 | }) | 220 | }) |
221 | } | ||
222 | }) | ||
223 | }, | ||
224 | resetForm () { | ||
225 | this.$refs.form.resetFields() | ||
226 | this.form = { | ||
227 | icon: '', | ||
228 | code: '' | ||
221 | } | 229 | } |
222 | }) | 230 | }, |
223 | }, | 231 | close () { |
224 | resetForm () { | 232 | this.resetForm() |
225 | this.$refs.form.resetFields() | 233 | this.$emit('input', false) |
226 | this.form = { | ||
227 | icon: '', | ||
228 | code: '' | ||
229 | } | 234 | } |
230 | }, | ||
231 | close () { | ||
232 | this.resetForm() | ||
233 | this.$emit('input', false) | ||
234 | } | 235 | } |
235 | } | 236 | } |
236 | } | ||
237 | </script> | 237 | </script> |
238 | <style scoped lang="scss"> | 238 | <style scoped lang="scss"> |
239 | .modifydialog { | 239 | // .modifydialog { |
240 | &-con { | 240 | // &-con { |
241 | background: #031a46; | 241 | // background: #031a46; |
242 | } | 242 | // } |
243 | 243 | ||
244 | /deep/.el-dialog__header { | 244 | // /deep/.el-dialog__header { |
245 | .dialog_title { | 245 | // .dialog_title { |
246 | display: -webkit-box; | 246 | // display: -webkit-box; |
247 | display: -ms-flexbox; | 247 | // display: -ms-flexbox; |
248 | display: flex; | 248 | // display: flex; |
249 | position: relative; | 249 | // position: relative; |
250 | top: -8px; | 250 | // top: -8px; |
251 | width: 28%; | 251 | // width: 28%; |
252 | height: 40px; | 252 | // height: 40px; |
253 | margin-left: 28px; | 253 | // margin-left: 28px; |
254 | -webkit-box-pack: center; | 254 | // -webkit-box-pack: center; |
255 | -ms-flex-pack: center; | 255 | // -ms-flex-pack: center; |
256 | justify-content: center; | 256 | // justify-content: center; |
257 | white-space: nowrap; | 257 | // white-space: nowrap; |
258 | 258 | ||
259 | b { | 259 | // b { |
260 | font-size: 16px; | 260 | // font-size: 16px; |
261 | } | 261 | // } |
262 | } | 262 | // } |
263 | 263 | ||
264 | .el-dialog__headerbtn { | 264 | // .el-dialog__headerbtn { |
265 | right: 20px !important; | 265 | // right: 20px !important; |
266 | top: 23px !important; | 266 | // top: 23px !important; |
267 | } | 267 | // } |
268 | } | 268 | // } |
269 | } | 269 | // } |
270 | </style> | 270 | </style> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="timedTask from-clues"> | 2 | <div class="timedTask from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="ruleForm" :model="form" label-width="100px"> | 4 | <el-form ref="ruleForm" :model="form" label-width="100px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME == 'jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row class="mb-5"> | 8 | <el-row class="mb-5"> |
... | @@ -29,181 +29,181 @@ | ... | @@ -29,181 +29,181 @@ |
29 | </div> | 29 | </div> |
30 | </template> | 30 | </template> |
31 | <script> | 31 | <script> |
32 | // 定时任务 | 32 | // 定时任务 |
33 | import data from "./data"; | 33 | import data from "./data"; |
34 | import { deleteAction, getAction, api } from "@/api/manageApi"; | 34 | import { deleteAction, getAction, api } from "@/api/manageApi"; |
35 | import EditDialog from "./edit-dialog.vue"; | 35 | import EditDialog from "./edit-dialog.vue"; |
36 | import { mapGetters } from "vuex"; | 36 | import { mapGetters } from "vuex"; |
37 | import { getMenuInfo } from "@/api/user"; | 37 | import { getMenuInfo } from "@/api/user"; |
38 | import { | 38 | import { |
39 | getUuid, | 39 | getUuid, |
40 | judgeSort, | 40 | judgeSort, |
41 | realMove, | 41 | realMove, |
42 | findParents, | 42 | findParents, |
43 | removeTreeListItem, | 43 | removeTreeListItem, |
44 | } from "@/utils/operation"; | 44 | } from "@/utils/operation"; |
45 | export default { | 45 | export default { |
46 | name: "menus", | 46 | name: "menus", |
47 | components: { | 47 | components: { |
48 | EditDialog, | 48 | EditDialog, |
49 | }, | 49 | }, |
50 | data () { | 50 | data () { |
51 | return { | 51 | return { |
52 | isDialog: false, | 52 | isDialog: false, |
53 | tablelistData: [], | 53 | tablelistData: [], |
54 | listData: [], | 54 | listData: [], |
55 | resourceCategoryId: "", | 55 | resourceCategoryId: "", |
56 | taskData: null, | 56 | taskData: null, |
57 | form: { | 57 | form: { |
58 | menuName: "", | 58 | menuName: "", |
59 | }, | 59 | }, |
60 | title: "", | 60 | title: "", |
61 | queryParam: {}, | 61 | queryParam: {}, |
62 | selectType: "0", | 62 | selectType: "0", |
63 | queryName: "", | 63 | queryName: "", |
64 | organizationId: "", // 组织机构ID | 64 | organizationId: "", // 组织机构ID |
65 | departmentId: "", // 部门ID | 65 | departmentId: "", // 部门ID |
66 | departmentList: [], // 部门列表 | 66 | departmentList: [], // 部门列表 |
67 | levelList: [], // 职务级别 | 67 | levelList: [], // 职务级别 |
68 | sexList: [], | 68 | sexList: [], |
69 | 69 | ||
70 | selectionList: [], | 70 | selectionList: [], |
71 | tableData: { | 71 | tableData: { |
72 | columns: [].concat(data.columns()).concat([ | 72 | columns: [].concat(data.columns()).concat([ |
73 | { | 73 | { |
74 | label: "操作", | 74 | label: "操作", |
75 | width: 380, | 75 | width: 380, |
76 | render: (h, scope) => { | 76 | render: (h, scope) => { |
77 | return ( | 77 | return ( |
78 | <div> | 78 | <div> |
79 | <el-button | 79 | <el-button |
80 | type="text" | 80 | type="text" |
81 | class='successColor' | 81 | class='successColor' |
82 | onClick={() => { | 82 | onClick={() => { |
83 | this.handleEdit(scope.row); | 83 | this.handleEdit(scope.row); |
84 | }} | 84 | }} |
85 | > | 85 | > |
86 | 修改 | 86 | 修改 |
87 | </el-button> | 87 | </el-button> |
88 | 88 | ||
89 | <el-button | 89 | <el-button |
90 | type="text" | 90 | type="text" |
91 | class='delColor' | 91 | class='delColor' |
92 | onClick={() => { | 92 | onClick={() => { |
93 | this.handleDelete(scope.row.id, scope.row.name); | 93 | this.handleDelete(scope.row.id, scope.row.name); |
94 | }} | 94 | }} |
95 | > | 95 | > |
96 | 删除 | 96 | 删除 |
97 | </el-button> | 97 | </el-button> |
98 | </div> | 98 | </div> |
99 | ); | 99 | ); |
100 | }, | ||
101 | }, | 100 | }, |
102 | ]), | 101 | }, |
103 | data: [], | 102 | ]), |
104 | }, | 103 | data: [], |
105 | tableUrl: api.menus, // 菜单接口地址 | ||
106 | meumurlid: api.subsystem,// 项目id接口地址 | ||
107 | productId: ""//项目id | ||
108 | }; | ||
109 | }, | ||
110 | created () { | ||
111 | this.getTableList(); | ||
112 | }, | ||
113 | computed: { | ||
114 | ...mapGetters(["products"]) | ||
115 | }, | ||
116 | methods: { | ||
117 | //查询 | ||
118 | searchQuery () { | ||
119 | if (this.form.menuName) { | ||
120 | this.tablelistData = this.childrenFn(this.listData, this.form.menuName); | ||
121 | } else { | ||
122 | this.getTableList() | ||
123 | } | ||
124 | }, | 104 | }, |
125 | childrenFn (arr, key) { | 105 | tableUrl: api.menus, // 菜单接口地址 |
126 | const that = this; | 106 | meumurlid: api.subsystem,// 项目id接口地址 |
127 | let searchTree = []; | 107 | productId: ""//项目id |
128 | arr.forEach((item, index) => { | 108 | }; |
129 | if (item.children != undefined && item.children.length != 0) { | 109 | }, |
130 | let leaf = that.childrenFn(item.children, key); | 110 | created () { |
131 | if (leaf != undefined) { | 111 | this.getTableList(); |
132 | let { name, code, resourceCategoryId, id, iproductId, operations, metadata } = item; | 112 | }, |
133 | let parentObj = { | 113 | computed: { |
134 | code, name, resourceCategoryId, id, iproductId, operations, metadata, children: leaf | 114 | ...mapGetters(["products"]) |
135 | }; | 115 | }, |
136 | searchTree.push(parentObj); | 116 | methods: { |
137 | } else { | 117 | //查询 |
138 | if (item.name.indexOf(key) != -1) { | 118 | searchQuery () { |
139 | searchTree.push(item); | 119 | if (this.form.menuName) { |
140 | } | 120 | this.tablelistData = this.childrenFn(this.listData, this.form.menuName); |
141 | } | 121 | } else { |
122 | this.getTableList() | ||
123 | } | ||
124 | }, | ||
125 | childrenFn (arr, key) { | ||
126 | const that = this; | ||
127 | let searchTree = []; | ||
128 | arr.forEach((item, index) => { | ||
129 | if (item.children != undefined && item.children.length != 0) { | ||
130 | let leaf = that.childrenFn(item.children, key); | ||
131 | if (leaf != undefined) { | ||
132 | let { name, code, resourceCategoryId, id, iproductId, operations, metadata } = item; | ||
133 | let parentObj = { | ||
134 | code, name, resourceCategoryId, id, iproductId, operations, metadata, children: leaf | ||
135 | }; | ||
136 | searchTree.push(parentObj); | ||
142 | } else { | 137 | } else { |
143 | if (item.name.indexOf(key) != -1) { | 138 | if (item.name.indexOf(key) != -1) { |
144 | |||
145 | searchTree.push(item); | 139 | searchTree.push(item); |
146 | } | 140 | } |
147 | } | 141 | } |
148 | }); | 142 | } else { |
149 | if (searchTree != undefined && searchTree.length != 0) { | 143 | if (item.name.indexOf(key) != -1) { |
150 | return searchTree; | 144 | |
151 | } | 145 | searchTree.push(item); |
152 | }, | ||
153 | // 加载表格数据 | ||
154 | getTableList () { | ||
155 | getMenuInfo(sessionStorage.getItem("products")).then((res) => { | ||
156 | if (res.code === 200) { | ||
157 | this.tablelistData = judgeSort(res.result) | ||
158 | this.listData = this.tablelistData | ||
159 | } else { | ||
160 | this.$message.error({ message: res.message, showClose: true }) | ||
161 | } | 146 | } |
162 | }) | 147 | } |
163 | const queryOptionsid = { | 148 | }); |
164 | conditionGroup: { | 149 | if (searchTree != undefined && searchTree.length != 0) { |
165 | queryRelation: "AND", | 150 | return searchTree; |
166 | conditions: [ | 151 | } |
167 | { | 152 | }, |
168 | property: "code", | 153 | // 加载表格数据 |
169 | value: sessionStorage.getItem("products"), | 154 | getTableList () { |
170 | operator: "EQ", | 155 | getMenuInfo(this.BASE_API.CODE).then((res) => { |
171 | }, | 156 | if (res.code === 200) { |
172 | ], | 157 | this.tablelistData = judgeSort(res.result) |
173 | }, | 158 | this.listData = this.tablelistData |
174 | }; | 159 | } else { |
175 | const params = { | 160 | this.$message.error({ message: res.message, showClose: true }) |
176 | queryOptions: queryOptionsid, | 161 | } |
177 | }; | 162 | }) |
178 | // 获取系统id | 163 | const queryOptionsid = { |
179 | getAction(this.meumurlid, params) | 164 | conditionGroup: { |
180 | .then((res) => { | 165 | queryRelation: "AND", |
181 | this.productId = res.content[0].id; | 166 | conditions: [ |
182 | this.getAuthorityList(res.content[0].id, res.content[0].code) | 167 | { |
183 | this.selectedSubsystemCode = res.content[0].code | 168 | property: "code", |
169 | value: sessionStorage.getItem("products"), | ||
170 | operator: "EQ", | ||
171 | }, | ||
172 | ], | ||
173 | }, | ||
174 | }; | ||
175 | const params = { | ||
176 | queryOptions: queryOptionsid, | ||
177 | }; | ||
178 | // 获取系统id | ||
179 | getAction(this.meumurlid, params) | ||
180 | .then((res) => { | ||
181 | this.productId = res.content[0].id; | ||
182 | this.getAuthorityList(res.content[0].id, res.content[0].code) | ||
183 | this.selectedSubsystemCode = res.content[0].code | ||
184 | 184 | ||
185 | }) | 185 | }) |
186 | .catch((error) => { | 186 | .catch((error) => { |
187 | console.log("er", error); | 187 | console.log("er", error); |
188 | }) | 188 | }) |
189 | }, | 189 | }, |
190 | // 新增菜单 | 190 | // 新增菜单 |
191 | handleAdd () { | 191 | handleAdd () { |
192 | this.isDialog = true | 192 | this.isDialog = true |
193 | this.$refs.dialogForm.add(); | 193 | this.$refs.dialogForm.add(); |
194 | this.$refs.dialogForm.title = "新增"; | 194 | this.$refs.dialogForm.title = "新增"; |
195 | }, | 195 | }, |
196 | 196 | ||
197 | // 修改 | 197 | // 修改 |
198 | handleEdit (record) { | 198 | handleEdit (record) { |
199 | this.isDialog = true | 199 | this.isDialog = true |
200 | this.$refs.dialogForm.edit(record); | 200 | this.$refs.dialogForm.edit(record); |
201 | this.$refs.dialogForm.title = "修改"; | 201 | this.$refs.dialogForm.title = "修改"; |
202 | }, | 202 | }, |
203 | // 删除 | 203 | // 删除 |
204 | handleDelete (id, content) { | 204 | handleDelete (id, content) { |
205 | this.$confirm( | 205 | this.$confirm( |
206 | `<div class="customer-message-wrapper"> | 206 | `<div class="customer-message-wrapper"> |
207 | <h5 class="title">您确认要执行该操作用于以下信息:</h5> | 207 | <h5 class="title">您确认要执行该操作用于以下信息:</h5> |
208 | <p class="content" aria-controls="${content}">${content} | 208 | <p class="content" aria-controls="${content}">${content} |
209 | </p> | 209 | </p> |
... | @@ -211,48 +211,48 @@ | ... | @@ -211,48 +211,48 @@ |
211 | <span >无法恢复</span> | 211 | <span >无法恢复</span> |
212 | </p> | 212 | </p> |
213 | </div>`, | 213 | </div>`, |
214 | '执行确认', | 214 | '执行确认', |
215 | { | 215 | { |
216 | dangerouslyUseHTMLString: true, | 216 | dangerouslyUseHTMLString: true, |
217 | customClass: 'customer-delete', | 217 | customClass: 'customer-delete', |
218 | confirmButtonText: '确定', | 218 | confirmButtonText: '确定', |
219 | cancelButtonText: '取消', | 219 | cancelButtonText: '取消', |
220 | type: 'warning' | 220 | type: 'warning' |
221 | } | ||
222 | ) | ||
223 | .then(() => { | ||
224 | if (!this.tableUrl) { | ||
225 | this.$message.error({ | ||
226 | message: '请设置tableUrl属性为接口地址!', | ||
227 | showClose: true | ||
228 | }) | ||
229 | return | ||
221 | } | 230 | } |
222 | ) | 231 | const url = this.tableUrl + '/' + id |
223 | .then(() => { | 232 | deleteAction(url).then(res => { |
224 | if (!this.tableUrl) { | 233 | if (res.status === 1) { |
225 | this.$message.error({ | 234 | this.$message.success({ message: res.message, showClose: true }) |
226 | message: '请设置tableUrl属性为接口地址!', | 235 | this.reloadTableData() |
227 | showClose: true | 236 | } else { |
228 | }) | 237 | this.$message.error({ message: res.message, showClose: true }) |
229 | return | ||
230 | } | 238 | } |
231 | const url = this.tableUrl + '/' + id | ||
232 | deleteAction(url).then(res => { | ||
233 | if (res.status === 1) { | ||
234 | this.$message.success({ message: res.message, showClose: true }) | ||
235 | this.reloadTableData() | ||
236 | } else { | ||
237 | this.$message.error({ message: res.message, showClose: true }) | ||
238 | } | ||
239 | }) | ||
240 | }) | 239 | }) |
241 | .catch(() => { }) | 240 | }) |
242 | }, | 241 | .catch(() => { }) |
243 | // 新增、编辑回显 | 242 | }, |
244 | reloadTableData () { | 243 | // 新增、编辑回显 |
245 | this.getTableList() | 244 | reloadTableData () { |
246 | }, | 245 | this.getTableList() |
247 | }, | 246 | }, |
248 | }; | 247 | }, |
248 | }; | ||
249 | </script> | 249 | </script> |
250 | <style scoped lang="scss"> | 250 | <style scoped lang="scss"> |
251 | @import "~@/styles/mixin.scss"; | 251 | @import "~@/styles/mixin.scss"; |
252 | 252 | ||
253 | // @import "~@/styles/public.scss"; | 253 | // @import "~@/styles/public.scss"; |
254 | 254 | ||
255 | /deep/.el-table__expand-icon { | 255 | /deep/.el-table__expand-icon { |
256 | color: #fff; | 256 | color: #fff; |
257 | } | 257 | } |
258 | </style> | 258 | </style> | ... | ... |
1 | <!-- 新增 & 修改角色 --> | 1 | <!-- 新增 & 修改角色 --> |
2 | <template> | 2 | <template> |
3 | <dialogBox | 3 | <dialogBox |
4 | class="modifydialog" | 4 | class="modifydialog PersonnelDialog" |
5 | :title="title" | 5 | :title="title" |
6 | :width="'567px'" | 6 | :width="'567px'" |
7 | :isMain="true" | 7 | :isMain="true" |
... | @@ -160,29 +160,4 @@ | ... | @@ -160,29 +160,4 @@ |
160 | } | 160 | } |
161 | </script> | 161 | </script> |
162 | <style scoped lang="scss"> | 162 | <style scoped lang="scss"> |
163 | .modifydialog { | ||
164 | /deep/.el-dialog__header { | ||
165 | .dialog_title { | ||
166 | display: -webkit-box; | ||
167 | display: -ms-flexbox; | ||
168 | display: flex; | ||
169 | position: relative; | ||
170 | top: -8px; | ||
171 | width: 24%; | ||
172 | height: 40px; | ||
173 | margin-left: 28px; | ||
174 | -webkit-box-pack: center; | ||
175 | -ms-flex-pack: center; | ||
176 | justify-content: center; | ||
177 | white-space: nowrap; | ||
178 | b { | ||
179 | font-size: 16px; | ||
180 | } | ||
181 | } | ||
182 | .el-dialog__headerbtn { | ||
183 | right: 20px !important; | ||
184 | top: 23px !important; | ||
185 | } | ||
186 | } | ||
187 | } | ||
188 | </style> | 163 | </style> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="timedTask from-clues"> | 2 | <div class="timedTask from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="ruleForm" :model="form" label-width="100px"> | 4 | <el-form ref="ruleForm" :model="form" label-width="100px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME == 'jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row class="mb-5"> | 8 | <el-row class="mb-5"> |
... | @@ -19,8 +19,9 @@ | ... | @@ -19,8 +19,9 @@ |
19 | </el-form> | 19 | </el-form> |
20 | </div> | 20 | </div> |
21 | <div class="from-clues-content"> | 21 | <div class="from-clues-content"> |
22 | <lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="200" @p-current-change="handleCurrentChange" | 22 | <lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="200" |
23 | :column="tableData.columns" :data="listdata" :expand-row-keys="keyList" row-key="dictid"> | 23 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="listdata" :expand-row-keys="keyList" |
24 | row-key="dictid"> | ||
24 | </lb-table> | 25 | </lb-table> |
25 | </div> | 26 | </div> |
26 | <EditDialog ref="addEditDialog" v-model="isDialog" @ok="reloadTableData" /> | 27 | <EditDialog ref="addEditDialog" v-model="isDialog" @ok="reloadTableData" /> |
... | @@ -28,439 +29,439 @@ | ... | @@ -28,439 +29,439 @@ |
28 | </div> | 29 | </div> |
29 | </template> | 30 | </template> |
30 | <script> | 31 | <script> |
31 | import { | 32 | import { |
32 | getUuid, | 33 | getUuid, |
33 | judgeSort, | 34 | judgeSort, |
34 | realMove, | 35 | realMove, |
35 | findParents, | 36 | findParents, |
36 | removeTreeListItem, | 37 | removeTreeListItem, |
37 | } from "@/utils/operation"; | 38 | } from "@/utils/operation"; |
38 | import { getRolesById, getAuthorityListAction } from "@/api/authorityManage"; | 39 | import { getRolesById, getAuthorityListAction } from "@/api/authorityManage"; |
39 | import { getUserRoles } from "@/api/personnelManage"; | 40 | import { getUserRoles } from "@/api/personnelManage"; |
40 | import data from "./data"; | 41 | import data from "./data"; |
41 | import { getMenuInfo } from "@/api/user"; | 42 | import { getMenuInfo } from "@/api/user"; |
42 | import { api, getAction, deleteAction } from "@/api/manageApi"; | 43 | import { api, getAction, deleteAction } from "@/api/manageApi"; |
43 | import tableMixin from "@/mixins/tableMixin.js"; | 44 | import tableMixin from "@/mixins/tableMixin.js"; |
44 | import EditDialog from "./edit-dialog.vue"; | 45 | import EditDialog from "./edit-dialog.vue"; |
45 | import Roleslistdiglog from "./roleslistdiglog.vue"; | 46 | import Roleslistdiglog from "./roleslistdiglog.vue"; |
46 | import { mapGetters } from "vuex"; | 47 | import { mapGetters } from "vuex"; |
47 | import { updateOrder } from "@/api/orders" | 48 | import { updateOrder } from "@/api/orders" |
48 | export default { | 49 | export default { |
49 | name: "menus", | 50 | name: "menus", |
50 | mixins: [tableMixin], | 51 | mixins: [tableMixin], |
51 | components: { | 52 | components: { |
52 | EditDialog, | 53 | EditDialog, |
53 | Roleslistdiglog, | 54 | Roleslistdiglog, |
54 | }, | 55 | }, |
55 | data () { | 56 | data () { |
56 | return { | 57 | return { |
57 | isDialog: false, | 58 | isDialog: false, |
58 | personlist: null, | 59 | personlist: null, |
59 | waitMemberList: [], | 60 | waitMemberList: [], |
60 | keyList: [], | 61 | keyList: [], |
61 | listdata: [], | 62 | listdata: [], |
62 | setlistdata: [], | 63 | setlistdata: [], |
63 | tableUrlroles: api.roles, | 64 | tableUrlroles: api.roles, |
64 | form: { | 65 | form: { |
65 | rolesName: "", | 66 | rolesName: "", |
67 | }, | ||
68 | // 当前所选角色id | ||
69 | roleId: "", | ||
70 | title: "", | ||
71 | queryParam: {}, | ||
72 | multipleSelection: [], | ||
73 | // 菜单列表 | ||
74 | menutablelistData: [], | ||
75 | tableUrl: api.menus, // 菜单接口地址 | ||
76 | meumurlid: api.subsystem, // 项目id接口地址 | ||
77 | selectType: "0", | ||
78 | queryName: "", | ||
79 | organizationId: "", // 组织机构ID | ||
80 | departmentId: "", // 部门ID | ||
81 | departmentList: [], // 部门列表 | ||
82 | levelList: [], // 职务级别 | ||
83 | sexList: [], | ||
84 | operationCodes: null, // 操作符对象 | ||
85 | operationList: [], // 获取授权列表需要提交的操作符数组 | ||
86 | typeOptions: [ | ||
87 | { | ||
88 | value: "0", | ||
89 | label: "姓名", | ||
66 | }, | 90 | }, |
67 | // 当前所选角色id | 91 | { |
68 | roleId: "", | 92 | value: "1", |
69 | title: "", | 93 | label: "工号", |
70 | queryParam: {}, | 94 | }, |
71 | multipleSelection: [], | 95 | { |
72 | // 菜单列表 | 96 | value: "2", |
73 | menutablelistData: [], | 97 | label: "部门", |
74 | tableUrl: api.menus, // 菜单接口地址 | 98 | }, |
75 | meumurlid: api.subsystem, // 项目id接口地址 | 99 | { |
76 | selectType: "0", | 100 | value: "3", |
77 | queryName: "", | 101 | label: "机构", |
78 | organizationId: "", // 组织机构ID | 102 | }, |
79 | departmentId: "", // 部门ID | 103 | ], |
80 | departmentList: [], // 部门列表 | 104 | |
81 | levelList: [], // 职务级别 | 105 | selectionList: [], |
82 | sexList: [], | 106 | tableData: { |
83 | operationCodes: null, // 操作符对象 | 107 | columns: [ |
84 | operationList: [], // 获取授权列表需要提交的操作符数组 | ||
85 | typeOptions: [ | ||
86 | { | ||
87 | value: "0", | ||
88 | label: "姓名", | ||
89 | }, | ||
90 | { | ||
91 | value: "1", | ||
92 | label: "工号", | ||
93 | }, | ||
94 | { | ||
95 | value: "2", | ||
96 | label: "部门", | ||
97 | }, | ||
98 | { | 108 | { |
99 | value: "3", | 109 | label: "序号", |
100 | label: "机构", | 110 | type: "index", |
111 | width: "50", | ||
112 | index: this.indexMethod, | ||
101 | }, | 113 | }, |
102 | ], | 114 | ] |
103 | 115 | .concat(data.columns()) | |
104 | selectionList: [], | 116 | .concat([ |
105 | tableData: { | ||
106 | columns: [ | ||
107 | { | 117 | { |
108 | label: "序号", | 118 | label: "排序", |
109 | type: "index", | 119 | width: 300, |
110 | width: "50", | 120 | render: (h, scope) => { |
111 | index: this.indexMethod, | 121 | return ( |
122 | <div> | ||
123 | <el-button | ||
124 | type="text" | ||
125 | class='movebtnColor' | ||
126 | disabled={scope.row.isTop} | ||
127 | onClick={() => { | ||
128 | this.updateOrder(scope.row, 'TOP'); | ||
129 | }} | ||
130 | > | ||
131 | 置顶 | ||
132 | </el-button> | ||
133 | <el-button | ||
134 | type="text" | ||
135 | class='movebtnColor' | ||
136 | disabled={scope.row.isTop} | ||
137 | onClick={() => { | ||
138 | this.updateOrder(scope.row, 'UP'); | ||
139 | }} | ||
140 | > | ||
141 | 上移 | ||
142 | </el-button> | ||
143 | <el-button | ||
144 | type="text" | ||
145 | class='movebtnColor' | ||
146 | disabled={scope.row.isBottom} | ||
147 | onClick={() => { | ||
148 | this.updateOrder(scope.row, 'DOWN'); | ||
149 | }} | ||
150 | > | ||
151 | 下移 | ||
152 | </el-button> | ||
153 | <el-button | ||
154 | type="text" | ||
155 | class='movebtnColor' | ||
156 | disabled={scope.row.isBottom} | ||
157 | onClick={() => { | ||
158 | this.updateOrder(scope.row, 'BOTTOM'); | ||
159 | }} | ||
160 | > | ||
161 | 置底 | ||
162 | </el-button> | ||
163 | </div> | ||
164 | ); | ||
165 | }, | ||
112 | }, | 166 | }, |
113 | ] | 167 | ]) |
114 | .concat(data.columns()) | 168 | .concat([ |
115 | .concat([ | 169 | { |
116 | { | 170 | label: "操作", |
117 | label: "排序", | 171 | width: 280, |
118 | width: 300, | 172 | render: (h, scope) => { |
119 | render: (h, scope) => { | 173 | return ( |
120 | return ( | 174 | <div> |
121 | <div> | 175 | <el-tooltip |
122 | <el-button | 176 | class="item" |
123 | type="text" | 177 | effect="dark" |
124 | class='movebtnColor' | 178 | disabled={scope.row.type !== "Everyone"} |
125 | disabled={scope.row.isTop} | 179 | content="没有点击的权限" |
126 | onClick={() => { | 180 | placement="top" |
127 | this.updateOrder(scope.row, 'TOP'); | 181 | > |
128 | }} | 182 | <span> |
129 | > | 183 | <el-button |
130 | 置顶 | 184 | disabled={scope.row.type === "Everyone"} |
131 | </el-button> | 185 | type="text" |
132 | <el-button | 186 | size="mini" |
133 | type="text" | 187 | class="configurationbtnColor" |
134 | class='movebtnColor' | 188 | onClick={() => { |
135 | disabled={scope.row.isTop} | 189 | this.getList(scope.row); |
136 | onClick={() => { | 190 | }} |
137 | this.updateOrder(scope.row, 'UP'); | 191 | > |
138 | }} | 192 | 配置 |
139 | > | 193 | </el-button> |
140 | 上移 | 194 | </span> |
141 | </el-button> | 195 | </el-tooltip> |
142 | <el-button | 196 | <el-tooltip |
143 | type="text" | 197 | class="item" |
144 | class='movebtnColor' | 198 | effect="dark" |
145 | disabled={scope.row.isBottom} | 199 | disabled={scope.row.category !== 1} |
146 | onClick={() => { | 200 | content="系统内置角色 不允许修改" |
147 | this.updateOrder(scope.row, 'DOWN'); | 201 | placement="top" |
148 | }} | 202 | > |
149 | > | 203 | <span> |
150 | 下移 | 204 | <el-button |
151 | </el-button> | 205 | disabled={scope.row.category === 1} |
152 | <el-button | 206 | type="text" |
153 | type="text" | 207 | size="mini" |
154 | class='movebtnColor' | 208 | class='successColor' |
155 | disabled={scope.row.isBottom} | 209 | onClick={() => { |
156 | onClick={() => { | 210 | this.handleAddEdit(scope.row); |
157 | this.updateOrder(scope.row, 'BOTTOM'); | 211 | }} |
158 | }} | 212 | > |
159 | > | 213 | 修改 |
160 | 置底 | 214 | </el-button> |
161 | </el-button> | 215 | </span> |
162 | </div> | 216 | </el-tooltip> |
163 | ); | 217 | <el-tooltip |
164 | }, | 218 | class="item" |
219 | effect="dark" | ||
220 | disabled={scope.row.category !== 1} | ||
221 | content="系统内置角色 不允许删除" | ||
222 | placement="top" | ||
223 | > | ||
224 | <span> | ||
225 | <el-button | ||
226 | type="text" | ||
227 | disabled={scope.row.category === 1} | ||
228 | size="mini" | ||
229 | class='delColor' | ||
230 | // style="color:#F56C6C" | ||
231 | onClick={() => { | ||
232 | this.handleDelete(scope.row.id, scope.row.name); | ||
233 | }} | ||
234 | > | ||
235 | 删除 | ||
236 | </el-button> | ||
237 | </span> | ||
238 | </el-tooltip> | ||
239 | </div> | ||
240 | ); | ||
165 | }, | 241 | }, |
166 | ]) | ||
167 | .concat([ | ||
168 | { | ||
169 | label: "操作", | ||
170 | width: 280, | ||
171 | render: (h, scope) => { | ||
172 | return ( | ||
173 | <div> | ||
174 | <el-tooltip | ||
175 | class="item" | ||
176 | effect="dark" | ||
177 | disabled={scope.row.type !== "Everyone"} | ||
178 | content="没有点击的权限" | ||
179 | placement="top" | ||
180 | > | ||
181 | <span> | ||
182 | <el-button | ||
183 | disabled={scope.row.type === "Everyone"} | ||
184 | type="text" | ||
185 | size="mini" | ||
186 | class="configurationbtnColor" | ||
187 | onClick={() => { | ||
188 | this.getList(scope.row); | ||
189 | }} | ||
190 | > | ||
191 | 配置 | ||
192 | </el-button> | ||
193 | </span> | ||
194 | </el-tooltip> | ||
195 | <el-tooltip | ||
196 | class="item" | ||
197 | effect="dark" | ||
198 | disabled={scope.row.category !== 1} | ||
199 | content="系统内置角色 不允许修改" | ||
200 | placement="top" | ||
201 | > | ||
202 | <span> | ||
203 | <el-button | ||
204 | disabled={scope.row.category === 1} | ||
205 | type="text" | ||
206 | size="mini" | ||
207 | class='successColor' | ||
208 | onClick={() => { | ||
209 | this.handleAddEdit(scope.row); | ||
210 | }} | ||
211 | > | ||
212 | 修改 | ||
213 | </el-button> | ||
214 | </span> | ||
215 | </el-tooltip> | ||
216 | <el-tooltip | ||
217 | class="item" | ||
218 | effect="dark" | ||
219 | disabled={scope.row.category !== 1} | ||
220 | content="系统内置角色 不允许删除" | ||
221 | placement="top" | ||
222 | > | ||
223 | <span> | ||
224 | <el-button | ||
225 | type="text" | ||
226 | disabled={scope.row.category === 1} | ||
227 | size="mini" | ||
228 | class='delColor' | ||
229 | // style="color:#F56C6C" | ||
230 | onClick={() => { | ||
231 | this.handleDelete(scope.row.id, scope.row.name); | ||
232 | }} | ||
233 | > | ||
234 | 删除 | ||
235 | </el-button> | ||
236 | </span> | ||
237 | </el-tooltip> | ||
238 | </div> | ||
239 | ); | ||
240 | }, | ||
241 | 242 | ||
242 | }]), | 243 | }]), |
243 | }, | 244 | }, |
244 | data: [], | 245 | data: [], |
246 | } | ||
247 | }, | ||
248 | created () { | ||
249 | this.getTableData(); | ||
250 | this.getTableList() | ||
251 | }, | ||
252 | computed: { | ||
253 | ...mapGetters(["products"]) | ||
254 | }, | ||
255 | mounted () { }, | ||
256 | methods: { | ||
257 | //查询 | ||
258 | searchQuery () { | ||
259 | if (this.form.rolesName) { | ||
260 | this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName); | ||
261 | } else { | ||
262 | this.getTableData() | ||
245 | } | 263 | } |
246 | }, | 264 | }, |
247 | created () { | 265 | childrenFn (arr, key) { |
248 | this.getTableData(); | 266 | let searchTree = []; |
249 | this.getTableList() | 267 | arr.forEach((item, index) => { |
268 | if (item.name.indexOf(key) != -1) { | ||
269 | |||
270 | searchTree.push(item); | ||
271 | } | ||
272 | }); | ||
273 | if (searchTree != undefined && searchTree.length != 0) { | ||
274 | return judgeSort(searchTree); | ||
275 | } | ||
250 | }, | 276 | }, |
251 | computed: { | 277 | // 获取角色列表 |
252 | ...mapGetters(["products"]) | 278 | getTableData () { |
279 | getRolesById([1, 2]) | ||
280 | .then((res) => { | ||
281 | this.listdata = res.content; | ||
282 | this.listdata = judgeSort(this.listdata); | ||
283 | this.setlistdata = res.content; | ||
284 | }) | ||
285 | .catch((e) => console.error(e)); | ||
253 | }, | 286 | }, |
254 | mounted () { }, | ||
255 | methods: { | ||
256 | //查询 | ||
257 | searchQuery () { | ||
258 | if (this.form.rolesName) { | ||
259 | this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName); | ||
260 | } else { | ||
261 | this.getTableData() | ||
262 | } | ||
263 | }, | ||
264 | childrenFn (arr, key) { | ||
265 | let searchTree = []; | ||
266 | arr.forEach((item, index) => { | ||
267 | if (item.name.indexOf(key) != -1) { | ||
268 | 287 | ||
269 | searchTree.push(item); | 288 | // 获取菜单列表 |
270 | } | 289 | getTableList () { |
271 | }); | 290 | getMenuInfo(this.BASE_API.CODE).then((res) => { |
272 | if (searchTree != undefined && searchTree.length != 0) { | 291 | if (res.code === 200) { |
273 | return judgeSort(searchTree); | 292 | this.menutablelistData = judgeSort(res.result) |
293 | } else { | ||
294 | this.$message.error({ message: res.message, showClose: true }) | ||
274 | } | 295 | } |
275 | }, | 296 | }) |
276 | // 获取角色列表 | 297 | const queryOptionsid = { |
277 | getTableData () { | 298 | conditionGroup: { |
278 | getRolesById([1, 2]) | 299 | queryRelation: "AND", |
279 | .then((res) => { | 300 | conditions: [ |
280 | this.listdata = res.content; | 301 | { |
281 | this.listdata = judgeSort(this.listdata); | 302 | property: "code", |
282 | this.setlistdata = res.content; | 303 | value: this.products, |
283 | }) | 304 | operator: "EQ", |
284 | .catch((e) => console.error(e)); | 305 | }, |
285 | }, | 306 | ], |
286 | 307 | }, | |
287 | // 获取菜单列表 | 308 | }; |
288 | getTableList () { | 309 | const params = { |
289 | getMenuInfo(sessionStorage.getItem("products")).then((res) => { | 310 | queryOptions: queryOptionsid, |
290 | if (res.code === 200) { | 311 | }; |
291 | this.menutablelistData = judgeSort(res.result) | 312 | // 获取系统id |
292 | } else { | 313 | getAction(this.meumurlid, params) |
293 | this.$message.error({ message: res.message, showClose: true }) | 314 | .then((res) => { |
294 | } | 315 | this.productId = res.content[0].id; |
316 | this.getAuthorityList(res.content[0].id, res.content[0].code) | ||
317 | this.selectedSubsystemCode = res.content[0].code | ||
318 | // let queryOptions = { | ||
319 | // conditionGroup: { | ||
320 | // conditions: [ | ||
321 | // { | ||
322 | // property: "productId", | ||
323 | // value: this.productId, | ||
324 | // operator: "EQ", | ||
325 | // }, | ||
326 | // ], | ||
327 | // queryRelation: "AND", | ||
328 | // }, | ||
329 | // orderBys: [{ property: "sort", direction: "desc" }], | ||
330 | // }; | ||
331 | // if (!this.tableUrl) { | ||
332 | // console.log("请设置tableUrl属性为接口地址!"); | ||
333 | // return; | ||
334 | // } | ||
335 | // if (this.queryOptions !== "") { | ||
336 | // this.queryParam.queryOptions = JSON.stringify(queryOptions); | ||
337 | // } | ||
338 | // 查询系统菜单 | ||
339 | // getAction(this.tableUrl, this.queryParam) | ||
340 | // .then((res) => { | ||
341 | // if (res.status === 1) { | ||
342 | // this.loading = false; | ||
343 | // // this.menutablelistData = res.content; | ||
344 | // console.log("res.content菜单", res.content); | ||
345 | // } else { | ||
346 | // this.$message.error({ message: res.message, showClose: true }); | ||
347 | // this.loading = false; | ||
348 | // } | ||
349 | // }) | ||
350 | // .catch((error) => { | ||
351 | // console.log("er", error); | ||
352 | // this.loading = false; | ||
353 | // }); | ||
295 | }) | 354 | }) |
296 | const queryOptionsid = { | 355 | .catch((error) => { |
297 | conditionGroup: { | 356 | console.log("er", error); |
298 | queryRelation: "AND", | 357 | }); |
299 | conditions: [ | 358 | }, |
300 | { | 359 | // 获取权限列表 |
301 | property: "code", | 360 | getAuthorityList (productId, code) { |
302 | value: this.products, | 361 | getAuthorityListAction(productId, code).then( |
303 | operator: "EQ", | 362 | res => { |
304 | }, | 363 | if (res.status === 1) { |
305 | ], | 364 | if (res.content.length !== 0) { |
306 | }, | 365 | this.operationCodes = res.content[0].operations |
307 | }; | 366 | this.operationList = [] |
308 | const params = { | 367 | for (var k in this.operationCodes) { |
309 | queryOptions: queryOptionsid, | 368 | this.operationList.push(k) |
310 | }; | ||
311 | // 获取系统id | ||
312 | getAction(this.meumurlid, params) | ||
313 | .then((res) => { | ||
314 | this.productId = res.content[0].id; | ||
315 | this.getAuthorityList(res.content[0].id, res.content[0].code) | ||
316 | this.selectedSubsystemCode = res.content[0].code | ||
317 | // let queryOptions = { | ||
318 | // conditionGroup: { | ||
319 | // conditions: [ | ||
320 | // { | ||
321 | // property: "productId", | ||
322 | // value: this.productId, | ||
323 | // operator: "EQ", | ||
324 | // }, | ||
325 | // ], | ||
326 | // queryRelation: "AND", | ||
327 | // }, | ||
328 | // orderBys: [{ property: "sort", direction: "desc" }], | ||
329 | // }; | ||
330 | // if (!this.tableUrl) { | ||
331 | // console.log("请设置tableUrl属性为接口地址!"); | ||
332 | // return; | ||
333 | // } | ||
334 | // if (this.queryOptions !== "") { | ||
335 | // this.queryParam.queryOptions = JSON.stringify(queryOptions); | ||
336 | // } | ||
337 | // 查询系统菜单 | ||
338 | // getAction(this.tableUrl, this.queryParam) | ||
339 | // .then((res) => { | ||
340 | // if (res.status === 1) { | ||
341 | // this.loading = false; | ||
342 | // // this.menutablelistData = res.content; | ||
343 | // console.log("res.content菜单", res.content); | ||
344 | // } else { | ||
345 | // this.$message.error({ message: res.message, showClose: true }); | ||
346 | // this.loading = false; | ||
347 | // } | ||
348 | // }) | ||
349 | // .catch((error) => { | ||
350 | // console.log("er", error); | ||
351 | // this.loading = false; | ||
352 | // }); | ||
353 | }) | ||
354 | .catch((error) => { | ||
355 | console.log("er", error); | ||
356 | }); | ||
357 | }, | ||
358 | // 获取权限列表 | ||
359 | getAuthorityList (productId, code) { | ||
360 | getAuthorityListAction(productId, code).then( | ||
361 | res => { | ||
362 | if (res.status === 1) { | ||
363 | if (res.content.length !== 0) { | ||
364 | this.operationCodes = res.content[0].operations | ||
365 | this.operationList = [] | ||
366 | for (var k in this.operationCodes) { | ||
367 | this.operationList.push(k) | ||
368 | } | ||
369 | } | 369 | } |
370 | } else { | ||
371 | this.$message.error({ message: res.message, showClose: true }) | ||
372 | } | 370 | } |
371 | } else { | ||
372 | this.$message.error({ message: res.message, showClose: true }) | ||
373 | } | 373 | } |
374 | ) | 374 | } |
375 | }, | 375 | ) |
376 | }, | ||
376 | 377 | ||
377 | // 配置 | 378 | // 配置 |
378 | getList (row) { | 379 | getList (row) { |
379 | this.getTableList() | 380 | this.getTableList() |
380 | const params = {}; | 381 | const params = {}; |
381 | const queryOptions = { | 382 | const queryOptions = { |
382 | conditionGroup: { | 383 | conditionGroup: { |
383 | conditions: [ | 384 | conditions: [ |
384 | { | 385 | { |
385 | property: "organizationId", | 386 | property: "organizationId", |
386 | value: row.organizationId, | 387 | value: row.organizationId, |
387 | operator: "EQ", | 388 | operator: "EQ", |
388 | }, | 389 | }, |
389 | { | 390 | { |
390 | property: "departmentId", | 391 | property: "departmentId", |
391 | value: row.departmentId, | 392 | value: row.departmentId, |
392 | operator: "EQ", | 393 | operator: "EQ", |
393 | }, | 394 | }, |
394 | ], | 395 | ], |
395 | queryRelation: "AND", | 396 | queryRelation: "AND", |
396 | }, | 397 | }, |
397 | orderBys: [{ property: "sort", direction: "desc" }], | 398 | orderBys: [{ property: "sort", direction: "desc" }], |
398 | }; | 399 | }; |
399 | params.queryOptions = JSON.stringify(queryOptions); | 400 | params.queryOptions = JSON.stringify(queryOptions); |
400 | 401 | ||
401 | getUserRoles(row.id).then((res) => { | 402 | getUserRoles(row.id).then((res) => { |
402 | if (res.status === 1) { | 403 | if (res.status === 1) { |
403 | this.personlist = res.content; | 404 | this.personlist = res.content; |
404 | getAction(api.users, params).then((res) => { | 405 | getAction(api.users, params).then((res) => { |
405 | if (res.status === 1) { | 406 | if (res.status === 1) { |
406 | this.waitMemberList = res.content; | 407 | this.waitMemberList = res.content; |
407 | if (this.personlist) { | 408 | if (this.personlist) { |
408 | this.waitMemberList.forEach((item, i) => { | 409 | this.waitMemberList.forEach((item, i) => { |
409 | this.personlist.forEach((val) => { | 410 | this.personlist.forEach((val) => { |
410 | if (item.id === val.id) { | 411 | if (item.id === val.id) { |
411 | this.waitMemberList[i].selectStatus = 0; | 412 | this.waitMemberList[i].selectStatus = 0; |
412 | } | 413 | } |
413 | }); | ||
414 | }); | 414 | }); |
415 | } | 415 | }); |
416 | |||
417 | this.$refs.rolesForm.personlist(this.waitMemberList, row.id); | ||
418 | this.$refs.rolesForm.menulist(this.operationList, row.id, this.selectedSubsystemCode, this.menutablelistData, this.operationCodes); | ||
419 | } else { | ||
420 | this.$message.error({ message: res.message, showClose: true }); | ||
421 | } | 416 | } |
422 | }); | ||
423 | this.$refs.rolesForm.title = "人员配置"; | ||
424 | } else this.$message.error({ message: res.message, showClose: true }); | ||
425 | }); | ||
426 | }, | ||
427 | // 新增、修改角色 | ||
428 | handleAddEdit (value) { | ||
429 | this.isDialog = true | ||
430 | this.$refs.addEditDialog.menuType = this.menuType; | ||
431 | this.$refs.addEditDialog.roleId = value.id; | ||
432 | this.roleSort = value.sort ? value.sort : 0; | ||
433 | this.$refs.addEditDialog.dialogForm.roleType = sessionStorage.getItem("products"); | ||
434 | if (value.id) { | ||
435 | this.$refs.addEditDialog.dialogForm.roleName = value.name; | ||
436 | 417 | ||
437 | this.$refs.addEditDialog.dialogForm.roleTextArea = value.description; | 418 | this.$refs.rolesForm.personlist(this.waitMemberList, row.id); |
438 | } | 419 | this.$refs.rolesForm.menulist(this.operationList, row.id, this.selectedSubsystemCode, this.menutablelistData, this.operationCodes); |
439 | this.$refs.addEditDialog.showAddEditDialog = true; | 420 | } else { |
440 | this.$refs.addEditDialog.title = value.id ? "修改" : "新增"; | 421 | this.$message.error({ message: res.message, showClose: true }); |
441 | }, | 422 | } |
442 | //排序 | 423 | }); |
443 | updateOrder (record, operate) { | 424 | this.$refs.rolesForm.title = "人员配置"; |
444 | const findIndex = this.listdata.findIndex(item => item.id === record.id) | 425 | } else this.$message.error({ message: res.message, showClose: true }); |
445 | let swapId = '' | 426 | }); |
446 | if (operate === 'UP') { | 427 | }, |
447 | swapId = this.listdata[findIndex - 1].id | 428 | // 新增、修改角色 |
448 | } else if (operate === 'DOWN') { | 429 | handleAddEdit (value) { |
449 | swapId = this.listdata[findIndex + 1].id | 430 | this.isDialog = true |
431 | this.$refs.addEditDialog.menuType = this.menuType; | ||
432 | this.$refs.addEditDialog.roleId = value.id; | ||
433 | this.roleSort = value.sort ? value.sort : 0; | ||
434 | this.$refs.addEditDialog.dialogForm.roleType = sessionStorage.getItem("products"); | ||
435 | if (value.id) { | ||
436 | this.$refs.addEditDialog.dialogForm.roleName = value.name; | ||
437 | |||
438 | this.$refs.addEditDialog.dialogForm.roleTextArea = value.description; | ||
439 | } | ||
440 | this.$refs.addEditDialog.showAddEditDialog = true; | ||
441 | this.$refs.addEditDialog.title = value.id ? "修改" : "新增"; | ||
442 | }, | ||
443 | //排序 | ||
444 | updateOrder (record, operate) { | ||
445 | const findIndex = this.listdata.findIndex(item => item.id === record.id) | ||
446 | let swapId = '' | ||
447 | if (operate === 'UP') { | ||
448 | swapId = this.listdata[findIndex - 1].id | ||
449 | } else if (operate === 'DOWN') { | ||
450 | swapId = this.listdata[findIndex + 1].id | ||
451 | } | ||
452 | updateOrder('/rest/roles', record, operate, swapId).then(res => { | ||
453 | if (res.status === 1) { | ||
454 | this.$message.success({ message: res.message, showClose: true }) | ||
455 | this.getTableData(); | ||
456 | } else { | ||
457 | this.$message.error({ message: res.message, showClose: true }) | ||
450 | } | 458 | } |
451 | updateOrder('/rest/roles', record, operate, swapId).then(res => { | 459 | }) |
452 | if (res.status === 1) { | 460 | }, |
453 | this.$message.success({ message: res.message, showClose: true }) | 461 | // 删除 |
454 | this.getTableData(); | 462 | handleDelete: function (id, content = "") { |
455 | } else { | 463 | this.$confirm( |
456 | this.$message.error({ message: res.message, showClose: true }) | 464 | `<div class="customer-message-wrapper"> |
457 | } | ||
458 | }) | ||
459 | }, | ||
460 | // 删除 | ||
461 | handleDelete: function (id, content = "") { | ||
462 | this.$confirm( | ||
463 | `<div class="customer-message-wrapper"> | ||
464 | <h5 class="title">您确认要执行该操作用于以下信息:</h5> | 465 | <h5 class="title">您确认要执行该操作用于以下信息:</h5> |
465 | <p class="content" aria-controls="${content}">${content} | 466 | <p class="content" aria-controls="${content}">${content} |
466 | </p> | 467 | </p> |
... | @@ -468,50 +469,50 @@ | ... | @@ -468,50 +469,50 @@ |
468 | <span >无法恢复</span> | 469 | <span >无法恢复</span> |
469 | </p> | 470 | </p> |
470 | </div>`, | 471 | </div>`, |
471 | "执行确认", | 472 | "执行确认", |
472 | { | 473 | { |
473 | dangerouslyUseHTMLString: true, | 474 | dangerouslyUseHTMLString: true, |
474 | customClass: "customer-delete", | 475 | customClass: "customer-delete", |
475 | confirmButtonText: "确定", | 476 | confirmButtonText: "确定", |
476 | cancelButtonText: "取消", | 477 | cancelButtonText: "取消", |
477 | type: "warning", | 478 | type: "warning", |
479 | } | ||
480 | ) | ||
481 | .then(() => { | ||
482 | if (!this.tableUrlroles) { | ||
483 | this.$message.error({ | ||
484 | message: "请设置tableUrl属性为接口地址!", | ||
485 | showClose: true, | ||
486 | }); | ||
487 | return; | ||
478 | } | 488 | } |
479 | ) | 489 | const url = this.tableUrlroles + "/" + id; |
480 | .then(() => { | 490 | deleteAction(url).then((res) => { |
481 | if (!this.tableUrlroles) { | 491 | if (res.status === 1) { |
482 | this.$message.error({ | 492 | this.$message.success({ message: res.message, showClose: true }); |
483 | message: "请设置tableUrl属性为接口地址!", | 493 | this.getTableData(); |
484 | showClose: true, | 494 | } else { |
485 | }); | 495 | this.$message.error({ message: res.message, showClose: true }); |
486 | return; | ||
487 | } | 496 | } |
488 | const url = this.tableUrlroles + "/" + id; | 497 | }); |
489 | deleteAction(url).then((res) => { | 498 | }) |
490 | if (res.status === 1) { | 499 | .catch(() => { }); |
491 | this.$message.success({ message: res.message, showClose: true }); | 500 | }, |
492 | this.getTableData(); | 501 | // 新增回显 |
493 | } else { | 502 | reloadTableData () { |
494 | this.$message.error({ message: res.message, showClose: true }); | 503 | this.getTableData(); |
495 | } | ||
496 | }); | ||
497 | }) | ||
498 | .catch(() => { }); | ||
499 | }, | ||
500 | // 新增回显 | ||
501 | reloadTableData () { | ||
502 | this.getTableData(); | ||
503 | }, | ||
504 | }, | 504 | }, |
505 | }; | 505 | }, |
506 | }; | ||
506 | </script> | 507 | </script> |
507 | <style scoped lang="scss"> | 508 | <style scoped lang="scss"> |
508 | @import "~@/styles/mixin.scss"; | 509 | @import "~@/styles/mixin.scss"; |
509 | // @import "~@/styles/public.scss"; | 510 | // @import "~@/styles/public.scss"; |
510 | 511 | ||
511 | /deep/.el-button.is-disabled.el-button--text { | 512 | /deep/.el-button.is-disabled.el-button--text { |
512 | width: 64px; | 513 | width: 64px; |
513 | height: 28px; | 514 | height: 28px; |
514 | background: rgba(255, 255, 255, 0.1); | 515 | background: rgba(255, 255, 255, 0.1); |
515 | border-radius: 16px; | 516 | border-radius: 16px; |
516 | } | 517 | } |
517 | </style> | 518 | </style> | ... | ... |
1 | /* | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-03-27 10:27:32 | ||
5 | */ | ||
1 | import filter from '@/utils/filter.js' | 6 | import filter from '@/utils/filter.js' |
2 | class data extends filter { | 7 | class data extends filter { |
3 | constructor() { | 8 | constructor() { |
... | @@ -17,7 +22,8 @@ class data extends filter { | ... | @@ -17,7 +22,8 @@ class data extends filter { |
17 | }, | 22 | }, |
18 | { | 23 | { |
19 | prop: "cronExpression", | 24 | prop: "cronExpression", |
20 | label: "cron表达式" | 25 | label: "cron表达式", |
26 | width: 160, | ||
21 | }, | 27 | }, |
22 | { | 28 | { |
23 | prop: "beanName", | 29 | prop: "beanName", |
... | @@ -34,7 +40,7 @@ class data extends filter { | ... | @@ -34,7 +40,7 @@ class data extends filter { |
34 | render: (h, scope) => { | 40 | render: (h, scope) => { |
35 | return ( | 41 | return ( |
36 | <div> | 42 | <div> |
37 | { this.stateStatus(scope.row.jobStatus) } | 43 | {this.stateStatus(scope.row.jobStatus)} |
38 | </div> | 44 | </div> |
39 | ) | 45 | ) |
40 | }, | 46 | }, | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="timedTask from-clues"> | 2 | <div class="timedTask from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="form" :model="form" label-width="80px"> | 4 | <el-form ref="form" :model="form" label-width="80px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME == 'jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row> | 8 | <el-row> | ... | ... |
1 | <template> | 1 | <template> |
2 | <dialogBox :title="title" :width="'867px'" class="modifydialog" @closeDialog="close" :isMain="true" @submitForm="submitForm" | 2 | <dialogBox :title="title" :width="'867px'" class="modifydialog PersonnelDialog" @closeDialog="close" :isMain="true" @submitForm="submitForm" |
3 | v-model="myValue"> | 3 | v-model="myValue"> |
4 | <div class="dialogCon"> | 4 | <div class="dialogCon"> |
5 | <el-form ref="form" :model="form" :rules="rules"> | 5 | <el-form ref="form" :model="form" :rules="rules"> |
... | @@ -193,32 +193,4 @@ | ... | @@ -193,32 +193,4 @@ |
193 | } | 193 | } |
194 | </script> | 194 | </script> |
195 | <style scoped lang="scss"> | 195 | <style scoped lang="scss"> |
196 | .modifydialog { | ||
197 | /deep/.el-dialog__header { | ||
198 | .dialog_title { | ||
199 | display: -webkit-box; | ||
200 | display: -ms-flexbox; | ||
201 | display: flex; | ||
202 | position: relative; | ||
203 | top: -7px; | ||
204 | width: 29%; | ||
205 | height: 40px; | ||
206 | margin-left: 28px; | ||
207 | -webkit-box-pack: center; | ||
208 | -ms-flex-pack: center; | ||
209 | justify-content: center; | ||
210 | white-space: nowrap; | ||
211 | b { | ||
212 | font-size: 16px; | ||
213 | } | ||
214 | } | ||
215 | .el-dialog__headerbtn { | ||
216 | right: 20px !important; | ||
217 | top: 23px !important; | ||
218 | } | ||
219 | } | ||
220 | .selbig { | ||
221 | width: 500px; | ||
222 | } | ||
223 | } | ||
224 | </style> | 196 | </style> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <div class="timedTask from-clues"> | 2 | <div class="timedTask from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="ruleForm" :model="form" label-width="100px"> | 4 | <el-form ref="ruleForm" :model="form" label-width="100px"> |
5 | <el-form-item> | 5 | <el-form-item v-if="BASE_API.THEME == 'jg'"> |
6 | <Breadcrumb /> | 6 | <Breadcrumb /> |
7 | </el-form-item> | 7 | </el-form-item> |
8 | <el-row class="mt-10"> | 8 | <el-row class="mt-10"> |
... | @@ -38,388 +38,375 @@ | ... | @@ -38,388 +38,375 @@ |
38 | </div> | 38 | </div> |
39 | </template> | 39 | </template> |
40 | <script> | 40 | <script> |
41 | import { | 41 | import { |
42 | getUuid, | 42 | getUuid, |
43 | judgeSort, | 43 | judgeSort, |
44 | realMove, | 44 | realMove, |
45 | findParents, | 45 | findParents, |
46 | removeTreeListItem, | 46 | removeTreeListItem, |
47 | } from "@/utils/operation"; | 47 | } from "@/utils/operation"; |
48 | import { | 48 | import { |
49 | resetPassword, | 49 | resetPassword, |
50 | getUserList, getUserLists | 50 | getUserList, getUserLists |
51 | } from "@/api/personnelManage"; | 51 | } from "@/api/personnelManage"; |
52 | import { api, deleteAction, getAction } from '@/api/manageApi' | 52 | import { api, deleteAction, getAction } from '@/api/manageApi' |
53 | import data from "./data"; | 53 | import data from "./data"; |
54 | import { deleteDomStr } from '@/utils/proDomStr' | 54 | import { deleteDomStr } from '@/utils/proDomStr' |
55 | import tableMixin from "@/mixins/tableMixin.js"; | 55 | import tableMixin from "@/mixins/tableMixin.js"; |
56 | import EditDialog from "./edit-dialog.vue"; | 56 | import EditDialog from "./edit-dialog.vue"; |
57 | import { updateOrder } from "@/api/orders" | 57 | import { updateOrder } from "@/api/orders" |
58 | export default { | 58 | export default { |
59 | name: "menus", | 59 | name: "menus", |
60 | mixins: [tableMixin], | 60 | mixins: [tableMixin], |
61 | components: { | 61 | components: { |
62 | EditDialog, | 62 | EditDialog, |
63 | }, | 63 | }, |
64 | data () { | 64 | data () { |
65 | return { | 65 | return { |
66 | isDialog: false, | 66 | isDialog: false, |
67 | taskData: null, | 67 | taskData: null, |
68 | keyList: [], | 68 | keyList: [], |
69 | form: { | 69 | form: { |
70 | loginName: "", | 70 | loginName: "", |
71 | name: "", | 71 | name: "", |
72 | code: "", | 72 | code: "", |
73 | }, | ||
74 | queryParam: {}, | ||
75 | selectType: "0", | ||
76 | queryName: "", | ||
77 | organizationId: "", // 组织机构ID | ||
78 | departmentId: "", // 部门ID | ||
79 | departmentList: [], // 部门列表 | ||
80 | levelList: [], // 职务级别 | ||
81 | sexList: [], | ||
82 | typeOptions: [ | ||
83 | { | ||
84 | value: "0", | ||
85 | label: "姓名", | ||
73 | }, | 86 | }, |
74 | queryParam: {}, | 87 | { |
75 | selectType: "0", | 88 | value: "1", |
76 | queryName: "", | 89 | label: "工号", |
77 | organizationId: "", // 组织机构ID | 90 | }, |
78 | departmentId: "", // 部门ID | 91 | { |
79 | departmentList: [], // 部门列表 | 92 | value: "2", |
80 | levelList: [], // 职务级别 | 93 | label: "部门", |
81 | sexList: [], | 94 | }, |
82 | typeOptions: [ | 95 | { |
83 | { | 96 | value: "3", |
84 | value: "0", | 97 | label: "机构", |
85 | label: "姓名", | 98 | }, |
86 | }, | 99 | ], |
87 | { | 100 | |
88 | value: "1", | 101 | selectionList: [], |
89 | label: "工号", | 102 | tableData: { |
90 | }, | 103 | columns: [ |
91 | { | ||
92 | value: "2", | ||
93 | label: "部门", | ||
94 | }, | ||
95 | { | 104 | { |
96 | value: "3", | 105 | label: "序号", |
97 | label: "机构", | 106 | type: "index", |
107 | width: "50", | ||
108 | index: this.indexMethod, | ||
98 | }, | 109 | }, |
99 | ], | 110 | ] |
111 | .concat(data.columns()) | ||
112 | .concat([ | ||
113 | { | ||
114 | label: "职位", | ||
115 | render: (h, scope) => { | ||
116 | return ( | ||
117 | <div v-show={scope.row.jobLevel !== null}>{scope.row.jobLevel ? "干事" : "经理"}</div> | ||
118 | ) | ||
100 | 119 | ||
101 | selectionList: [], | 120 | } |
102 | tableData: { | 121 | }, |
103 | columns: [ | ||
104 | { | 122 | { |
105 | label: "序号", | 123 | label: "负责人", |
106 | type: "index", | 124 | render: (h, scope) => { |
107 | width: "50", | 125 | return ( |
108 | index: this.indexMethod, | 126 | <i v-show={scope.row.isDuty !== null} class="el-icon-check" /> |
127 | ) | ||
128 | } | ||
109 | }, | 129 | }, |
110 | ] | 130 | { |
111 | .concat(data.columns()) | 131 | label: "排序", |
112 | .concat([ | 132 | width: 300, |
113 | { | 133 | render: (h, scope) => { |
114 | label: "职位", | 134 | return ( |
115 | render: (h, scope) => { | 135 | <div> |
116 | return ( | 136 | <el-button |
117 | <div v-show={scope.row.jobLevel !== null}>{scope.row.jobLevel ? "干事" : "经理"}</div> | 137 | type="text" |
118 | ) | 138 | class='movebtnColor' |
119 | 139 | disabled={scope.row.isTop} | |
120 | } | 140 | onClick={() => { |
121 | }, | 141 | this.updateOrder(scope.row, 'TOP'); |
122 | { | 142 | }} |
123 | label: "负责人", | 143 | > |
124 | render: (h, scope) => { | 144 | 置顶 |
125 | return ( | 145 | </el-button> |
126 | <i v-show={scope.row.isDuty !== null} class="el-icon-check" /> | 146 | <el-button |
127 | ) | 147 | type="text" |
128 | } | 148 | class='movebtnColor' |
149 | disabled={scope.row.isTop} | ||
150 | onClick={() => { | ||
151 | this.updateOrder(scope.row, 'UP'); | ||
152 | }} | ||
153 | > | ||
154 | 上移 | ||
155 | </el-button> | ||
156 | <el-button | ||
157 | type="text" | ||
158 | class='movebtnColor' | ||
159 | disabled={scope.row.isBottom} | ||
160 | onClick={() => { | ||
161 | this.updateOrder(scope.row, 'DOWN'); | ||
162 | }} | ||
163 | > | ||
164 | 下移 | ||
165 | </el-button> | ||
166 | <el-button | ||
167 | type="text" | ||
168 | size="mini" | ||
169 | class='movebtnColor' | ||
170 | disabled={scope.row.isBottom} | ||
171 | onClick={() => { | ||
172 | this.updateOrder(scope.row, 'BOTTOM'); | ||
173 | }} | ||
174 | > | ||
175 | 置底 | ||
176 | </el-button> | ||
177 | </div> | ||
178 | ); | ||
129 | }, | 179 | }, |
130 | { | 180 | }, |
131 | label: "排序", | 181 | { |
132 | width: 300, | 182 | label: "操作", |
133 | render: (h, scope) => { | 183 | width: 380, |
134 | return ( | 184 | render: (h, scope) => { |
135 | <div> | 185 | return ( |
136 | <el-button | 186 | <div> |
137 | type="text" | 187 | <el-button |
138 | class='movebtnColor' | 188 | type="text" |
139 | disabled={scope.row.isTop} | 189 | size="mini" |
140 | onClick={() => { | 190 | class='resetbtnColor' |
141 | this.updateOrder(scope.row, 'TOP'); | 191 | onClick={() => { |
142 | }} | 192 | this.resetPassword(scope.row.id); |
143 | > | 193 | }} |
144 | 置顶 | 194 | > |
145 | </el-button> | 195 | 重置 |
146 | <el-button | 196 | </el-button> |
147 | type="text" | 197 | <el-button |
148 | class='movebtnColor' | 198 | type="text" |
149 | disabled={scope.row.isTop} | 199 | size="mini" |
150 | onClick={() => { | 200 | class='successColor' |
151 | this.updateOrder(scope.row, 'UP'); | 201 | onClick={() => { |
152 | }} | 202 | this.handleEdit(scope.row); |
153 | > | 203 | }} |
154 | 上移 | 204 | > |
155 | </el-button> | 205 | 修改 |
156 | <el-button | 206 | </el-button> |
157 | type="text" | 207 | <el-button |
158 | class='movebtnColor' | 208 | type="text" |
159 | disabled={scope.row.isBottom} | 209 | size="mini" |
160 | onClick={() => { | 210 | class='delColor' |
161 | this.updateOrder(scope.row, 'DOWN'); | 211 | onClick={() => { |
162 | }} | 212 | this.handleDelete(scope.row.id, scope.row.name); |
163 | > | 213 | }} |
164 | 下移 | 214 | > |
165 | </el-button> | 215 | 删除 |
166 | <el-button | 216 | </el-button> |
167 | type="text" | 217 | </div> |
168 | size="mini" | 218 | ); |
169 | class='movebtnColor' | ||
170 | disabled={scope.row.isBottom} | ||
171 | onClick={() => { | ||
172 | this.updateOrder(scope.row, 'BOTTOM'); | ||
173 | }} | ||
174 | > | ||
175 | 置底 | ||
176 | </el-button> | ||
177 | </div> | ||
178 | ); | ||
179 | }, | ||
180 | }, | 219 | }, |
220 | }, | ||
221 | ]), | ||
222 | data: [], | ||
223 | }, | ||
224 | }; | ||
225 | }, | ||
226 | created () { | ||
227 | this.getTableList(); | ||
228 | }, | ||
229 | computed: { | ||
230 | departmentid () { | ||
231 | return this.$store.state.user.userInfo; | ||
232 | }, | ||
233 | }, | ||
234 | methods: { | ||
235 | handleAdd () { | ||
236 | this.isDialog = true | ||
237 | this.$refs.dialogForm.adds(); | ||
238 | this.$refs.dialogForm.title = "添加"; | ||
239 | }, | ||
240 | // 查询 | ||
241 | getTableList () { | ||
242 | this.queryParam = { | ||
243 | name: this.form.name, | ||
244 | code: this.form.code, | ||
245 | loginName: this.form.loginName, | ||
246 | }; | ||
247 | getUserLists(this.queryParam).then((res) => { | ||
248 | if (res.status === 1) { | ||
249 | this.loading = false; | ||
250 | this.tableData.data = res.content; | ||
251 | this.tableData.data = judgeSort(this.tableData.data); | ||
252 | let arr = [] | ||
253 | this.tableData.data.forEach((item) => { | ||
254 | arr.push(item.departmentId) | ||
255 | }) | ||
256 | this.getDepts(arr) | ||
257 | } else { | ||
258 | this.$message.error({ message: res.message, showClose: true }) | ||
259 | } | ||
260 | }) | ||
261 | }, | ||
262 | // 获取组织机构 | ||
263 | getDepts (deptIdArr) { | ||
264 | let params = { | ||
265 | queryOptions: { | ||
266 | conditionGroup: { | ||
267 | conditions: [ | ||
181 | { | 268 | { |
182 | label: "操作", | 269 | property: "id", |
183 | width: 380, | 270 | value: deptIdArr, |
184 | render: (h, scope) => { | 271 | operator: "IN", |
185 | return ( | ||
186 | <div> | ||
187 | <el-button | ||
188 | type="text" | ||
189 | size="mini" | ||
190 | class='resetbtnColor' | ||
191 | onClick={() => { | ||
192 | this.resetPassword(scope.row.id); | ||
193 | }} | ||
194 | > | ||
195 | 重置 | ||
196 | </el-button> | ||
197 | <el-button | ||
198 | type="text" | ||
199 | size="mini" | ||
200 | class='successColor' | ||
201 | onClick={() => { | ||
202 | this.handleEdit(scope.row); | ||
203 | }} | ||
204 | > | ||
205 | 修改 | ||
206 | </el-button> | ||
207 | <el-button | ||
208 | type="text" | ||
209 | size="mini" | ||
210 | class='delColor' | ||
211 | onClick={() => { | ||
212 | this.handleDelete(scope.row.id, scope.row.name); | ||
213 | }} | ||
214 | > | ||
215 | 删除 | ||
216 | </el-button> | ||
217 | </div> | ||
218 | ); | ||
219 | }, | ||
220 | }, | 272 | }, |
221 | ]), | 273 | ], |
222 | data: [], | 274 | queryRelation: "AND", |
275 | }, | ||
276 | orderBys: [], | ||
223 | }, | 277 | }, |
224 | }; | 278 | }; |
225 | }, | 279 | getAction(api.departments, params).then( |
226 | created () { | 280 | (res) => { |
227 | this.getTableList(); | 281 | let deptsList = res.content; |
228 | }, | 282 | deptsList.forEach((ele) => { |
229 | computed: { | ||
230 | departmentid () { | ||
231 | return this.$store.state.user.userInfo; | ||
232 | }, | ||
233 | }, | ||
234 | methods: { | ||
235 | handleAdd () { | ||
236 | this.isDialog = true | ||
237 | this.$refs.dialogForm.adds(); | ||
238 | this.$refs.dialogForm.title = "添加"; | ||
239 | }, | ||
240 | // 查询 | ||
241 | getTableList () { | ||
242 | this.queryParam = { | ||
243 | name: this.form.name, | ||
244 | code: this.form.code, | ||
245 | loginName: this.form.loginName, | ||
246 | }; | ||
247 | getUserLists(this.queryParam).then((res) => { | ||
248 | if (res.status === 1) { | ||
249 | this.loading = false; | ||
250 | this.tableData.data = res.content; | ||
251 | this.tableData.data = judgeSort(this.tableData.data); | ||
252 | let arr = [] | ||
253 | this.tableData.data.forEach((item) => { | 283 | this.tableData.data.forEach((item) => { |
254 | arr.push(item.departmentId) | 284 | if (ele.id == item.departmentId) { |
255 | }) | 285 | item.departmentName = ele.name |
256 | this.getDepts(arr) | 286 | } |
257 | } else { | ||
258 | this.$message.error({ message: res.message, showClose: true }) | ||
259 | } | ||
260 | }) | ||
261 | }, | ||
262 | // 获取组织机构 | ||
263 | getDepts (deptIdArr) { | ||
264 | let params = { | ||
265 | queryOptions: { | ||
266 | conditionGroup: { | ||
267 | conditions: [ | ||
268 | { | ||
269 | property: "id", | ||
270 | value: deptIdArr, | ||
271 | operator: "IN", | ||
272 | }, | ||
273 | ], | ||
274 | queryRelation: "AND", | ||
275 | }, | ||
276 | orderBys: [], | ||
277 | }, | ||
278 | }; | ||
279 | getAction(api.departments, params).then( | ||
280 | (res) => { | ||
281 | let deptsList = res.content; | ||
282 | deptsList.forEach((ele) => { | ||
283 | this.tableData.data.forEach((item) => { | ||
284 | if (ele.id == item.departmentId) { | ||
285 | item.departmentName = ele.name | ||
286 | } | ||
287 | }) | ||
288 | }) | 287 | }) |
288 | }) | ||
289 | 289 | ||
290 | }, | 290 | }, |
291 | (err) => { | 291 | (err) => { |
292 | console.log("err :", err); | 292 | console.log("err :", err); |
293 | } | 293 | } |
294 | ); | 294 | ); |
295 | }, | 295 | }, |
296 | // getTableList () { | 296 | // getTableList () { |
297 | // this.loading = true; | 297 | // this.loading = true; |
298 | 298 | ||
299 | // getUserList().then((res) => { | 299 | // getUserList().then((res) => { |
300 | // if (res.status === 1) { | 300 | // if (res.status === 1) { |
301 | // console.log("res人员列表", res); | 301 | // console.log("res人员列表", res); |
302 | // this.loading = false; | 302 | // this.loading = false; |
303 | // this.tableData.data = res.content; | 303 | // this.tableData.data = res.content; |
304 | // this.tableData.data = judgeSort(this.tableData.data); | 304 | // this.tableData.data = judgeSort(this.tableData.data); |
305 | // } else { | 305 | // } else { |
306 | // this.$message.error({ message: res.message, showClose: true }); | 306 | // this.$message.error({ message: res.message, showClose: true }); |
307 | // } | 307 | // } |
308 | // }); | 308 | // }); |
309 | // }, | 309 | // }, |
310 | 310 | ||
311 | // 重置用户密码 | 311 | // 重置用户密码 |
312 | resetPassword (data) { | 312 | resetPassword (data) { |
313 | const ids = [] | 313 | const ids = [] |
314 | if (data instanceof Array) { | 314 | if (data instanceof Array) { |
315 | data.forEach((item) => { | 315 | data.forEach((item) => { |
316 | ids.push(item.id) | 316 | ids.push(item.id) |
317 | }) | 317 | }) |
318 | } else { | 318 | } else { |
319 | ids.push(data) | 319 | ids.push(data) |
320 | } | 320 | } |
321 | if (ids.length === 0) { | 321 | if (ids.length === 0) { |
322 | this.$message({ | 322 | this.$message({ |
323 | message: '请选择需要重置密码的用户!', | 323 | message: '请选择需要重置密码的用户!', |
324 | showClose: true | 324 | showClose: true |
325 | }) | 325 | }) |
326 | return | 326 | return |
327 | } | 327 | } |
328 | this.$confirm( | 328 | this.$confirm( |
329 | `<div class="customer-message-wrapper"> | 329 | `<div class="customer-message-wrapper"> |
330 | <h5 class="title">确定要重置密码吗</h5> | 330 | <h5 class="title">确定要重置密码吗</h5> |
331 | <p class="result">执行后,数据将 | 331 | <p class="result">执行后,数据将 |
332 | <span >无法恢复</span> | 332 | <span >无法恢复</span> |
333 | </p> | 333 | </p> |
334 | </div>`, | 334 | </div>`, |
335 | '执行确认', | 335 | '执行确认', |
336 | { | 336 | { |
337 | dangerouslyUseHTMLString: true, | ||
338 | customClass: 'customer-delete', | ||
339 | confirmButtonText: '确定', | ||
340 | cancelButtonText: '取消', | ||
341 | type: 'warning' | ||
342 | } | ||
343 | ) | ||
344 | .then(() => { | ||
345 | resetPassword(ids).then((res) => { | ||
346 | if (res.status === 1) { | ||
347 | this.$message.success({ message: res.message, showClose: true }) | ||
348 | this.getTableList() | ||
349 | } else { | ||
350 | this.$message.error({ message: res.message, showClose: true }) | ||
351 | } | ||
352 | }) | ||
353 | }) | ||
354 | .catch(() => { }) | ||
355 | }, | ||
356 | //排序 | ||
357 | updateOrder (record, operate) { | ||
358 | const findIndex = this.tableData.data.findIndex(item => item.id === record.id) | ||
359 | let swapId = '' | ||
360 | if (operate === 'UP') { | ||
361 | swapId = this.tableData.data[findIndex - 1].id | ||
362 | } else if (operate === 'DOWN') { | ||
363 | swapId = this.tableData.data[findIndex + 1].id | ||
364 | } | ||
365 | updateOrder('/rest/users', record, operate, swapId).then(res => { | ||
366 | if (res.status === 1) { | ||
367 | this.$message.success({ message: res.message, showClose: true }) | ||
368 | this.getTableList(); | ||
369 | } else { | ||
370 | this.$message.error({ message: res.message, showClose: true }) | ||
371 | } | ||
372 | }) | ||
373 | }, | ||
374 | |||
375 | // 修改人员信息 | ||
376 | handleEdit (row) { | ||
377 | console.log("rowwwww", row); | ||
378 | this.isDialog = true | ||
379 | this.$refs.dialogForm.edit(row); | ||
380 | this.$refs.dialogForm.title = "修改"; | ||
381 | }, | ||
382 | // 删除 | ||
383 | handleDelete (id, content) { | ||
384 | this.$confirm(deleteDomStr(content), '执行确认', { | ||
385 | dangerouslyUseHTMLString: true, | 337 | dangerouslyUseHTMLString: true, |
386 | customClass: 'customer-delete', | 338 | customClass: 'customer-delete', |
387 | confirmButtonText: '确定', | 339 | confirmButtonText: '确定', |
388 | cancelButtonText: '取消', | 340 | cancelButtonText: '取消', |
389 | type: 'warning' | 341 | type: 'warning' |
390 | }) | 342 | } |
391 | .then(() => { | 343 | ) |
392 | deleteAction(`${api.users}/${id}`).then((res) => { | 344 | .then(() => { |
393 | if (res.status === 1) { | 345 | resetPassword(ids).then((res) => { |
394 | this.$message.success({ message: res.message, showClose: true }) | 346 | if (res.status === 1) { |
395 | } else { | 347 | this.$message.success({ message: res.message, showClose: true }) |
396 | this.$message.error({ message: res.message, showClose: true }) | ||
397 | } | ||
398 | this.getTableList() | 348 | this.getTableList() |
399 | }) | 349 | } else { |
350 | this.$message.error({ message: res.message, showClose: true }) | ||
351 | } | ||
400 | }) | 352 | }) |
401 | .catch(() => { }) | 353 | }) |
402 | }, | 354 | .catch(() => { }) |
403 | // 新增回显 | 355 | }, |
404 | reloadTableData () { | 356 | //排序 |
405 | this.getTableList() | 357 | updateOrder (record, operate) { |
406 | }, | 358 | const findIndex = this.tableData.data.findIndex(item => item.id === record.id) |
359 | let swapId = '' | ||
360 | if (operate === 'UP') { | ||
361 | swapId = this.tableData.data[findIndex - 1].id | ||
362 | } else if (operate === 'DOWN') { | ||
363 | swapId = this.tableData.data[findIndex + 1].id | ||
364 | } | ||
365 | updateOrder('/rest/users', record, operate, swapId).then(res => { | ||
366 | if (res.status === 1) { | ||
367 | this.$message.success({ message: res.message, showClose: true }) | ||
368 | this.getTableList(); | ||
369 | } else { | ||
370 | this.$message.error({ message: res.message, showClose: true }) | ||
371 | } | ||
372 | }) | ||
373 | }, | ||
374 | |||
375 | // 修改人员信息 | ||
376 | handleEdit (row) { | ||
377 | console.log("rowwwww", row); | ||
378 | this.isDialog = true | ||
379 | this.$refs.dialogForm.edit(row); | ||
380 | this.$refs.dialogForm.title = "修改"; | ||
381 | }, | ||
382 | // 删除 | ||
383 | handleDelete (id, content) { | ||
384 | this.$confirm(deleteDomStr(content), '执行确认', { | ||
385 | dangerouslyUseHTMLString: true, | ||
386 | customClass: 'customer-delete', | ||
387 | confirmButtonText: '确定', | ||
388 | cancelButtonText: '取消', | ||
389 | type: 'warning' | ||
390 | }) | ||
391 | .then(() => { | ||
392 | deleteAction(`${api.users}/${id}`).then((res) => { | ||
393 | if (res.status === 1) { | ||
394 | this.$message.success({ message: res.message, showClose: true }) | ||
395 | } else { | ||
396 | this.$message.error({ message: res.message, showClose: true }) | ||
397 | } | ||
398 | this.getTableList() | ||
399 | }) | ||
400 | }) | ||
401 | .catch(() => { }) | ||
402 | }, | ||
403 | // 新增回显 | ||
404 | reloadTableData () { | ||
405 | this.getTableList() | ||
407 | }, | 406 | }, |
408 | }; | 407 | }, |
408 | }; | ||
409 | </script> | 409 | </script> |
410 | <style scoped lang="scss"> | 410 | <style scoped lang="scss"> |
411 | @import "~@/styles/mixin.scss"; | 411 | @import "~@/styles/mixin.scss"; |
412 | // .btnColRight { | ||
413 | // height: 30px; | ||
414 | // .button { | ||
415 | // position: absolute; | ||
416 | // left: 30px; | ||
417 | // } | ||
418 | // } | ||
419 | /deep/.el-button.is-disabled.el-button--text { | ||
420 | width: 64px; | ||
421 | height: 28px; | ||
422 | background: rgba(255, 255, 255, 0.1); | ||
423 | border-radius: 16px; | ||
424 | } | ||
425 | </style> | 412 | </style> | ... | ... |
-
Please register or sign in to post a comment