|
@@ -49,7 +49,8 @@
|
|
|
icon="el-icon-edit"
|
|
|
size="small"
|
|
|
@click="editKJ(row, index)"
|
|
|
- >编辑</el-link>
|
|
|
+ >编辑
|
|
|
+ </el-link>
|
|
|
<el-link
|
|
|
class="marleft10"
|
|
|
:underline="false"
|
|
@@ -57,7 +58,8 @@
|
|
|
icon="el-icon-delete"
|
|
|
size="small"
|
|
|
@click="$refs.crud.rowDel(row,index)"
|
|
|
- >删除</el-link>
|
|
|
+ >删除
|
|
|
+ </el-link>
|
|
|
</template>
|
|
|
|
|
|
<!-- 参建项目 -->
|
|
@@ -179,7 +181,8 @@
|
|
|
type="warning"
|
|
|
size="mini"
|
|
|
@click="addProject(type)"
|
|
|
- >确认添加</el-button>
|
|
|
+ >确认添加
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -227,6 +230,15 @@
|
|
|
@click="handlePlatform"
|
|
|
>平台配置
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ type="info"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ v-if="userInfo.role_name.includes('admin')"
|
|
|
+ icon="el-icon-coordinate"
|
|
|
+ @click="handLock"
|
|
|
+ >账号封禁
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
type="info"
|
|
|
size="small"
|
|
@@ -259,25 +271,25 @@
|
|
|
slot-scope="{row}"
|
|
|
slot="tenantName"
|
|
|
>
|
|
|
- <el-tag>{{row.tenantName}}</el-tag>
|
|
|
+ <el-tag>{{ row.tenantName }}</el-tag>
|
|
|
</template>
|
|
|
<template
|
|
|
slot-scope="{row}"
|
|
|
slot="roleName"
|
|
|
>
|
|
|
- <el-tag>{{row.roleName}}</el-tag>
|
|
|
+ <el-tag>{{ row.roleName }}</el-tag>
|
|
|
</template>
|
|
|
<template
|
|
|
slot-scope="{row}"
|
|
|
slot="deptName"
|
|
|
>
|
|
|
- <el-tag>{{row.deptName}}</el-tag>
|
|
|
+ <el-tag>{{ row.deptName }}</el-tag>
|
|
|
</template>
|
|
|
<template
|
|
|
slot-scope="{row}"
|
|
|
slot="userTypeName"
|
|
|
>
|
|
|
- <el-tag>{{row.userTypeName}}</el-tag>
|
|
|
+ <el-tag>{{ row.userTypeName }}</el-tag>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
<el-dialog
|
|
@@ -358,13 +370,13 @@
|
|
|
slot-scope="{row}"
|
|
|
slot="tenantName"
|
|
|
>
|
|
|
- <el-tag>{{row.tenantName}}</el-tag>
|
|
|
+ <el-tag>{{ row.tenantName }}</el-tag>
|
|
|
</template>
|
|
|
<template
|
|
|
slot-scope="{row}"
|
|
|
slot="userTypeName"
|
|
|
>
|
|
|
- <el-tag>{{row.userTypeName}}</el-tag>
|
|
|
+ <el-tag>{{ row.userTypeName }}</el-tag>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</el-dialog>
|
|
@@ -383,25 +395,25 @@ import {
|
|
|
updatePlatform,
|
|
|
add,
|
|
|
grant,
|
|
|
- resetPassword, unlock, removeUserProjectInfoAndRoleById
|
|
|
+ resetPassword, lock, unlock, removeUserProjectInfoAndRoleById
|
|
|
} from "@/api/system/user";
|
|
|
-import { getProjectList } from "@/api/manager/projectinfo";
|
|
|
+import {getProjectList} from "@/api/manager/projectinfo";
|
|
|
|
|
|
-import { findContractByProjectId, removeUsersByIds } from "@/api/manager/contractinfo";
|
|
|
-import { exportBlob } from "@/api/common";
|
|
|
-import { getDeptTree, getDeptLazyTree } from "@/api/system/dept";
|
|
|
-import { roletree, treeUser, findProjectAndContractList, saveUserInfoByProjectTow } from "@/api/system/role";
|
|
|
+import {findContractByProjectId, removeUsersByIds} from "@/api/manager/contractinfo";
|
|
|
+import {exportBlob} from "@/api/common";
|
|
|
+import {getDeptTree, getDeptLazyTree} from "@/api/system/dept";
|
|
|
+import {roletree, treeUser, findProjectAndContractList, saveUserInfoByProjectTow} from "@/api/system/role";
|
|
|
// import { getPostList } from "@/api/system/post";
|
|
|
-import { mapGetters } from "vuex";
|
|
|
+import {mapGetters} from "vuex";
|
|
|
import website from '@/config/website';
|
|
|
-import { getToken } from '@/util/auth';
|
|
|
-import { downloadXls } from "@/util/util";
|
|
|
-import { dateNow } from "@/util/date";
|
|
|
+import {getToken} from '@/util/auth';
|
|
|
+import {downloadXls} from "@/util/util";
|
|
|
+import {dateNow} from "@/util/date";
|
|
|
import NProgress from 'nprogress';
|
|
|
import 'nprogress/nprogress.css';
|
|
|
|
|
|
export default {
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
const validatePass = (rule, value, callback) => {
|
|
|
if (value === '') {
|
|
|
callback(new Error('请输入密码'));
|
|
@@ -629,7 +641,7 @@ export default {
|
|
|
hide: true,
|
|
|
editDisplay: false,
|
|
|
viewDisplay: false,
|
|
|
- rules: [{ required: true, validator: validatePass, trigger: 'blur' }]
|
|
|
+ rules: [{required: true, validator: validatePass, trigger: 'blur'}]
|
|
|
},
|
|
|
{
|
|
|
label: '确认密码',
|
|
@@ -637,7 +649,7 @@ export default {
|
|
|
hide: true,
|
|
|
editDisplay: false,
|
|
|
viewDisplay: false,
|
|
|
- rules: [{ required: true, validator: validatePass2, trigger: 'blur' }]
|
|
|
+ rules: [{required: true, validator: validatePass2, trigger: 'blur'}]
|
|
|
},
|
|
|
]
|
|
|
},
|
|
@@ -742,8 +754,8 @@ export default {
|
|
|
span: 16,
|
|
|
prop: "status",
|
|
|
dicData: [
|
|
|
- { value: 1, label: '是' },
|
|
|
- { value: 0, label: '否' }],
|
|
|
+ {value: 1, label: '是'},
|
|
|
+ {value: 0, label: '否'}],
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "请选择是否允许登录",
|
|
@@ -881,12 +893,12 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
- 'form.tenantId' () {
|
|
|
+ 'form.tenantId'() {
|
|
|
if (this.form.tenantId !== '' && this.initFlag) {
|
|
|
this.initData(this.form.tenantId);
|
|
|
}
|
|
|
},
|
|
|
- 'excelForm.isCovered' () {
|
|
|
+ 'excelForm.isCovered'() {
|
|
|
if (this.excelForm.isCovered !== '') {
|
|
|
const column = this.findObject(this.excelOption.column, "excelFile");
|
|
|
column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
|
|
@@ -903,7 +915,7 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["userInfo", "permission"]),
|
|
|
- permissionList () {
|
|
|
+ permissionList() {
|
|
|
return {
|
|
|
addBtn: this.vaildData(this.permission.user_add, false),
|
|
|
viewBtn: this.vaildData(this.permission.user_view, false),
|
|
@@ -911,7 +923,7 @@ export default {
|
|
|
editBtn: this.vaildData(this.permission.user_edit, false)
|
|
|
};
|
|
|
},
|
|
|
- platformPermissionList () {
|
|
|
+ platformPermissionList() {
|
|
|
return {
|
|
|
addBtn: false,
|
|
|
viewBtn: false,
|
|
@@ -919,7 +931,7 @@ export default {
|
|
|
editBtn: this.vaildData(this.permission.user_edit, false)
|
|
|
};
|
|
|
},
|
|
|
- ids () {
|
|
|
+ ids() {
|
|
|
let ids = [];
|
|
|
this.selectionList.forEach(ele => {
|
|
|
ids.push(ele.id);
|
|
@@ -927,7 +939,7 @@ export default {
|
|
|
return ids.join(",");
|
|
|
},
|
|
|
},
|
|
|
- mounted () {
|
|
|
+ mounted() {
|
|
|
// 非租户模式默认加载管理组数据
|
|
|
if (!website.tenantMode) {
|
|
|
this.initData(website.tenantId);
|
|
@@ -938,7 +950,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
//#region 弹框事件及方法
|
|
|
- addKJ () {
|
|
|
+ addKJ() {
|
|
|
this.getProjectList()//项目类型
|
|
|
this.treeUser() //获取用户类型枚举
|
|
|
this.fromss.projectAndUserList = []
|
|
@@ -952,7 +964,7 @@ export default {
|
|
|
column.value = this.addData.deptId
|
|
|
this.$refs.crud.rowAdd()
|
|
|
},
|
|
|
- addProject (type) {//确定添加参建项目
|
|
|
+ addProject(type) {//确定添加参建项目
|
|
|
if (type == 'add') {
|
|
|
this.addfangfa()
|
|
|
} else {
|
|
@@ -988,7 +1000,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- addfangfa () {//添加时确定添加按钮方法处理
|
|
|
+ addfangfa() {//添加时确定添加按钮方法处理
|
|
|
if (!this.fromss.projectId) {
|
|
|
this.$message({
|
|
|
type: "error",
|
|
@@ -1107,14 +1119,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- hetongChange (key) {//合同段changge事件
|
|
|
+ hetongChange(key) {//合同段changge事件
|
|
|
this.fromss.projectAndUserList[key].dataInfo.forEach(val => {
|
|
|
if (this.fromss.projectAndUserList[key].contractName == val.id) {
|
|
|
this.fromss.projectAndUserList[key].roleName = val.roleType + '|' + val.roleName
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- async editKJ (row, index) {//编辑用户
|
|
|
+ async editKJ(row, index) {//编辑用户
|
|
|
console.log(row);
|
|
|
this.fromss.userId = row.id //用户ID
|
|
|
this.fromss.contractId = '' //合同段Id
|
|
@@ -1124,14 +1136,14 @@ export default {
|
|
|
this.findProjectAndContractList(row.id) //编辑获取参建项目
|
|
|
this.$refs.crud.rowEdit(row, index)
|
|
|
},
|
|
|
- deleteProject2 (key, type) {//删除参建项目一条项目
|
|
|
+ deleteProject2(key, type) {//删除参建项目一条项目
|
|
|
if (type == 'add') {
|
|
|
this.fromss.projectAndUserList.splice(this.fromss.projectAndUserList[key], 1)
|
|
|
} else {
|
|
|
this.removeUserProjectInfoAndRoleById(this.fromss.projectAndUserList[key].dataInfo[0].id)
|
|
|
}
|
|
|
},
|
|
|
- deleteProject (key, type, index) {//删除参建项目按钮
|
|
|
+ deleteProject(key, type, index) {//删除参建项目按钮
|
|
|
if (type == 'add') {
|
|
|
if (this.fromss.projectAndUserList[key].dataInfo.length == 1) {
|
|
|
this.fromss.projectAndUserList.splice(this.fromss.projectAndUserList[key], 1)
|
|
@@ -1145,10 +1157,10 @@ export default {
|
|
|
this.removeUsersByIds(this.fromss.projectAndUserList[key].dataInfo[index].id)
|
|
|
}
|
|
|
},
|
|
|
- async removeUserProjectInfoAndRoleById (id) {//参建项目删除一条项目
|
|
|
+ async removeUserProjectInfoAndRoleById(id) {//参建项目删除一条项目
|
|
|
this.deletexiangmu = true
|
|
|
try {
|
|
|
- const { data: res } = await removeUserProjectInfoAndRoleById({ id })
|
|
|
+ const {data: res} = await removeUserProjectInfoAndRoleById({id})
|
|
|
console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
await this.findProjectAndContractList(this.fromss.userId)
|
|
@@ -1157,9 +1169,9 @@ export default {
|
|
|
} catch (error) {
|
|
|
this.deletexiangmu = false
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
- async beforeClose (done) {//弹框关闭事件
|
|
|
+ async beforeClose(done) {//弹框关闭事件
|
|
|
this.fromss = {
|
|
|
userId: '',//
|
|
|
projectAndUserList: [],
|
|
@@ -1170,10 +1182,10 @@ export default {
|
|
|
await this.onLoad(this.page);
|
|
|
done()
|
|
|
},
|
|
|
- async removeUsersByIds (ids) {//删除参建项目
|
|
|
+ async removeUsersByIds(ids) {//删除参建项目
|
|
|
this.deletexiangmu = true
|
|
|
try {
|
|
|
- const { data: res } = await removeUsersByIds(ids)
|
|
|
+ const {data: res} = await removeUsersByIds(ids)
|
|
|
console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
this.$message({
|
|
@@ -1187,29 +1199,29 @@ export default {
|
|
|
this.deletexiangmu = false
|
|
|
}
|
|
|
},
|
|
|
- async getProjectList () {//项目类型
|
|
|
- const { data: res } = await getProjectList(1, 999)
|
|
|
+ async getProjectList() {//项目类型
|
|
|
+ const {data: res} = await getProjectList(1, 999)
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
this.projectData = res.data.records
|
|
|
}
|
|
|
},
|
|
|
- async findContractByProjectId (pId) {//合同段
|
|
|
- const { data: res } = await findContractByProjectId(pId)
|
|
|
+ async findContractByProjectId(pId) {//合同段
|
|
|
+ const {data: res} = await findContractByProjectId(pId)
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
this.contractData = res.data
|
|
|
}
|
|
|
},
|
|
|
- async treeUser () {//获取用户类型枚举
|
|
|
- const { data: res } = await treeUser()
|
|
|
+ async treeUser() {//获取用户类型枚举
|
|
|
+ const {data: res} = await treeUser()
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
this.roleIdsData = res.data
|
|
|
}
|
|
|
},
|
|
|
- async findProjectAndContractList (userId) {//编辑获取参建项目
|
|
|
- const { data: res } = await findProjectAndContractList({ userId })
|
|
|
+ async findProjectAndContractList(userId) {//编辑获取参建项目
|
|
|
+ const {data: res} = await findProjectAndContractList({userId})
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
res.data.forEach(val => {
|
|
@@ -1219,8 +1231,8 @@ export default {
|
|
|
this.fromss.projectAndUserList = res.data
|
|
|
}
|
|
|
},
|
|
|
- async saveUserInfoByProjectTow (da) {//编辑添加参建项目
|
|
|
- const { data: res } = await saveUserInfoByProjectTow(da)
|
|
|
+ async saveUserInfoByProjectTow(da) {//编辑添加参建项目
|
|
|
+ const {data: res} = await saveUserInfoByProjectTow(da)
|
|
|
console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
// this.fromss.projectId = '' //参与项项目
|
|
@@ -1236,7 +1248,7 @@ export default {
|
|
|
//#endregion
|
|
|
|
|
|
//#region 甘云杰
|
|
|
- nodeClick (data) {
|
|
|
+ nodeClick(data) {
|
|
|
this.addData = {
|
|
|
tenantId: data.tenantId,
|
|
|
deptId: data.id
|
|
@@ -1245,14 +1257,14 @@ export default {
|
|
|
this.page.currentPage = 1;
|
|
|
this.onLoad(this.page);
|
|
|
},
|
|
|
- initData (tenantId) {
|
|
|
+ initData(tenantId) {
|
|
|
//所属部门
|
|
|
getDeptTree(tenantId).then(res => {
|
|
|
const column = this.findObject(this.option.group, "deptId");
|
|
|
column.dicData = res.data.data;
|
|
|
});
|
|
|
},
|
|
|
- submitRole () {
|
|
|
+ submitRole() {
|
|
|
const roleList = this.$refs.treeRole.getCheckedKeys().join(",");
|
|
|
grant(this.ids, roleList).then(() => {
|
|
|
this.roleBox = false;
|
|
@@ -1263,7 +1275,7 @@ export default {
|
|
|
this.onLoad(this.page);
|
|
|
});
|
|
|
},
|
|
|
- rowSave (row, done, loading) { //新增保存
|
|
|
+ rowSave(row, done, loading) { //新增保存
|
|
|
if (this.fromss.projectAndUserList.length > 0) {
|
|
|
let projectAndUserList = []
|
|
|
this.fromss.projectAndUserList.forEach(val => {
|
|
@@ -1277,7 +1289,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- add({ ...row, projectAndUserList }).then(() => {
|
|
|
+ add({...row, projectAndUserList}).then(() => {
|
|
|
this.initFlag = false;
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
@@ -1292,13 +1304,13 @@ export default {
|
|
|
loading()
|
|
|
}
|
|
|
},
|
|
|
- rowUpdate (row, index, done, loading) {//修改按钮
|
|
|
+ rowUpdate(row, index, done, loading) {//修改按钮
|
|
|
// row.roleId = row.roleId.join(",");
|
|
|
row.postId = row.postId.join(",");
|
|
|
- let ks = { ...row }
|
|
|
+ let ks = {...row}
|
|
|
delete ks.projectAndUserList
|
|
|
delete ks.roleId
|
|
|
- update({ ...ks }).then(() => {
|
|
|
+ update({...ks}).then(() => {
|
|
|
this.initFlag = false;
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
@@ -1310,7 +1322,7 @@ export default {
|
|
|
loading();
|
|
|
});
|
|
|
},
|
|
|
- rowDel (row) {
|
|
|
+ rowDel(row) {
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -1327,25 +1339,25 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- searchReset () {
|
|
|
+ searchReset() {
|
|
|
this.query = {};
|
|
|
this.treeDeptId = '';
|
|
|
this.onLoad(this.page);
|
|
|
},
|
|
|
- searchChange (params, done) {
|
|
|
+ searchChange(params, done) {
|
|
|
this.query = params;
|
|
|
this.page.currentPage = 1;
|
|
|
this.onLoad(this.page, params);
|
|
|
done();
|
|
|
},
|
|
|
- selectionChange (list) {
|
|
|
+ selectionChange(list) {
|
|
|
this.selectionList = list;
|
|
|
},
|
|
|
- selectionClear () {
|
|
|
+ selectionClear() {
|
|
|
this.selectionList = [];
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
},
|
|
|
- handleDelete () {
|
|
|
+ handleDelete() {
|
|
|
if (this.selectionList.length === 0) {
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
|
return;
|
|
@@ -1367,7 +1379,7 @@ export default {
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
});
|
|
|
},
|
|
|
- handleReset () {
|
|
|
+ handleReset() {
|
|
|
if (this.selectionList.length === 0) {
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
|
return;
|
|
@@ -1388,7 +1400,7 @@ export default {
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
});
|
|
|
},
|
|
|
- handleGrant () {
|
|
|
+ handleGrant() {
|
|
|
if (this.selectionList.length === 0) {
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
|
return;
|
|
@@ -1402,10 +1414,30 @@ export default {
|
|
|
this.roleBox = true;
|
|
|
});
|
|
|
},
|
|
|
- handlePlatform () {
|
|
|
+ handlePlatform() {
|
|
|
this.platformBox = true;
|
|
|
},
|
|
|
- handleLock () {
|
|
|
+ handLock() {
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm("确定将选择账号封禁?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return lock(this.ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleLock() {
|
|
|
if (this.selectionList.length === 0) {
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
|
return;
|
|
@@ -1425,16 +1457,16 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- handleImport () {
|
|
|
+ handleImport() {
|
|
|
this.excelBox = true;
|
|
|
},
|
|
|
- uploadAfter (res, done, loading, column) {
|
|
|
+ uploadAfter(res, done, loading, column) {
|
|
|
window.console.log(column);
|
|
|
this.excelBox = false;
|
|
|
this.refreshChange();
|
|
|
done();
|
|
|
},
|
|
|
- handleExport () {
|
|
|
+ handleExport() {
|
|
|
this.$confirm("是否导出用户数据?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -1447,12 +1479,12 @@ export default {
|
|
|
})
|
|
|
});
|
|
|
},
|
|
|
- handleTemplate () {
|
|
|
+ handleTemplate() {
|
|
|
exportBlob(`/api/blade-user/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
|
|
|
downloadXls(res.data, "用户数据模板.xlsx");
|
|
|
})
|
|
|
},
|
|
|
- beforeOpen (done, type) {
|
|
|
+ beforeOpen(done, type) {
|
|
|
if (["edit", "view"].includes(type)) {
|
|
|
getUser(this.form.id).then(res => {
|
|
|
this.form = res.data.data;
|
|
@@ -1470,16 +1502,16 @@ export default {
|
|
|
this.initFlag = true;
|
|
|
done();
|
|
|
},
|
|
|
- currentChange (currentPage) {
|
|
|
+ currentChange(currentPage) {
|
|
|
this.page.currentPage = currentPage;
|
|
|
},
|
|
|
- sizeChange (pageSize) {
|
|
|
+ sizeChange(pageSize) {
|
|
|
this.page.pageSize = pageSize;
|
|
|
},
|
|
|
- refreshChange () {
|
|
|
+ refreshChange() {
|
|
|
this.onLoad(this.page, this.query);
|
|
|
},
|
|
|
- onLoad (page, params = {}) {
|
|
|
+ onLoad(page, params = {}) {
|
|
|
this.loading = true;
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
|
|
|
const data = res.data.data;
|
|
@@ -1489,7 +1521,7 @@ export default {
|
|
|
this.selectionClear();
|
|
|
});
|
|
|
},
|
|
|
- platformRowUpdate (row, index, done, loading) {
|
|
|
+ platformRowUpdate(row, index, done, loading) {
|
|
|
updatePlatform(row.id, row.userType, row.userExt).then(() => {
|
|
|
this.platformOnLoad(this.platformPage);
|
|
|
this.$message({
|
|
@@ -1502,7 +1534,7 @@ export default {
|
|
|
loading();
|
|
|
});
|
|
|
},
|
|
|
- platformBeforeOpen (done, type) {
|
|
|
+ platformBeforeOpen(done, type) {
|
|
|
if (["edit", "view"].includes(type)) {
|
|
|
getUserPlatform(this.platformForm.id).then(res => {
|
|
|
this.platformForm = res.data.data;
|
|
@@ -1510,33 +1542,33 @@ export default {
|
|
|
}
|
|
|
done();
|
|
|
},
|
|
|
- platformSearchReset () {
|
|
|
+ platformSearchReset() {
|
|
|
this.platformQuery = {};
|
|
|
this.platformOnLoad(this.platformPage);
|
|
|
},
|
|
|
- platformSearchChange (params, done) {
|
|
|
+ platformSearchChange(params, done) {
|
|
|
this.platformQuery = params;
|
|
|
this.platformPage.currentPage = 1;
|
|
|
this.platformOnLoad(this.platformPage, params);
|
|
|
done();
|
|
|
},
|
|
|
- platformSelectionChange (list) {
|
|
|
+ platformSelectionChange(list) {
|
|
|
this.platformSelectionList = list;
|
|
|
},
|
|
|
- platformSelectionClear () {
|
|
|
+ platformSelectionClear() {
|
|
|
this.platformSelectionList = [];
|
|
|
this.$refs.platformCrud.toggleSelection();
|
|
|
},
|
|
|
- platformCurrentChange (currentPage) {
|
|
|
+ platformCurrentChange(currentPage) {
|
|
|
this.platformPage.currentPage = currentPage;
|
|
|
},
|
|
|
- platformSizeChange (pageSize) {
|
|
|
+ platformSizeChange(pageSize) {
|
|
|
this.platformPage.pageSize = pageSize;
|
|
|
},
|
|
|
- platformRefreshChange () {
|
|
|
+ platformRefreshChange() {
|
|
|
this.platformOnLoad(this.platformPage, this.platformQuery);
|
|
|
},
|
|
|
- platformOnLoad (page, params = {}) {
|
|
|
+ platformOnLoad(page, params = {}) {
|
|
|
this.platformLoading = true;
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
|
|
|
const data = res.data.data;
|