Commit 21cf3f4d by 董有沛

用户修改

parent e86a6437
...@@ -26,9 +26,12 @@ let getXzUserList = (params) => postAction(prefix + "/school/partner/getXzUserLi ...@@ -26,9 +26,12 @@ let getXzUserList = (params) => postAction(prefix + "/school/partner/getXzUserLi
// 获取角色清单 // 获取角色清单
let getRoleList = (params) => postAction(prefix + "/school/partner/roleList" , params); let getRoleList = (params) => postAction(prefix + "/school/partner/roleList" , params);
// 删除用户
let deleteUser = (params) => postAction(prefix + "/school/partner/deleteUser" , params);
// 导出用户清单 // 导出用户清单
let exportUserList = (params) => downFilePost(prefix + "/school/partner/exportUserList" , params); let exportUserList = (params) => downFilePost(prefix + "/school/partner/exportUserList" , params);
export { export {
findByList,modify,getlistysm,addPartner,getSubstList,getSchoolList,getXzUserList, findByList,modify,getlistysm,addPartner,getSubstList,getSchoolList,getXzUserList,
getRoleList,exportUserList getRoleList,exportUserList,deleteUser
} }
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="12"> <a-col :md="4" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="活跃状态"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="活跃状态">
<a-select showSearch placeholder="请选择" v-model="queryParam.isActive" > <a-select showSearch placeholder="请选择" v-model="queryParam.isActive" >
<a-select-option key="">请选择</a-select-option> <a-select-option key="">请选择</a-select-option>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="12"> <a-col :md="4" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="状态"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="状态">
<a-select showSearch placeholder="请选择" v-model="queryParam.status" > <a-select showSearch placeholder="请选择" v-model="queryParam.status" >
<a-select-option key="">请选择</a-select-option> <a-select-option key="">请选择</a-select-option>
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="12"> <a-col :md="5" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="身份上传状态"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="身份上传状态">
<a-select showSearch placeholder="请选择" v-model="queryParam.isUpload" > <a-select showSearch placeholder="请选择" v-model="queryParam.isUpload" >
<a-select-option key="">请选择</a-select-option> <a-select-option key="">请选择</a-select-option>
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;"> <span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button> <a-button @click="search()" type="primary">查询</a-button>
...@@ -107,6 +108,11 @@ ...@@ -107,6 +108,11 @@
</template> </template>
<template slot="operation" slot-scope="text,record"> <template slot="operation" slot-scope="text,record">
<a @click="modifyfunction(record)">编辑</a> <a @click="modifyfunction(record)">编辑</a>
<a-divider type="vertical"/>
<a-popconfirm title="是否要删除此行?" @confirm="deleteUser(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
</template> </template>
</s-table> </s-table>
...@@ -124,7 +130,7 @@ ...@@ -124,7 +130,7 @@
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="身份证号" > <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="身份证号" >
<a-input placeholder="请输入身份证号" v-decorator="[ 'idCard', {rules: [{ required: true, message: '身份证号不能为空!' ,whitespace:true}]} ]"></a-input> <a-input placeholder="请输入身份证号" v-decorator="[ 'idCard', {rules: [{ required: true, message: '身份证号不能为空!' ,whitespace:true}]} ]"></a-input>
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="性别"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="性别">
...@@ -171,7 +177,7 @@ ...@@ -171,7 +177,7 @@
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="学子公司职位"> <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="学子公司职位">
<a-select placeholder="请选择" v-model="addForm.position" @change="changePosition(1)"> <a-select placeholder="请选择" v-model="addForm.position" @change="changePosition(1)">
<a-select-option key="">非学子公司成员</a-select-option> <a-select-option key="">非学子公司成员</a-select-option>
<a-select-option key="督导">督导</a-select-option> <a-select-option key="总经理">总经理</a-select-option>
<a-select-option key="楼长">楼长</a-select-option> <a-select-option key="楼长">楼长</a-select-option>
<a-select-option key="成员">成员</a-select-option> <a-select-option key="成员">成员</a-select-option>
</a-select> </a-select>
...@@ -186,6 +192,12 @@ ...@@ -186,6 +192,12 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 12, offset: 1}" label="通过预实名账号">
<a-radio-group v-decorator="['ysm']" >
<a-radio :value="data.id" v-for="data in autoCompleteResult">{{data.userName}}</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="角色" > <a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="角色" >
<!-- <a-input placeholder="请输入部门" v-model="modelData.content" @click="handelDepartment"></a-input> --> <!-- <a-input placeholder="请输入部门" v-model="modelData.content" @click="handelDepartment"></a-input> -->
<treecheck ref="tree1" @selectcheck="contentSelectCheck1" :treeCheckable="true" :createFun="userRoleTreeList"></treecheck> <treecheck ref="tree1" @selectcheck="contentSelectCheck1" :treeCheckable="true" :createFun="userRoleTreeList"></treecheck>
...@@ -285,23 +297,14 @@ ...@@ -285,23 +297,14 @@
import { import {
findByList,modify,getlistysm,getRoleList, findByList,modify,getlistysm,getRoleList,
addPartner,getSubstList,getSchoolList,getXzUserList, addPartner,getSubstList,getSchoolList,getXzUserList,
exportUserList exportUserList,deleteUser
} from "@/api/school-center/PartnerManagementAPI" } from "@/api/school-center/PartnerManagementAPI"
import {cloneObject,exportFile} from '@/utils/util' import {cloneObject,exportFile} from '@/utils/util'
import treecheck from '@/components/sysmanage/treeCheck' import treecheck from '@/components/sysmanage/treeCheck'
import treeList from '@/components/sysmanage/treeList' import treeList from '@/components/sysmanage/treeList'
import { import {
getList,
tabList, tabList,
getUserInfo,
deleteList,
resetPass,
getAddUser,
userRoleTreeList, userRoleTreeList,
getEditUser,
userFreeze,
userUnFreeze,
changeOtherPwd
} from '@/api/system'; } from '@/api/system';
export default { export default {
...@@ -341,6 +344,7 @@ ...@@ -341,6 +344,7 @@
position:'', position:'',
parentId:'', parentId:'',
parentIds:'', parentIds:'',
ysm:'',
}, },
leaderDisplay:'display:none', leaderDisplay:'display:none',
modifyvisible:false, modifyvisible:false,
...@@ -464,8 +468,8 @@ ...@@ -464,8 +468,8 @@
name: data.name, name: data.name,
account: data.account, account: data.account,
idCard: data.idCard, idCard: data.idCard,
sex: 2, sex: data.sex,
grade: '18级', grade: data.grade,
ysm: data.ysm, ysm: data.ysm,
}) })
...@@ -543,6 +547,7 @@ ...@@ -543,6 +547,7 @@
this.addForm.subName = ''; this.addForm.subName = '';
this.addForm.position = ''; this.addForm.position = '';
this.addForm.parentIds = ''; this.addForm.parentIds = '';
}, },
openAddUser() { openAddUser() {
this.titleName = "新增" this.titleName = "新增"
...@@ -564,9 +569,14 @@ ...@@ -564,9 +569,14 @@
this.addForm.subName = ''; this.addForm.subName = '';
this.addForm.position = ''; this.addForm.position = '';
this.addForm.parentIds = ''; this.addForm.parentIds = '';
getlistysm().then(res => {
if (res.state == "success") {
this.autoCompleteResult = res.data
}
})
}, },
createOk(){ createOk(){
this.addFormtable.validateFields(["account", 'phone', "name", "idCard", "sex", 'grade',"password",'schoolId','role','position','parentId'], {force: true}, (err, values)=>{ this.addFormtable.validateFields(["account", 'phone', "name", "idCard", "sex", 'grade',"password",'schoolId','role','position','parentId','ysm'], {force: true}, (err, values)=>{
if (!err){ if (!err){
this.addForm.account=values.account this.addForm.account=values.account
this.addForm.phone=values.phone this.addForm.phone=values.phone
...@@ -578,6 +588,7 @@ ...@@ -578,6 +588,7 @@
this.addForm.schoolId=values.schoolId this.addForm.schoolId=values.schoolId
this.addForm.postion=values.position this.addForm.postion=values.position
this.addForm.parentId=values.parentId this.addForm.parentId=values.parentId
this.addForm.ysm=values.ysm
this.addForm.substName="" this.addForm.substName=""
if(this.addForm.idCard.length != 18){ if(this.addForm.idCard.length != 18){
...@@ -615,13 +626,14 @@ ...@@ -615,13 +626,14 @@
} }
//修改数据 //修改数据
addPartner(this.addForm).then(res=>{ addPartner(this.addForm).then(res=>{
console.log(JSON.stringify(res));
if (res.state=="success") { if (res.state=="success") {
this.$message.success(res.data ? res.data : '修改成功!', 5); this.$message.success(res.data ? res.data : '修改成功!', 5);
this.search(); this.search();
this.addUser = false; this.addUser = false;
return null; return null;
} }
this.$message.error(res.data ? res.data : '修改失败!', 5); this.$message.error(res.msg ? res.msg : '修改失败!', 5);
}) })
} }
}) })
...@@ -748,10 +760,10 @@ ...@@ -748,10 +760,10 @@
} }
this.addForm.parentIds = ''; this.addForm.parentIds = '';
if(params.position != '' && params.position != '督导'){ if(params.position != '' && params.position != '总经理'){
this.leaderDisplay = ''; this.leaderDisplay = '';
if(params.position == '楼长'){ if(params.position == '楼长'){
params.position = '督导' params.position = '总经理'
}else{ }else{
params.position = '楼长' params.position = '楼长'
} }
...@@ -784,6 +796,17 @@ ...@@ -784,6 +796,17 @@
exportList() { exportList() {
exportFile(exportUserList(this.queryParam),'用户清单.xlsx'); exportFile(exportUserList(this.queryParam),'用户清单.xlsx');
}, },
deleteUser(id){
let params = {};
params.id = id;
deleteUser(params).then(res => {
if(res.state == 'success'){
this.$message.info("删除成功",2);
}else{
this.$message.info("删除失败",2);
}
})
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment