fengdong777 2 years ago
parent
commit
d3ac059efc
  1. 249
      demo-web-ui/src/views/guideManage/guideManage.vue
  2. 65
      demo-web-ui/src/views/workflow/userManage/userManage.vue
  3. 267
      demo-web-ui/src/views/workflow/userManage/userManageAdd.vue
  4. 483
      demo-web-ui/src/views/workflow/userManage/userManageList.vue

249
demo-web-ui/src/views/guideManage/guideManage.vue

@ -0,0 +1,249 @@
<template>
<el-tabs
class="my-tabs"
v-model="activeName"
type="card"
@tab-click="handleClick"
>
<el-tab-pane label="教师信息" name="roleList">
<div class="container">
<el-table :data="tableData" border style="width: 100%">
<el-table-column prop="name" label="教师姓名" align="center">
</el-table-column>
<el-table-column prop="infoId" label="教师工号" align="center">
</el-table-column>
<el-table-column label="查看" align="center" width="100px">
<template slot-scope="scope">
<el-button type="text" @click="lookstuder(scope.row)"
>查看学生</el-button
>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="editRow(scope.row)">
添加
</el-button>
<el-button
type="danger"
size="mini"
@click.native.prevent="deleteRow(scope.row)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
:total="page.total"
:page.sync="page.current"
:limit.sync="page.size"
@pagination="pagination"
/>
<el-dialog title="收货地址" :visible.sync="lookstuders">
<el-table :data="gridData">
<el-table-column
property="infoId"
label="日期"
width="150"
></el-table-column>
<el-table-column
property="name"
label="姓名"
width="200"
></el-table-column>
<el-table-column property="address" label="地址"></el-table-column>
</el-table>
</el-dialog>
<!-- 编辑角色信息 -->
<el-dialog
:title="dialogTitle + '学生'"
:visible.sync="editDialog"
width="40%"
>
<table class="e-table" cellspacing="0">
<tr>
<td>教师姓名</td>
<td>
<el-input
v-model="teacher.teacherName"
style="width: 300px"
></el-input>
</td>
</tr>
<tr>
<td>教师工号</td>
<td>
<el-input
v-model="teacher.teacherNo"
style="width: 300px"
></el-input>
</td>
</tr>
<tr>
<td>学生姓名</td>
<td>
<el-select v-model="teacher.studentName" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</td>
</tr>
<tr>
<td>学生学号</td>
<td>
<el-select v-model="teacher.studentNo" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.infoId"
:value="item.id"
>
</el-option>
</el-select>
</td>
</tr>
</table>
<div style="margin-top: 20px; text-align: center">
<el-button type="primary" @click="save()">保存</el-button>
<!--<el-button @click="editDialog = false">关闭</el-button>-->
</div>
</el-dialog>
</div>
</el-tab-pane>
</el-tabs>
</template>
<script>
import {
pageList,
saveSysInfoShip,
selectTeacherDownStudent,
} from "@/api/system/sources/index.js";
export default {
data() {
return {
activeName: "roleList",
dialogTitle: "",
editDialog: false,
lookstuders: false,
form: {},
gridData: {},
teacher: {},
type: "js",
formBackup: Object.assign({}, this.form),
page: {
total: 0, //
current: 1, //
size: 10, //
params: {
psid: "",
sourceId: "",
sourceName: "",
},
},
tableData: [],
zylb: [],
sourceList: [],
options: {},
value: "",
};
},
mounted() {
this.getPageList(this.page);
pageList("xs").then((res) => {
this.options = res.data;
console.log(res);
});
},
methods: {
lookstuder(row) {
this.lookstuders = true;
console.log(row.infoId);
selectTeacherDownStudent({ infoId: row.infoId }).then((res) => {
this.gridData=res.data
});
},
pagination(val) {
//
this.page.current = val.pageNum;
this.page.size = val.pageSize;
this.getPageList(this.page);
},
resetSearch() {
//
this.page = {
total: 0, //
current: 1, //
size: 10, //
params: {
name: "",
psid: "",
sourceId: "",
sourceName: "",
},
};
this.getPageList();
},
getPageList() {
//
pageList(this.type).then((res) => {
this.tableData = res.data;
this.page.total = res.data.total;
});
},
handleClick(tab, event) {
if (tab.name == "addrole") {
this.dialogTitle = "新增";
this.roleForm = Object.assign({}, this.formBackup);
} else {
this.getPageList();
}
},
reset() {
this.form = {};
},
editRow(row) {
this.dialogTitle = "添加";
this.editDialog = true;
this.form = Object.assign({}, row);
},
save() {
console.log(this.teacher);
saveSysInfoShip(this.teacher).then((res) => {
console.log(res);
});
this.editDialog = false;
},
deleteRow(row) {
this.$confirm("确定要删除该资源吗, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
delSources({ sid: row.sid }).then((res) => {
this.getPageList();
this.$message({
type: "success",
message: "删除成功!",
});
});
});
},
},
};
</script>
<style scoped="scoped" lang="scss">
.my-tabs {
margin-top: 10px;
}
</style>

