Browse Source

【接口看板+Job+Store】新权限版本最终版

faster_AG_grid 此版本为token权限框架更改最终版
安虹睿 1 year ago
parent
commit
9e13a7301c
  1. 3
      PC/InterFace.Dash/src/components/currenButton/innerButton.vue
  2. 6
      PC/InterFace.Dash/src/components/tableTree/index.vue
  3. 2
      PC/InterFace.Dash/src/components/umyTable/index.vue
  4. 12
      PC/InterFace.Dash/src/layout/components/Sidebar/Logo.vue
  5. 2
      PC/InterFace.Dash/src/permission.js
  6. 2
      PC/InterFace.Dash/src/router/index.js
  7. 14
      PC/InterFace.Dash/src/store/modules/app.js
  8. 7
      PC/InterFace.Dash/src/utils/auth.js
  9. 3
      PC/InterFace.Dash/src/utils/request.js
  10. 2
      PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue
  11. 5
      PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkUsers.vue
  12. 3
      PC/UI.WinIn.FasterZ.Job/src/components/currenButton/innerButton.vue
  13. 6
      PC/UI.WinIn.FasterZ.Job/src/components/tableTree/index.vue
  14. 2
      PC/UI.WinIn.FasterZ.Job/src/components/umyTable/index.vue
  15. 3
      PC/UI.WinIn.FasterZ.Job/src/layout/components/Sidebar/Logo.vue
  16. 2
      PC/UI.WinIn.FasterZ.Job/src/permission.js
  17. 2
      PC/UI.WinIn.FasterZ.Job/src/settings.js
  18. 14
      PC/UI.WinIn.FasterZ.Job/src/store/modules/app.js
  19. 7
      PC/UI.WinIn.FasterZ.Job/src/utils/auth.js
  20. 3
      PC/UI.WinIn.FasterZ.Job/src/utils/request.js
  21. 2
      PC/UI.WinIn.FasterZ.Job/src/views/menuList/AbpIdentityMarkRoles.vue
  22. 5
      PC/UI.WinIn.FasterZ.Job/src/views/menuList/AbpIdentityMarkUsers.vue
  23. 3
      PC/UI.WinIn.FasterZ.Store/src/components/currenButton/innerButton.vue
  24. 6
      PC/UI.WinIn.FasterZ.Store/src/components/tableTree/index.vue
  25. 2
      PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue
  26. 12
      PC/UI.WinIn.FasterZ.Store/src/layout/components/Sidebar/Logo.vue
  27. 2
      PC/UI.WinIn.FasterZ.Store/src/permission.js
  28. 2
      PC/UI.WinIn.FasterZ.Store/src/router/index.js
  29. 2
      PC/UI.WinIn.FasterZ.Store/src/settings.js
  30. 14
      PC/UI.WinIn.FasterZ.Store/src/store/modules/app.js
  31. 7
      PC/UI.WinIn.FasterZ.Store/src/utils/auth.js
  32. 3
      PC/UI.WinIn.FasterZ.Store/src/utils/request.js
  33. 1005
      PC/UI.WinIn.FasterZ.Store/src/views/menuList/AbpIdentityMarkRoles.vue
  34. 5
      PC/UI.WinIn.FasterZ.Store/src/views/menuList/AbpIdentityMarkUsers.vue

3
PC/InterFace.Dash/src/components/currenButton/innerButton.vue

@ -16,9 +16,8 @@
}" }"
:class="item.class" :class="item.class"
@click="tableButtonClick(item.name,item)" @click="tableButtonClick(item.name,item)"
v-permission="item.permission" v-permission="item.permission || []"
>{{ item.label }}</el-button> >{{ item.label }}</el-button>
<!-- v-permission="item.permission" -->
</div> </div>
</template> </template>
<script> <script>

6
PC/InterFace.Dash/src/components/tableTree/index.vue

