Merge branch 'master' into dev
Showing
30 changed files
with
1066 additions
and
988 deletions
... | @@ -38,7 +38,7 @@ | ... | @@ -38,7 +38,7 @@ |
38 | "babel-plugin-dynamic-import-node": "2.3.3", | 38 | "babel-plugin-dynamic-import-node": "2.3.3", |
39 | "chalk": "2.4.2", | 39 | "chalk": "2.4.2", |
40 | "connect": "3.6.6", | 40 | "connect": "3.6.6", |
41 | "element-ui": "^2.15.8", | 41 | "element-ui": "^2.15.13", |
42 | "html-webpack-plugin": "3.2.0", | 42 | "html-webpack-plugin": "3.2.0", |
43 | "runjs": "4.3.2", | 43 | "runjs": "4.3.2", |
44 | "sass-loader": "8.0.2", | 44 | "sass-loader": "8.0.2", | ... | ... |
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> | ... | ... |
... | @@ -278,7 +278,7 @@ export default { | ... | @@ -278,7 +278,7 @@ export default { |
278 | let _this = this | 278 | let _this = this |
279 | // 上报请求头修改 | 279 | // 上报请求头修改 |
280 | try { | 280 | try { |
281 | var headRes = await axios.post(urlHeader + 'edit', this.dataReport, | 281 | var headRes = await axios.post('/api' + urlHeader + 'edit', this.dataReport, |
282 | { | 282 | { |
283 | headers: { | 283 | headers: { |
284 | 'Authorization': sessionStorage.getItem("token") || "" | 284 | 'Authorization': sessionStorage.getItem("token") || "" | ... | ... |
... | @@ -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> | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | overflow: hidden; | 2 | overflow: hidden; |
3 | background: url("~@/image/dialogBg.png") no-repeat !important; | 3 | background: url("~@/image/dialogBg.png") no-repeat !important; |
4 | background-size: 100% 100% !important; | 4 | background-size: 100% 100% !important; |
5 | min-height: 90vh; | 5 | // min-height: 90vh; |
6 | 6 | ||
7 | .dialog_title { | 7 | .dialog_title { |
8 | display: flex; | 8 | display: flex; |
... | @@ -98,6 +98,7 @@ | ... | @@ -98,6 +98,7 @@ |
98 | color: #B5D6DC; | 98 | color: #B5D6DC; |
99 | border-radius: 2px; | 99 | border-radius: 2px; |
100 | border: 1px solid #224C7C; | 100 | border: 1px solid #224C7C; |
101 | |||
101 | span { | 102 | span { |
102 | display: inline-block; | 103 | display: inline-block; |
103 | padding: 3px; | 104 | padding: 3px; |
... | @@ -155,7 +156,7 @@ | ... | @@ -155,7 +156,7 @@ |
155 | .el-dialog__body { | 156 | .el-dialog__body { |
156 | padding-top: 0; | 157 | padding-top: 0; |
157 | padding-bottom: 0; | 158 | padding-bottom: 0; |
158 | height: 95vh; | 159 | // height: 95vh; |
159 | } | 160 | } |
160 | 161 | ||
161 | .el-dialog__headerbtn { | 162 | .el-dialog__headerbtn { | ... | ... |
... | @@ -149,7 +149,7 @@ export function getCurrentDate (date = 'firstDay') { | ... | @@ -149,7 +149,7 @@ export function getCurrentDate (date = 'firstDay') { |
149 | 149 | ||
150 | export function setExport2Excel (exportName) { | 150 | export function setExport2Excel (exportName) { |
151 | /* generate workbook object from table */ | 151 | /* generate workbook object from table */ |
152 | var wb = XLSX2.utils.table_to_sheet(document.querySelector("#mytable"));//mytable为表格的id名 | 152 | var wb = XLSX2.utils.table_to_sheet(document.querySelector("#mytable"), { raw: true });//mytable为表格的id名 |
153 | if (!wb['!merges']) { | 153 | if (!wb['!merges']) { |
154 | this.$message.warning('无法导出:报表无数据'); | 154 | this.$message.warning('无法导出:报表无数据'); |
155 | return | 155 | return | ... | ... |
... | @@ -43,19 +43,23 @@ class data extends filter { | ... | @@ -43,19 +43,23 @@ class data extends filter { |
43 | // }, | 43 | // }, |
44 | { | 44 | { |
45 | label: "查封机关", | 45 | label: "查封机关", |
46 | prop: "cfjg" | 46 | prop: "cfjg", |
47 | minWidth: 150, | ||
47 | }, | 48 | }, |
48 | { | 49 | { |
49 | label: "查封文号", | 50 | label: "查封文号", |
50 | prop: "cfwh" | 51 | prop: "cfwh", |
52 | minWidth: 130, | ||
51 | }, | 53 | }, |
52 | { | 54 | { |
53 | label: "解封机关", | 55 | label: "解封机关", |
54 | prop: "jfjg" | 56 | prop: "jfjg", |
57 | width: 150, | ||
55 | }, | 58 | }, |
56 | { | 59 | { |
57 | label: "解封文号", | 60 | label: "解封文号", |
58 | prop: "jfwh" | 61 | prop: "jfwh", |
62 | minWidth: 130, | ||
59 | }, | 63 | }, |
60 | 64 | ||
61 | { | 65 | { | ... | ... |
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 { | ... | ... |
... | @@ -78,6 +78,7 @@ export default { | ... | @@ -78,6 +78,7 @@ export default { |
78 | endTime: timeFormat(new Date(), true), | 78 | endTime: timeFormat(new Date(), true), |
79 | qxdm: "", | 79 | qxdm: "", |
80 | }, | 80 | }, |
81 | interval: 50 | ||
81 | }; | 82 | }; |
82 | }, | 83 | }, |
83 | mounted () { | 84 | mounted () { |
... | @@ -100,6 +101,10 @@ export default { | ... | @@ -100,6 +101,10 @@ export default { |
100 | this.form.qxdm | 101 | this.form.qxdm |
101 | ); | 102 | ); |
102 | this.chartData = res; | 103 | this.chartData = res; |
104 | console.log(this.chartData); | ||
105 | |||
106 | let maxData = Math.max.apply(Math, this.chartData.map(item => { return item.failure })) | ||
107 | this.interval = Math.ceil(maxData / 10) | ||
103 | //行政区代码过滤 | 108 | //行政区代码过滤 |
104 | res.length > 0 && | 109 | res.length > 0 && |
105 | res.forEach((item) => { | 110 | res.forEach((item) => { |
... | @@ -191,7 +196,7 @@ export default { | ... | @@ -191,7 +196,7 @@ export default { |
191 | color: "#fff", | 196 | color: "#fff", |
192 | fontSize: "16", | 197 | fontSize: "16", |
193 | }, | 198 | }, |
194 | interval: 50, | 199 | // interval: this.interval, |
195 | axisLabel: { | 200 | axisLabel: { |
196 | formatter: "{value}", | 201 | formatter: "{value}", |
197 | textStyle: { | 202 | textStyle: { | ... | ... |
... | @@ -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"); |
... | @@ -185,6 +188,7 @@ export default { | ... | @@ -185,6 +188,7 @@ export default { |
185 | }, | 188 | }, |
186 | }, | 189 | }, |
187 | ], | 190 | ], |
191 | |||
188 | series: [ | 192 | series: [ |
189 | { | 193 | { |
190 | type: "bar", | 194 | type: "bar", | ... | ... |
... | @@ -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 }); | ... | ... |
... | @@ -17,4 +17,9 @@ | ... | @@ -17,4 +17,9 @@ |
17 | 17 | ||
18 | .export-excel-wrapper { | 18 | .export-excel-wrapper { |
19 | display: inline-block; | 19 | display: inline-block; |
20 | } | ||
21 | |||
22 | /deep/.el-table--group, | ||
23 | .el-table--border { | ||
24 | border: 1px solid #458ACF !important; | ||
20 | } | 25 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -87,7 +87,10 @@ class data extends filter { | ... | @@ -87,7 +87,10 @@ class data extends filter { |
87 | prop: 'failReportRatio24To48h', | 87 | prop: 'failReportRatio24To48h', |
88 | render: (h, scope) => { | 88 | render: (h, scope) => { |
89 | return ( | 89 | return ( |
90 | <span>{(scope.row.failReportRatio24To48h * 100).toFixed(2)}%</span> | 90 | <div> |
91 | <span>{(scope.row.failReportRatio24To48h * 100).toFixed(2)}</span> | ||
92 | % | ||
93 | </div> | ||
91 | ); | 94 | ); |
92 | }, | 95 | }, |
93 | } | 96 | } | ... | ... |
... | @@ -173,5 +173,9 @@ export default { | ... | @@ -173,5 +173,9 @@ export default { |
173 | // 引入表单整体样式 | 173 | // 引入表单整体样式 |
174 | // @import "~@/styles/public.scss"; | 174 | // @import "~@/styles/public.scss"; |
175 | @import "../css/index.scss"; | 175 | @import "../css/index.scss"; |
176 | |||
177 | /deep/th.el-table__cell { | ||
178 | height: 0 !important; | ||
179 | } | ||
176 | </style> | 180 | </style> |
177 | 181 | ... | ... |
... | @@ -14,13 +14,11 @@ class data extends filter { | ... | @@ -14,13 +14,11 @@ class data extends filter { |
14 | label: '分项', | 14 | label: '分项', |
15 | children: [ | 15 | children: [ |
16 | { | 16 | { |
17 | width:1 | ||
18 | }, | ||
19 | { | ||
20 | label: '国有建设用地使用权登记得分及空项率', | 17 | label: '国有建设用地使用权登记得分及空项率', |
21 | children: [ | 18 | children: [ |
22 | { | 19 | { |
23 | prop: 'gyjsydsyqRate', | 20 | prop: 'gyjsydsyqRate', |
21 | width: 150, | ||
24 | render: (h, scope) => { | 22 | render: (h, scope) => { |
25 | return ( | 23 | return ( |
26 | <span>{scope.row.gyjsydsyqRate.toFixed(2)}</span> | 24 | <span>{scope.row.gyjsydsyqRate.toFixed(2)}</span> |
... | @@ -29,6 +27,7 @@ class data extends filter { | ... | @@ -29,6 +27,7 @@ class data extends filter { |
29 | }, | 27 | }, |
30 | { | 28 | { |
31 | prop: 'gyjsydsyqRadio', | 29 | prop: 'gyjsydsyqRadio', |
30 | width: 150, | ||
32 | render: (h, scope) => { | 31 | render: (h, scope) => { |
33 | return ( | 32 | return ( |
34 | <span>{(scope.row.gyjsydsyqRadio * 100).toFixed(2)}%</span> | 33 | <span>{(scope.row.gyjsydsyqRadio * 100).toFixed(2)}%</span> | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Author: yangwei | 2 | * @Author: yangwei |
3 | * @Date: 2023-02-17 16:32:50 | 3 | * @Date: 2023-02-17 16:32:50 |
4 | * @LastEditors: yangwei | 4 | * @LastEditors: Please set LastEditors |
5 | * @LastEditTime: 2023-03-09 11:19:43 | 5 | * @LastEditTime: 2023-03-14 13:19:18 |
6 | * @FilePath: \bdcjg-web\src\views\statistics\registerBookQuality\index.vue | 6 | * @FilePath: \bdcjg-web\src\views\statistics\registerBookQuality\index.vue |
7 | * @Description: | 7 | * @Description: |
8 | * | 8 | * |
... | @@ -21,12 +21,12 @@ | ... | @@ -21,12 +21,12 @@ |
21 | <el-col :span="6"> | 21 | <el-col :span="6"> |
22 | <el-form-item label="接收日期" prop="startTime"> | 22 | <el-form-item label="接收日期" prop="startTime"> |
23 | <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart" | 23 | <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart" |
24 | v-model="form.startTime" value-format="yyyy-MM-dd"></el-date-picker> | 24 | v-model="form.startTime" value-format="yyyy-MM-dd"></el-date-picker> |
25 | </el-form-item> | 25 | </el-form-item> |
26 | </el-col> | 26 | </el-col> |
27 | <el-col :span="6"> | 27 | <el-col :span="6"> |
28 | <el-form-item label="至" prop="endTime" label-width="35px"> | 28 | <el-form-item label="至" prop="endTime" label-width="35px"> |
29 | <el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd" | 29 | <el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd" |
30 | v-model="form.endTime" value-format="yyyy-MM-dd"></el-date-picker> | 30 | v-model="form.endTime" value-format="yyyy-MM-dd"></el-date-picker> |
31 | </el-form-item> | 31 | </el-form-item> |
32 | </el-col> | 32 | </el-col> |
... | @@ -43,10 +43,11 @@ | ... | @@ -43,10 +43,11 @@ |
43 | </div> | 43 | </div> |
44 | <!-- 列表区域 --> | 44 | <!-- 列表区域 --> |
45 | <div class="from-clues-content"> | 45 | <div class="from-clues-content"> |
46 | <lb-table ref="table" :pagination="false" :header-cell-style="headerStyle" :column="tableData.columns" :data="tableData.data"> | 46 | <lb-table ref="table" :pagination="false" :border="true" :header-cell-style="headerStyle" |
47 | :column="tableData.columns" :data="tableData.data"> | ||
47 | </lb-table> | 48 | </lb-table> |
48 | <down-lb-table ref="table" v-show="false" :id="'mytable'" :downExcel="true" :pagination="false" | 49 | <down-lb-table ref="table" v-show="false" :id="'mytable'" :header-cell-style="headerStyle1" :downExcel="true" |
49 | :column="tableData.columns" :data="tableData.data" :downTitle="downTitle"> | 50 | :pagination="false" :column="tableData.columns" :data="tableData.data" :downTitle="downTitle"> |
50 | </down-lb-table> | 51 | </down-lb-table> |
51 | </div> | 52 | </div> |
52 | </div> | 53 | </div> |
... | @@ -138,6 +139,17 @@ export default { | ... | @@ -138,6 +139,17 @@ export default { |
138 | this.handleResetForm() | 139 | this.handleResetForm() |
139 | this.generateFileName() | 140 | this.generateFileName() |
140 | }, | 141 | }, |
142 | mounted () { | ||
143 | this.$nextTick(function () { | ||
144 | let c = document.getElementsByClassName("el-table__header") | ||
145 | let k = c[0].getElementsByClassName("is-group has-gutter"); | ||
146 | let f = k[0].children | ||
147 | let d = f[1].getElementsByClassName("el-table__cell") | ||
148 | let p = d[0] | ||
149 | p.setAttribute("rowspan", 2) | ||
150 | }) | ||
151 | |||
152 | }, | ||
141 | methods: { | 153 | methods: { |
142 | handleSearch () { }, | 154 | handleSearch () { }, |
143 | // 生成文件名 | 155 | // 生成文件名 |
... | @@ -150,15 +162,16 @@ export default { | ... | @@ -150,15 +162,16 @@ export default { |
150 | }, | 162 | }, |
151 | headerStyle ({ row, rowIndex }) { | 163 | headerStyle ({ row, rowIndex }) { |
152 | if (rowIndex == 1) { | 164 | if (rowIndex == 1) { |
153 | row[0].colSpan = 2 | 165 | row.forEach(item => { |
154 | row.forEach(item=>{ | 166 | item.rowSpan = 2 |
167 | }) | ||
168 | } | ||
169 | }, | ||
170 | headerStyle1 ({ row, rowIndex }) { | ||
171 | if (rowIndex == 2) { | ||
172 | row.forEach(item => { | ||
155 | item.rowSpan = 2 | 173 | item.rowSpan = 2 |
156 | }) | 174 | }) |
157 | // row[0].rowSpan = 2; | ||
158 | // row[1].rowSpan = 2; | ||
159 | // row[2].rowSpan = 2; | ||
160 | // row[3].rowSpan = 2; | ||
161 | // row[4].rowSpan = 2; | ||
162 | } | 175 | } |
163 | }, | 176 | }, |
164 | // 初始化数据 | 177 | // 初始化数据 |
... | @@ -181,5 +194,9 @@ export default { | ... | @@ -181,5 +194,9 @@ export default { |
181 | // 引入表单整体样式 | 194 | // 引入表单整体样式 |
182 | // @import "~@/styles/public.scss"; | 195 | // @import "~@/styles/public.scss"; |
183 | @import "../css/index.scss"; | 196 | @import "../css/index.scss"; |
197 | |||
198 | /deep/.el-table thead.is-group th.el-table__cell { | ||
199 | height: 14px !important; | ||
200 | } | ||
184 | </style> | 201 | </style> |
185 | 202 | ... | ... |
... | @@ -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> | ... | ... |
1 | <template> | 1 | <template> |
2 | <div> | 2 | <dialogBox class="modifydialog" :isMain="true" :title="2222" @closeDialog="close" @submitForm="submitForm" v-model="myValue"> |
3 | <Dialog class="modifydialog" :title="title" :show.sync="visible" :width="'767px'" @close="close()"> | 3 | <div class="modifydialog-con"> |
4 | <template slot="content"> | 4 | <el-form ref="form" :model="form" :rules="rules"> |
5 | <el-form ref="form" :model="form" :rules="rules"> | 5 | <el-row :gutter="24"> |
6 | <el-row :gutter="24"> | 6 | <el-col :span="12"> |
7 | <el-col :span="12"> | 7 | <el-form-item label="菜单名称:" prop="name" label-width="124px"> |
8 | <el-form-item label="菜单名称:" prop="name" label-width="124px"> | 8 | <el-input v-model="form.name" placeholder="请输入菜单名称" /> |
9 | <el-input v-model="form.name" placeholder="请输入菜单名称" /> | 9 | </el-form-item> |
10 | </el-form-item> | 10 | </el-col> |
11 | </el-col> | 11 | </el-row> |
12 | </el-row> | 12 | <el-row :gutter="24"> |
13 | <el-row :gutter="24"> | 13 | <el-col :span="12"> |
14 | <el-col :span="12"> | 14 | <el-form-item label="上级菜单:" label-width="124px"> |
15 | <el-form-item label="上级菜单:" label-width="124px"> | 15 | <el-cascader :key="menuKey" v-model="form.parentId" :options="parentMenuList" :props="setProps" |
16 | <el-cascader :key="menuKey" v-model="form.parentId" :options="parentMenuList" :props="setProps" | 16 | placeholder="请选择上级菜单" clearable @change="handleChange" /> |
17 | placeholder="请选择上级菜单" clearable @change="handleChange" /> | 17 | </el-form-item> |
18 | </el-form-item> | 18 | </el-col> |
19 | </el-col> | ||
20 | 19 | ||
21 | </el-row> | 20 | </el-row> |
22 | <el-row :gutter="24"> | 21 | <el-row :gutter="24"> |
23 | <el-col :span="24"> | 22 | <el-col :span="24"> |
24 | <el-form-item label="代码:" prop="code" label-width="124px"> | 23 | <el-form-item label="代码:" prop="code" label-width="124px"> |
25 | <el-input v-model="codeComputed" placeholder="请输入菜单代码" :disabled="type === 1" /> | 24 | <el-input v-model="codeComputed" placeholder="请输入菜单代码" :disabled="type === 1" /> |
26 | </el-form-item> | 25 | </el-form-item> |
27 | </el-col> | 26 | </el-col> |
28 | </el-row> | 27 | </el-row> |
29 | <el-row :gutter="24"> | 28 | <el-row :gutter="24"> |
30 | <el-col :span="24"> | 29 | <el-col :span="24"> |
31 | <el-form-item label="链接路径:" label-width="124px"> | 30 | <el-form-item label="链接路径:" label-width="124px"> |
32 | <el-input v-model="form.uri" placeholder="请输入链接路径" /> | 31 | <el-input v-model="form.uri" placeholder="请输入链接路径" /> |
33 | </el-form-item> | 32 | </el-form-item> |
34 | </el-col> | 33 | </el-col> |
35 | </el-row> | 34 | </el-row> |
36 | <el-row :gutter="24"> | 35 | <el-row :gutter="24"> |
37 | <el-col :span="24"> | 36 | <el-col :span="24"> |
38 | <el-form-item label="浏览器跳转模式:" label-width="124px"> | 37 | <el-form-item label="浏览器跳转模式:" label-width="124px"> |
39 | <el-select v-model="form.jumpMode" placeholder="请选择浏览器跳转模式"> | 38 | <el-select v-model="form.jumpMode" placeholder="请选择浏览器跳转模式"> |
40 | <el-option v-for="item in jumpModeList" :key="item.value" :label="item.name" :value="item.value" /> | 39 | <el-option v-for="item in jumpModeList" :key="item.value" :label="item.name" :value="item.value" /> |
41 | </el-select> | 40 | </el-select> |
42 | </el-form-item> | 41 | </el-form-item> |
43 | </el-col> | 42 | </el-col> |
44 | </el-row> | 43 | </el-row> |
45 | <el-row :gutter="24"> | 44 | <el-row :gutter="24"> |
46 | <el-col :span="24"> | 45 | <el-col :span="24"> |
47 | <el-form-item label="配置参数:" label-width="124px" class="form-item-mb0"> | 46 | <el-form-item label="配置参数:" label-width="124px" class="form-item-mb0"> |
48 | <!-- 配置参数 --> | 47 | <!-- 配置参数 --> |
49 | <JsonEditor :result-infos="form.metadata" @getJsonString="getJsonString" /> | 48 | <JsonEditor :result-infos="form.metadata" @getJsonString="getJsonString" /> |
50 | </el-form-item> | 49 | </el-form-item> |
51 | </el-col> | 50 | </el-col> |
52 | </el-row> | 51 | </el-row> |
53 | </el-form> | 52 | </el-form> |
54 | </template> | 53 | </div> |
55 | <template slot="footer"> | 54 | </dialogBox> |
56 | <el-button class="cancel-button" @click="close()">取消</el-button> | ||
57 | |||
58 | <el-button type="primary" @click="submitForm()">保存</el-button> | ||
59 | </template> | ||
60 | </Dialog> | ||
61 | <!-- 图标列表 --> | ||
62 | <IconList ref="iconList" @iconName="getIconName" /> | ||
63 | </div> | ||
64 | </template> | 55 | </template> |
65 | 56 | ||
66 | <script> | 57 | <script> |
67 | import Dialog from "@/components/Dialog/"; | 58 | import { getParentMenuListAction } from '@/api/authorityManage' |
68 | import { getParentMenuListAction } from '@/api/authorityManage' | 59 | import JsonEditor from '@/components/JsonEditors' |
69 | import JsonEditor from '@/components/JsonEditors' | 60 | import { validateCode } from '@/utils/validate'; |
70 | import IconList from '@/components/IconList' | 61 | import { api, httpAction } from '@/api/manageApi' |
71 | import { validateCode } from '@/utils/validate'; | 62 | export default { |
72 | import { api, httpAction } from '@/api/manageApi' | 63 | name: 'MenuModal', |
73 | export default { | 64 | components: { |
74 | name: 'MenuModal', | 65 | JsonEditor, |
75 | components: { | 66 | }, |
76 | IconList, | 67 | props: { |
77 | JsonEditor, | 68 | value: { type: Boolean, default: false }, |
78 | Dialog | 69 | productId: { |
79 | }, | 70 | type: String, |
80 | props: { | 71 | default: '' |
81 | productId: { | 72 | } |
82 | type: String, | 73 | }, |
83 | default: '' | 74 | data () { |
75 | return { | ||
76 | myValue: this.value, | ||
77 | form: { | ||
78 | icon: '', | ||
79 | code: '' | ||
80 | }, | ||
81 | rules: { | ||
82 | name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }], | ||
83 | code: [ | ||
84 | { required: true, message: '必填', trigger: 'blur' }, | ||
85 | { validator: validateCode, trigger: 'blur' } | ||
86 | ] | ||
87 | }, | ||
88 | title: '', | ||
89 | type: '', | ||
90 | visible: false, | ||
91 | parentMenuList: [], | ||
92 | menuKey: 0, | ||
93 | jumpModeList: [ | ||
94 | { name: '在当前页面显示', value: 1 }, | ||
95 | { name: '跳转到新页面', value: 2 } | ||
96 | ], | ||
97 | setProps: { | ||
98 | value: 'id', | ||
99 | label: 'name', | ||
100 | children: 'children', | ||
101 | expandTrigger: 'hover', | ||
102 | checkStrictly: true, // 可取消关联,选择任意一级选项 | ||
103 | emitPath: false | ||
104 | }, | ||
105 | dataUrl: api.menus | ||
106 | } | ||
107 | }, | ||
108 | computed: { | ||
109 | codeComputed: { | ||
110 | get: function () { | ||
111 | return this.form.code | ||
112 | }, | ||
113 | set: function (val) { | ||
114 | this.form.code = val.toUpperCase() | ||
84 | } | 115 | } |
116 | } | ||
117 | }, | ||
118 | watch: { | ||
119 | value (val) { | ||
120 | this.myValue = val | ||
121 | } | ||
122 | }, | ||
123 | methods: { | ||
124 | // 获取父级菜单 | ||
125 | getParentMenuList (id) { | ||
126 | |||
127 | getParentMenuListAction(id).then((res) => { | ||
128 | if (res.status === 1) { | ||
129 | const list = this.$dealArrChildren(res.content) | ||
130 | if (id) { | ||
131 | this.parentMenuList = this.$dealArrDisabled( | ||
132 | this.$deepCopy(list), | ||
133 | id | ||
134 | ) | ||
135 | this.menuKey++ | ||
136 | } else { | ||
137 | this.parentMenuList = list | ||
138 | } | ||
139 | } else { | ||
140 | this.$message.error({ message: res.message, showClose: true }) | ||
141 | } | ||
142 | }) | ||
85 | }, | 143 | }, |
86 | data () { | 144 | getIconList () { |
87 | return { | 145 | this.$refs.iconList.show(true) |
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 | }, | 146 | }, |
119 | computed: { | 147 | getIconName (data) { |
120 | codeComputed: { | 148 | this.form.icon = data |
121 | get: function () { | 149 | }, |
122 | return this.form.code | 150 | // 配置参数 |
123 | }, | 151 | getJsonString (data) { |
124 | set: function (val) { | 152 | this.form.metadata = data |
125 | this.form.code = val.toUpperCase() | 153 | }, |
126 | } | 154 | // 新增菜单 |
155 | add () { | ||
156 | this.getParentMenuList(this.productId) | ||
157 | this.type = 0 | ||
158 | this.form.jumpMode = 1 | ||
159 | }, | ||
160 | // 编辑菜单 | ||
161 | edit (record) { | ||
162 | this.type = 1 | ||
163 | // 若有id为编辑 | ||
164 | if (record.id) { | ||
165 | this.$nextTick(() => { | ||
166 | this.form = Object.assign({}, record) | ||
167 | this.getParentMenuList(this.productId) | ||
168 | }) | ||
127 | } | 169 | } |
128 | }, | 170 | }, |
129 | created () { }, | 171 | // 选择上级菜单 |
130 | mounted () { }, | 172 | handleChange (value) { |
131 | methods: { | 173 | this.form.parentId = value |
132 | // 获取父级菜单 | 174 | }, |
133 | getParentMenuList (id) { | 175 | // 保存 |
134 | 176 | submitForm (submitType) { | |
135 | getParentMenuListAction(id).then((res) => { | 177 | this.$refs.form.validate((valid) => { |
136 | if (res.status === 1) { | 178 | if (valid) { |
137 | const list = this.$dealArrChildren(res.content) | 179 | let method = '' |
138 | if (id) { | 180 | let url = '' |
139 | this.parentMenuList = this.$dealArrDisabled( | 181 | const formData = this.form |
140 | this.$deepCopy(list), | 182 | formData.productId = this.productId |
141 | id | 183 | if (!formData.id) { |
142 | ) | 184 | method = 'post' |
143 | this.menuKey++ | 185 | url = this.dataUrl |
144 | } else { | ||
145 | this.parentMenuList = list | ||
146 | } | ||
147 | } else { | 186 | } else { |
148 | this.$message.error({ message: res.message, showClose: true }) | 187 | method = 'put' |
188 | url = `${this.dataUrl}/${formData.id}` | ||
149 | } | 189 | } |
150 | }) | 190 | debugger |
151 | }, | 191 | httpAction(url, formData, method) |
152 | getIconList () { | 192 | .then((res) => { |
153 | this.$refs.iconList.show(true) | 193 | if (res.status === 1) { |
154 | }, | 194 | this.$message.success({ |
155 | getIconName (data) { | 195 | message: res.message, |
156 | this.form.icon = data | 196 | showClose: true |
157 | }, | 197 | }) |
158 | // 配置参数 | ||
159 | getJsonString (data) { | ||
160 | this.form.metadata = data | ||
161 | }, | ||
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 | }) | ||
178 | } | ||
179 | this.visible = true | ||
180 | }, | ||
181 | // 选择上级菜单 | ||
182 | handleChange (value) { | ||
183 | this.form.parentId = value | ||
184 | }, | ||
185 | // 保存 | ||
186 | submitForm (submitType) { | ||
187 | this.$refs.form.validate((valid) => { | ||
188 | if (valid) { | ||
189 | let method = '' | ||
190 | let url = '' | ||
191 | const formData = this.form | ||
192 | formData.productId = this.productId | ||
193 | if (!formData.id) { | ||
194 | method = 'post' | ||
195 | url = this.dataUrl | ||
196 | } else { | ||
197 | method = 'put' | ||
198 | url = `${this.dataUrl}/${formData.id}` | ||
199 | } | ||
200 | debugger | ||
201 | httpAction(url, formData, method) | ||
202 | .then((res) => { | ||
203 | if (res.status === 1) { | ||
204 | this.$message.success({ | ||
205 | message: res.message, | ||
206 | showClose: true | ||
207 | }) | ||
208 | 198 | ||
209 | this.resetForm() | 199 | this.resetForm() |
210 | this.$emit('ok') | 200 | this.$emit('ok') |
211 | } else { | 201 | } else { |
212 | this.$message.error({ message: res.message, showClose: true }) | 202 | this.$message.error({ message: res.message, showClose: true }) |
213 | } | 203 | } |
214 | }) | 204 | }) |
215 | .catch((err) => { | 205 | .catch((err) => { |
216 | console.log(err) | 206 | console.log(err) |
217 | }) | 207 | }) |
218 | } | ||
219 | }) | ||
220 | }, | ||
221 | resetForm () { | ||
222 | this.$refs.form.resetFields() | ||
223 | this.form = { | ||
224 | icon: '', | ||
225 | code: '' | ||
226 | } | 208 | } |
227 | }, | 209 | }) |
228 | close () { | 210 | }, |
229 | this.resetForm() | 211 | resetForm () { |
230 | this.visible = false | 212 | this.$refs.form.resetFields() |
213 | this.form = { | ||
214 | icon: '', | ||
215 | code: '' | ||
231 | } | 216 | } |
217 | }, | ||
218 | close () { | ||
219 | this.resetForm() | ||
220 | this.visible = false | ||
232 | } | 221 | } |
233 | } | 222 | } |
223 | } | ||
234 | </script> | 224 | </script> |
235 | <style scoped lang="scss"> | 225 | <style scoped lang="scss"> |
236 | // @import "~@/styles/public.scss"; | 226 | .modifydialog { |
237 | </style> | 227 | &-con { |
228 | background: #031A46; | ||
229 | } | ||
230 | } | ||
231 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -17,250 +17,160 @@ | ... | @@ -17,250 +17,160 @@ |
17 | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> | 17 | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> |
18 | </lb-table> | 18 | </lb-table> |
19 | </div> | 19 | </div> |
20 | <edit-dialog ref="dialogForm" :product-id="productId" :resource-category-id="resourceCategoryId" | 20 | <edit-dialog ref="dialogForm" v-model="isDialog" :product-id="productId" :resource-category-id="resourceCategoryId" |
21 | @ok="reloadTableData" /> | 21 | @ok="reloadTableData" /> |
22 | <!-- <authorizationdiglog ref="rolesForm" /> --> | 22 | <!-- <authorizationdiglog ref="rolesForm" /> --> |
23 | </div> | 23 | </div> |
24 | </template> | 24 | </template> |
25 | <script> | 25 | <script> |
26 | // 定时任务 | 26 | // 定时任务 |
27 | import data from "./data"; | 27 | import data from "./data"; |
28 | import { deleteAction, getAction, api } from "@/api/manageApi"; | 28 | import { deleteAction, getAction, api } from "@/api/manageApi"; |
29 | import EditDialog from "./edit-dialog.vue"; | 29 | import EditDialog from "./edit-dialog.vue"; |
30 | import { mapGetters } from "vuex"; | 30 | import { mapGetters } from "vuex"; |
31 | import { getMenuInfo } from "@/api/user"; | 31 | import { getMenuInfo } from "@/api/user"; |
32 | import { | 32 | import { |
33 | getUuid, | 33 | getUuid, |
34 | judgeSort, | 34 | judgeSort, |
35 | realMove, | 35 | realMove, |
36 | findParents, | 36 | findParents, |
37 | removeTreeListItem, | 37 | removeTreeListItem, |
38 | } from "@/utils/operation"; | 38 | } from "@/utils/operation"; |
39 | // import authorizationdiglog from "./authorizationdiglog.vue"; | 39 | // import authorizationdiglog from "./authorizationdiglog.vue"; |
40 | export default { | 40 | export default { |
41 | name: "menus", | 41 | name: "menus", |
42 | components: { | 42 | components: { |
43 | EditDialog, | 43 | EditDialog, |
44 | // authorizationdiglog, | 44 | // authorizationdiglog, |
45 | }, | 45 | }, |
46 | data () { | 46 | data () { |
47 | return { | 47 | return { |
48 | tablelistData: [], | 48 | isDialog: false, |
49 | resourceCategoryId: "", | 49 | tablelistData: [], |
50 | taskData: null, | 50 | resourceCategoryId: "", |
51 | form: { | 51 | taskData: null, |
52 | job_name: "", | 52 | form: { |
53 | currentPage: 1, | 53 | job_name: "", |
54 | }, | 54 | currentPage: 1, |
55 | title: "", | 55 | }, |
56 | queryParam: {}, | 56 | title: "", |
57 | selectType: "0", | 57 | queryParam: {}, |
58 | queryName: "", | 58 | selectType: "0", |
59 | organizationId: "", // 组织机构ID | 59 | queryName: "", |
60 | departmentId: "", // 部门ID | 60 | organizationId: "", // 组织机构ID |
61 | departmentList: [], // 部门列表 | 61 | departmentId: "", // 部门ID |
62 | levelList: [], // 职务级别 | 62 | departmentList: [], // 部门列表 |
63 | sexList: [], | 63 | levelList: [], // 职务级别 |
64 | sexList: [], | ||
64 | 65 | ||
65 | selectionList: [], | 66 | selectionList: [], |
66 | tableData: { | 67 | tableData: { |
67 | columns: [].concat(data.columns()).concat([ | 68 | columns: [].concat(data.columns()).concat([ |
68 | { | 69 | { |
69 | label: "操作", | 70 | label: "操作", |
70 | width: 380, | 71 | width: 380, |
71 | render: (h, scope) => { | 72 | render: (h, scope) => { |
72 | return ( | 73 | return ( |
73 | <div> | 74 | <div> |
74 | <el-button | 75 | <el-button |
75 | type="text" | 76 | type="text" |
76 | size="mini" | 77 | size="mini" |
77 | icon="el-icon-edit" | 78 | icon="el-icon-edit" |
78 | onClick={() => { | 79 | onClick={() => { |
79 | this.handleEdit(scope.row); | 80 | this.handleEdit(scope.row); |
80 | }} | 81 | }} |
81 | > | 82 | > |
82 | 修改 | 83 | 修改 |
83 | </el-button> | 84 | </el-button> |
84 | 85 | ||
85 | <el-button | 86 | <el-button |
86 | type="text" | 87 | type="text" |
87 | size="mini" | 88 | size="mini" |
88 | icon="el-icon-delete" | 89 | icon="el-icon-delete" |
89 | style="color:#F56C6C" | 90 | style="color:#F56C6C" |
90 | onClick={() => { | 91 | onClick={() => { |
91 | this.handleDelete(scope.row.id, scope.row.name); | 92 | this.handleDelete(scope.row.id, scope.row.name); |
92 | }} | 93 | }} |
93 | > | 94 | > |
94 | 删除 | 95 | 删除 |
95 | </el-button> | 96 | </el-button> |
96 | </div> | 97 | </div> |
97 | ); | 98 | ); |
98 | }, | ||
99 | }, | 99 | }, |
100 | ]), | 100 | }, |
101 | data: [], | 101 | ]), |
102 | }, | 102 | data: [], |
103 | pageData: { | 103 | }, |
104 | total: 5, | 104 | pageData: { |
105 | pageSize: 15, | 105 | total: 5, |
106 | current: 1, | 106 | pageSize: 15, |
107 | current: 1, | ||
108 | }, | ||
109 | tableUrl: api.menus, // 菜单接口地址 | ||
110 | meumurlid: api.subsystem,// 项目id接口地址 | ||
111 | productId: ""//项目id | ||
112 | }; | ||
113 | }, | ||
114 | created () { | ||
115 | this.getTableList(); | ||
116 | }, | ||
117 | computed: { | ||
118 | ...mapGetters(["products"]) | ||
119 | }, | ||
120 | methods: { | ||
121 | // 加载表格数据 | ||
122 | getTableList () { | ||
123 | getMenuInfo(sessionStorage.getItem("products")).then((res) => { | ||
124 | if (res.code === 200) { | ||
125 | this.tablelistData = judgeSort(res.result) | ||
126 | } else { | ||
127 | this.$message.error({ message: res.message, showClose: true }) | ||
128 | } | ||
129 | }) | ||
130 | const queryOptionsid = { | ||
131 | conditionGroup: { | ||
132 | queryRelation: "AND", | ||
133 | conditions: [ | ||
134 | { | ||
135 | property: "code", | ||
136 | value: this.products, | ||
137 | operator: "EQ", | ||
138 | }, | ||
139 | ], | ||
107 | }, | 140 | }, |
108 | tableUrl: api.menus, // 菜单接口地址 | ||
109 | meumurlid: api.subsystem,// 项目id接口地址 | ||
110 | productId: ""//项目id | ||
111 | }; | 141 | }; |
142 | const params = { | ||
143 | queryOptions: queryOptionsid, | ||
144 | }; | ||
145 | // 获取系统id | ||
146 | getAction(this.meumurlid, params) | ||
147 | .then((res) => { | ||
148 | this.productId = res.content[0].id; | ||
149 | this.getAuthorityList(res.content[0].id, res.content[0].code) | ||
150 | this.selectedSubsystemCode = res.content[0].code | ||
151 | |||
152 | }) | ||
153 | .catch((error) => { | ||
154 | console.log("er", error); | ||
155 | }) | ||
112 | }, | 156 | }, |
113 | created () { | 157 | // 新增菜单 |
114 | this.getTableList(); | 158 | handleAdd () { |
115 | }, | 159 | this.isDialog = true |
116 | computed: { | 160 | this.$refs.dialogForm.add(); |
117 | ...mapGetters(["products"]) | 161 | this.$refs.dialogForm.title = "添加"; |
118 | }, | 162 | }, |
119 | methods: { | ||
120 | // 加载表格数据 | ||
121 | getTableList () { | ||
122 | getMenuInfo(sessionStorage.getItem("products")).then((res) => { | ||
123 | if (res.code === 200) { | ||
124 | this.tablelistData = judgeSort(res.result) | ||
125 | } else { | ||
126 | this.$message.error({ message: res.message, showClose: true }) | ||
127 | } | ||
128 | }) | ||
129 | const queryOptionsid = { | ||
130 | conditionGroup: { | ||
131 | queryRelation: "AND", | ||
132 | conditions: [ | ||
133 | { | ||
134 | property: "code", | ||
135 | value: this.products, | ||
136 | operator: "EQ", | ||
137 | }, | ||
138 | ], | ||
139 | }, | ||
140 | }; | ||
141 | const params = { | ||
142 | queryOptions: queryOptionsid, | ||
143 | }; | ||
144 | // 获取系统id | ||
145 | getAction(this.meumurlid, params) | ||
146 | .then((res) => { | ||
147 | this.productId = res.content[0].id; | ||
148 | this.getAuthorityList(res.content[0].id, res.content[0].code) | ||
149 | this.selectedSubsystemCode = res.content[0].code | ||
150 | // let queryOptions = { | ||
151 | // conditionGroup: { | ||
152 | // conditions: [ | ||
153 | // { | ||
154 | // property: "productId", | ||
155 | // value: this.productId, | ||
156 | // operator: "EQ", | ||
157 | // }, | ||
158 | // ], | ||
159 | // queryRelation: "AND", | ||
160 | // }, | ||
161 | // orderBys: [{ property: "sort", direction: "desc" }], | ||
162 | // }; | ||
163 | // if (!this.tableUrl) { | ||
164 | // console.log("请设置tableUrl属性为接口地址!"); | ||
165 | // return; | ||
166 | // } | ||
167 | // if (this.queryOptions !== "") { | ||
168 | // this.queryParam.queryOptions = JSON.stringify(queryOptions); | ||
169 | // } | ||
170 | // 查询系统菜单 | ||
171 | // getAction(this.tableUrl, this.queryParam) | ||
172 | // .then((res) => { | ||
173 | // if (res.status === 1) { | ||
174 | // this.loading = false; | ||
175 | // // this.menutablelistData = res.content; | ||
176 | // console.log("res.content菜单", res.content); | ||
177 | // } else { | ||
178 | // this.$message.error({ message: res.message, showClose: true }); | ||
179 | // this.loading = false; | ||
180 | // } | ||
181 | // }) | ||
182 | // .catch((error) => { | ||
183 | // console.log("er", error); | ||
184 | // this.loading = false; | ||
185 | // }); | ||
186 | }) | ||
187 | .catch((error) => { | ||
188 | console.log("er", error); | ||
189 | }); | ||
190 | // const queryOptionsid = { | ||
191 | // conditionGroup: { | ||
192 | // queryRelation: "AND", | ||
193 | // conditions: [ | ||
194 | // { | ||
195 | // property: "code", | ||
196 | // value: sessionStorage.getItem("products"), | ||
197 | // operator: "EQ", | ||
198 | // }, | ||
199 | // ], | ||
200 | // }, | ||
201 | // }; | ||
202 | // const params = { | ||
203 | // queryOptions: queryOptionsid, | ||
204 | // }; | ||
205 | // // 获取系统id | ||
206 | // getAction(this.meumurlid, params) | ||
207 | // .then((res) => { | ||
208 | // this.productId = res.content[0].id; | ||
209 | // let queryOptions = { | ||
210 | // conditionGroup: { | ||
211 | // conditions: [ | ||
212 | // { | ||
213 | // property: "productId", | ||
214 | // value: this.productId, | ||
215 | // operator: "EQ", | ||
216 | // }, | ||
217 | // ], | ||
218 | // queryRelation: "AND", | ||
219 | // }, | ||
220 | // orderBys: [{ property: "sort", direction: "desc" }], | ||
221 | // }; | ||
222 | // if (!this.tableUrl) { | ||
223 | // console.log("请设置tableUrl属性为接口地址!"); | ||
224 | // return; | ||
225 | // } | ||
226 | // if (this.queryOptions !== "") { | ||
227 | // this.queryParam.queryOptions = JSON.stringify(queryOptions); | ||
228 | // } | ||
229 | // // 查询系统菜单 | ||
230 | // getAction(this.tableUrl, this.queryParam) | ||
231 | // .then((res) => { | ||
232 | // if (res.status === 1) { | ||
233 | // this.loading = false; | ||
234 | // this.tablelistData = res.content; | ||
235 | // } else { | ||
236 | // this.$message.error({ message: res.message, showClose: true }); | ||
237 | // this.loading = false; | ||
238 | // } | ||
239 | // }) | ||
240 | // .catch((error) => { | ||
241 | // console.log("er", error); | ||
242 | // this.loading = false; | ||
243 | // }); | ||
244 | // }) | ||
245 | // .catch((error) => { | ||
246 | // console.log("er", error); | ||
247 | // }); | ||
248 | }, | ||
249 | // 新增菜单 | ||
250 | handleAdd () { | ||
251 | this.$refs.dialogForm.add(); | ||
252 | this.$refs.dialogForm.title = "添加"; | ||
253 | }, | ||
254 | 163 | ||
255 | // 修改 | 164 | // 修改 |
256 | handleEdit (record) { | 165 | handleEdit (record) { |
257 | this.$refs.dialogForm.edit(record); | 166 | this.isDialog = true |
258 | this.$refs.dialogForm.title = "修改"; | 167 | this.$refs.dialogForm.edit(record); |
259 | }, | 168 | this.$refs.dialogForm.title = "修改"; |
260 | // 删除 | 169 | }, |
261 | handleDelete (id, content) { | 170 | // 删除 |
262 | this.$confirm( | 171 | handleDelete (id, content) { |
263 | `<div class="customer-message-wrapper"> | 172 | this.$confirm( |
173 | `<div class="customer-message-wrapper"> | ||
264 | <h5 class="title">您确认要执行该操作用于以下信息:</h5> | 174 | <h5 class="title">您确认要执行该操作用于以下信息:</h5> |
265 | <p class="content" aria-controls="${content}">${content} | 175 | <p class="content" aria-controls="${content}">${content} |
266 | </p> | 176 | </p> |
... | @@ -268,51 +178,51 @@ | ... | @@ -268,51 +178,51 @@ |
268 | <span >无法恢复</span> | 178 | <span >无法恢复</span> |
269 | </p> | 179 | </p> |
270 | </div>`, | 180 | </div>`, |
271 | '执行确认', | 181 | '执行确认', |
272 | { | 182 | { |
273 | dangerouslyUseHTMLString: true, | 183 | dangerouslyUseHTMLString: true, |
274 | customClass: 'customer-delete', | 184 | customClass: 'customer-delete', |
275 | confirmButtonText: '确定', | 185 | confirmButtonText: '确定', |
276 | cancelButtonText: '取消', | 186 | cancelButtonText: '取消', |
277 | type: 'warning' | 187 | type: 'warning' |
188 | } | ||
189 | ) | ||
190 | .then(() => { | ||
191 | if (!this.tableUrl) { | ||
192 | this.$message.error({ | ||
193 | message: '请设置tableUrl属性为接口地址!', | ||
194 | showClose: true | ||
195 | }) | ||
196 | return | ||
278 | } | 197 | } |
279 | ) | 198 | const url = this.tableUrl + '/' + id |
280 | .then(() => { | 199 | deleteAction(url).then(res => { |
281 | if (!this.tableUrl) { | 200 | if (res.status === 1) { |
282 | this.$message.error({ | 201 | this.$message.success({ message: res.message, showClose: true }) |
283 | message: '请设置tableUrl属性为接口地址!', | 202 | this.reloadTableData() |
284 | showClose: true | 203 | } else { |
285 | }) | 204 | this.$message.error({ message: res.message, showClose: true }) |
286 | return | ||
287 | } | 205 | } |
288 | const url = this.tableUrl + '/' + id | ||
289 | deleteAction(url).then(res => { | ||
290 | if (res.status === 1) { | ||
291 | this.$message.success({ message: res.message, showClose: true }) | ||
292 | this.reloadTableData() | ||
293 | } else { | ||
294 | this.$message.error({ message: res.message, showClose: true }) | ||
295 | } | ||
296 | }) | ||
297 | }) | 206 | }) |
298 | .catch(() => { }) | 207 | }) |
299 | }, | 208 | .catch(() => { }) |
300 | // 新增、编辑回显 | 209 | }, |
301 | reloadTableData () { | 210 | // 新增、编辑回显 |
302 | this.getTableList() | 211 | reloadTableData () { |
303 | }, | 212 | this.getTableList() |
304 | }, | 213 | }, |
305 | }; | 214 | }, |
215 | }; | ||
306 | </script> | 216 | </script> |
307 | <style scoped lang="scss"> | 217 | <style scoped lang="scss"> |
308 | @import "~@/styles/mixin.scss"; | 218 | @import "~@/styles/mixin.scss"; |
309 | 219 | ||
310 | // @import "~@/styles/public.scss"; | 220 | // @import "~@/styles/public.scss"; |
311 | .btnColRight { | 221 | .btnColRight { |
312 | margin-top: 20px; | 222 | margin-top: 20px; |
313 | } | 223 | } |
314 | 224 | ||
315 | /deep/.el-table__expand-icon { | 225 | /deep/.el-table__expand-icon { |
316 | color: #fff; | 226 | color: #fff; |
317 | } | 227 | } |
318 | </style> | 228 | </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