diff --git a/PC/InterFace.Dash/public/config.js b/PC/InterFace.Dash/public/config.js index 5398f1d..8cf43ae 100644 --- a/PC/InterFace.Dash/public/config.js +++ b/PC/InterFace.Dash/public/config.js @@ -1,10 +1,7 @@ // dev_win window.SITE_CONFIG['baseApi'] = 'http://dev.ccwin-in.com:60068' -// window.SITE_CONFIG['baseApi'] = 'http://192.168.0.190:60068' window.SITE_CONFIG['authApi'] = 'http://dev.ccwin-in.com:60068' -// window.SITE_CONFIG['authApi'] = 'http://192.168.0.190:60068' window.SITE_CONFIG['loginApi'] = 'http://dev.ccwin-in.com:60065' -// window.SITE_CONFIG['loginApi'] = 'http://192.168.0.190:60065' window.SITE_CONFIG['businessApi'] = 'http://dev.ccwin-in.com:10097' //是否登录配置信息【loginName】 window.SITE_CONFIG['isConfigLogin'] = false diff --git a/PC/InterFace.Dash/src/api/wms-auth.js b/PC/InterFace.Dash/src/api/wms-auth.js index 0fb286b..4b74e0b 100644 --- a/PC/InterFace.Dash/src/api/wms-auth.js +++ b/PC/InterFace.Dash/src/api/wms-auth.js @@ -195,10 +195,11 @@ export function getusersID(data) { }) } -//重置密码 -export function resetPassword(id) { +//修改登录用户的密码-强密码规则 +export function postLoginUserInfo(data, id) { return request({ - url: authApi + '/identity/users/reset-password/' + id, - method: 'post' + url: authApi + '/identity/users/change-password/' + id, + method: 'post', + data }) } \ No newline at end of file diff --git a/PC/InterFace.Dash/src/components/tablePagination/index.vue b/PC/InterFace.Dash/src/components/tablePagination/index.vue index 9e16895..a081346 100644 --- a/PC/InterFace.Dash/src/components/tablePagination/index.vue +++ b/PC/InterFace.Dash/src/components/tablePagination/index.vue @@ -307,7 +307,8 @@ export default { _list.push(item) }else{ if(this.noUsePermissionBtn.indexOf(item.name) < 0){ - item.permission = [this.$route.name+'.'+item.name] + let _scope = item.clientScope || localStorage.getItem('appClientScope') + item.permission = [_scope + '.' +this.$route.name+'.'+item.name] }else{ item.permission = [] } diff --git a/PC/InterFace.Dash/src/components/umyTable/index.vue b/PC/InterFace.Dash/src/components/umyTable/index.vue index aaad8fc..ab57c35 100644 --- a/PC/InterFace.Dash/src/components/umyTable/index.vue +++ b/PC/InterFace.Dash/src/components/umyTable/index.vue @@ -167,6 +167,7 @@ :key="indexButton" type="text" size="mini" + v-permission="itemButton.permission" :style="{color:itemButton.color || '#409EFF'}" @click="buttonOperationClick_right(scope.row, itemButton, indexButton)" >{{itemButton.label}} @@ -212,8 +213,10 @@ import { formatTimeStrToStr } from "@/utils/formatTime"; import _ from "lodash"; import { getMatchRegConformValue } from "@/utils/index" import showCopyJsonPop from "@/components/showCopyJsonPop" +import permission from "@/directive/permission/index" export default { name: "currenTable", + directives: { permission }, components:{ showCopyJsonPop }, filters: { formatDate(time) { diff --git a/PC/InterFace.Dash/src/mixins/TableHeaderMixins.js b/PC/InterFace.Dash/src/mixins/TableHeaderMixins.js index 85b2224..f468695 100644 --- a/PC/InterFace.Dash/src/mixins/TableHeaderMixins.js +++ b/PC/InterFace.Dash/src/mixins/TableHeaderMixins.js @@ -68,10 +68,10 @@ export const TableHeaderMixins = { // this.$store.dispatch("app/appMainLoading", true) } // 新增(原始前端写死配置) - else if (val == 'newly') { + else if (val == 'Create') { this.formTitle = "新增" + this.$route.meta.title; this.formReveal = true - this.theEvent = "newly" + this.theEvent = "Create" this.displayDialog.newDialog = true; } // Api新增(参数配置从api获取) diff --git a/PC/InterFace.Dash/src/mixins/TableMixins.js b/PC/InterFace.Dash/src/mixins/TableMixins.js index 32dbdd5..1fab8af 100644 --- a/PC/InterFace.Dash/src/mixins/TableMixins.js +++ b/PC/InterFace.Dash/src/mixins/TableMixins.js @@ -51,15 +51,19 @@ export const tableMixins = { }, methods: { // 主表-右侧操作列基础按钮 - buttonOperationList_rightBase(){ + buttonOperationList_rightBase(op_e,op_d){ return [{ label:'编辑', name:'edit', - color:'#ff9000' + color:'#ff9000', + hide:op_e && op_e.hide ? op_e.hide : false, + permission:op_e && op_e.permission ? op_e.permission : [] },{ label:'删除', name:'delete', - color:'red' + color:'red', + hide:op_d && op_d.hide ? op_d.hide : false, + permission:op_d && op_d.permission ? op_d.permission : [] }] }, // 主表-右侧操作列基础按钮 diff --git a/PC/InterFace.Dash/src/permission.js b/PC/InterFace.Dash/src/permission.js index ed2865d..6b26604 100644 --- a/PC/InterFace.Dash/src/permission.js +++ b/PC/InterFace.Dash/src/permission.js @@ -12,7 +12,7 @@ NProgress.configure({ }) // NProgress Configuration const whiteList = ['/login','/callback'] // no redirect whitelist -const noUserMsg = '获取用户信息失败,请重新登录 !' +const loginErr = '登录失败,请重新登录 !' const getErrMsg = '数据获取失败 !' @@ -45,10 +45,9 @@ const toPageInit = async (to, from, next) => { // toNextHandle(to, from, next) // }) // .catch(()=>{ - // // todo-fast:接口恢复后更改 - // toNextHandle(to, from, next) - // // Message.error(noUserMsg) - // // pageToLogin(to, from, next) + // // toNextHandle(to, from, next) + // Message.error(loginErr) + // pageToLogin(to, from, next) // }) // return // } @@ -80,7 +79,7 @@ const toNextHandle = async (to, from, next) => { .then(res=>{ // 没有权限(token失效处理) if(!res || res.length <=0){ - Message.error('用户无权限或者token失效,请重新登录') + Message.error('用户无权限或者token失效,请配置权限或重新登录') store.dispatch("user/logout") } }) @@ -142,6 +141,7 @@ router.beforeEach(async (to, from, next) => { } else { // 如果有单点登录方式使用下方配置 // mgr.signinRedirect(); //执行重定向 + if(isAutoLogin){ let _username = localStorage.getItem("isConfigLogin") && localStorage.getItem("isConfigLogin") != 'false' ? localStorage.getItem("configLoginName") : to.query.loginName await store.dispatch('user/login', { @@ -152,10 +152,9 @@ router.beforeEach(async (to, from, next) => { toPageInit(to, from, next) }) .catch(()=>{ - // todo-fast:接口恢复后更改 - toNextHandle(to, from, next) - // Message.error(noUserMsg) - // pageToLogin(to, from, next) + // toNextHandle(to, from, next) + Message.error(loginErr) + pageToLogin(to, from, next) }) }else{ console.log('没有token,不是登录页,不是自动登录,pageToLogin') diff --git a/PC/InterFace.Dash/src/store/modules/permission.js b/PC/InterFace.Dash/src/store/modules/permission.js index f800273..33c94e0 100644 --- a/PC/InterFace.Dash/src/store/modules/permission.js +++ b/PC/InterFace.Dash/src/store/modules/permission.js @@ -169,7 +169,7 @@ const actions = { } // 存储所有的表名 commit('SET_TABLESNAME', _menuList) - // 数据模拟,todo-new:接口获取 + // 数据模拟,todo-faster:接口获取 let _treeMenusAll = null//树形菜单 // _treeMenusAll = [ // {name:"aaaaaaa"}, diff --git a/PC/InterFace.Dash/src/utils/defaultButtons.js b/PC/InterFace.Dash/src/utils/defaultButtons.js index bbe5032..8dcf1c8 100644 --- a/PC/InterFace.Dash/src/utils/defaultButtons.js +++ b/PC/InterFace.Dash/src/utils/defaultButtons.js @@ -13,7 +13,7 @@ export function defaultAddBtn(option) { type: "primary", icon: "el-icon-plus", label: i18n.t('btns.add'), - name: "newly", + name: "Create", size: "mini", background:"#31bb99" }) @@ -123,5 +123,6 @@ function __defaultBtnOption(option,specific){ isDetailExport:option && option.isDetailExport ? option.isDetailExport : false, isRedundance:option && option.isRedundance ? option.isRedundance : false, permission:option && option.permission ? option.permission : null, + clientScope:option && option.clientScope ? option.clientScope : null, } } \ No newline at end of file diff --git a/PC/InterFace.Dash/src/views/login/index.vue b/PC/InterFace.Dash/src/views/login/index.vue index dbd4b97..d306364 100644 --- a/PC/InterFace.Dash/src/views/login/index.vue +++ b/PC/InterFace.Dash/src/views/login/index.vue @@ -38,10 +38,9 @@ { - this.$message.error('用户名或密码错误!') this.loading = false + if(!error){ + this.$message.error('用户名或密码错误!') + } }) } else { console.log('error submit!!') diff --git a/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue b/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue index 9518f06..1cabd61 100644 --- a/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue +++ b/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkRoles.vue @@ -130,7 +130,7 @@ diff --git a/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkUsers.vue b/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkUsers.vue index 3281d1b..13869c6 100644 --- a/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkUsers.vue +++ b/PC/InterFace.Dash/src/views/menuList/AbpIdentityMarkUsers.vue @@ -1,19 +1,637 @@ + + diff --git a/PC/InterFace.Dash/src/views/menuList/ExportCustomUserSetting.vue b/PC/InterFace.Dash/src/views/menuList/ExportCustomUserSetting.vue index 70b378c..119e5be 100644 --- a/PC/InterFace.Dash/src/views/menuList/ExportCustomUserSetting.vue +++ b/PC/InterFace.Dash/src/views/menuList/ExportCustomUserSetting.vue @@ -24,7 +24,10 @@ :primarySearchOption="primarySearchOption" @overallSearchFormClick="overallSearchFormClick" :httpOverallSearchData="httpOverallSearchData" - :buttonOperationList_right="buttonOperationList_rightBase" + :buttonOperationList_right="(row)=>{return buttonOperationList_rightBase( + {permission:['Z.ExportCustomUserSetting.Update'],hide:OperaButtonHide(row)}, + {permission:['Z.ExportCustomUserSetting.Delete'],hide:OperaButtonHide(row)} + )}" @buttonOperationClick_right="buttonOperationClick_right" >