--no commit message
Showing
21 changed files
with
723 additions
and
332 deletions
... | @@ -25,7 +25,7 @@ export default { | ... | @@ -25,7 +25,7 @@ export default { |
25 | async submitViews () { | 25 | async submitViews () { |
26 | try { | 26 | try { |
27 | let { result: res } = await work.submitViews("A20"); | 27 | let { result: res } = await work.submitViews("A20"); |
28 | res.filter((item) => { | 28 | res.map((item) => { |
29 | return ( | 29 | return ( |
30 | this.cdata.category.push(item.areaName), | 30 | this.cdata.category.push(item.areaName), |
31 | this.cdata.barData.push(item.successCount), | 31 | this.cdata.barData.push(item.successCount), | ... | ... |
... | @@ -30,7 +30,7 @@ export default { | ... | @@ -30,7 +30,7 @@ export default { |
30 | XZQDM: "", | 30 | XZQDM: "", |
31 | }; | 31 | }; |
32 | let res = await work.getDjlxtotal(p); | 32 | let res = await work.getDjlxtotal(p); |
33 | res.result.filter((item) => { | 33 | res.result.map((item) => { |
34 | return ( | 34 | return ( |
35 | this.cdata.category.push(item.AREACODE), | 35 | this.cdata.category.push(item.AREACODE), |
36 | this.cdata.lineData.push(item.ywtotal) | 36 | this.cdata.lineData.push(item.ywtotal) | ... | ... |
... | @@ -103,7 +103,7 @@ export default { | ... | @@ -103,7 +103,7 @@ export default { |
103 | }, | 103 | }, |
104 | // 如果需要自定义 tooltip样式,需要使用formatter | 104 | // 如果需要自定义 tooltip样式,需要使用formatter |
105 | formatter: params => { | 105 | formatter: params => { |
106 | return `<div style="">${params.name}:${params.value}</div>` | 106 | return `<div style="">${params.name}:${params.value+"个"}</div>` |
107 | } | 107 | } |
108 | }, | 108 | }, |
109 | visualMap: { | 109 | visualMap: { | ... | ... |
... | @@ -22,9 +22,9 @@ export default { | ... | @@ -22,9 +22,9 @@ export default { |
22 | async mapViews () { | 22 | async mapViews () { |
23 | try { | 23 | try { |
24 | let { result: res } = await work.mapViews("A20"); | 24 | let { result: res } = await work.mapViews("A20"); |
25 | res.filter((item) => { | 25 | res.map((item) => { |
26 | return ( | 26 | return ( |
27 | this.cdata.push({ "name": item.areaName, "value": item.areaCode }) | 27 | this.cdata.push({ "name": item.areaName, "value": item.ywtotal }) |
28 | ) | 28 | ) |
29 | 29 | ||
30 | }); | 30 | }); | ... | ... |
1 | <template> | 1 | <template> |
2 | <Echart :options="options" id="centreLeft1Chart" height="200px" width="100%"></Echart> | 2 | <Echart :options="options" id="centreLeft1Chart" :key="key" height="225px" width="80%"></Echart> |
3 | </template> | 3 | </template> |
4 | <script> | 4 | <script> |
5 | import Echart from '@/common/echart' | 5 | import Echart from '@/common/echart' |
... | @@ -7,6 +7,11 @@ export default { | ... | @@ -7,6 +7,11 @@ export default { |
7 | components: { | 7 | components: { |
8 | Echart, | 8 | Echart, |
9 | }, | 9 | }, |
10 | data() { | ||
11 | return { | ||
12 | key:0 | ||
13 | } | ||
14 | }, | ||
10 | props: { | 15 | props: { |
11 | cdata: { | 16 | cdata: { |
12 | type: Object, | 17 | type: Object, |
... | @@ -16,11 +21,11 @@ export default { | ... | @@ -16,11 +21,11 @@ export default { |
16 | watch: { | 21 | watch: { |
17 | cdata: { | 22 | cdata: { |
18 | handler (newData) { | 23 | handler (newData) { |
24 | console.log("newData",newData); | ||
19 | this.options = { | 25 | this.options = { |
20 | grid: { | 26 | grid: { |
21 | // 让图表占满容器 | 27 | right:"1%", |
22 | top: 20, | 28 | bottom:"4%" |
23 | right: 0, | ||
24 | }, | 29 | }, |
25 | color: [ | 30 | color: [ |
26 | "#37a2da", | 31 | "#37a2da", |
... | @@ -44,12 +49,14 @@ export default { | ... | @@ -44,12 +49,14 @@ export default { |
44 | { | 49 | { |
45 | name: "业务量", | 50 | name: "业务量", |
46 | type: "pie", | 51 | type: "pie", |
47 | radius: [0, 80], | 52 | radius: [40,100], |
48 | roseType: "area", | 53 | roseType: "area", |
49 | data: newData.seriesData | 54 | data: newData.seriesData |
50 | } | 55 | } |
51 | ] | 56 | ], |
57 | |||
52 | } | 58 | } |
59 | this.key++ | ||
53 | }, | 60 | }, |
54 | immediate: true, | 61 | immediate: true, |
55 | deep: true | 62 | deep: true |
... | @@ -60,6 +67,7 @@ export default { | ... | @@ -60,6 +67,7 @@ export default { |
60 | 67 | ||
61 | <style lang="scss" scoped> | 68 | <style lang="scss" scoped> |
62 | #centreLeft1Chart { | 69 | #centreLeft1Chart { |
63 | margin-left: -20px; | 70 | margin-bottom: 10px; |
71 | margin-left: 60px; | ||
64 | } | 72 | } |
65 | </style> | 73 | </style> | ... | ... |
1 | <template> | 1 | <template> |
2 | <div> | 2 | <div> |
3 | <Chart :cdata="cdata" /> | 3 | <Chart :cdata="cdata" /> |
4 | <el-carousel height="40px" indicator-position="none"> | ||
5 | <el-carousel-item v-for="item in 4" :key="item"> | ||
6 | <div class="rotograph">佛坪县</div> | ||
7 | </el-carousel-item> | ||
8 | </el-carousel> | ||
9 | </div> | 4 | </div> |
10 | </template> | 5 | </template> |
11 | 6 | ||
... | @@ -29,6 +24,7 @@ export default { | ... | @@ -29,6 +24,7 @@ export default { |
29 | 24 | ||
30 | }, | 25 | }, |
31 | methods: { | 26 | methods: { |
27 | // 获取登记业务量玫瑰图数据 | ||
32 | async getdjywltotal () { | 28 | async getdjywltotal () { |
33 | try { | 29 | try { |
34 | let p = { | 30 | let p = { |
... | @@ -38,14 +34,14 @@ export default { | ... | @@ -38,14 +34,14 @@ export default { |
38 | }; | 34 | }; |
39 | let res = await work.getdjywltotal(p); | 35 | let res = await work.getdjywltotal(p); |
40 | console.log("res",res); | 36 | console.log("res",res); |
41 | res.result.filter((item) => { | 37 | // 遍历修改数组键,作为echars图表的参数 |
38 | res.result.map((item) => { | ||
42 | return ( | 39 | return ( |
43 | this.cdata.seriesData.push({ "name": item.AREACODE, "value": item.ywtotal }) | 40 | this.cdata.seriesData.push({ "name": item.AREACODE, "value": item.ywtotal }) |
44 | ) | 41 | ) |
45 | }); | 42 | }); |
46 | console.log("this.cdata.seriesData",this.cdata.seriesData); | ||
47 | } catch (error) { | 43 | } catch (error) { |
48 | this.$refs.msg.messageShow(); | 44 | console.log(error); |
49 | } | 45 | } |
50 | 46 | ||
51 | 47 | ||
... | @@ -55,16 +51,4 @@ export default { | ... | @@ -55,16 +51,4 @@ export default { |
55 | </script> | 51 | </script> |
56 | 52 | ||
57 | <style lang="scss" scoped> | 53 | <style lang="scss" scoped> |
58 | .rotograph { | ||
59 | margin: auto; | ||
60 | width: 200px; | ||
61 | height: 30px; | ||
62 | background-color: rgb(6, 121, 167); | ||
63 | font-size: 20px; | ||
64 | line-height: 30px; | ||
65 | text-align: center; | ||
66 | border-radius: 6px; | ||
67 | font-weight: 600; | ||
68 | color: #02d9fd; | ||
69 | } | ||
70 | </style> | 54 | </style> | ... | ... |
src/utils/operation copy.js
0 → 100644
1 | import { Message } from "element-ui"; | ||
2 | export function removeTreeListItem (treeList, dictId, idName = 'bsmDict') { | ||
3 | if (!treeList || !treeList.length) { | ||
4 | return | ||
5 | } | ||
6 | for (let i = 0; i < treeList.length; i++) { | ||
7 | if (treeList[i][idName] === dictId) { | ||
8 | treeList.splice(i, 1); | ||
9 | break; | ||
10 | } | ||
11 | removeTreeListItem(treeList[i].children, dictId) | ||
12 | } | ||
13 | } | ||
14 | // 创造id | ||
15 | export function getUuid (len, radix) { | ||
16 | var chars = "0123456789abcdefghijklmnopqrstuvwxyz".split( | ||
17 | "" | ||
18 | ); | ||
19 | var uuid = [], | ||
20 | i; | ||
21 | radix = radix || chars.length; | ||
22 | if (len) { | ||
23 | for (i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)]; | ||
24 | } else { | ||
25 | var r; | ||
26 | uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-"; | ||
27 | uuid[14] = "4"; | ||
28 | for (i = 0; i < 36; i++) { | ||
29 | if (!uuid[i]) { | ||
30 | r = 0 | (Math.random() * 16); | ||
31 | uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r]; | ||
32 | } | ||
33 | } | ||
34 | } | ||
35 | return uuid.join(""); | ||
36 | } | ||
37 | export function judgeSort (arr) { | ||
38 | if (arr.length) { | ||
39 | for (let i in arr) { | ||
40 | arr[i]["isTop"] = false; | ||
41 | arr[i]["isBottom"] = false; | ||
42 | arr[i] == arr[0] && (arr[i].isTop = true); | ||
43 | arr[i] == arr[arr.length - 1] && (arr[i].isBottom = true); | ||
44 | arr[i].children && arr[i].children.length && judgeSort(arr[i].children) | ||
45 | } | ||
46 | } | ||
47 | return arr | ||
48 | } | ||
49 | // 上下移动 | ||
50 | export function realMove (bsmDict, operate, data) { | ||
51 | function changeSort (arr, bsmDict) { | ||
52 | if (arr.length) { | ||
53 | let flag = false; | ||
54 | for (let i in arr) { | ||
55 | if (arr[i].bsmDict == bsmDict) { | ||
56 | if (operate === "UP") { | ||
57 | arr[i] = arr.splice(i - 1, 1, arr[i])[0]; | ||
58 | } else if (operate === "DOWN") { | ||
59 | let temp = arr.splice(i - 0 + 1, 1, arr[i]) | ||
60 | arr[i] = temp[0]; | ||
61 | } | ||
62 | flag = true; | ||
63 | break; | ||
64 | } | ||
65 | if (!flag && arr[i].children && arr[i].children.length) { | ||
66 | arr[i].children = changeSort(arr[i].children, bsmDict); | ||
67 | } | ||
68 | } | ||
69 | } | ||
70 | return arr; | ||
71 | } | ||
72 | data = judgeSort(changeSort(data, bsmDict)); | ||
73 | } | ||
74 | // 获取所有父节点 | ||
75 | export function findParents (treeData, bsmDict) { | ||
76 | if (treeData.length == 0) return | ||
77 | for (let i = 0; i < treeData.length; i++) { | ||
78 | if (treeData[i].bsmDict == bsmDict) { | ||
79 | return [] | ||
80 | } else { | ||
81 | if (treeData[i].children) { | ||
82 | let res = findParents(treeData[i].children, bsmDict) | ||
83 | if (res !== undefined) { | ||
84 | return res.concat(treeData[i].bsmDict) | ||
85 | } | ||
86 | } | ||
87 | } | ||
88 | } | ||
89 | } | ||
90 | // 上移下移 | ||
91 | export function upward (index, data) { | ||
92 | if (index > 0) { | ||
93 | let upData = data[index - 1]; | ||
94 | data.splice(index - 1, 1); | ||
95 | data.splice(index, 0, upData); | ||
96 | } else { | ||
97 | Message({ | ||
98 | message: '已经是第一条,上移失败' | ||
99 | }); | ||
100 | } | ||
101 | } | ||
102 | export function down (index, data) { | ||
103 | if ((index + 1) == data.length) { | ||
104 | Message({ | ||
105 | message: '已经是最后一条,下移失败' | ||
106 | }); | ||
107 | } else { | ||
108 | let downData = data[index + 1]; | ||
109 | data.splice(index + 1, 1); | ||
110 | data.splice(index, 0, downData); | ||
111 | } | ||
112 | } |
... | @@ -109,4 +109,4 @@ export function down (index, data) { | ... | @@ -109,4 +109,4 @@ export function down (index, data) { |
109 | data.splice(index + 1, 1); | 109 | data.splice(index + 1, 1); |
110 | data.splice(index, 0, downData); | 110 | data.splice(index, 0, downData); |
111 | } | 111 | } |
112 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
112 | } | ... | ... |
... | @@ -87,21 +87,24 @@ export default { | ... | @@ -87,21 +87,24 @@ export default { |
87 | return new Promise(async (resolve) => { | 87 | return new Promise(async (resolve) => { |
88 | try { | 88 | try { |
89 | let p = { | 89 | let p = { |
90 | DJLX: "A21", | 90 | DJLX: "", |
91 | QLLX: "A8", | 91 | QLLX: "", |
92 | XZQDM: "A20", | 92 | XZQDM: "", |
93 | }; | 93 | }; |
94 | let res = await work.getsthjqxjrtotal(p); | 94 | let res = await work.getsthjqxjrtotal(p); |
95 | this.stjrl=Number(res.result.sum) | 95 | console.log("res",res); |
96 | this.qxjrl=Number(res.result.sum) | 96 | this.stjrl=res.result.sum |
97 | this.qxjrl=res.result.sum | ||
97 | this.qxerrer=Number(res.result.qxjrerrer) | 98 | this.qxerrer=Number(res.result.qxjrerrer) |
98 | this.sterrer=Number(res.result.sthjerrer) | 99 | this.sterrer=Number(res.result.sthjerrer) |
99 | if(res.result.sum=="0"){ | 100 | if(res.result.sum=="0"){ |
100 | this.qxcgl="100%" | 101 | this.qxcgl="100%" |
101 | this.stcgl="100%" | 102 | this.stcgl="100%" |
102 | }else{ | 103 | }else{ |
103 | this.qxcgl=Number(res.result.qxjrsuccess)/this.qxjrl*100+"%" | 104 | let qxcglnum=Number(res.result.qxjrsuccess)/this.qxjrl*100 |
104 | this.stcgl=Number(res.result.sthjsuccess)/Number(res.result.sum)*100+"%" | 105 | let stcgl=Number(res.result.sthjsuccess)/this.qxjrl*100 |
106 | this.qxcgl=qxcglnum.toFixed(2)+"%"; | ||
107 | this.stcgl=stcgl.toFixed(2)+"%"; | ||
105 | } | 108 | } |
106 | 109 | ||
107 | } catch (error) { | 110 | } catch (error) { | ... | ... |
1 | <template> | 1 | <template> |
2 | <div class="rightcard"> | 2 | <div class="rightcard"> |
3 | <div class="card1 cardCon d-center"> | 3 | <div class="card1 cardCon d-center"> |
4 | <div class="cardhead">房屋情况统计表</div> | 4 | <div class="cardhead">新建商品房登记</div> |
5 | <div class="cardcontent" style="margin-top: 70px"> | 5 | <div class="cardcontent" style="margin-top: 70px"> |
6 | <dv-scroll-board :config="config" class="board" /> | 6 | <dv-scroll-board :config="config" class="board" /> |
7 | </div> | 7 | </div> | ... | ... |
1 | <template> | ||
2 | <Dialog :title="title" class="tableClass" :show.sync="visible" :width="'715px'" @close="close()"> | ||
3 | <template slot="content"> | ||
4 | <lb-table ref="multipleTable" | ||
5 | :pagination="false" | ||
6 | :column="tableData.column" | ||
7 | :data="tableData.data" | ||
8 | @selection-change="handleSelectionChange"> | ||
9 | </lb-table> | ||
10 | </template> | ||
11 | <template slot="footer"> | ||
12 | <el-button type="primary" class="save" @click="handleSaveMember()" | ||
13 | >保存</el-button | ||
14 | > | ||
15 | <el-button class="cancel-button" @click="close()">取消</el-button> | ||
16 | </template> | ||
17 | </Dialog> | ||
18 | </template> | ||
19 | |||
20 | <script> | ||
21 | import Dialog from "@/components/Dialog/"; | ||
22 | export default { | ||
23 | name: "", | ||
24 | components: { Dialog }, | ||
25 | props: {}, | ||
26 | data() { | ||
27 | return { | ||
28 | title: "人员配置", | ||
29 | visible: false, | ||
30 | tableData: { | ||
31 | column: [ | ||
32 | { | ||
33 | type: 'selection' | ||
34 | }, | ||
35 | { | ||
36 | prop: 'name', | ||
37 | label: '角色名称' | ||
38 | }, | ||
39 | { | ||
40 | prop: 'type', | ||
41 | label: '角色类型' | ||
42 | }, | ||
43 | { | ||
44 | prop: 'departmentName', | ||
45 | label: '角色描述' | ||
46 | }, | ||
47 | ], | ||
48 | data: [ | ||
49 | { | ||
50 | id: "3127e455-43ba-45ff-9326-0e02ef89485e", | ||
51 | createdAt: null, | ||
52 | updatedAt: "2022-08-04T03:38:27.626+0000", | ||
53 | createdBy: null, | ||
54 | updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e", | ||
55 | sort: 1, | ||
56 | name: "超级管理员", | ||
57 | loginName: "admin", | ||
58 | password: "05eb15777e8fd1d61c840472e7267f61d432f63340d86b59", | ||
59 | passwordSalt: "5178114777136485", | ||
60 | email: null, | ||
61 | lastLoginTime: null, | ||
62 | mobilePhone: "18291003568", | ||
63 | status: "ACTIVE", | ||
64 | passwordChangeTime: "2021-12-10T08:01:01.569+0000", | ||
65 | idCard: "612725202111021521", | ||
66 | departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b", | ||
67 | organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa", | ||
68 | sex: "0", | ||
69 | isDuty: true, | ||
70 | type:"", | ||
71 | code: "123324", | ||
72 | jobLevel: null, | ||
73 | telephone: "028-87720898", | ||
74 | address: "办公地点修改测试", | ||
75 | isLocked: false, | ||
76 | departmentName: "研发部", | ||
77 | _X_ROW_KEY: "row_276", | ||
78 | }, | ||
79 | { | ||
80 | name: '数据管理员', | ||
81 | type:"1", | ||
82 | }, | ||
83 | { | ||
84 | name: '数据管理员2', | ||
85 | type:"d", | ||
86 | } | ||
87 | ] | ||
88 | }, | ||
89 | multipleSelection: [] | ||
90 | |||
91 | } | ||
92 | }, | ||
93 | computed: {}, | ||
94 | watch: {}, | ||
95 | created() {}, | ||
96 | mounted() {}, | ||
97 | methods: { | ||
98 | authorization() { | ||
99 | this.visible = true; | ||
100 | }, | ||
101 | close() { | ||
102 | // this.resetForm() | ||
103 | this.visible = false; | ||
104 | }, | ||
105 | // 保存事件 | ||
106 | handleSaveMember() { | ||
107 | // if (this.memberList.length === 0) { | ||
108 | // this.$message.warning("请添加待选人员"); | ||
109 | // return false; | ||
110 | // } | ||
111 | // const idList = this.memberList.map(item => item.id) | ||
112 | // updateUser(this.roleId, idList).then(res => { | ||
113 | // if (res.status === 1) { | ||
114 | // this.$message.success({ message: '保存成功', showClose: true }) | ||
115 | // this.showMemberConfigDialog = false | ||
116 | // this.$emit('setUsers', this.roleId) | ||
117 | // this.resetMemberConfig() | ||
118 | // } else this.$message.error({ message: res.message, showClose: true }) | ||
119 | // }) | ||
120 | }, | ||
121 | handleSelectionChange (val) { | ||
122 | console.log("vadddl",val); | ||
123 | this.multipleSelection = val | ||
124 | } | ||
125 | } | ||
126 | }; | ||
127 | </script> | ||
128 | <style scoped lang="scss"> | ||
129 | /deep/.el-dialog__header{ | ||
130 | text-align: center; | ||
131 | margin-bottom: 10px; | ||
132 | .el-dialog__title{ | ||
133 | color: white; | ||
134 | } | ||
135 | } | ||
136 | </style> |
... | @@ -204,22 +204,14 @@ export default { | ... | @@ -204,22 +204,14 @@ export default { |
204 | // this.form.jumpMode = 1 | 204 | // this.form.jumpMode = 1 |
205 | }, | 205 | }, |
206 | edit(record) { | 206 | edit(record) { |
207 | // this.type = 1 | 207 | // 若有id为编辑 |
208 | // // 若有id为编辑 | 208 | if (record.id) { |
209 | // if (record.id) { | 209 | this.$nextTick(() => { |
210 | // this.$nextTick(() => { | 210 | this.form = Object.assign({}, record) |
211 | // this.form = Object.assign({}, record) | 211 | // this.getParentMenuList(this.productId) |
212 | // this.getParentMenuList(this.productId) | 212 | }) |
213 | // }) | 213 | } |
214 | // } | ||
215 | this.visible = true; | ||
216 | }, | ||
217 | addChild(record) { | ||
218 | // this.getParentMenuList(this.productId) | ||
219 | this.visible = true; | 214 | this.visible = true; |
220 | // this.type = 2 | ||
221 | // this.form.jumpMode = 1 | ||
222 | // this.form.parentId = record.id | ||
223 | }, | 215 | }, |
224 | handleChange(value) { | 216 | handleChange(value) { |
225 | // this.form.parentId = value | 217 | // this.form.parentId = value |
... | @@ -289,12 +281,16 @@ export default { | ... | @@ -289,12 +281,16 @@ export default { |
289 | }; | 281 | }; |
290 | </script> | 282 | </script> |
291 | <style scoped lang="scss"> | 283 | <style scoped lang="scss"> |
292 | .el-form { | 284 | /deep/.el-input__inner { |
293 | .el-input { | 285 | background: #07388B; |
294 | .el-input__icon { | 286 | border-radius: 2px; |
295 | font-size: 14px; | 287 | border: 1px solid #6BC1FC; |
296 | // color: #3AA3F8 !important; | 288 | } |
297 | } | 289 | /deep/.el-textarea__inner{ |
298 | } | 290 | background: #07388B; |
291 | color: #fff; | ||
292 | } | ||
293 | /deep/.el-form-item__label{ | ||
294 | color:#fff; | ||
299 | } | 295 | } |
300 | </style> | 296 | </style> | ... | ... |
... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
12 | <div class="from-clues-content"> | 12 | <div class="from-clues-content"> |
13 | <lb-table | 13 | <lb-table |
14 | :column="tableData.columns" | 14 | :column="tableData.columns" |
15 | :data="tabledata11" | 15 | :data="tabledata" |
16 | row-key="id" | 16 | row-key="id" |
17 | default-expand-all | 17 | default-expand-all |
18 | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" | 18 | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
... | @@ -20,27 +20,30 @@ | ... | @@ -20,27 +20,30 @@ |
20 | </lb-table> | 20 | </lb-table> |
21 | </div> | 21 | </div> |
22 | <edit-dialog ref="dialogForm" /> | 22 | <edit-dialog ref="dialogForm" /> |
23 | <authorizationdiglog ref="rolesForm" /> | ||
23 | </div> | 24 | </div> |
24 | </template> | 25 | </template> |
25 | <script> | 26 | <script> |
26 | // 定时任务 | 27 | // 定时任务 |
27 | import data from "./data"; | 28 | import data from "./data"; |
28 | import EditDialog from "./edit-dialog.vue"; | 29 | import EditDialog from "./edit-dialog.vue"; |
30 | import authorizationdiglog from "./authorizationdiglog.vue"; | ||
29 | export default { | 31 | export default { |
30 | name: "menus", | 32 | name: "menus", |
31 | components: { | 33 | components: { |
32 | EditDialog, | 34 | EditDialog, |
35 | authorizationdiglog, | ||
33 | }, | 36 | }, |
34 | data() { | 37 | data() { |
35 | return { | 38 | return { |
36 | tabledata11: [ | 39 | tabledata: [ |
37 | { | 40 | { |
38 | id: "c6221838-187b-4a7a-b173-b0543022f560", | 41 | id: "c6221838-187b-4a7a-b173-b0543022f560", |
39 | createdAt: "2021-08-26T07:00:07.101+0000", | 42 | createdAt: "2021-08-26T07:00:07.101+0000", |
40 | updatedAt: "2021-08-26T07:00:07.101+0000", | 43 | updatedAt: "2021-08-26T07:00:07.101+0000", |
41 | createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e", | 44 | createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e", |
42 | updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e", | 45 | updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e", |
43 | sort: 135, | 46 | sort: 35, |
44 | name: "概览", | 47 | name: "概览", |
45 | code: "GL", | 48 | code: "GL", |
46 | description: null, | 49 | description: null, |
... | @@ -293,14 +296,14 @@ export default { | ... | @@ -293,14 +296,14 @@ export default { |
293 | 296 | ||
294 | // 修改 | 297 | // 修改 |
295 | handleEdit(record) { | 298 | handleEdit(record) { |
296 | localStorage.setItem("record", JSON.stringify(record)); | ||
297 | this.$refs.dialogForm.edit(record); | 299 | this.$refs.dialogForm.edit(record); |
298 | this.$refs.dialogForm.title = "修改"; | 300 | this.$refs.dialogForm.title = "修改"; |
299 | }, | 301 | }, |
300 | // 授权 | 302 | // 授权 |
301 | authorizationQuery(record) { | 303 | authorizationQuery(record) { |
302 | this.$refs.authorizationList.open(record, 'menu') | 304 | this.$refs.rolesForm.authorization(record); |
303 | this.$refs.authorizationList.emptyJudge = true | 305 | this.$refs.rolesForm.title = "授权查询"; |
306 | |||
304 | }, | 307 | }, |
305 | // 删除 | 308 | // 删除 |
306 | handleDelete(row, id) { | 309 | handleDelete(row, id) { |
... | @@ -340,4 +343,7 @@ export default { | ... | @@ -340,4 +343,7 @@ export default { |
340 | <style scoped lang="scss"> | 343 | <style scoped lang="scss"> |
341 | @import "~@/styles/mixin.scss"; | 344 | @import "~@/styles/mixin.scss"; |
342 | @import "~@/styles/public.scss"; | 345 | @import "~@/styles/public.scss"; |
346 | /deep/.el-table__expand-icon{ | ||
347 | color: #fff; | ||
348 | } | ||
343 | </style> | 349 | </style> | ... | ... |
... | @@ -6,17 +6,17 @@ class data extends filter { | ... | @@ -6,17 +6,17 @@ class data extends filter { |
6 | columns () { | 6 | columns () { |
7 | return [ | 7 | return [ |
8 | { | 8 | { |
9 | prop: "job_name", | 9 | prop: "name", |
10 | label: "角色名称", | 10 | label: "角色名称", |
11 | width: 330 | 11 | width: 330 |
12 | }, | 12 | }, |
13 | { | 13 | { |
14 | prop: "description", | 14 | prop: "type", |
15 | label: "类别", | 15 | label: "类别", |
16 | width: 400 | 16 | width: 400 |
17 | }, | 17 | }, |
18 | { | 18 | { |
19 | prop: "cron_expression", | 19 | prop: "description", |
20 | label: "备注" | 20 | label: "备注" |
21 | } | 21 | } |
22 | ] | 22 | ] | ... | ... |
src/views/system/roles/data/roles.js
0 → 100644
1 | import filter from '@/utils/filter.js' | ||
2 | class data extends filter { | ||
3 | constructor() { | ||
4 | super() | ||
5 | } | ||
6 | columns () { | ||
7 | return [ | ||
8 | { | ||
9 | prop: "name", | ||
10 | label: "角色名称", | ||
11 | width: 330 | ||
12 | }, | ||
13 | { | ||
14 | prop: "type", | ||
15 | label: "类别", | ||
16 | width: 400 | ||
17 | }, | ||
18 | { | ||
19 | prop: "address", | ||
20 | label: "备注" | ||
21 | } | ||
22 | ] | ||
23 | } | ||
24 | } | ||
25 | export default new data() |
... | @@ -171,4 +171,17 @@ export default { | ... | @@ -171,4 +171,17 @@ export default { |
171 | } | 171 | } |
172 | } | 172 | } |
173 | </script> | 173 | </script> |
174 | <style scoped lang="scss"></style> | 174 | <style scoped lang="scss"> |
175 | /deep/.el-input__inner { | ||
176 | background: #07388B; | ||
177 | border-radius: 2px; | ||
178 | border: 1px solid #6BC1FC; | ||
179 | } | ||
180 | /deep/.el-textarea__inner{ | ||
181 | background: #07388B; | ||
182 | color: #fff; | ||
183 | } | ||
184 | /deep/.el-form-item__label{ | ||
185 | color:#fff; | ||
186 | } | ||
187 | </style> | ... | ... |
1 | <template> | 1 | <template> |
2 | <div class="timedTask from-clues"> | 2 | <div class="timedTask from-clues"> |
3 | <div class="from-clues-header"> | 3 | <div class="from-clues-header"> |
4 | <el-form ref="ruleForm" :model="form" label-width="100px"> | 4 | <el-form ref="ruleForm" :model="form" label-width="100px"> |
5 | <el-row class="mb-5"> | 5 | <el-row class="mb-5"> |
6 | <el-col :span="2" class="btnColRight"> | 6 | <el-col :span="2" class="btnColRight"> |
7 | <btn nativeType="cx" @click="handleAdd">增加角色</btn> | 7 | <btn nativeType="cx" @click="handleAdd">增加角色</btn> |
8 | </el-col> | 8 | </el-col> |
9 | |||
10 | </el-row> | 9 | </el-row> |
11 | </el-form> | 10 | </el-form> |
12 | </div> | 11 | </div> |
13 | <div class="from-clues-content"> | 12 | <div class="from-clues-content"> |
14 | <lb-table :page-size="pageData.size" :current-page.sync="pageData.current" :total="pageData.total" | 13 | <lb-table |
15 | @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns" | 14 | :page-size="pageData.size" |
16 | :data="tableData.data"> | 15 | :current-page.sync="pageData.current" |
17 | </lb-table> | 16 | :total="pageData.total" |
17 | @size-change="handleSizeChange" | ||
18 | @p-current-change="handleCurrentChange" | ||
19 | :column="tableData.columns" | ||
20 | :data="tableData.data" | ||
21 | > | ||
22 | </lb-table> | ||
18 | </div> | 23 | </div> |
19 | <EditDialog ref="dialogForm" /> | 24 | <EditDialog ref="addEditDialog" /> |
20 | <Roleslistdiglog ref="rolesForm" /> | 25 | <Roleslistdiglog ref="rolesForm" /> |
21 | </div> | 26 | </div> |
22 | |||
23 | </template> | 27 | </template> |
24 | <script> | 28 | <script> |
25 | // 定时任务 | 29 | // 定时任务 |
26 | import data from "./data" | 30 | import data from "./data"; |
27 | import sjsbTask from '@/api/sjsbTask.js' | 31 | import sjsbTask from "@/api/sjsbTask.js"; |
28 | import tableMixin from '@/mixins/tableMixin.js' | 32 | import tableMixin from "@/mixins/tableMixin.js"; |
29 | import EditDialog from "./edit-dialog.vue"; | 33 | import EditDialog from "./edit-dialog.vue"; |
30 | import Roleslistdiglog from "./roleslistdiglog.vue"; | 34 | import Roleslistdiglog from "./roleslistdiglog.vue"; |
31 | export default { | 35 | export default { |
32 | name: "menus", | 36 | name: "menus", |
33 | mixins: [tableMixin], | 37 | mixins: [tableMixin], |
34 | components: { | 38 | components: { |
35 | EditDialog,Roleslistdiglog | 39 | EditDialog, |
40 | Roleslistdiglog, | ||
36 | }, | 41 | }, |
37 | data () { | 42 | data() { |
38 | return { | 43 | return { |
39 | taskData: null, | 44 | taskData: null, |
40 | form: { | 45 | form: { |
41 | job_name: '', | 46 | job_name: "", |
42 | currentPage: 1 | 47 | currentPage: 1, |
43 | }, | 48 | }, |
44 | title: '', | 49 | // 当前所选角色id |
50 | roleId: "", | ||
51 | title: "", | ||
45 | queryParam: {}, | 52 | queryParam: {}, |
46 | selectType: '0', | 53 | selectType: "0", |
47 | queryName: '', | 54 | queryName: "", |
48 | organizationId: '', // 组织机构ID | 55 | organizationId: "", // 组织机构ID |
49 | departmentId: '', // 部门ID | 56 | departmentId: "", // 部门ID |
50 | departmentList: [], // 部门列表 | 57 | departmentList: [], // 部门列表 |
51 | levelList: [], // 职务级别 | 58 | levelList: [], // 职务级别 |
52 | tableData: [], | 59 | tableData: [], |
53 | sexList: [], | 60 | sexList: [], |
54 | typeOptions: [ | 61 | typeOptions: [ |
55 | { | 62 | { |
56 | value: '0', | 63 | value: "0", |
57 | label: '姓名' | 64 | label: "姓名", |
58 | }, | 65 | }, |
59 | { | 66 | { |
60 | value: '1', | 67 | value: "1", |
61 | label: '工号' | 68 | label: "工号", |
62 | }, | 69 | }, |
63 | { | 70 | { |
64 | value: '2', | 71 | value: "2", |
65 | label: '部门' | 72 | label: "部门", |
66 | }, | 73 | }, |
67 | { | 74 | { |
68 | value: '3', | 75 | value: "3", |
69 | label: '机构' | 76 | label: "机构", |
70 | } | 77 | }, |
71 | ], | 78 | ], |
72 | 79 | ||
73 | selectionList: [], | 80 | selectionList: [], |
74 | tableData: { | 81 | tableData: { |
75 | columns: [{ | 82 | columns: [ |
76 | label: '序号', | 83 | { |
77 | type: 'index', | 84 | label: "序号", |
78 | width: '50', | 85 | type: "index", |
79 | index: this.indexMethod, | 86 | width: "50", |
80 | }].concat(data.columns()).concat([ { | 87 | index: this.indexMethod, |
81 | label: "操作", | ||
82 | width: 380, | ||
83 | render: (h, scope) => { | ||
84 | return ( | ||
85 | <div> | ||
86 | <el-button type="text" size="mini" | ||
87 | icon="el-icon-video-pause" | ||
88 | onClick={() => { this.personnel(scope.row) }}>人员 | ||
89 | </el-button> | ||
90 | <el-button type="text" size="mini" | ||
91 | icon="el-icon-edit" | ||
92 | |||
93 | onClick={() => { this.handleEdit(scope.row) }}>修改 | ||
94 | </el-button> | ||
95 | <el-button type="text" size="mini" | ||
96 | icon="el-icon-delete" style="color:#F56C6C" | ||
97 | onClick={() => { this.handleDel(scope.row) }}>删除 | ||
98 | </el-button> | ||
99 | </div> | ||
100 | ); | ||
101 | }, | ||
102 | }, | 88 | }, |
103 | ]), | 89 | ] |
104 | data: [] | 90 | .concat(data.columns()) |
91 | .concat([ | ||
92 | { | ||
93 | label: "排序", | ||
94 | width: 380, | ||
95 | render: (h, scope) => { | ||
96 | return ( | ||
97 | <div> | ||
98 | <el-button | ||
99 | type="text" | ||
100 | size="mini" | ||
101 | icon="el-icon-video-pause" | ||
102 | onClick={() => { | ||
103 | this.personnel(scope.row); | ||
104 | }} | ||
105 | > | ||
106 | 人员 | ||
107 | </el-button> | ||
108 | <el-button | ||
109 | type="text" | ||
110 | size="mini" | ||
111 | icon="el-icon-edit" | ||
112 | onClick={() => { | ||
113 | this.handleEdit(scope.row); | ||
114 | }} | ||
115 | > | ||
116 | 修改 | ||
117 | </el-button> | ||
118 | </div> | ||
119 | ); | ||
120 | }, | ||
121 | }, | ||
122 | ]) | ||
123 | .concat([ | ||
124 | { | ||
125 | label: "操作", | ||
126 | width: 380, | ||
127 | render: (h, scope) => { | ||
128 | return ( | ||
129 | <div> | ||
130 | <el-button | ||
131 | type="text" | ||
132 | size="mini" | ||
133 | icon="el-icon-video-pause" | ||
134 | onClick={() => { | ||
135 | this.personnel(scope.row); | ||
136 | }} | ||
137 | > | ||
138 | 人员 | ||
139 | </el-button> | ||
140 | <el-button | ||
141 | type="text" | ||
142 | size="mini" | ||
143 | icon="el-icon-edit" | ||
144 | onClick={() => { | ||
145 | this.handleEdit(scope.row); | ||
146 | }} | ||
147 | > | ||
148 | 修改 | ||
149 | </el-button> | ||
150 | <el-button | ||
151 | type="text" | ||
152 | size="mini" | ||
153 | icon="el-icon-delete" | ||
154 | style="color:#F56C6C" | ||
155 | onClick={() => { | ||
156 | this.handleDel(scope.row); | ||
157 | }} | ||
158 | > | ||
159 | 删除 | ||
160 | </el-button> | ||
161 | </div> | ||
162 | ); | ||
163 | }, | ||
164 | }, | ||
165 | ]), | ||
166 | data: [], | ||
105 | }, | 167 | }, |
106 | pageData: { | 168 | pageData: { |
107 | total: 5, | 169 | total: 5, |
108 | pageSize: 15, | 170 | pageSize: 15, |
109 | current: 1, | 171 | current: 1, |
110 | }, | 172 | }, |
111 | } | 173 | }; |
174 | }, | ||
175 | created() { | ||
176 | this.featchData(); | ||
112 | }, | 177 | }, |
113 | methods: { | 178 | methods: { |
114 | // 新增角色 | 179 | // 新增角色 |
115 | handleAdd() { | 180 | handleAdd() { |
116 | // this.$refs.addEditDialog.menuType = this.menuType | ||
117 | // this.$refs.addEditDialog.roleId = value.id | 181 | // this.$refs.addEditDialog.roleId = value.id |
118 | // this.roleSort = value.sort ? value.sort : 0 | 182 | // this.roleSort = value.sort ? value.sort : 0 |
119 | // if (value.id) { | 183 | |
120 | // this.$refs.addEditDialog.dialogForm.roleName = value.name | 184 | this.$refs.addEditDialog.showAddEditDialog = true; |
121 | // this.$refs.addEditDialog.dialogForm.roleType = value.type | 185 | this.$refs.addEditDialog.dialogTitle = "新增"; |
122 | // this.$refs.addEditDialog.dialogForm.roleTextArea = value.description | ||
123 | // } | ||
124 | this.$refs.dialogForm.showAddEditDialog = true | ||
125 | // this.$refs.addEditDialog.dialogTitle = value.id ? '修改' : '新增' | ||
126 | }, | 186 | }, |
127 | // 修改角色 | 187 | // 修改角色 |
128 | handleEdit(row) { | 188 | handleEdit(row) { |
129 | // this.$refs.addEditDialog.menuType = this.menuType | 189 | this.$refs.addEditDialog.roleId = row.id; |
130 | // this.$refs.addEditDialog.roleId = row.id | 190 | this.roleSort = row.sort ? row.sort : 0; |
131 | // this.roleSort = row.sort ? row.sort : 0 | 191 | if (row.id) { |
132 | // if (row.id) { | 192 | this.$refs.addEditDialog.dialogForm.roleName = row.name; |
133 | // this.$refs.addEditDialog.dialogForm.roleName = row.name | 193 | this.$refs.addEditDialog.dialogForm.roleType = row.type; |
134 | // this.$refs.addEditDialog.dialogForm.roleType = row.type | 194 | this.$refs.addEditDialog.dialogForm.roleTextArea = row.description; |
135 | // this.$refs.addEditDialog.dialogForm.roleTextArea = row.description | 195 | } |
136 | // } | 196 | this.$refs.addEditDialog.showAddEditDialog = true; |
137 | this.$refs.dialogForm.showAddEditDialog = true | 197 | this.$refs.addEditDialog.dialogTitle = "修改"; |
138 | // this.$refs.addEditDialog.dialogTitle = row.id ? '修改' : '新增' | ||
139 | }, | 198 | }, |
140 | featchData () { | 199 | featchData() { |
141 | 200 | this.tableData.data = [ | |
142 | this.tableData.data = [ | ||
143 | { | 201 | { |
144 | job_name: "人事部材料管理员", | 202 | id: "2176e915-fdb4-414a-b8d6-6cf63171cffc", |
145 | description: "材料管理员", | 203 | createdAt: "2022-10-31T07:08:29.293+0000", |
146 | cron_expression: "管理内部材料", | 204 | updatedAt: "2022-10-31T07:08:29.293+0000", |
205 | createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e", | ||
206 | updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e", | ||
207 | sort: 29, | ||
208 | name: "人事部材料管理员", | ||
209 | type: "材料管理员", | ||
210 | category: 2, | ||
211 | description: "管理内部材料", | ||
212 | _X_ROW_KEY: "row_365", | ||
147 | }, | 213 | }, |
148 | ] | 214 | ]; |
149 | }, | 215 | }, |
150 | 216 | ||
151 | personnel(){ | 217 | personnel() { |
152 | this.$refs.rolesForm.adds(); | 218 | this.$refs.rolesForm.adds(); |
153 | // this.$refs.rolesForm.title = "人员配置"; | 219 | this.$refs.rolesForm.title = "人员配置"; |
154 | }, | 220 | }, |
155 | handleDel (row) { | 221 | handleDel(row) { |
156 | this.$confirm('此操将进行删除操作, 是否继续?', '提示', { | 222 | this.$confirm("此操将进行删除操作, 是否继续?", "提示", { |
157 | confirmButtonText: '确定', | 223 | confirmButtonText: "确定", |
158 | cancelButtonText: '取消', | 224 | cancelButtonText: "取消", |
159 | type: 'warning', | 225 | type: "warning", |
160 | }) | 226 | }) |
161 | .then(() => { | 227 | .then(() => { |
162 | sjsbTask.sjsbTaskRemove(row.id) | 228 | sjsbTask |
229 | .sjsbTaskRemove(row.id) | ||
163 | .then((res) => { | 230 | .then((res) => { |
164 | if ((res.code = 200)) { | 231 | if ((res.code = 200)) { |
165 | this.$message({ | 232 | this.$message({ |
166 | type: 'success', | 233 | type: "success", |
167 | message: res.message, | 234 | message: res.message, |
168 | }) | 235 | }); |
169 | this.featchData() | 236 | this.featchData(); |
170 | } | 237 | } |
171 | }) | 238 | }) |
172 | .catch((error) => { | 239 | .catch((error) => { |
173 | this.$alert(error, '提示', { | 240 | this.$alert(error, "提示", { |
174 | confirmButtonText: '确定', | 241 | confirmButtonText: "确定", |
175 | type: 'error' | 242 | type: "error", |
176 | }) | 243 | }); |
177 | }) | 244 | }); |
178 | }) | 245 | }) |
179 | .catch(() => { | 246 | .catch(() => { |
180 | this.$message({ | 247 | this.$message({ |
181 | type: 'info', | 248 | type: "info", |
182 | message: '已取消', | 249 | message: "已取消", |
183 | }) | 250 | }); |
184 | }) | 251 | }); |
185 | } | 252 | }, |
186 | } | 253 | }, |
187 | } | 254 | }; |
188 | </script> | 255 | </script> |
189 | <style scoped lang="scss"> | 256 | <style scoped lang="scss"> |
190 | @import "~@/styles/mixin.scss"; | 257 | @import "~@/styles/mixin.scss"; | ... | ... |
1 | <template> | 1 | <template> |
2 | <Dialog :title="title" :show.sync="visible" :width="'715px'" @close="close()"> | 2 | <Dialog |
3 | :title="title" | ||
4 | class="tableClass" | ||
5 | :show.sync="visible" | ||
6 | :width="'715px'" | ||
7 | @close="close()" | ||
8 | > | ||
3 | <template slot="content"> | 9 | <template slot="content"> |
4 | <vxe-table | 10 | <lb-table |
5 | show-overflow | 11 | ref="multipleTable" |
6 | :data="memberList" | 12 | :pagination="false" |
7 | border | 13 | :column="tableData.column" |
8 | class="header-bg-type1" | 14 | :data="tableData.data" |
9 | auto-resize | 15 | @selection-change="handleSelectionChange" |
10 | :checkbox-config="{ highlight: true, range: true }" | ||
11 | highlight-hover-row | ||
12 | max-height="500px" | ||
13 | :empty-render="{ name: 'NotData' }" | ||
14 | > | 16 | > |
15 | <template #empty> | 17 | </lb-table> |
16 | <table-empty /> | ||
17 | </template> | ||
18 | <vxe-table-column | ||
19 | type="checkbox" | ||
20 | width="60" | ||
21 | align="left" | ||
22 | fixed="left" | ||
23 | /> | ||
24 | <vxe-table-column | ||
25 | field="code" | ||
26 | title="工号" | ||
27 | fixed="left" | ||
28 | min-width="100" | ||
29 | show-header-overflow="tooltip" | ||
30 | show-overflow="tooltip" | ||
31 | align="left" | ||
32 | /> | ||
33 | <vxe-table-column | ||
34 | title="姓名" | ||
35 | fixed="left" | ||
36 | show-header-overflow="tooltip" | ||
37 | show-overflow="tooltip" | ||
38 | > | ||
39 | <template slot-scope="scope"> | ||
40 | <svg-icon | ||
41 | :icon-class=" | ||
42 | scope.row.sex === '0' | ||
43 | ? 'male' | ||
44 | : scope.row.sex === '1' | ||
45 | ? 'female' | ||
46 | : 'secrecy' | ||
47 | " | ||
48 | /> | ||
49 | {{ scope.row.name }} | ||
50 | </template> | ||
51 | </vxe-table-column> | ||
52 | <vxe-table-column | ||
53 | field="loginName" | ||
54 | title="用户名" | ||
55 | fixed="left" | ||
56 | show-header-overflow="tooltip" | ||
57 | show-overflow="tooltip" | ||
58 | /> | ||
59 | <vxe-table-column | ||
60 | field="departmentName" | ||
61 | title="部门" | ||
62 | show-header-overflow="tooltip" | ||
63 | show-overflow="tooltip" | ||
64 | /> | ||
65 | </vxe-table> | ||
66 | </template> | 18 | </template> |
67 | <template slot="footer"> | 19 | <template slot="footer"> |
68 | <el-button type="primary" class="save" @click="submitForm(1)" | 20 | <el-button type="primary" class="save" @click="handleSaveMember()" |
69 | >保存</el-button | 21 | >保存</el-button |
70 | > | 22 | > |
71 | <el-button class="cancel-button" @click="close()">取消</el-button> | 23 | <el-button class="cancel-button" @click="close()">取消</el-button> |
... | @@ -81,57 +33,92 @@ export default { | ... | @@ -81,57 +33,92 @@ export default { |
81 | props: {}, | 33 | props: {}, |
82 | data() { | 34 | data() { |
83 | return { | 35 | return { |
84 | form: { | 36 | title: "人员配置", |
85 | sex: "0", | 37 | visible: false, |
86 | }, | 38 | |
87 | memberList: [ | 39 | hasSelectList: [ |
88 | { | 40 | { |
89 | id: "3127e455-43ba-45ff-9326-0e02ef89485e", | 41 | name: "管理员", |
90 | createdAt: null, | 42 | loginName: "admin1", |
91 | updatedAt: "2022-08-04T03:38:27.626+0000", | 43 | departmentName: "研发部", |
92 | createdBy: null, | ||
93 | updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e", | ||
94 | sort: 1, | ||
95 | name: "超级管理员", | ||
96 | loginName: "admin", | ||
97 | password: "05eb15777e8fd1d61c840472e7267f61d432f63340d86b59", | ||
98 | passwordSalt: "5178114777136485", | ||
99 | email: null, | ||
100 | lastLoginTime: null, | ||
101 | mobilePhone: "18291003568", | ||
102 | status: "ACTIVE", | ||
103 | passwordChangeTime: "2021-12-10T08:01:01.569+0000", | ||
104 | idCard: "612725202111021521", | ||
105 | departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b", | ||
106 | organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa", | ||
107 | sex: "0", | ||
108 | isDuty: true, | ||
109 | code: "123324", | ||
110 | jobLevel: null, | 44 | jobLevel: null, |
111 | telephone: "028-87720898", | 45 | }, |
112 | address: "办公地点修改测试", | 46 | { |
113 | isLocked: false, | 47 | name: "测试账号", |
48 | loginName: "admin2", | ||
114 | departmentName: "研发部", | 49 | departmentName: "研发部", |
115 | _X_ROW_KEY: "row_276", | 50 | jobLevel: null, |
116 | }, | 51 | }, |
117 | ], | 52 | ], //已经选择的id组成的数组 |
118 | title: "", | 53 | tableData: { |
119 | type: "", | 54 | column: [ |
120 | visible: false, | 55 | { |
121 | showLoginName: false, | 56 | type: "selection", |
122 | options: [], | 57 | }, |
123 | setProps: { | 58 | { |
124 | value: "id", | 59 | prop: "name", |
125 | label: "name", | 60 | label: "姓名", |
126 | children: "children", | 61 | }, |
127 | expandTrigger: "hover", | 62 | { |
128 | checkStrictly: true, // 可取消关联,选择任意一级选项 | 63 | prop: "loginName", |
129 | emitPath: false, | 64 | label: "用户名", |
65 | }, | ||
66 | { | ||
67 | prop: "departmentName", | ||
68 | label: "部门", | ||
69 | }, | ||
70 | { | ||
71 | prop: "jobLevel", | ||
72 | label: "职务", | ||
73 | }, | ||
74 | ], | ||
75 | data: [ | ||
76 | { | ||
77 | id: "3127e455-43ba-45ff-9326-0e02ef89485e", | ||
78 | createdAt: null, | ||
79 | updatedAt: "2022-08-04T03:38:27.626+0000", | ||
80 | createdBy: null, | ||
81 | updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e", | ||
82 | sort: 1, | ||
83 | name: "超级管理员", | ||
84 | loginName: "admin", | ||
85 | password: "05eb15777e8fd1d61c840472e7267f61d432f63340d86b59", | ||
86 | passwordSalt: "5178114777136485", | ||
87 | email: null, | ||
88 | lastLoginTime: null, | ||
89 | mobilePhone: "18291003568", | ||
90 | status: "ACTIVE", | ||
91 | passwordChangeTime: "2021-12-10T08:01:01.569+0000", | ||
92 | idCard: "612725202111021521", | ||
93 | departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b", | ||
94 | organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa", | ||
95 | sex: "0", | ||
96 | isDuty: true, | ||
97 | code: "123324", | ||
98 | jobLevel: null, | ||
99 | telephone: "028-87720898", | ||
100 | address: "办公地点修改测试", | ||
101 | isLocked: false, | ||
102 | departmentName: "研发部", | ||
103 | _X_ROW_KEY: "row_276", | ||
104 | }, | ||
105 | { | ||
106 | name: "管理员", | ||
107 | loginName: "admin1", | ||
108 | departmentName: "研发部", | ||
109 | jobLevel: null, | ||
110 | selectStatus: 0, | ||
111 | }, | ||
112 | { | ||
113 | name: "测试账号", | ||
114 | loginName: "admin2", | ||
115 | departmentName: "研发部", | ||
116 | jobLevel: null, | ||
117 | selectStatus: 0, | ||
118 | }, | ||
119 | ], | ||
130 | }, | 120 | }, |
131 | sexList: [], | 121 | multipleSelection: [], |
132 | levelList: [], | ||
133 | organizationId: "", // 组织机构ID | ||
134 | departmentId: "", // 部门ID | ||
135 | }; | 122 | }; |
136 | }, | 123 | }, |
137 | computed: {}, | 124 | computed: {}, |
... | @@ -141,33 +128,49 @@ export default { | ... | @@ -141,33 +128,49 @@ export default { |
141 | methods: { | 128 | methods: { |
142 | adds() { | 129 | adds() { |
143 | this.visible = true; | 130 | this.visible = true; |
131 | this.tableData.data.forEach((item, index) => { | ||
132 | if (item.selectStatus === 0) { | ||
133 | this.$nextTick(() => { | ||
134 | this.$refs.multipleTable.toggleRowSelection( | ||
135 | this.tableData.data[index], | ||
136 | true | ||
137 | ); | ||
138 | }); | ||
139 | } | ||
140 | }); | ||
144 | }, | 141 | }, |
145 | edit(record) { | ||
146 | this.visible = true; | ||
147 | }, | ||
148 | handleChange(value) { | ||
149 | this.form.departmentId = value; | ||
150 | }, | ||
151 | |||
152 | close() { | 142 | close() { |
153 | // this.resetForm() | ||
154 | this.visible = false; | 143 | this.visible = false; |
155 | }, | 144 | }, |
145 | // 保存事件 | ||
146 | handleSaveMember() { | ||
147 | // if (this.memberList.length === 0) { | ||
148 | // this.$message.warning("请添加待选人员"); | ||
149 | // return false; | ||
150 | // } | ||
151 | // const idList = this.memberList.map(item => item.id) | ||
152 | // updateUser(this.roleId, idList).then(res => { | ||
153 | // if (res.status === 1) { | ||
154 | // this.$message.success({ message: '保存成功', showClose: true }) | ||
155 | // this.showMemberConfigDialog = false | ||
156 | // this.$emit('setUsers', this.roleId) | ||
157 | // this.resetMemberConfig() | ||
158 | // } else this.$message.error({ message: res.message, showClose: true }) | ||
159 | // }) | ||
160 | }, | ||
161 | handleSelectionChange(val) { | ||
162 | this.multipleSelection = val; | ||
163 | }, | ||
156 | }, | 164 | }, |
157 | }; | 165 | }; |
158 | </script> | 166 | </script> |
159 | <style scoped lang="scss"> | 167 | <style scoped lang="scss"> |
160 | .el-form { | 168 | /deep/.el-dialog__header{ |
161 | .el-form-item__content { | 169 | text-align: center; |
162 | .el-radio { | 170 | margin-bottom: 10px; |
163 | margin-right: 6px; | 171 | .el-dialog__title{ |
164 | } | 172 | color: white; |
165 | } | ||
166 | .el-checkbox { | ||
167 | line-height: 40px; | ||
168 | } | ||
169 | .col-pd0 { | ||
170 | padding: 0 !important; | ||
171 | } | ||
172 | } | 173 | } |
174 | } | ||
175 | |||
173 | </style> | 176 | </style> | ... | ... |
... | @@ -222,17 +222,16 @@ export default { | ... | @@ -222,17 +222,16 @@ export default { |
222 | }; | 222 | }; |
223 | </script> | 223 | </script> |
224 | <style scoped lang="scss"> | 224 | <style scoped lang="scss"> |
225 | .el-form { | 225 | /deep/.el-input__inner { |
226 | .el-form-item__content { | 226 | background: #07388B; |
227 | .el-radio { | 227 | border-radius: 2px; |
228 | margin-right: 6px; | 228 | border: 1px solid #6BC1FC; |
229 | } | 229 | } |
230 | } | 230 | /deep/.el-textarea__inner{ |
231 | .el-checkbox { | 231 | background: #07388B; |
232 | line-height: 40px; | 232 | color: #fff; |
233 | } | 233 | } |
234 | .col-pd0 { | 234 | /deep/.el-form-item__label{ |
235 | padding: 0 !important; | 235 | color:#fff; |
236 | } | ||
237 | } | 236 | } |
238 | </style> | 237 | </style> | ... | ... |
... | @@ -7,10 +7,6 @@ | ... | @@ -7,10 +7,6 @@ |
7 | <el-col :span="2" class="btnColRight"> | 7 | <el-col :span="2" class="btnColRight"> |
8 | <el-form-item> | 8 | <el-form-item> |
9 | <btn nativeType="cx" @click="handleAdd">添加人员</btn> | 9 | <btn nativeType="cx" @click="handleAdd">添加人员</btn> |
10 | <!-- <btn nativeType="cx" @click="resetPassword(selectionRows)" | ||
11 | >重置密码</btn | ||
12 | > | ||
13 | <btn nativeType="cx" @click="resetSearch()">重置</btn> --> | ||
14 | </el-form-item> | 10 | </el-form-item> |
15 | </el-col> | 11 | </el-col> |
16 | </el-row> | 12 | </el-row> |
... | @@ -33,6 +29,13 @@ | ... | @@ -33,6 +29,13 @@ |
33 | </template> | 29 | </template> |
34 | <script> | 30 | <script> |
35 | // 定时任务 | 31 | // 定时任务 |
32 | import { | ||
33 | getUuid, | ||
34 | judgeSort, | ||
35 | realMove, | ||
36 | findParents, | ||
37 | removeTreeListItem, | ||
38 | } from "@/utils/operation"; | ||
36 | import data from "./data"; | 39 | import data from "./data"; |
37 | import sjsbTask from "@/api/sjsbTask.js"; | 40 | import sjsbTask from "@/api/sjsbTask.js"; |
38 | import tableMixin from "@/mixins/tableMixin.js"; | 41 | import tableMixin from "@/mixins/tableMixin.js"; |
... | @@ -94,7 +97,28 @@ export default { | ... | @@ -94,7 +97,28 @@ export default { |
94 | label: "排序", | 97 | label: "排序", |
95 | width: 380, | 98 | width: 380, |
96 | render: (h, scope) => { | 99 | render: (h, scope) => { |
97 | return <div></div>; | 100 | return ( |
101 | <div> | ||
102 | <el-button | ||
103 | type="text" | ||
104 | disabled={scope.row.isTop} | ||
105 | onClick={() => { | ||
106 | this.moveUpward(scope.$index, scope.row); | ||
107 | }} | ||
108 | > | ||
109 | 上移 | ||
110 | </el-button> | ||
111 | <el-button | ||
112 | type="text" | ||
113 | disabled={scope.row.isBottom} | ||
114 | onClick={() => { | ||
115 | this.moveDown(scope.$index, scope.row); | ||
116 | }} | ||
117 | > | ||
118 | 下移 | ||
119 | </el-button> | ||
120 | </div> | ||
121 | ); | ||
98 | }, | 122 | }, |
99 | }, | 123 | }, |
100 | { | 124 | { |
... | @@ -213,7 +237,7 @@ export default { | ... | @@ -213,7 +237,7 @@ export default { |
213 | address: null, | 237 | address: null, |
214 | _X_ROW_KEY: "row_43", | 238 | _X_ROW_KEY: "row_43", |
215 | switch: true, | 239 | switch: true, |
216 | } | 240 | }, |
217 | ]; | 241 | ]; |
218 | }, | 242 | }, |
219 | // 重置搜索 | 243 | // 重置搜索 |
... | @@ -256,6 +280,21 @@ export default { | ... | @@ -256,6 +280,21 @@ export default { |
256 | }) | 280 | }) |
257 | .catch(() => {}); | 281 | .catch(() => {}); |
258 | }, | 282 | }, |
283 | // 上移下移 | ||
284 | moveUpward(index, row) { | ||
285 | console.log("index",index); | ||
286 | console.log("row",row); | ||
287 | realMove(row.bsmDict, "UP", this.tableData); | ||
288 | this.key++; | ||
289 | let id = findParents(this.tableData, row.bsmDict); | ||
290 | this.keyList = id; | ||
291 | }, | ||
292 | moveDown(index, row) { | ||
293 | realMove(row.bsmDict, "DOWN", this.tableData); | ||
294 | this.key++; | ||
295 | let id = findParents(this.tableData, row.bsmDict); | ||
296 | this.keyList = id; | ||
297 | }, | ||
259 | // 重置用户密码 | 298 | // 重置用户密码 |
260 | resetPassword(data) { | 299 | resetPassword(data) { |
261 | const ids = []; | 300 | const ids = []; | ... | ... |
1 | <template> | 1 | <template> |
2 | <!-- 编辑 --> | 2 | <!-- 编辑 --> |
3 | <dialogBox title="操作内容" @closeDialog="closeDialog" @submitForm="handleSubmit" v-model="myValue"> | 3 | <dialogBox title="操作内容" @closeDialog="closeDialog" @submitForm="handleSubmit" v-model="myValue"> |
4 | <p>2222222222222222222222</p> | 4 | <p>2</p> |
5 | </dialogBox> | 5 | </dialogBox> |
6 | </template> | 6 | </template> |
7 | 7 | ||
... | @@ -29,4 +29,4 @@ export default { | ... | @@ -29,4 +29,4 @@ export default { |
29 | } | 29 | } |
30 | } | 30 | } |
31 | } | 31 | } |
32 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
32 | </script> | ... | ... |
-
Please register or sign in to post a comment