Merge branch 'master' of http://yun.pashanhoo.com:9090/bdc/bdcjg-web
Showing
16 changed files
with
338 additions
and
204 deletions
| 1 | /* | ||
| 2 | * @Author: yangwei | ||
| 3 | * @Date: 2023-02-24 15:12:45 | ||
| 4 | * @LastEditors: yangwei | ||
| 5 | * @LastEditTime: 2023-03-14 10:45:11 | ||
| 6 | * @FilePath: \bdcjg-web\src\api\authorityManage.js | ||
| 7 | * @Description: | ||
| 8 | * | ||
| 9 | * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. | ||
| 10 | */ | ||
| 1 | 11 | ||
| 2 | import { getParams } from './util' | 12 | import { getParams } from './util' |
| 3 | import { | 13 | import { |
| ... | @@ -8,16 +18,16 @@ import { | ... | @@ -8,16 +18,16 @@ import { |
| 8 | } from './manageApi' | 18 | } from './manageApi' |
| 9 | /** 角色管理开始 */ | 19 | /** 角色管理开始 */ |
| 10 | // 获取角色列表 by categoryId | 20 | // 获取角色列表 by categoryId |
| 11 | export const getRolesById = categoryId => { | 21 | export const getRolesById = categoryIdList => { |
| 12 | const conditionGroup = { | 22 | const conditionGroup = { |
| 13 | conditions: [ | 23 | conditions: [ |
| 14 | { | 24 | { |
| 15 | property: 'category', | 25 | property: 'category', |
| 16 | value: categoryId, | 26 | value: categoryIdList, |
| 17 | operator: 'EQ' | 27 | operator: 'IN' |
| 18 | } | 28 | } |
| 19 | ], | 29 | ], |
| 20 | queryRelation: 'AND' | 30 | queryRelation: 'AND', |
| 21 | } | 31 | } |
| 22 | const params = getParams(conditionGroup) | 32 | const params = getParams(conditionGroup) |
| 23 | return getAction(api.roles, params) | 33 | return getAction(api.roles, params) | ... | ... |
src/api/orders.js
0 → 100644
| 1 | import request from '@/utils/request' | ||
| 2 | import SERVER from './config' | ||
| 3 | |||
| 4 | /* | ||
| 5 | 更新排序 | ||
| 6 | record-排序整条数据 | ||
| 7 | operate-BOTTOM(置底), DOWN(向下), TOP(置顶), UP(向上) | ||
| 8 | */ | ||
| 9 | export function updateOrder(url, record, operate, swapId) { | ||
| 10 | return request({ | ||
| 11 | url: SERVER.MANAGEMENTAPI + url + "/" + record.id + "/orders", | ||
| 12 | method: "put", | ||
| 13 | params: { | ||
| 14 | operate: operate, | ||
| 15 | swapId: swapId, | ||
| 16 | }, | ||
| 17 | }); | ||
| 18 | } |
| ... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
| 17 | data () { | 17 | data () { |
| 18 | return { | 18 | return { |
| 19 | options: {}, | 19 | options: {}, |
| 20 | max: "100", //最大value值 | 20 | max: "5000", //最大value值 |
| 21 | min: "1", // 最小value值 | 21 | min: "1", // 最小value值 |
| 22 | key: 0, | 22 | key: 0, |
| 23 | mapjson: "", | 23 | mapjson: "", |
| ... | @@ -87,10 +87,10 @@ | ... | @@ -87,10 +87,10 @@ |
| 87 | itemGap: 2, // 每两个图元之间的间隔距离,单位为px | 87 | itemGap: 2, // 每两个图元之间的间隔距离,单位为px |
| 88 | pieces: [ | 88 | pieces: [ |
| 89 | // 自定义每一段的范围,以及每一段的文字 | 89 | // 自定义每一段的范围,以及每一段的文字 |
| 90 | { gte: 100, label: "100以上", color: "#035cf5" }, // 不指定 max,表示 max 为无限大(Infinity)。 | 90 | { gte: 100, label: "5000以上", color: "#035cf5" }, // 不指定 max,表示 max 为无限大(Infinity)。 |
| 91 | { gte: 50, lte: 6000, label: "20-100", color: "#3375e4" }, | 91 | { gte: 50, lte: 6000, label: "1000-5000", color: "#3375e4" }, |
| 92 | { gte: 20, lte: 2000, label: "1-200", color: "#6797ef" }, | 92 | { gte: 20, lte: 2000, label: "500-1000", color: "#6797ef" }, |
| 93 | { gte: 1, lte: 1000, label: "1-20", color: "#96b5ef" }, | 93 | { gte: 1, lte: 1000, label: "0-500", color: "#96b5ef" }, |
| 94 | ], | 94 | ], |
| 95 | textStyle: { | 95 | textStyle: { |
| 96 | color: "#737373", | 96 | color: "#737373", | ... | ... |
| ... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
| 26 | watch: { | 26 | watch: { |
| 27 | cdata: { | 27 | cdata: { |
| 28 | handler (newData) { | 28 | handler (newData) { |
| 29 | 29 | console.log("newData", newData); | |
| 30 | this.options = { | 30 | this.options = { |
| 31 | color: [ | 31 | color: [ |
| 32 | "#37a2da", | 32 | "#37a2da", |
| ... | @@ -34,31 +34,29 @@ | ... | @@ -34,31 +34,29 @@ |
| 34 | "#9fe6b8", | 34 | "#9fe6b8", |
| 35 | "#ffdb5c", | 35 | "#ffdb5c", |
| 36 | "#ff9f7f", | 36 | "#ff9f7f", |
| 37 | "#8378ea", | ||
| 38 | "#fb7293", | 37 | "#fb7293", |
| 39 | "#e7bcf3", | 38 | "#e7bcf3", |
| 39 | "#8378ea" | ||
| 40 | 40 | ||
| 41 | ], | 41 | ], |
| 42 | tooltip: { | ||
| 43 | trigger: "item", | ||
| 44 | formatter: "<br/>{b} : {c} ({d}%)", | ||
| 45 | }, | ||
| 42 | series: [ | 46 | series: [ |
| 43 | { | 47 | { |
| 44 | name: "Access From", | 48 | name: "Access From", |
| 45 | type: "pie", | 49 | type: "pie", |
| 46 | radius: ["54%", "70%"], | ||
| 47 | avoidLabelOverlap: true, | 50 | avoidLabelOverlap: true, |
| 48 | label: { | 51 | label: { |
| 49 | formatter: (params) => { | 52 | formatter: (params) => { |
| 50 | // console.log(params) | 53 | return `${params.name}`; |
| 51 | return `${params.name}\n(${params.value})`; | ||
| 52 | }, | 54 | }, |
| 53 | position: "outer", | 55 | position: "outer", |
| 54 | alignTo: "edge", | 56 | alignTo: "edge", |
| 55 | margin: 5 | 57 | margin: 5 |
| 56 | }, | 58 | }, |
| 57 | labelLine: { | 59 | |
| 58 | lineStyle: { | ||
| 59 | width: 3, | ||
| 60 | }, | ||
| 61 | }, | ||
| 62 | data: newData.seriesData, | 60 | data: newData.seriesData, |
| 63 | } | 61 | } |
| 64 | ], | 62 | ], | ... | ... |
| ... | @@ -5,57 +5,71 @@ | ... | @@ -5,57 +5,71 @@ |
| 5 | </template> | 5 | </template> |
| 6 | 6 | ||
| 7 | <script> | 7 | <script> |
| 8 | import Chart from "./Chart"; | 8 | import Chart from "./Chart"; |
| 9 | import work from "@/api/work"; | 9 | import work from "@/api/work"; |
| 10 | export default { | 10 | export default { |
| 11 | data() { | 11 | data () { |
| 12 | return { | 12 | return { |
| 13 | cdata: { | 13 | cdata: { |
| 14 | seriesData: [], | 14 | seriesData: [], |
| 15 | }, | 15 | }, |
| 16 | getdata: [], | ||
| 16 | }; | 17 | }; |
| 17 | }, | 18 | }, |
| 18 | components: { | 19 | components: { |
| 19 | Chart, | 20 | Chart, |
| 20 | }, | 21 | }, |
| 21 | mounted() { | 22 | mounted () { |
| 22 | this.getdjywltotal(); | 23 | this.addhousetotal(); |
| 23 | window.addEventListener("resize", () => { | 24 | window.addEventListener("resize", () => { |
| 24 | this.cdata.seriesData = []; | 25 | this.getdata = []; |
| 25 | this.getdjywltotal(); | 26 | this.addhousetotal(); |
| 26 | }); | 27 | }); |
| 28 | |||
| 27 | }, | 29 | }, |
| 28 | methods: { | 30 | methods: { |
| 29 | // 获取登记业务量玫瑰图数据 | 31 | async addhousetotal () { |
| 30 | async getdjywltotal() { | 32 | if (this.getdata.length == 0) { |
| 31 | if (this.cdata.seriesData.length == 0) { | 33 | this.getdata = []; |
| 32 | try { | 34 | try { |
| 33 | let p = { | 35 | let { result: res } = await work.addhousetotal(); |
| 34 | DJLX: "", | 36 | res.map((item) => { |
| 35 | QLLX: "", | ||
| 36 | XZQDM: "", | ||
| 37 | }; | ||
| 38 | this.cdata.seriesData = []; | ||
| 39 | let res = await work.getdjywltotal(p); | ||
| 40 | if(this.cdata.seriesData.length == 0){ | ||
| 41 | res.result.map((item) => { | ||
| 42 | return this.cdata.seriesData.push({ | 37 | return this.cdata.seriesData.push({ |
| 43 | name: item.AREACODE, | 38 | name: `${item.fwyt + '(' + item.fwxz})`, |
| 44 | value: item.ywtotal, | 39 | value: item.mj, |
| 45 | }); | 40 | }); |
| 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); |
| 54 | } | 47 | } |
| 55 | } | 48 | } |
| 49 | let delarr = this.cdata.seriesData.sort(this.up) | ||
| 50 | this.setadat(delarr) | ||
| 51 | |||
| 56 | }, | 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 | }) | ||
| 57 | }, | 67 | }, |
| 58 | }; | 68 | // 排序方法 |
| 69 | up (x, y) { return y.value - x.value } | ||
| 70 | |||
| 71 | } | ||
| 72 | }; | ||
| 59 | </script> | 73 | </script> |
| 60 | 74 | ||
| 61 | <style lang="scss" scoped></style> | 75 | <style lang="scss" scoped></style> | ... | ... |
| ... | @@ -2,7 +2,8 @@ | ... | @@ -2,7 +2,8 @@ |
| 2 | <div class="navbar-con"> | 2 | <div class="navbar-con"> |
| 3 | <div class="navbar"> | 3 | <div class="navbar"> |
| 4 | <div class="logo"> | 4 | <div class="logo"> |
| 5 | <img :src="require('@/image/logo.png')" alt="" /> | 5 | <img :src="require('@/image/bdclogo.png')" alt="" /> |
| 6 | <h4>不动产登记上报系统</h4> | ||
| 6 | </div> | 7 | </div> |
| 7 | <div class="right-menu"> | 8 | <div class="right-menu"> |
| 8 | <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand"> | 9 | <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand"> |
| ... | @@ -20,10 +21,10 @@ | ... | @@ -20,10 +21,10 @@ |
| 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 | }, |
| ... | @@ -50,25 +51,35 @@ export default { | ... | @@ -50,25 +51,35 @@ export default { |
| 50 | } | 51 | } |
| 51 | } | 52 | } |
| 52 | } | 53 | } |
| 53 | } | 54 | } |
| 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; |
| 64 | display: flex; | ||
| 65 | img { | ||
| 66 | width: 47px; | ||
| 67 | height: 47px; | ||
| 68 | } | ||
| 69 | h4 { | ||
| 70 | margin-left: 20px; | ||
| 71 | height: 50px; | ||
| 72 | line-height: 50px; | ||
| 73 | } | ||
| 74 | } | ||
| 63 | } | 75 | } |
| 64 | } | ||
| 65 | 76 | ||
| 66 | .NoticeBar { | 77 | .NoticeBar { |
| 67 | position: absolute; | 78 | position: absolute; |
| 68 | bottom: 0; | 79 | bottom: 0; |
| 69 | } | 80 | } |
| 70 | 81 | ||
| 71 | .el-dropdown-menu { | 82 | .el-dropdown-menu { |
| 72 | padding: 0 !important; | 83 | padding: 0 !important; |
| 73 | border: 1px solid #ebeef5; | 84 | border: 1px solid #ebeef5; |
| 74 | box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12); | 85 | box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12); |
| ... | @@ -101,13 +112,13 @@ export default { | ... | @@ -101,13 +112,13 @@ export default { |
| 101 | background: #f6f7f9; | 112 | background: #f6f7f9; |
| 102 | color: #4a4a4a; | 113 | color: #4a4a4a; |
| 103 | } | 114 | } |
| 104 | } | 115 | } |
| 105 | 116 | ||
| 106 | .navbar { | 117 | .navbar { |
| 107 | height: $headerHeight; | 118 | height: $headerHeight; |
| 108 | overflow: hidden; | 119 | overflow: hidden; |
| 109 | position: relative; | 120 | position: relative; |
| 110 | background: #3D59C4; | 121 | background: linear-gradient(270deg, #ebf1ff 0%, #3d59c4 100%); |
| 111 | display: flex; | 122 | display: flex; |
| 112 | align-items: center; | 123 | align-items: center; |
| 113 | padding-right: 20px; | 124 | padding-right: 20px; |
| ... | @@ -229,5 +240,5 @@ export default { | ... | @@ -229,5 +240,5 @@ export default { |
| 229 | } | 240 | } |
| 230 | } | 241 | } |
| 231 | } | 242 | } |
| 232 | } | 243 | } |
| 233 | </style> | 244 | </style> | ... | ... |
| ... | @@ -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,13 +19,13 @@ | ... | @@ -19,13 +19,13 @@ |
| 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 { |
| ... | @@ -51,6 +51,10 @@ export default { | ... | @@ -51,6 +51,10 @@ export default { |
| 51 | asyncRoutes () { | 51 | asyncRoutes () { |
| 52 | return asyncRoutes | 52 | return asyncRoutes |
| 53 | } | 53 | } |
| 54 | }, | ||
| 55 | mounted () { | ||
| 56 | console.log("this. permission_routes", this.permission_routes); | ||
| 57 | |||
| 58 | } | ||
| 54 | } | 59 | } |
| 55 | } | ||
| 56 | </script> | 60 | </script> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="rightcard"> | 2 | <div class="rightcard"> |
| 3 | <div class="card2 cardCon mt-10"> | ||
| 4 | <div class="cardhead">登记业务量</div> | ||
| 5 | <Rose /> | ||
| 6 | </div> | ||
| 7 | <div class="card1 cardCon d-center"> | 3 | <div class="card1 cardCon d-center"> |
| 8 | <div class="cardhead">新建国有房屋信息</div> | 4 | <div class="cardhead">登记业务量</div> |
| 9 | <div class="cardcontent" style="margin-top: .3646rem"> | 5 | <div class="cardcontent" style="margin-top: .3646rem"> |
| 10 | <dv-scroll-board v-if="config.data.length > 0" :config="config" class="board" /> | 6 | <dv-scroll-board v-if="config.data.length > 0" :config="config" class="board" /> |
| 11 | <div v-else class="nodata">暂无数据</div> | 7 | <div v-else class="nodata">暂无数据</div> |
| 12 | </div> | 8 | </div> |
| 13 | </div> | 9 | </div> |
| 14 | 10 | <div class="card2 cardCon mt-10"> | |
| 11 | <div class="cardhead">新建国有房屋信息</div> | ||
| 12 | <Rose /> | ||
| 13 | </div> | ||
| 15 | <div class="card3 cardCon mt-10"> | 14 | <div class="card3 cardCon mt-10"> |
| 16 | <div class="cardhead">登记类型总量</div> | 15 | <div class="cardhead">登记类型总量</div> |
| 17 | <columnarsmat /> | 16 | <columnarsmat /> |
| ... | @@ -30,7 +29,8 @@ | ... | @@ -30,7 +29,8 @@ |
| 30 | headerBGC: '#016AC5', | 29 | headerBGC: '#016AC5', |
| 31 | oddRowBGC: '#154295', | 30 | oddRowBGC: '#154295', |
| 32 | evenRowBGC: '#154295', | 31 | evenRowBGC: '#154295', |
| 33 | header: ['序号', '用途', '性质', '面积'], | 32 | header: ['序号', '业务名称', '登记业务量'], |
| 33 | columnWidth: [120, 270, 140], | ||
| 34 | data: [], | 34 | data: [], |
| 35 | key: 0 | 35 | key: 0 |
| 36 | } | 36 | } |
| ... | @@ -38,23 +38,38 @@ | ... | @@ -38,23 +38,38 @@ |
| 38 | }, | 38 | }, |
| 39 | components: { columnarsmat, Rose }, | 39 | components: { columnarsmat, Rose }, |
| 40 | mounted () { | 40 | mounted () { |
| 41 | this.addhousetotal(); | 41 | this.getdjywltotal(); |
| 42 | window.addEventListener("resize", () => { | ||
| 43 | this.cdata.seriesData = []; | ||
| 44 | this.getdjywltotal(); | ||
| 45 | }); | ||
| 42 | // scroll(tableref.value.$refs.bodyWrapper);//设置滚动 | 46 | // scroll(tableref.value.$refs.bodyWrapper);//设置滚动 |
| 43 | }, | 47 | }, |
| 44 | methods: { | 48 | methods: { |
| 45 | async addhousetotal () { | 49 | // 获取登记业务量玫瑰图数据 |
| 50 | async getdjywltotal () { | ||
| 46 | try { | 51 | try { |
| 47 | let { result: res } = await work.addhousetotal(); | 52 | let p = { |
| 48 | res.map((item, index) => { | 53 | DJLX: "", |
| 49 | return ( | 54 | QLLX: "", |
| 50 | this.config.data.push([index, item.fwyt, item.fwxz, item.mj]) | 55 | XZQDM: "", |
| 51 | ) | 56 | }; |
| 57 | |||
| 58 | let res = await work.getdjywltotal(p); | ||
| 59 | res.result.map((item, index) => { | ||
| 60 | this.config.data.push([index, item.AREACODE, item.ywtotal]) | ||
| 61 | |||
| 52 | }); | 62 | }); |
| 63 | |||
| 64 | // 遍历修改数组键,作为echars图表的参数 | ||
| 65 | |||
| 66 | |||
| 53 | } catch (error) { | 67 | } catch (error) { |
| 54 | console.log("error", error); | 68 | console.log(error); |
| 55 | } | ||
| 56 | } | ||
| 57 | } | 69 | } |
| 70 | |||
| 71 | }, | ||
| 72 | }, | ||
| 58 | } | 73 | } |
| 59 | </script> | 74 | </script> |
| 60 | <style lang="scss" scoped> | 75 | <style lang="scss" scoped> |
| ... | @@ -134,6 +149,7 @@ | ... | @@ -134,6 +149,7 @@ |
| 134 | background: url("~@/image/djywl.png") no-repeat; | 149 | background: url("~@/image/djywl.png") no-repeat; |
| 135 | background-size: 100% 100%; | 150 | background-size: 100% 100%; |
| 136 | padding: 0.3825rem 0 0 0; | 151 | padding: 0.3825rem 0 0 0; |
| 152 | overflow: hidden; | ||
| 137 | } | 153 | } |
| 138 | 154 | ||
| 139 | .card3 { | 155 | .card3 { | ... | ... |
| ... | @@ -105,6 +105,7 @@ export default { | ... | @@ -105,6 +105,7 @@ export default { |
| 105 | // 初始化图表 | 105 | // 初始化图表 |
| 106 | this.chartData.length && this.echartInit(this.chartData) | 106 | this.chartData.length && this.echartInit(this.chartData) |
| 107 | }); | 107 | }); |
| 108 | |||
| 108 | }, | 109 | }, |
| 109 | // 重置 | 110 | // 重置 |
| 110 | resetForm () { | 111 | resetForm () { |
| ... | @@ -131,6 +132,7 @@ export default { | ... | @@ -131,6 +132,7 @@ export default { |
| 131 | }, | 132 | }, |
| 132 | grid: { | 133 | grid: { |
| 133 | top: 120, | 134 | top: 120, |
| 135 | bottom:100, | ||
| 134 | }, | 136 | }, |
| 135 | xAxis: [ | 137 | xAxis: [ |
| 136 | { | 138 | { |
| ... | @@ -138,6 +140,7 @@ export default { | ... | @@ -138,6 +140,7 @@ export default { |
| 138 | data: chartArr.map(item => item.recTypeName), | 140 | data: chartArr.map(item => item.recTypeName), |
| 139 | axisLabel: { | 141 | axisLabel: { |
| 140 | interval: 0, | 142 | interval: 0, |
| 143 | rotate: 40, | ||
| 141 | formatter: function (val) { | 144 | formatter: function (val) { |
| 142 | let c = document.createElement("canvas"); | 145 | let c = document.createElement("canvas"); |
| 143 | const ctx = c.getContext("2d"); | 146 | const ctx = c.getContext("2d"); | ... | ... |
| ... | @@ -60,7 +60,7 @@ | ... | @@ -60,7 +60,7 @@ |
| 60 | getAction(api.subsystem, params).then((res) => { | 60 | getAction(api.subsystem, params).then((res) => { |
| 61 | if (res.status === 1) { | 61 | if (res.status === 1) { |
| 62 | console.log(" res.contentJJJGGG", res.content); | 62 | console.log(" res.contentJJJGGG", res.content); |
| 63 | // this.productName = res.content[0].name; | 63 | this.productName = res.content[0].name; |
| 64 | this.$store.dispatch("products/setData", res.content[0].code); | 64 | this.$store.dispatch("products/setData", res.content[0].code); |
| 65 | sessionStorage.setItem("products", res.content[0].code) | 65 | sessionStorage.setItem("products", res.content[0].code) |
| 66 | console.log("jjjggg的product"); | 66 | console.log("jjjggg的product"); | ... | ... |
| ... | @@ -67,7 +67,6 @@ | ... | @@ -67,7 +67,6 @@ |
| 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) | ... | ... |
| ... | @@ -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,45 +40,59 @@ | ... | @@ -30,45 +40,59 @@ |
| 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, |
| 40 | }, | 50 | }, |
| 41 | data () { | 51 | data() { |
| 42 | return { | 52 | return { |
| 43 | isshow: true, | 53 | isshow: true, |
| 44 | }; | 54 | }; |
| 45 | }, | 55 | }, |
| 46 | computed: { | 56 | computed: { |
| 47 | userData () { | 57 | userData() { |
| 48 | return this.$store.state.user.userInfo; | 58 | return this.$store.state.user.userInfo; |
| 49 | }, | 59 | }, |
| 50 | }, | 60 | }, |
| 51 | watch: {}, | 61 | watch: {}, |
| 52 | created () { }, | 62 | created() {}, |
| 53 | mounted () { | 63 | mounted() {}, |
| 54 | |||
| 55 | |||
| 56 | }, | ||
| 57 | methods: { | 64 | methods: { |
| 58 | information () { | 65 | information() { |
| 59 | this.isshow = true; | 66 | this.isshow = true; |
| 60 | }, | 67 | }, |
| 61 | password () { | 68 | password() { |
| 62 | this.isshow = false; | 69 | this.isshow = false; |
| 63 | }, | 70 | }, |
| 64 | }, | 71 | }, |
| 65 | }; | 72 | }; |
| 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 { |
| 79 | display: flex; | ||
| 80 | flex-direction: column; | ||
| 81 | .btnColRight { | ||
| 82 | .button { | ||
| 83 | width: 76px; | ||
| 84 | height: 32px; | ||
| 85 | color: #ffffff; | ||
| 86 | margin: 0 5px; | ||
| 87 | cursor: pointer; | ||
| 88 | border: 0; | ||
| 89 | background: url('../../../image/btn.png') no-repeat 0 0; | ||
| 90 | background-size: cover; | ||
| 91 | } | ||
| 92 | .choosed{ | ||
| 93 | background: url('../../../image/btn.png') no-repeat 0 -34px; | ||
| 94 | } | ||
| 95 | } | ||
| 72 | /deep/.content { | 96 | /deep/.content { |
| 73 | .el-input__inner { | 97 | .el-input__inner { |
| 74 | background: none; | 98 | background: none; |
| ... | @@ -76,10 +100,9 @@ | ... | @@ -76,10 +100,9 @@ |
| 76 | .user-info { | 100 | .user-info { |
| 77 | background: none; | 101 | background: none; |
| 78 | } | 102 | } |
| 79 | |||
| 80 | .boxin { | ||
| 81 | height: 79%; | ||
| 82 | } | ||
| 83 | } | 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,83 +41,81 @@ | ... | @@ -37,83 +41,81 @@ |
| 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 | } | 50 | }, |
| 47 | }, | 51 | }, |
| 48 | data () { | 52 | data() { |
| 49 | return { | 53 | return { |
| 50 | form: {}, | 54 | form: {}, |
| 51 | sexList: [], | 55 | sexList: [], |
| 52 | userId: '', | 56 | userId: "", |
| 53 | rules: { | 57 | rules: { |
| 54 | oldPassword: [ | 58 | oldPassword: [ |
| 55 | { required: true, message: '旧密码不能为空', trigger: 'blur' } | 59 | { required: true, message: "旧密码不能为空", trigger: "blur" }, |
| 56 | ], | 60 | ], |
| 57 | newPassword: [ | 61 | newPassword: [ |
| 58 | { required: true, message: '新密码不能为空', trigger: 'blur' } | 62 | { required: true, message: "新密码不能为空", trigger: "blur" }, |
| 59 | ], | 63 | ], |
| 60 | confirmPassword: [ | 64 | confirmPassword: [ |
| 61 | { required: true, message: '确认密码不能为空', trigger: 'blur' }, | 65 | { required: true, message: "确认密码不能为空", trigger: "blur" }, |
| 62 | { validator: this.validatorConfirmPassword, trigger: 'blur' } | 66 | { validator: this.validatorConfirmPassword, trigger: "blur" }, |
| 63 | ] | 67 | ], |
| 64 | } | 68 | }, |
| 65 | } | 69 | }; |
| 66 | }, | 70 | }, |
| 67 | computed: {}, | 71 | computed: {}, |
| 68 | watch: { | 72 | watch: { |
| 69 | userInfo: { | 73 | userInfo: { |
| 70 | handler: function (val) { | 74 | handler: function (val) { |
| 71 | if (val) { | 75 | if (val) { |
| 72 | this.getid(val) | 76 | this.getid(val); |
| 73 | } | ||
| 74 | } | 77 | } |
| 75 | } | ||
| 76 | |||
| 77 | }, | 78 | }, |
| 78 | mounted () { | 79 | }, |
| 80 | }, | ||
| 81 | mounted() { | ||
| 79 | if (this.userInfo) { | 82 | if (this.userInfo) { |
| 80 | this.getid(this.userInfo) | 83 | this.getid(this.userInfo); |
| 81 | } | 84 | } |
| 82 | }, | 85 | }, |
| 83 | methods: { | 86 | methods: { |
| 84 | getid (val) { | 87 | getid(val) { |
| 85 | this.userId = val.id | 88 | this.userId = val.id; |
| 86 | }, | 89 | }, |
| 87 | validatorConfirmPassword (rule, value, callback) { | 90 | validatorConfirmPassword(rule, value, callback) { |
| 88 | const { newPassword } = this.form | 91 | const { newPassword } = this.form; |
| 89 | if (value !== newPassword) { | 92 | if (value !== newPassword) { |
| 90 | callback('两次输入密码不一致') | 93 | callback("两次输入密码不一致"); |
| 91 | } else { | 94 | } else { |
| 92 | callback() | 95 | callback(); |
| 93 | } | 96 | } |
| 94 | }, | 97 | }, |
| 95 | updatePassword () { | 98 | updatePassword() { |
| 96 | this.$refs.form.validate((valid) => { | 99 | this.$refs.form.validate((valid) => { |
| 97 | if (valid) { | 100 | if (valid) { |
| 98 | const params = Object.assign({}, this.form, { id: this.userId }) | 101 | const params = Object.assign({}, this.form, { id: this.userId }); |
| 99 | updateUserPassword(params).then((res) => { | 102 | updateUserPassword(params).then((res) => { |
| 100 | if (res.status === 1) { | 103 | if (res.status === 1) { |
| 101 | this.$message.success({ message: res.message, showClose: true }) | 104 | this.$message.success({ message: res.message, showClose: true }); |
| 102 | } else { | 105 | } else { |
| 103 | this.$message.error({ message: res.message, showClose: true }) | 106 | this.$message.error({ message: res.message, showClose: true }); |
| 104 | } | ||
| 105 | }) | ||
| 106 | } | ||
| 107 | }) | ||
| 108 | } | ||
| 109 | } | 107 | } |
| 108 | }); | ||
| 110 | } | 109 | } |
| 110 | }); | ||
| 111 | }, | ||
| 112 | }, | ||
| 113 | }; | ||
| 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; | ||
| 117 | overflow-y: auto; | 119 | overflow-y: auto; |
| 118 | .form-wrapper { | 120 | .form-wrapper { |
| 119 | padding: 24px 120px 0px; | 121 | padding: 24px 120px 0px; |
| ... | @@ -132,7 +134,7 @@ | ... | @@ -132,7 +134,7 @@ |
| 132 | } | 134 | } |
| 133 | .bottom-wrapper { | 135 | .bottom-wrapper { |
| 134 | padding: 32px 120px 24px; | 136 | padding: 32px 120px 24px; |
| 135 | text-align: right; | 137 | text-align: center; |
| 136 | } | ||
| 137 | } | 138 | } |
| 139 | } | ||
| 138 | </style> | 140 | </style> | ... | ... |
| ... | @@ -38,6 +38,7 @@ | ... | @@ -38,6 +38,7 @@ |
| 38 | import EditDialog from "./edit-dialog.vue"; | 38 | import EditDialog from "./edit-dialog.vue"; |
| 39 | import Roleslistdiglog from "./roleslistdiglog.vue"; | 39 | import Roleslistdiglog from "./roleslistdiglog.vue"; |
| 40 | import { mapGetters } from "vuex"; | 40 | import { mapGetters } from "vuex"; |
| 41 | import {updateOrder} from "@/api/orders" | ||
| 41 | export default { | 42 | export default { |
| 42 | name: "menus", | 43 | name: "menus", |
| 43 | mixins: [tableMixin], | 44 | mixins: [tableMixin], |
| ... | @@ -107,7 +108,7 @@ | ... | @@ -107,7 +108,7 @@ |
| 107 | .concat([ | 108 | .concat([ |
| 108 | { | 109 | { |
| 109 | label: "排序", | 110 | label: "排序", |
| 110 | width: 100, | 111 | width: 200, |
| 111 | render: (h, scope) => { | 112 | render: (h, scope) => { |
| 112 | return ( | 113 | return ( |
| 113 | <div> | 114 | <div> |
| ... | @@ -115,7 +116,16 @@ | ... | @@ -115,7 +116,16 @@ |
| 115 | type="text" | 116 | type="text" |
| 116 | disabled={scope.row.isTop} | 117 | disabled={scope.row.isTop} |
| 117 | onClick={() => { | 118 | onClick={() => { |
| 118 | this.moveUpward(scope.$index, scope.row); | 119 | this.updateOrder(scope.row,'TOP'); |
| 120 | }} | ||
| 121 | > | ||
| 122 | 置顶 | ||
| 123 | </el-button> | ||
| 124 | <el-button | ||
| 125 | type="text" | ||
| 126 | disabled={scope.row.isTop} | ||
| 127 | onClick={() => { | ||
| 128 | this.updateOrder(scope.row,'UP'); | ||
| 119 | }} | 129 | }} |
| 120 | > | 130 | > |
| 121 | 上移 | 131 | 上移 |
| ... | @@ -124,11 +134,20 @@ | ... | @@ -124,11 +134,20 @@ |
| 124 | type="text" | 134 | type="text" |
| 125 | disabled={scope.row.isBottom} | 135 | disabled={scope.row.isBottom} |
| 126 | onClick={() => { | 136 | onClick={() => { |
| 127 | this.moveDown(scope.$index, scope.row); | 137 | this.updateOrder(scope.row,'DOWN'); |
| 128 | }} | 138 | }} |
| 129 | > | 139 | > |
| 130 | 下移 | 140 | 下移 |
| 131 | </el-button> | 141 | </el-button> |
| 142 | <el-button | ||
| 143 | type="text" | ||
| 144 | disabled={scope.row.isBottom} | ||
| 145 | onClick={() => { | ||
| 146 | this.updateOrder(scope.row,'BOTTOM'); | ||
| 147 | }} | ||
| 148 | > | ||
| 149 | 置底 | ||
| 150 | </el-button> | ||
| 132 | </div> | 151 | </div> |
| 133 | ); | 152 | ); |
| 134 | }, | 153 | }, |
| ... | @@ -225,22 +244,12 @@ | ... | @@ -225,22 +244,12 @@ |
| 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) => { | ||
| 233 | Builtinrole = res.content; | ||
| 234 | getRolesById(2) | ||
| 235 | .then((res) => { | 248 | .then((res) => { |
| 236 | Publicrole = res.content; | 249 | this.listdata = res.content; |
| 237 | |||
| 238 | this.listdata = Builtinrole.concat(Publicrole); | ||
| 239 | this.listdata = judgeSort(this.listdata); | 250 | this.listdata = judgeSort(this.listdata); |
| 240 | }) | 251 | }) |
| 241 | .catch((e) => console.error(e)); | 252 | .catch((e) => console.error(e)); |
| 242 | }) | ||
| 243 | .catch((e) => console.error(e)); | ||
| 244 | }, | 253 | }, |
| 245 | 254 | ||
| 246 | // 获取菜单列表 | 255 | // 获取菜单列表 |
| ... | @@ -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