style:区县接入
Showing
11 changed files
with
430 additions
and
424 deletions
| 1 | { | 1 | { |
| 2 | "TITLE": "汉中市数据上报系统", | 2 | "TITLE": "汉中市数据上报系统", |
| 3 | "THEME": "jg", | 3 | "THEME": "sb", |
| 4 | "SERVERAPI": "/bdcsjsb", | 4 | "SERVERAPI": "/bdcsjsb", |
| 5 | "MANAGEMENTAPI": "http: //192.168.2.236/management" | 5 | "MANAGEMENTAPI": "http: //192.168.2.236/management" |
| 6 | } | 6 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | * @LastEditTime: 2023-03-22 10:23:46 | 4 | * @LastEditTime: 2023-03-22 10:23:46 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <section class="app-main"> | 7 | <section> |
| 8 | <transition name="fade-transform" mode="out-in"> | 8 | <transition name="fade-transform" mode="out-in"> |
| 9 | <router-view /> | 9 | <router-view /> |
| 10 | </transition> | 10 | </transition> |
| ... | @@ -20,14 +20,3 @@ export default { | ... | @@ -20,14 +20,3 @@ export default { |
| 20 | } | 20 | } |
| 21 | } | 21 | } |
| 22 | </script> | 22 | </script> |
| 23 | <style lang="scss" scoped> | ||
| 24 | .app-main { | ||
| 25 | height: calc(100vh - 74px); | ||
| 26 | overflow-x: hidden; | ||
| 27 | box-sizing: border-box; | ||
| 28 | flex: 1; | ||
| 29 | width: 100%; | ||
| 30 | background: #EAEBF0; | ||
| 31 | padding: 15px; | ||
| 32 | } | ||
| 33 | </style> | ... | ... |
| ... | @@ -35,7 +35,7 @@ export default { | ... | @@ -35,7 +35,7 @@ export default { |
| 35 | }, | 35 | }, |
| 36 | computed: { | 36 | computed: { |
| 37 | visitedViews () { | 37 | visitedViews () { |
| 38 | return this.$store.state.tagsView.visitedViews | 38 | return this.$store.state.tagsView.visitedViews.slice(1) |
| 39 | }, | 39 | }, |
| 40 | routes () { | 40 | routes () { |
| 41 | return this.$store.state.permission.routes | 41 | return this.$store.state.permission.routes |
| ... | @@ -199,7 +199,7 @@ export default { | ... | @@ -199,7 +199,7 @@ export default { |
| 199 | box-sizing: border-box; | 199 | box-sizing: border-box; |
| 200 | padding-top: 3px; | 200 | padding-top: 3px; |
| 201 | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04); | 201 | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04); |
| 202 | 202 | margin-bottom: 5px; | |
| 203 | .tags-view-wrapper { | 203 | .tags-view-wrapper { |
| 204 | .tags-view-item { | 204 | .tags-view-item { |
| 205 | display: inline-block; | 205 | display: inline-block; | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-03-20 16:05:15 | 4 | * @LastEditTime: 2023-03-23 09:21:00 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <div class="app-wrapper"> | 7 | <div class="app-wrapper"> |
| 8 | <navbar /> | 8 | <navbar /> |
| 9 | <div class="main-container"> | 9 | <div class="main-container"> |
| 10 | <sidebar class="sidebar-container" /> | 10 | <sidebar class="sidebar-container" /> |
| 11 | <app-main /> | 11 | <div class="app-main"> |
| 12 | <tags-view v-if="needTagsView" /> | ||
| 13 | <app-main /> | ||
| 14 | </div> | ||
| 12 | </div> | 15 | </div> |
| 13 | </div> | 16 | </div> |
| 14 | </template> | 17 | </template> |
| ... | @@ -37,6 +40,17 @@ export default { | ... | @@ -37,6 +40,17 @@ export default { |
| 37 | } | 40 | } |
| 38 | } | 41 | } |
| 39 | </script> | 42 | </script> |
| 43 | <style lang="scss" scoped> | ||
| 44 | .app-main { | ||
| 45 | height: calc(100vh - 74px); | ||
| 46 | overflow-x: hidden; | ||
| 47 | box-sizing: border-box; | ||
| 48 | flex: 1; | ||
| 49 | width: 100%; | ||
| 50 | background: #EAEBF0; | ||
| 51 | padding: 10px; | ||
| 52 | } | ||
| 53 | </style> | ||
| 40 | <style lang="scss"> | 54 | <style lang="scss"> |
| 41 | @import "~@/styles/mixin.scss"; | 55 | @import "~@/styles/mixin.scss"; |
| 42 | @import "~@/styles/sbSidebar.scss"; | 56 | @import "~@/styles/sbSidebar.scss"; | ... | ... |
| ... | @@ -33,7 +33,7 @@ export const constantRoutes = [ | ... | @@ -33,7 +33,7 @@ export const constantRoutes = [ |
| 33 | { | 33 | { |
| 34 | path: '/', | 34 | path: '/', |
| 35 | component: Layout, | 35 | component: Layout, |
| 36 | redirect: '/jg?redirect=%2Fhome', | 36 | redirect: '/jg', |
| 37 | meta: { title: '首页' }, | 37 | meta: { title: '首页' }, |
| 38 | children: [ | 38 | children: [ |
| 39 | { | 39 | { |
| ... | @@ -59,7 +59,7 @@ export const asyncRoutes = [ | ... | @@ -59,7 +59,7 @@ export const asyncRoutes = [ |
| 59 | path: 'index', | 59 | path: 'index', |
| 60 | component: () => import('@/views/jsbwcx/index'), | 60 | component: () => import('@/views/jsbwcx/index'), |
| 61 | name: 'jsbwcx', | 61 | name: 'jsbwcx', |
| 62 | meta: { title: '接收报文查询', icon: 'zsgl' } | 62 | meta: { title: '区县接入', icon: 'zsgl' } |
| 63 | } | 63 | } |
| 64 | ] | 64 | ] |
| 65 | }, | 65 | }, | ... | ... |
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | * @Author: xiaomiao 1158771342@qq.com | 2 | * @Author: xiaomiao 1158771342@qq.com |
| 3 | * @Date: 2023-03-09 15:24:53 | 3 | * @Date: 2023-03-09 15:24:53 |
| 4 | * @LastEditors: Please set LastEditors | 4 | * @LastEditors: Please set LastEditors |
| 5 | * @LastEditTime: 2023-03-21 16:05:39 | 5 | * @LastEditTime: 2023-03-23 10:19:35 |
| 6 | * @FilePath: \上报\bdcjg-web\src\store\modules\permission.js | 6 | * @FilePath: \上报\bdcjg-web\src\store\modules\permission.js |
| 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 | */ |
| ... | @@ -25,7 +25,7 @@ const mutations = { | ... | @@ -25,7 +25,7 @@ const mutations = { |
| 25 | } | 25 | } |
| 26 | const actions = { | 26 | const actions = { |
| 27 | // 添加全部菜单 | 27 | // 添加全部菜单 |
| 28 | generateRoutes ({ commit }, getMenuInfo) { | 28 | generateRoutes ({ commit }, getMenuInfo) { |
| 29 | let Layout; | 29 | let Layout; |
| 30 | if (Vue.prototype.BASE_API.THEME == 'sb') { | 30 | if (Vue.prototype.BASE_API.THEME == 'sb') { |
| 31 | Layout = r => require.ensure([], () => r(require(`@/layout1`))) | 31 | Layout = r => require.ensure([], () => r(require(`@/layout1`))) |
| ... | @@ -40,6 +40,7 @@ const actions = { | ... | @@ -40,6 +40,7 @@ const actions = { |
| 40 | item.children = asyncRouter(item.children) | 40 | item.children = asyncRouter(item.children) |
| 41 | } | 41 | } |
| 42 | item.path = JSON.parse(item.metadata)?.path || '/' | 42 | item.path = JSON.parse(item.metadata)?.path || '/' |
| 43 | item.affix = JSON.parse(item.metadata)?.affix || false | ||
| 43 | if (!item.parentId) { | 44 | if (!item.parentId) { |
| 44 | item.component = Layout | 45 | item.component = Layout |
| 45 | } else { | 46 | } else { |
| ... | @@ -47,7 +48,8 @@ const actions = { | ... | @@ -47,7 +48,8 @@ const actions = { |
| 47 | } | 48 | } |
| 48 | item.meta = { | 49 | item.meta = { |
| 49 | title: item.name, | 50 | title: item.name, |
| 50 | icon: item.icon | 51 | icon: item.icon, |
| 52 | affix: item.affix | ||
| 51 | } | 53 | } |
| 52 | }) | 54 | }) |
| 53 | return routers | 55 | return routers | ... | ... |
| ... | @@ -6,7 +6,6 @@ | ... | @@ -6,7 +6,6 @@ |
| 6 | min-width: 1280px; | 6 | min-width: 1280px; |
| 7 | box-sizing: border-box; | 7 | box-sizing: border-box; |
| 8 | overflow-x: hidden; | 8 | overflow-x: hidden; |
| 9 | padding: 2px; | ||
| 10 | 9 | ||
| 11 | &-header { | 10 | &-header { |
| 12 | width: 100%; | 11 | width: 100%; |
| ... | @@ -20,7 +19,7 @@ | ... | @@ -20,7 +19,7 @@ |
| 20 | &-content { | 19 | &-content { |
| 21 | width: 100%; | 20 | width: 100%; |
| 22 | box-sizing: border-box; | 21 | box-sizing: border-box; |
| 23 | margin-top: 15px; | 22 | margin-top: 10px; |
| 24 | background: #FFFFFF; | 23 | background: #FFFFFF; |
| 25 | border-radius: 4px; | 24 | border-radius: 4px; |
| 26 | background-size: 100% 100%; | 25 | background-size: 100% 100%; |
| ... | @@ -142,4 +141,4 @@ | ... | @@ -142,4 +141,4 @@ |
| 142 | background-color: white; | 141 | background-color: white; |
| 143 | ; | 142 | ; |
| 144 | background-size: cover; | 143 | background-size: cover; |
| 145 | } | 144 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -4,13 +4,15 @@ | ... | @@ -4,13 +4,15 @@ |
| 4 | <!-- 头部搜索 --> | 4 | <!-- 头部搜索 --> |
| 5 | <div class="from-clues-header"> | 5 | <div class="from-clues-header"> |
| 6 | <el-form ref="ruleForm" :model="form" label-width="100px"> | 6 | <el-form ref="ruleForm" :model="form" label-width="100px"> |
| 7 | <el-form-item> | 7 | <el-form-item v-if="BASE_API.THEME=='jg'"> |
| 8 | <Breadcrumb /> | 8 | <Breadcrumb /> |
| 9 | </el-form-item> | 9 | </el-form-item> |
| 10 | <el-row class="mb-5"> | 10 | <el-row class="mb-5"> |
| 11 | <el-col :span="6"> | 11 | <el-col :span="6"> |
| 12 | <el-form-item label="行政区" prop="qxdm"> | 12 | <el-form-item label="行政区" prop="qxdm"> |
| 13 | <el-select v-model="$store.state.user.userInfo.grade === 'county' ? form.qxdm = $store.state.user.userInfo.areaCode : form.qxdm" class="width100" clearable placeholder="行政区" :disabled="$store.state.user.userInfo.grade === 'county'"> | 13 | <el-select |
| 14 | v-model="$store.state.user.userInfo.grade === 'county' ? form.qxdm = $store.state.user.userInfo.areaCode : form.qxdm" | ||
| 15 | class="width100" clearable placeholder="行政区" :disabled="$store.state.user.userInfo.grade === 'county'"> | ||
| 14 | <el-option v-for="item in dicData['A20']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE"> | 16 | <el-option v-for="item in dicData['A20']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE"> |
| 15 | </el-option> | 17 | </el-option> |
| 16 | </el-select> | 18 | </el-select> |
| ... | @@ -99,6 +101,7 @@ | ... | @@ -99,6 +101,7 @@ |
| 99 | </template> | 101 | </template> |
| 100 | 102 | ||
| 101 | <script> | 103 | <script> |
| 104 | import Vue from 'vue' | ||
| 102 | // 接收报文查询 | 105 | // 接收报文查询 |
| 103 | // 引入表格头部数据 | 106 | // 引入表格头部数据 |
| 104 | import data from "./data"; | 107 | import data from "./data"; | ... | ... |
| ... | @@ -23,242 +23,243 @@ | ... | @@ -23,242 +23,243 @@ |
| 23 | </template> | 23 | </template> |
| 24 | 24 | ||
| 25 | <script> | 25 | <script> |
| 26 | import { loginIn } from "@/api/login.js"; | 26 | import { loginIn } from "@/api/login.js"; |
| 27 | import { api, getAction } from "@/api/manageApi"; | 27 | import { api, getAction } from "@/api/manageApi"; |
| 28 | export default { | 28 | export default { |
| 29 | name: "Login", | 29 | name: "Login", |
| 30 | data () { | 30 | data () { |
| 31 | return { | 31 | return { |
| 32 | user: { | 32 | user: { |
| 33 | account: "", | 33 | account: "", |
| 34 | password: "", | 34 | password: "", |
| 35 | checkStatus: false, | 35 | checkStatus: false, |
| 36 | }, | 36 | }, |
| 37 | productName: "", | 37 | productName: "", |
| 38 | rules: { | 38 | rules: { |
| 39 | account: [{ required: true, message: "请填写帐号", trigger: "blur" }], | 39 | account: [{ required: true, message: "请填写帐号", trigger: "blur" }], |
| 40 | password: [{ required: true, message: "请填写密码", trigger: "blur" }], | 40 | password: [{ required: true, message: "请填写密码", trigger: "blur" }], |
| 41 | }, | 41 | }, |
| 42 | }; | 42 | }; |
| 43 | }, | 43 | }, |
| 44 | created () { | 44 | created () { |
| 45 | const params = {}; | 45 | const params = {}; |
| 46 | const queryOptions = { | 46 | const queryOptions = { |
| 47 | conditionGroup: { | 47 | conditionGroup: { |
| 48 | conditions: [ | 48 | conditions: [ |
| 49 | { | 49 | { |
| 50 | property: "code", | 50 | property: "code", |
| 51 | value: "BDCJGPT", | 51 | value: "BDCJGPT", |
| 52 | operator: "EQ", | 52 | operator: "EQ", |
| 53 | }, | 53 | }, |
| 54 | ], | 54 | ], |
| 55 | queryRelation: "AND", | 55 | queryRelation: "AND", |
| 56 | }, | 56 | }, |
| 57 | }; | 57 | }; |
| 58 | params.queryOptions = JSON.stringify(queryOptions); | 58 | params.queryOptions = JSON.stringify(queryOptions); |
| 59 | //根据子系统code获取子系统详细信息 | 59 | //根据子系统code获取子系统详细信息 |
| 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 | this.productName = res.content[0].name; | 62 | this.productName = res.content[0].name; |
| 63 | this.$store.dispatch("products/setData", res.content[0].code); | 63 | this.$store.dispatch("products/setData", res.content[0].code); |
| 64 | sessionStorage.setItem("products", res.content[0].code) | 64 | sessionStorage.setItem("products", res.content[0].code) |
| 65 | } else { | ||
| 66 | this.$message.error({ message: res.message, showClose: true }); | ||
| 67 | } | ||
| 68 | }); | ||
| 69 | }, | ||
| 70 | mounted () { | ||
| 71 | // this.checkUserName(); | ||
| 72 | }, | ||
| 73 | methods: { | ||
| 74 | //记住用户名 | ||
| 75 | checkUserName: function (flag) { | ||
| 76 | this.user.checkStatus = flag; | ||
| 77 | if (this.user.checkStatus) { | ||
| 78 | localStorage.setItem("accountId", this.user.account); | ||
| 79 | let name = localStorage.getItem("accountId"); | ||
| 80 | if (name === "") { | ||
| 81 | return; | ||
| 65 | } else { | 82 | } else { |
| 66 | this.$message.error({ message: res.message, showClose: true }); | 83 | this.user.account = name; |
| 67 | } | 84 | } |
| 68 | }); | 85 | } else { |
| 69 | }, | 86 | this.user.account = localStorage.getItem("accountId"); |
| 70 | mounted () { | 87 | } |
| 71 | // this.checkUserName(); | ||
| 72 | }, | 88 | }, |
| 73 | methods: { | 89 | login (user) { |
| 74 | //记住用户名 | 90 | var self = this; |
| 75 | checkUserName: function (flag) { | 91 | this.$refs[user].validate((valid) => { |
| 76 | this.user.checkStatus = flag; | 92 | if (valid) { |
| 77 | if (this.user.checkStatus) { | 93 | loginIn(self.user.account, self.user.password) |
| 78 | localStorage.setItem("accountId", this.user.account); | 94 | .then((res) => { |
| 79 | let name = localStorage.getItem("accountId"); | 95 | if (res.status === 1) { |
| 80 | if (name === "") { | 96 | //存储token |
| 81 | return; | 97 | localStorage.setItem("token", `Bearer ${res.content}`); |
| 82 | } else { | 98 | //登录成功后需判断有无重定向,没有重定向则跳转首页 |
| 83 | this.user.account = name; | 99 | console.log(this.$route.query.redirect); |
| 84 | } | 100 | this.$router.replace(this.$route.query.redirect || "/home"); |
| 85 | } else { | 101 | } else { |
| 86 | this.user.account = localStorage.getItem("accountId"); | 102 | //错误处理 |
| 103 | } | ||
| 104 | }) | ||
| 105 | .catch((error) => { | ||
| 106 | // console.dir(error); | ||
| 107 | }); | ||
| 87 | } | 108 | } |
| 88 | }, | 109 | }); |
| 89 | login (user) { | ||
| 90 | var self = this; | ||
| 91 | this.$refs[user].validate((valid) => { | ||
| 92 | if (valid) { | ||
| 93 | loginIn(self.user.account, self.user.password) | ||
| 94 | .then((res) => { | ||
| 95 | if (res.status === 1) { | ||
| 96 | //存储token | ||
| 97 | localStorage.setItem("token", `Bearer ${res.content}`); | ||
| 98 | //登录成功后需判断有无重定向,没有重定向则跳转首页 | ||
| 99 | this.$router.replace(this.$route.query.redirect || "/"); | ||
| 100 | } else { | ||
| 101 | //错误处理 | ||
| 102 | } | ||
| 103 | }) | ||
| 104 | .catch((error) => { | ||
| 105 | // console.dir(error); | ||
| 106 | }); | ||
| 107 | } | ||
| 108 | }); | ||
| 109 | }, | ||
| 110 | }, | 110 | }, |
| 111 | components: {}, | 111 | }, |
| 112 | }; | 112 | components: {}, |
| 113 | }; | ||
| 113 | </script> | 114 | </script> |
| 114 | <style scoped lang="scss"> | 115 | <style scoped lang="scss"> |
| 115 | .username, | 116 | .username, |
| 116 | .password { | 117 | .password { |
| 117 | position: relative; | 118 | position: relative; |
| 118 | |||
| 119 | &:before { | ||
| 120 | content: ""; | ||
| 121 | display: block; | ||
| 122 | width: 16px; | ||
| 123 | height: 16px; | ||
| 124 | position: absolute; | ||
| 125 | left: 10px; | ||
| 126 | top: 7px; | ||
| 127 | background-size: 100% 100%; | ||
| 128 | } | ||
| 129 | 119 | ||
| 130 | /deep/ .el-input__inner { | 120 | &:before { |
| 131 | text-indent: 24px; | 121 | content: ""; |
| 132 | border: 1px solid rgba(11, 161, 248, 0.4); | 122 | display: block; |
| 133 | background-color: rgba(6, 135, 205, 0.3) !important; | 123 | width: 16px; |
| 134 | } | 124 | height: 16px; |
| 125 | position: absolute; | ||
| 126 | left: 10px; | ||
| 127 | top: 7px; | ||
| 128 | background-size: 100% 100%; | ||
| 135 | } | 129 | } |
| 136 | 130 | ||
| 137 | .username::before { | 131 | /deep/ .el-input__inner { |
| 138 | background-image: url(../../image/username.png); | 132 | text-indent: 24px; |
| 133 | border: 1px solid rgba(11, 161, 248, 0.4); | ||
| 134 | background-color: rgba(6, 135, 205, 0.3) !important; | ||
| 139 | } | 135 | } |
| 136 | } | ||
| 140 | 137 | ||
| 141 | .password::before { | 138 | .username::before { |
| 142 | background-image: url(../../image/password.png); | 139 | background-image: url(../../image/username.png); |
| 143 | } | 140 | } |
| 144 | 141 | ||
| 145 | .bg { | 142 | .password::before { |
| 146 | width: 100%; | 143 | background-image: url(../../image/password.png); |
| 147 | height: 100%; | 144 | } |
| 148 | min-width: 1440px; | 145 | |
| 149 | min-height: 560px; | 146 | .bg { |
| 150 | background: url(../../image/loginBoxBg.png) no-repeat; | 147 | width: 100%; |
| 148 | height: 100%; | ||
| 149 | min-width: 1440px; | ||
| 150 | min-height: 560px; | ||
| 151 | background: url(../../image/loginBoxBg.png) no-repeat; | ||
| 152 | background-size: 100% 100%; | ||
| 153 | overflow: hidden; | ||
| 154 | position: relative; | ||
| 155 | |||
| 156 | .login-logo { | ||
| 157 | background: url(../../image/loginLogo.png) no-repeat; | ||
| 151 | background-size: 100% 100%; | 158 | background-size: 100% 100%; |
| 152 | overflow: hidden; | 159 | width: 580px; |
| 153 | position: relative; | 160 | height: 540px; |
| 154 | .login-logo { | 161 | position: absolute; |
| 155 | background: url(../../image/loginLogo.png) no-repeat; | 162 | top: 25%; |
| 156 | background-size: 100% 100%; | 163 | left: 19%; |
| 157 | width: 580px; | ||
| 158 | height: 540px; | ||
| 159 | position: absolute; | ||
| 160 | top: 25%; | ||
| 161 | left: 19%; | ||
| 162 | } | ||
| 163 | } | 164 | } |
| 165 | } | ||
| 164 | 166 | ||
| 165 | .login-inner-bg { | 167 | .login-inner-bg { |
| 166 | background: url(../../image/loginBg.png) no-repeat; | 168 | background: url(../../image/loginBg.png) no-repeat; |
| 167 | width: 20.6%; | 169 | width: 20.6%; |
| 168 | height: 43%; | 170 | height: 43%; |
| 169 | min-width: 360px; | 171 | min-width: 360px; |
| 170 | min-height: 380px; | 172 | min-height: 380px; |
| 171 | top: 30%; | 173 | top: 30%; |
| 172 | right: 18%; | 174 | right: 18%; |
| 173 | position: absolute; | 175 | position: absolute; |
| 174 | background-size: 100% 100%; | 176 | background-size: 100% 100%; |
| 175 | box-sizing: border-box; | 177 | box-sizing: border-box; |
| 176 | padding: 56px; | 178 | padding: 56px; |
| 177 | 179 | ||
| 178 | h2 { | 180 | h2 { |
| 179 | width: 100%; | 181 | width: 100%; |
| 180 | font-size: 36px; | 182 | font-size: 36px; |
| 181 | font-weight: 700; | 183 | font-weight: 700; |
| 182 | color: #fff; | 184 | color: #fff; |
| 183 | text-align: center; | 185 | text-align: center; |
| 184 | white-space: nowrap; | 186 | white-space: nowrap; |
| 185 | position: absolute; | 187 | position: absolute; |
| 186 | right: 0; | 188 | right: 0; |
| 187 | top: -70px; | 189 | top: -70px; |
| 188 | background-image: linear-gradient( | 190 | background-image: linear-gradient(180deg, |
| 189 | 180deg, | ||
| 190 | rgba(99, 163, 255, 1) 0, | 191 | rgba(99, 163, 255, 1) 0, |
| 191 | rgba(99, 163, 255, 1) 0, | 192 | rgba(99, 163, 255, 1) 0, |
| 192 | rgba(182, 220, 255, 1) 49.731445%, | 193 | rgba(182, 220, 255, 1) 49.731445%, |
| 193 | rgba(114, 190, 255, 1) 100%, | 194 | rgba(114, 190, 255, 1) 100%, |
| 194 | rgba(114, 190, 255, 1) 100% | 195 | rgba(114, 190, 255, 1) 100%); |
| 195 | ); | 196 | overflow-wrap: break-word; |
| 196 | overflow-wrap: break-word; | 197 | color: rgba(255, 255, 255, 1); |
| 197 | color: rgba(255, 255, 255, 1); | 198 | font-size: 36px; |
| 198 | font-size: 36px; | 199 | font-family: AlimamaShuHeiTi-Bold; |
| 199 | font-family: AlimamaShuHeiTi-Bold; | 200 | -webkit-background-clip: text; |
| 200 | -webkit-background-clip: text; | 201 | -webkit-text-fill-color: transparent; |
| 201 | -webkit-text-fill-color: transparent; | ||
| 202 | } | ||
| 203 | } | 202 | } |
| 203 | } | ||
| 204 | 204 | ||
| 205 | .login { | 205 | .login { |
| 206 | .user_style { | 206 | .user_style { |
| 207 | h3 { | 207 | h3 { |
| 208 | color: #fff; | 208 | color: #fff; |
| 209 | font-size: 22px; | 209 | font-size: 22px; |
| 210 | font-weight: normal; | 210 | font-weight: normal; |
| 211 | text-align: center; | 211 | text-align: center; |
| 212 | margin: 16px auto 34px; | 212 | margin: 16px auto 34px; |
| 213 | font-weight: 400; | 213 | font-weight: 400; |
| 214 | } | ||
| 215 | } | ||
| 216 | |||
| 217 | .btn { | ||
| 218 | width: 100%; | ||
| 219 | height: 6vh; | ||
| 220 | background-color: #00c2de; | ||
| 221 | border-radius: 5px; | ||
| 222 | font-size: 1.4vw; | ||
| 223 | color: #ffffff; | ||
| 224 | } | ||
| 225 | |||
| 226 | .btn:hover { | ||
| 227 | cursor: pointer; | ||
| 228 | background-color: #2d8cf0; | ||
| 229 | } | 214 | } |
| 230 | } | 215 | } |
| 231 | 216 | ||
| 232 | .login #loginform { | 217 | .btn { |
| 233 | .el-form-item { | 218 | width: 100%; |
| 234 | margin-bottom: 24px !important; | 219 | height: 6vh; |
| 235 | } | 220 | background-color: #00c2de; |
| 221 | border-radius: 5px; | ||
| 222 | font-size: 1.4vw; | ||
| 223 | color: #ffffff; | ||
| 224 | } | ||
| 236 | 225 | ||
| 237 | .login-btn { | 226 | .btn:hover { |
| 238 | margin-top: 40px !important; | 227 | cursor: pointer; |
| 239 | } | 228 | background-color: #2d8cf0; |
| 229 | } | ||
| 230 | } | ||
| 240 | 231 | ||
| 241 | .el-button { | 232 | .login #loginform { |
| 242 | font-size: 18px; | 233 | .el-form-item { |
| 243 | background: #0d8cc0 !important; | 234 | margin-bottom: 24px !important; |
| 244 | color: #ffffff !important; | 235 | } |
| 245 | cursor: pointer !important; | ||
| 246 | } | ||
| 247 | 236 | ||
| 248 | .el-input__inner { | 237 | .login-btn { |
| 249 | width: 100% !important; | 238 | margin-top: 40px !important; |
| 250 | } | 239 | } |
| 251 | 240 | ||
| 252 | .el-checkbox__label { | 241 | .el-button { |
| 253 | color: #fff; | 242 | font-size: 18px; |
| 254 | } | 243 | background: #0d8cc0 !important; |
| 244 | color: #ffffff !important; | ||
| 245 | cursor: pointer !important; | ||
| 255 | } | 246 | } |
| 256 | 247 | ||
| 257 | .inputUser .ivu-input { | 248 | .el-input__inner { |
| 258 | padding: 6px 24px !important; | 249 | width: 100% !important; |
| 259 | border: 1px solid #9f9f9f !important; | ||
| 260 | } | 250 | } |
| 261 | tr.hover-row > td.el-table__cell { | 251 | |
| 262 | background-color: transparent !important; | 252 | .el-checkbox__label { |
| 253 | color: #fff; | ||
| 263 | } | 254 | } |
| 255 | } | ||
| 256 | |||
| 257 | .inputUser .ivu-input { | ||
| 258 | padding: 6px 24px !important; | ||
| 259 | border: 1px solid #9f9f9f !important; | ||
| 260 | } | ||
| 261 | |||
| 262 | tr.hover-row>td.el-table__cell { | ||
| 263 | background-color: transparent !important; | ||
| 264 | } | ||
| 264 | </style> | 265 | </style> | ... | ... |
| ... | @@ -11,12 +11,7 @@ | ... | @@ -11,12 +11,7 @@ |
| 11 | </el-col> | 11 | </el-col> |
| 12 | <el-col :span="12"> | 12 | <el-col :span="12"> |
| 13 | <el-form-item label="图标:" label-width="54px"> | 13 | <el-form-item label="图标:" label-width="54px"> |
| 14 | <el-input | 14 | <el-input v-model="form.icon" placeholder="请选择图标" :prefix-icon="form.icon" clearable @focus="getIconList" /> |
| 15 | v-model="form.icon" | ||
| 16 | placeholder="请选择图标" | ||
| 17 | :prefix-icon="form.icon" | ||
| 18 | clearable | ||
| 19 | @focus="getIconList" /> | ||
| 20 | </el-form-item> | 15 | </el-form-item> |
| 21 | </el-col> | 16 | </el-col> |
| 22 | </el-row> | 17 | </el-row> |
| ... | @@ -68,206 +63,208 @@ | ... | @@ -68,206 +63,208 @@ |
| 68 | </template> | 63 | </template> |
| 69 | 64 | ||
| 70 | <script> | 65 | <script> |
| 71 | import { getParentMenuListAction } from '@/api/authorityManage' | 66 | import { getParentMenuListAction } from '@/api/authorityManage' |
| 72 | import IconList from '../../../components/IconList' | 67 | import IconList from '../../../components/IconList' |
| 73 | import JsonEditor from '@/components/JsonEditors' | 68 | import JsonEditor from '@/components/JsonEditors' |
| 74 | import { validateCode } from '@/utils/validate'; | 69 | import { validateCode } from '@/utils/validate'; |
| 75 | import { api, httpAction } from '@/api/manageApi' | 70 | import { api, httpAction } from '@/api/manageApi' |
| 76 | export default { | 71 | export default { |
| 77 | name: 'MenuModal', | 72 | name: 'MenuModal', |
| 78 | components: { | 73 | components: { |
| 79 | JsonEditor, | 74 | JsonEditor, |
| 80 | IconList, | 75 | IconList, |
| 81 | }, | 76 | }, |
| 82 | props: { | 77 | props: { |
| 83 | value: { type: Boolean, default: false }, | 78 | value: { type: Boolean, default: false }, |
| 84 | productId: { | 79 | productId: { |
| 85 | type: String, | 80 | type: String, |
| 86 | default: '' | 81 | default: '' |
| 82 | } | ||
| 83 | }, | ||
| 84 | data () { | ||
| 85 | return { | ||
| 86 | myValue: this.value, | ||
| 87 | form: { | ||
| 88 | icon: '', | ||
| 89 | code: '' | ||
| 90 | }, | ||
| 91 | rules: { | ||
| 92 | name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }], | ||
| 93 | code: [ | ||
| 94 | { required: true, message: '必填', trigger: 'blur' }, | ||
| 95 | { validator: validateCode, trigger: 'blur' } | ||
| 96 | ] | ||
| 97 | }, | ||
| 98 | title: '', | ||
| 99 | type: '', | ||
| 100 | visible: false, | ||
| 101 | parentMenuList: [], | ||
| 102 | menuKey: 0, | ||
| 103 | jumpModeList: [ | ||
| 104 | { name: '在当前页面显示', value: 1 }, | ||
| 105 | { name: '跳转到新页面', value: 2 } | ||
| 106 | ], | ||
| 107 | setProps: { | ||
| 108 | value: 'id', | ||
| 109 | label: 'name', | ||
| 110 | children: 'children', | ||
| 111 | expandTrigger: 'hover', | ||
| 112 | checkStrictly: true, // 可取消关联,选择任意一级选项 | ||
| 113 | emitPath: false | ||
| 114 | }, | ||
| 115 | dataUrl: api.menus | ||
| 116 | } | ||
| 117 | }, | ||
| 118 | computed: { | ||
| 119 | codeComputed: { | ||
| 120 | get: function () { | ||
| 121 | return this.form.code | ||
| 122 | }, | ||
| 123 | set: function (val) { | ||
| 124 | this.form.code = val.toUpperCase() | ||
| 87 | } | 125 | } |
| 126 | } | ||
| 127 | }, | ||
| 128 | watch: { | ||
| 129 | value (val) { | ||
| 130 | this.myValue = val | ||
| 131 | } | ||
| 132 | }, | ||
| 133 | methods: { | ||
| 134 | // 获取父级菜单 | ||
| 135 | getParentMenuList (id) { | ||
| 136 | |||
| 137 | getParentMenuListAction(id).then((res) => { | ||
| 138 | if (res.status === 1) { | ||
| 139 | const list = this.$dealArrChildren(res.content) | ||
| 140 | if (id) { | ||
| 141 | this.parentMenuList = this.$dealArrDisabled( | ||
| 142 | this.$deepCopy(list), | ||
| 143 | id | ||
| 144 | ) | ||
| 145 | this.menuKey++ | ||
| 146 | } else { | ||
| 147 | this.parentMenuList = list | ||
| 148 | } | ||
| 149 | } else { | ||
| 150 | this.$message.error({ message: res.message, showClose: true }) | ||
| 151 | } | ||
| 152 | }) | ||
| 88 | }, | 153 | }, |
| 89 | data () { | 154 | // 选择图标 |
| 90 | return { | 155 | getIconName (data) { |
| 91 | myValue: this.value, | 156 | this.form.icon = data; |
| 92 | form: { | ||
| 93 | icon: '', | ||
| 94 | code: '' | ||
| 95 | }, | ||
| 96 | rules: { | ||
| 97 | name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }], | ||
| 98 | code: [ | ||
| 99 | { required: true, message: '必填', trigger: 'blur' }, | ||
| 100 | { validator: validateCode, trigger: 'blur' } | ||
| 101 | ] | ||
| 102 | }, | ||
| 103 | title: '', | ||
| 104 | type: '', | ||
| 105 | visible: false, | ||
| 106 | parentMenuList: [], | ||
| 107 | menuKey: 0, | ||
| 108 | jumpModeList: [ | ||
| 109 | { name: '在当前页面显示', value: 1 }, | ||
| 110 | { name: '跳转到新页面', value: 2 } | ||
| 111 | ], | ||
| 112 | setProps: { | ||
| 113 | value: 'id', | ||
| 114 | label: 'name', | ||
| 115 | children: 'children', | ||
| 116 | expandTrigger: 'hover', | ||
| 117 | checkStrictly: true, // 可取消关联,选择任意一级选项 | ||
| 118 | emitPath: false | ||
| 119 | }, | ||
| 120 | dataUrl: api.menus | ||
| 121 | } | ||
| 122 | }, | 157 | }, |
| 123 | computed: { | 158 | getIconList () { |
| 124 | codeComputed: { | 159 | this.$refs.iconList.show(true) |
| 125 | get: function () { | 160 | }, |
| 126 | return this.form.code | 161 | getIconName (data) { |
| 127 | }, | 162 | this.form.icon = data |
| 128 | set: function (val) { | 163 | }, |
| 129 | this.form.code = val.toUpperCase() | 164 | // 配置参数 |
| 130 | } | 165 | getJsonString (data) { |
| 131 | } | 166 | this.form.metadata = data |
| 132 | }, | 167 | }, |
| 133 | watch: { | 168 | // 新增菜单 |
| 134 | value (val) { | 169 | add () { |
| 135 | this.myValue = val | 170 | this.getParentMenuList(this.productId) |
| 171 | this.type = 0 | ||
| 172 | this.form.jumpMode = 1 | ||
| 173 | }, | ||
| 174 | // 编辑菜单 | ||
| 175 | edit (record) { | ||
| 176 | this.type = 1 | ||
| 177 | // 若有id为编辑 | ||
| 178 | if (record.id) { | ||
| 179 | this.$nextTick(() => { | ||
| 180 | this.form = Object.assign({}, record) | ||
| 181 | this.getParentMenuList(this.productId) | ||
| 182 | }) | ||
| 136 | } | 183 | } |
| 137 | }, | 184 | }, |
| 138 | methods: { | 185 | // 选择上级菜单 |
| 139 | // 获取父级菜单 | 186 | handleChange (value) { |
| 140 | getParentMenuList (id) { | 187 | this.form.parentId = value |
| 141 | 188 | }, | |
| 142 | getParentMenuListAction(id).then((res) => { | 189 | // 保存 |
| 143 | if (res.status === 1) { | 190 | submitForm (submitType) { |
| 144 | const list = this.$dealArrChildren(res.content) | 191 | this.$refs.form.validate((valid) => { |
| 145 | if (id) { | 192 | if (valid) { |
| 146 | this.parentMenuList = this.$dealArrDisabled( | 193 | let method = '' |
| 147 | this.$deepCopy(list), | 194 | let url = '' |
| 148 | id | 195 | const formData = this.form |
| 149 | ) | 196 | formData.productId = this.productId |
| 150 | this.menuKey++ | 197 | if (!formData.id) { |
| 151 | } else { | 198 | method = 'post' |
| 152 | this.parentMenuList = list | 199 | url = this.dataUrl |
| 153 | } | ||
| 154 | } else { | 200 | } else { |
| 155 | this.$message.error({ message: res.message, showClose: true }) | 201 | method = 'put' |
| 202 | url = `${this.dataUrl}/${formData.id}` | ||
| 156 | } | 203 | } |
| 157 | }) | 204 | httpAction(url, formData, method) |
| 158 | }, | 205 | .then((res) => { |
| 159 | // 选择图标 | 206 | if (res.status === 1) { |
| 160 | getIconName (data) { | 207 | this.$message.success({ |
| 161 | this.form.icon = data; | 208 | message: res.message, |
| 162 | }, | 209 | showClose: true |
| 163 | getIconList () { | 210 | }) |
| 164 | this.$refs.iconList.show(true) | ||
| 165 | }, | ||
| 166 | getIconName (data) { | ||
| 167 | this.form.icon = data | ||
| 168 | }, | ||
| 169 | // 配置参数 | ||
| 170 | getJsonString (data) { | ||
| 171 | this.form.metadata = data | ||
| 172 | }, | ||
| 173 | // 新增菜单 | ||
| 174 | add () { | ||
| 175 | this.getParentMenuList(this.productId) | ||
| 176 | this.type = 0 | ||
| 177 | this.form.jumpMode = 1 | ||
| 178 | }, | ||
| 179 | // 编辑菜单 | ||
| 180 | edit (record) { | ||
| 181 | this.type = 1 | ||
| 182 | // 若有id为编辑 | ||
| 183 | if (record.id) { | ||
| 184 | this.$nextTick(() => { | ||
| 185 | this.form = Object.assign({}, record) | ||
| 186 | this.getParentMenuList(this.productId) | ||
| 187 | }) | ||
| 188 | } | ||
| 189 | }, | ||
| 190 | // 选择上级菜单 | ||
| 191 | handleChange (value) { | ||
| 192 | this.form.parentId = value | ||
| 193 | }, | ||
| 194 | // 保存 | ||
| 195 | submitForm (submitType) { | ||
| 196 | this.$refs.form.validate((valid) => { | ||
| 197 | if (valid) { | ||
| 198 | let method = '' | ||
| 199 | let url = '' | ||
| 200 | const formData = this.form | ||
| 201 | formData.productId = this.productId | ||
| 202 | if (!formData.id) { | ||
| 203 | method = 'post' | ||
| 204 | url = this.dataUrl | ||
| 205 | } else { | ||
| 206 | method = 'put' | ||
| 207 | url = `${this.dataUrl}/${formData.id}` | ||
| 208 | } | ||
| 209 | debugger | ||
| 210 | httpAction(url, formData, method) | ||
| 211 | .then((res) => { | ||
| 212 | if (res.status === 1) { | ||
| 213 | this.$message.success({ | ||
| 214 | message: res.message, | ||
| 215 | showClose: true | ||
| 216 | }) | ||
| 217 | 211 | ||
| 218 | this.resetForm() | 212 | this.resetForm() |
| 219 | this.$emit('ok') | 213 | this.$emit('ok') |
| 220 | } else { | 214 | } else { |
| 221 | this.$message.error({ message: res.message, showClose: true }) | 215 | this.$message.error({ message: res.message, showClose: true }) |
| 222 | } | 216 | } |
| 223 | }) | 217 | }) |
| 224 | .catch((err) => { | 218 | .catch((err) => { |
| 225 | console.log(err) | 219 | console.log(err) |
| 226 | }) | 220 | }) |
| 227 | } | ||
| 228 | }) | ||
| 229 | }, | ||
| 230 | resetForm () { | ||
| 231 | this.$refs.form.resetFields() | ||
| 232 | this.form = { | ||
| 233 | icon: '', | ||
| 234 | code: '' | ||
| 235 | } | 221 | } |
| 236 | }, | 222 | }) |
| 237 | close () { | 223 | }, |
| 238 | this.resetForm() | 224 | resetForm () { |
| 239 | this.$emit('input', false) | 225 | this.$refs.form.resetFields() |
| 226 | this.form = { | ||
| 227 | icon: '', | ||
| 228 | code: '' | ||
| 240 | } | 229 | } |
| 230 | }, | ||
| 231 | close () { | ||
| 232 | this.resetForm() | ||
| 233 | this.$emit('input', false) | ||
| 241 | } | 234 | } |
| 242 | } | 235 | } |
| 236 | } | ||
| 243 | </script> | 237 | </script> |
| 244 | <style scoped lang="scss"> | 238 | <style scoped lang="scss"> |
| 245 | .modifydialog { | 239 | .modifydialog { |
| 246 | &-con { | 240 | &-con { |
| 247 | background: #031a46; | 241 | background: #031a46; |
| 248 | } | 242 | } |
| 249 | /deep/.el-dialog__header { | 243 | |
| 250 | .dialog_title { | 244 | /deep/.el-dialog__header { |
| 251 | display: -webkit-box; | 245 | .dialog_title { |
| 252 | display: -ms-flexbox; | 246 | display: -webkit-box; |
| 253 | display: flex; | 247 | display: -ms-flexbox; |
| 254 | position: relative; | 248 | display: flex; |
| 255 | top: -8px; | 249 | position: relative; |
| 256 | width: 28%; | 250 | top: -8px; |
| 257 | height: 40px; | 251 | width: 28%; |
| 258 | margin-left: 28px; | 252 | height: 40px; |
| 259 | -webkit-box-pack: center; | 253 | margin-left: 28px; |
| 260 | -ms-flex-pack: center; | 254 | -webkit-box-pack: center; |
| 261 | justify-content: center; | 255 | -ms-flex-pack: center; |
| 262 | white-space: nowrap; | 256 | justify-content: center; |
| 263 | b { | 257 | white-space: nowrap; |
| 264 | font-size: 16px; | 258 | |
| 265 | } | 259 | b { |
| 266 | } | 260 | font-size: 16px; |
| 267 | .el-dialog__headerbtn { | ||
| 268 | right: 20px !important; | ||
| 269 | top: 23px !important; | ||
| 270 | } | 261 | } |
| 271 | } | 262 | } |
| 263 | |||
| 264 | .el-dialog__headerbtn { | ||
| 265 | right: 20px !important; | ||
| 266 | top: 23px !important; | ||
| 267 | } | ||
| 272 | } | 268 | } |
| 269 | } | ||
| 273 | </style> | 270 | </style> | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Author: xiaomiao 1158771342@qq.com | 2 | * @Author: xiaomiao 1158771342@qq.com |
| 3 | * @Date: 2023-01-30 17:59:51 | 3 | * @Date: 2023-01-30 17:59:51 |
| 4 | * @LastEditors: xiaomiao 1158771342@qq.com | 4 | * @LastEditors: Please set LastEditors |
| 5 | * @LastEditTime: 2023-03-21 18:34:17 | 5 | * @LastEditTime: 2023-03-23 09:34:50 |
| 6 | * @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js | 6 | * @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js |
| 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 | */ |
| ... | @@ -29,7 +29,8 @@ class data extends filter { | ... | @@ -29,7 +29,8 @@ class data extends filter { |
| 29 | }, | 29 | }, |
| 30 | { | 30 | { |
| 31 | prop: "departmentName", | 31 | prop: "departmentName", |
| 32 | label: "组织机构" | 32 | label: "组织机构", |
| 33 | minWidth: 130 | ||
| 33 | }, | 34 | }, |
| 34 | { | 35 | { |
| 35 | prop: "telephone", | 36 | prop: "telephone", | ... | ... |
-
Please register or sign in to post a comment