Commit 8838d5e6 by 董有沛

漏洞修改

parent 0897f175
import {postAction,getAotion} from '@/api/manage'
import {postAction,downFilePost} from '@/api/manage'
const prefix = '/manager/ciop';
// 获取活动列表
......@@ -23,6 +23,12 @@ let getSchoolList = (params) => postAction(prefix + "/school/schoolManagement/sc
// 获取学子公司职位下级成员列表
let getXzUserList = (params) => postAction(prefix + "/school/partner/getXzUserList" , params);
// 获取角色清单
let getRoleList = (params) => postAction(prefix + "/school/partner/roleList" , params);
// 导出用户清单
let exportUserList = (params) => downFilePost(prefix + "/school/partner/exportUserList" , params);
export {
findByList,modify,getlistysm,addPartner,getSubstList,getSchoolList,getXzUserList
findByList,modify,getlistysm,addPartner,getSubstList,getSchoolList,getXzUserList,
getRoleList,exportUserList
}
......@@ -25,8 +25,7 @@
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="学校名称">
<a-select showSearch placeholder="请选择" v-model="queryParam.schoolName" :value="schoolSelect" :filterOption="filterOption"
:allowClear="allowStatus">
<a-select showSearch placeholder="请选择" v-model="queryParam.schoolName" >
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in schoolList" :key="data.school_name" :value="data.school_name">
</a-select-option>
......
......@@ -11,19 +11,79 @@
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item label="县分">
<a-input placeholder="县分" v-model="queryParam.substName"></a-input>
<a-form-item label="账号">
<a-input placeholder="账号" v-model="queryParam.account"></a-input>
</a-form-item>
</a-col>
<a-col :md="4" :sm="12">
<a-form-item label="学校">
<a-input placeholder="学校" v-model="queryParam.school"></a-input>
<a-col :md="5" :sm="16">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="县分">
<a-select placeholder="请选择" @change="changeSubst(3)" v-model="queryParam.substName" >
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in substList" :value="data">
{{ data}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="学校名称">
<a-select showSearch placeholder="请选择" v-model="queryParam.school" >
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in schoolListParam" :value="data.id">
{{data.school_name}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="5" :sm="16">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="角色">
<a-select placeholder="请选择" @change="changeSubst" v-model="queryParam.roleid" >
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="data in roleList" :value="data.id">
{{ data.name}}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="活跃状态">
<a-select showSearch placeholder="请选择" v-model="queryParam.isActive" >
<a-select-option key="">请选择</a-select-option>
<a-select-option key="1">活跃</a-select-option>
<a-select-option key="0">不活跃</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="状态">
<a-select showSearch placeholder="请选择" v-model="queryParam.status" >
<a-select-option key="">请选择</a-select-option>
<a-select-option key="1">启用</a-select-option>
<a-select-option key="2">冻结</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="12">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="身份上传状态">
<a-select showSearch placeholder="请选择" v-model="queryParam.isUpload" >
<a-select-option key="">请选择</a-select-option>
<a-select-option key="1">已上传</a-select-option>
<a-select-option key="0">未上传</a-select-option>
</a-select>
</a-form-item>
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-button @click="openAddUser()" style="margin-left: 8px" icon="plus" type="primary">新增</a-button>
<a-button @click="exportList()" style="margin-left: 8px" icon="export" type="primary">导出</a-button>
</a-col>
</span>
</a-row>
......@@ -35,6 +95,16 @@
<span v-if="text==1"></span>
<span v-else></span>
</template>
<template slot="statusRender" slot-scope="text">
<span v-if="text==1">启用</span>
<span v-if="text==2">冻结</span>
<span v-else></span>
</template>
<template slot="activeRender" slot-scope="text">
<span v-if="text==1">活跃</span>
<span v-if="text==2">不活跃</span>
<span v-else></span>
</template>
<template slot="operation" slot-scope="text,record">
<a @click="modifyfunction(record)">编辑</a>
</template>
......@@ -180,7 +250,7 @@
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="学子公司职位">
<a-select placeholder="请选择" v-model="modifyForm.position" @change="changePosition(2)">
<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>
......@@ -213,10 +283,11 @@
<script>
import STable from '@/components/table';
import {
findByList,modify,getlistysm,
addPartner,getSubstList,getSchoolList,getXzUserList
findByList,modify,getlistysm,getRoleList,
addPartner,getSubstList,getSchoolList,getXzUserList,
exportUserList
} from "@/api/school-center/PartnerManagementAPI"
import {cloneObject} from '@/utils/util'
import {cloneObject,exportFile} from '@/utils/util'
import treecheck from '@/components/sysmanage/treeCheck'
import treeList from '@/components/sysmanage/treeList'
import {
......@@ -247,8 +318,13 @@
addFormtable: this.$form.createForm(this, {name: 'addFormtable'}),
queryParam: {
name: '',
account: '',
roleid: '',
isUpload: '',
status: '',
isActive: '',
substName:'',
school:''
school:'',
},
addForm: {
account: '',
......@@ -268,6 +344,8 @@
},
leaderDisplay:'display:none',
modifyvisible:false,
allowStatus: true,
schoolSelect: '',
modifyForm: {
id:"",
phone: '',
......@@ -287,7 +365,10 @@
},
autoCompleteResult:[],
subNameList: [],
substList: [],
roleList: [],
schoolList:[],
schoolListParam: [],
xzUserList:[],
addSubName:'',
columns: [
......@@ -296,8 +377,11 @@
{dataIndex: 'school', width: 200, title: '学校 ', align: "center"},
{dataIndex: 'idCard', width: 200, title: '身份证 ', align: "center"},
{dataIndex: 'account', width: 200, title: '账号 ', align: "center"},
{dataIndex: 'sex', width: 100, title: '性别 ', align: "center",scopedSlots: {customRender: 'genderoperation'},},
{dataIndex: 'substName', width: 100, title: '县分 ', align: "center"},
{dataIndex: 'roleName', width: 200, title: '角色 ', align: "center"},
{dataIndex: 'status', width: 200, title: '状态', align: "center",scopedSlots: {customRender: 'statusRender'},},
{dataIndex: 'isActive', width: 200, title: '活跃状态', align: "center",scopedSlots: {customRender: 'activeRender'},},
{dataIndex: 'sex', width: 100, title: '性别 ', align: "center",scopedSlots: {customRender: 'genderoperation'},},
{
dataIndex: 'operation',
width: 100,
......@@ -315,11 +399,24 @@
//表示
let obj = cloneObject(this.queryParam)
this.substList = [];
this.subNameList = [];
// 获取县分下拉清单
getSubstList(Object.assign(params,obj)).then(res => {
if (res.state == 'success') {
res.data.forEach((key)=>{
this.subNameList.push(key.sub_name)
this.substList.push(key.sub_name)
})
}
})
// 获取角色下拉清单
this.roleList = [];
getRoleList().then(res => {
if (res.state == 'success') {
res.data.forEach((key)=>{
this.roleList.push(key)
})
}
})
......@@ -604,15 +701,25 @@
let schoolParams = {};
if(type == 1){
schoolParams.substName = this.addForm.subName;
this.schoolList = [];
}else if(type == 3){
schoolParams.substName = this.queryParam.substName;
this.schoolListParam = [];
}else{
schoolParams.substName = this.modifyForm.subName;
this.schoolList = [];
}
this.schoolList = [];
getSchoolList(schoolParams).then(res => {
if (res.state == 'success') {
res.data.forEach((key) => {
if(type == 3){
this.schoolListParam.push(key)
}else{
this.schoolList.push(key)
}
})
}
})
......@@ -674,7 +781,12 @@
this.modifyForm.parentId = '';
}
},
exportList() {
exportFile(exportUserList(this.queryParam),'用户清单.xlsx');
},
}
}
</script>
......
......@@ -23,7 +23,7 @@
</a-col>
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询1</a-button>
<a-button @click="search()" type="primary">查询</a-button>
<a-button @click="openAllocation()" style="margin-left: 8px" icon="plus" type="primary">新增</a-button>
</a-col>
</span>
......@@ -187,7 +187,7 @@
this.$refs.table.refresh({search: true})
},
openAllocation() {
this.titleName = "添加学校2323分配";
this.titleName = "添加学校分配";
this.modifyvisible = true;
},
//提交表单
......@@ -225,9 +225,10 @@
this.$message.success(res.data ? res.data : '删除成功!', 5);
this.search();
this.modifyvisible = false;
return null;
}
}else{
this.$message.error(res.data ? res.data : '删除失败!', 5);
}
})
},
changeSubst(){
......
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