style:样式修改
Showing
46 changed files
with
1222 additions
and
1320 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-03-06 16:24:39 | 4 | * @LastEditTime: 2023-03-07 09:15:01 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <div class="app-wrapper"> | 7 | <div class="app-wrapper jgWrapper"> |
| 8 | <navbar /> | 8 | <navbar /> |
| 9 | <div class="appMain"> | 9 | <div class="appMain"> |
| 10 | <app-main /> | 10 | <app-main /> |
| ... | @@ -34,8 +34,10 @@ export default { | ... | @@ -34,8 +34,10 @@ export default { |
| 34 | } | 34 | } |
| 35 | </script> | 35 | </script> |
| 36 | <style lang="scss"> | 36 | <style lang="scss"> |
| 37 | @import "~@/styles/jgSidebar.scss"; | ||
| 38 | </style> | ||
| 39 | <style lang="scss" scoped> | ||
| 37 | @import "~@/styles/mixin.scss"; | 40 | @import "~@/styles/mixin.scss"; |
| 38 | @import "~@/styles/sidebar.scss"; | ||
| 39 | 41 | ||
| 40 | .app-wrapper { | 42 | .app-wrapper { |
| 41 | @include clearfix; | 43 | @include clearfix; | ... | ... |
| ... | @@ -4,11 +4,7 @@ | ... | @@ -4,11 +4,7 @@ |
| 4 | <div class="logo"> | 4 | <div class="logo"> |
| 5 | <img :src="require('@/image/logo.png')" alt="" /> | 5 | <img :src="require('@/image/logo.png')" alt="" /> |
| 6 | </div> | 6 | </div> |
| 7 | <!-- <div class="backdrop"> | ||
| 8 | <Breadcrumb /> | ||
| 9 | </div> --> | ||
| 10 | <div class="right-menu"> | 7 | <div class="right-menu"> |
| 11 | <!-- <div class="dataView d-center pointer" @click="handleDataView">大屏展示</div> --> | ||
| 12 | <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand"> | 8 | <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand"> |
| 13 | <div class="avatar-wrapper"> | 9 | <div class="avatar-wrapper"> |
| 14 | <span style="padding-right:10px">{{ name }}</span> | 10 | <span style="padding-right:10px">{{ name }}</span> |
| ... | @@ -67,15 +63,6 @@ export default { | ... | @@ -67,15 +63,6 @@ export default { |
| 67 | } | 63 | } |
| 68 | } | 64 | } |
| 69 | 65 | ||
| 70 | .dataView { | ||
| 71 | color: #fff; | ||
| 72 | width: 120px; | ||
| 73 | height: 32px; | ||
| 74 | background: url("../../image/dp.png"); | ||
| 75 | background-size: cover; | ||
| 76 | margin-right: 20px; | ||
| 77 | } | ||
| 78 | |||
| 79 | .NoticeBar { | 66 | .NoticeBar { |
| 80 | position: absolute; | 67 | position: absolute; |
| 81 | bottom: 0; | 68 | bottom: 0; |
| ... | @@ -120,15 +107,11 @@ export default { | ... | @@ -120,15 +107,11 @@ export default { |
| 120 | height: $headerHeight; | 107 | height: $headerHeight; |
| 121 | overflow: hidden; | 108 | overflow: hidden; |
| 122 | position: relative; | 109 | position: relative; |
| 123 | // background: linear-gradient(270deg, #148CEE 0%, #1870E3 100%); //默认颜色 | 110 | background: #3D59C4; |
| 124 | // box-shadow: 0 1px 0px rgba(0, 21, 41, 0.08); | ||
| 125 | background: #0d1230; | ||
| 126 | display: flex; | 111 | display: flex; |
| 127 | align-items: center; | 112 | align-items: center; |
| 128 | padding-right: 20px; | 113 | padding-right: 20px; |
| 129 | justify-content: space-between; | 114 | justify-content: space-between; |
| 130 | margin-bottom: 10px; | ||
| 131 | |||
| 132 | .header-logo { | 115 | .header-logo { |
| 133 | width: 300px; | 116 | width: 300px; |
| 134 | } | 117 | } | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-03-06 16:23:31 | 4 | * @LastEditTime: 2023-03-07 09:11:01 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <div class="app-wrapper scWrapper"> | 7 | <div class="app-wrapper scWrapper"> |
| ... | @@ -43,7 +43,8 @@ export default { | ... | @@ -43,7 +43,8 @@ export default { |
| 43 | position: relative; | 43 | position: relative; |
| 44 | height: 100%; | 44 | height: 100%; |
| 45 | width: 100%; | 45 | width: 100%; |
| 46 | background-color: $containerbg; | 46 | // background-color: $containerbg; |
| 47 | padding: 0; | ||
| 47 | 48 | ||
| 48 | &.mobile.openSidebar { | 49 | &.mobile.openSidebar { |
| 49 | position: fixed; | 50 | position: fixed; | ... | ... |
| 1 | /* | ||
| 2 | * @Description: | ||
| 3 | * @Autor: renchao | ||
| 4 | * @LastEditTime: 2023-03-07 09:43:25 | ||
| 5 | */ | ||
| 1 | import router from "./router"; | 6 | import router from "./router"; |
| 2 | import store from "./store"; | 7 | import store from "./store"; |
| 3 | import { getMenuInfo } from "@/api/user"; | 8 | import { getMenuInfo } from "@/api/user"; |
| ... | @@ -23,6 +28,7 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -23,6 +28,7 @@ router.beforeEach(async (to, from, next) => { |
| 23 | //请求用户信息 | 28 | //请求用户信息 |
| 24 | if (!hasUser) { | 29 | if (!hasUser) { |
| 25 | store.dispatch("user/getUserInfo"); | 30 | store.dispatch("user/getUserInfo"); |
| 31 | import("@/styles/public.scss"); | ||
| 26 | } | 32 | } |
| 27 | if (hasAddRoute) { | 33 | if (hasAddRoute) { |
| 28 | next(); | 34 | next(); | ... | ... |
| 1 | /* | ||
| 2 | * @Description: | ||
| 3 | * @Autor: renchao | ||
| 4 | * @LastEditTime: 2023-03-07 09:38:47 | ||
| 5 | */ | ||
| 1 | import { getUserInfo } from "@/api/user"; | 6 | import { getUserInfo } from "@/api/user"; |
| 2 | const state = { | 7 | const state = { |
| 3 | hasUser: false, | 8 | hasUser: false, |
| ... | @@ -18,9 +23,6 @@ const actions = { | ... | @@ -18,9 +23,6 @@ const actions = { |
| 18 | getUserInfo ({ commit }) { | 23 | getUserInfo ({ commit }) { |
| 19 | return new Promise(async (resolve) => { | 24 | return new Promise(async (resolve) => { |
| 20 | let { result: res } = await getUserInfo(); | 25 | let { result: res } = await getUserInfo(); |
| 21 | // require.ensure([], function (require) { | ||
| 22 | // require("@/assets/sass/smart-lift/index.scss"); | ||
| 23 | // }); | ||
| 24 | commit("SET_USERINFO", res); | 26 | commit("SET_USERINFO", res); |
| 25 | resolve(true); | 27 | resolve(true); |
| 26 | }); | 28 | }); | ... | ... |
| 1 | .tableClass { | 1 | .tableClass { |
| 2 | /deep/.el-table { | 2 | .el-table { |
| 3 | border: none !important; | 3 | border: none !important; |
| 4 | border-radius: 0 !important; | 4 | border-radius: 0 !important; |
| 5 | background-color: rgba(0, 0, 0, 0); | 5 | background-color: rgba(0, 0, 0, 0); |
| ... | @@ -40,6 +40,11 @@ | ... | @@ -40,6 +40,11 @@ |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | //*****start*通用表单查询条件,列表样式******// | 42 | //*****start*通用表单查询条件,列表样式******// |
| 43 | .bgc { | ||
| 44 | box-shadow: inset 0px 0px 8px 0px rgba(255, 255, 255, 0.5); | ||
| 45 | background-color: rgba(0, 0, 0, 0); | ||
| 46 | } | ||
| 47 | |||
| 43 | .from-clues { | 48 | .from-clues { |
| 44 | height: 100%; | 49 | height: 100%; |
| 45 | width: 100%; | 50 | width: 100%; |
| ... | @@ -56,11 +61,11 @@ | ... | @@ -56,11 +61,11 @@ |
| 56 | background-size: 100% 100%; | 61 | background-size: 100% 100%; |
| 57 | margin-top: 15px; | 62 | margin-top: 15px; |
| 58 | 63 | ||
| 59 | /deep/.el-form-item__label { | 64 | .el-form-item__label { |
| 60 | color: #E3F1FF; | 65 | color: #E3F1FF; |
| 61 | } | 66 | } |
| 62 | 67 | ||
| 63 | /deep/.el-input__inner { | 68 | .el-input__inner { |
| 64 | background: #07388B; | 69 | background: #07388B; |
| 65 | border-radius: 2px; | 70 | border-radius: 2px; |
| 66 | color: #CEF8FF; | 71 | color: #CEF8FF; |
| ... | @@ -114,16 +119,11 @@ | ... | @@ -114,16 +119,11 @@ |
| 114 | //修改表头的背景颜色横向渐变色 | 119 | //修改表头的背景颜色横向渐变色 |
| 115 | @extend .tableClass; | 120 | @extend .tableClass; |
| 116 | 121 | ||
| 117 | /deep/.el-pagination__total { | 122 | .el-pagination__total { |
| 118 | color: #FFFFFF; | 123 | color: #FFFFFF; |
| 119 | } | 124 | } |
| 120 | 125 | ||
| 121 | .bgc { | 126 | .el-pagination { |
| 122 | box-shadow: inset 0px 0px 8px 0px rgba(255, 255, 255, 0.5); | ||
| 123 | background-color: rgba(0, 0, 0, 0); | ||
| 124 | } | ||
| 125 | |||
| 126 | /deep/ .el-pagination { | ||
| 127 | .el-input__inner { | 127 | .el-input__inner { |
| 128 | color: #FFFFFF; | 128 | color: #FFFFFF; |
| 129 | border: none; | 129 | border: none; |
| ... | @@ -142,14 +142,9 @@ | ... | @@ -142,14 +142,9 @@ |
| 142 | color: #FFFFFF; | 142 | color: #FFFFFF; |
| 143 | } | 143 | } |
| 144 | } | 144 | } |
| 145 | } | ||
| 145 | 146 | ||
| 146 | /deep/.btn-next, | ||
| 147 | /deep/.btn-prev { | ||
| 148 | @extend .bgc; | ||
| 149 | color: #FFFFFF; | ||
| 150 | } | ||
| 151 | 147 | ||
| 152 | } | ||
| 153 | 148 | ||
| 154 | .el-form--inline .el-form-item { | 149 | .el-form--inline .el-form-item { |
| 155 | width: auto; | 150 | width: auto; |
| ... | @@ -167,10 +162,15 @@ | ... | @@ -167,10 +162,15 @@ |
| 167 | } | 162 | } |
| 168 | } | 163 | } |
| 169 | 164 | ||
| 165 | .el-pagination.is-background .btn-prev, | ||
| 166 | .el-pagination.is-background .btn-next { | ||
| 167 | @extend .bgc; | ||
| 168 | color: #FFFFFF; | ||
| 169 | } | ||
| 170 | 170 | ||
| 171 | 171 | ||
| 172 | //*****end*通用表单查询条件,列表样式******// | 172 | //*****end*通用表单查询条件,列表样式******// |
| 173 | /deep/.el-range-separator { | 173 | .el-range-separator { |
| 174 | line-height: 28px !important; | 174 | line-height: 28px !important; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| ... | @@ -202,7 +202,7 @@ | ... | @@ -202,7 +202,7 @@ |
| 202 | 202 | ||
| 203 | // 修改弹框样式 | 203 | // 修改弹框样式 |
| 204 | .modifydialog { | 204 | .modifydialog { |
| 205 | /deep/.el-dialog__header { | 205 | .el-dialog__header { |
| 206 | text-align: center; | 206 | text-align: center; |
| 207 | margin-bottom: 10px; | 207 | margin-bottom: 10px; |
| 208 | 208 | ||
| ... | @@ -211,36 +211,36 @@ | ... | @@ -211,36 +211,36 @@ |
| 211 | } | 211 | } |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | /deep/.el-form-item__label { | 214 | .el-form-item__label { |
| 215 | color: white; | 215 | color: white; |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | /deep/.el-input__inner { | 218 | .el-input__inner { |
| 219 | background-color: #07388b; | 219 | background-color: #07388b; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | /deep/.el-input__inner { | 222 | .el-input__inner { |
| 223 | background: #07388b; | 223 | background: #07388b; |
| 224 | border-radius: 2px; | 224 | border-radius: 2px; |
| 225 | border: 1px solid #6bc1fc; | 225 | border: 1px solid #6bc1fc; |
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | /deep/.el-textarea__inner { | 228 | .el-textarea__inner { |
| 229 | background: #07388b; | 229 | background: #07388b; |
| 230 | color: #fff; | 230 | color: #fff; |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | /deep/.el-form-item__label { | 233 | .el-form-item__label { |
| 234 | color: #fff; | 234 | color: #fff; |
| 235 | } | 235 | } |
| 236 | 236 | ||
| 237 | /deep/.el-dialog__headerbtn { | 237 | .el-dialog__headerbtn { |
| 238 | position: absolute; | 238 | position: absolute; |
| 239 | top: 22px; | 239 | top: 22px; |
| 240 | right: 30px; | 240 | right: 30px; |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | /deep/.el-dialog__header { | 243 | .el-dialog__header { |
| 244 | text-align: center; | 244 | text-align: center; |
| 245 | margin-bottom: 10px; | 245 | margin-bottom: 10px; |
| 246 | 246 | ||
| ... | @@ -252,23 +252,23 @@ | ... | @@ -252,23 +252,23 @@ |
| 252 | 252 | ||
| 253 | // 角色配置 | 253 | // 角色配置 |
| 254 | .roleconfiguration { | 254 | .roleconfiguration { |
| 255 | /deep/.el-dialog__body { | 255 | .el-dialog__body { |
| 256 | display: flex; | 256 | display: flex; |
| 257 | flex-direction: column; | 257 | flex-direction: column; |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | /deep/ .el-tabs { | 260 | .el-tabs { |
| 261 | color: #cef8ff; | 261 | color: #cef8ff; |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | .sjmx { | 264 | .sjmx { |
| 265 | /deep/.el-tabs__item { | 265 | .el-tabs__item { |
| 266 | height: 50px; | 266 | height: 50px; |
| 267 | padding-top: 6px; | 267 | padding-top: 6px; |
| 268 | } | 268 | } |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | /deep/.el-tabs__item { | 271 | .el-tabs__item { |
| 272 | color: #cef8ff !important; | 272 | color: #cef8ff !important; |
| 273 | 273 | ||
| 274 | display: flex; | 274 | display: flex; |
| ... | @@ -286,35 +286,35 @@ | ... | @@ -286,35 +286,35 @@ |
| 286 | background-size: 100% 100%; | 286 | background-size: 100% 100%; |
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | /deep/.el-tabs__nav-scroll { | 289 | .el-tabs__nav-scroll { |
| 290 | background: none; | 290 | background: none; |
| 291 | } | 291 | } |
| 292 | 292 | ||
| 293 | /deep/.el-tabs__nav { | 293 | .el-tabs__nav { |
| 294 | display: flex; | 294 | display: flex; |
| 295 | border: none !important; | 295 | border: none !important; |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | /deep/.el-tabs__item.is-top { | 298 | .el-tabs__item.is-top { |
| 299 | border: 1px solid #dfe4ed; | 299 | border: 1px solid #dfe4ed; |
| 300 | border-top: 1px solid #dfe4ed; | 300 | border-top: 1px solid #dfe4ed; |
| 301 | border-bottom: 1px solid transparent; | 301 | border-bottom: 1px solid transparent; |
| 302 | } | 302 | } |
| 303 | 303 | ||
| 304 | /deep/.el-tabs__header { | 304 | .el-tabs__header { |
| 305 | border: none; | 305 | border: none; |
| 306 | margin-bottom: 0; | 306 | margin-bottom: 0; |
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | /deep/.el-tabs__item.is-top:not(:last-child) { | 309 | .el-tabs__item.is-top:not(:last-child) { |
| 310 | margin-right: 5px; | 310 | margin-right: 5px; |
| 311 | } | 311 | } |
| 312 | 312 | ||
| 313 | /deep/.el-tabs__item.is-top { | 313 | .el-tabs__item.is-top { |
| 314 | background-color: none !important; | 314 | background-color: none !important; |
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | /deep/.el-tabs__item.is-active { | 317 | .el-tabs__item.is-active { |
| 318 | background: url("~@/image/tabitemse.png") no-repeat; | 318 | background: url("~@/image/tabitemse.png") no-repeat; |
| 319 | background-size: 100% 100%; | 319 | background-size: 100% 100%; |
| 320 | } | 320 | } |
| ... | @@ -344,7 +344,7 @@ | ... | @@ -344,7 +344,7 @@ |
| 344 | border-top: none; | 344 | border-top: none; |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | /deep/.editDialogBox { | 347 | .editDialogBox { |
| 348 | border-radius: 8px; | 348 | border-radius: 8px; |
| 349 | overflow: hidden; | 349 | overflow: hidden; |
| 350 | min-width: 1228px; | 350 | min-width: 1228px; |
| ... | @@ -424,7 +424,7 @@ | ... | @@ -424,7 +424,7 @@ |
| 424 | overflow: hidden; | 424 | overflow: hidden; |
| 425 | } | 425 | } |
| 426 | 426 | ||
| 427 | /deep/.el-table { | 427 | .el-table { |
| 428 | background: none; | 428 | background: none; |
| 429 | 429 | ||
| 430 | th.el-table__cell { | 430 | th.el-table__cell { |
| ... | @@ -440,5 +440,4 @@ | ... | @@ -440,5 +440,4 @@ |
| 440 | } | 440 | } |
| 441 | } | 441 | } |
| 442 | } | 442 | } |
| 443 | |||
| 444 | } | 443 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | .scWrapper { | 1 | .scWrapper { |
| 2 | .main-container { | 2 | .main-container { |
| 3 | width: 100%; | 3 | width: 100%; |
| 4 | height: calc(100% - 84px); | 4 | height: calc(100% - 74px); |
| 5 | transition: margin-left 0.28s; | 5 | transition: margin-left 0.28s; |
| 6 | display: flex; | 6 | display: flex; |
| 7 | background-color: $containerbg; | ||
| 8 | } | 7 | } |
| 9 | 8 | ||
| 10 | .sidebar-container { | 9 | .sidebar-container { |
| ... | @@ -12,6 +11,7 @@ | ... | @@ -12,6 +11,7 @@ |
| 12 | width: $sideBarWidth !important; | 11 | width: $sideBarWidth !important; |
| 13 | font-size: 0px; | 12 | font-size: 0px; |
| 14 | margin-right: 15px; | 13 | margin-right: 15px; |
| 14 | background: #121F41; | ||
| 15 | 15 | ||
| 16 | .horizontal-collapse-transition { | 16 | .horizontal-collapse-transition { |
| 17 | transition: 0s width ease-in-out, 0s padding-left ease-in-out, | 17 | transition: 0s width ease-in-out, 0s padding-left ease-in-out, |
| ... | @@ -164,7 +164,7 @@ | ... | @@ -164,7 +164,7 @@ |
| 164 | // border-radius: 6px; | 164 | // border-radius: 6px; |
| 165 | } | 165 | } |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | .hideSidebar { | 168 | .hideSidebar { |
| 169 | .sidebar-container { | 169 | .sidebar-container { |
| 170 | width: 54px !important; | 170 | width: 54px !important; | ... | ... |
| 1 | /* | ||
| 2 | * @Description: | ||
| 3 | * @Autor: renchao | ||
| 4 | * @LastEditTime: 2023-03-07 09:35:10 | ||
| 5 | */ | ||
| 1 | import Layout from '@/layout' | 6 | import Layout from '@/layout' |
| 2 | export default function filterAsyncRouter (routers) { | 7 | export default function filterAsyncRouter (routers) { |
| 3 | routers.forEach(item => { | 8 | routers.forEach(item => { | ... | ... |
| ... | @@ -152,6 +152,6 @@ export default { | ... | @@ -152,6 +152,6 @@ export default { |
| 152 | </script> | 152 | </script> |
| 153 | <style scoped lang="scss"> | 153 | <style scoped lang="scss"> |
| 154 | // 引入表单整体样式 | 154 | // 引入表单整体样式 |
| 155 | @import "~@/styles/public.scss"; | 155 | // @import "~@/styles/public.scss"; |
| 156 | </style> | 156 | </style> |
| 157 | 157 | ... | ... |
| ... | @@ -163,6 +163,6 @@ export default { | ... | @@ -163,6 +163,6 @@ export default { |
| 163 | } | 163 | } |
| 164 | </script> | 164 | </script> |
| 165 | <style scoped lang="scss"> | 165 | <style scoped lang="scss"> |
| 166 | @import "~@/styles/public.scss"; | 166 | // @import "~@/styles/public.scss"; |
| 167 | @import "./index.scss"; | 167 | @import "./index.scss"; |
| 168 | </style> | 168 | </style> | ... | ... |
| ... | @@ -160,5 +160,5 @@ export default { | ... | @@ -160,5 +160,5 @@ export default { |
| 160 | </script> | 160 | </script> |
| 161 | <style scoped lang="scss"> | 161 | <style scoped lang="scss"> |
| 162 | // 引入表单整体样式 | 162 | // 引入表单整体样式 |
| 163 | @import "~@/styles/public.scss"; | 163 | // @import "~@/styles/public.scss"; |
| 164 | </style> | 164 | </style> | ... | ... |
| ... | @@ -10,29 +10,16 @@ | ... | @@ -10,29 +10,16 @@ |
| 10 | <el-row> | 10 | <el-row> |
| 11 | <el-col :span="4"> | 11 | <el-col :span="4"> |
| 12 | <el-form-item label="开始日期" prop="startTime"> | 12 | <el-form-item label="开始日期" prop="startTime"> |
| 13 | <el-date-picker | 13 | <el-date-picker type="date" :clearable="false" class="width100" placeholder="开始日期" |
| 14 | type="date" | 14 | :picker-options="pickerOptionsStart" v-model="form.startTime" |
| 15 | :clearable="false" | 15 | value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> |
| 16 | class="width100" | ||
| 17 | placeholder="开始日期" | ||
| 18 | :picker-options="pickerOptionsStart" | ||
| 19 | v-model="form.startTime" | ||
| 20 | value-format="yyyy-MM-dd HH:mm:ss" | ||
| 21 | ></el-date-picker> | ||
| 22 | </el-form-item> | 16 | </el-form-item> |
| 23 | </el-col> | 17 | </el-col> |
| 24 | <el-col :span="4"> | 18 | <el-col :span="4"> |
| 25 | <el-form-item label="结束日期" prop="endTime"> | 19 | <el-form-item label="结束日期" prop="endTime"> |
| 26 | <el-date-picker | 20 | <el-date-picker class="width100" :clearable="false" type="date" placeholder="结束日期" |
| 27 | class="width100" | 21 | :picker-options="pickerOptionsEnd" v-model="form.endTime" value-format="yyyy-MM-dd HH:mm:ss" |
| 28 | :clearable="false" | 22 | @change="endTimeChange"></el-date-picker> |
| 29 | type="date" | ||
| 30 | placeholder="结束日期" | ||
| 31 | :picker-options="pickerOptionsEnd" | ||
| 32 | v-model="form.endTime" | ||
| 33 | value-format="yyyy-MM-dd HH:mm:ss" | ||
| 34 | @change="endTimeChange" | ||
| 35 | ></el-date-picker> | ||
| 36 | </el-form-item> | 23 | </el-form-item> |
| 37 | </el-col> | 24 | </el-col> |
| 38 | <!-- 操作按钮 --> | 25 | <!-- 操作按钮 --> |
| ... | @@ -57,7 +44,7 @@ import efficient from "@/api/efficient"; | ... | @@ -57,7 +44,7 @@ import efficient from "@/api/efficient"; |
| 57 | import { getFirstDayOfSeason, timeFormat } from "@/utils/operation"; | 44 | import { getFirstDayOfSeason, timeFormat } from "@/utils/operation"; |
| 58 | export default { | 45 | export default { |
| 59 | name: "jktj", | 46 | name: "jktj", |
| 60 | data() { | 47 | data () { |
| 61 | return { | 48 | return { |
| 62 | // 开始日期限制 | 49 | // 开始日期限制 |
| 63 | pickerOptionsStart: { | 50 | pickerOptionsStart: { |
| ... | @@ -83,19 +70,19 @@ export default { | ... | @@ -83,19 +70,19 @@ export default { |
| 83 | pieChartsData: [], | 70 | pieChartsData: [], |
| 84 | }; | 71 | }; |
| 85 | }, | 72 | }, |
| 86 | created() {}, | 73 | created () { }, |
| 87 | mounted() { | 74 | mounted () { |
| 88 | this.getProcessCounts(); | 75 | this.getProcessCounts(); |
| 89 | }, | 76 | }, |
| 90 | computed: { | 77 | computed: { |
| 91 | ...mapGetters(["dicData"]), | 78 | ...mapGetters(["dicData"]), |
| 92 | }, | 79 | }, |
| 93 | methods: { | 80 | methods: { |
| 94 | endTimeChange(val) { | 81 | endTimeChange (val) { |
| 95 | this.form.endTime = timeFormat(new Date(val), true); | 82 | this.form.endTime = timeFormat(new Date(val), true); |
| 96 | }, | 83 | }, |
| 97 | //查询各区县办件数量 | 84 | //查询各区县办件数量 |
| 98 | async getProcessCounts() { | 85 | async getProcessCounts () { |
| 99 | this.pieChartsData = []; | 86 | this.pieChartsData = []; |
| 100 | let { result: res } = await efficient.getProcessCounts( | 87 | let { result: res } = await efficient.getProcessCounts( |
| 101 | this.form.startTime, | 88 | this.form.startTime, |
| ... | @@ -121,7 +108,7 @@ export default { | ... | @@ -121,7 +108,7 @@ export default { |
| 121 | }); | 108 | }); |
| 122 | }, | 109 | }, |
| 123 | // 重置 | 110 | // 重置 |
| 124 | resetForm() { | 111 | resetForm () { |
| 125 | this.form = { | 112 | this.form = { |
| 126 | startTime: getFirstDayOfSeason(), | 113 | startTime: getFirstDayOfSeason(), |
| 127 | endTime: timeFormat(new Date(), true), | 114 | endTime: timeFormat(new Date(), true), |
| ... | @@ -129,7 +116,7 @@ export default { | ... | @@ -129,7 +116,7 @@ export default { |
| 129 | this.getProcessCounts(); | 116 | this.getProcessCounts(); |
| 130 | }, | 117 | }, |
| 131 | //玫瑰图初始化 | 118 | //玫瑰图初始化 |
| 132 | echartInit() { | 119 | echartInit () { |
| 133 | let _this = this; | 120 | let _this = this; |
| 134 | // 基于准备好的dom,初始化echarts实例 | 121 | // 基于准备好的dom,初始化echarts实例 |
| 135 | let myChart = this.$echarts.init(document.getElementById("myChart")); | 122 | let myChart = this.$echarts.init(document.getElementById("myChart")); |
| ... | @@ -190,7 +177,7 @@ export default { | ... | @@ -190,7 +177,7 @@ export default { |
| 190 | }); | 177 | }); |
| 191 | }, | 178 | }, |
| 192 | //柱图初始化 | 179 | //柱图初始化 |
| 193 | async barChartInit(recType) { | 180 | async barChartInit (recType) { |
| 194 | //请求recType对应业务的各区县数据 | 181 | //请求recType对应业务的各区县数据 |
| 195 | let { result: res } = await efficient.getProcessDays( | 182 | let { result: res } = await efficient.getProcessDays( |
| 196 | recType, | 183 | recType, |
| ... | @@ -325,7 +312,7 @@ export default { | ... | @@ -325,7 +312,7 @@ export default { |
| 325 | }; | 312 | }; |
| 326 | </script> | 313 | </script> |
| 327 | <style scoped lang="scss"> | 314 | <style scoped lang="scss"> |
| 328 | @import "~@/styles/public.scss"; | 315 | // @import "~@/styles/public.scss"; |
| 329 | 316 | ||
| 330 | .jktjDetail { | 317 | .jktjDetail { |
| 331 | height: 100%; | 318 | height: 100%; |
| ... | @@ -364,5 +351,5 @@ export default { | ... | @@ -364,5 +351,5 @@ export default { |
| 364 | } | 351 | } |
| 365 | </style> | 352 | </style> |
| 366 | <style scoped lang="scss"> | 353 | <style scoped lang="scss"> |
| 367 | @import "~@/styles/public.scss"; | 354 | // @import "~@/styles/public.scss"; |
| 368 | </style> | 355 | </style> | ... | ... |
| ... | @@ -10,47 +10,24 @@ | ... | @@ -10,47 +10,24 @@ |
| 10 | <el-row> | 10 | <el-row> |
| 11 | <el-col :span="4"> | 11 | <el-col :span="4"> |
| 12 | <el-form-item label="行政区"> | 12 | <el-form-item label="行政区"> |
| 13 | <el-select | 13 | <el-select v-model="form.qxdm" class="width100" clearable placeholder="行政区"> |
| 14 | v-model="form.qxdm" | 14 | <el-option v-for="item in dicData['A20']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE"> |
| 15 | class="width100" | ||
| 16 | clearable | ||
| 17 | placeholder="行政区" | ||
| 18 | > | ||
| 19 | <el-option | ||
| 20 | v-for="item in dicData['A20']" | ||
| 21 | :key="item.DCODE" | ||
| 22 | :label="item.DNAME" | ||
| 23 | :value="item.DCODE" | ||
| 24 | > | ||
| 25 | </el-option> | 15 | </el-option> |
| 26 | </el-select> | 16 | </el-select> |
| 27 | </el-form-item> | 17 | </el-form-item> |
| 28 | </el-col> | 18 | </el-col> |
| 29 | <el-col :span="4"> | 19 | <el-col :span="4"> |
| 30 | <el-form-item label="开始日期" prop="startTime"> | 20 | <el-form-item label="开始日期" prop="startTime"> |
| 31 | <el-date-picker | 21 | <el-date-picker type="date" :clearable="false" class="width100" placeholder="开始日期" |
| 32 | type="date" | 22 | :picker-options="pickerOptionsStart" v-model="form.startTime" |
| 33 | :clearable="false" | 23 | value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> |
| 34 | class="width100" | ||
| 35 | placeholder="开始日期" | ||
| 36 | :picker-options="pickerOptionsStart" | ||
| 37 | v-model="form.startTime" | ||
| 38 | value-format="yyyy-MM-dd HH:mm:ss" | ||
| 39 | ></el-date-picker> | ||
| 40 | </el-form-item> | 24 | </el-form-item> |
| 41 | </el-col> | 25 | </el-col> |
| 42 | <el-col :span="4"> | 26 | <el-col :span="4"> |
| 43 | <el-form-item label="结束日期" prop="endTime"> | 27 | <el-form-item label="结束日期" prop="endTime"> |
| 44 | <el-date-picker | 28 | <el-date-picker type="date" :clearable="false" class="width100" placeholder="结束日期" |
| 45 | type="date" | 29 | :picker-options="pickerOptionsEnd" v-model="form.endTime" value-format="yyyy-MM-dd HH:mm:ss" |
| 46 | :clearable="false" | 30 | @change="endTimeChange"></el-date-picker> |
| 47 | class="width100" | ||
| 48 | placeholder="结束日期" | ||
| 49 | :picker-options="pickerOptionsEnd" | ||
| 50 | v-model="form.endTime" | ||
| 51 | value-format="yyyy-MM-dd HH:mm:ss" | ||
| 52 | @change="endTimeChange" | ||
| 53 | ></el-date-picker> | ||
| 54 | </el-form-item> | 31 | </el-form-item> |
| 55 | </el-col> | 32 | </el-col> |
| 56 | <!-- 操作按钮 --> | 33 | <!-- 操作按钮 --> |
| ... | @@ -98,7 +75,7 @@ export default { | ... | @@ -98,7 +75,7 @@ export default { |
| 98 | // 搜索表单 | 75 | // 搜索表单 |
| 99 | form: { | 76 | form: { |
| 100 | startTime: getFirstDayOfSeason(), | 77 | startTime: getFirstDayOfSeason(), |
| 101 | endTime: timeFormat(new Date(),true), | 78 | endTime: timeFormat(new Date(), true), |
| 102 | qxdm: "", | 79 | qxdm: "", |
| 103 | }, | 80 | }, |
| 104 | }; | 81 | }; |
| ... | @@ -111,8 +88,8 @@ export default { | ... | @@ -111,8 +88,8 @@ export default { |
| 111 | ...mapGetters(["dicData"]), | 88 | ...mapGetters(["dicData"]), |
| 112 | }, | 89 | }, |
| 113 | methods: { | 90 | methods: { |
| 114 | endTimeChange(val){ | 91 | endTimeChange (val) { |
| 115 | this.form.endTime = timeFormat(new Date(val),true) | 92 | this.form.endTime = timeFormat(new Date(val), true) |
| 116 | }, | 93 | }, |
| 117 | async getSuucessRate () { | 94 | async getSuucessRate () { |
| 118 | this.recTypeArr = []; | 95 | this.recTypeArr = []; |
| ... | @@ -137,7 +114,7 @@ export default { | ... | @@ -137,7 +114,7 @@ export default { |
| 137 | resetForm () { | 114 | resetForm () { |
| 138 | this.form = { | 115 | this.form = { |
| 139 | startTime: getFirstDayOfSeason(), | 116 | startTime: getFirstDayOfSeason(), |
| 140 | endTime: timeFormat(new Date(),true), | 117 | endTime: timeFormat(new Date(), true), |
| 141 | qxdm: "", | 118 | qxdm: "", |
| 142 | }; | 119 | }; |
| 143 | this.getSuucessRate(); | 120 | this.getSuucessRate(); |
| ... | @@ -231,7 +208,7 @@ export default { | ... | @@ -231,7 +208,7 @@ export default { |
| 231 | color: "#fff", | 208 | color: "#fff", |
| 232 | fontSize: "16", | 209 | fontSize: "16", |
| 233 | }, | 210 | }, |
| 234 | splitNumber:2, | 211 | splitNumber: 2, |
| 235 | axisLabel: { | 212 | axisLabel: { |
| 236 | formatter: "{value} %", | 213 | formatter: "{value} %", |
| 237 | textStyle: { | 214 | textStyle: { |
| ... | @@ -302,7 +279,7 @@ export default { | ... | @@ -302,7 +279,7 @@ export default { |
| 302 | }; | 279 | }; |
| 303 | </script> | 280 | </script> |
| 304 | <style scoped lang="scss"> | 281 | <style scoped lang="scss"> |
| 305 | @import "~@/styles/public.scss"; | 282 | // @import "~@/styles/public.scss"; |
| 306 | 283 | ||
| 307 | .jktjDetail { | 284 | .jktjDetail { |
| 308 | height: 100%; | 285 | height: 100%; |
| ... | @@ -337,5 +314,5 @@ export default { | ... | @@ -337,5 +314,5 @@ export default { |
| 337 | } | 314 | } |
| 338 | </style> | 315 | </style> |
| 339 | <style scoped lang="scss"> | 316 | <style scoped lang="scss"> |
| 340 | @import "~@/styles/public.scss"; | 317 | // @import "~@/styles/public.scss"; |
| 341 | </style> | 318 | </style> | ... | ... |
| ... | @@ -10,47 +10,24 @@ | ... | @@ -10,47 +10,24 @@ |
| 10 | <el-row> | 10 | <el-row> |
| 11 | <el-col :span="4"> | 11 | <el-col :span="4"> |
| 12 | <el-form-item label="行政区"> | 12 | <el-form-item label="行政区"> |
| 13 | <el-select | 13 | <el-select v-model="form.qxdm" class="width100" clearable placeholder="行政区"> |
| 14 | v-model="form.qxdm" | 14 | <el-option v-for="item in dicData['A20']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE"> |
| 15 | class="width100" | ||
| 16 | clearable | ||
| 17 | placeholder="行政区" | ||
| 18 | > | ||
| 19 | <el-option | ||
| 20 | v-for="item in dicData['A20']" | ||
| 21 | :key="item.DCODE" | ||
| 22 | :label="item.DNAME" | ||
| 23 | :value="item.DCODE" | ||
| 24 | > | ||
| 25 | </el-option> | 15 | </el-option> |
| 26 | </el-select> | 16 | </el-select> |
| 27 | </el-form-item> | 17 | </el-form-item> |
| 28 | </el-col> | 18 | </el-col> |
| 29 | <el-col :span="4"> | 19 | <el-col :span="4"> |
| 30 | <el-form-item label="开始日期"> | 20 | <el-form-item label="开始日期"> |
| 31 | <el-date-picker | 21 | <el-date-picker class="width100" :clearable="false" type="date" placeholder="开始日期" |
| 32 | class="width100" | 22 | :picker-options="pickerOptionsStart" v-model="form.startTime" |
| 33 | :clearable="false" | 23 | value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> |
| 34 | type="date" | ||
| 35 | placeholder="开始日期" | ||
| 36 | :picker-options="pickerOptionsStart" | ||
| 37 | v-model="form.startTime" | ||
| 38 | value-format="yyyy-MM-dd HH:mm:ss" | ||
| 39 | ></el-date-picker> | ||
| 40 | </el-form-item> | 24 | </el-form-item> |
| 41 | </el-col> | 25 | </el-col> |
| 42 | <el-col :span="4"> | 26 | <el-col :span="4"> |
| 43 | <el-form-item label="结束日期"> | 27 | <el-form-item label="结束日期"> |
| 44 | <el-date-picker | 28 | <el-date-picker class="width100" :clearable="false" type="date" placeholder="结束日期" |
| 45 | class="width100" | 29 | :picker-options="pickerOptionsEnd" v-model="form.endTime" value-format="yyyy-MM-dd HH:mm:ss" |
| 46 | :clearable="false" | 30 | @change="endTimeChange"></el-date-picker> |
| 47 | type="date" | ||
| 48 | placeholder="结束日期" | ||
| 49 | :picker-options="pickerOptionsEnd" | ||
| 50 | v-model="form.endTime" | ||
| 51 | value-format="yyyy-MM-dd HH:mm:ss" | ||
| 52 | @change="endTimeChange" | ||
| 53 | ></el-date-picker> | ||
| 54 | </el-form-item> | 31 | </el-form-item> |
| 55 | </el-col> | 32 | </el-col> |
| 56 | <!-- 操作按钮 --> | 33 | <!-- 操作按钮 --> |
| ... | @@ -98,13 +75,13 @@ export default { | ... | @@ -98,13 +75,13 @@ export default { |
| 98 | // 搜索表单 | 75 | // 搜索表单 |
| 99 | form: { | 76 | form: { |
| 100 | startTime: getFirstDayOfSeason(), | 77 | startTime: getFirstDayOfSeason(), |
| 101 | endTime: timeFormat(new Date(),true), | 78 | endTime: timeFormat(new Date(), true), |
| 102 | qxdm: "", | 79 | qxdm: "", |
| 103 | }, | 80 | }, |
| 104 | chartData:[] | 81 | chartData: [] |
| 105 | }; | 82 | }; |
| 106 | }, | 83 | }, |
| 107 | mounted() { | 84 | mounted () { |
| 108 | // 查询业务量 | 85 | // 查询业务量 |
| 109 | this.getProcessCounts(); | 86 | this.getProcessCounts(); |
| 110 | }, | 87 | }, |
| ... | @@ -112,10 +89,10 @@ export default { | ... | @@ -112,10 +89,10 @@ export default { |
| 112 | ...mapGetters(["dicData"]), | 89 | ...mapGetters(["dicData"]), |
| 113 | }, | 90 | }, |
| 114 | methods: { | 91 | methods: { |
| 115 | endTimeChange(val){ | 92 | endTimeChange (val) { |
| 116 | this.form.endTime = timeFormat(new Date(val),true) | 93 | this.form.endTime = timeFormat(new Date(val), true) |
| 117 | }, | 94 | }, |
| 118 | async getProcessCounts(){ | 95 | async getProcessCounts () { |
| 119 | this.chartData = []; | 96 | this.chartData = []; |
| 120 | let { result: res } = await efficient.getProcessCounts( | 97 | let { result: res } = await efficient.getProcessCounts( |
| 121 | this.form.startTime, | 98 | this.form.startTime, |
| ... | @@ -133,13 +110,13 @@ export default { | ... | @@ -133,13 +110,13 @@ export default { |
| 133 | resetForm () { | 110 | resetForm () { |
| 134 | this.form = { | 111 | this.form = { |
| 135 | startTime: getFirstDayOfSeason(), | 112 | startTime: getFirstDayOfSeason(), |
| 136 | endTime: timeFormat(new Date(),true), | 113 | endTime: timeFormat(new Date(), true), |
| 137 | qxdm: "" | 114 | qxdm: "" |
| 138 | }; | 115 | }; |
| 139 | this.getProcessCounts(); | 116 | this.getProcessCounts(); |
| 140 | }, | 117 | }, |
| 141 | //图表渲染 | 118 | //图表渲染 |
| 142 | echartInit(chartArr) { | 119 | echartInit (chartArr) { |
| 143 | // 基于准备好的dom,初始化echarts实例 | 120 | // 基于准备好的dom,初始化echarts实例 |
| 144 | let myChart = this.$echarts.init(document.getElementById("myChart")); | 121 | let myChart = this.$echarts.init(document.getElementById("myChart")); |
| 145 | // 绘制图表 | 122 | // 绘制图表 |
| ... | @@ -158,7 +135,7 @@ export default { | ... | @@ -158,7 +135,7 @@ export default { |
| 158 | xAxis: [ | 135 | xAxis: [ |
| 159 | { | 136 | { |
| 160 | type: "category", | 137 | type: "category", |
| 161 | data: chartArr.map(item=>item.recTypeName), | 138 | data: chartArr.map(item => item.recTypeName), |
| 162 | axisLabel: { | 139 | axisLabel: { |
| 163 | interval: 0, | 140 | interval: 0, |
| 164 | formatter: function (val) { | 141 | formatter: function (val) { |
| ... | @@ -221,7 +198,7 @@ export default { | ... | @@ -221,7 +198,7 @@ export default { |
| 221 | }, | 198 | }, |
| 222 | }, | 199 | }, |
| 223 | barMaxWidth: '60', | 200 | barMaxWidth: '60', |
| 224 | data: chartArr.map(item=>item.counts), | 201 | data: chartArr.map(item => item.counts), |
| 225 | }, | 202 | }, |
| 226 | ], | 203 | ], |
| 227 | }); | 204 | }); |
| ... | @@ -230,7 +207,7 @@ export default { | ... | @@ -230,7 +207,7 @@ export default { |
| 230 | }; | 207 | }; |
| 231 | </script> | 208 | </script> |
| 232 | <style scoped lang="scss"> | 209 | <style scoped lang="scss"> |
| 233 | @import "~@/styles/public.scss"; | 210 | // @import "~@/styles/public.scss"; |
| 234 | 211 | ||
| 235 | .jktjDetail { | 212 | .jktjDetail { |
| 236 | height: 100%; | 213 | height: 100%; |
| ... | @@ -240,11 +217,13 @@ export default { | ... | @@ -240,11 +217,13 @@ export default { |
| 240 | .rows { | 217 | .rows { |
| 241 | margin-left: 100px; | 218 | margin-left: 100px; |
| 242 | } | 219 | } |
| 220 | |||
| 243 | .center { | 221 | .center { |
| 244 | line-height: 50vh; | 222 | line-height: 50vh; |
| 245 | text-align: center; | 223 | text-align: center; |
| 246 | color:#b6b5b5 | 224 | color: #b6b5b5 |
| 247 | } | 225 | } |
| 226 | |||
| 248 | .echarts-box { | 227 | .echarts-box { |
| 249 | display: flex; | 228 | display: flex; |
| 250 | justify-content: center; | 229 | justify-content: center; |
| ... | @@ -263,5 +242,5 @@ export default { | ... | @@ -263,5 +242,5 @@ export default { |
| 263 | } | 242 | } |
| 264 | </style> | 243 | </style> |
| 265 | <style scoped lang="scss"> | 244 | <style scoped lang="scss"> |
| 266 | @import "~@/styles/public.scss"; | 245 | // @import "~@/styles/public.scss"; |
| 267 | </style> | 246 | </style> | ... | ... |
| ... | @@ -293,7 +293,7 @@ export default { | ... | @@ -293,7 +293,7 @@ export default { |
| 293 | </script> | 293 | </script> |
| 294 | <style scoped lang="scss"> | 294 | <style scoped lang="scss"> |
| 295 | // 引入表单整体样式 | 295 | // 引入表单整体样式 |
| 296 | @import "~@/styles/public.scss"; | 296 | // // @import "~@/styles/public.scss"; |
| 297 | // 引入当前css | 297 | // 引入当前css |
| 298 | @import "./index.scss"; | 298 | @import "./index.scss"; |
| 299 | </style> | 299 | </style> | ... | ... |
| ... | @@ -6,6 +6,10 @@ | ... | @@ -6,6 +6,10 @@ |
| 6 | border-right: 1px solid #458ACF !important; | 6 | border-right: 1px solid #458ACF !important; |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | /deep/.el-table thead.is-group th.el-table__cell { | ||
| 10 | background-color: transparent !important; | ||
| 11 | } | ||
| 12 | |||
| 9 | /deep/.el-table--group::after, | 13 | /deep/.el-table--group::after, |
| 10 | .el-table--border::after { | 14 | .el-table--border::after { |
| 11 | width: 0 !important; | 15 | width: 0 !important; | ... | ... |
| ... | @@ -164,7 +164,7 @@ export default { | ... | @@ -164,7 +164,7 @@ export default { |
| 164 | </script> | 164 | </script> |
| 165 | <style scoped lang="scss"> | 165 | <style scoped lang="scss"> |
| 166 | // 引入表单整体样式 | 166 | // 引入表单整体样式 |
| 167 | @import "~@/styles/public.scss"; | 167 | // @import "~@/styles/public.scss"; |
| 168 | @import "../css/index.scss"; | 168 | @import "../css/index.scss"; |
| 169 | </style> | 169 | </style> |
| 170 | 170 | ... | ... |
| ... | @@ -155,7 +155,7 @@ export default { | ... | @@ -155,7 +155,7 @@ export default { |
| 155 | </script> | 155 | </script> |
| 156 | <style scoped lang="scss"> | 156 | <style scoped lang="scss"> |
| 157 | // 引入表单整体样式 | 157 | // 引入表单整体样式 |
| 158 | @import "~@/styles/public.scss"; | 158 | // @import "~@/styles/public.scss"; |
| 159 | @import "../css/index.scss"; | 159 | @import "../css/index.scss"; |
| 160 | </style> | 160 | </style> |
| 161 | 161 | ... | ... |
| ... | @@ -148,7 +148,7 @@ export default { | ... | @@ -148,7 +148,7 @@ export default { |
| 148 | </script> | 148 | </script> |
| 149 | <style scoped lang="scss"> | 149 | <style scoped lang="scss"> |
| 150 | // 引入表单整体样式 | 150 | // 引入表单整体样式 |
| 151 | @import "~@/styles/public.scss"; | 151 | // @import "~@/styles/public.scss"; |
| 152 | @import "../css/index.scss"; | 152 | @import "../css/index.scss"; |
| 153 | </style> | 153 | </style> |
| 154 | 154 | ... | ... |
| ... | @@ -459,7 +459,7 @@ export default { | ... | @@ -459,7 +459,7 @@ export default { |
| 459 | </script> | 459 | </script> |
| 460 | <style scoped lang="scss"> | 460 | <style scoped lang="scss"> |
| 461 | @import "~@/styles/mixin.scss"; | 461 | @import "~@/styles/mixin.scss"; |
| 462 | @import "~@/styles/public.scss"; | 462 | // @import "~@/styles/public.scss"; |
| 463 | @import "~@/styles/dialogBox.scss"; | 463 | @import "~@/styles/dialogBox.scss"; |
| 464 | 464 | ||
| 465 | 465 | ... | ... |
| ... | @@ -154,6 +154,5 @@ export default { | ... | @@ -154,6 +154,5 @@ export default { |
| 154 | } | 154 | } |
| 155 | </script> | 155 | </script> |
| 156 | <style scoped lang="scss"> | 156 | <style scoped lang="scss"> |
| 157 | @import "~@/styles/public.scss"; | ||
| 158 | @import "./index.scss"; | 157 | @import "./index.scss"; |
| 159 | </style> | 158 | </style> | ... | ... |
| ... | @@ -235,7 +235,6 @@ export default { | ... | @@ -235,7 +235,6 @@ export default { |
| 235 | </script> | 235 | </script> |
| 236 | <style scoped lang="scss"> | 236 | <style scoped lang="scss"> |
| 237 | // 引入页面公共样式 | 237 | // 引入页面公共样式 |
| 238 | @import "~@/styles/public.scss"; | ||
| 239 | @import "./index.scss"; | 238 | @import "./index.scss"; |
| 240 | </style> | 239 | </style> |
| 241 | 240 | ... | ... |
| ... | @@ -146,8 +146,7 @@ export default { | ... | @@ -146,8 +146,7 @@ export default { |
| 146 | } | 146 | } |
| 147 | </script> | 147 | </script> |
| 148 | <style rel="stylesheet/scss" lang="scss" scoped> | 148 | <style rel="stylesheet/scss" lang="scss" scoped> |
| 149 | @import "~@/styles/public.scss"; | 149 | // @import "~@/styles/public.scss"; |
| 150 | |||
| 151 | .editDialogBox-box { | 150 | .editDialogBox-box { |
| 152 | margin: 14px 18px 30px 18px !important | 151 | margin: 14px 18px 30px 18px !important |
| 153 | } | 152 | } | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <!-- 编辑 --> | 2 | <!-- 编辑 --> |
| 3 | <dialogBox submitForm="submitForm" class="tableClass" @closeDialog="closeDialog" @submitForm="handleSubmit" | 3 | <dialogBox submitForm="submitForm" class="tableClass" @closeDialog="closeDialog" @submitForm="handleSubmit" width="60%" |
| 4 | width="60%" v-model="myValue" :isMain="true" title="字典信息"> | 4 | v-model="myValue" :isMain="true" title="字典信息"> |
| 5 | <div class="editDialogBox-box "> | 5 | <div class="editDialogBox-box "> |
| 6 | <el-form :model="ruleForm" ref="ruleForm" label-width="100px"> | 6 | <el-form :model="ruleForm" ref="ruleForm" label-width="100px"> |
| 7 | <el-row :gutter="20"> | 7 | <el-row :gutter="20"> |
| ... | @@ -17,9 +17,8 @@ | ... | @@ -17,9 +17,8 @@ |
| 17 | </el-col> | 17 | </el-col> |
| 18 | </el-row> | 18 | </el-row> |
| 19 | </el-form> | 19 | </el-form> |
| 20 | <lb-table :column="column" class="loadingtext opacity-input" :heightNum="600" :key="key" | 20 | <lb-table :column="column" class="loadingtext opacity-input" :heightNum="600" :key="key" :expand-row-keys="keyList" |
| 21 | :expand-row-keys="keyList" row-key="dictid" :tree-props="{ children: 'children' }" :pagination="false" | 21 | row-key="dictid" :tree-props="{ children: 'children' }" :pagination="false" :data="tableData"> |
| 22 | :data="tableData"> | ||
| 23 | </lb-table> | 22 | </lb-table> |
| 24 | </div> | 23 | </div> |
| 25 | </dialogBox> | 24 | </dialogBox> |
| ... | @@ -359,7 +358,7 @@ export default { | ... | @@ -359,7 +358,7 @@ export default { |
| 359 | }; | 358 | }; |
| 360 | </script> | 359 | </script> |
| 361 | <style rel="stylesheet/scss" lang="scss" scoped> | 360 | <style rel="stylesheet/scss" lang="scss" scoped> |
| 362 | @import "~@/styles/public.scss"; | 361 | // @import "~@/styles/public.scss"; |
| 363 | 362 | ||
| 364 | /deep/.el-radio { | 363 | /deep/.el-radio { |
| 365 | margin-right: 5px !important; | 364 | margin-right: 5px !important; | ... | ... |
| ... | @@ -22,64 +22,68 @@ | ... | @@ -22,64 +22,68 @@ |
| 22 | </div> | 22 | </div> |
| 23 | </template> | 23 | </template> |
| 24 | <script> | 24 | <script> |
| 25 | import "@/utils/flexible.js"; | 25 | import "@/utils/flexible.js"; |
| 26 | import BaseSet from "./base-set.vue"; | 26 | import BaseSet from "./base-set.vue"; |
| 27 | import PasswordEdit from "./password-edit.vue"; | 27 | import PasswordEdit from "./password-edit.vue"; |
| 28 | export default { | 28 | export default { |
| 29 | components: { | 29 | components: { |
| 30 | BaseSet, | 30 | BaseSet, |
| 31 | PasswordEdit, | 31 | PasswordEdit, |
| 32 | }, | ||
| 33 | data () { | ||
| 34 | return { | ||
| 35 | isshow: true, | ||
| 36 | }; | ||
| 37 | }, | ||
| 38 | computed: { | ||
| 39 | userData () { | ||
| 40 | return this.$store.state.user.userInfo; | ||
| 32 | }, | 41 | }, |
| 33 | data () { | 42 | }, |
| 34 | return { | 43 | watch: {}, |
| 35 | isshow: true, | 44 | created () { }, |
| 36 | }; | 45 | mounted () { |
| 37 | }, | ||
| 38 | computed: { | ||
| 39 | userData () { | ||
| 40 | return this.$store.state.user.userInfo; | ||
| 41 | }, | ||
| 42 | }, | ||
| 43 | watch: {}, | ||
| 44 | created () { }, | ||
| 45 | mounted () { | ||
| 46 | 46 | ||
| 47 | 47 | ||
| 48 | }, | ||
| 49 | methods: { | ||
| 50 | information () { | ||
| 51 | this.isshow = true; | ||
| 48 | }, | 52 | }, |
| 49 | methods: { | 53 | password () { |
| 50 | information () { | 54 | this.isshow = false; |
| 51 | this.isshow = true; | ||
| 52 | }, | ||
| 53 | password () { | ||
| 54 | this.isshow = false; | ||
| 55 | }, | ||
| 56 | }, | 55 | }, |
| 57 | }; | 56 | }, |
| 57 | }; | ||
| 58 | </script> | 58 | </script> |
| 59 | 59 | ||
| 60 | <style scoped lang="scss"> | 60 | <style scoped lang="scss"> |
| 61 | @import "~@/styles/mixin.scss"; | 61 | @import "~@/styles/mixin.scss"; |
| 62 | @import "~@/styles/public.scss"; | 62 | |
| 63 | .information { | 63 | // @import "~@/styles/public.scss"; |
| 64 | .btnColRight { | 64 | .information { |
| 65 | margin-top: 20px; | 65 | .btnColRight { |
| 66 | } | 66 | margin-top: 20px; |
| 67 | /deep/.content { | 67 | } |
| 68 | .el-input__inner { | 68 | |
| 69 | background: none; | 69 | /deep/.content { |
| 70 | } | 70 | .el-input__inner { |
| 71 | .user-info { | 71 | background: none; |
| 72 | background: none; | ||
| 73 | } | ||
| 74 | } | 72 | } |
| 75 | /deep/.el-tabs { | 73 | |
| 76 | .el-tabs__content { | 74 | .user-info { |
| 77 | height: 100%; | 75 | background: none; |
| 78 | width: 100%; | ||
| 79 | } | ||
| 80 | } | 76 | } |
| 81 | .contentbox { | 77 | } |
| 82 | height: 3.0854rem; | 78 | |
| 79 | /deep/.el-tabs { | ||
| 80 | .el-tabs__content { | ||
| 81 | height: 100%; | ||
| 82 | width: 100%; | ||
| 83 | } | 83 | } |
| 84 | } | 84 | } |
| 85 | </style> | 85 | |
| 86 | .contentbox { | ||
| 87 | height: 3.0854rem; | ||
| 88 | } | ||
| 89 | }</style> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <Dialog | 3 | <Dialog class="modifydialog" :title="title" :show.sync="visible" :width="'767px'" @close="close()"> |
| 4 | class="modifydialog" | ||
| 5 | :title="title" | ||
| 6 | :show.sync="visible" | ||
| 7 | :width="'767px'" | ||
| 8 | @close="close()"> | ||
| 9 | <template slot="content"> | 4 | <template slot="content"> |
| 10 | <el-form ref="form" :model="form" :rules="rules"> | 5 | <el-form ref="form" :model="form" :rules="rules"> |
| 11 | <el-row :gutter="24"> | 6 | <el-row :gutter="24"> |
| ... | @@ -18,14 +13,8 @@ | ... | @@ -18,14 +13,8 @@ |
| 18 | <el-row :gutter="24"> | 13 | <el-row :gutter="24"> |
| 19 | <el-col :span="12"> | 14 | <el-col :span="12"> |
| 20 | <el-form-item label="上级菜单:" label-width="124px"> | 15 | <el-form-item label="上级菜单:" label-width="124px"> |
| 21 | <el-cascader | 16 | <el-cascader :key="menuKey" v-model="form.parentId" :options="parentMenuList" :props="setProps" |
| 22 | :key="menuKey" | 17 | placeholder="请选择上级菜单" clearable @change="handleChange" /> |
| 23 | v-model="form.parentId" | ||
| 24 | :options="parentMenuList" | ||
| 25 | :props="setProps" | ||
| 26 | placeholder="请选择上级菜单" | ||
| 27 | clearable | ||
| 28 | @change="handleChange" /> | ||
| 29 | </el-form-item> | 18 | </el-form-item> |
| 30 | </el-col> | 19 | </el-col> |
| 31 | 20 | ||
| ... | @@ -33,10 +22,7 @@ | ... | @@ -33,10 +22,7 @@ |
| 33 | <el-row :gutter="24"> | 22 | <el-row :gutter="24"> |
| 34 | <el-col :span="24"> | 23 | <el-col :span="24"> |
| 35 | <el-form-item label="代码:" prop="code" label-width="124px"> | 24 | <el-form-item label="代码:" prop="code" label-width="124px"> |
| 36 | <el-input | 25 | <el-input v-model="codeComputed" placeholder="请输入菜单代码" :disabled="type === 1" /> |
| 37 | v-model="codeComputed" | ||
| 38 | placeholder="请输入菜单代码" | ||
| 39 | :disabled="type === 1" /> | ||
| 40 | </el-form-item> | 26 | </el-form-item> |
| 41 | </el-col> | 27 | </el-col> |
| 42 | </el-row> | 28 | </el-row> |
| ... | @@ -50,28 +36,17 @@ | ... | @@ -50,28 +36,17 @@ |
| 50 | <el-row :gutter="24"> | 36 | <el-row :gutter="24"> |
| 51 | <el-col :span="24"> | 37 | <el-col :span="24"> |
| 52 | <el-form-item label="浏览器跳转模式:" label-width="124px"> | 38 | <el-form-item label="浏览器跳转模式:" label-width="124px"> |
| 53 | <el-select | 39 | <el-select v-model="form.jumpMode" placeholder="请选择浏览器跳转模式"> |
| 54 | v-model="form.jumpMode" | 40 | <el-option v-for="item in jumpModeList" :key="item.value" :label="item.name" :value="item.value" /> |
| 55 | placeholder="请选择浏览器跳转模式"> | ||
| 56 | <el-option | ||
| 57 | v-for="item in jumpModeList" | ||
| 58 | :key="item.value" | ||
| 59 | :label="item.name" | ||
| 60 | :value="item.value" /> | ||
| 61 | </el-select> | 41 | </el-select> |
| 62 | </el-form-item> | 42 | </el-form-item> |
| 63 | </el-col> | 43 | </el-col> |
| 64 | </el-row> | 44 | </el-row> |
| 65 | <el-row :gutter="24"> | 45 | <el-row :gutter="24"> |
| 66 | <el-col :span="24"> | 46 | <el-col :span="24"> |
| 67 | <el-form-item | 47 | <el-form-item label="配置参数:" label-width="124px" class="form-item-mb0"> |
| 68 | label="配置参数:" | ||
| 69 | label-width="124px" | ||
| 70 | class="form-item-mb0"> | ||
| 71 | <!-- 配置参数 --> | 48 | <!-- 配置参数 --> |
| 72 | <JsonEditor | 49 | <JsonEditor :result-infos="form.metadata" @getJsonString="getJsonString" /> |
| 73 | :result-infos="form.metadata" | ||
| 74 | @getJsonString="getJsonString" /> | ||
| 75 | </el-form-item> | 50 | </el-form-item> |
| 76 | </el-col> | 51 | </el-col> |
| 77 | </el-row> | 52 | </el-row> |
| ... | @@ -80,9 +55,7 @@ | ... | @@ -80,9 +55,7 @@ |
| 80 | <template slot="footer"> | 55 | <template slot="footer"> |
| 81 | <el-button class="cancel-button" @click="close()">取消</el-button> | 56 | <el-button class="cancel-button" @click="close()">取消</el-button> |
| 82 | 57 | ||
| 83 | <el-button | 58 | <el-button type="primary" @click="submitForm()">保存</el-button> |
| 84 | type="primary" | ||
| 85 | @click="submitForm()">保存</el-button> | ||
| 86 | </template> | 59 | </template> |
| 87 | </Dialog> | 60 | </Dialog> |
| 88 | <!-- 图标列表 --> | 61 | <!-- 图标列表 --> |
| ... | @@ -91,173 +64,173 @@ | ... | @@ -91,173 +64,173 @@ |
| 91 | </template> | 64 | </template> |
| 92 | 65 | ||
| 93 | <script> | 66 | <script> |
| 94 | import Dialog from "@/components/Dialog/"; | 67 | import Dialog from "@/components/Dialog/"; |
| 95 | import { getParentMenuListAction } from '@/api/authorityManage' | 68 | import { getParentMenuListAction } from '@/api/authorityManage' |
| 96 | import JsonEditor from '@/components/JsonEditors' | 69 | import JsonEditor from '@/components/JsonEditors' |
| 97 | import IconList from '@/components/IconList' | 70 | import IconList from '@/components/IconList' |
| 98 | import { validateCode } from '@/utils/validate'; | 71 | import { validateCode } from '@/utils/validate'; |
| 99 | import { api, httpAction } from '@/api/manageApi' | 72 | import { api, httpAction } from '@/api/manageApi' |
| 100 | export default { | 73 | export default { |
| 101 | name: 'MenuModal', | 74 | name: 'MenuModal', |
| 102 | components: { | 75 | components: { |
| 103 | IconList, | 76 | IconList, |
| 104 | JsonEditor, | 77 | JsonEditor, |
| 105 | Dialog | 78 | Dialog |
| 106 | }, | 79 | }, |
| 107 | props: { | 80 | props: { |
| 108 | productId: { | 81 | productId: { |
| 109 | type: String, | 82 | type: String, |
| 110 | default: '' | 83 | default: '' |
| 84 | } | ||
| 85 | }, | ||
| 86 | data () { | ||
| 87 | return { | ||
| 88 | form: { | ||
| 89 | icon: '', | ||
| 90 | code: '' | ||
| 91 | }, | ||
| 92 | rules: { | ||
| 93 | name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }], | ||
| 94 | code: [ | ||
| 95 | { required: true, message: '必填', trigger: 'blur' }, | ||
| 96 | { validator: validateCode, trigger: 'blur' } | ||
| 97 | ] | ||
| 98 | }, | ||
| 99 | title: '', | ||
| 100 | type: '', | ||
| 101 | visible: false, | ||
| 102 | parentMenuList: [], | ||
| 103 | menuKey: 0, | ||
| 104 | jumpModeList: [ | ||
| 105 | { name: '在当前页面显示', value: 1 }, | ||
| 106 | { name: '跳转到新页面', value: 2 } | ||
| 107 | ], | ||
| 108 | setProps: { | ||
| 109 | value: 'id', | ||
| 110 | label: 'name', | ||
| 111 | children: 'children', | ||
| 112 | expandTrigger: 'hover', | ||
| 113 | checkStrictly: true, // 可取消关联,选择任意一级选项 | ||
| 114 | emitPath: false | ||
| 115 | }, | ||
| 116 | dataUrl: api.menus | ||
| 117 | } | ||
| 118 | }, | ||
| 119 | computed: { | ||
| 120 | codeComputed: { | ||
| 121 | get: function () { | ||
| 122 | return this.form.code | ||
| 123 | }, | ||
| 124 | set: function (val) { | ||
| 125 | this.form.code = val.toUpperCase() | ||
| 111 | } | 126 | } |
| 127 | } | ||
| 128 | }, | ||
| 129 | created () { }, | ||
| 130 | mounted () { }, | ||
| 131 | methods: { | ||
| 132 | // 获取父级菜单 | ||
| 133 | getParentMenuList (id) { | ||
| 134 | |||
| 135 | getParentMenuListAction(id).then((res) => { | ||
| 136 | if (res.status === 1) { | ||
| 137 | const list = this.$dealArrChildren(res.content) | ||
| 138 | if (id) { | ||
| 139 | this.parentMenuList = this.$dealArrDisabled( | ||
| 140 | this.$deepCopy(list), | ||
| 141 | id | ||
| 142 | ) | ||
| 143 | this.menuKey++ | ||
| 144 | } else { | ||
| 145 | this.parentMenuList = list | ||
| 146 | } | ||
| 147 | } else { | ||
| 148 | this.$message.error({ message: res.message, showClose: true }) | ||
| 149 | } | ||
| 150 | }) | ||
| 112 | }, | 151 | }, |
| 113 | data () { | 152 | getIconList () { |
| 114 | return { | 153 | this.$refs.iconList.show(true) |
| 115 | form: { | ||
| 116 | icon: '', | ||
| 117 | code: '' | ||
| 118 | }, | ||
| 119 | rules: { | ||
| 120 | name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }], | ||
| 121 | code: [ | ||
| 122 | { required: true, message: '必填', trigger: 'blur' }, | ||
| 123 | { validator: validateCode, trigger: 'blur' } | ||
| 124 | ] | ||
| 125 | }, | ||
| 126 | title: '', | ||
| 127 | type: '', | ||
| 128 | visible: false, | ||
| 129 | parentMenuList: [], | ||
| 130 | menuKey: 0, | ||
| 131 | jumpModeList: [ | ||
| 132 | { name: '在当前页面显示', value: 1 }, | ||
| 133 | { name: '跳转到新页面', value: 2 } | ||
| 134 | ], | ||
| 135 | setProps: { | ||
| 136 | value: 'id', | ||
| 137 | label: 'name', | ||
| 138 | children: 'children', | ||
| 139 | expandTrigger: 'hover', | ||
| 140 | checkStrictly: true, // 可取消关联,选择任意一级选项 | ||
| 141 | emitPath: false | ||
| 142 | }, | ||
| 143 | dataUrl: api.menus | ||
| 144 | } | ||
| 145 | }, | 154 | }, |
| 146 | computed: { | 155 | getIconName (data) { |
| 147 | codeComputed: { | 156 | this.form.icon = data |
| 148 | get: function () { | 157 | }, |
| 149 | return this.form.code | 158 | // 配置参数 |
| 150 | }, | 159 | getJsonString (data) { |
| 151 | set: function (val) { | 160 | this.form.metadata = data |
| 152 | this.form.code = val.toUpperCase() | 161 | }, |
| 153 | } | 162 | // 新增菜单 |
| 163 | add () { | ||
| 164 | this.getParentMenuList(this.productId) | ||
| 165 | this.visible = true | ||
| 166 | this.type = 0 | ||
| 167 | this.form.jumpMode = 1 | ||
| 168 | }, | ||
| 169 | // 编辑菜单 | ||
| 170 | edit (record) { | ||
| 171 | this.type = 1 | ||
| 172 | // 若有id为编辑 | ||
| 173 | if (record.id) { | ||
| 174 | this.$nextTick(() => { | ||
| 175 | this.form = Object.assign({}, record) | ||
| 176 | this.getParentMenuList(this.productId) | ||
| 177 | }) | ||
| 154 | } | 178 | } |
| 179 | this.visible = true | ||
| 155 | }, | 180 | }, |
| 156 | created () { }, | 181 | // 选择上级菜单 |
| 157 | mounted () { }, | 182 | handleChange (value) { |
| 158 | methods: { | 183 | this.form.parentId = value |
| 159 | // 获取父级菜单 | 184 | }, |
| 160 | getParentMenuList (id) { | 185 | // 保存 |
| 161 | 186 | submitForm (submitType) { | |
| 162 | getParentMenuListAction(id).then((res) => { | 187 | this.$refs.form.validate((valid) => { |
| 163 | if (res.status === 1) { | 188 | if (valid) { |
| 164 | const list = this.$dealArrChildren(res.content) | 189 | let method = '' |
| 165 | if (id) { | 190 | let url = '' |
| 166 | this.parentMenuList = this.$dealArrDisabled( | 191 | const formData = this.form |
| 167 | this.$deepCopy(list), | 192 | formData.productId = this.productId |
| 168 | id | 193 | if (!formData.id) { |
| 169 | ) | 194 | method = 'post' |
| 170 | this.menuKey++ | 195 | url = this.dataUrl |
| 171 | } else { | ||
| 172 | this.parentMenuList = list | ||
| 173 | } | ||
| 174 | } else { | 196 | } else { |
| 175 | this.$message.error({ message: res.message, showClose: true }) | 197 | method = 'put' |
| 198 | url = `${this.dataUrl}/${formData.id}` | ||
| 176 | } | 199 | } |
| 177 | }) | 200 | httpAction(url, formData, method) |
| 178 | }, | 201 | .then((res) => { |
| 179 | getIconList () { | 202 | if (res.status === 1) { |
| 180 | this.$refs.iconList.show(true) | 203 | this.$message.success({ |
| 181 | }, | 204 | message: res.message, |
| 182 | getIconName (data) { | 205 | showClose: true |
| 183 | this.form.icon = data | 206 | }) |
| 184 | }, | ||
| 185 | // 配置参数 | ||
| 186 | getJsonString (data) { | ||
| 187 | this.form.metadata = data | ||
| 188 | }, | ||
| 189 | // 新增菜单 | ||
| 190 | add () { | ||
| 191 | this.getParentMenuList(this.productId) | ||
| 192 | this.visible = true | ||
| 193 | this.type = 0 | ||
| 194 | this.form.jumpMode = 1 | ||
| 195 | }, | ||
| 196 | // 编辑菜单 | ||
| 197 | edit (record) { | ||
| 198 | this.type = 1 | ||
| 199 | // 若有id为编辑 | ||
| 200 | if (record.id) { | ||
| 201 | this.$nextTick(() => { | ||
| 202 | this.form = Object.assign({}, record) | ||
| 203 | this.getParentMenuList(this.productId) | ||
| 204 | }) | ||
| 205 | } | ||
| 206 | this.visible = true | ||
| 207 | }, | ||
| 208 | // 选择上级菜单 | ||
| 209 | handleChange (value) { | ||
| 210 | this.form.parentId = value | ||
| 211 | }, | ||
| 212 | // 保存 | ||
| 213 | submitForm (submitType) { | ||
| 214 | this.$refs.form.validate((valid) => { | ||
| 215 | if (valid) { | ||
| 216 | let method = '' | ||
| 217 | let url = '' | ||
| 218 | const formData = this.form | ||
| 219 | formData.productId = this.productId | ||
| 220 | if (!formData.id) { | ||
| 221 | method = 'post' | ||
| 222 | url = this.dataUrl | ||
| 223 | } else { | ||
| 224 | method = 'put' | ||
| 225 | url = `${this.dataUrl}/${formData.id}` | ||
| 226 | } | ||
| 227 | httpAction(url, formData, method) | ||
| 228 | .then((res) => { | ||
| 229 | if (res.status === 1) { | ||
| 230 | this.$message.success({ | ||
| 231 | message: res.message, | ||
| 232 | showClose: true | ||
| 233 | }) | ||
| 234 | 207 | ||
| 235 | this.resetForm() | 208 | this.resetForm() |
| 236 | this.$emit('ok') | 209 | this.$emit('ok') |
| 237 | } else { | 210 | } else { |
| 238 | this.$message.error({ message: res.message, showClose: true }) | 211 | this.$message.error({ message: res.message, showClose: true }) |
| 239 | } | 212 | } |
| 240 | }) | 213 | }) |
| 241 | .catch((err) => { | 214 | .catch((err) => { |
| 242 | console.log(err) | 215 | console.log(err) |
| 243 | }) | 216 | }) |
| 244 | } | ||
| 245 | }) | ||
| 246 | }, | ||
| 247 | resetForm () { | ||
| 248 | this.$refs.form.resetFields() | ||
| 249 | this.form = { | ||
| 250 | icon: '', | ||
| 251 | code: '' | ||
| 252 | } | 217 | } |
| 253 | }, | 218 | }) |
| 254 | close () { | 219 | }, |
| 255 | this.resetForm() | 220 | resetForm () { |
| 256 | this.visible = false | 221 | this.$refs.form.resetFields() |
| 222 | this.form = { | ||
| 223 | icon: '', | ||
| 224 | code: '' | ||
| 257 | } | 225 | } |
| 226 | }, | ||
| 227 | close () { | ||
| 228 | this.resetForm() | ||
| 229 | this.visible = false | ||
| 258 | } | 230 | } |
| 259 | } | 231 | } |
| 232 | } | ||
| 260 | </script> | 233 | </script> |
| 261 | <style scoped lang="scss"> | 234 | <style scoped lang="scss"> |
| 262 | @import "~@/styles/public.scss"; | 235 | // @import "~@/styles/public.scss"; |
| 263 | </style> | 236 | </style> | ... | ... |
| ... | @@ -13,182 +13,175 @@ | ... | @@ -13,182 +13,175 @@ |
| 13 | </el-form> | 13 | </el-form> |
| 14 | </div> | 14 | </div> |
| 15 | <div class="from-clues-content"> | 15 | <div class="from-clues-content"> |
| 16 | <lb-table | 16 | <lb-table :pagination="false" :column="tableData.columns" :data="tablelistData" row-key="id" default-expand-all |
| 17 | :pagination="false" | ||
| 18 | :column="tableData.columns" | ||
| 19 | :data="tablelistData" | ||
| 20 | row-key="id" | ||
| 21 | default-expand-all | ||
| 22 | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> | 17 | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> |
| 23 | </lb-table> | 18 | </lb-table> |
| 24 | </div> | 19 | </div> |
| 25 | <edit-dialog ref="dialogForm" | 20 | <edit-dialog ref="dialogForm" :product-id="productId" :resource-category-id="resourceCategoryId" |
| 26 | :product-id="productId" | ||
| 27 | :resource-category-id="resourceCategoryId" | ||
| 28 | @ok="reloadTableData" /> | 21 | @ok="reloadTableData" /> |
| 29 | <!-- <authorizationdiglog ref="rolesForm" /> --> | 22 | <!-- <authorizationdiglog ref="rolesForm" /> --> |
| 30 | </div> | 23 | </div> |
| 31 | </template> | 24 | </template> |
| 32 | <script> | 25 | <script> |
| 33 | // 定时任务 | 26 | // 定时任务 |
| 34 | import data from "./data"; | 27 | import data from "./data"; |
| 35 | import { deleteAction, getAction, api } from "@/api/manageApi"; | 28 | import { deleteAction, getAction, api } from "@/api/manageApi"; |
| 36 | import EditDialog from "./edit-dialog.vue"; | 29 | import EditDialog from "./edit-dialog.vue"; |
| 37 | // import authorizationdiglog from "./authorizationdiglog.vue"; | 30 | // import authorizationdiglog from "./authorizationdiglog.vue"; |
| 38 | export default { | 31 | export default { |
| 39 | name: "menus", | 32 | name: "menus", |
| 40 | components: { | 33 | components: { |
| 41 | EditDialog, | 34 | EditDialog, |
| 42 | // authorizationdiglog, | 35 | // authorizationdiglog, |
| 43 | }, | 36 | }, |
| 44 | data () { | 37 | data () { |
| 45 | return { | 38 | return { |
| 46 | tablelistData: [], | 39 | tablelistData: [], |
| 47 | resourceCategoryId: "", | 40 | resourceCategoryId: "", |
| 48 | taskData: null, | 41 | taskData: null, |
| 49 | form: { | 42 | form: { |
| 50 | job_name: "", | 43 | job_name: "", |
| 51 | currentPage: 1, | 44 | currentPage: 1, |
| 52 | }, | 45 | }, |
| 53 | title: "", | 46 | title: "", |
| 54 | queryParam: {}, | 47 | queryParam: {}, |
| 55 | selectType: "0", | 48 | selectType: "0", |
| 56 | queryName: "", | 49 | queryName: "", |
| 57 | organizationId: "", // 组织机构ID | 50 | organizationId: "", // 组织机构ID |
| 58 | departmentId: "", // 部门ID | 51 | departmentId: "", // 部门ID |
| 59 | departmentList: [], // 部门列表 | 52 | departmentList: [], // 部门列表 |
| 60 | levelList: [], // 职务级别 | 53 | levelList: [], // 职务级别 |
| 61 | sexList: [], | 54 | sexList: [], |
| 62 | 55 | ||
| 63 | selectionList: [], | 56 | selectionList: [], |
| 64 | tableData: { | 57 | tableData: { |
| 65 | columns: [].concat(data.columns()).concat([ | 58 | columns: [].concat(data.columns()).concat([ |
| 66 | { | 59 | { |
| 67 | label: "操作", | 60 | label: "操作", |
| 68 | width: 380, | 61 | width: 380, |
| 69 | render: (h, scope) => { | 62 | render: (h, scope) => { |
| 70 | return ( | 63 | return ( |
| 71 | <div> | 64 | <div> |
| 72 | <el-button | 65 | <el-button |
| 73 | type="text" | 66 | type="text" |
| 74 | size="mini" | 67 | size="mini" |
| 75 | icon="el-icon-edit" | 68 | icon="el-icon-edit" |
| 76 | onClick={() => { | 69 | onClick={() => { |
| 77 | this.handleEdit(scope.row); | 70 | this.handleEdit(scope.row); |
| 78 | }} | 71 | }} |
| 79 | > | 72 | > |
| 80 | 修改 | 73 | 修改 |
| 81 | </el-button> | 74 | </el-button> |
| 82 | 75 | ||
| 83 | <el-button | 76 | <el-button |
| 84 | type="text" | 77 | type="text" |
| 85 | size="mini" | 78 | size="mini" |
| 86 | icon="el-icon-delete" | 79 | icon="el-icon-delete" |
| 87 | style="color:#F56C6C" | 80 | style="color:#F56C6C" |
| 88 | onClick={() => { | 81 | onClick={() => { |
| 89 | this.handleDelete(scope.row.id, scope.row.name); | 82 | this.handleDelete(scope.row.id, scope.row.name); |
| 90 | }} | 83 | }} |
| 91 | > | 84 | > |
| 92 | 删除 | 85 | 删除 |
| 93 | </el-button> | 86 | </el-button> |
| 94 | </div> | 87 | </div> |
| 95 | ); | 88 | ); |
| 96 | }, | ||
| 97 | }, | 89 | }, |
| 98 | ]), | 90 | }, |
| 99 | data: [], | 91 | ]), |
| 100 | }, | 92 | data: [], |
| 101 | pageData: { | 93 | }, |
| 102 | total: 5, | 94 | pageData: { |
| 103 | pageSize: 15, | 95 | total: 5, |
| 104 | current: 1, | 96 | pageSize: 15, |
| 97 | current: 1, | ||
| 98 | }, | ||
| 99 | tableUrl: api.menus, // 菜单接口地址 | ||
| 100 | meumurlid: api.subsystem,// 项目id接口地址 | ||
| 101 | productId: ""//项目id | ||
| 102 | }; | ||
| 103 | }, | ||
| 104 | created () { | ||
| 105 | this.getTableList(); | ||
| 106 | }, | ||
| 107 | methods: { | ||
| 108 | // 加载表格数据 | ||
| 109 | getTableList () { | ||
| 110 | |||
| 111 | const queryOptionsid = { | ||
| 112 | conditionGroup: { | ||
| 113 | queryRelation: "AND", | ||
| 114 | conditions: [ | ||
| 115 | { | ||
| 116 | property: "code", | ||
| 117 | value: "BDCJGPT", | ||
| 118 | operator: "EQ", | ||
| 119 | }, | ||
| 120 | ], | ||
| 105 | }, | 121 | }, |
| 106 | tableUrl: api.menus, // 菜单接口地址 | ||
| 107 | meumurlid: api.subsystem,// 项目id接口地址 | ||
| 108 | productId: ""//项目id | ||
| 109 | }; | 122 | }; |
| 123 | const params = { | ||
| 124 | queryOptions: queryOptionsid, | ||
| 125 | }; | ||
| 126 | // 获取系统id | ||
| 127 | getAction(this.meumurlid, params) | ||
| 128 | .then((res) => { | ||
| 129 | this.productId = res.content[0].id; | ||
| 130 | let queryOptions = { | ||
| 131 | conditionGroup: { | ||
| 132 | conditions: [ | ||
| 133 | { | ||
| 134 | property: "productId", | ||
| 135 | value: this.productId, | ||
| 136 | operator: "EQ", | ||
| 137 | }, | ||
| 138 | ], | ||
| 139 | queryRelation: "AND", | ||
| 140 | }, | ||
| 141 | orderBys: [{ property: "sort", direction: "desc" }], | ||
| 142 | }; | ||
| 143 | if (!this.tableUrl) { | ||
| 144 | console.log("请设置tableUrl属性为接口地址!"); | ||
| 145 | return; | ||
| 146 | } | ||
| 147 | if (this.queryOptions !== "") { | ||
| 148 | this.queryParam.queryOptions = JSON.stringify(queryOptions); | ||
| 149 | } | ||
| 150 | // 查询系统菜单 | ||
| 151 | getAction(this.tableUrl, this.queryParam) | ||
| 152 | .then((res) => { | ||
| 153 | if (res.status === 1) { | ||
| 154 | this.loading = false; | ||
| 155 | this.tablelistData = res.content; | ||
| 156 | } else { | ||
| 157 | this.$message.error({ message: res.message, showClose: true }); | ||
| 158 | this.loading = false; | ||
| 159 | } | ||
| 160 | }) | ||
| 161 | .catch((error) => { | ||
| 162 | console.log("er", error); | ||
| 163 | this.loading = false; | ||
| 164 | }); | ||
| 165 | }) | ||
| 166 | .catch((error) => { | ||
| 167 | console.log("er", error); | ||
| 168 | }); | ||
| 110 | }, | 169 | }, |
| 111 | created () { | 170 | // 新增菜单 |
| 112 | this.getTableList(); | 171 | handleAdd () { |
| 172 | this.$refs.dialogForm.add(); | ||
| 173 | this.$refs.dialogForm.title = "添加"; | ||
| 113 | }, | 174 | }, |
| 114 | methods: { | ||
| 115 | // 加载表格数据 | ||
| 116 | getTableList () { | ||
| 117 | 175 | ||
| 118 | const queryOptionsid = { | 176 | // 修改 |
| 119 | conditionGroup: { | 177 | handleEdit (record) { |
| 120 | queryRelation: "AND", | 178 | this.$refs.dialogForm.edit(record); |
| 121 | conditions: [ | 179 | this.$refs.dialogForm.title = "修改"; |
| 122 | { | 180 | }, |
| 123 | property: "code", | 181 | // 删除 |
| 124 | value: "BDCJGPT", | 182 | handleDelete (id, content) { |
| 125 | operator: "EQ", | 183 | this.$confirm( |
| 126 | }, | 184 | `<div class="customer-message-wrapper"> |
| 127 | ], | ||
| 128 | }, | ||
| 129 | }; | ||
| 130 | const params = { | ||
| 131 | queryOptions: queryOptionsid, | ||
| 132 | }; | ||
| 133 | // 获取系统id | ||
| 134 | getAction(this.meumurlid, params) | ||
| 135 | .then((res) => { | ||
| 136 | this.productId = res.content[0].id; | ||
| 137 | let queryOptions = { | ||
| 138 | conditionGroup: { | ||
| 139 | conditions: [ | ||
| 140 | { | ||
| 141 | property: "productId", | ||
| 142 | value: this.productId, | ||
| 143 | operator: "EQ", | ||
| 144 | }, | ||
| 145 | ], | ||
| 146 | queryRelation: "AND", | ||
| 147 | }, | ||
| 148 | orderBys: [{ property: "sort", direction: "desc" }], | ||
| 149 | }; | ||
| 150 | if (!this.tableUrl) { | ||
| 151 | console.log("请设置tableUrl属性为接口地址!"); | ||
| 152 | return; | ||
| 153 | } | ||
| 154 | if (this.queryOptions !== "") { | ||
| 155 | this.queryParam.queryOptions = JSON.stringify(queryOptions); | ||
| 156 | } | ||
| 157 | // 查询系统菜单 | ||
| 158 | getAction(this.tableUrl, this.queryParam) | ||
| 159 | .then((res) => { | ||
| 160 | if (res.status === 1) { | ||
| 161 | this.loading = false; | ||
| 162 | this.tablelistData = res.content; | ||
| 163 | } else { | ||
| 164 | this.$message.error({ message: res.message, showClose: true }); | ||
| 165 | this.loading = false; | ||
| 166 | } | ||
| 167 | }) | ||
| 168 | .catch((error) => { | ||
| 169 | console.log("er", error); | ||
| 170 | this.loading = false; | ||
| 171 | }); | ||
| 172 | }) | ||
| 173 | .catch((error) => { | ||
| 174 | console.log("er", error); | ||
| 175 | }); | ||
| 176 | }, | ||
| 177 | // 新增菜单 | ||
| 178 | handleAdd () { | ||
| 179 | this.$refs.dialogForm.add(); | ||
| 180 | this.$refs.dialogForm.title = "添加"; | ||
| 181 | }, | ||
| 182 | |||
| 183 | // 修改 | ||
| 184 | handleEdit (record) { | ||
| 185 | this.$refs.dialogForm.edit(record); | ||
| 186 | this.$refs.dialogForm.title = "修改"; | ||
| 187 | }, | ||
| 188 | // 删除 | ||
| 189 | handleDelete (id, content) { | ||
| 190 | this.$confirm( | ||
| 191 | `<div class="customer-message-wrapper"> | ||
| 192 | <h5 class="title">您确认要执行该操作用于以下信息:</h5> | 185 | <h5 class="title">您确认要执行该操作用于以下信息:</h5> |
| 193 | <p class="content" aria-controls="${content}">${content} | 186 | <p class="content" aria-controls="${content}">${content} |
| 194 | </p> | 187 | </p> |
| ... | @@ -196,49 +189,51 @@ | ... | @@ -196,49 +189,51 @@ |
| 196 | <span >无法恢复</span> | 189 | <span >无法恢复</span> |
| 197 | </p> | 190 | </p> |
| 198 | </div>`, | 191 | </div>`, |
| 199 | '执行确认', | 192 | '执行确认', |
| 200 | { | 193 | { |
| 201 | dangerouslyUseHTMLString: true, | 194 | dangerouslyUseHTMLString: true, |
| 202 | customClass: 'customer-delete', | 195 | customClass: 'customer-delete', |
| 203 | confirmButtonText: '确定', | 196 | confirmButtonText: '确定', |
| 204 | cancelButtonText: '取消', | 197 | cancelButtonText: '取消', |
| 205 | type: 'warning' | 198 | type: 'warning' |
| 199 | } | ||
| 200 | ) | ||
| 201 | .then(() => { | ||
| 202 | if (!this.tableUrl) { | ||
| 203 | this.$message.error({ | ||
| 204 | message: '请设置tableUrl属性为接口地址!', | ||
| 205 | showClose: true | ||
| 206 | }) | ||
| 207 | return | ||
| 206 | } | 208 | } |
| 207 | ) | 209 | const url = this.tableUrl + '/' + id |
| 208 | .then(() => { | 210 | deleteAction(url).then(res => { |
| 209 | if (!this.tableUrl) { | 211 | if (res.status === 1) { |
| 210 | this.$message.error({ | 212 | this.$message.success({ message: res.message, showClose: true }) |
| 211 | message: '请设置tableUrl属性为接口地址!', | 213 | this.reloadTableData() |
| 212 | showClose: true | 214 | } else { |
| 213 | }) | 215 | this.$message.error({ message: res.message, showClose: true }) |
| 214 | return | ||
| 215 | } | 216 | } |
| 216 | const url = this.tableUrl + '/' + id | ||
| 217 | deleteAction(url).then(res => { | ||
| 218 | if (res.status === 1) { | ||
| 219 | this.$message.success({ message: res.message, showClose: true }) | ||
| 220 | this.reloadTableData() | ||
| 221 | } else { | ||
| 222 | this.$message.error({ message: res.message, showClose: true }) | ||
| 223 | } | ||
| 224 | }) | ||
| 225 | }) | 217 | }) |
| 226 | .catch(() => { }) | 218 | }) |
| 227 | }, | 219 | .catch(() => { }) |
| 228 | // 新增、编辑回显 | 220 | }, |
| 229 | reloadTableData () { | 221 | // 新增、编辑回显 |
| 230 | this.getTableList() | 222 | reloadTableData () { |
| 231 | }, | 223 | this.getTableList() |
| 232 | }, | 224 | }, |
| 233 | }; | 225 | }, |
| 226 | }; | ||
| 234 | </script> | 227 | </script> |
| 235 | <style scoped lang="scss"> | 228 | <style scoped lang="scss"> |
| 236 | @import "~@/styles/mixin.scss"; | 229 | @import "~@/styles/mixin.scss"; |
| 237 | @import "~@/styles/public.scss"; | 230 | |
| 238 | .btnColRight { | 231 | // @import "~@/styles/public.scss"; |
| 239 | margin-top: 20px; | 232 | .btnColRight { |
| 240 | } | 233 | margin-top: 20px; |
| 241 | /deep/.el-table__expand-icon { | 234 | } |
| 242 | color: #fff; | 235 | |
| 243 | } | 236 | /deep/.el-table__expand-icon { |
| 237 | color: #fff; | ||
| 238 | } | ||
| 244 | </style> | 239 | </style> | ... | ... |
| ... | @@ -13,14 +13,8 @@ | ... | @@ -13,14 +13,8 @@ |
| 13 | </el-form> | 13 | </el-form> |
| 14 | </div> | 14 | </div> |
| 15 | <div class="from-clues-content"> | 15 | <div class="from-clues-content"> |
| 16 | <lb-table | 16 | <lb-table :pagination="false" @size-change="handleSizeChange" @p-current-change="handleCurrentChange" |
| 17 | :pagination="false" | 17 | :column="tableData.columns" :data="listdata" :expand-row-keys="keyList" row-key="dictid"> |
| 18 | @size-change="handleSizeChange" | ||
| 19 | @p-current-change="handleCurrentChange" | ||
| 20 | :column="tableData.columns" | ||
| 21 | :data="listdata" | ||
| 22 | :expand-row-keys="keyList" | ||
| 23 | row-key="dictid"> | ||
| 24 | </lb-table> | 18 | </lb-table> |
| 25 | </div> | 19 | </div> |
| 26 | <EditDialog ref="addEditDialog" @ok="reloadTableData" /> | 20 | <EditDialog ref="addEditDialog" @ok="reloadTableData" /> |
| ... | @@ -28,387 +22,387 @@ | ... | @@ -28,387 +22,387 @@ |
| 28 | </div> | 22 | </div> |
| 29 | </template> | 23 | </template> |
| 30 | <script> | 24 | <script> |
| 31 | import { | 25 | import { |
| 32 | getUuid, | 26 | getUuid, |
| 33 | judgeSort, | 27 | judgeSort, |
| 34 | realMove, | 28 | realMove, |
| 35 | findParents, | 29 | findParents, |
| 36 | removeTreeListItem, | 30 | removeTreeListItem, |
| 37 | } from "@/utils/operation"; | 31 | } from "@/utils/operation"; |
| 38 | import { getRolesById, getAuthorityListAction } from "@/api/authorityManage"; | 32 | import { getRolesById, getAuthorityListAction } from "@/api/authorityManage"; |
| 39 | import { getUserRoles } from "@/api/personnelManage"; | 33 | import { getUserRoles } from "@/api/personnelManage"; |
| 40 | import data from "./data"; | 34 | import data from "./data"; |
| 41 | import { api, getAction, deleteAction } from "@/api/manageApi"; | 35 | import { api, getAction, deleteAction } from "@/api/manageApi"; |
| 42 | import tableMixin from "@/mixins/tableMixin.js"; | 36 | import tableMixin from "@/mixins/tableMixin.js"; |
| 43 | import EditDialog from "./edit-dialog.vue"; | 37 | import EditDialog from "./edit-dialog.vue"; |
| 44 | import Roleslistdiglog from "./roleslistdiglog.vue"; | 38 | import Roleslistdiglog from "./roleslistdiglog.vue"; |
| 45 | export default { | 39 | export default { |
| 46 | name: "menus", | 40 | name: "menus", |
| 47 | mixins: [tableMixin], | 41 | mixins: [tableMixin], |
| 48 | components: { | 42 | components: { |
| 49 | EditDialog, | 43 | EditDialog, |
| 50 | Roleslistdiglog, | 44 | Roleslistdiglog, |
| 51 | }, | 45 | }, |
| 52 | data () { | 46 | data () { |
| 53 | return { | 47 | return { |
| 54 | personlist: null, | 48 | personlist: null, |
| 55 | waitMemberList: [], | 49 | waitMemberList: [], |
| 56 | keyList: [], | 50 | keyList: [], |
| 57 | listdata: [], | 51 | listdata: [], |
| 58 | tableUrl: api.roles, | 52 | tableUrl: api.roles, |
| 59 | form: { | 53 | form: { |
| 60 | job_name: "", | 54 | job_name: "", |
| 61 | currentPage: 1, | 55 | currentPage: 1, |
| 56 | }, | ||
| 57 | // 当前所选角色id | ||
| 58 | roleId: "", | ||
| 59 | title: "", | ||
| 60 | queryParam: {}, | ||
| 61 | multipleSelection: [], | ||
| 62 | // 菜单列表 | ||
| 63 | menutablelistData: [], | ||
| 64 | tableUrl: api.menus, // 菜单接口地址 | ||
| 65 | meumurlid: api.subsystem, // 项目id接口地址 | ||
| 66 | selectType: "0", | ||
| 67 | queryName: "", | ||
| 68 | organizationId: "", // 组织机构ID | ||
| 69 | departmentId: "", // 部门ID | ||
| 70 | departmentList: [], // 部门列表 | ||
| 71 | levelList: [], // 职务级别 | ||
| 72 | sexList: [], | ||
| 73 | operationCodes: null, // 操作符对象 | ||
| 74 | operationList: [], // 获取授权列表需要提交的操作符数组 | ||
| 75 | typeOptions: [ | ||
| 76 | { | ||
| 77 | value: "0", | ||
| 78 | label: "姓名", | ||
| 62 | }, | 79 | }, |
| 63 | // 当前所选角色id | 80 | { |
| 64 | roleId: "", | 81 | value: "1", |
| 65 | title: "", | 82 | label: "工号", |
| 66 | queryParam: {}, | 83 | }, |
| 67 | multipleSelection: [], | 84 | { |
| 68 | // 菜单列表 | 85 | value: "2", |
| 69 | menutablelistData: [], | 86 | label: "部门", |
| 70 | tableUrl: api.menus, // 菜单接口地址 | 87 | }, |
| 71 | meumurlid: api.subsystem, // 项目id接口地址 | 88 | { |
| 72 | selectType: "0", | 89 | value: "3", |
| 73 | queryName: "", | 90 | label: "机构", |
| 74 | organizationId: "", // 组织机构ID | 91 | }, |
| 75 | departmentId: "", // 部门ID | 92 | ], |
| 76 | departmentList: [], // 部门列表 | 93 | |
| 77 | levelList: [], // 职务级别 | 94 | selectionList: [], |
| 78 | sexList: [], | 95 | tableData: { |
| 79 | operationCodes: null, // 操作符对象 | 96 | columns: [ |
| 80 | operationList: [], // 获取授权列表需要提交的操作符数组 | ||
| 81 | typeOptions: [ | ||
| 82 | { | ||
| 83 | value: "0", | ||
| 84 | label: "姓名", | ||
| 85 | }, | ||
| 86 | { | ||
| 87 | value: "1", | ||
| 88 | label: "工号", | ||
| 89 | }, | ||
| 90 | { | ||
| 91 | value: "2", | ||
| 92 | label: "部门", | ||
| 93 | }, | ||
| 94 | { | 97 | { |
| 95 | value: "3", | 98 | label: "序号", |
| 96 | label: "机构", | 99 | type: "index", |
| 100 | width: "50", | ||
| 101 | index: this.indexMethod, | ||
| 97 | }, | 102 | }, |
| 98 | ], | 103 | ] |
| 99 | 104 | .concat(data.columns()) | |
| 100 | selectionList: [], | 105 | .concat([ |
| 101 | tableData: { | ||
| 102 | columns: [ | ||
| 103 | { | 106 | { |
| 104 | label: "序号", | 107 | label: "排序", |
| 105 | type: "index", | 108 | width: 380, |
| 106 | width: "50", | 109 | render: (h, scope) => { |
| 107 | index: this.indexMethod, | 110 | return ( |
| 108 | }, | 111 | <div> |
| 109 | ] | 112 | <el-button |
| 110 | .concat(data.columns()) | 113 | type="text" |
| 111 | .concat([ | 114 | disabled={scope.row.isTop} |
| 112 | { | 115 | onClick={() => { |
| 113 | label: "排序", | 116 | this.moveUpward(scope.$index, scope.row); |
| 114 | width: 380, | 117 | }} |
| 115 | render: (h, scope) => { | 118 | > |
| 116 | return ( | 119 | 上移 |
| 117 | <div> | 120 | </el-button> |
| 118 | <el-button | 121 | <el-button |
| 119 | type="text" | 122 | type="text" |
| 120 | disabled={scope.row.isTop} | 123 | disabled={scope.row.isBottom} |
| 121 | onClick={() => { | 124 | onClick={() => { |
| 122 | this.moveUpward(scope.$index, scope.row); | 125 | this.moveDown(scope.$index, scope.row); |
| 123 | }} | 126 | }} |
| 124 | > | 127 | > |
| 125 | 上移 | 128 | 下移 |
| 126 | </el-button> | 129 | </el-button> |
| 127 | <el-button | 130 | </div> |
| 128 | type="text" | 131 | ); |
| 129 | disabled={scope.row.isBottom} | ||
| 130 | onClick={() => { | ||
| 131 | this.moveDown(scope.$index, scope.row); | ||
| 132 | }} | ||
| 133 | > | ||
| 134 | 下移 | ||
| 135 | </el-button> | ||
| 136 | </div> | ||
| 137 | ); | ||
| 138 | }, | ||
| 139 | }, | 132 | }, |
| 140 | ]) | 133 | }, |
| 141 | .concat([ | 134 | ]) |
| 142 | { | 135 | .concat([ |
| 143 | label: "操作", | 136 | { |
| 144 | width: 380, | 137 | label: "操作", |
| 145 | render: (h, scope) => { | 138 | width: 380, |
| 146 | return ( | 139 | render: (h, scope) => { |
| 147 | <div> | 140 | return ( |
| 148 | <el-tooltip | 141 | <div> |
| 149 | class="item" | 142 | <el-tooltip |
| 150 | effect="dark" | 143 | class="item" |
| 151 | disabled={scope.row.type !== "Everyone"} | 144 | effect="dark" |
| 152 | content="没有点击的权限" | 145 | disabled={scope.row.type !== "Everyone"} |
| 153 | placement="top" | 146 | content="没有点击的权限" |
| 154 | > | 147 | placement="top" |
| 155 | <span> | 148 | > |
| 156 | <el-button | 149 | <span> |
| 157 | disabled={scope.row.type === "Everyone"} | 150 | <el-button |
| 158 | type="text" | 151 | disabled={scope.row.type === "Everyone"} |
| 159 | size="mini" | 152 | type="text" |
| 160 | icon="el-icon-video-pause" | 153 | size="mini" |
| 161 | onClick={() => { | 154 | icon="el-icon-video-pause" |
| 162 | this.getUserList(scope.row); | 155 | onClick={() => { |
| 163 | }} | 156 | this.getUserList(scope.row); |
| 164 | > | 157 | }} |
| 165 | 配置 | 158 | > |
| 166 | </el-button> | 159 | 配置 |
| 167 | </span> | 160 | </el-button> |
| 168 | </el-tooltip> | 161 | </span> |
| 169 | <el-tooltip | 162 | </el-tooltip> |
| 170 | class="item" | 163 | <el-tooltip |
| 171 | effect="dark" | 164 | class="item" |
| 172 | disabled={scope.row.category !== 1} | 165 | effect="dark" |
| 173 | content="系统内置角色 不允许修改" | 166 | disabled={scope.row.category !== 1} |
| 174 | placement="top" | 167 | content="系统内置角色 不允许修改" |
| 175 | > | 168 | placement="top" |
| 176 | <span> | 169 | > |
| 177 | <el-button | 170 | <span> |
| 178 | disabled={scope.row.category === 1} | 171 | <el-button |
| 179 | type="text" | 172 | disabled={scope.row.category === 1} |
| 180 | size="mini" | 173 | type="text" |
| 181 | icon="el-icon-edit" | 174 | size="mini" |
| 182 | onClick={() => { | 175 | icon="el-icon-edit" |
| 183 | this.handleAddEdit(scope.row); | 176 | onClick={() => { |
| 184 | }} | 177 | this.handleAddEdit(scope.row); |
| 185 | > | 178 | }} |
| 186 | 修改 | 179 | > |
| 187 | </el-button> | 180 | 修改 |
| 188 | </span> | 181 | </el-button> |
| 189 | </el-tooltip> | 182 | </span> |
| 190 | <el-tooltip | 183 | </el-tooltip> |
| 191 | class="item" | 184 | <el-tooltip |
| 192 | effect="dark" | 185 | class="item" |
| 193 | disabled={scope.row.category !== 1} | 186 | effect="dark" |
| 194 | content="系统内置角色 不允许删除" | 187 | disabled={scope.row.category !== 1} |
| 195 | placement="top" | 188 | content="系统内置角色 不允许删除" |
| 196 | > | 189 | placement="top" |
| 197 | <span> | 190 | > |
| 198 | <el-button | 191 | <span> |
| 199 | type="text" | 192 | <el-button |
| 200 | disabled={scope.row.category === 1} | 193 | type="text" |
| 201 | size="mini" | 194 | disabled={scope.row.category === 1} |
| 202 | icon="el-icon-delete" | 195 | size="mini" |
| 203 | // style="color:#F56C6C" | 196 | icon="el-icon-delete" |
| 204 | onClick={() => { | 197 | // style="color:#F56C6C" |
| 205 | this.handleDelete(scope.row.id, scope.row.name); | 198 | onClick={() => { |
| 206 | }} | 199 | this.handleDelete(scope.row.id, scope.row.name); |
| 207 | > | 200 | }} |
| 208 | 删除 | 201 | > |
| 209 | </el-button> | 202 | 删除 |
| 210 | </span> | 203 | </el-button> |
| 211 | </el-tooltip> | 204 | </span> |
| 212 | </div> | 205 | </el-tooltip> |
| 213 | ); | 206 | </div> |
| 214 | }, | 207 | ); |
| 215 | }, | 208 | }, |
| 216 | ]), | 209 | }, |
| 217 | data: [], | 210 | ]), |
| 218 | }, | 211 | data: [], |
| 219 | }; | 212 | }, |
| 220 | }, | 213 | }; |
| 221 | created () { | 214 | }, |
| 222 | this.getTableData(); | 215 | created () { |
| 223 | this.getTableList() | 216 | this.getTableData(); |
| 224 | }, | 217 | this.getTableList() |
| 225 | mounted () { }, | 218 | }, |
| 226 | methods: { | 219 | mounted () { }, |
| 227 | // 获取角色列表 | 220 | methods: { |
| 228 | getTableData () { | 221 | // 获取角色列表 |
| 229 | let Builtinrole = []; | 222 | getTableData () { |
| 230 | let Publicrole = []; | 223 | let Builtinrole = []; |
| 224 | let Publicrole = []; | ||
| 231 | 225 | ||
| 232 | getRolesById(1) | 226 | getRolesById(1) |
| 233 | .then((res) => { | 227 | .then((res) => { |
| 234 | Builtinrole = res.content; | 228 | Builtinrole = res.content; |
| 235 | getRolesById(2) | 229 | getRolesById(2) |
| 236 | .then((res) => { | 230 | .then((res) => { |
| 237 | console.log("角色列表", res); | 231 | console.log("角色列表", res); |
| 238 | Publicrole = res.content; | 232 | Publicrole = res.content; |
| 239 | 233 | ||
| 240 | this.listdata = Builtinrole.concat(Publicrole); | 234 | this.listdata = Builtinrole.concat(Publicrole); |
| 241 | 235 | ||
| 242 | this.listdata = judgeSort(this.listdata); | 236 | this.listdata = judgeSort(this.listdata); |
| 243 | }) | 237 | }) |
| 244 | .catch((e) => console.error(e)); | 238 | .catch((e) => console.error(e)); |
| 245 | }) | 239 | }) |
| 246 | .catch((e) => console.error(e)); | 240 | .catch((e) => console.error(e)); |
| 247 | }, | 241 | }, |
| 248 | 242 | ||
| 249 | // 获取菜单列表 | 243 | // 获取菜单列表 |
| 250 | getTableList () { | 244 | getTableList () { |
| 251 | const queryOptionsid = { | 245 | const queryOptionsid = { |
| 252 | conditionGroup: { | 246 | conditionGroup: { |
| 253 | queryRelation: "AND", | 247 | queryRelation: "AND", |
| 254 | conditions: [ | 248 | conditions: [ |
| 255 | { | 249 | { |
| 256 | property: "code", | 250 | property: "code", |
| 257 | value: "BDCJGPT", | 251 | value: "BDCJGPT", |
| 258 | operator: "EQ", | 252 | operator: "EQ", |
| 259 | }, | 253 | }, |
| 260 | ], | 254 | ], |
| 261 | }, | 255 | }, |
| 262 | }; | 256 | }; |
| 263 | const params = { | 257 | const params = { |
| 264 | queryOptions: queryOptionsid, | 258 | queryOptions: queryOptionsid, |
| 265 | }; | 259 | }; |
| 266 | // 获取系统id | 260 | // 获取系统id |
| 267 | getAction(this.meumurlid, params) | 261 | getAction(this.meumurlid, params) |
| 268 | .then((res) => { | 262 | .then((res) => { |
| 269 | this.productId = res.content[0].id; | 263 | this.productId = res.content[0].id; |
| 270 | this.getAuthorityList(res.content[0].id, res.content[0].code) | 264 | this.getAuthorityList(res.content[0].id, res.content[0].code) |
| 271 | this.selectedSubsystemCode = res.content[0].code | 265 | this.selectedSubsystemCode = res.content[0].code |
| 272 | let queryOptions = { | 266 | let queryOptions = { |
| 273 | conditionGroup: { | 267 | conditionGroup: { |
| 274 | conditions: [ | 268 | conditions: [ |
| 275 | { | 269 | { |
| 276 | property: "productId", | 270 | property: "productId", |
| 277 | value: this.productId, | 271 | value: this.productId, |
| 278 | operator: "EQ", | 272 | operator: "EQ", |
| 279 | }, | 273 | }, |
| 280 | ], | 274 | ], |
| 281 | queryRelation: "AND", | 275 | queryRelation: "AND", |
| 282 | }, | 276 | }, |
| 283 | orderBys: [{ property: "sort", direction: "desc" }], | 277 | orderBys: [{ property: "sort", direction: "desc" }], |
| 284 | }; | 278 | }; |
| 285 | if (!this.tableUrl) { | 279 | if (!this.tableUrl) { |
| 286 | console.log("请设置tableUrl属性为接口地址!"); | 280 | console.log("请设置tableUrl属性为接口地址!"); |
| 287 | return; | 281 | return; |
| 288 | } | ||
| 289 | if (this.queryOptions !== "") { | ||
| 290 | this.queryParam.queryOptions = JSON.stringify(queryOptions); | ||
| 291 | } | ||
| 292 | // 查询系统菜单 | ||
| 293 | getAction(this.tableUrl, this.queryParam) | ||
| 294 | .then((res) => { | ||
| 295 | if (res.status === 1) { | ||
| 296 | this.loading = false; | ||
| 297 | this.menutablelistData = res.content; | ||
| 298 | } else { | ||
| 299 | this.$message.error({ message: res.message, showClose: true }); | ||
| 300 | this.loading = false; | ||
| 301 | } | ||
| 302 | }) | ||
| 303 | .catch((error) => { | ||
| 304 | console.log("er", error); | ||
| 305 | this.loading = false; | ||
| 306 | }); | ||
| 307 | }) | ||
| 308 | .catch((error) => { | ||
| 309 | console.log("er", error); | ||
| 310 | }); | ||
| 311 | }, | ||
| 312 | // 获取权限列表 | ||
| 313 | getAuthorityList (productId, code) { | ||
| 314 | getAuthorityListAction(productId, code).then( | ||
| 315 | res => { | ||
| 316 | if (res.status === 1) { | ||
| 317 | if (res.content.length !== 0) { | ||
| 318 | this.operationCodes = res.content[0].operations | ||
| 319 | this.operationList = [] | ||
| 320 | for (var k in this.operationCodes) { | ||
| 321 | this.operationList.push(k) | ||
| 322 | } | ||
| 323 | } | ||
| 324 | } else { | ||
| 325 | this.$message.error({ message: res.message, showClose: true }) | ||
| 326 | } | ||
| 327 | } | 282 | } |
| 328 | ) | 283 | if (this.queryOptions !== "") { |
| 329 | }, | 284 | this.queryParam.queryOptions = JSON.stringify(queryOptions); |
| 330 | 285 | } | |
| 331 | // 配置 | 286 | // 查询系统菜单 |
| 332 | getUserList (row) { | 287 | getAction(this.tableUrl, this.queryParam) |
| 333 | this.getTableList() | 288 | .then((res) => { |
| 334 | const params = {}; | ||
| 335 | const queryOptions = { | ||
| 336 | conditionGroup: { | ||
| 337 | conditions: [ | ||
| 338 | { | ||
| 339 | property: "organizationId", | ||
| 340 | value: row.organizationId, | ||
| 341 | operator: "EQ", | ||
| 342 | }, | ||
| 343 | { | ||
| 344 | property: "departmentId", | ||
| 345 | value: row.departmentId, | ||
| 346 | operator: "EQ", | ||
| 347 | }, | ||
| 348 | ], | ||
| 349 | queryRelation: "AND", | ||
| 350 | }, | ||
| 351 | orderBys: [{ property: "sort", direction: "desc" }], | ||
| 352 | }; | ||
| 353 | params.queryOptions = JSON.stringify(queryOptions); | ||
| 354 | |||
| 355 | getUserRoles(row.id).then((res) => { | ||
| 356 | if (res.status === 1) { | ||
| 357 | this.personlist = res.content; | ||
| 358 | getAction(api.users, params).then((res) => { | ||
| 359 | if (res.status === 1) { | 289 | if (res.status === 1) { |
| 360 | this.waitMemberList = res.content; | 290 | this.loading = false; |
| 361 | if (this.personlist) { | 291 | this.menutablelistData = res.content; |
| 362 | this.waitMemberList.forEach((item, i) => { | ||
| 363 | this.personlist.forEach((val) => { | ||
| 364 | if (item.id === val.id) { | ||
| 365 | this.waitMemberList[i].selectStatus = 0; | ||
| 366 | } | ||
| 367 | }); | ||
| 368 | }); | ||
| 369 | } | ||
| 370 | |||
| 371 | this.$refs.rolesForm.personlist(this.waitMemberList, row.id); | ||
| 372 | this.$refs.rolesForm.menulist(this.operationList, row.id, this.selectedSubsystemCode, this.menutablelistData, this.operationCodes); | ||
| 373 | } else { | 292 | } else { |
| 374 | this.$message.error({ message: res.message, showClose: true }); | 293 | this.$message.error({ message: res.message, showClose: true }); |
| 294 | this.loading = false; | ||
| 375 | } | 295 | } |
| 296 | }) | ||
| 297 | .catch((error) => { | ||
| 298 | console.log("er", error); | ||
| 299 | this.loading = false; | ||
| 376 | }); | 300 | }); |
| 377 | this.$refs.rolesForm.title = "人员配置"; | 301 | }) |
| 378 | } else this.$message.error({ message: res.message, showClose: true }); | 302 | .catch((error) => { |
| 303 | console.log("er", error); | ||
| 379 | }); | 304 | }); |
| 380 | }, | 305 | }, |
| 381 | // 新增、修改角色 | 306 | // 获取权限列表 |
| 382 | handleAddEdit (value) { | 307 | getAuthorityList (productId, code) { |
| 383 | this.$refs.addEditDialog.menuType = this.menuType; | 308 | getAuthorityListAction(productId, code).then( |
| 384 | this.$refs.addEditDialog.roleId = value.id; | 309 | res => { |
| 385 | this.roleSort = value.sort ? value.sort : 0; | 310 | if (res.status === 1) { |
| 386 | if (value.id) { | 311 | if (res.content.length !== 0) { |
| 387 | this.$refs.addEditDialog.dialogForm.roleName = value.name; | 312 | this.operationCodes = res.content[0].operations |
| 388 | this.$refs.addEditDialog.dialogForm.roleType = value.type; | 313 | this.operationList = [] |
| 389 | this.$refs.addEditDialog.dialogForm.roleTextArea = value.description; | 314 | for (var k in this.operationCodes) { |
| 315 | this.operationList.push(k) | ||
| 316 | } | ||
| 317 | } | ||
| 318 | } else { | ||
| 319 | this.$message.error({ message: res.message, showClose: true }) | ||
| 320 | } | ||
| 390 | } | 321 | } |
| 391 | this.$refs.addEditDialog.showAddEditDialog = true; | 322 | ) |
| 392 | this.$refs.addEditDialog.dialogTitle = value.id ? "修改" : "新增"; | 323 | }, |
| 393 | }, | 324 | |
| 394 | // 上移下移 | 325 | // 配置 |
| 395 | moveUpward (index, row) { | 326 | getUserList (row) { |
| 396 | realMove(row.dictid, "UP", this.listdata); | 327 | this.getTableList() |
| 397 | this.key++; | 328 | const params = {}; |
| 398 | let id = findParents(this.listdata, row.dictid); | 329 | const queryOptions = { |
| 399 | this.keyList = id; | 330 | conditionGroup: { |
| 400 | }, | 331 | conditions: [ |
| 401 | moveDown (index, row) { | 332 | { |
| 402 | realMove(row.dictid, "DOWN", this.listdata); | 333 | property: "organizationId", |
| 403 | this.key++; | 334 | value: row.organizationId, |
| 404 | let id = findParents(this.listdata, row.dictid); | 335 | operator: "EQ", |
| 405 | this.keyList = id; | 336 | }, |
| 406 | }, | 337 | { |
| 338 | property: "departmentId", | ||
| 339 | value: row.departmentId, | ||
| 340 | operator: "EQ", | ||
| 341 | }, | ||
| 342 | ], | ||
| 343 | queryRelation: "AND", | ||
| 344 | }, | ||
| 345 | orderBys: [{ property: "sort", direction: "desc" }], | ||
| 346 | }; | ||
| 347 | params.queryOptions = JSON.stringify(queryOptions); | ||
| 348 | |||
| 349 | getUserRoles(row.id).then((res) => { | ||
| 350 | if (res.status === 1) { | ||
| 351 | this.personlist = res.content; | ||
| 352 | getAction(api.users, params).then((res) => { | ||
| 353 | if (res.status === 1) { | ||
| 354 | this.waitMemberList = res.content; | ||
| 355 | if (this.personlist) { | ||
| 356 | this.waitMemberList.forEach((item, i) => { | ||
| 357 | this.personlist.forEach((val) => { | ||
| 358 | if (item.id === val.id) { | ||
| 359 | this.waitMemberList[i].selectStatus = 0; | ||
| 360 | } | ||
| 361 | }); | ||
| 362 | }); | ||
| 363 | } | ||
| 407 | 364 | ||
| 408 | // 删除 | 365 | this.$refs.rolesForm.personlist(this.waitMemberList, row.id); |
| 409 | handleDelete: function (id, content = "") { | 366 | this.$refs.rolesForm.menulist(this.operationList, row.id, this.selectedSubsystemCode, this.menutablelistData, this.operationCodes); |
| 410 | this.$confirm( | 367 | } else { |
| 411 | `<div class="customer-message-wrapper"> | 368 | this.$message.error({ message: res.message, showClose: true }); |
| 369 | } | ||
| 370 | }); | ||
| 371 | this.$refs.rolesForm.title = "人员配置"; | ||
| 372 | } else this.$message.error({ message: res.message, showClose: true }); | ||
| 373 | }); | ||
| 374 | }, | ||
| 375 | // 新增、修改角色 | ||
| 376 | handleAddEdit (value) { | ||
| 377 | this.$refs.addEditDialog.menuType = this.menuType; | ||
| 378 | this.$refs.addEditDialog.roleId = value.id; | ||
| 379 | this.roleSort = value.sort ? value.sort : 0; | ||
| 380 | if (value.id) { | ||
| 381 | this.$refs.addEditDialog.dialogForm.roleName = value.name; | ||
| 382 | this.$refs.addEditDialog.dialogForm.roleType = value.type; | ||
| 383 | this.$refs.addEditDialog.dialogForm.roleTextArea = value.description; | ||
| 384 | } | ||
| 385 | this.$refs.addEditDialog.showAddEditDialog = true; | ||
| 386 | this.$refs.addEditDialog.dialogTitle = value.id ? "修改" : "新增"; | ||
| 387 | }, | ||
| 388 | // 上移下移 | ||
| 389 | moveUpward (index, row) { | ||
| 390 | realMove(row.dictid, "UP", this.listdata); | ||
| 391 | this.key++; | ||
| 392 | let id = findParents(this.listdata, row.dictid); | ||
| 393 | this.keyList = id; | ||
| 394 | }, | ||
| 395 | moveDown (index, row) { | ||
| 396 | realMove(row.dictid, "DOWN", this.listdata); | ||
| 397 | this.key++; | ||
| 398 | let id = findParents(this.listdata, row.dictid); | ||
| 399 | this.keyList = id; | ||
| 400 | }, | ||
| 401 | |||
| 402 | // 删除 | ||
| 403 | handleDelete: function (id, content = "") { | ||
| 404 | this.$confirm( | ||
| 405 | `<div class="customer-message-wrapper"> | ||
| 412 | <h5 class="title">您确认要执行该操作用于以下信息:</h5> | 406 | <h5 class="title">您确认要执行该操作用于以下信息:</h5> |
| 413 | <p class="content" aria-controls="${content}">${content} | 407 | <p class="content" aria-controls="${content}">${content} |
| 414 | </p> | 408 | </p> |
| ... | @@ -416,47 +410,48 @@ | ... | @@ -416,47 +410,48 @@ |
| 416 | <span >无法恢复</span> | 410 | <span >无法恢复</span> |
| 417 | </p> | 411 | </p> |
| 418 | </div>`, | 412 | </div>`, |
| 419 | "执行确认", | 413 | "执行确认", |
| 420 | { | 414 | { |
| 421 | dangerouslyUseHTMLString: true, | 415 | dangerouslyUseHTMLString: true, |
| 422 | customClass: "customer-delete", | 416 | customClass: "customer-delete", |
| 423 | confirmButtonText: "确定", | 417 | confirmButtonText: "确定", |
| 424 | cancelButtonText: "取消", | 418 | cancelButtonText: "取消", |
| 425 | type: "warning", | 419 | type: "warning", |
| 420 | } | ||
| 421 | ) | ||
| 422 | .then(() => { | ||
| 423 | if (!this.tableUrl) { | ||
| 424 | this.$message.error({ | ||
| 425 | message: "请设置tableUrl属性为接口地址!", | ||
| 426 | showClose: true, | ||
| 427 | }); | ||
| 428 | return; | ||
| 426 | } | 429 | } |
| 427 | ) | 430 | const url = this.tableUrl + "/" + id; |
| 428 | .then(() => { | 431 | deleteAction(url).then((res) => { |
| 429 | if (!this.tableUrl) { | 432 | if (res.status === 1) { |
| 430 | this.$message.error({ | 433 | this.$message.success({ message: res.message, showClose: true }); |
| 431 | message: "请设置tableUrl属性为接口地址!", | 434 | this.getTableData(); |
| 432 | showClose: true, | 435 | } else { |
| 433 | }); | 436 | this.$message.error({ message: res.message, showClose: true }); |
| 434 | return; | ||
| 435 | } | 437 | } |
| 436 | const url = this.tableUrl + "/" + id; | 438 | }); |
| 437 | deleteAction(url).then((res) => { | 439 | }) |
| 438 | if (res.status === 1) { | 440 | .catch(() => { }); |
| 439 | this.$message.success({ message: res.message, showClose: true }); | ||
| 440 | this.getTableData(); | ||
| 441 | } else { | ||
| 442 | this.$message.error({ message: res.message, showClose: true }); | ||
| 443 | } | ||
| 444 | }); | ||
| 445 | }) | ||
| 446 | .catch(() => { }); | ||
| 447 | }, | ||
| 448 | // 新增回显 | ||
| 449 | reloadTableData () { | ||
| 450 | this.getTableData(); | ||
| 451 | }, | ||
| 452 | }, | 441 | }, |
| 453 | }; | 442 | // 新增回显 |
| 443 | reloadTableData () { | ||
| 444 | this.getTableData(); | ||
| 445 | }, | ||
| 446 | }, | ||
| 447 | }; | ||
| 454 | </script> | 448 | </script> |
| 455 | <style scoped lang="scss"> | 449 | <style scoped lang="scss"> |
| 456 | @import "~@/styles/mixin.scss"; | 450 | @import "~@/styles/mixin.scss"; |
| 457 | @import "~@/styles/public.scss"; | 451 | |
| 458 | .btnColRight { | 452 | // @import "~@/styles/public.scss"; |
| 459 | margin-left: -30px; | 453 | .btnColRight { |
| 460 | margin-top: 20px; | 454 | margin-left: -30px; |
| 461 | } | 455 | margin-top: 20px; |
| 456 | } | ||
| 462 | </style> | 457 | </style> | ... | ... |
| ... | @@ -249,5 +249,5 @@ export default { | ... | @@ -249,5 +249,5 @@ export default { |
| 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 | @import "~@/styles/public.scss"; | 252 | // @import "~@/styles/public.scss"; |
| 253 | </style> | 253 | </style> | ... | ... |
| ... | @@ -16,295 +16,289 @@ | ... | @@ -16,295 +16,289 @@ |
| 16 | </el-form> | 16 | </el-form> |
| 17 | </div> | 17 | </div> |
| 18 | <div class="from-clues-content"> | 18 | <div class="from-clues-content"> |
| 19 | <lb-table | 19 | <lb-table :pagination="false" @size-change="handleSizeChange" @p-current-change="handleCurrentChange" |
| 20 | :pagination="false" | 20 | :column="tableData.columns" :data="tableData.data" :expand-row-keys="keyList" row-key="dictid"> |
| 21 | @size-change="handleSizeChange" | ||
| 22 | @p-current-change="handleCurrentChange" | ||
| 23 | :column="tableData.columns" | ||
| 24 | :data="tableData.data" | ||
| 25 | :expand-row-keys="keyList" | ||
| 26 | row-key="dictid"> | ||
| 27 | </lb-table> | 21 | </lb-table> |
| 28 | </div> | 22 | </div> |
| 29 | <EditDialog ref="dialogForm" @ok="reloadTableData" /> | 23 | <EditDialog ref="dialogForm" @ok="reloadTableData" /> |
| 30 | </div> | 24 | </div> |
| 31 | </template> | 25 | </template> |
| 32 | <script> | 26 | <script> |
| 33 | import { | 27 | import { |
| 34 | getUuid, | 28 | getUuid, |
| 35 | judgeSort, | 29 | judgeSort, |
| 36 | realMove, | 30 | realMove, |
| 37 | findParents, | 31 | findParents, |
| 38 | removeTreeListItem, | 32 | removeTreeListItem, |
| 39 | } from "@/utils/operation"; | 33 | } from "@/utils/operation"; |
| 40 | import { | 34 | import { |
| 41 | resetPassword, | 35 | resetPassword, |
| 42 | getUserList, | 36 | getUserList, |
| 43 | } from "@/api/personnelManage"; | 37 | } from "@/api/personnelManage"; |
| 44 | import { api, deleteAction } from '@/api/manageApi' | 38 | import { api, deleteAction } from '@/api/manageApi' |
| 45 | import data from "./data"; | 39 | import data from "./data"; |
| 46 | import { deleteDomStr } from '@/utils/proDomStr' | 40 | import { deleteDomStr } from '@/utils/proDomStr' |
| 47 | import tableMixin from "@/mixins/tableMixin.js"; | 41 | import tableMixin from "@/mixins/tableMixin.js"; |
| 48 | import EditDialog from "./edit-dialog.vue"; | 42 | import EditDialog from "./edit-dialog.vue"; |
| 49 | export default { | 43 | export default { |
| 50 | name: "menus", | 44 | name: "menus", |
| 51 | mixins: [tableMixin], | 45 | mixins: [tableMixin], |
| 52 | components: { | 46 | components: { |
| 53 | EditDialog, | 47 | EditDialog, |
| 54 | }, | 48 | }, |
| 55 | data () { | 49 | data () { |
| 56 | return { | 50 | return { |
| 57 | taskData: null, | 51 | taskData: null, |
| 58 | keyList: [], | 52 | keyList: [], |
| 59 | form: { | 53 | form: { |
| 60 | job_name: "", | 54 | job_name: "", |
| 61 | currentPage: 1, | 55 | currentPage: 1, |
| 56 | }, | ||
| 57 | queryParam: {}, | ||
| 58 | selectType: "0", | ||
| 59 | queryName: "", | ||
| 60 | organizationId: "", // 组织机构ID | ||
| 61 | departmentId: "", // 部门ID | ||
| 62 | departmentList: [], // 部门列表 | ||
| 63 | levelList: [], // 职务级别 | ||
| 64 | sexList: [], | ||
| 65 | typeOptions: [ | ||
| 66 | { | ||
| 67 | value: "0", | ||
| 68 | label: "姓名", | ||
| 62 | }, | 69 | }, |
| 63 | queryParam: {}, | 70 | { |
| 64 | selectType: "0", | 71 | value: "1", |
| 65 | queryName: "", | 72 | label: "工号", |
| 66 | organizationId: "", // 组织机构ID | 73 | }, |
| 67 | departmentId: "", // 部门ID | 74 | { |
| 68 | departmentList: [], // 部门列表 | 75 | value: "2", |
| 69 | levelList: [], // 职务级别 | 76 | label: "部门", |
| 70 | sexList: [], | 77 | }, |
| 71 | typeOptions: [ | 78 | { |
| 72 | { | 79 | value: "3", |
| 73 | value: "0", | 80 | label: "机构", |
| 74 | label: "姓名", | 81 | }, |
| 75 | }, | 82 | ], |
| 76 | { | 83 | |
| 77 | value: "1", | 84 | selectionList: [], |
| 78 | label: "工号", | 85 | tableData: { |
| 79 | }, | 86 | columns: [ |
| 80 | { | ||
| 81 | value: "2", | ||
| 82 | label: "部门", | ||
| 83 | }, | ||
| 84 | { | 87 | { |
| 85 | value: "3", | 88 | label: "序号", |
| 86 | label: "机构", | 89 | type: "index", |
| 90 | width: "50", | ||
| 91 | index: this.indexMethod, | ||
| 87 | }, | 92 | }, |
| 88 | ], | 93 | ] |
| 89 | 94 | .concat(data.columns()) | |
| 90 | selectionList: [], | 95 | .concat([ |
| 91 | tableData: { | ||
| 92 | columns: [ | ||
| 93 | { | 96 | { |
| 94 | label: "序号", | 97 | label: "负责人", |
| 95 | type: "index", | 98 | render: (h, scope) => { |
| 96 | width: "50", | 99 | return ( |
| 97 | index: this.indexMethod, | 100 | <i v-show={scope.row.isDuty !== null} class="el-icon-check" /> |
| 101 | ) | ||
| 102 | } | ||
| 98 | }, | 103 | }, |
| 99 | ] | 104 | { |
| 100 | .concat(data.columns()) | 105 | label: "排序", |
| 101 | .concat([ | 106 | width: 280, |
| 102 | { | 107 | render: (h, scope) => { |
| 103 | label: "负责人", | 108 | return ( |
| 104 | render: (h, scope) => { | 109 | <div> |
| 105 | return ( | 110 | <el-button |
| 106 | <i v-show={scope.row.isDuty !== null} class="el-icon-check" /> | 111 | type="text" |
| 107 | ) | 112 | disabled={scope.row.isTop} |
| 108 | } | 113 | onClick={() => { |
| 109 | }, | 114 | this.moveUpward(scope.$index, scope.row); |
| 110 | { | 115 | }} |
| 111 | label: "排序", | 116 | > |
| 112 | width: 280, | 117 | 上移 |
| 113 | render: (h, scope) => { | 118 | </el-button> |
| 114 | return ( | 119 | <el-button |
| 115 | <div> | 120 | type="text" |
| 116 | <el-button | 121 | disabled={scope.row.isBottom} |
| 117 | type="text" | 122 | onClick={() => { |
| 118 | disabled={scope.row.isTop} | 123 | this.moveDown(scope.$index, scope.row); |
| 119 | onClick={() => { | 124 | }} |
| 120 | this.moveUpward(scope.$index, scope.row); | 125 | > |
| 121 | }} | 126 | 下移 |
| 122 | > | 127 | </el-button> |
| 123 | 上移 | 128 | </div> |
| 124 | </el-button> | 129 | ); |
| 125 | <el-button | ||
| 126 | type="text" | ||
| 127 | disabled={scope.row.isBottom} | ||
| 128 | onClick={() => { | ||
| 129 | this.moveDown(scope.$index, scope.row); | ||
| 130 | }} | ||
| 131 | > | ||
| 132 | 下移 | ||
| 133 | </el-button> | ||
| 134 | </div> | ||
| 135 | ); | ||
| 136 | }, | ||
| 137 | }, | 130 | }, |
| 138 | { | 131 | }, |
| 139 | label: "操作", | 132 | { |
| 140 | width: 380, | 133 | label: "操作", |
| 141 | render: (h, scope) => { | 134 | width: 380, |
| 142 | return ( | 135 | render: (h, scope) => { |
| 143 | <div> | 136 | return ( |
| 144 | <el-button | 137 | <div> |
| 145 | type="text" | 138 | <el-button |
| 146 | size="mini" | 139 | type="text" |
| 147 | icon="el-icon-video-pause" | 140 | size="mini" |
| 148 | onClick={() => { | 141 | icon="el-icon-video-pause" |
| 149 | this.resetPassword(scope.row.id); | 142 | onClick={() => { |
| 150 | }} | 143 | this.resetPassword(scope.row.id); |
| 151 | > | 144 | }} |
| 152 | 重置 | 145 | > |
| 153 | </el-button> | 146 | 重置 |
| 154 | <el-button | 147 | </el-button> |
| 155 | type="text" | 148 | <el-button |
| 156 | size="mini" | 149 | type="text" |
| 157 | icon="el-icon-edit" | 150 | size="mini" |
| 158 | onClick={() => { | 151 | icon="el-icon-edit" |
| 159 | this.handleEdit(scope.row); | 152 | onClick={() => { |
| 160 | }} | 153 | this.handleEdit(scope.row); |
| 161 | > | 154 | }} |
| 162 | 修改 | 155 | > |
| 163 | </el-button> | 156 | 修改 |
| 164 | <el-button | 157 | </el-button> |
| 165 | type="text" | 158 | <el-button |
| 166 | size="mini" | 159 | type="text" |
| 167 | icon="el-icon-delete" | 160 | size="mini" |
| 168 | style="color:#F56C6C" | 161 | icon="el-icon-delete" |
| 169 | onClick={() => { | 162 | style="color:#F56C6C" |
| 170 | this.handleDelete(scope.row.id, scope.row.name); | 163 | onClick={() => { |
| 171 | }} | 164 | this.handleDelete(scope.row.id, scope.row.name); |
| 172 | > | 165 | }} |
| 173 | 删除 | 166 | > |
| 174 | </el-button> | 167 | 删除 |
| 175 | </div> | 168 | </el-button> |
| 176 | ); | 169 | </div> |
| 177 | }, | 170 | ); |
| 178 | }, | 171 | }, |
| 179 | ]), | 172 | }, |
| 180 | data: [], | 173 | ]), |
| 181 | }, | 174 | data: [], |
| 182 | }; | ||
| 183 | }, | ||
| 184 | created () { | ||
| 185 | this.getTableList(); | ||
| 186 | }, | ||
| 187 | computed: { | ||
| 188 | departmentid () { | ||
| 189 | return this.$store.state.user.userInfo; | ||
| 190 | }, | 175 | }, |
| 176 | }; | ||
| 177 | }, | ||
| 178 | created () { | ||
| 179 | this.getTableList(); | ||
| 180 | }, | ||
| 181 | computed: { | ||
| 182 | departmentid () { | ||
| 183 | return this.$store.state.user.userInfo; | ||
| 191 | }, | 184 | }, |
| 192 | methods: { | 185 | }, |
| 193 | handleAdd () { | 186 | methods: { |
| 194 | this.$refs.dialogForm.adds(); | 187 | handleAdd () { |
| 195 | this.$refs.dialogForm.title = "添加"; | 188 | this.$refs.dialogForm.adds(); |
| 196 | }, | 189 | this.$refs.dialogForm.title = "添加"; |
| 197 | getTableList () { | 190 | }, |
| 198 | this.loading = true; | 191 | getTableList () { |
| 199 | this.queryParam = { | 192 | this.loading = true; |
| 200 | organizationId: this.departmentid.organizationId, | 193 | this.queryParam = { |
| 201 | departmentId: this.departmentid.departmentId, | 194 | organizationId: this.departmentid.organizationId, |
| 202 | }; | 195 | departmentId: this.departmentid.departmentId, |
| 203 | getUserList(this.queryParam).then((res) => { | 196 | }; |
| 204 | console.log("人员列表", res); | 197 | getUserList(this.queryParam).then((res) => { |
| 205 | if (res.status === 1) { | 198 | console.log("人员列表", res); |
| 206 | this.loading = false; | 199 | if (res.status === 1) { |
| 207 | this.tableData.data = res.content; | 200 | this.loading = false; |
| 208 | this.tableData.data = judgeSort(this.tableData.data); | 201 | this.tableData.data = res.content; |
| 209 | } else { | 202 | this.tableData.data = judgeSort(this.tableData.data); |
| 210 | this.$message.error({ message: res.message, showClose: true }); | ||
| 211 | } | ||
| 212 | }); | ||
| 213 | }, | ||
| 214 | |||
| 215 | // 重置用户密码 | ||
| 216 | resetPassword (data) { | ||
| 217 | const ids = [] | ||
| 218 | if (data instanceof Array) { | ||
| 219 | data.forEach((item) => { | ||
| 220 | ids.push(item.id) | ||
| 221 | }) | ||
| 222 | } else { | 203 | } else { |
| 223 | ids.push(data) | 204 | this.$message.error({ message: res.message, showClose: true }); |
| 224 | } | ||
| 225 | if (ids.length === 0) { | ||
| 226 | this.$message({ | ||
| 227 | message: '请选择需要重置密码的用户!', | ||
| 228 | showClose: true | ||
| 229 | }) | ||
| 230 | return | ||
| 231 | } | 205 | } |
| 232 | this.$confirm( | 206 | }); |
| 233 | `<div class="customer-message-wrapper"> | 207 | }, |
| 208 | |||
| 209 | // 重置用户密码 | ||
| 210 | resetPassword (data) { | ||
| 211 | const ids = [] | ||
| 212 | if (data instanceof Array) { | ||
| 213 | data.forEach((item) => { | ||
| 214 | ids.push(item.id) | ||
| 215 | }) | ||
| 216 | } else { | ||
| 217 | ids.push(data) | ||
| 218 | } | ||
| 219 | if (ids.length === 0) { | ||
| 220 | this.$message({ | ||
| 221 | message: '请选择需要重置密码的用户!', | ||
| 222 | showClose: true | ||
| 223 | }) | ||
| 224 | return | ||
| 225 | } | ||
| 226 | this.$confirm( | ||
| 227 | `<div class="customer-message-wrapper"> | ||
| 234 | <h5 class="title">确定要重置密码吗</h5> | 228 | <h5 class="title">确定要重置密码吗</h5> |
| 235 | <p class="result">执行后,数据将 | 229 | <p class="result">执行后,数据将 |
| 236 | <span >无法恢复</span> | 230 | <span >无法恢复</span> |
| 237 | </p> | 231 | </p> |
| 238 | </div>`, | 232 | </div>`, |
| 239 | '执行确认', | 233 | '执行确认', |
| 240 | { | 234 | { |
| 241 | dangerouslyUseHTMLString: true, | ||
| 242 | customClass: 'customer-delete', | ||
| 243 | confirmButtonText: '确定', | ||
| 244 | cancelButtonText: '取消', | ||
| 245 | type: 'warning' | ||
| 246 | } | ||
| 247 | ) | ||
| 248 | .then(() => { | ||
| 249 | resetPassword(ids).then((res) => { | ||
| 250 | if (res.status === 1) { | ||
| 251 | this.$message.success({ message: res.message, showClose: true }) | ||
| 252 | this.getTableList() | ||
| 253 | } else { | ||
| 254 | this.$message.error({ message: res.message, showClose: true }) | ||
| 255 | } | ||
| 256 | }) | ||
| 257 | }) | ||
| 258 | .catch(() => { }) | ||
| 259 | }, | ||
| 260 | // 上移下移 | ||
| 261 | moveUpward (index, row) { | ||
| 262 | realMove(row.dictid, "UP", this.tableData.data); | ||
| 263 | this.key++; | ||
| 264 | let id = findParents(this.tableData.data, row.dictid); | ||
| 265 | this.keyList = id; | ||
| 266 | }, | ||
| 267 | moveDown (index, row) { | ||
| 268 | realMove(row.dictid, "DOWN", this.tableData.data); | ||
| 269 | this.key++; | ||
| 270 | let id = findParents(this.tableData.data, row.dictid); | ||
| 271 | this.keyList = id; | ||
| 272 | }, | ||
| 273 | // 修改人员信息 | ||
| 274 | handleEdit (row) { | ||
| 275 | this.$refs.dialogForm.edit(row); | ||
| 276 | this.$refs.dialogForm.title = "修改"; | ||
| 277 | }, | ||
| 278 | // 删除 | ||
| 279 | handleDelete (id, content) { | ||
| 280 | this.$confirm(deleteDomStr(content), '执行确认', { | ||
| 281 | dangerouslyUseHTMLString: true, | 235 | dangerouslyUseHTMLString: true, |
| 282 | customClass: 'customer-delete', | 236 | customClass: 'customer-delete', |
| 283 | confirmButtonText: '确定', | 237 | confirmButtonText: '确定', |
| 284 | cancelButtonText: '取消', | 238 | cancelButtonText: '取消', |
| 285 | type: 'warning' | 239 | type: 'warning' |
| 286 | }) | 240 | } |
| 287 | .then(() => { | 241 | ) |
| 288 | deleteAction(`${api.users}/${id}`).then((res) => { | 242 | .then(() => { |
| 289 | if (res.status === 1) { | 243 | resetPassword(ids).then((res) => { |
| 290 | this.$message.success({ message: res.message, showClose: true }) | 244 | if (res.status === 1) { |
| 291 | } else { | 245 | this.$message.success({ message: res.message, showClose: true }) |
| 292 | this.$message.error({ message: res.message, showClose: true }) | ||
| 293 | } | ||
| 294 | this.getTableList() | 246 | this.getTableList() |
| 295 | }) | 247 | } else { |
| 248 | this.$message.error({ message: res.message, showClose: true }) | ||
| 249 | } | ||
| 296 | }) | 250 | }) |
| 297 | .catch(() => { }) | 251 | }) |
| 298 | }, | 252 | .catch(() => { }) |
| 299 | // 新增回显 | 253 | }, |
| 300 | reloadTableData () { | 254 | // 上移下移 |
| 301 | this.getTableList() | 255 | moveUpward (index, row) { |
| 302 | }, | 256 | realMove(row.dictid, "UP", this.tableData.data); |
| 257 | this.key++; | ||
| 258 | let id = findParents(this.tableData.data, row.dictid); | ||
| 259 | this.keyList = id; | ||
| 260 | }, | ||
| 261 | moveDown (index, row) { | ||
| 262 | realMove(row.dictid, "DOWN", this.tableData.data); | ||
| 263 | this.key++; | ||
| 264 | let id = findParents(this.tableData.data, row.dictid); | ||
| 265 | this.keyList = id; | ||
| 266 | }, | ||
| 267 | // 修改人员信息 | ||
| 268 | handleEdit (row) { | ||
| 269 | this.$refs.dialogForm.edit(row); | ||
| 270 | this.$refs.dialogForm.title = "修改"; | ||
| 271 | }, | ||
| 272 | // 删除 | ||
| 273 | handleDelete (id, content) { | ||
| 274 | this.$confirm(deleteDomStr(content), '执行确认', { | ||
| 275 | dangerouslyUseHTMLString: true, | ||
| 276 | customClass: 'customer-delete', | ||
| 277 | confirmButtonText: '确定', | ||
| 278 | cancelButtonText: '取消', | ||
| 279 | type: 'warning' | ||
| 280 | }) | ||
| 281 | .then(() => { | ||
| 282 | deleteAction(`${api.users}/${id}`).then((res) => { | ||
| 283 | if (res.status === 1) { | ||
| 284 | this.$message.success({ message: res.message, showClose: true }) | ||
| 285 | } else { | ||
| 286 | this.$message.error({ message: res.message, showClose: true }) | ||
| 287 | } | ||
| 288 | this.getTableList() | ||
| 289 | }) | ||
| 290 | }) | ||
| 291 | .catch(() => { }) | ||
| 292 | }, | ||
| 293 | // 新增回显 | ||
| 294 | reloadTableData () { | ||
| 295 | this.getTableList() | ||
| 303 | }, | 296 | }, |
| 304 | }; | 297 | }, |
| 298 | }; | ||
| 305 | </script> | 299 | </script> |
| 306 | <style scoped lang="scss"> | 300 | <style scoped lang="scss"> |
| 307 | @import "~@/styles/mixin.scss"; | 301 | @import "~@/styles/mixin.scss"; |
| 308 | @import "~@/styles/public.scss"; | 302 | // @import "~@/styles/public.scss"; |
| 309 | @import "./index.scss"; | 303 | @import "./index.scss"; |
| 310 | </style> | 304 | </style> | ... | ... |
| ... | @@ -199,6 +199,6 @@ export default { | ... | @@ -199,6 +199,6 @@ export default { |
| 199 | }; | 199 | }; |
| 200 | </script> | 200 | </script> |
| 201 | <style scoped lang="scss"> | 201 | <style scoped lang="scss"> |
| 202 | @import "~@/styles/public.scss"; | 202 | // @import "~@/styles/public.scss"; |
| 203 | @import "./index.scss"; | 203 | @import "./index.scss"; |
| 204 | </style> | 204 | </style> | ... | ... |
-
Please register or sign in to post a comment