mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 10:36:31 +08:00
commit
This commit is contained in:
@@ -14,4 +14,4 @@ npm run build
|
||||
npm test
|
||||
```
|
||||
|
||||
### 官方文档:[http://101.200.178.51/development-vue/](http://101.200.178.51/development-vue/)
|
||||
### 官方文档:[http://101.200.178.51/](http://101.200.178.51/)
|
||||
@@ -14,6 +14,7 @@
|
||||
"echarts": "^4.2.1",
|
||||
"element-ui": "^2.13.0",
|
||||
"jquery": "^3.3.1",
|
||||
"jsencrypt": "^3.0.0-rc.1",
|
||||
"json-bigint": "^0.3.0",
|
||||
"layui-layer": "^1.0.9",
|
||||
"lodash": "^4.17.5",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 708 KiB After Width: | Height: | Size: 899 KiB |
@@ -101,5 +101,4 @@ export default {
|
||||
.active {
|
||||
color: #EF5E1C;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import JSEncrypt from 'jsencrypt';
|
||||
|
||||
/**
|
||||
* 列表数据转换树形数据
|
||||
* @param {Array} data 要转换的列表
|
||||
@@ -207,3 +209,14 @@ export function random (min, max) {
|
||||
let base = Math.random();
|
||||
return min + base * (max - min);
|
||||
}
|
||||
/**
|
||||
* 加密
|
||||
* @param {*} value 要加密的字符串
|
||||
*/
|
||||
const publicKey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpC4QMnbTrQOFriJJCCFFWhlruBJThAEBfRk7pRx1jsAhyNVL3CqJb0tRvpnbCnJhrRAEPdgFHXv5A0RrvFp+5Cw7QoFH6O9rKB8+0H7+aVQeKITMUHf/XMXioymw6Iq4QfWd8RhdtM1KM6eGTy8aU7SO2s69Mc1LXefg/x3yw6wIDAQAB';
|
||||
export function encrypt (value) {
|
||||
if (value == null || value === '') return null;
|
||||
let encrypt = new JSEncrypt();
|
||||
encrypt.setPublicKey(publicKey);
|
||||
return encodeURIComponent(encrypt.encrypt(value));
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<span>{{formatDateByStatsType(scope.row.registerDate, 'day')}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="150px;">
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="onFormEditTeacherClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formTeacher:formTeacher:formEditTeacher')">
|
||||
|
||||
@@ -66,7 +66,7 @@ export default {
|
||||
},
|
||||
selectMenu (index, path) {
|
||||
if (this.getCurrentMenuId === index) return;
|
||||
// <EFBFBD><EFBFBD>ҳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>tags<EFBFBD><EFBFBD>cachePage
|
||||
// 单页面清空所有tags和cachePage
|
||||
if (!this.multiTag) {
|
||||
this.clearAllTags();
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
import { SystemController } from '@/api';
|
||||
import { mapMutations } from 'vuex';
|
||||
import projectConfig from '@/core/config';
|
||||
import { encrypt } from '@/utils';
|
||||
|
||||
export default {
|
||||
data () {
|
||||
@@ -50,7 +51,7 @@ export default {
|
||||
if (valid) {
|
||||
let params = {
|
||||
loginName: this.dataForm.mobilePhone,
|
||||
password: this.dataForm.password
|
||||
password: encrypt(this.dataForm.password)
|
||||
};
|
||||
|
||||
SystemController.login(this, params, null, {showMask: false}).then(data => {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</el-row>
|
||||
<!-- 弹窗下发按钮栏,必须设置class为dialog-btn-layer -->
|
||||
<el-row type="flex" justify="end" class="dialog-btn-layer">
|
||||
<el-button size="mini" @click="onCancel" >取消</el-button>
|
||||
<el-button size="mini" @click="onCancel(false)" >取消</el-button>
|
||||
<el-button type="primary" size="mini" @click="onSubmit">确定</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
formFilterCopy: {
|
||||
},
|
||||
parentId: {
|
||||
impl: new DropdownWidget(this.loadParentIdDropdownList, true, 'deptId'),
|
||||
impl: new DropdownWidget(this.loadParentIdDropdownList, true, 'id'),
|
||||
value: []
|
||||
},
|
||||
isInit: false
|
||||
@@ -131,7 +131,7 @@ export default {
|
||||
this.formEditSysDept.parentId.impl.onVisibleChange(true).then(res => {
|
||||
if (!this.formEditSysDept.isInit) {
|
||||
this.formEditSysDept.parentId.value = findTreeNodePath(
|
||||
this.formEditSysDept.parentId.impl.dropdownList, this.formData.SysDept.parentId, 'deptId');
|
||||
this.formEditSysDept.parentId.impl.dropdownList, this.formData.SysDept.parentId, 'id');
|
||||
}
|
||||
this.formEditSysDept.isInit = true;
|
||||
});
|
||||
|
||||
@@ -264,6 +264,9 @@ export default {
|
||||
mounted () {
|
||||
if (this.rowData != null) {
|
||||
this.formData = {...this.formData, ...this.rowData};
|
||||
if (Array.isArray(this.formData.sysMenuPermCodeList)) {
|
||||
this.formData.permCodeIdList = this.formData.sysMenuPermCodeList.map(item => item.permCodeId);
|
||||
}
|
||||
}
|
||||
if (this.parentId != null) this.formData.parentId = this.parentId;
|
||||
this.initData();
|
||||
|
||||
@@ -199,6 +199,9 @@ export default {
|
||||
mounted () {
|
||||
if (this.rowData != null) {
|
||||
this.formData = {...this.formData, ...this.rowData};
|
||||
if (Array.isArray(this.formData.sysPermCodePermList)) {
|
||||
this.formData.permIdList = this.formData.sysPermCodePermList.map(item => item.permId);
|
||||
}
|
||||
if (this.formData.parentId != null && this.permCodeTree != null && Array.isArray(this.permCodeTree)) {
|
||||
this.parentPermCodePath = findTreeNodePath(this.permCodeTree, this.formData.parentId, 'permCodeId');
|
||||
} else {
|
||||
|
||||
@@ -136,7 +136,12 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (this.rowData) this.formData = {...this.formData, ...this.rowData};
|
||||
if (this.rowData) {
|
||||
this.formData = {...this.formData, ...this.rowData};
|
||||
if (Array.isArray(this.formData.sysRoleMenuList)) {
|
||||
this.formData.menuIdList = this.formData.sysRoleMenuList.map(item => item.menuId);
|
||||
}
|
||||
}
|
||||
this.loadAuthData();
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -16,13 +16,15 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="账号类型" prop="userType">
|
||||
<el-select v-model="formData.userType">
|
||||
<el-option v-for="item in SysUserType.getList()" :key="item.id" :label="item.name" :value="item.id" />
|
||||
<el-option v-for="item in SysUserType.getList()" :key="item.id"
|
||||
:label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户状态" prop="userStatus" v-if="isEdit">
|
||||
<el-radio-group v-model="formData.userStatus">
|
||||
<el-radio :label="0">正常</el-radio>
|
||||
<el-radio :label="1">锁定</el-radio>
|
||||
<el-radio v-for="item in SysUserStatus.getList()" :key="item.id" :label="item.id">
|
||||
{{item.name}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" prop="deptId">
|
||||
@@ -203,6 +205,12 @@ export default {
|
||||
mounted () {
|
||||
if (this.rowData != null) {
|
||||
this.formData = {...this.rowData};
|
||||
if (Array.isArray(this.formData.sysDataPermUserList)) {
|
||||
this.formData.dataPermIdList = this.formData.sysDataPermUserList.map(item => item.dataPermId);
|
||||
}
|
||||
if (Array.isArray(this.formData.sysUserRoleList)) {
|
||||
this.formData.roleIdList = this.formData.sysUserRoleList.map(item => item.roleId);
|
||||
}
|
||||
}
|
||||
this.deptId.impl.onVisibleChange(true).then(res => {
|
||||
this.deptId.value = findTreeNodePath(this.deptId.impl.dropdownList, this.formData.deptId, 'deptId');
|
||||
|
||||
Reference in New Issue
Block a user