@ -11,7 +11,7 @@
:icon="item.icon" :icon="item.icon"
:size="item.size" :size="item.size"
@click="headerButtonsHandle(item)" @click="headerButtonsHandle(item)"
v-permission="item.permission" v-permission="item.permission || []"
>{{item.label}}</el-button> >{{item.label}}</el-button>
</div> </div>
<div class="query-box"> <div class="query-box">
@ -31,7 +31,7 @@
:icon="item.icon" :icon="item.icon"
:size="item.size" :size="item.size"
@click="headerButtonsHandle(item)" @click="headerButtonsHandle(item)"
v-permission="item.permission" v-permission="item.permission || []"
>{{item.label}}</el-button> >{{item.label}}</el-button>
</div> </div>
</div> </div>
@ -75,7 +75,7 @@
:style="item.style" :style="item.style"
v-show="typeof item.hide == 'function' ? !item.hide(scope.row) : !item.hide" v-show="typeof item.hide == 'function' ? !item.hide(scope.row) : !item.hide"
:icon="item.icon" :icon="item.icon"
v-permission="item.permission" v-permission="item.permission || []"
>{{item.label}}</el-button> >{{item.label}}</el-button>
</template> </template>
</el-table-column> </el-table-column>

2
PC/InterFace.Dash/src/components/umyTable/index.vue

@ -167,7 +167,7 @@
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
v-permission="itemButton.permission" v-permission="itemButton.permission || []"
:style="{color:itemButton.color || '#409EFF'}" :style="{color:itemButton.color || '#409EFF'}"
@click="buttonOperationClick_right(scope.row, itemButton, indexButton)" @click="buttonOperationClick_right(scope.row, itemButton, indexButton)"
>{{itemButton.label}}</el-button> >{{itemButton.label}}</el-button>

12
PC/InterFace.Dash/src/layout/components/Sidebar/Logo.vue

