Merge remote-tracking branch 'origin/master'
| | |
| | | "test:e2e": "vue-cli-service test:e2e" |
| | | }, |
| | | "dependencies": { |
| | | "avue-plugin-ueditor": "^0.1.4", |
| | | "axios": "^0.18.0", |
| | | "babel-polyfill": "^6.26.0", |
| | | "classlist-polyfill": "^1.2.0", |
| | | "crypto-js": "^4.1.1", |
| | | "avue-plugin-ueditor": "0.1.4", |
| | | "axios": "0.18.0", |
| | | "babel-polyfill": "6.26.0", |
| | | "classlist-polyfill": "1.2.0", |
| | | "crypto-js": "4.1.1", |
| | | "echarts": "4.9.0", |
| | | "element-ui": "^2.15.6", |
| | | "instead": "^1.0.3", |
| | | "js-base64": "^2.5.1", |
| | | "js-cookie": "^2.2.0", |
| | | "js-md5": "^0.7.3", |
| | | "js-pinyin": "^0.2.4", |
| | | "mockjs": "^1.0.1-beta3", |
| | | "moment": "^2.29.4", |
| | | "node-gyp": "^4.0.0", |
| | | "nprogress": "^0.2.0", |
| | | "portfinder": "^1.0.23", |
| | | "save": "^2.9.0", |
| | | "script-loader": "^0.7.2", |
| | | "vue": "^2.6.10", |
| | | "vue-axios": "^2.1.2", |
| | | "vue-clipboard2": "^0.3.3", |
| | | "element-ui": "2.15.6", |
| | | "instead": "1.0.3", |
| | | "js-base64": "2.5.1", |
| | | "js-cookie": "2.2.0", |
| | | "js-md5": "0.7.3", |
| | | "js-pinyin": "0.2.4", |
| | | "mockjs": "1.0.1-beta3", |
| | | "moment": "2.29.4", |
| | | "node-gyp": "4.0.0", |
| | | "nprogress": "0.2.0", |
| | | "portfinder": "1.0.23", |
| | | "save": "2.9.0", |
| | | "script-loader": "0.7.2", |
| | | "vue": "2.6.10", |
| | | "vue-axios": "2.1.2", |
| | | "vue-clipboard2": "0.3.3", |
| | | "vue-echarts": "5.0.0-beta.0", |
| | | "vue-flowchart-editor": "^1.0.2", |
| | | "vue-i18n": "^8.7.0", |
| | | "vue-router": "^3.0.1", |
| | | "vuex": "^3.1.1" |
| | | "vue-flowchart-editor": "1.0.2", |
| | | "vue-i18n": "8.7.0", |
| | | "vue-router": "3.0.1", |
| | | "vuex": "3.1.1" |
| | | }, |
| | | "devDependencies": { |
| | | "@vue/cli-plugin-babel": "^3.1.1", |
| | | "@vue/cli-plugin-eslint": "^3.1.5", |
| | | "@vue/cli-service": "^3.1.4", |
| | | "@vue/composition-api": "^1.7.2", |
| | | "chai": "^4.1.2", |
| | | "node-sass": "^6.0.1", |
| | | "sass-loader": "^10.0.5", |
| | | "vue-template-compiler": "^2.5.17", |
| | | "webpack-bundle-analyzer": "^3.0.3" |
| | | "@vue/cli-plugin-babel": "3.1.1", |
| | | "@vue/cli-plugin-eslint": "3.1.5", |
| | | "@vue/cli-service": "3.1.4", |
| | | "@vue/composition-api": "1.7.2", |
| | | "chai": "4.1.2", |
| | | "node-sass": "6.0.1", |
| | | "sass-loader": "10.0.5", |
| | | "vue-template-compiler": "2.5.17", |
| | | "webpack-bundle-analyzer": "3.0.3" |
| | | }, |
| | | "lint-staged": { |
| | | "*.js": [ |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | | v-model="form" |
| | | :permission="permissionList" |
| | | :page.sync="page" |
| | | :before-open="beforeOpen" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listLogOperate } from "@/api/logs"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | selectionList: [], |
| | | query: {}, |
| | | //æ¯å¦æ¯ä¸å管çåæ¥å¿ |
| | | isAdmin: '', |
| | | // LoginOrLogout:ç»å½æ¥å¿,grant:æææ¥å¿,operate:æä½æ¥å¿ |
| | | logType: '', |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | option: { |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | columnBtn:false, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | delBtn: false, |
| | | menuWidth: 120, |
| | | dialogType: 'drawer', |
| | | column: [ |
| | | { |
| | | label: "ç¨æ·å", |
| | | prop: "userName", |
| | | search: true, |
| | | width:'100' |
| | | }, |
| | | { |
| | | label: "å§å", |
| | | prop: "realName", |
| | | search: true, |
| | | width:'100' |
| | | }, |
| | | { |
| | | label: "ç¨æ·ip", |
| | | prop: "ip", |
| | | width:'100' |
| | | }, |
| | | { |
| | | label: "模å", |
| | | prop: "model", |
| | | width:'140' |
| | | }, |
| | | { |
| | | label: "æ¶é´", |
| | | prop: "time", |
| | | width:'160' |
| | | }, |
| | | { |
| | | label: "æä½ç»æ", |
| | | prop: "operateResult", |
| | | width:'100' |
| | | }, |
| | | { |
| | | label: "æè¿°", |
| | | prop: "description", |
| | | width:'300' |
| | | }, |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | viewBtn: this.vaildData(this.permission.log_usual.log_usual_view, false) |
| | | }; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getRouteParam() |
| | | }, |
| | | methods: { |
| | | //è·åæ°æ® |
| | | getRouteParam() { |
| | | const logType = this.$route.query.log_type; // è·ålog_typeåæ°çå¼ |
| | | const result = logType.substring(0, logType.indexOf(':')); // æªåä»0å°@ä¹é´çåå符串 |
| | | const isAdmin = logType.substring(logType.indexOf(':')+1, logType.indexOf('@')); // ä»@ä¹åæªåå°æ«å°¾çåå符串 |
| | | this.logType = result; |
| | | this.isAdmin = isAdmin; |
| | | //console.log(this.logType) |
| | | //console.log(this.isAdmin) |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | underscoreName(key) { |
| | | return key.replace(/([A-Z])/g, "_$1").toLowerCase(); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getUsualLogs(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | currentChange(currentPage){ |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize){ |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | let conditionMaps = {}; |
| | | conditionMaps["conditionMap[is_admin]"] = this.isAdmin; |
| | | conditionMaps["conditionMap[log_type]"] = this.logType.trim(); |
| | | if (params) { |
| | | Object.keys(params).forEach((key) => { |
| | | conditionMaps["conditionMap[" + this.underscoreName(key) + "_like]"] = params[key].trim(); |
| | | }); |
| | | } |
| | | this.loading = true; |
| | | listLogOperate( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | conditionMaps |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | import com.vci.ubcs.common.cache.CacheNames; |
| | | import org.springblade.core.jwt.JwtUtil; |
| | | import org.springblade.core.jwt.props.JwtProperties; |
| | | import org.springblade.core.launch.constant.TokenConstant; |
| | | import org.springblade.core.log.annotation.LoginOrLogoutLog; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | |
| | | // è·åç§æ·ID |
| | | String headerTenant = request.getHeader(TokenUtil.TENANT_HEADER_KEY); |
| | | String paramTenant = request.getParameter(TokenUtil.TENANT_PARAM_KEY); |
| | | String refreshToken = request.getParameter(TokenConstant.REFRESH_TOKEN); |
| | | String password = request.getParameter(TokenUtil.PASSWORD_KEY); |
| | | String grantType = request.getParameter(TokenUtil.GRANT_TYPE_KEY); |
| | | // å¤æç§æ·è¯·æ±å¤´ |
| | |
| | | |
| | | //è¶
级管çåé
ç½®æä»¶é
置账å·å¯ç ï¼å®ç°ç»å½, é»è®¤ç§æ·idåè¶
管为é
ç½®åºæ¥ç |
| | | if(tenantId.equals(this.tenantId) && userName.equals(username)){ |
| | | if (!this.userName.equals(username) || !BladePasswordEncoderFactories.createDelegatingPasswordEncoder().encode(password).equalsIgnoreCase(AuthConstant.ENCRYPT+this.password)) { |
| | | if (Func.isBlank(refreshToken)/*å·æ°tokenä¸ç¨æ ¡éªå¯ç */ |
| | | && (!this.userName.equals(username) || !BladePasswordEncoderFactories.createDelegatingPasswordEncoder().encode(password).equalsIgnoreCase(AuthConstant.ENCRYPT+this.password)) |
| | | ) { |
| | | setFailCount(tenantId, username, count,strategy.getLockingTime()); |
| | | throw new UsernameNotFoundException(TokenUtil.USER_NOT_FOUND+"è¿æã"+(failCount-count)+"ãæ¬¡å°è¯æºä¼!"); |
| | | } |