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. 3
      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"
@click="tableButtonClick(item.name,item)"
v-permission="item.permission"
v-permission="item.permission || []"
>{{ item.label }}</el-button>
<!-- v-permission="item.permission" -->
</div>
</template>
<script>

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

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

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

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

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

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

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

@ -3,7 +3,7 @@ import store from './store'
import { Message } from 'element-ui'
import NProgress from 'nprogress' // progress bar
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 { mgr } from "@/oidc/oidc-client";

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

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

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

@ -1,12 +1,10 @@
import Cookies from 'js-cookie'
const state = {
sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
opened: localStorage.getItem('sidebarStatus') ? !!+localStorage.getItem('sidebarStatus') : true,
withoutAnimation: false
},
device: 'desktop',
size: Cookies.get('size') || 'medium',
size: localStorage.getItem('size') || 'medium',
loading: false
}
@ -15,13 +13,13 @@ const mutations = {
state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false
if (state.sidebar.opened) {
Cookies.set('sidebarStatus', 1)
localStorage.setItem('sidebarStatus', 1)
} else {
Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
}
},
CLOSE_SIDEBAR: (state, withoutAnimation) => {
Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation
},
@ -30,7 +28,7 @@ const mutations = {
},
SET_SIZE: (state, size) => {
state.size = size
Cookies.set('size', size)
localStorage.setItem('size', size)
},
APP_MAIN_LOADING: (state, 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'
const TokenKey = 'Admin-Token'
export function getToken() {
return Cookies.get(TokenKey)
return localStorage.getItem(TokenKey)
}
export function setToken(token) {
return Cookies.set(TokenKey, token)
return localStorage.setItem(TokenKey,token)
}
export function removeToken() {
return Cookies.remove(TokenKey)
return localStorage.removeItem(TokenKey)
}
// fast-new

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

@ -3,7 +3,6 @@ import {
MessageBox,
Message
} from 'element-ui'
import store from '@/store'
import {
getToken
} from '@/utils/auth'
@ -11,7 +10,7 @@ import {
// create an axios instance
const service = axios.create({
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
})

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

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

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

@ -113,7 +113,7 @@
<el-form
ref="form"
:model="form"
label-width="70px"
label-width="100px"
:rules="rules"
>
<el-form-item label="用户名" prop="userName">
@ -352,6 +352,9 @@ export default {
roleNames: [
{ 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"
@click="tableButtonClick(item.name,item)"
v-permission="item.permission"
v-permission="item.permission || []"
>{{ item.label }}</el-button>
<!-- v-permission="item.permission" -->
</div>
</template>
<script>

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

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

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

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

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

@ -15,6 +15,7 @@
<script>
import logo from "@/assets/img/menuLogo.png"
import getPageTitle from '@/utils/get-page-title'
export default {
name: 'SidebarLogo',
props: {
@ -25,7 +26,7 @@ export default {
},
data() {
return {
title: 'QAD&WMS',
title: getPageTitle(),
// logo: logo
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 NProgress from 'nprogress' // progress bar
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 { mgr } from "@/oidc/oidc-client";

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

@ -1,5 +1,5 @@
module.exports = {
title: '接口看板-QAD&WMS',
title: 'JOB-QAD&WMS',
/**
* @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 = {
sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
opened: localStorage.getItem('sidebarStatus') ? !!+localStorage.getItem('sidebarStatus') : true,
withoutAnimation: false
},
device: 'desktop',
size: Cookies.get('size') || 'medium',
size: localStorage.getItem('size') || 'medium',
loading: false
}
@ -15,13 +13,13 @@ const mutations = {
state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false
if (state.sidebar.opened) {
Cookies.set('sidebarStatus', 1)
localStorage.setItem('sidebarStatus', 1)
} else {
Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
}
},
CLOSE_SIDEBAR: (state, withoutAnimation) => {
Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation
},
@ -30,7 +28,7 @@ const mutations = {
},
SET_SIZE: (state, size) => {
state.size = size
Cookies.set('size', size)
localStorage.setItem('size', size)
},
APP_MAIN_LOADING: (state, 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'
const TokenKey = 'Admin-Token'
export function getToken() {
return Cookies.get(TokenKey)
return localStorage.getItem(TokenKey)
}
export function setToken(token) {
return Cookies.set(TokenKey, token)
return localStorage.setItem(TokenKey,token)
}
export function removeToken() {
return Cookies.remove(TokenKey)
return localStorage.removeItem(TokenKey)
}
// fast-new

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

@ -3,7 +3,6 @@ import {
MessageBox,
Message
} from 'element-ui'
import store from '@/store'
import {
getToken
} from '@/utils/auth'
@ -11,7 +10,7 @@ import {
// create an axios instance
const service = axios.create({
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
})

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

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

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

@ -113,7 +113,7 @@
<el-form
ref="form"
:model="form"
label-width="70px"
label-width="100px"
:rules="rules"
>
<el-form-item label="用户名" prop="userName">
@ -352,6 +352,9 @@
roleNames: [
{ 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"
@click="tableButtonClick(item.name,item)"
v-permission="item.permission"
v-permission="item.permission || []"
>{{ item.label }}</el-button>
<!-- v-permission="item.permission" -->
</div>
</template>
<script>

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

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

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

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

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

@ -15,6 +15,7 @@
<script>
import logo from "@/assets/img/menuLogo.png"
import getPageTitle from '@/utils/get-page-title'
export default {
name: 'SidebarLogo',
props: {
@ -25,8 +26,9 @@ export default {
},
data() {
return {
title: '',
logo: logo
title: getPageTitle(),
// logo: logo
logo: null
}
}
}
@ -56,8 +58,8 @@ export default {
width: 100%;
& .sidebar-logo {
width: 140px;
// height: 15px;
width: 61px;
height: 15px;
vertical-align: middle;
margin-right: 12px;
}
@ -77,7 +79,7 @@ export default {
&.collapse {
.sidebar-logo {
width: 42px;
// height: 10px;
height: 10px;
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 NProgress from 'nprogress' // progress bar
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 { 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({
mode: 'history', // 单点登录需要使用history,require service support
mode: 'hash', // 单点登录需要使用history,但是history会使线上nginx刷新404(需要确认及处理)
scrollBehavior: () => ({
y: 0
}),

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

@ -1,5 +1,5 @@
module.exports = {
title: '接口看板-QAD&WMS',
title: 'STORE-QAD&WMS',
/**
* @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 = {
sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
opened: localStorage.getItem('sidebarStatus') ? !!+localStorage.getItem('sidebarStatus') : true,
withoutAnimation: false
},
device: 'desktop',
size: Cookies.get('size') || 'medium',
size: localStorage.getItem('size') || 'medium',
loading: false
}
@ -15,13 +13,13 @@ const mutations = {
state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false
if (state.sidebar.opened) {
Cookies.set('sidebarStatus', 1)
localStorage.setItem('sidebarStatus', 1)
} else {
Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
}
},
CLOSE_SIDEBAR: (state, withoutAnimation) => {
Cookies.set('sidebarStatus', 0)
localStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation
},
@ -30,7 +28,7 @@ const mutations = {
},
SET_SIZE: (state, size) => {
state.size = size
Cookies.set('size', size)
localStorage.setItem('size', size)
},
APP_MAIN_LOADING: (state, 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'
const TokenKey = 'Admin-Token'
export function getToken() {
return Cookies.get(TokenKey)
return localStorage.getItem(TokenKey)
}
export function setToken(token) {
return Cookies.set(TokenKey, token)
return localStorage.setItem(TokenKey,token)
}
export function removeToken() {
return Cookies.remove(TokenKey)
return localStorage.removeItem(TokenKey)
}
// fast-new

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

@ -3,7 +3,6 @@ import {
MessageBox,
Message
} from 'element-ui'
import store from '@/store'
import {
getToken
} from '@/utils/auth'
@ -11,7 +10,7 @@ import {
// create an axios instance
const service = axios.create({
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
})

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

@ -539,10 +539,9 @@
}
.permission-tree{
padding: 20px;
height: 690px;
height: calc(100vh - 260px);
overflow-y: auto;
}
}
</style>

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

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

Loading…
Cancel
Save