65
demo-web-ui/src/views/workflow/userManage/userManage.vue

@ -0,0 +1,65 @@
<template>
<div>
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="用户列表" name="roleList">
<user-manage-list :dataObj='dataObj' @status='isShow' @item='listObj'></user-manage-list>
</el-tab-pane>
<!-- <el-tab-pane label="新增用户" name="addrole">
<user-manage-add @status='isShow' :dataObj='childObj'></user-manage-add>
</el-tab-pane>-->
</el-tabs>
</div>
</template>
<script>
import userManageList from './userManageList.vue'
import userManageAdd from './userManageAdd.vue'
export default {
components: {
userManageList: userManageList,
userManageAdd: userManageAdd,
},
data() {
return {
activeName: 'roleList',
editDialog: false,
dataObj: {
isShow: ''
},
childObj: {}
};
},
mounted() {
},
methods: {
handleClick(tab, event) {
if (tab.name == 'addrole') {
this.dialogTitle = '新增'
// this.roleForm = Object.assign({}, this.formBackup)
} else {
// this.getroleOrgList()
}
},
isShow(val) {
if (!val) {
this.activeName = 'roleList'
this.dataObj.isShow = false
this.dataObj.isShow = true
} else {
this.activeName = 'addrole'
}
},
listObj(val) {
this.childObj = val
}
}
};
</script>
<style scoped="scoped">
.my-tabs {
margin-top: 10px;
}
</style>

267
demo-web-ui/src/views/workflow/userManage/userManageAdd.vue