@ -15,6 +15,7 @@
<script> <script>
import logo from "@/assets/img/menuLogo.png" import logo from "@/assets/img/menuLogo.png"
import getPageTitle from '@/utils/get-page-title'
export default { export default {
name: 'SidebarLogo', name: 'SidebarLogo',
props: { props: {
@ -25,8 +26,9 @@ export default {
}, },
data() { data() {
return { return {
title: '', title: getPageTitle(),
logo: logo // logo: logo
logo: null
} }
} }
} }
@ -56,8 +58,8 @@ export default {
width: 100%; width: 100%;
& .sidebar-logo { & .sidebar-logo {
width: 140px; width: 61px;
// height: 15px; height: 15px;
vertical-align: middle; vertical-align: middle;
margin-right: 12px; margin-right: 12px;
} }
@ -77,7 +79,7 @@ export default {
&.collapse { &.collapse {
.sidebar-logo { .sidebar-logo {
width: 42px; width: 42px;
// height: 10px; height: 10px;
margin-right: 0px; margin-right: 0px;
} }
} }

2
PC/InterFace.Dash/src/permission.js

@ -3,7 +3,7 @@ import store from './store'
import { Message } from 'element-ui' import { Message } from 'element-ui'
import NProgress from 'nprogress' // progress bar import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style import 'nprogress/nprogress.css' // progress bar style
import { getToken,removeToken } from '@/utils/auth' // get token from cookie import { getToken } from '@/utils/auth'
import getPageTitle from '@/utils/get-page-title' import getPageTitle from '@/utils/get-page-title'
import { mgr } from "@/oidc/oidc-client"; import { mgr } from "@/oidc/oidc-client";

2
PC/InterFace.Dash/src/router/index.js

@ -153,7 +153,7 @@ export let asyncRoutes = [
] ]
const createRouter = () => new Router({ const createRouter = () => new Router({
mode: 'history', // 单点登录需要使用history,require service support mode: 'hash', // 单点登录需要使用history,但是history会使线上nginx刷新404(需要确认及处理)
scrollBehavior: () => ({ scrollBehavior: () => ({
y: 0 y: 0
}), }),

14
PC/InterFace.Dash/src/store/modules/app.js

@ -1,12 +1,10 @@
import Cookies from 'js-cookie'
const state = { const state = {
sidebar: { sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, opened: localStorage.getItem('sidebarStatus') ? !!+localStorage.getItem('sidebarStatus') : true,
withoutAnimation: false withoutAnimation: false
}, },
device: 'desktop', device: 'desktop',
size: Cookies.get('size') || 'medium', size: localStorage.getItem('size') || 'medium',
loading: false loading: false
} }
@ -15,13 +13,13 @@ const mutations = {
state.sidebar.opened = !state.sidebar.opened state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false state.sidebar.withoutAnimation = false
if (state.sidebar.opened) { if (state.sidebar.opened) {
Cookies.set('sidebarStatus', 1) localStorage.setItem('sidebarStatus', 1)
} else { } else {
Cookies.set('sidebarStatus', 0) localStorage.setItem('sidebarStatus', 0)
} }
}, },
CLOSE_SIDEBAR: (state, withoutAnimation) => { CLOSE_SIDEBAR: (state, withoutAnimation) => {
Cookies.set('sidebarStatus', 0) localStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation state.sidebar.withoutAnimation = withoutAnimation
}, },
@ -30,7 +28,7 @@ const mutations = {
}, },
SET_SIZE: (state, size) => { SET_SIZE: (state, size) => {
state.size = size state.size = size
Cookies.set('size', size) localStorage.setItem('size', size)
}, },
APP_MAIN_LOADING: (state, loading) => { APP_MAIN_LOADING: (state, loading) => {
state.loading = loading state.loading = loading

7
PC/InterFace.Dash/src/utils/auth.js

@ -1,18 +1,17 @@
import Cookies from 'js-cookie'
import store from '@/store' import store from '@/store'
const TokenKey = 'Admin-Token' const TokenKey = 'Admin-Token'
export function getToken() { export function getToken() {
return Cookies.get(TokenKey) return localStorage.getItem(TokenKey)
} }
export function setToken(token) { export function setToken(token) {
return Cookies.set(TokenKey, token) return localStorage.setItem(TokenKey,token)
} }
export function removeToken() { export function removeToken() {
return Cookies.remove(TokenKey) return localStorage.removeItem(TokenKey)
} }
// fast-new // fast-new

3
PC/InterFace.Dash/src/utils/request.js

@ -3,7 +3,6 @@ import {
MessageBox, MessageBox,
Message Message
} from 'element-ui' } from 'element-ui'
import store from '@/store'
import { import {
getToken getToken
} from '@/utils/auth' } from '@/utils/auth'
@ -11,7 +10,7 @@ import {
// create an axios instance // create an axios instance
const service = axios.create({ const service = axios.create({
baseURL: '', // url = base url + request url baseURL: '', // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests // withCredentials: true, // send when cross-domain requests
timeout: 300000 // request timeout timeout: 300000 // request timeout
}) })

2
PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue

@ -539,7 +539,7 @@ export default {
} }
.permission-tree{ .permission-tree{
padding: 20px; padding: 20px;
height: 690px; height: calc(100vh - 260px);
overflow-y: auto; overflow-y: auto;
} }
} }

5
PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkUsers.vue

@ -113,7 +113,7 @@
<el-form <el-form
ref="form" ref="form"
:model="form" :model="form"
label-width="70px" label-width="100px"
:rules="rules" :rules="rules"
> >
<el-form-item label="用户名" prop="userName"> <el-form-item label="用户名" prop="userName">
@ -352,6 +352,9 @@ export default {
roleNames: [ roleNames: [
{ required: true, message: "请选择角色", trigger: "change" }, { required: true, message: "请选择角色", trigger: "change" },
], ],
isActive: [
{ required: true, message: "请选择是否禁用", trigger: "change" },
],
}, },
}; };
}, },

3
PC/UI.WinIn.FasterZ.Job/src/components/currenButton/innerButton.vue

@ -16,9 +16,8 @@
}" }"
:class="item.class" :class="item.class"
@click="tableButtonClick(item.name,item)" @click="tableButtonClick(item.name,item)"
v-permission="item.permission" v-permission="item.permission || []"
>{{ item.label }}</el-button> >{{ item.label }}</el-button>
<!-- v-permission="item.permission" -->
</div> </div>
</template> </template>
<script> <script>

6
PC/UI.WinIn.FasterZ.Job/src/components/tableTree/index.vue

