Merge remote-tracking branch 'origin/master'
| | |
| | | } |
| | | }) |
| | | } |
| | | //åç¹ç»å½æ¥å£ |
| | | export const oaSsos =(userName) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/passwordFree/oaSsos', |
| | | method: 'post', |
| | | params:{ |
| | | userName |
| | | }, |
| | | headers: { |
| | | 'empCode': 'ZVKcWmOH1JvFYaM7BuNVm1BWbaw6OcMi04aAT2H+X3Y=' |
| | | }, |
| | | }) |
| | | } |
| | | |
| | |
| | | </el-button-group> |
| | | <el-button-group> |
| | | <!-- ä¿å--> |
| | | <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-check" plain size="small" |
| | | <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-check" plain |
| | | size="small" |
| | | type="success" @click.prevent="addsHandler">ä¿å |
| | | </el-button> |
| | | <!-- é¢è§æåº--> |
| | |
| | | </el-button-group> |
| | | <!-- æ¯å¦å¼å¯ç¼è¾ --> |
| | | <el-button-group> |
| | | <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag && attrEditVisible == false && attrFlagChiledren==false" icon="el-icon-view" plain |
| | | size="small" |
| | | @click="editOpen">å¼å¯ç¼è¾ |
| | | <el-button |
| | | v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag && attrEditVisible == false && attrFlagChiledren==false" |
| | | icon="el-icon-view" plain |
| | | size="small" |
| | | @click="editOpen">å¼å¯ç¼è¾ |
| | | </el-button> |
| | | <el-select v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="selectvalue" placeholder="è¯·éæ©" |
| | | <el-select v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="selectvalue" |
| | | placeholder="è¯·éæ©" |
| | | size="small"> |
| | | <el-option |
| | | v-for="item in selectoptions" |
| | |
| | | align="center" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )" |
| | | :ref="'input' + row.oid" |
| | | v-show="!AddCellFlag" |
| | | v-model="row[item.prop]" |
| | | @blur="saveRows(row)" |
| | | ></el-input> |
| | | <el-input-number v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]" |
| | | <el-input |
| | | v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )" |
| | | v-show="!AddCellFlag" |
| | | :ref="'input' + row.oid" |
| | | v-model="row[item.prop]" |
| | | @blur="saveRows(row)" |
| | | ></el-input> |
| | | <el-input-number v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" |
| | | v-model="row[item.prop]" |
| | | :style="{width:(item.width-10)+'px'}" |
| | | controls-position="right" |
| | | size="small" @blur="saveRows"></el-input-number> |
| | | <el-select v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " slot="prepend" v-model="row[item.prop]" allow-create default-first-option |
| | | <el-select v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " slot="prepend" |
| | | v-model="row[item.prop]" allow-create default-first-option |
| | | filterable |
| | | @blur="selectChangeHandler(item.editConfig,index)"> |
| | | <el-option |
| | |
| | | } |
| | | } |
| | | }, |
| | | // editingRows:{ |
| | | // handler(newval,oldval){ |
| | | // if(newval){ |
| | | // const inputElement = document.querySelector(`#inputRef${newval.oid}`); |
| | | // if (inputElement) { |
| | | // inputElement.focus(); |
| | | // }; |
| | | // } |
| | | // } |
| | | // }, |
| | | ProData: { |
| | | handler(newval, oldval) { |
| | | if (newval) { |
| | |
| | | data() { |
| | | return { |
| | | // ä¿ååå
æ ¼ç¶æ |
| | | AddCellFlag:false, |
| | | AddCellFlag: false, |
| | | //å
¨å±ç¼è¾é«åº¦ç¶æ |
| | | editStyleFlag: false, |
| | | loading: false, |
| | |
| | | { |
| | | label: "屿§è±æåç§°", |
| | | prop: "id", |
| | | width:100, |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "屿§ä¸æåç§°", |
| | | prop: "name", |
| | | width:100, |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "é¿åº¦", |
| | |
| | | this.editOpenFlag = false; |
| | | // è°ç¨ç¶ç»ä»¶ä¿®æ¹æé®ç¶æ |
| | | this.$emit('editCloseChildren') |
| | | this.AddCellFlag=true; |
| | | this.AddCellFlag = true; |
| | | }).catch(() => { |
| | | this.$message.warning('ä¿å失败ï¼è¯·æ¥çæ§å¶å°è¾åºï¼') |
| | | }); |
| | |
| | | }, |
| | | //å类注å
¥ä¿å |
| | | injectAddHandle() { |
| | | const { classifyInvokeAttr, classifyInvokeAttrName, classifyInvokeLevel, classifyInvokeEditFlag, classifyNumber } = this.injectOption; |
| | | const { |
| | | classifyInvokeAttr, |
| | | classifyInvokeAttrName, |
| | | classifyInvokeLevel, |
| | | classifyInvokeEditFlag, |
| | | classifyNumber |
| | | } = this.injectOption; |
| | | |
| | | const data = { |
| | | "注å
¥ç±»å": classifyInvokeAttr, |
| | |
| | | this.editStyleFlag = true; |
| | | this.attrEditVisible = true; |
| | | this.attrFlag = true; |
| | | this.AddCellFlag=true; |
| | | this.AddCellFlag = true; |
| | | } |
| | | |
| | | }, |
| | |
| | | updataFormlaContent(val) { |
| | | if (this.CurrentCell) { |
| | | this.$set(this.CurrentCell, 'componentRule', val.replace(/"/g, '')) |
| | | this.componentRuleText= this.CurrentCell.componentRule |
| | | this.componentRuleText = this.CurrentCell.componentRule |
| | | } else { |
| | | this.$set(this.attrRow, 'componentRule', val.replace(/"/g, '')) |
| | | } |
| | |
| | | //å¼å¯ç¼è¾ |
| | | editOpen() { |
| | | this.editOpenFlag = true; |
| | | this.AddCellFlag=false; |
| | | this.AddCellFlag = false; |
| | | }, |
| | | //å®ä¹ä¸ä¸ªå
³éç¼è¾çæ¹æ³ä¾åç»ä»¶ä½¿ç¨ |
| | | editClose() { |
| | |
| | | text.push(itemText); |
| | | } |
| | | }) |
| | | |
| | | let mapFields =Object.assign(this.referConfig.fieldMap,JSON.parse(this.options.mapFields)) ; |
| | | let mapFields; |
| | | if (this.options.mapFields == "") { |
| | | mapFields = this.referConfig.fieldMap; |
| | | } else { |
| | | mapFields = Object.assign(this.referConfig.fieldMap, JSON.parse(this.options.mapFields)); |
| | | } |
| | | this.value=value.join(','); |
| | | this.text=text.join(',') |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:mapFields}); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <p>æµè¯</p> |
| | | </template> |
| | | |
| | | <script> |
| | | import {oaSsos} from "@/api/system/user.js" |
| | | import {mapGetters} from "vuex"; |
| | | import {setStore} from "@/util/store"; |
| | | |
| | | export default { |
| | | name: "sso", |
| | | data() { |
| | | return { |
| | | loginForm:{ |
| | | //ç§æ·ID |
| | | tenantId: "", |
| | | //é¨é¨ID |
| | | deptId: "", |
| | | //è§è²ID |
| | | roleId: "", |
| | | //ç¨æ·å |
| | | username: "", |
| | | //å¯ç |
| | | password: "", |
| | | selectInput: '', |
| | | //䏿inputæ°æ® |
| | | value: '管çç»', |
| | | //䏿èå |
| | | region: [], |
| | | //è´¦å·ç±»å |
| | | type: "account", |
| | | //éªè¯ç çç´¢å¼ |
| | | key: "", |
| | | //é¢å è½½ç½è²èæ¯ |
| | | image: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", |
| | | |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["tagWel", "userInfo"]) |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | // Onload() { |
| | | // let name = 'pwdfree' |
| | | // oaSsos(name).then(res=>{ |
| | | // console.log(res) |
| | | // if(res.status === 200){ |
| | | // // this.loginForm.tenantId=res.data.tenant_id; |
| | | // // this.loginForm.username=res.data.user_name; |
| | | // this.$store.dispatch("LoginBySso").then((res) => { |
| | | // console.log('res',res) |
| | | // this.$router.push({path: this.tagWel.value}); |
| | | // }) |
| | | // // console.log(this.tagWel) |
| | | // // this.$router.push({path: this.tagWel.value}); |
| | | // } |
| | | // }) |
| | | // } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | </el-form-item> |
| | | <!--å¯ç ä¿®æ¹å¼¹åºæ¡--> |
| | | </el-form> |
| | | <el-dialog title="ä¿®æ¹å¯ç " :visible.sync="dialogFormVisible" append-to-body @closed="closehandle" :close-on-press-escape="false" > |
| | | <el-form :model="form" :rules="rules"> |
| | | <el-form-item label="åå¯ç " :label-width="formLabelWidth" prop="oldPassword"> |
| | | <el-dialog :close-on-press-escape="false" :visible.sync="dialogFormVisible" append-to-body title="ä¿®æ¹å¯ç " |
| | | @closed="closehandle"> |
| | | <el-form :model="form" :rules="rules"> |
| | | <el-form-item :label-width="formLabelWidth" label="åå¯ç " prop="oldPassword"> |
| | | <el-input v-model="form.oldPassword" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ°å¯ç " :label-width="formLabelWidth" prop="newPassword"> |
| | | <el-form-item :label-width="formLabelWidth" label="æ°å¯ç " prop="newPassword"> |
| | | <el-input v-model="form.newPassword" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="确认å¯ç " :label-width="formLabelWidth" prop="newPassword1"> |
| | | <el-form-item :label-width="formLabelWidth" label="确认å¯ç " prop="newPassword1"> |
| | | <el-input v-model="form.newPassword1" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | import {mapGetters} from "vuex"; |
| | | import {info} from "@/api/system/tenant"; |
| | | import {getTopUrl} from "@/util/util"; |
| | | import {updatePassword} from "@/api/system/user.js" |
| | | import {oaSsos, updatePassword} from "@/api/system/user.js" |
| | | import {removeToken} from "@/util/auth"; |
| | | import md5 from "js-md5"; |
| | | |
| | | export default { |
| | | name: "userlogin", |
| | | data() { |
| | | return { |
| | | tenantMode: this.website.tenantMode, |
| | | ButtonList: [], |
| | | dialogFormVisible:false, |
| | | dialogFormVisible: false, |
| | | form: { |
| | | oldPassword: '', |
| | | newPassword: '', |
| | | newPassword1: '', |
| | | }, |
| | | loginRules:{ |
| | | username:[ |
| | | { required: true, message: '请è¾å
¥è´¦å·', trigger: 'blur' } |
| | | loginRules: { |
| | | username: [ |
| | | {required: true, message: '请è¾å
¥è´¦å·', trigger: 'blur'} |
| | | ], |
| | | password: [ |
| | | { required: true, message: '请è¾å
¥å¯ç ', trigger: 'blur' } |
| | | {required: true, message: '请è¾å
¥å¯ç ', trigger: 'blur'} |
| | | ], |
| | | }, |
| | | rules: { |
| | | oldPassword: [ |
| | | { required: true, message: '请è¾å
¥åå¯ç ', trigger: 'blur' } |
| | | {required: true, message: '请è¾å
¥åå¯ç ', trigger: 'blur'} |
| | | ], |
| | | newPassword:[ |
| | | { required: true, message: '请è¾å
¥æ°å¯ç ', trigger: 'blur' } |
| | | newPassword: [ |
| | | {required: true, message: '请è¾å
¥æ°å¯ç ', trigger: 'blur'} |
| | | ], |
| | | newPassword1:[ |
| | | { required: true, message: '请è¾ç¡®è®¤å¯ç ', trigger: 'blur' } |
| | | newPassword1: [ |
| | | {required: true, message: '请è¾ç¡®è®¤å¯ç ', trigger: 'blur'} |
| | | ] |
| | | }, |
| | | loginForm: { |
| | |
| | | created() { |
| | | this.getTenant(); |
| | | //è¿éæ¯æµè§å¨çä¸ä¸ªbugï¼çªç¶åºç°çç®åæ¾ä¸å°åå ï¼æ°çæµè§å¨æå¼æ¤é¡¹ç®ãlocalStorageä¼å°åå¨ä¸ä¸ªå为saber-permissionçæ°æ®ï¼å°äºè¿æ¡æ°æ®ç§æ·ç®¡ççé¢ä¼ç¼ºå°å 个æé®åæ ·å¼ |
| | | //è¿æä¸ç§æ
åµï¼å½æä»¬æå¨å é¤è¿æ¡æ°æ®æè
æ¸
空localStorageåï¼åå·æ°è¿å
¥é¡µé¢å®ä¹ä¸åå¨è¿ä¸ªåéï¼æä»¥æå°±å¨è¿åæ»äºåå¨ï¼ç®åæææ²¡æé®é¢ |
| | | localStorage.setItem("saber-permission",JSON.stringify({"dataType":"object","content":{"flow_model_create":true,"flow_model_update":true,"flow_model_deploy":true,"flow_model_download":true,"flow_model_delete":true,"work_start_flow":true,"work_start_image":true,"oss_add":true,"oss_edit":true,"oss_delete":true,"oss_view":true,"oss_enable":true,"role_add":true,"role_edit":true,"role_delete":true,"role_view":true,"notice_add":true,"notice_edit":true,"notice_delete":true,"notice_view":true,"user_add":true,"user_edit":true,"user_delete":true,"user_role":true,"user_reset":true,"user_view":true,"log_usual_view":true,"code_add":true,"code_edit":true,"code_delete":true,"code_view":true,"region_add":true,"region_delete":true,"region_import":true,"region_export":true,"region_debug":true,"work_claim_sign":true,"work_claim_detail":true,"work_claim_follow":true,"work_todo_handle":true,"work_todo_detail":true,"work_todo_follow":true,"data_scope_setting":true,"datasource_add":true,"datasource_edit":true,"datasource_delete":true,"datasource_view":true,"attach_upload":true,"attach_download":true,"attach_delete":true,"dept_add":true,"dept_edit":true,"dept_delete":true,"dept_view":true,"log_api_view":true,"flow_manager_state":true,"flow_manager_image":true,"flow_manager_remove":true,"work_send_detail":true,"work_send_follow":true,"sms_add":true,"sms_edit":true,"sms_delete":true,"sms_view":true,"sms_enable":true,"api_scope_setting":true,"log_error_view":true,"post_add":true,"post_edit":true,"post_delete":true,"post_view":true,"flow_follow_delete":true,"work_done_detail":true,"work_done_follow":true,"dict_add":true,"dict_edit":true,"dict_delete":true,"dict_view":true,"dictbiz_add":true,"dictbiz_edit":true,"dictbiz_delete":true,"dictbiz_view":true,"menu_add":true,"menu_edit":true,"menu_delete":true,"menu_view":true,"topmenu_add":true,"topmenu_edit":true,"topmenu_delete":true,"topmenu_view":true,"topmenu_setting":true,"param_add":true,"param_edit":true,"param_delete":true,"param_view":true,"tenant_add":true,"tenant_edit":true,"tenant_delete":true,"tenant_view":true,"client_add":true,"client_edit":true,"client_delete":true,"client_view":true},"datetime":1678352291697})) |
| | | localStorage.setItem("saber-permission", JSON.stringify({ |
| | | "dataType": "object", "content": { |
| | | "flow_model_create": true, |
| | | "flow_model_update": true, |
| | | "flow_model_deploy": true, |
| | | "flow_model_download": true, |
| | | "flow_model_delete": true, |
| | | "work_start_flow": true, |
| | | "work_start_image": true, |
| | | "oss_add": true, |
| | | "oss_edit": true, |
| | | "oss_delete": true, |
| | | "oss_view": true, |
| | | "oss_enable": true, |
| | | "role_add": true, |
| | | "role_edit": true, |
| | | "role_delete": true, |
| | | "role_view": true, |
| | | "notice_add": true, |
| | | "notice_edit": true, |
| | | "notice_delete": true, |
| | | "notice_view": true, |
| | | "user_add": true, |
| | | "user_edit": true, |
| | | "user_delete": true, |
| | | "user_role": true, |
| | | "user_reset": true, |
| | | "user_view": true, |
| | | "log_usual_view": true, |
| | | "code_add": true, |
| | | "code_edit": true, |
| | | "code_delete": true, |
| | | "code_view": true, |
| | | "region_add": true, |
| | | "region_delete": true, |
| | | "region_import": true, |
| | | "region_export": true, |
| | | "region_debug": true, |
| | | "work_claim_sign": true, |
| | | "work_claim_detail": true, |
| | | "work_claim_follow": true, |
| | | "work_todo_handle": true, |
| | | "work_todo_detail": true, |
| | | "work_todo_follow": true, |
| | | "data_scope_setting": true, |
| | | "datasource_add": true, |
| | | "datasource_edit": true, |
| | | "datasource_delete": true, |
| | | "datasource_view": true, |
| | | "attach_upload": true, |
| | | "attach_download": true, |
| | | "attach_delete": true, |
| | | "dept_add": true, |
| | | "dept_edit": true, |
| | | "dept_delete": true, |
| | | "dept_view": true, |
| | | "log_api_view": true, |
| | | "flow_manager_state": true, |
| | | "flow_manager_image": true, |
| | | "flow_manager_remove": true, |
| | | "work_send_detail": true, |
| | | "work_send_follow": true, |
| | | "sms_add": true, |
| | | "sms_edit": true, |
| | | "sms_delete": true, |
| | | "sms_view": true, |
| | | "sms_enable": true, |
| | | "api_scope_setting": true, |
| | | "log_error_view": true, |
| | | "post_add": true, |
| | | "post_edit": true, |
| | | "post_delete": true, |
| | | "post_view": true, |
| | | "flow_follow_delete": true, |
| | | "work_done_detail": true, |
| | | "work_done_follow": true, |
| | | "dict_add": true, |
| | | "dict_edit": true, |
| | | "dict_delete": true, |
| | | "dict_view": true, |
| | | "dictbiz_add": true, |
| | | "dictbiz_edit": true, |
| | | "dictbiz_delete": true, |
| | | "dictbiz_view": true, |
| | | "menu_add": true, |
| | | "menu_edit": true, |
| | | "menu_delete": true, |
| | | "menu_view": true, |
| | | "topmenu_add": true, |
| | | "topmenu_edit": true, |
| | | "topmenu_delete": true, |
| | | "topmenu_view": true, |
| | | "topmenu_setting": true, |
| | | "param_add": true, |
| | | "param_edit": true, |
| | | "param_delete": true, |
| | | "param_view": true, |
| | | "tenant_add": true, |
| | | "tenant_edit": true, |
| | | "tenant_delete": true, |
| | | "tenant_view": true, |
| | | "client_add": true, |
| | | "client_edit": true, |
| | | "client_delete": true, |
| | | "client_view": true |
| | | }, "datetime": 1678352291697 |
| | | })) |
| | | }, |
| | | mounted() { |
| | | //å¨mountedè·åé¦é¡µä¸æèåæ°æ® |
| | | this.$axios.get('/api/ubcs-system/tenant/tenant-map').then(res => { |
| | | if (res.data.code == 200) { |
| | | this.loginForm.tenantId = res.data.data[0].TENANT_ID; |
| | |
| | | }, |
| | | props: [], |
| | | methods: { |
| | | ChandleLogin(){ |
| | | |
| | | ChandleLogin() { |
| | | this.$store.dispatch("LoginBySso").then((res) => { |
| | | console.log('res', res) |
| | | this.$router.push({path: this.tagWel.value}); |
| | | }) |
| | | }, |
| | | closehandle(){ |
| | | closehandle() { |
| | | removeToken() |
| | | }, |
| | | delok(){ |
| | | delok() { |
| | | //ç¹å»åæ¶æè
x æ¸
é¤tokenå
³éå¼¹çª æ¸
é¤tokenåä¼èªå¨éæ°è·åç¨æ·ä¿¡æ¯ è¿é没æéæ°è°ç¨æ¹æ³ï¼å 为ä¸é¢é»è¾æç¹ç»ï¼æéæ°ææbugç´æ¥æ¸
é¤tokenéæ°è·åç¨æ·ä¿¡æ¯ |
| | | this.dialogFormVisible = false; |
| | | removeToken() |
| | | }, |
| | | // ç¹å»ç¡®å®ä¿®æ¹å¯ç |
| | | addHandler(){ |
| | | addHandler() { |
| | | this.dialogFormVisible = false |
| | | updatePassword(md5(this.form.oldPassword), this.form.newPassword, this.form.newPassword1).then(res=>{ |
| | | updatePassword(md5(this.form.oldPassword), this.form.newPassword, this.form.newPassword1).then(res => { |
| | | console.log(res) |
| | | if(res.data.code==200){ |
| | | if (res.data.code == 200) { |
| | | this.$message({ |
| | | type:"success", |
| | | message:"ä¿®æ¹æåï¼" |
| | | type: "success", |
| | | message: "ä¿®æ¹æåï¼" |
| | | }) |
| | | this.$router.push({path: this.tagWel.value}) |
| | | } |
| | |
| | | |
| | | }, |
| | | handleLogin: function () { |
| | | debugger |
| | | this.userInfo = this.$store.state.upadatastatus |
| | | localStorage.setItem('username',this.loginForm.username) |
| | | localStorage.setItem('username', this.loginForm.username) |
| | | this.$refs.loginForm.validate(valid => { |
| | | if (valid) { |
| | | const loading = this.$loading({ |
| | |
| | | this.$store.dispatch("LoginByUsername", this.loginForm).then(() => { |
| | | //ä¸é¢åå äºä¸å±å¤æçæææ¯å¦ææ¯è¶
管ä¸è¿è¡å¤æ ææ¶å ä¸è¿ä¸ªå¤æçè¯ï¼ç»å½ä¼æbugï¼ç¹å»ç»å½å·æ°åæè¿å
¥ï¼å
ç®åå¨ä¸é¢å¤ææ¯å¦ä¸ºç©ºï¼åªæè¶
管çstrategyUpdateStatus为空 |
| | | // if(this.userInfo.user_id != '0' && this.userInfo.tenant_id !== '000000'){ |
| | | //夿妿ä¸çäº0å°±æ¯çç¥å¯ç 没æä¿®æ¹èµ°ä¸é¢é»è¾ |
| | | if (this.userInfo.strategyUpdateStatus == 0 || this.userInfo.strategyUpdateStatus==null) { |
| | | if (this.website.switchMode) { |
| | | const deptId = this.userInfo.dept_id; |
| | | const roleId = this.userInfo.role_id; |
| | | if (deptId.includes(",") || roleId.includes(",")) { |
| | | this.loginForm.deptId = deptId; |
| | | this.loginForm.roleId = roleId; |
| | | this.userBox = true; |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | loading.close(); |
| | | }); |
| | | } |
| | | //夿妿ä¸çäº0å°±æ¯çç¥å¯ç 没æä¿®æ¹èµ°ä¸é¢é»è¾ |
| | | if (this.userInfo.strategyUpdateStatus == 0 || this.userInfo.strategyUpdateStatus == null) { |
| | | if (this.website.switchMode) { |
| | | const deptId = this.userInfo.dept_id; |
| | | const roleId = this.userInfo.role_id; |
| | | if (deptId.includes(",") || roleId.includes(",")) { |
| | | this.loginForm.deptId = deptId; |
| | | this.loginForm.roleId = roleId; |
| | | this.userBox = true; |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | loading.close(); |
| | | }); |
| | | } |
| | | this.$router.push({path: this.tagWel.value}); |
| | | } else { |
| | | //çäº0说æå¯ç çç¥è¢«ä¿®æ¹ï¼æç¤ºç¨æ·ä¿®æ¹å¯ç ï¼ç»ä¸ä¸ªä¿®æ¹å¼¹æ¡ |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "å¯ç çç¥å·²è¢«ä¿®æ¹ï¼è¯·éæ°ä¿®æ¹å¯ç ï¼" |
| | | }) |
| | | setTimeout(()=>{ |
| | | this.dialogFormVisible=true |
| | | },1500) |
| | | } |
| | | this.$router.push({path: this.tagWel.value}); |
| | | } else { |
| | | //çäº0说æå¯ç çç¥è¢«ä¿®æ¹ï¼æç¤ºç¨æ·ä¿®æ¹å¯ç ï¼ç»ä¸ä¸ªä¿®æ¹å¼¹æ¡ |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "å¯ç çç¥å·²è¢«ä¿®æ¹ï¼è¯·éæ°ä¿®æ¹å¯ç ï¼" |
| | | }) |
| | | setTimeout(() => { |
| | | this.dialogFormVisible = true |
| | | }, 1500) |
| | | } |
| | | |
| | | // } |
| | | //æå¤æå¯ç çç¥ä¿®æ¹çå¼åè¿æ¬å°ï¼ç¶ååè·¯ç±æéjsæä»¶éé¢è·ååå夿ï¼ä¸ç¶å·æ°ä¼è¿å
¥é¦é¡µï¼å ä¸ºå¨æidåtokençæ
åµä¸ï¼å·æ°é¡µé¢æè
è¿å
¥ç»å½é¡µä¼èªå¨è¿å
¥é¦é¡µï¼ |
| | | //index页é¢ä¹å¯ä»¥ç¨å°è¿ä¸ªå¼æ¥å¤ææ¯å¦æ¯è¶
管身份ç»å½æ¥å¤ææ¯å¦æéè¿ææ¶é´ç |
| | | localStorage.setItem("updataid",JSON.stringify(this.userInfo)) |
| | | localStorage.setItem("userId",this.userInfo.user_id) |
| | | localStorage.setItem("updataid", JSON.stringify(this.userInfo)) |
| | | localStorage.setItem("userId", this.userInfo.user_id) |
| | | loading.close(); |
| | | }).catch(() => { |
| | | loading.close(); |
| | |
| | | } |
| | | }, |
| | | { |
| | | path: '/sso', |
| | | name: 'åç¹æµè¯é¡µ', |
| | | component: () => |
| | | import( /* webpackChunkName: "page" */ '@/page/login/sso'), |
| | | meta: { |
| | | keepAlive: true, |
| | | isTab: false, |
| | | isAuth: false |
| | | } |
| | | }, |
| | | { |
| | | path: '/lock', |
| | | name: 'éå±é¡µ', |
| | | component: () => |
| | |
| | | import {deepClone} from '@/util/util' |
| | | import website from '@/config/website' |
| | | import {loginByUsername, loginBySocial, loginBySso, getUserInfo, logout, refreshToken, getButtons} from '@/api/user' |
| | | import {oaSsos} from "@/api/system/user.js" |
| | | import {getTopMenu, getRoutes} from '@/api/system/menu' |
| | | import md5 from 'js-md5' |
| | | |
| | |
| | | }) |
| | | }, |
| | | //æ ¹æ®åç¹ä¿¡æ¯ç»å½ |
| | | LoginBySso({commit}, userInfo) { |
| | | LoginBySso({commit}) { |
| | | return new Promise((resolve) => { |
| | | loginBySso(userInfo.state,).then(res => { |
| | | oaSsos().then(res => { |
| | | const data = res.data; |
| | | if (data.error_description) { |
| | | Message({ |
| | |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public <T, R> List<Tree> doListSystemClassTrees(List<T> doList, TreeWrapperOptions wrapperOptions, Function<T, R> f) { |
| | | if (CollectionUtils.isEmpty(doList)) { |
| | | return new ArrayList(); |
| | | } else { |
| | | List<Tree> allTree = new ArrayList(); |
| | | List<Tree> children = new ArrayList(); |
| | | Iterator var6 = doList.iterator(); |
| | | |
| | | while(true) { |
| | | while(var6.hasNext()) { |
| | | T doObject = (T) var6.next(); |
| | | Tree tree = new Tree(); |
| | | List<String> oidFieldNames = VciBaseUtil.str2List(wrapperOptions.getOidFieldName()); |
| | | List<String> oidValues = new LinkedList(); |
| | | oidFieldNames.stream().forEach((s) -> { |
| | | oidValues.add(VciBaseUtil.getStringValueFromObject(VciBaseUtil.getValueFromField("oid", doObject))); |
| | | }); |
| | | tree.setOid((String)oidValues.stream().collect(Collectors.joining(wrapperOptions.getOidValueSep()))); |
| | | tree.setName((String) VciBaseUtil.getValueFromField("name", doObject)); |
| | | if (f != null) { |
| | | tree.setText((String)f.apply(doObject)); |
| | | } else { |
| | | List<String> textFieldNames = VciBaseUtil.str2List(wrapperOptions.getTextFieldName()); |
| | | List<String> textValues = new LinkedList(); |
| | | textFieldNames.stream().forEach((s) -> { |
| | | textValues.add(VciBaseUtil.getStringValueFromObject(VciBaseUtil.getValueFromField(s, doObject))); |
| | | }); |
| | | tree.setText((String)textValues.stream().collect(Collectors.joining(wrapperOptions.getTextValueSep()))); |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(wrapperOptions.getParentFieldName())) { |
| | | String stringValueFromObject = VciBaseUtil.getStringValueFromObject(VciBaseUtil.getValueFromField(wrapperOptions.getParentFieldName(), doObject)); |
| | | tree.setParentId(stringValueFromObject); |
| | | } |
| | | |
| | | if (wrapperOptions.isAllAttributes()) { |
| | | try { |
| | | tree.setAttributes(VciBaseUtil.objectToMapString(doObject)); |
| | | } catch (Exception var13) { |
| | | if (this.logger.isErrorEnabled()) { |
| | | this.logger.error("æå¯¹è±¡è½¬æ¢ä¸ºmapæ¶åºç°äºé误ï¼ä½æ¯ä¸å½±åæ çå±ç¤ºï¼å¯¹ä¸å¡å¯è½æå½±å"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (wrapperOptions.isMultipleSelect() || wrapperOptions.isShowCheckBox()) { |
| | | tree.setShowCheckbox(true); |
| | | } |
| | | |
| | | if (wrapperOptions.getParentOid() == null) { |
| | | wrapperOptions.setParentOid(""); |
| | | } |
| | | |
| | | if (!StringUtils.isBlank(tree.getParentId()) && (!StringUtils.isNotBlank(wrapperOptions.getParentOid()) || !wrapperOptions.getParentOid().equalsIgnoreCase(tree.getParentId()))) { |
| | | children.add(tree); |
| | | } else { |
| | | allTree.add(tree); |
| | | } |
| | | } |
| | | |
| | | (new Tree()).findSystemClassChild(allTree, children); |
| | | if (allTree.size() <= 0) { |
| | | allTree.addAll(children); |
| | | } |
| | | |
| | | return allTree; |
| | | } |
| | | } |
| | | } |
| | | // |
| | | // public void findSystemClassChild(List<Tree> treenode, List<Tree> children) { |
| | | // Tree node; |
| | | // for(Iterator var3 = treenode.iterator(); var3.hasNext(); { |
| | | // if (var3 == null) { |
| | | // var3.next(); |
| | | // } else { |
| | | // ((Tree) var3.next()).getChildren().add(node); |
| | | // } |
| | | // }) { |
| | | // node = (Tree)var3.next(); |
| | | // Iterator var5 = children.iterator(); |
| | | // |
| | | // while(var5.hasNext()) { |
| | | // Tree childnode = (Tree)var5.next(); |
| | | // if (node.getAttributes().get("classifyOid").equalsIgnoreCase(childnode.getParentId())) { |
| | | // childnode.setParentName(node.getText()); |
| | | // if (StringUtil.isBlank(childnode.getParentBtmName())) { |
| | | // childnode.setParentBtmName((String)node.getAttributes().getOrDefault("btmname", "")); |
| | | // } |
| | | // |
| | | // node.getChildren().add(childnode); |
| | | // } |
| | | // } |
| | | // |
| | | // if (node.getChildren().size() > 0) { |
| | | // this.findSystemClassChild(node.getChildren(), children); |
| | | // node.setLeaf(false); |
| | | // } else { |
| | | // node.setLeaf(true); |
| | | // } |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | public void findSystemClassChild(List<Tree> treenode, List<Tree> children) { |
| | | Tree node; |
| | | for(Iterator var3 = treenode.iterator(); var3.hasNext(); this.getChildren().add(node)) { |
| | | node = (Tree)var3.next(); |
| | | Iterator var5 = children.iterator(); |
| | | |
| | | while(var5.hasNext()) { |
| | | Tree childnode = (Tree)var5.next(); |
| | | if (node.getAttributes().get("classifyOid").equalsIgnoreCase(childnode.getParentId())) { |
| | | childnode.setParentName(node.getText()); |
| | | if (StringUtil.isBlank(childnode.getParentBtmName())) { |
| | | childnode.setParentBtmName((String)node.getAttributes().getOrDefault("btmname", "")); |
| | | } |
| | | |
| | | node.getChildren().add(childnode); |
| | | } |
| | | } |
| | | |
| | | if (node.getChildren().size() > 0) { |
| | | this.findSystemClassChild(node.getChildren(), children); |
| | | node.setLeaf(false); |
| | | } else { |
| | | node.setLeaf(true); |
| | | } |
| | | } |
| | | |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "Tree{oid='" + this.oid + '\'' + ", text='" + this.text + '\'' + ", leaf=" + this.leaf + ", showCheckbox=" + this.showCheckbox + ", checked=" + this.checked + ", children=" + this.children + ", icon='" + this.icon + '\'' + ", iconCls='" + this.iconCls + '\'' + ", parentId='" + this.parentId + '\'' + ", parentName='" + this.parentName + '\'' + ", parentBtmName='" + this.parentBtmName + '\'' + ", expanded=" + this.expanded + ", href='" + this.href + '\'' + ", index='" + this.index + '\'' + ", attributes=" + this.attributes + '}'; |
| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | |
| | | import com.vci.ubcs.code.dto.CodeClassifyTemplateAttrDTO; |
| | | import com.vci.ubcs.code.entity.SystemClassifyRole; |
| | | import com.vci.ubcs.code.service.ICodeApplyWebManagementService; |
| | | import com.vci.ubcs.code.service.ICodeClassifyService; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 主é¢åºå®ä¹è¡¨ æ§å¶å¨ |
| | |
| | | * åç±»æå¡å¯¹è±¡ |
| | | */ |
| | | private final ICodeClassifyService codeClassifyService; |
| | | |
| | | private final ICodeApplyWebManagementService codeApplyWebManagementService; |
| | | |
| | | /*** |
| | | * æ ¹æ®åç«¯éæ©çåç±»æéææææ |
| | |
| | | return R.success("æ¥è¯¢æå"); |
| | | } |
| | | |
| | | @PostMapping( "/batchAddSave") |
| | | public R batchAddSave(@RequestBody List<SystemClassifyRole> list,String systemOid,String systemId){ |
| | | return codeApplyWebManagementService.batchAddSave(list,systemOid,systemId); |
| | | } |
| | | |
| | | @GetMapping("/getSystemClassifyRoleTree") |
| | | public List<Tree> getSystemClassifyRoleTree(String systemOid,String systemId){ |
| | | return codeApplyWebManagementService.getSystemClassifyRoleTree(systemOid,systemId); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.vci.ubcs.code.entity.SystemClassifyRole; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface SystemClassifyRoleMapper extends BaseMapper<SystemClassifyRole> { |
| | | public List<SystemClassifyRole> getListSystemClassifyRole(String systemOid, String systemId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.code.entity.SystemClassifyRole; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface ICodeApplyWebManagementService extends IService<SystemClassifyRole> { |
| | | R batchAddSave(List<SystemClassifyRole> list,String systemOid,String systemId); |
| | | |
| | | List<Tree> getSystemClassifyRoleTree(String systemOid, String systemId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.code.entity.SystemClassifyRole; |
| | | import com.vci.ubcs.code.enumpack.FrameworkDataLCStatus; |
| | | import com.vci.ubcs.code.mapper.SystemClassifyRoleMapper; |
| | | import com.vci.ubcs.code.service.ICodeApplyWebManagementService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.starter.revision.model.TreeWrapperOptions; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import jodd.util.StringUtil; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class CodeApplyWebManagementServiceImpl extends ServiceImpl<SystemClassifyRoleMapper, SystemClassifyRole> implements ICodeApplyWebManagementService { |
| | | |
| | | /** |
| | | * ä¸çº§èç¹ç屿§åç§° |
| | | */ |
| | | public static final String PARENT_FIELD_NAME = "classParentOid"; |
| | | |
| | | /** |
| | | * 对象çæä½ |
| | | */ |
| | | @Resource |
| | | private RevisionModelUtil revisionModelUtil; |
| | | |
| | | |
| | | @Override |
| | | public R batchAddSave(List<SystemClassifyRole> roleList,String systemOid,String systemId) { |
| | | if(roleList.size() == 0){ |
| | | return R.fail("ä¼ å
¥æ°æ®ä¸ºç©ºï¼è¯·ç¡®è®¤ï¼ï¼"); |
| | | } |
| | | //å
å é¤ï¼åä¿å |
| | | QueryWrapper<SystemClassifyRole> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("systemOid",systemOid); |
| | | wrapper.eq("systemId",systemId); |
| | | this.remove(wrapper); |
| | | //æ°æ®å¤ç |
| | | roleList.stream().forEach(systemClassifyRole -> { |
| | | if(StringUtil.isBlank(systemClassifyRole.getOid())){ |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(systemClassifyRole,"systemClassifyRole"); |
| | | systemClassifyRole.setSystemId(systemId); |
| | | systemClassifyRole.setSystemOid(systemOid); |
| | | }else{ |
| | | systemClassifyRole.setCreator(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | systemClassifyRole.setCreateTime(new Date()); |
| | | systemClassifyRole.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | systemClassifyRole.setLastModifyTime(new Date()); |
| | | systemClassifyRole.setTs(new Date()); |
| | | } |
| | | systemClassifyRole.setTenantId(AuthUtil.getTenantId()); |
| | | }); |
| | | //ä¿å |
| | | this.saveBatch(roleList); |
| | | return R.success("æä½æå"); |
| | | } |
| | | |
| | | @Override |
| | | public List<Tree> getSystemClassifyRoleTree(String systemOid, String systemId) { |
| | | List<SystemClassifyRole> listSystemClassifyRole = baseMapper.getListSystemClassifyRole(systemOid, systemId); |
| | | TreeWrapperOptions treeWrapperOptions = new TreeWrapperOptions(PARENT_FIELD_NAME); |
| | | treeWrapperOptions.setOidFieldName("CLASSIFYOID"); |
| | | List<Tree> tree= revisionModelUtil.doListSystemClassTrees(listSystemClassifyRole,treeWrapperOptions,(SystemClassifyRole s) ->{ |
| | | //å¯ä»¥å¨è¿éå¤çæ èç¹çæ¾ç¤º |
| | | return s.getClassifyId() + " " + s.getName() + (FrameworkDataLCStatus.DISABLED.getValue().equalsIgnoreCase(s |
| | | .getLcStatus()) ? (" ãåç¨ã ") : ""); |
| | | }); |
| | | return tree; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.vci.ubcs.code.mapper.SystemClassifyRoleMapper"> |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="plSystemClassifyRoleMap" type="com.vci.ubcs.code.entity.SystemClassifyRole"> |
| | | <result column="OID" property="oid"/> |
| | | <result column="REVISIONOID" property="revisionOid"/> |
| | | <result column="NAMEOID" property="nameOid"/> |
| | | <result column="BTMNAME" property="btmname"/> |
| | | <result column="LASTR" property="lastR"/> |
| | | <result column="FIRSTR" property="firstR"/> |
| | | <result column="LASTV" property="lastV"/> |
| | | <result column="FIRSTV" property="firstV"/> |
| | | <result column="CREATOR" property="creator"/> |
| | | <result column="CREATETIME" property="createTime"/> |
| | | <result column="LASTMODIFIER" property="lastModifier"/> |
| | | <result column="LASTMODIFYTIME" property="lastModifyTime"/> |
| | | <result column="REVISIONRULE" property="revisionRule"/> |
| | | <result column="VERSIONRULE" property="versionRule"/> |
| | | <result column="REVISIONSEQ" property="revisionSeq"/> |
| | | <result column="REVISIONVALUE" property="revisionValue"/> |
| | | <result column="VERSIONSEQ" property="versionSeq"/> |
| | | <result column="VERSIONVALUE" property="versionValue"/> |
| | | <result column="LCTID" property="lctid"/> |
| | | <result column="LCSTATUS" property="lcStatus"/> |
| | | <result column="TS" property="ts"/> |
| | | <result column="ID" property="id"/> |
| | | <result column="NAME" property="name"/> |
| | | <result column="DESCRIPTION" property="description"/> |
| | | <result column="OWNER" property="owner"/> |
| | | <result column="COPYFROMVERSION" property="copyFromVersion"/> |
| | | <result column="TENANT_ID" property="tenantId"/> |
| | | <result column="SYSTEMOID" property="systemOid"/> |
| | | <result column="SYSTEMID" property="systemId"/> |
| | | <result column="CLASSIFYOID" property="classifyOid"/> |
| | | <result column="CLASSIFYID" property="classifyId"/> |
| | | <result column="SELECTED" property="selected"/> |
| | | <result column="CLASSPARENTOID" property="classParentOid"/> |
| | | </resultMap> |
| | | <select id="getListSystemClassifyRole" resultType="com.vci.ubcs.code.entity.SystemClassifyRole"> |
| | | select pc.OID, |
| | | pc.REVISIONOID, |
| | | pc.NAMEOID, |
| | | pc.BTMNAME, |
| | | pc.LASTR, |
| | | pc.FIRSTR, |
| | | pc.LASTV, |
| | | pc.FIRSTV, |
| | | pc.CREATOR, |
| | | pc.CREATETIME, |
| | | pc.LASTMODIFIER, |
| | | pc.LASTMODIFYTIME, |
| | | pc.REVISIONRULE, |
| | | pc.VERSIONRULE, |
| | | pc.REVISIONSEQ, |
| | | pc.REVISIONVALUE, |
| | | pc.VERSIONSEQ, |
| | | pc.VERSIONVALUE, |
| | | pc.LCTID, |
| | | pc.LCSTATUS, |
| | | pc.TS, |
| | | pc.ID, |
| | | p.NAME, |
| | | pc.DESCRIPTION, |
| | | pc.OWNER, |
| | | pc.COPYFROMVERSION, |
| | | pc.GROUPCODE, |
| | | pc.TENANT_ID, |
| | | pc.SYSTEMOID, |
| | | pc.SYSTEMID, |
| | | p.oid CLASSIFYOID, |
| | | p.id CLASSIFYID, |
| | | case when pc.selected is null then 'false' else pc.SELECTED end SELECTED, |
| | | p.PARENTCODECLASSIFYOID CLASSPARENTOID |
| | | from PL_CODE_CLASSIFY p , |
| | | PL_CODE_SYSTEM_CLASSIFY_ROLE pc |
| | | where p.oid = pc.CLASSIFYOID(+) |
| | | and '${systemOid}' = pc.SYSTEMOID(+) |
| | | and '${systemId}' = pc.SYSTEMID(+) |
| | | </select> |
| | | |
| | | </mapper> |