@ -0,0 +1,267 @@
<template>
<div>
<el-card class="box-card">
<table class="e-table" cellspacing="0">
<tr>
<td>姓名</td>
<td>
<el-input v-model="form.name" style="width:300px"></el-input>
</td>
</tr>
<tr>
<td>用户类型</td>
<td>
<el-select v-model="form.userType" @change="$forceUpdate()" style="width:300px">
<el-option
v-for="(item, i) in userTypeData"
:key="i"
:label="item.name"
:value="item.value">
</el-option>
</el-select>
</td>
</tr>
<tr>
<td>部门</td>
<td>
<el-select v-model="form.deptSid" placeholder="请选择" style="width:300px">
<el-option hidden :key="form.deptSid" :label="orgName" :value="form.deptSid"></el-option>
<el-tree :data="treedata" ref="Tree" show-checkbox accordion node-key="sid"
:default-checked-keys="checkedId"
:default-expand-all='true' :check-strictly='true' :props="defaultProps"
@check-change="checkchange"
>
</el-tree>
</el-select>
<!--<el-select v-model="form.deptSid" @change="$forceUpdate()">
<el-option
v-for="(item, i) in treedata"
:key="i"
:label="item.name"
:value="item.sid">
</el-option>
</el-select>-->
</td>
</tr>
<tr>
<td>岗位</td>
<td>
<el-select v-model="form.postSid" @change="$forceUpdate()" style="width:300px">
<el-option
v-for="(item, i) in postSidData"
:key="i"
:label="item.name"
:value="item.sid">
</el-option>
</el-select>
<!--<el-input v-model="form.postSid"></el-input>-->
</td>
</tr>
<tr>
<td>手机号码</td>
<td>
<el-input v-model="form.mobile" style="width:300px"></el-input>
</td>
</tr>
<tr>
<td>手机验证码</td>
<td>
<el-input v-model="form.verificationCode" placeholder="请输入验证码" style="width:300px">
<el-button v-show="showCode" slot="append" @click.native="getIdentifying">获取验证码</el-button>
<el-button v-show="!showCode" slot="append">{{phoneCodeCount}} s</el-button>
</el-input>
<!--<el-input v-model="form.verificationCode"></el-input>-->
</td>
</tr>
</table>
<div style="margin-top: 20px; text-align: center;">
<el-button type="primary" @click="save()"> </el-button>
<!--<el-button type="warning" @click="cancel()"> </el-button>-->
</div>
</el-card>
</div>
</template>
<script>
import {userAdd, userUpdata, userSingle, orgList, postList, getCode} from '@/api/system/userManage/index.js'
export default {
data() {
return {
form: {
sid: '',
name: '',
userType: '',
deptSid: '',
postSid: '',
mobile: '',
verificationCode: ''
},
form1: {
sid: '',
},
userTypeData: [{
value: '1',
name: '员工'
}, {
value: '2',
name: '客户'
}, {
value: '3',
name: '供应商'
}],
treedata: [],
checkedId: [],
orgName: '',
defaultProps: {
children: 'children',
label: 'name'
},
postSidData: [],
showCode: true,
phoneCodeCount: '',
timer: null,
};
},
props: ['dataObj'],
watch: {
dataObj: {
handler(val) {
this.form1.sid = val.sid
this.getUserSingle()
this.getOrgList()
},
deep: true,
},
},
mounted() {
this.getOrgList()
},
methods: {
getUserSingle() {
userSingle(this.form1).then(res => {
if (res.code == '200') {
this.form.sid = res.data.sid
this.form.name = res.data.name
this.form.userType = res.data.userType
this.form.deptSid = res.data.deptSid
this.orgName = res.data.departmentName
this.form.postSid = res.data.postSid
this.form.mobile = res.data.mobile
}
})
},
//
getOrgList(row) {
// this.roleDialog = true
this.checkedId = []
this.Thisrow = row
this.loading = true
let params = {}
orgList(params).then(res => {
this.treedata = res.data
})
},
checkchange(data, checked, indeterminate) {
if (checked) {
this.form.deptSid = data.sid
this.orgName = data.name
let arr = []
arr = [data.sid];
this.$refs.Tree.setCheckedKeys(arr);
this.form.postSid = ''
this.getPost(data.sid)
return;
}
},
getPost(orgSid) {
let params = {
sid: orgSid
}
postList(params).then(res => {
this.postSidData = res.data
})
},
save() {
if (this.form.sid) {
userUpdata(this.form).then(res => {
if (res.code == '200') {
this.$message({
message: res.msg,
type: 'success'
})
this.$emit('status', false)
}
})
} else {
let orgSid = this.$refs.Tree.getCheckedKeys()
this.form.deptSid = orgSid.toString()
userAdd(this.form).then(res => {
if (res.code == '200') {
this.$message({
message: res.msg,
type: 'success'
})
this.$emit('status', false)
}
})
let arr = []
this.$refs.Tree.setCheckedKeys(arr);
}
this.reset()
},
reset() {
this.form = {
sid: '',
name: '',
userType: '',
deptSid: '',
postSid: '',
mobile: '',
verificationCode: ''
}
},
//
getIdentifying() {
if (this.form.mobile == "") {
this.$alert('请填写手机号码', '', {
confirmButtonText: '确定'
})
return;
}
//
const TIME_COUNT = 60;
if (!this.timer) {
this.phoneCodeCount = TIME_COUNT;
this.showCode = false;
this.timer = setInterval(() => {
if (this.phoneCodeCount > 0 && this.phoneCodeCount <= TIME_COUNT) {
this.phoneCodeCount--;
} else {
this.showCode = true;
clearInterval(this.timer);
this.timer = null;
}
}, 1000)
}
let obj = {
phone: this.form.mobile,
}
getCode(obj).then(res => {
if (res.code == '200') {
this.orginTranceNo = res.data.tranceNo;
}
})
},
cancel() {
this.$emit('status', false)
}
}
}
</script>
<style>
</style>