@ -11,7 +11,7 @@
:icon="item.icon" :icon="item.icon"
:size="item.size" :size="item.size"
@click="headerButtonsHandle(item)" @click="headerButtonsHandle(item)"
v-permission="item.permission" v-permission="item.permission || []"
>{{item.label}}</el-button> >{{item.label}}</el-button>
</div> </div>
<div class="query-box"> <div class="query-box">
@ -31,7 +31,7 @@
:icon="item.icon" :icon="item.icon"
:size="item.size" :size="item.size"
@click="headerButtonsHandle(item)" @click="headerButtonsHandle(item)"
v-permission="item.permission" v-permission="item.permission || []"
>{{item.label}}</el-button> >{{item.label}}</el-button>
</div> </div>
</div> </div>
@ -75,7 +75,7 @@
:style="item.style" :style="item.style"
v-show="typeof item.hide == 'function' ? !item.hide(scope.row) : !item.hide" v-show="typeof item.hide == 'function' ? !item.hide(scope.row) : !item.hide"
:icon="item.icon" :icon="item.icon"
v-permission="item.permission" v-permission="item.permission || []"
>{{item.label}}</el-button> >{{item.label}}</el-button>
</template> </template>
</el-table-column> </el-table-column>

2
PC/UI.WinIn.FasterZ.Job/src/components/umyTable/index.vue

@ -167,7 +167,7 @@
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
v-permission="itemButton.permission" v-permission="itemButton.permission || []"
:style="{color:itemButton.color || '#409EFF'}" :style="{color:itemButton.color || '#409EFF'}"
@click="buttonOperationClick_right(scope.row, itemButton, indexButton)" @click="buttonOperationClick_right(scope.row, itemButton, indexButton)"
>{{itemButton.label}}</el-button> >{{itemButton.label}}</el-button>

3
PC/UI.WinIn.FasterZ.Job/src/layout/components/Sidebar/Logo.vue

