Merge branch 'master' of http://yun.pashanhoo.com:9090/bdc/bdcjg-web
Showing
16 changed files
with
605 additions
and
471 deletions
| 1 | /* | ||
| 2 | * @Author: yangwei | ||
| 3 | * @Date: 2023-02-24 15:12:45 | ||
| 4 | * @LastEditors: yangwei | ||
| 5 | * @LastEditTime: 2023-03-14 10:45:11 | ||
| 6 | * @FilePath: \bdcjg-web\src\api\authorityManage.js | ||
| 7 | * @Description: | ||
| 8 | * | ||
| 9 | * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. | ||
| 10 | */ | ||
| 1 | 11 | ||
| 2 | import { getParams } from './util' | 12 | import { getParams } from './util' | 
| 3 | import { | 13 | import { | 
| ... | @@ -8,16 +18,16 @@ import { | ... | @@ -8,16 +18,16 @@ import { | 
| 8 | } from './manageApi' | 18 | } from './manageApi' | 
| 9 | /** 角色管理开始 */ | 19 | /** 角色管理开始 */ | 
| 10 | // 获取角色列表 by categoryId | 20 | // 获取角色列表 by categoryId | 
| 11 | export const getRolesById = categoryId => { | 21 | export const getRolesById = categoryIdList => { | 
| 12 | const conditionGroup = { | 22 | const conditionGroup = { | 
| 13 | conditions: [ | 23 | conditions: [ | 
| 14 | { | 24 | { | 
| 15 | property: 'category', | 25 | property: 'category', | 
| 16 | value: categoryId, | 26 | value: categoryIdList, | 
| 17 | operator: 'EQ' | 27 | operator: 'IN' | 
| 18 | } | 28 | } | 
| 19 | ], | 29 | ], | 
| 20 | queryRelation: 'AND' | 30 | queryRelation: 'AND', | 
| 21 | } | 31 | } | 
| 22 | const params = getParams(conditionGroup) | 32 | const params = getParams(conditionGroup) | 
| 23 | return getAction(api.roles, params) | 33 | return getAction(api.roles, params) | ... | ... | 
src/api/orders.js
0 → 100644
| 1 | import request from '@/utils/request' | ||
| 2 | import SERVER from './config' | ||
| 3 | |||
| 4 | /* | ||
| 5 | 更新排序 | ||
| 6 | record-排序整条数据 | ||
| 7 | operate-BOTTOM(置底), DOWN(向下), TOP(置顶), UP(向上) | ||
| 8 | */ | ||
| 9 | export function updateOrder(url, record, operate, swapId) { | ||
| 10 | return request({ | ||
| 11 | url: SERVER.MANAGEMENTAPI + url + "/" + record.id + "/orders", | ||
| 12 | method: "put", | ||
| 13 | params: { | ||
| 14 | operate: operate, | ||
| 15 | swapId: swapId, | ||
| 16 | }, | ||
| 17 | }); | ||
| 18 | } | 
| ... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ | 
| 17 | data () { | 17 | data () { | 
| 18 | return { | 18 | return { | 
| 19 | options: {}, | 19 | options: {}, | 
| 20 | max: "100", //最大value值 | 20 | max: "5000", //最大value值 | 
| 21 | min: "1", // 最小value值 | 21 | min: "1", // 最小value值 | 
| 22 | key: 0, | 22 | key: 0, | 
| 23 | mapjson: "", | 23 | mapjson: "", | 
| ... | @@ -87,10 +87,10 @@ | ... | @@ -87,10 +87,10 @@ | 
| 87 | itemGap: 2, // 每两个图元之间的间隔距离,单位为px | 87 | itemGap: 2, // 每两个图元之间的间隔距离,单位为px | 
| 88 | pieces: [ | 88 | pieces: [ | 
| 89 | // 自定义每一段的范围,以及每一段的文字 | 89 | // 自定义每一段的范围,以及每一段的文字 | 
| 90 | { gte: 100, label: "100以上", color: "#035cf5" }, // 不指定 max,表示 max 为无限大(Infinity)。 | 90 | { gte: 100, label: "5000以上", color: "#035cf5" }, // 不指定 max,表示 max 为无限大(Infinity)。 | 
| 91 | { gte: 50, lte: 6000, label: "20-100", color: "#3375e4" }, | 91 | { gte: 50, lte: 6000, label: "1000-5000", color: "#3375e4" }, | 
| 92 | { gte: 20, lte: 2000, label: "1-200", color: "#6797ef" }, | 92 | { gte: 20, lte: 2000, label: "500-1000", color: "#6797ef" }, | 
| 93 | { gte: 1, lte: 1000, label: "1-20", color: "#96b5ef" }, | 93 | { gte: 1, lte: 1000, label: "0-500", color: "#96b5ef" }, | 
| 94 | ], | 94 | ], | 
| 95 | textStyle: { | 95 | textStyle: { | 
| 96 | color: "#737373", | 96 | color: "#737373", | ... | ... | 
| ... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ | 
| 26 | watch: { | 26 | watch: { | 
| 27 | cdata: { | 27 | cdata: { | 
| 28 | handler (newData) { | 28 | handler (newData) { | 
| 29 | 29 | console.log("newData", newData); | |
| 30 | this.options = { | 30 | this.options = { | 
| 31 | color: [ | 31 | color: [ | 
| 32 | "#37a2da", | 32 | "#37a2da", | 
| ... | @@ -34,31 +34,29 @@ | ... | @@ -34,31 +34,29 @@ | 
| 34 | "#9fe6b8", | 34 | "#9fe6b8", | 
| 35 | "#ffdb5c", | 35 | "#ffdb5c", | 
| 36 | "#ff9f7f", | 36 | "#ff9f7f", | 
| 37 | "#8378ea", | ||
| 38 | "#fb7293", | 37 | "#fb7293", | 
| 39 | "#e7bcf3", | 38 | "#e7bcf3", | 
| 39 | "#8378ea" | ||
| 40 | 40 | ||
| 41 | ], | 41 | ], | 
| 42 | tooltip: { | ||
| 43 | trigger: "item", | ||
| 44 | formatter: "<br/>{b} : {c} ({d}%)", | ||
| 45 | }, | ||
| 42 | series: [ | 46 | series: [ | 
| 43 | { | 47 | { | 
| 44 | name: "Access From", | 48 | name: "Access From", | 
| 45 | type: "pie", | 49 | type: "pie", | 
| 46 | radius: ["54%", "70%"], | ||
| 47 | avoidLabelOverlap: true, | 50 | avoidLabelOverlap: true, | 
| 48 | label: { | 51 | label: { | 
| 49 | formatter: (params) => { | 52 | formatter: (params) => { | 
| 50 | // console.log(params) | 53 | return `${params.name}`; | 
| 51 | return `${params.name}\n(${params.value})`; | ||
| 52 | }, | 54 | }, | 
| 53 | position: "outer", | 55 | position: "outer", | 
| 54 | alignTo: "edge", | 56 | alignTo: "edge", | 
| 55 | margin: 5 | 57 | margin: 5 | 
| 56 | }, | 58 | }, | 
| 57 | labelLine: { | 59 | |
| 58 | lineStyle: { | ||
| 59 | width: 3, | ||
| 60 | }, | ||
| 61 | }, | ||
| 62 | data: newData.seriesData, | 60 | data: newData.seriesData, | 
| 63 | } | 61 | } | 
| 64 | ], | 62 | ], | ... | ... | 
| ... | @@ -5,57 +5,71 @@ | ... | @@ -5,57 +5,71 @@ | 
| 5 | </template> | 5 | </template> | 
| 6 | 6 | ||
| 7 | <script> | 7 | <script> | 
| 8 | import Chart from "./Chart"; | 8 | import Chart from "./Chart"; | 
| 9 | import work from "@/api/work"; | 9 | import work from "@/api/work"; | 
| 10 | export default { | 10 | export default { | 
| 11 | data() { | 11 | data () { | 
| 12 | return { | 12 | return { | 
| 13 | cdata: { | 13 | cdata: { | 
| 14 | seriesData: [], | 14 | seriesData: [], | 
| 15 | }, | 15 | }, | 
| 16 | }; | 16 | getdata: [], | 
| 17 | }, | 17 | }; | 
| 18 | components: { | 18 | }, | 
| 19 | Chart, | 19 | components: { | 
| 20 | }, | 20 | Chart, | 
| 21 | mounted() { | 21 | }, | 
| 22 | this.getdjywltotal(); | 22 | mounted () { | 
| 23 | window.addEventListener("resize", () => { | 23 | this.addhousetotal(); | 
| 24 | this.cdata.seriesData = []; | 24 | window.addEventListener("resize", () => { | 
| 25 | this.getdjywltotal(); | 25 | this.getdata = []; | 
| 26 | }); | 26 | this.addhousetotal(); | 
| 27 | }, | 27 | }); | 
| 28 | methods: { | 28 | |
| 29 | // 获取登记业务量玫瑰图数据 | 29 | }, | 
| 30 | async getdjywltotal() { | 30 | methods: { | 
| 31 | if (this.cdata.seriesData.length == 0) { | 31 | async addhousetotal () { | 
| 32 | try { | 32 | if (this.getdata.length == 0) { | 
| 33 | let p = { | 33 | this.getdata = []; | 
| 34 | DJLX: "", | 34 | try { | 
| 35 | QLLX: "", | 35 | let { result: res } = await work.addhousetotal(); | 
| 36 | XZQDM: "", | 36 | res.map((item) => { | 
| 37 | }; | 37 | return this.cdata.seriesData.push({ | 
| 38 | this.cdata.seriesData = []; | 38 | name: `${item.fwyt + '(' + item.fwxz})`, | 
| 39 | let res = await work.getdjywltotal(p); | 39 | value: item.mj, | 
| 40 | if(this.cdata.seriesData.length == 0){ | 40 | }); | 
| 41 | res.result.map((item) => { | ||
| 42 | return this.cdata.seriesData.push({ | ||
| 43 | name: item.AREACODE, | ||
| 44 | value: item.ywtotal, | ||
| 45 | }); | ||
| 46 | 41 | ||
| 47 | }); | 42 | }); | 
| 48 | } | ||
| 49 | // 遍历修改数组键,作为echars图表的参数 | ||
| 50 | 43 | ||
| 51 | 44 | ||
| 52 | } catch (error) { | 45 | } catch (error) { | 
| 53 | console.log(error); | 46 | console.log("error", error); | 
| 47 | } | ||
| 54 | } | 48 | } | 
| 55 | } | 49 | let delarr = this.cdata.seriesData.sort(this.up) | 
| 56 | }, | 50 | this.setadat(delarr) | 
| 57 | }, | 51 | |
| 58 | }; | 52 | }, | 
| 53 | // 处理数据方法 | ||
| 54 | setadat (delarr) { | ||
| 55 | |||
| 56 | this.cdata.seriesData = delarr.splice(0, 6); | ||
| 57 | let sum = 0 | ||
| 58 | for (var i = 0; i < delarr.length; i++) { | ||
| 59 | sum = sum + delarr[i].value | ||
| 60 | } | ||
| 61 | sum = sum.toFixed(2) | ||
| 62 | this.cdata.seriesData.push({ | ||
| 63 | name: "其他(其他种类)", | ||
| 64 | values: "其他种类", | ||
| 65 | value: sum, | ||
| 66 | }) | ||
| 67 | }, | ||
| 68 | // 排序方法 | ||
| 69 | up (x, y) { return y.value - x.value } | ||
| 70 | |||
| 71 | } | ||
| 72 | }; | ||
| 59 | </script> | 73 | </script> | 
| 60 | 74 | ||
| 61 | <style lang="scss" scoped></style> | 75 | <style lang="scss" scoped></style> | ... | ... | 
| ... | @@ -2,7 +2,8 @@ | ... | @@ -2,7 +2,8 @@ | 
| 2 | <div class="navbar-con"> | 2 | <div class="navbar-con"> | 
| 3 | <div class="navbar"> | 3 | <div class="navbar"> | 
| 4 | <div class="logo"> | 4 | <div class="logo"> | 
| 5 | <img :src="require('@/image/logo.png')" alt="" /> | 5 | <img :src="require('@/image/bdclogo.png')" alt="" /> | 
| 6 | <h4>不动产登记上报系统</h4> | ||
| 6 | </div> | 7 | </div> | 
| 7 | <div class="right-menu"> | 8 | <div class="right-menu"> | 
| 8 | <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand"> | 9 | <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand"> | 
| ... | @@ -20,214 +21,224 @@ | ... | @@ -20,214 +21,224 @@ | 
| 20 | </div> | 21 | </div> | 
| 21 | </template> | 22 | </template> | 
| 22 | <script> | 23 | <script> | 
| 23 | import { mapGetters } from 'vuex' | 24 | import { mapGetters } from 'vuex' | 
| 24 | import Breadcrumb from './Breadcrumb' | 25 | import Breadcrumb from './Breadcrumb' | 
| 25 | import defaultSettings from '@/settings' | 26 | import defaultSettings from '@/settings' | 
| 26 | export default { | 27 | export default { | 
| 27 | components: { | 28 | components: { | 
| 28 | Breadcrumb | 29 | Breadcrumb | 
| 29 | }, | 30 | }, | 
| 30 | computed: { | 31 | computed: { | 
| 31 | ...mapGetters(['sidebar', 'avatar', 'name']) | 32 | ...mapGetters(['sidebar', 'avatar', 'name']) | 
| 32 | }, | ||
| 33 | data () { | ||
| 34 | return { | ||
| 35 | title: defaultSettings.title | ||
| 36 | } | ||
| 37 | }, | ||
| 38 | methods: { | ||
| 39 | handleDataView () { | ||
| 40 | const { href } = this.$router.resolve('/dataView'); | ||
| 41 | window.open(href, '_blank'); | ||
| 42 | }, | 33 | }, | 
| 43 | themeChange (val) { | 34 | data () { | 
| 44 | this.$store.dispatch('app/updateTheme', val) | 35 | return { | 
| 36 | title: defaultSettings.title | ||
| 37 | } | ||
| 45 | }, | 38 | }, | 
| 46 | handleCommand (command) { | 39 | methods: { | 
| 47 | if (command == 'a') { | 40 | handleDataView () { | 
| 48 | } else { | 41 | const { href } = this.$router.resolve('/dataView'); | 
| 42 | window.open(href, '_blank'); | ||
| 43 | }, | ||
| 44 | themeChange (val) { | ||
| 45 | this.$store.dispatch('app/updateTheme', val) | ||
| 46 | }, | ||
| 47 | handleCommand (command) { | ||
| 48 | if (command == 'a') { | ||
| 49 | } else { | ||
| 49 | 50 | ||
| 51 | } | ||
| 50 | } | 52 | } | 
| 51 | } | 53 | } | 
| 52 | } | 54 | } | 
| 53 | } | ||
| 54 | </script> | 55 | </script> | 
| 55 | <style lang="scss" scoped> | 56 | <style lang="scss" scoped> | 
| 56 | .navbar-con { | 57 | .navbar-con { | 
| 57 | position: relative; | 58 | position: relative; | 
| 58 | 59 | ||
| 59 | .logo { | 60 | .logo { | 
| 60 | color: #fff; | 61 | color: #fff; | 
| 61 | font-size: 26px; | 62 | font-size: 26px; | 
| 62 | font-weight: 700; | 63 | font-weight: 700; | 
| 63 | } | 64 | display: flex; | 
| 64 | } | 65 | img { | 
| 65 | 66 | width: 47px; | |
| 66 | .NoticeBar { | 67 | height: 47px; | 
| 67 | position: absolute; | 68 | } | 
| 68 | bottom: 0; | 69 | h4 { | 
| 69 | } | 70 | margin-left: 20px; | 
| 70 | 71 | height: 50px; | |
| 71 | .el-dropdown-menu { | 72 | line-height: 50px; | 
| 72 | padding: 0 !important; | 73 | } | 
| 73 | border: 1px solid #ebeef5; | 74 | } | 
| 74 | box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12); | ||
| 75 | border-radius: 4px 0 0 4px 4px; | ||
| 76 | |||
| 77 | .el-dropdown-menu__item { | ||
| 78 | text-align: center; | ||
| 79 | margin-top: 0 !important; | ||
| 80 | font-size: 14px; | ||
| 81 | font-family: PingFangSC-Regular, PingFang SC; | ||
| 82 | font-weight: 400; | ||
| 83 | color: #4a4a4a; | ||
| 84 | width: 140px; | ||
| 85 | height: 36px; | ||
| 86 | line-height: 36px; | ||
| 87 | } | ||
| 88 | |||
| 89 | .el-dropdown-menu__item:nth-child(6) { | ||
| 90 | border-top: 1px solid #ebeef5; | ||
| 91 | } | ||
| 92 | |||
| 93 | .popper__arrow { | ||
| 94 | top: -11px !important; | ||
| 95 | left: 110px !important; | ||
| 96 | transform: rotate(0deg) scale(2); | ||
| 97 | } | 75 | } | 
| 98 | 76 | ||
| 99 | .el-dropdown-menu__item:not(.is-disabled):hover, | 77 | .NoticeBar { | 
| 100 | .el-dropdown-menu__item:focus { | 78 | position: absolute; | 
| 101 | background: #f6f7f9; | 79 | bottom: 0; | 
| 102 | color: #4a4a4a; | ||
| 103 | } | ||
| 104 | } | ||
| 105 | |||
| 106 | .navbar { | ||
| 107 | height: $headerHeight; | ||
| 108 | overflow: hidden; | ||
| 109 | position: relative; | ||
| 110 | background: #3D59C4; | ||
| 111 | display: flex; | ||
| 112 | align-items: center; | ||
| 113 | padding-right: 20px; | ||
| 114 | justify-content: space-between; | ||
| 115 | .header-logo { | ||
| 116 | width: 300px; | ||
| 117 | } | 80 | } | 
| 118 | 81 | ||
| 119 | .backdrop { | 82 | .el-dropdown-menu { | 
| 120 | flex: 1; | 83 | padding: 0 !important; | 
| 121 | width: 60%; | 84 | border: 1px solid #ebeef5; | 
| 122 | background-size: 100% 100%; | 85 | box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12); | 
| 123 | height: $headerHeight; | 86 | border-radius: 4px 0 0 4px 4px; | 
| 124 | display: flex; | 87 | |
| 125 | align-items: center; | 88 | .el-dropdown-menu__item { | 
| 126 | } | 89 | text-align: center; | 
| 90 | margin-top: 0 !important; | ||
| 91 | font-size: 14px; | ||
| 92 | font-family: PingFangSC-Regular, PingFang SC; | ||
| 93 | font-weight: 400; | ||
| 94 | color: #4a4a4a; | ||
| 95 | width: 140px; | ||
| 96 | height: 36px; | ||
| 97 | line-height: 36px; | ||
| 98 | } | ||
| 127 | 99 | ||
| 128 | .hamburger-container { | 100 | .el-dropdown-menu__item:nth-child(6) { | 
| 129 | line-height: 43px; | 101 | border-top: 1px solid #ebeef5; | 
| 130 | height: 100%; | 102 | } | 
| 131 | float: left; | ||
| 132 | cursor: pointer; | ||
| 133 | transition: background 0.3s; | ||
| 134 | -webkit-tap-highlight-color: transparent; | ||
| 135 | 103 | ||
| 136 | &:hover { | 104 | .popper__arrow { | 
| 137 | background: rgba(0, 0, 0, 0.025); | 105 | top: -11px !important; | 
| 106 | left: 110px !important; | ||
| 107 | transform: rotate(0deg) scale(2); | ||
| 138 | } | 108 | } | 
| 139 | } | ||
| 140 | 109 | ||
| 141 | .breadcrumb-container { | 110 | .el-dropdown-menu__item:not(.is-disabled):hover, | 
| 142 | float: left; | 111 | .el-dropdown-menu__item:focus { | 
| 112 | background: #f6f7f9; | ||
| 113 | color: #4a4a4a; | ||
| 114 | } | ||
| 143 | } | 115 | } | 
| 144 | 116 | ||
| 145 | .right-menu { | 117 | .navbar { | 
| 146 | float: right; | 118 | height: $headerHeight; | 
| 147 | height: 100%; | 119 | overflow: hidden; | 
| 148 | line-height: 50px; | 120 | position: relative; | 
| 121 | background: linear-gradient(270deg, #ebf1ff 0%, #3d59c4 100%); | ||
| 149 | display: flex; | 122 | display: flex; | 
| 150 | align-items: center; | 123 | align-items: center; | 
| 151 | 124 | padding-right: 20px; | |
| 152 | .function { | 125 | justify-content: space-between; | 
| 153 | margin: 0 15px; | 126 | .header-logo { | 
| 154 | cursor: pointer; | 127 | width: 300px; | 
| 155 | } | 128 | } | 
| 156 | 129 | ||
| 157 | .shutdown { | 130 | .backdrop { | 
| 158 | font-size: 20px; | 131 | flex: 1; | 
| 159 | margin-left: 15px; | 132 | width: 60%; | 
| 160 | cursor: pointer; | 133 | background-size: 100% 100%; | 
| 161 | } | 134 | height: $headerHeight; | 
| 162 | 135 | display: flex; | |
| 163 | .organization-item { | 136 | align-items: center; | 
| 164 | margin-right: 40px; | ||
| 165 | margin-top: -40px !important; | ||
| 166 | } | 137 | } | 
| 167 | 138 | ||
| 168 | .item { | 139 | .hamburger-container { | 
| 169 | margin-right: 40px; | 140 | line-height: 43px; | 
| 170 | margin-top: -20px; | 141 | height: 100%; | 
| 171 | line-height: 18.4px; | 142 | float: left; | 
| 172 | cursor: pointer; | 143 | cursor: pointer; | 
| 173 | position: relative; | 144 | transition: background 0.3s; | 
| 174 | 145 | -webkit-tap-highlight-color: transparent; | |
| 175 | .item-box { | 146 | |
| 176 | position: absolute; | 147 | &:hover { | 
| 177 | top: -5px; | 148 | background: rgba(0, 0, 0, 0.025); | 
| 178 | left: 3px; | ||
| 179 | width: 100%; | ||
| 180 | min-width: 25px; | ||
| 181 | height: 25px; | ||
| 182 | cursor: pointer; | ||
| 183 | z-index: 100; | ||
| 184 | } | 149 | } | 
| 185 | } | 150 | } | 
| 186 | 151 | ||
| 187 | &:focus { | 152 | .breadcrumb-container { | 
| 188 | outline: none; | 153 | float: left; | 
| 189 | } | 154 | } | 
| 190 | 155 | ||
| 191 | .right-menu-item { | 156 | .right-menu { | 
| 192 | display: inline-block; | 157 | float: right; | 
| 193 | height: 100%; | 158 | height: 100%; | 
| 194 | font-size: 18px; | 159 | line-height: 50px; | 
| 195 | color: #fff; | 160 | display: flex; | 
| 196 | vertical-align: text-bottom; | 161 | align-items: center; | 
| 197 | 162 | ||
| 198 | &.hover-effect { | 163 | .function { | 
| 164 | margin: 0 15px; | ||
| 199 | cursor: pointer; | 165 | cursor: pointer; | 
| 200 | transition: background 0.3s; | 166 | } | 
| 201 | display: flex; | ||
| 202 | align-items: center; | ||
| 203 | 167 | ||
| 204 | &:hover { | 168 | .shutdown { | 
| 205 | background: rgba(0, 0, 0, 0.025); | 169 | font-size: 20px; | 
| 206 | } | 170 | margin-left: 15px; | 
| 171 | cursor: pointer; | ||
| 207 | } | 172 | } | 
| 208 | } | ||
| 209 | 173 | ||
| 210 | .avatar-wrapper { | 174 | .organization-item { | 
| 211 | position: relative; | 175 | margin-right: 40px; | 
| 212 | display: flex; | 176 | margin-top: -40px !important; | 
| 213 | height: 40px; | 177 | } | 
| 214 | align-items: center; | ||
| 215 | 178 | ||
| 216 | .user-avatar { | 179 | .item { | 
| 180 | margin-right: 40px; | ||
| 181 | margin-top: -20px; | ||
| 182 | line-height: 18.4px; | ||
| 217 | cursor: pointer; | 183 | cursor: pointer; | 
| 218 | width: 35px; | 184 | position: relative; | 
| 219 | height: 35px; | 185 | |
| 220 | border-radius: 50%; | 186 | .item-box { | 
| 187 | position: absolute; | ||
| 188 | top: -5px; | ||
| 189 | left: 3px; | ||
| 190 | width: 100%; | ||
| 191 | min-width: 25px; | ||
| 192 | height: 25px; | ||
| 193 | cursor: pointer; | ||
| 194 | z-index: 100; | ||
| 195 | } | ||
| 221 | } | 196 | } | 
| 222 | 197 | ||
| 223 | .el-icon-caret-bottom { | 198 | &:focus { | 
| 224 | cursor: pointer; | 199 | outline: none; | 
| 225 | position: absolute; | 200 | } | 
| 226 | right: -15px; | 201 | |
| 227 | top: 17px; | 202 | .right-menu-item { | 
| 228 | font-size: 12px; | 203 | display: inline-block; | 
| 204 | height: 100%; | ||
| 205 | font-size: 18px; | ||
| 206 | color: #fff; | ||
| 207 | vertical-align: text-bottom; | ||
| 208 | |||
| 209 | &.hover-effect { | ||
| 210 | cursor: pointer; | ||
| 211 | transition: background 0.3s; | ||
| 212 | display: flex; | ||
| 213 | align-items: center; | ||
| 214 | |||
| 215 | &:hover { | ||
| 216 | background: rgba(0, 0, 0, 0.025); | ||
| 217 | } | ||
| 218 | } | ||
| 219 | } | ||
| 220 | |||
| 221 | .avatar-wrapper { | ||
| 222 | position: relative; | ||
| 223 | display: flex; | ||
| 224 | height: 40px; | ||
| 225 | align-items: center; | ||
| 226 | |||
| 227 | .user-avatar { | ||
| 228 | cursor: pointer; | ||
| 229 | width: 35px; | ||
| 230 | height: 35px; | ||
| 231 | border-radius: 50%; | ||
| 232 | } | ||
| 233 | |||
| 234 | .el-icon-caret-bottom { | ||
| 235 | cursor: pointer; | ||
| 236 | position: absolute; | ||
| 237 | right: -15px; | ||
| 238 | top: 17px; | ||
| 239 | font-size: 12px; | ||
| 240 | } | ||
| 229 | } | 241 | } | 
| 230 | } | 242 | } | 
| 231 | } | 243 | } | 
| 232 | } | ||
| 233 | </style> | 244 | </style> | ... | ... | 
| 1 | <!-- | 1 | <!-- | 
| 2 | * @Description: | 2 | * @Description: | 
| 3 | * @Autor: renchao | 3 | * @Autor: renchao | 
| 4 | * @LastEditTime: 2023-03-06 16:18:21 | 4 | * @LastEditTime: 2023-03-06 16:18:21 | 
| 5 | --> | 5 | --> | 
| ... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ | 
| 9 | <el-menu router :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" | 9 | <el-menu router :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" | 
| 10 | :unique-opened="true" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical"> | 10 | :unique-opened="true" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical"> | 
| 11 | <!-- 权限菜单 --> | 11 | <!-- 权限菜单 --> | 
| 12 | <sidebar-item v-for="route in permission_routes.slice(3)" :key="route.path" :item="route" | 12 | <sidebar-item v-for="route in permission_routes.slice(4)" :key="route.path" :item="route" | 
| 13 | :base-path="route.path" /> | 13 | :base-path="route.path" /> | 
| 14 | <!-- 菜单全部展示 --> | 14 | <!-- 菜单全部展示 --> | 
| 15 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> | 15 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> | 
| ... | @@ -19,38 +19,42 @@ | ... | @@ -19,38 +19,42 @@ | 
| 19 | </template> | 19 | </template> | 
| 20 | 20 | ||
| 21 | <script> | 21 | <script> | 
| 22 | import { mapGetters } from 'vuex' | 22 | import { mapGetters } from 'vuex' | 
| 23 | import Logo from './Logo' | 23 | import Logo from './Logo' | 
| 24 | import defaultSettings from '@/settings' | 24 | import defaultSettings from '@/settings' | 
| 25 | import SidebarItem from './SidebarItem' | 25 | import SidebarItem from './SidebarItem' | 
| 26 | import variables from '@/styles/variables.scss' | 26 | import variables from '@/styles/variables.scss' | 
| 27 | import { asyncRoutes } from '@/router' | 27 | import { asyncRoutes } from '@/router' | 
| 28 | export default { | 28 | export default { | 
| 29 | components: { SidebarItem, Logo }, | 29 | components: { SidebarItem, Logo }, | 
| 30 | data () { | 30 | data () { | 
| 31 | return { | 31 | return { | 
| 32 | title: defaultSettings.title | 32 | title: defaultSettings.title | 
| 33 | } | ||
| 34 | }, | ||
| 35 | created () { | ||
| 36 | console.log(this.permission_routes); | ||
| 37 | }, | ||
| 38 | computed: { | ||
| 39 | ...mapGetters(['permission_routes', 'sidebar']), | ||
| 40 | activeMenu () { | ||
| 41 | const route = this.$route | ||
| 42 | const { meta, path } = route | ||
| 43 | if (meta.activeMenu) { | ||
| 44 | return meta.activeMenu | ||
| 45 | } | 33 | } | 
| 46 | return path | ||
| 47 | }, | 34 | }, | 
| 48 | variables () { | 35 | created () { | 
| 49 | return variables | 36 | console.log(this.permission_routes); | 
| 37 | }, | ||
| 38 | computed: { | ||
| 39 | ...mapGetters(['permission_routes', 'sidebar']), | ||
| 40 | activeMenu () { | ||
| 41 | const route = this.$route | ||
| 42 | const { meta, path } = route | ||
| 43 | if (meta.activeMenu) { | ||
| 44 | return meta.activeMenu | ||
| 45 | } | ||
| 46 | return path | ||
| 47 | }, | ||
| 48 | variables () { | ||
| 49 | return variables | ||
| 50 | }, | ||
| 51 | asyncRoutes () { | ||
| 52 | return asyncRoutes | ||
| 53 | } | ||
| 50 | }, | 54 | }, | 
| 51 | asyncRoutes () { | 55 | mounted () { | 
| 52 | return asyncRoutes | 56 | console.log("this. permission_routes", this.permission_routes); | 
| 57 | |||
| 53 | } | 58 | } | 
| 54 | } | 59 | } | 
| 55 | } | ||
| 56 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | 
| 60 | </script> | ... | ... | 
| 1 | <template> | 1 | <template> | 
| 2 | <div class="rightcard"> | 2 | <div class="rightcard"> | 
| 3 | <div class="card2 cardCon mt-10"> | ||
| 4 | <div class="cardhead">登记业务量</div> | ||
| 5 | <Rose /> | ||
| 6 | </div> | ||
| 7 | <div class="card1 cardCon d-center"> | 3 | <div class="card1 cardCon d-center"> | 
| 8 | <div class="cardhead">新建国有房屋信息</div> | 4 | <div class="cardhead">登记业务量</div> | 
| 9 | <div class="cardcontent" style="margin-top: .3646rem"> | 5 | <div class="cardcontent" style="margin-top: .3646rem"> | 
| 10 | <dv-scroll-board v-if="config.data.length > 0" :config="config" class="board" /> | 6 | <dv-scroll-board v-if="config.data.length > 0" :config="config" class="board" /> | 
| 11 | <div v-else class="nodata">暂无数据</div> | 7 | <div v-else class="nodata">暂无数据</div> | 
| 12 | </div> | 8 | </div> | 
| 13 | </div> | 9 | </div> | 
| 14 | 10 | <div class="card2 cardCon mt-10"> | |
| 11 | <div class="cardhead">新建国有房屋信息</div> | ||
| 12 | <Rose /> | ||
| 13 | </div> | ||
| 15 | <div class="card3 cardCon mt-10"> | 14 | <div class="card3 cardCon mt-10"> | 
| 16 | <div class="cardhead">登记类型总量</div> | 15 | <div class="cardhead">登记类型总量</div> | 
| 17 | <columnarsmat /> | 16 | <columnarsmat /> | 
| ... | @@ -30,7 +29,8 @@ | ... | @@ -30,7 +29,8 @@ | 
| 30 | headerBGC: '#016AC5', | 29 | headerBGC: '#016AC5', | 
| 31 | oddRowBGC: '#154295', | 30 | oddRowBGC: '#154295', | 
| 32 | evenRowBGC: '#154295', | 31 | evenRowBGC: '#154295', | 
| 33 | header: ['序号', '用途', '性质', '面积'], | 32 | header: ['序号', '业务名称', '登记业务量'], | 
| 33 | columnWidth: [120, 270, 140], | ||
| 34 | data: [], | 34 | data: [], | 
| 35 | key: 0 | 35 | key: 0 | 
| 36 | } | 36 | } | 
| ... | @@ -38,23 +38,38 @@ | ... | @@ -38,23 +38,38 @@ | 
| 38 | }, | 38 | }, | 
| 39 | components: { columnarsmat, Rose }, | 39 | components: { columnarsmat, Rose }, | 
| 40 | mounted () { | 40 | mounted () { | 
| 41 | this.addhousetotal(); | 41 | this.getdjywltotal(); | 
| 42 | window.addEventListener("resize", () => { | ||
| 43 | this.cdata.seriesData = []; | ||
| 44 | this.getdjywltotal(); | ||
| 45 | }); | ||
| 42 | // scroll(tableref.value.$refs.bodyWrapper);//设置滚动 | 46 | // scroll(tableref.value.$refs.bodyWrapper);//设置滚动 | 
| 43 | }, | 47 | }, | 
| 44 | methods: { | 48 | methods: { | 
| 45 | async addhousetotal () { | 49 | // 获取登记业务量玫瑰图数据 | 
| 50 | async getdjywltotal () { | ||
| 46 | try { | 51 | try { | 
| 47 | let { result: res } = await work.addhousetotal(); | 52 | let p = { | 
| 48 | res.map((item, index) => { | 53 | DJLX: "", | 
| 49 | return ( | 54 | QLLX: "", | 
| 50 | this.config.data.push([index, item.fwyt, item.fwxz, item.mj]) | 55 | XZQDM: "", | 
| 51 | ) | 56 | }; | 
| 57 | |||
| 58 | let res = await work.getdjywltotal(p); | ||
| 59 | res.result.map((item, index) => { | ||
| 60 | this.config.data.push([index, item.AREACODE, item.ywtotal]) | ||
| 61 | |||
| 52 | }); | 62 | }); | 
| 63 | |||
| 64 | // 遍历修改数组键,作为echars图表的参数 | ||
| 65 | |||
| 66 | |||
| 53 | } catch (error) { | 67 | } catch (error) { | 
| 54 | console.log("error", error); | 68 | console.log(error); | 
| 55 | } | 69 | } | 
| 56 | } | 70 | |
| 57 | } | 71 | }, | 
| 72 | }, | ||
| 58 | } | 73 | } | 
| 59 | </script> | 74 | </script> | 
| 60 | <style lang="scss" scoped> | 75 | <style lang="scss" scoped> | 
| ... | @@ -134,6 +149,7 @@ | ... | @@ -134,6 +149,7 @@ | 
| 134 | background: url("~@/image/djywl.png") no-repeat; | 149 | background: url("~@/image/djywl.png") no-repeat; | 
| 135 | background-size: 100% 100%; | 150 | background-size: 100% 100%; | 
| 136 | padding: 0.3825rem 0 0 0; | 151 | padding: 0.3825rem 0 0 0; | 
| 152 | overflow: hidden; | ||
| 137 | } | 153 | } | 
| 138 | 154 | ||
| 139 | .card3 { | 155 | .card3 { | ... | ... | 
| ... | @@ -105,6 +105,7 @@ export default { | ... | @@ -105,6 +105,7 @@ export default { | 
| 105 | // 初始化图表 | 105 | // 初始化图表 | 
| 106 | this.chartData.length && this.echartInit(this.chartData) | 106 | this.chartData.length && this.echartInit(this.chartData) | 
| 107 | }); | 107 | }); | 
| 108 | |||
| 108 | }, | 109 | }, | 
| 109 | // 重置 | 110 | // 重置 | 
| 110 | resetForm () { | 111 | resetForm () { | 
| ... | @@ -131,6 +132,7 @@ export default { | ... | @@ -131,6 +132,7 @@ export default { | 
| 131 | }, | 132 | }, | 
| 132 | grid: { | 133 | grid: { | 
| 133 | top: 120, | 134 | top: 120, | 
| 135 | bottom:100, | ||
| 134 | }, | 136 | }, | 
| 135 | xAxis: [ | 137 | xAxis: [ | 
| 136 | { | 138 | { | 
| ... | @@ -138,6 +140,7 @@ export default { | ... | @@ -138,6 +140,7 @@ export default { | 
| 138 | data: chartArr.map(item => item.recTypeName), | 140 | data: chartArr.map(item => item.recTypeName), | 
| 139 | axisLabel: { | 141 | axisLabel: { | 
| 140 | interval: 0, | 142 | interval: 0, | 
| 143 | rotate: 40, | ||
| 141 | formatter: function (val) { | 144 | formatter: function (val) { | 
| 142 | let c = document.createElement("canvas"); | 145 | let c = document.createElement("canvas"); | 
| 143 | const ctx = c.getContext("2d"); | 146 | const ctx = c.getContext("2d"); | ... | ... | 
| ... | @@ -60,7 +60,7 @@ | ... | @@ -60,7 +60,7 @@ | 
| 60 | getAction(api.subsystem, params).then((res) => { | 60 | getAction(api.subsystem, params).then((res) => { | 
| 61 | if (res.status === 1) { | 61 | if (res.status === 1) { | 
| 62 | console.log(" res.contentJJJGGG", res.content); | 62 | console.log(" res.contentJJJGGG", res.content); | 
| 63 | // this.productName = res.content[0].name; | 63 | this.productName = res.content[0].name; | 
| 64 | this.$store.dispatch("products/setData", res.content[0].code); | 64 | this.$store.dispatch("products/setData", res.content[0].code); | 
| 65 | sessionStorage.setItem("products", res.content[0].code) | 65 | sessionStorage.setItem("products", res.content[0].code) | 
| 66 | console.log("jjjggg的product"); | 66 | console.log("jjjggg的product"); | ... | ... | 
| ... | @@ -67,9 +67,8 @@ | ... | @@ -67,9 +67,8 @@ | 
| 67 | getAction(api.subsystem, params).then((res) => { | 67 | getAction(api.subsystem, params).then((res) => { | 
| 68 | if (res.status === 1) { | 68 | if (res.status === 1) { | 
| 69 | this.productName = res.content[0].name; | 69 | this.productName = res.content[0].name; | 
| 70 | // console.log(" res.contentSSSSSBBBBB", res.content); | ||
| 71 | this.$store.dispatch("products/setData", res.content[0].code); | 70 | this.$store.dispatch("products/setData", res.content[0].code); | 
| 72 | 71 | ||
| 73 | sessionStorage.setItem("products", res.content[0].code) | 72 | sessionStorage.setItem("products", res.content[0].code) | 
| 74 | } else { | 73 | } else { | 
| 75 | this.$message.error({ message: res.message, showClose: true }); | 74 | this.$message.error({ message: res.message, showClose: true }); | ... | ... | 
| ... | @@ -84,7 +84,7 @@ | ... | @@ -84,7 +84,7 @@ | 
| 84 | }, | 84 | }, | 
| 85 | mounted () { | 85 | mounted () { | 
| 86 | if (this.userInfo) { | 86 | if (this.userInfo) { | 
| 87 | this.getUserdata(this.userInfo) | 87 | this.getUserdata(this.userInfo.id) | 
| 88 | } | 88 | } | 
| 89 | this.sexList = [ | 89 | this.sexList = [ | 
| 90 | { | 90 | { | 
| ... | @@ -105,8 +105,8 @@ | ... | @@ -105,8 +105,8 @@ | 
| 105 | ] | 105 | ] | 
| 106 | }, | 106 | }, | 
| 107 | methods: { | 107 | methods: { | 
| 108 | getUserdata (p) { | 108 | getUserdata (id) { | 
| 109 | getAction(`${api.users}/${p.id}`).then((res) => { | 109 | getAction(`${api.users}/${id}`).then((res) => { | 
| 110 | if (res.status === 1) { | 110 | if (res.status === 1) { | 
| 111 | this.form = res.content | 111 | this.form = res.content | 
| 112 | } else { | 112 | } else { | 
| ... | @@ -135,7 +135,6 @@ | ... | @@ -135,7 +135,6 @@ | 
| 135 | <style scoped lang="scss"> | 135 | <style scoped lang="scss"> | 
| 136 | .user-info { | 136 | .user-info { | 
| 137 | margin: 0.1875rem 1.0417rem; | 137 | margin: 0.1875rem 1.0417rem; | 
| 138 | background: #ffffff; | ||
| 139 | overflow-y: auto; | 138 | overflow-y: auto; | 
| 140 | .form-wrapper { | 139 | .form-wrapper { | 
| 141 | padding: 0px 120px 0px; | 140 | padding: 0px 120px 0px; | 
| ... | @@ -156,7 +155,7 @@ | ... | @@ -156,7 +155,7 @@ | 
| 156 | } | 155 | } | 
| 157 | .bottom-wrapper { | 156 | .bottom-wrapper { | 
| 158 | padding: 0px 120px 0px; | 157 | padding: 0px 120px 0px; | 
| 159 | text-align: right; | 158 | text-align: center; | 
| 160 | } | 159 | } | 
| 161 | } | 160 | } | 
| 162 | </style> | 161 | </style> | ... | ... | 
| 1 | <!-- | 1 | <!-- | 
| 2 | * @Author: xiaomiao 1158771342@qq.com | 2 | * @Author: xiaomiao 1158771342@qq.com | 
| 3 | * @Date: 2023-03-08 15:30:43 | 3 | * @Date: 2023-03-08 15:30:43 | 
| 4 | * @LastEditors: xiaomiao 1158771342@qq.com | 4 | * @LastEditors: yangwei | 
| 5 | * @LastEditTime: 2023-03-08 16:33:50 | 5 | * @LastEditTime: 2023-03-13 17:19:46 | 
| 6 | * @FilePath: \监管系统\js-web-jianguan\src\views\system\information copy\index.vue | 6 | * @FilePath: \bdcjg-web\src\views\system\information\index.vue | 
| 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | 
| 8 | --> | 8 | --> | 
| 9 | <template> | 9 | <template> | 
| ... | @@ -15,8 +15,18 @@ | ... | @@ -15,8 +15,18 @@ | 
| 15 | </el-form-item> | 15 | </el-form-item> | 
| 16 | <el-row class="mb-5"> | 16 | <el-row class="mb-5"> | 
| 17 | <el-col :span="3" class="btnColRight"> | 17 | <el-col :span="3" class="btnColRight"> | 
| 18 | <btn nativeType="cx" @click="information">基本信息</btn> | 18 | <!-- <btn nativeType="cx" @click="information" | 
| 19 | <btn nativeType="cx" @click="password">修改密码</btn> | 19 | >基本信息</btn | 
| 20 | > | ||
| 21 | <btn nativeType="cx" :class="isshow ? '' : ''" @click="password" | ||
| 22 | >修改密码</btn | ||
| 23 | > --> | ||
| 24 | <button @click="information" :class="isshow ? 'button choosed' : 'button'"> | ||
| 25 | 基本信息 | ||
| 26 | </button> | ||
| 27 | <button @click="password" :class="isshow ? 'button' : 'button choosed'"> | ||
| 28 | 修改密码 | ||
| 29 | </button> | ||
| 20 | </el-col> | 30 | </el-col> | 
| 21 | </el-row> | 31 | </el-row> | 
| 22 | </el-form> | 32 | </el-form> | 
| ... | @@ -30,56 +40,69 @@ | ... | @@ -30,56 +40,69 @@ | 
| 30 | </div> | 40 | </div> | 
| 31 | </template> | 41 | </template> | 
| 32 | <script> | 42 | <script> | 
| 33 | import "@/utils/flexible.js"; | 43 | import "@/utils/flexible.js"; | 
| 34 | import BaseSet from "./base-set.vue"; | 44 | import BaseSet from "./base-set.vue"; | 
| 35 | import PasswordEdit from "./password-edit.vue"; | 45 | import PasswordEdit from "./password-edit.vue"; | 
| 36 | export default { | 46 | export default { | 
| 37 | components: { | 47 | components: { | 
| 38 | BaseSet, | 48 | BaseSet, | 
| 39 | PasswordEdit, | 49 | PasswordEdit, | 
| 50 | }, | ||
| 51 | data() { | ||
| 52 | return { | ||
| 53 | isshow: true, | ||
| 54 | }; | ||
| 55 | }, | ||
| 56 | computed: { | ||
| 57 | userData() { | ||
| 58 | return this.$store.state.user.userInfo; | ||
| 40 | }, | 59 | }, | 
| 41 | data () { | 60 | }, | 
| 42 | return { | 61 | watch: {}, | 
| 43 | isshow: true, | 62 | created() {}, | 
| 44 | }; | 63 | mounted() {}, | 
| 64 | methods: { | ||
| 65 | information() { | ||
| 66 | this.isshow = true; | ||
| 45 | }, | 67 | }, | 
| 46 | computed: { | 68 | password() { | 
| 47 | userData () { | 69 | this.isshow = false; | 
| 48 | return this.$store.state.user.userInfo; | ||
| 49 | }, | ||
| 50 | }, | 70 | }, | 
| 51 | watch: {}, | 71 | }, | 
| 52 | created () { }, | 72 | }; | 
| 53 | mounted () { | ||
| 54 | |||
| 55 | |||
| 56 | }, | ||
| 57 | methods: { | ||
| 58 | information () { | ||
| 59 | this.isshow = true; | ||
| 60 | }, | ||
| 61 | password () { | ||
| 62 | this.isshow = false; | ||
| 63 | }, | ||
| 64 | }, | ||
| 65 | }; | ||
| 66 | </script> | 73 | </script> | 
| 67 | 74 | ||
| 68 | <style scoped lang="scss"> | 75 | <style scoped lang="scss"> | 
| 69 | @import "~@/styles/mixin.scss"; | 76 | @import "~@/styles/mixin.scss"; | 
| 70 | @import "~@/styles/public.scss"; | 77 | @import "~@/styles/public.scss"; | 
| 71 | .information { | 78 | .information { | 
| 72 | /deep/.content { | 79 | display: flex; | 
| 73 | .el-input__inner { | 80 | flex-direction: column; | 
| 74 | background: none; | 81 | .btnColRight { | 
| 75 | } | 82 | .button { | 
| 76 | .user-info { | 83 | width: 76px; | 
| 77 | background: none; | 84 | height: 32px; | 
| 78 | } | 85 | color: #ffffff; | 
| 79 | 86 | margin: 0 5px; | |
| 80 | .boxin { | 87 | cursor: pointer; | 
| 81 | height: 79%; | 88 | border: 0; | 
| 82 | } | 89 | background: url('../../../image/btn.png') no-repeat 0 0; | 
| 90 | background-size: cover; | ||
| 83 | } | 91 | } | 
| 92 | .choosed{ | ||
| 93 | background: url('../../../image/btn.png') no-repeat 0 -34px; | ||
| 94 | } | ||
| 95 | } | ||
| 96 | /deep/.content { | ||
| 97 | .el-input__inner { | ||
| 98 | background: none; | ||
| 99 | } | ||
| 100 | .user-info { | ||
| 101 | background: none; | ||
| 102 | } | ||
| 103 | } | ||
| 104 | .boxin { | ||
| 105 | flex: 1; | ||
| 84 | } | 106 | } | 
| 107 | } | ||
| 85 | </style> | 108 | </style> | ... | ... | 
| ... | @@ -6,27 +6,31 @@ | ... | @@ -6,27 +6,31 @@ | 
| 6 | label-width="100px" | 6 | label-width="100px" | 
| 7 | :model="form" | 7 | :model="form" | 
| 8 | class="form-wrapper" | 8 | class="form-wrapper" | 
| 9 | :rules="rules"> | 9 | :rules="rules" | 
| 10 | > | ||
| 10 | <el-form-item label="旧密码:" prop="oldPassword"> | 11 | <el-form-item label="旧密码:" prop="oldPassword"> | 
| 11 | <el-input | 12 | <el-input | 
| 12 | v-model="form.oldPassword" | 13 | v-model="form.oldPassword" | 
| 13 | clearable | 14 | clearable | 
| 14 | type="password" | 15 | type="password" | 
| 15 | show-password /> | 16 | show-password | 
| 17 | /> | ||
| 16 | </el-form-item> | 18 | </el-form-item> | 
| 17 | <el-form-item label="新密码:" prop="newPassword"> | 19 | <el-form-item label="新密码:" prop="newPassword"> | 
| 18 | <el-input | 20 | <el-input | 
| 19 | v-model="form.newPassword" | 21 | v-model="form.newPassword" | 
| 20 | clearable | 22 | clearable | 
| 21 | type="password" | 23 | type="password" | 
| 22 | show-password /> | 24 | show-password | 
| 25 | /> | ||
| 23 | </el-form-item> | 26 | </el-form-item> | 
| 24 | <el-form-item label="确认密码:" prop="confirmPassword"> | 27 | <el-form-item label="确认密码:" prop="confirmPassword"> | 
| 25 | <el-input | 28 | <el-input | 
| 26 | v-model="form.confirmPassword" | 29 | v-model="form.confirmPassword" | 
| 27 | clearable | 30 | clearable | 
| 28 | type="password" | 31 | type="password" | 
| 29 | show-password /> | 32 | show-password | 
| 33 | /> | ||
| 30 | </el-form-item> | 34 | </el-form-item> | 
| 31 | </el-form> | 35 | </el-form> | 
| 32 | <div class="bottom-wrapper"> | 36 | <div class="bottom-wrapper"> | 
| ... | @@ -37,102 +41,100 @@ | ... | @@ -37,102 +41,100 @@ | 
| 37 | </template> | 41 | </template> | 
| 38 | 42 | ||
| 39 | <script> | 43 | <script> | 
| 40 | import { updateUserPassword } from "@/api/personnelManage"; | 44 | import { updateUserPassword } from "@/api/personnelManage"; | 
| 41 | export default { | 45 | export default { | 
| 42 | props: { | 46 | props: { | 
| 43 | userInfo: { | 47 | userInfo: { | 
| 44 | type: Object, | 48 | type: Object, | 
| 45 | default: null | 49 | default: null, | 
| 46 | } | ||
| 47 | }, | 50 | }, | 
| 48 | data () { | 51 | }, | 
| 49 | return { | 52 | data() { | 
| 50 | form: {}, | 53 | return { | 
| 51 | sexList: [], | 54 | form: {}, | 
| 52 | userId: '', | 55 | sexList: [], | 
| 53 | rules: { | 56 | userId: "", | 
| 54 | oldPassword: [ | 57 | rules: { | 
| 55 | { required: true, message: '旧密码不能为空', trigger: 'blur' } | 58 | oldPassword: [ | 
| 56 | ], | 59 | { required: true, message: "旧密码不能为空", trigger: "blur" }, | 
| 57 | newPassword: [ | 60 | ], | 
| 58 | { required: true, message: '新密码不能为空', trigger: 'blur' } | 61 | newPassword: [ | 
| 59 | ], | 62 | { required: true, message: "新密码不能为空", trigger: "blur" }, | 
| 60 | confirmPassword: [ | 63 | ], | 
| 61 | { required: true, message: '确认密码不能为空', trigger: 'blur' }, | 64 | confirmPassword: [ | 
| 62 | { validator: this.validatorConfirmPassword, trigger: 'blur' } | 65 | { required: true, message: "确认密码不能为空", trigger: "blur" }, | 
| 63 | ] | 66 | { validator: this.validatorConfirmPassword, trigger: "blur" }, | 
| 67 | ], | ||
| 68 | }, | ||
| 69 | }; | ||
| 70 | }, | ||
| 71 | computed: {}, | ||
| 72 | watch: { | ||
| 73 | userInfo: { | ||
| 74 | handler: function (val) { | ||
| 75 | if (val) { | ||
| 76 | this.getid(val); | ||
| 64 | } | 77 | } | 
| 65 | } | 78 | }, | 
| 66 | }, | 79 | }, | 
| 67 | computed: {}, | 80 | }, | 
| 68 | watch: { | 81 | mounted() { | 
| 69 | userInfo: { | 82 | if (this.userInfo) { | 
| 70 | handler: function (val) { | 83 | this.getid(this.userInfo); | 
| 71 | if (val) { | 84 | } | 
| 72 | this.getid(val) | 85 | }, | 
| 73 | } | 86 | methods: { | 
| 74 | } | 87 | getid(val) { | 
| 75 | } | 88 | this.userId = val.id; | 
| 76 | |||
| 77 | }, | 89 | }, | 
| 78 | mounted () { | 90 | validatorConfirmPassword(rule, value, callback) { | 
| 79 | if (this.userInfo) { | 91 | const { newPassword } = this.form; | 
| 80 | this.getid(this.userInfo) | 92 | if (value !== newPassword) { | 
| 93 | callback("两次输入密码不一致"); | ||
| 94 | } else { | ||
| 95 | callback(); | ||
| 81 | } | 96 | } | 
| 82 | }, | 97 | }, | 
| 83 | methods: { | 98 | updatePassword() { | 
| 84 | getid (val) { | 99 | this.$refs.form.validate((valid) => { | 
| 85 | this.userId = val.id | 100 | if (valid) { | 
| 86 | }, | 101 | const params = Object.assign({}, this.form, { id: this.userId }); | 
| 87 | validatorConfirmPassword (rule, value, callback) { | 102 | updateUserPassword(params).then((res) => { | 
| 88 | const { newPassword } = this.form | 103 | if (res.status === 1) { | 
| 89 | if (value !== newPassword) { | 104 | this.$message.success({ message: res.message, showClose: true }); | 
| 90 | callback('两次输入密码不一致') | 105 | } else { | 
| 91 | } else { | 106 | this.$message.error({ message: res.message, showClose: true }); | 
| 92 | callback() | 107 | } | 
| 108 | }); | ||
| 93 | } | 109 | } | 
| 94 | }, | 110 | }); | 
| 95 | updatePassword () { | 111 | }, | 
| 96 | this.$refs.form.validate((valid) => { | 112 | }, | 
| 97 | if (valid) { | 113 | }; | 
| 98 | const params = Object.assign({}, this.form, { id: this.userId }) | ||
| 99 | updateUserPassword(params).then((res) => { | ||
| 100 | if (res.status === 1) { | ||
| 101 | this.$message.success({ message: res.message, showClose: true }) | ||
| 102 | } else { | ||
| 103 | this.$message.error({ message: res.message, showClose: true }) | ||
| 104 | } | ||
| 105 | }) | ||
| 106 | } | ||
| 107 | }) | ||
| 108 | } | ||
| 109 | } | ||
| 110 | } | ||
| 111 | </script> | 114 | </script> | 
| 112 | 115 | ||
| 113 | <style scoped lang="scss"> | 116 | <style scoped lang="scss"> | 
| 114 | .user-info { | 117 | .user-info { | 
| 115 | margin: 36px 200px; | 118 | margin: 36px 200px; | 
| 116 | background: #ffffff; | 119 | overflow-y: auto; | 
| 117 | overflow-y: auto; | 120 | .form-wrapper { | 
| 118 | .form-wrapper { | 121 | padding: 24px 120px 0px; | 
| 119 | padding: 24px 120px 0px; | 122 | /deep/.el-form-item { | 
| 120 | /deep/.el-form-item { | 123 | margin-bottom: 24px; | 
| 121 | margin-bottom: 24px; | 124 | .el-form-item__label { | 
| 122 | .el-form-item__label { | 125 | color: #ffffff; | 
| 123 | color: #ffffff; | 126 | } | 
| 124 | } | 127 | .el-input .el-input__inner { | 
| 125 | .el-input .el-input__inner { | 128 | padding: 0 8px; | 
| 126 | padding: 0 8px; | 129 | height: 40px; | 
| 127 | height: 40px; | 130 | line-height: 40px; | 
| 128 | line-height: 40px; | 131 | border: 1px solid #6bc1fc; | 
| 129 | border: 1px solid #6bc1fc; | ||
| 130 | } | ||
| 131 | } | 132 | } | 
| 132 | } | 133 | } | 
| 133 | .bottom-wrapper { | ||
| 134 | padding: 32px 120px 24px; | ||
| 135 | text-align: right; | ||
| 136 | } | ||
| 137 | } | 134 | } | 
| 135 | .bottom-wrapper { | ||
| 136 | padding: 32px 120px 24px; | ||
| 137 | text-align: center; | ||
| 138 | } | ||
| 139 | } | ||
| 138 | </style> | 140 | </style> | ... | ... | 
| ... | @@ -38,6 +38,7 @@ | ... | @@ -38,6 +38,7 @@ | 
| 38 | import EditDialog from "./edit-dialog.vue"; | 38 | import EditDialog from "./edit-dialog.vue"; | 
| 39 | import Roleslistdiglog from "./roleslistdiglog.vue"; | 39 | import Roleslistdiglog from "./roleslistdiglog.vue"; | 
| 40 | import { mapGetters } from "vuex"; | 40 | import { mapGetters } from "vuex"; | 
| 41 | import {updateOrder} from "@/api/orders" | ||
| 41 | export default { | 42 | export default { | 
| 42 | name: "menus", | 43 | name: "menus", | 
| 43 | mixins: [tableMixin], | 44 | mixins: [tableMixin], | 
| ... | @@ -107,7 +108,7 @@ | ... | @@ -107,7 +108,7 @@ | 
| 107 | .concat([ | 108 | .concat([ | 
| 108 | { | 109 | { | 
| 109 | label: "排序", | 110 | label: "排序", | 
| 110 | width: 100, | 111 | width: 200, | 
| 111 | render: (h, scope) => { | 112 | render: (h, scope) => { | 
| 112 | return ( | 113 | return ( | 
| 113 | <div> | 114 | <div> | 
| ... | @@ -115,7 +116,16 @@ | ... | @@ -115,7 +116,16 @@ | 
| 115 | type="text" | 116 | type="text" | 
| 116 | disabled={scope.row.isTop} | 117 | disabled={scope.row.isTop} | 
| 117 | onClick={() => { | 118 | onClick={() => { | 
| 118 | this.moveUpward(scope.$index, scope.row); | 119 | this.updateOrder(scope.row,'TOP'); | 
| 120 | }} | ||
| 121 | > | ||
| 122 | 置顶 | ||
| 123 | </el-button> | ||
| 124 | <el-button | ||
| 125 | type="text" | ||
| 126 | disabled={scope.row.isTop} | ||
| 127 | onClick={() => { | ||
| 128 | this.updateOrder(scope.row,'UP'); | ||
| 119 | }} | 129 | }} | 
| 120 | > | 130 | > | 
| 121 | 上移 | 131 | 上移 | 
| ... | @@ -124,11 +134,20 @@ | ... | @@ -124,11 +134,20 @@ | 
| 124 | type="text" | 134 | type="text" | 
| 125 | disabled={scope.row.isBottom} | 135 | disabled={scope.row.isBottom} | 
| 126 | onClick={() => { | 136 | onClick={() => { | 
| 127 | this.moveDown(scope.$index, scope.row); | 137 | this.updateOrder(scope.row,'DOWN'); | 
| 128 | }} | 138 | }} | 
| 129 | > | 139 | > | 
| 130 | 下移 | 140 | 下移 | 
| 131 | </el-button> | 141 | </el-button> | 
| 142 | <el-button | ||
| 143 | type="text" | ||
| 144 | disabled={scope.row.isBottom} | ||
| 145 | onClick={() => { | ||
| 146 | this.updateOrder(scope.row,'BOTTOM'); | ||
| 147 | }} | ||
| 148 | > | ||
| 149 | 置底 | ||
| 150 | </el-button> | ||
| 132 | </div> | 151 | </div> | 
| 133 | ); | 152 | ); | 
| 134 | }, | 153 | }, | 
| ... | @@ -225,20 +244,10 @@ | ... | @@ -225,20 +244,10 @@ | 
| 225 | methods: { | 244 | methods: { | 
| 226 | // 获取角色列表 | 245 | // 获取角色列表 | 
| 227 | getTableData () { | 246 | getTableData () { | 
| 228 | let Builtinrole = []; | 247 | getRolesById([1,2]) | 
| 229 | let Publicrole = []; | ||
| 230 | |||
| 231 | getRolesById(1) | ||
| 232 | .then((res) => { | 248 | .then((res) => { | 
| 233 | Builtinrole = res.content; | 249 | this.listdata = res.content; | 
| 234 | getRolesById(2) | 250 | this.listdata = judgeSort(this.listdata); | 
| 235 | .then((res) => { | ||
| 236 | Publicrole = res.content; | ||
| 237 | |||
| 238 | this.listdata = Builtinrole.concat(Publicrole); | ||
| 239 | this.listdata = judgeSort(this.listdata); | ||
| 240 | }) | ||
| 241 | .catch((e) => console.error(e)); | ||
| 242 | }) | 251 | }) | 
| 243 | .catch((e) => console.error(e)); | 252 | .catch((e) => console.error(e)); | 
| 244 | }, | 253 | }, | 
| ... | @@ -397,20 +406,24 @@ | ... | @@ -397,20 +406,24 @@ | 
| 397 | this.$refs.addEditDialog.showAddEditDialog = true; | 406 | this.$refs.addEditDialog.showAddEditDialog = true; | 
| 398 | this.$refs.addEditDialog.dialogTitle = value.id ? "修改" : "新增"; | 407 | this.$refs.addEditDialog.dialogTitle = value.id ? "修改" : "新增"; | 
| 399 | }, | 408 | }, | 
| 400 | // 上移下移 | 409 | //排序 | 
| 401 | moveUpward (index, row) { | 410 | updateOrder(record, operate){ | 
| 402 | realMove(row.dictid, "UP", this.listdata); | 411 | const findIndex = this.listdata.findIndex(item => item.id === record.id) | 
| 403 | this.key++; | 412 | let swapId = '' | 
| 404 | let id = findParents(this.listdata, row.dictid); | 413 | if (operate === 'UP') { | 
| 405 | this.keyList = id; | 414 | swapId = this.listdata[findIndex - 1].id | 
| 406 | }, | 415 | } else if (operate === 'DOWN') { | 
| 407 | moveDown (index, row) { | 416 | swapId = this.listdata[findIndex + 1].id | 
| 408 | realMove(row.dictid, "DOWN", this.listdata); | 417 | } | 
| 409 | this.key++; | 418 | updateOrder('/rest/roles', record, operate, swapId).then(res => { | 
| 410 | let id = findParents(this.listdata, row.dictid); | 419 | if (res.status === 1) { | 
| 411 | this.keyList = id; | 420 | this.$message.success({ message: res.message, showClose: true }) | 
| 421 | this.getTableData(); | ||
| 422 | } else { | ||
| 423 | this.$message.error({ message: res.message, showClose: true }) | ||
| 424 | } | ||
| 425 | }) | ||
| 412 | }, | 426 | }, | 
| 413 | |||
| 414 | // 删除 | 427 | // 删除 | 
| 415 | handleDelete: function (id, content = "") { | 428 | handleDelete: function (id, content = "") { | 
| 416 | this.$confirm( | 429 | this.$confirm( | ... | ... | 
| ... | @@ -46,6 +46,7 @@ | ... | @@ -46,6 +46,7 @@ | 
| 46 | import { deleteDomStr } from '@/utils/proDomStr' | 46 | import { deleteDomStr } from '@/utils/proDomStr' | 
| 47 | import tableMixin from "@/mixins/tableMixin.js"; | 47 | import tableMixin from "@/mixins/tableMixin.js"; | 
| 48 | import EditDialog from "./edit-dialog.vue"; | 48 | import EditDialog from "./edit-dialog.vue"; | 
| 49 | import {updateOrder} from "@/api/orders" | ||
| 49 | export default { | 50 | export default { | 
| 50 | name: "menus", | 51 | name: "menus", | 
| 51 | mixins: [tableMixin], | 52 | mixins: [tableMixin], | 
| ... | @@ -109,7 +110,7 @@ | ... | @@ -109,7 +110,7 @@ | 
| 109 | }, | 110 | }, | 
| 110 | { | 111 | { | 
| 111 | label: "排序", | 112 | label: "排序", | 
| 112 | width: 100, | 113 | width: 200, | 
| 113 | render: (h, scope) => { | 114 | render: (h, scope) => { | 
| 114 | return ( | 115 | return ( | 
| 115 | <div> | 116 | <div> | 
| ... | @@ -117,7 +118,16 @@ | ... | @@ -117,7 +118,16 @@ | 
| 117 | type="text" | 118 | type="text" | 
| 118 | disabled={scope.row.isTop} | 119 | disabled={scope.row.isTop} | 
| 119 | onClick={() => { | 120 | onClick={() => { | 
| 120 | this.moveUpward(scope.$index, scope.row); | 121 | this.updateOrder(scope.row,'TOP'); | 
| 122 | }} | ||
| 123 | > | ||
| 124 | 置顶 | ||
| 125 | </el-button> | ||
| 126 | <el-button | ||
| 127 | type="text" | ||
| 128 | disabled={scope.row.isTop} | ||
| 129 | onClick={() => { | ||
| 130 | this.updateOrder(scope.row,'UP'); | ||
| 121 | }} | 131 | }} | 
| 122 | > | 132 | > | 
| 123 | 上移 | 133 | 上移 | 
| ... | @@ -126,11 +136,20 @@ | ... | @@ -126,11 +136,20 @@ | 
| 126 | type="text" | 136 | type="text" | 
| 127 | disabled={scope.row.isBottom} | 137 | disabled={scope.row.isBottom} | 
| 128 | onClick={() => { | 138 | onClick={() => { | 
| 129 | this.moveDown(scope.$index, scope.row); | 139 | this.updateOrder(scope.row,'DOWN'); | 
| 130 | }} | 140 | }} | 
| 131 | > | 141 | > | 
| 132 | 下移 | 142 | 下移 | 
| 133 | </el-button> | 143 | </el-button> | 
| 144 | <el-button | ||
| 145 | type="text" | ||
| 146 | disabled={scope.row.isBottom} | ||
| 147 | onClick={() => { | ||
| 148 | this.updateOrder(scope.row,'BOTTOM'); | ||
| 149 | }} | ||
| 150 | > | ||
| 151 | 置底 | ||
| 152 | </el-button> | ||
| 134 | </div> | 153 | </div> | 
| 135 | ); | 154 | ); | 
| 136 | }, | 155 | }, | 
| ... | @@ -257,18 +276,23 @@ | ... | @@ -257,18 +276,23 @@ | 
| 257 | }) | 276 | }) | 
| 258 | .catch(() => { }) | 277 | .catch(() => { }) | 
| 259 | }, | 278 | }, | 
| 260 | // 上移下移 | 279 | //排序 | 
| 261 | moveUpward (index, row) { | 280 | updateOrder(record, operate){ | 
| 262 | realMove(row.dictid, "UP", this.tableData.data); | 281 | const findIndex = this.tableData.data.findIndex(item => item.id === record.id) | 
| 263 | this.key++; | 282 | let swapId = '' | 
| 264 | let id = findParents(this.tableData.data, row.dictid); | 283 | if (operate === 'UP') { | 
| 265 | this.keyList = id; | 284 | swapId = this.tableData.data[findIndex - 1].id | 
| 266 | }, | 285 | } else if (operate === 'DOWN') { | 
| 267 | moveDown (index, row) { | 286 | swapId = this.tableData.data[findIndex + 1].id | 
| 268 | realMove(row.dictid, "DOWN", this.tableData.data); | 287 | } | 
| 269 | this.key++; | 288 | updateOrder('/rest/users', record, operate, swapId).then(res => { | 
| 270 | let id = findParents(this.tableData.data, row.dictid); | 289 | if (res.status === 1) { | 
| 271 | this.keyList = id; | 290 | this.$message.success({ message: res.message, showClose: true }) | 
| 291 | this.getTableList(); | ||
| 292 | } else { | ||
| 293 | this.$message.error({ message: res.message, showClose: true }) | ||
| 294 | } | ||
| 295 | }) | ||
| 272 | }, | 296 | }, | 
| 273 | // 修改人员信息 | 297 | // 修改人员信息 | 
| 274 | handleEdit (row) { | 298 | handleEdit (row) { | ... | ... | 
- 
Please register or sign in to post a comment