483
demo-web-ui/src/views/workflow/userManage/userManageList.vue

@ -0,0 +1,483 @@
<template>
<div>
<div class="tab-header">
<el-form ref="form" :inline="true" :model="search" label-width="80px">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="用户名">
<el-input v-model="search.userName" clearable></el-input>
</el-form-item>
<el-form-item label="姓名">
<el-input v-model="search.name" clearable></el-input>
</el-form-item>
<el-form-item label="角色">
<el-select v-model="search.roleSid" filterable clearable placeholder="请选择">
<el-option v-for="item in roleListAll" :key="item.sid" :label="item.name" :value="item.sid"></el-option>
</el-select>
</el-form-item>
<el-form-item label="部门">
<el-input v-model="search.orgName" clearable></el-input>
<!-- <el-select v-model="search.roleSid" clearable placeholder="请选择">-->
<!-- <el-option v-for="(item,i) in roleListAll" :key="i" :label="item.name" :value="item.sid"></el-option>-->
<!-- </el-select>-->
</el-form-item>
<el-button @click="getOrgUserList(1)">查询</el-button>
</el-col>
</el-row>
</el-form>
</div>
<!-- table -->
<el-table :data="userTable" border style="width: 100%;">
<el-table-column label="序号" width="50px" type="index" align="center">
</el-table-column>
<el-table-column label="操作" width="300px" align="center">
<template slot-scope="scope">
<el-button @click="setRole(scope.row)" type="primary" size="mini">
设置角色
</el-button>
<el-button @click="initPwd(scope.row)" type="danger" size="mini">
初始化密码
</el-button>
<!-- <el-button @click="del(scope.row)" type="danger" size="mini">
删除
</el-button>-->
</template>
</el-table-column>
<el-table-column prop="userName" label="用户名" align="center">
<template slot-scope="scope">
<!-- <span class="tablerow-click" @click="userinfoChange(scope.row)">-->{{ scope.row.userName }}<!--</span>-->
</template>
</el-table-column>
<el-table-column prop="userType" label="用户类型" align="center"></el-table-column>
<el-table-column prop="name" label="姓名" width="120px" align="center"></el-table-column>
<el-table-column prop="departmentName" label="部门" align="center"></el-table-column>
<el-table-column prop="postName" label="岗位" align="center"></el-table-column>
<el-table-column prop="isEnable" label="是否可用" align="center">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isEnable"
active-value='1'
inactive-value='0'
active-color="#13ce66"
inactive-color="#ff4949"
@change="enabledChange($event,scope.row)">
</el-switch>
</template>
</el-table-column>
</el-table>
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/>
<!-- 角色设置 -->
<el-dialog title="设置角色" :visible.sync="roleDialog" width="30%">
<el-form :model="roleForm" :rules="rules" ref="roleForm">
<el-form-item label="角色名称" :label-width="formLabelWidth" prop="roleSid">
<el-select v-model="roleForm.roleSid" placeholder="请选择" filterable multiple>
<el-option v-for="(item,i) in roleList" :key="i" :label="item.name" :value="item.sid"></el-option>
</el-select>
<!--<el-button type="primary" size='mini' @click="toNav('RoleAdminister')" style="margin-left: 10px;" circle icon="el-icon-plus"></el-button>-->
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveRole('roleForm')"> </el-button>
<el-button @click="roleDialog = false"> </el-button>
</div>
</el-dialog>
<!-- 部门设置 -->
<el-dialog title="部门设置" :visible.sync="bm_Dialog" width="30%">
<el-form :model="bm_Form" :rules="rules" ref="bm_Form">
<el-form-item label="部门名称" :label-width="formLabelWidth" prop="departmentSid">
<!-- <el-select v-model="bm_Form.departmentSid" placeholder="请选择">
<el-option v-for="item in bm_List"
:key="item.departmentSid"
:label="item.departmentName"
:value="item.departmentSid"
></el-option>
</el-select> -->
<el-cascader
v-model="bm_Form.departmentSid"
:options="treedata"
:props="props"></el-cascader>
<el-button type="primary" size='mini' @click="toNav('deptManage')" style="margin-left: 10px;" circle
icon="el-icon-plus"></el-button>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveOrg('bm_Form')"> </el-button>
<el-button @click="bm_Dialog = false"> </el-button>
</div>
</el-dialog>
<!-- 编辑信息 -->
<el-dialog title="编辑用户信息" :visible.sync="editDialog" width="40%">
<table class="e-table" cellspacing="0">
<tr>
<td>姓名</td>
<td>
<el-input v-model="form.name" style="width:300px"></el-input>
</td>
</tr>
<tr>
<td>用户类型</td>
<td>
<el-select v-model="form.userTypeKey" @change="$forceUpdate()" style="width:300px">
<el-option v-for="(item, i) in userTypeData" :key="i" :label="item.name" :value="item.value">
</el-option>
</el-select>
</td>
</tr>
<tr>
<td>部门</td>
<td>
<el-select v-model="form.deptSid" placeholder="请选择" @change="$forceUpdate()" style="width:300px">
<el-option hidden :key="form.deptSid" :label="orgName" :value="form.deptSid"></el-option>
<el-tree :data="treedata" ref="Tree" show-checkbox accordion node-key="sid" :default-checked-keys="checkedId" :default-expand-all='true' :check-strictly='true' :props="defaultProps" @check-change="checkchange">
</el-tree>
</el-select>
</td>
</tr>
<tr>
<td>岗位</td>
<td>
<el-select v-model="form.postSid" @change="$forceUpdate()" style="width:300px">
<el-option v-for="(item, i) in postSidData" :key="i" :label="item.name" :value="item.sid"></el-option>
</el-select>
<!--<el-input v-model="form.postSid"></el-input>-->
</td>
</tr>
<tr>
<td>手机号码</td>
<td>
<el-input v-model="form.userName" style="width:300px"></el-input>
</td>
</tr>
<tr>
<td>手机验证码</td>
<td>
<el-input v-model="form.verificationCode" placeholder="请输入验证码" style="width:300px">
<el-button v-show="showCode" slot="append" @click.native="getIdentifying">获取验证码</el-button>
<el-button v-show="!showCode" slot="append">{{ phoneCodeCount }} s</el-button>
</el-input>
</td>
</tr>
</table>
<div style="margin-top: 20px; text-align: center;">
<el-button type="primary" @click="save()"> </el-button>
<el-button @click="editDialog = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
userList,
delUser,
initPwd,
setRole,
orgList,
postList,
saveOrgRole,
roleList,
setRoleEnable,
userUpdata
} from '@/api/system/userManage/index.js'
export default {
data() {
return {
editDialog: false,
form: {},
userTypeData: [{
value: '1',
name: '员工'
}, {
value: '2',
name: '客户'
}, {
value: '3',
name: '供应商'
}],
checkedId: [],
orgName: '',
defaultProps: {
children: 'children',
label: 'name'
},
showCode: true,
postSidData: [],
phoneCodeCount: '',
timer: null,
roleListAll: [],
search: {
name: '',
userName: '',
roleSid: ''
},
props: {
value: 'sid',
label: 'name',
children: 'orgDepartmentVoList'
},
treedata: null,
page: {
total: 0, //
current: 1, //
size: 10 //
},
userTable: [],
clientTable: [],
//
formLabelWidth: '100',
roleDialog: false,
roleList: [],
roleForm: {
roleSid: '',
userSid: ''
},
//
bm_Dialog: false,
postSid: '',
bm_Form: { departmentSid: '' },
bm_List: [],
rules: {
roleSid: [{ required: true, message: '请选择角色名称', trigger: 'blur' }],
departmentSid: [{ required: true, message: '请选择部门名称', trigger: 'blur' }]
}
}
},
props: ['dataObj'],
watch: {
dataObj: {
handler(val) {
this.getOrgUserList()
},
deep: true
}
},
mounted() {
this.getOrgUserList()
this.getRoleList()
this.getOrgTree()
this.getOrgList()
},
methods: {
// +
getOrgUserList(flag) {
if (flag === '1') {
this.page.current = 1
}
let params = this.page
params.params = this.search
userList(params).then(res => {
this.page.total = res.data.total
this.userTable = res.data.records
})
},
getRoleList() {
var param = {}
roleList(param).then(res => {
if (res.code === '200') {
this.roleListAll = res.data
}
})
},
//
pagination(val) {
this.page.current = val.pageNum
this.page.size = val.pageSize
this.getOrgUserList()
},
getOrgTree() { //
function treeArr(data) {
if (data.length > 0) {
for (var i = 0; i < data.length; i++) {
if (data[i].orgDepartmentVoList.length > 0) {
treeArr(data[i].orgDepartmentVoList)
} else {
delete data[i].orgDepartmentVoList
}
}
}
}
// getOrgTree({organizationSid: this.$store.getters.userInfo.orgSid}).then(res => {
// let tree = res.data[0].orgDepartmentVoList
// treeArr(tree)
// this.treedata = tree
// })
},
// ID
setRole(row) {
this.roleForm.roleSid = []
this.roleDialog = true
this.roleForm.sid = row.sid
this.roleForm.userSid = row.sid
setRole(this.roleForm).then(res => {
this.roleList = res.data
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].checked === '0') {
this.roleForm.roleSid.push(res.data[i].sid)
}
}
// this.roleForm.roleSid = res.data.filter(item=> item.checked =='0')
})
},
//
saveRole(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.roleForm.roleSid = this.roleForm.roleSid.toString()
saveOrgRole(this.roleForm).then(res => {
if (res.code === '200') {
this.roleDialog = false
this.getOrgUserList()
this.$message({
message: res.msg,
type: 'success'
})
}
})
} else {
return false
}
})
},
//
saveOrg(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let params = { //
departmentSid: this.bm_Form.departmentSid[this.bm_Form.departmentSid.length - 1],
staffSid: this.bm_Form.staffSid
}
saveDepartment(params).then(res => {
if (res.code === '200') {
this.getOrgUserList()
this.bm_Dialog = false
this.$message({
message: res.msg,
type: 'success'
})
}
})
} else {
return false
}
});
},
//
save(formName) {
this.form.userType = this.form.userTypeKey;
userUpdata(this.form).then(res => {
if (res.code === '200') {
this.getOrgUserList()
this.bm_Dialog = false
this.$message({
message: res.msg,
type: 'success'
})
this.editDialog = false
}
this.reset()
})
},
initPwd(row) {
this.$confirm('此操作将初始化该用户密码, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
initPwd({sid: row.sid}).then(res => {
this.$message({
type: 'success',
message: res.msg
})
})
})
},
//
userinfoChange(row) {
var postSid = row.postSid
this.editDialog = true
this.form = Object.assign({}, row)
this.postSid = postSid
this.$nextTick(() => {
this.$refs.Tree.setChecked(this.form.departmentSid, true, true)
})
// this.$emit('status',true)
// this.$emit('item',row)
},
//
del(row) {
this.$confirm('此操作将删除该用户, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delUser({ sid: row.sid }).then(res => {
this.$message({
type: 'success',
message: res.msg
});
this.getOrgUserList()
})
})
},
toNav(src) {
this.$router.push('/' + src)
},
//
getOrgList(row) {
// this.roleDialog = true
this.checkedId = []
this.Thisrow = row
this.loading = true
let params = {}
orgList(params).then(res => {
this.treedata = res.data
})
},
checkchange(data, checked, indeterminate) {
if (checked) {
this.form.deptSid = data.sid
this.orgName = data.name
let arr = []
arr = [data.sid]
this.$refs.Tree.setCheckedKeys(arr)
this.form.postSid = ''
this.getPost(data.sid)
return
}
},
getPost(orgSid) {
let params = {
sid: orgSid
}
postList(params).then(res => {
this.postSidData = res.data
})
this.form.postSid = this.postSid
},
reset() {
this.form = {}
},
enabledChange(value, row) {
setRoleEnable({
sid: row.sid,
isEnable: value
}).then(res => {
this.$message({
type: 'success',
message: res.msg
});
})
}
}
}
</script>
<style scoped="scoped">
.el-select > .el-input {
display: block;
width: 300px;
}
</style>
Loading…
Cancel
Save