@ -15,6 +15,7 @@
<script> <script>
import logo from "@/assets/img/menuLogo.png" import logo from "@/assets/img/menuLogo.png"
import getPageTitle from '@/utils/get-page-title'
export default { export default {
name: 'SidebarLogo', name: 'SidebarLogo',
props: { props: {
@ -25,7 +26,7 @@ export default {
}, },
data() { data() {
return { return {
title: 'QAD&WMS', title: getPageTitle(),
// logo: logo // logo: logo
logo: null logo: null
} }

2
PC/UI.WinIn.FasterZ.Job/src/permission.js

@ -3,7 +3,7 @@ import store from './store'
import { Message } from 'element-ui' import { Message } from 'element-ui'
import NProgress from 'nprogress' // progress bar import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style import 'nprogress/nprogress.css' // progress bar style
import { getToken,removeToken } from '@/utils/auth' // get token from cookie import { getToken } from '@/utils/auth'
import getPageTitle from '@/utils/get-page-title' import getPageTitle from '@/utils/get-page-title'
import { mgr } from "@/oidc/oidc-client"; import { mgr } from "@/oidc/oidc-client";

2
PC/UI.WinIn.FasterZ.Job/src/settings.js

@ -1,5 +1,5 @@
module.exports = { module.exports = {
title: '接口看板-QAD&WMS', title: 'JOB-QAD&WMS',
/** /**
* @type {boolean} true | false * @type {boolean} true | false

14
PC/UI.WinIn.FasterZ.Job/src/store/modules/app.js

@ -1,12 +1,10 @@
import Cookies from 'js-cookie'
const state = { const state = {
sidebar: { sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, opened: localStorage.getItem('sidebarStatus') ? !!+localStorage.getItem('sidebarStatus') : true,
withoutAnimation: false withoutAnimation: false
}, },
device: 'desktop', device: 'desktop',
size: Cookies.get('size') || 'medium', size: localStorage.getItem('size') || 'medium',
loading: false loading: false
} }
@ -15,13 +13,13 @@ const mutations = {
state.sidebar.opened = !state.sidebar.opened state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false state.sidebar.withoutAnimation = false
if (state.sidebar.opened) { if (state.sidebar.opened) {
Cookies.set('sidebarStatus', 1) localStorage.setItem('sidebarStatus', 1)
} else { } else {
Cookies.set('sidebarStatus', 0) localStorage.setItem('sidebarStatus', 0)
} }
}, },
CLOSE_SIDEBAR: (state, withoutAnimation) => { CLOSE_SIDEBAR: (state, withoutAnimation) => {
Cookies.set('sidebarStatus', 0) localStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation state.sidebar.withoutAnimation = withoutAnimation
}, },
@ -30,7 +28,7 @@ const mutations = {
}, },
SET_SIZE: (state, size) => { SET_SIZE: (state, size) => {
state.size = size state.size = size
Cookies.set('size', size) localStorage.setItem('size', size)
}, },
APP_MAIN_LOADING: (state, loading) => { APP_MAIN_LOADING: (state, loading) => {
state.loading = loading state.loading = loading

7
PC/UI.WinIn.FasterZ.Job/src/utils/auth.js

@ -1,18 +1,17 @@
import Cookies from 'js-cookie'
import store from '@/store' import store from '@/store'
const TokenKey = 'Admin-Token' const TokenKey = 'Admin-Token'
export function getToken() { export function getToken() {
return Cookies.get(TokenKey) return localStorage.getItem(TokenKey)
} }
export function setToken(token) { export function setToken(token) {
return Cookies.set(TokenKey, token) return localStorage.setItem(TokenKey,token)
} }
export function removeToken() { export function removeToken() {
return Cookies.remove(TokenKey) return localStorage.removeItem(TokenKey)
} }
// fast-new // fast-new

3
PC/UI.WinIn.FasterZ.Job/src/utils/request.js

@ -3,7 +3,6 @@ import {
MessageBox, MessageBox,
Message Message
} from 'element-ui' } from 'element-ui'
import store from '@/store'
import { import {
getToken getToken
} from '@/utils/auth' } from '@/utils/auth'
@ -11,7 +10,7 @@ import {
// create an axios instance // create an axios instance
const service = axios.create({ const service = axios.create({
baseURL: '', // url = base url + request url baseURL: '', // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests // withCredentials: true, // send when cross-domain requests
timeout: 300000 // request timeout timeout: 300000 // request timeout
}) })

2
PC/UI.WinIn.FasterZ.Job/src/views/menuList/AbpIdentityMarkRoles.vue

@ -539,7 +539,7 @@
} }
.permission-tree{ .permission-tree{
padding: 20px; padding: 20px;
height: 690px; height: calc(100vh - 260px);
overflow-y: auto; overflow-y: auto;
} }
} }

5
PC/UI.WinIn.FasterZ.Job/src/views/menuList/AbpIdentityMarkUsers.vue

@ -113,7 +113,7 @@
<el-form <el-form
ref="form" ref="form"
:model="form" :model="form"
label-width="70px" label-width="100px"
:rules="rules" :rules="rules"
> >
<el-form-item label="用户名" prop="userName"> <el-form-item label="用户名" prop="userName">
@ -352,6 +352,9 @@
roleNames: [ roleNames: [
{ required: true, message: "请选择角色", trigger: "change" }, { required: true, message: "请选择角色", trigger: "change" },
], ],
isActive: [
{ required: true, message: "请选择是否禁用", trigger: "change" },
],
}, },
}; };
}, },

3
PC/UI.WinIn.FasterZ.Store/src/components/currenButton/innerButton.vue

@ -16,9 +16,8 @@
}" }"
:class="item.class" :class="item.class"
@click="tableButtonClick(item.name,item)" @click="tableButtonClick(item.name,item)"
v-permission="item.permission" v-permission="item.permission || []"
>{{ item.label }}</el-button> >{{ item.label }}</el-button>
<!-- v-permission="item.permission" -->
</div> </div>
</template> </template>
<script> <script>

6
PC/UI.WinIn.FasterZ.Store/src/components/tableTree/index.vue

@ -11,7 +11,7 @@
:icon="item.icon" :icon="item.icon"
:size="item.size" :size="item.size"
@click="headerButtonsHandle(item)" @click="headerButtonsHandle(item)"
v-permission="item.permission" v-permission="item.permission || []"
>{{item.label}}</el-button> >{{item.label}}</el-button>
</div> </div>
<div class="query-box"> <div class="query-box">
@ -31,7 +31,7 @@
:icon="item.icon" :icon="item.icon"
:size="item.size" :size="item.size"
@click="headerButtonsHandle(item)" @click="headerButtonsHandle(item)"
v-permission="item.permission" v-permission="item.permission || []"
>{{item.label}}</el-button> >{{item.label}}</el-button>
</div> </div>
</div> </div>
@ -75,7 +75,7 @@
:style="item.style" :style="item.style"
v-show="typeof item.hide == 'function' ? !item.hide(scope.row) : !item.hide" v-show="typeof item.hide == 'function' ? !item.hide(scope.row) : !item.hide"
:icon="item.icon" :icon="item.icon"
v-permission="item.permission" v-permission="item.permission || []"
>{{item.label}}</el-button> >{{item.label}}</el-button>
</template> </template>
</el-table-column> </el-table-column>

2
PC/UI.WinIn.FasterZ.Store/src/components/umyTable/index.vue

@ -167,7 +167,7 @@
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
v-permission="itemButton.permission" v-permission="itemButton.permission || []"
:style="{color:itemButton.color || '#409EFF'}" :style="{color:itemButton.color || '#409EFF'}"
@click="buttonOperationClick_right(scope.row, itemButton, indexButton)" @click="buttonOperationClick_right(scope.row, itemButton, indexButton)"
>{{itemButton.label}}</el-button> >{{itemButton.label}}</el-button>

12
PC/UI.WinIn.FasterZ.Store/src/layout/components/Sidebar/Logo.vue

@ -15,6 +15,7 @@
<script> <script>
import logo from "@/assets/img/menuLogo.png" import logo from "@/assets/img/menuLogo.png"
import getPageTitle from '@/utils/get-page-title'
export default { export default {
name: 'SidebarLogo', name: 'SidebarLogo',
props: { props: {
@ -25,8 +26,9 @@ export default {
}, },
data() { data() {
return { return {
title: '', title: getPageTitle(),
logo: logo // logo: logo
logo: null
} }
} }
} }
@ -56,8 +58,8 @@ export default {
width: 100%; width: 100%;
& .sidebar-logo { & .sidebar-logo {
width: 140px; width: 61px;
// height: 15px; height: 15px;
vertical-align: middle; vertical-align: middle;
margin-right: 12px; margin-right: 12px;
} }
@ -77,7 +79,7 @@ export default {
&.collapse { &.collapse {
.sidebar-logo { .sidebar-logo {
width: 42px; width: 42px;
// height: 10px; height: 10px;
margin-right: 0px; margin-right: 0px;
} }
} }

2
PC/UI.WinIn.FasterZ.Store/src/permission.js

@ -3,7 +3,7 @@ import store from './store'
import { Message } from 'element-ui' import { Message } from 'element-ui'
import NProgress from 'nprogress' // progress bar import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style import 'nprogress/nprogress.css' // progress bar style
import { getToken,removeToken } from '@/utils/auth' // get token from cookie import { getToken } from '@/utils/auth'
import getPageTitle from '@/utils/get-page-title' import getPageTitle from '@/utils/get-page-title'
import { mgr } from "@/oidc/oidc-client"; import { mgr } from "@/oidc/oidc-client";

2
PC/UI.WinIn.FasterZ.Store/src/router/index.js

@ -153,7 +153,7 @@ export let asyncRoutes = [
] ]
const createRouter = () => new Router({ const createRouter = () => new Router({
mode: 'history', // 单点登录需要使用history,require service support mode: 'hash', // 单点登录需要使用history,但是history会使线上nginx刷新404(需要确认及处理)
scrollBehavior: () => ({ scrollBehavior: () => ({
y: 0 y: 0
}), }),

2
PC/UI.WinIn.FasterZ.Store/src/settings.js

@ -1,5 +1,5 @@
module.exports = { module.exports = {
title: '接口看板-QAD&WMS', title: 'STORE-QAD&WMS',
/** /**
* @type {boolean} true | false * @type {boolean} true | false

14
PC/UI.WinIn.FasterZ.Store/src/store/modules/app.js

@ -1,12 +1,10 @@
import Cookies from 'js-cookie'
const state = { const state = {
sidebar: { sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, opened: localStorage.getItem('sidebarStatus') ? !!+localStorage.getItem('sidebarStatus') : true,
withoutAnimation: false withoutAnimation: false
}, },
device: 'desktop', device: 'desktop',
size: Cookies.get('size') || 'medium', size: localStorage.getItem('size') || 'medium',
loading: false loading: false
} }
@ -15,13 +13,13 @@ const mutations = {
state.sidebar.opened = !state.sidebar.opened state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false state.sidebar.withoutAnimation = false
if (state.sidebar.opened) { if (state.sidebar.opened) {
Cookies.set('sidebarStatus', 1) localStorage.setItem('sidebarStatus', 1)
} else { } else {
Cookies.set('sidebarStatus', 0) localStorage.setItem('sidebarStatus', 0)
} }
}, },
CLOSE_SIDEBAR: (state, withoutAnimation) => { CLOSE_SIDEBAR: (state, withoutAnimation) => {
Cookies.set('sidebarStatus', 0) localStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation state.sidebar.withoutAnimation = withoutAnimation
}, },
@ -30,7 +28,7 @@ const mutations = {
}, },
SET_SIZE: (state, size) => { SET_SIZE: (state, size) => {
state.size = size state.size = size
Cookies.set('size', size) localStorage.setItem('size', size)
}, },
APP_MAIN_LOADING: (state, loading) => { APP_MAIN_LOADING: (state, loading) => {
state.loading = loading state.loading = loading

7
PC/UI.WinIn.FasterZ.Store/src/utils/auth.js

@ -1,18 +1,17 @@
import Cookies from 'js-cookie'
import store from '@/store' import store from '@/store'
const TokenKey = 'Admin-Token' const TokenKey = 'Admin-Token'
export function getToken() { export function getToken() {
return Cookies.get(TokenKey) return localStorage.getItem(TokenKey)
} }
export function setToken(token) { export function setToken(token) {
return Cookies.set(TokenKey, token) return localStorage.setItem(TokenKey,token)
} }
export function removeToken() { export function removeToken() {
return Cookies.remove(TokenKey) return localStorage.removeItem(TokenKey)
} }
// fast-new // fast-new

3
PC/UI.WinIn.FasterZ.Store/src/utils/request.js

@ -3,7 +3,6 @@ import {
MessageBox, MessageBox,
Message Message
} from 'element-ui' } from 'element-ui'
import store from '@/store'
import { import {
getToken getToken
} from '@/utils/auth' } from '@/utils/auth'
@ -11,7 +10,7 @@ import {
// create an axios instance // create an axios instance
const service = axios.create({ const service = axios.create({
baseURL: '', // url = base url + request url baseURL: '', // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests // withCredentials: true, // send when cross-domain requests
timeout: 300000 // request timeout timeout: 300000 // request timeout
}) })

1005
PC/UI.WinIn.FasterZ.Store/src/views/menuList/AbpIdentityMarkRoles.vue

File diff suppressed because it is too large

5
PC/UI.WinIn.FasterZ.Store/src/views/menuList/AbpIdentityMarkUsers.vue

@ -113,7 +113,7 @@
<el-form <el-form
ref="form" ref="form"
:model="form" :model="form"
label-width="70px" label-width="100px"
:rules="rules" :rules="rules"
> >
<el-form-item label="用户名" prop="userName"> <el-form-item label="用户名" prop="userName">
@ -352,6 +352,9 @@ export default {
roleNames: [ roleNames: [
{ required: true, message: "请选择角色", trigger: "change" }, { required: true, message: "请选择角色", trigger: "change" },
], ],
isActive: [
{ required: true, message: "请选择是否禁用", trigger: "change" },
],
}, },
}; };
}, },

Loading…
Cancel
Save