修改
This commit is contained in:
parent
fb1d79d026
commit
a9c620e3ec
@ -384,6 +384,7 @@
|
|||||||
multiple
|
multiple
|
||||||
placeholder="请选择角色"
|
placeholder="请选择角色"
|
||||||
@change="changeroleIds"
|
@change="changeroleIds"
|
||||||
|
@remove-tag="remove"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in roleOptions"
|
v-for="item in roleOptions"
|
||||||
@ -398,12 +399,45 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<kindergarlog
|
<kindergarlog
|
||||||
v-if="kinshow"
|
v-if="kinshow"
|
||||||
|
:nameicon="true"
|
||||||
:iddnamelist="form"
|
:iddnamelist="form"
|
||||||
@kinbatlist="kinbatlist"
|
@kinbatlist="kinbatlist"
|
||||||
style="width: 500px; display: inline;"
|
style="width: 500px; display: inline"
|
||||||
ref="kinresets"
|
ref="kinresets"
|
||||||
></kindergarlog>
|
></kindergarlog>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="所属班级" prop="classInfoList" class="is-required" v-if="statusitem">
|
||||||
|
<el-button
|
||||||
|
@click="innerVisibleclick"
|
||||||
|
style="
|
||||||
|
width: 220px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
"
|
||||||
|
v-if="classinfoName.length == 0"
|
||||||
|
>请选择所属班级</el-button>
|
||||||
|
<el-tag
|
||||||
|
v-for="(tag, index) in classinfoName"
|
||||||
|
v-else
|
||||||
|
:key="index"
|
||||||
|
closable
|
||||||
|
type
|
||||||
|
:disable-transitions="true"
|
||||||
|
@close="handleClose(tag, index)"
|
||||||
|
style="margin-right: 10px"
|
||||||
|
>{{ tag.className }}</el-tag>
|
||||||
|
<el-tag
|
||||||
|
v-if="classinfoName.length != 0"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
:disable-transitions="true"
|
||||||
|
@click="innerVisibletrue2"
|
||||||
|
style="float: right; margin-top: 4px"
|
||||||
|
>选择所属班级</el-tag>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@ -418,7 +452,98 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- //班级 -->
|
||||||
|
<el-dialog
|
||||||
|
width="1000px"
|
||||||
|
title="选择所属班级"
|
||||||
|
:visible.sync="innerVisible"
|
||||||
|
append-to-body
|
||||||
|
:before-close="cancel3"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:model="classinfoList2"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="90px"
|
||||||
|
>
|
||||||
|
<el-form-item label="班级名称" prop="className">
|
||||||
|
<el-input
|
||||||
|
style="width: 150px"
|
||||||
|
v-model="classinfoList2.className"
|
||||||
|
placeholder="请输入班级名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery2"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="班级类型" prop="classType">
|
||||||
|
<el-select v-model="classinfoList2.classType" placeholder="请选择" style="width: 150px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.classType"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="班主任姓名" prop="classTeacher">
|
||||||
|
<el-input
|
||||||
|
v-model="classinfoList2.classTeacher"
|
||||||
|
placeholder="请输入班主任姓名"
|
||||||
|
style="width: 150px"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery2"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery2">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery3">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="classinfoList"
|
||||||
|
align="center"
|
||||||
|
style="margin-top: 10px"
|
||||||
|
@cell-dblclick="classinfoclick"
|
||||||
|
>
|
||||||
|
<el-table-column label="请选择" width="70" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
:type="containsclass(scope.row.id) ? 'primary' : ''"
|
||||||
|
style="width: 20px; height: 20px"
|
||||||
|
circle
|
||||||
|
@click="classinfoclick(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="kindergartenName" label="幼儿园名称" width="190" align="center" />
|
||||||
|
<el-table-column property="className" label="班级名称" width="180" align="center"></el-table-column>
|
||||||
|
<el-table-column property="classType" label="班级类型" width="160" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.classType == dictValue1 ? "大班" : "" }}
|
||||||
|
{{ scope.row.classType == dictValue2 ? "中班" : "" }}
|
||||||
|
{{ scope.row.classType == dictValue3 ? "小班" : "" }}
|
||||||
|
{{ scope.row.classType == dictValue4 ? "毕业" : "" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column property="classTeacher" label="班主任姓名" width="180" align="center"></el-table-column>
|
||||||
|
<el-table-column property="phone" label="联系电话" width="190" align="center"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total2 > 0"
|
||||||
|
:total="total2"
|
||||||
|
:page.sync="classinfoList2.pageNum"
|
||||||
|
:limit.sync="classinfoList2.pageSize"
|
||||||
|
@pagination="getclassinfo"
|
||||||
|
/>
|
||||||
|
<div slot="footer" class="dialog-footer" style="height: 50px;">
|
||||||
|
<el-button type="primary" @click="cancel3" style="float: left;">选择完成</el-button>
|
||||||
|
<el-button @click="innerVisiblecancel" style="float: left;">取消选择</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
<!-- 用户导入对话框 -->
|
<!-- 用户导入对话框 -->
|
||||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||||
<el-upload
|
<el-upload
|
||||||
@ -462,6 +587,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { listArea } from "@/api/system/area.js";
|
import { listArea } from "@/api/system/area.js";
|
||||||
import kindergarlog from "../../assembly/kindergarlog.vue";
|
import kindergarlog from "../../assembly/kindergarlog.vue";
|
||||||
|
import { listClassinfo } from "@/api/system/classinfo";
|
||||||
|
import { getClassInfo } from "@/api/system/teacherInfo";
|
||||||
import {
|
import {
|
||||||
listUser,
|
listUser,
|
||||||
getUser,
|
getUser,
|
||||||
@ -485,6 +612,40 @@ export default {
|
|||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
|
dictValue1: "",
|
||||||
|
dictValue2: "",
|
||||||
|
dictValue3: "",
|
||||||
|
dictValue4: "",
|
||||||
|
classinfoList: [],
|
||||||
|
total2: 0,
|
||||||
|
innerVisible: false,
|
||||||
|
formkindergartenId: "",
|
||||||
|
classinfoList2: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
kindergartenId: null,
|
||||||
|
className: null,
|
||||||
|
classType: null
|
||||||
|
},
|
||||||
|
classinfoName: [],
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
classType: "",
|
||||||
|
label: "大班"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
classType: "",
|
||||||
|
label: "中班"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
classType: "",
|
||||||
|
label: "小班"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
classType: "",
|
||||||
|
label: "毕业"
|
||||||
|
}
|
||||||
|
],
|
||||||
//用户类型
|
//用户类型
|
||||||
memberGrades: [
|
memberGrades: [
|
||||||
{ memberGrade: "COMMON", name: "普通" },
|
{ memberGrade: "COMMON", name: "普通" },
|
||||||
@ -521,7 +682,10 @@ export default {
|
|||||||
//区域
|
//区域
|
||||||
areaList: [],
|
areaList: [],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
classInfoList: [],
|
||||||
|
kindergartenId: null
|
||||||
|
},
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: "children",
|
children: "children",
|
||||||
label: "label"
|
label: "label"
|
||||||
@ -547,6 +711,8 @@ export default {
|
|||||||
name: "",
|
name: "",
|
||||||
code: ""
|
code: ""
|
||||||
},
|
},
|
||||||
|
ClassType: "class_type",
|
||||||
|
statusitem: false,
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@ -579,6 +745,9 @@ export default {
|
|||||||
trigger: "blur"
|
trigger: "blur"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
classInfoList: [
|
||||||
|
{ required: true, message: "所属班级不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
nickName: [
|
nickName: [
|
||||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
|
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
@ -615,7 +784,16 @@ export default {
|
|||||||
this.$refs.tree.filter(val);
|
this.$refs.tree.filter(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
//传入的id 等于这个数组的id 的情况下为true 为蓝色按钮
|
||||||
|
containsclass() {
|
||||||
|
return function(id) {
|
||||||
|
return this.form.classInfoList.find(e => e == id);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.info();
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
this.usermemberGrade();
|
this.usermemberGrade();
|
||||||
@ -625,8 +803,148 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
innerVisibletrue2() {
|
||||||
|
if (this.form.kindergartenId == "" || !this.form.kindergartenId) {
|
||||||
|
this.$message.error("请先选择幼儿园");
|
||||||
|
} else {
|
||||||
|
this.classinfoList2.kindergartenId = this.form.kindergartenId;
|
||||||
|
this.innerVisible = true;
|
||||||
|
this.getclassinfo();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//移除tage
|
||||||
|
handleClose(tag, index) {
|
||||||
|
this.form.classInfoList.splice(index, 1);
|
||||||
|
this.classinfoName.splice(index, 1);
|
||||||
|
},
|
||||||
|
resetQuery3() {
|
||||||
|
this.classinfoList2 = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
kindergartenId: this.form.kindergartenId,
|
||||||
|
className: null,
|
||||||
|
classType: null,
|
||||||
|
classTeacher: null
|
||||||
|
};
|
||||||
|
this.handleQuery2();
|
||||||
|
},
|
||||||
|
handleQuery2() {
|
||||||
|
listClassinfo(this.classinfoList2).then(response => {
|
||||||
|
this.classinfoList = response.rows;
|
||||||
|
this.total2 = response.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
innerVisiblecancel() {
|
||||||
|
this.innerVisible = false;
|
||||||
|
this.classinfoName = [];
|
||||||
|
},
|
||||||
|
cancel3() {
|
||||||
|
// if (Array.isArray(this.classinfoName)) {
|
||||||
|
// this.classinfoName = this.classinfoName.join(",");
|
||||||
|
// } else {
|
||||||
|
// }
|
||||||
|
this.innerVisible = false;
|
||||||
|
this.innerVisible2 = false;
|
||||||
|
this.classinfoList2 = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
kindergartenId: null,
|
||||||
|
className: null,
|
||||||
|
classType: null
|
||||||
|
};
|
||||||
|
// this.classinfoName = "请选择所属班级";
|
||||||
|
// this.classinfoid = "";
|
||||||
|
// if (this.classinfoName > 1) {
|
||||||
|
|
||||||
|
// } else if (this.classinfoName.length == 1) {
|
||||||
|
// this.classinfoName = JSON.parse(this.classinfoName);
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
innerVisibleclick() {
|
||||||
|
if (
|
||||||
|
this.form.kindergartenId == "" ||
|
||||||
|
!this.form.kindergartenId ||
|
||||||
|
this.form.kindergartenId == null
|
||||||
|
) {
|
||||||
|
this.$message.error("请先选择幼儿园");
|
||||||
|
} else {
|
||||||
|
this.classinfoList2.kindergartenId = this.form.kindergartenId;
|
||||||
|
this.innerVisible = true;
|
||||||
|
this.getclassinfo();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
info() {
|
||||||
|
tKindergartenInfo(this.ClassType).then(res => {
|
||||||
|
this.options[0].classType = res.data[0].dictValue;
|
||||||
|
this.options[1].classType = res.data[1].dictValue;
|
||||||
|
this.options[2].classType = res.data[2].dictValue;
|
||||||
|
this.options[3].classType = res.data[3].dictValue;
|
||||||
|
this.dictValue1 = res.data[0].dictValue;
|
||||||
|
this.dictValue2 = res.data[1].dictValue;
|
||||||
|
this.dictValue3 = res.data[2].dictValue;
|
||||||
|
this.dictValue4 = res.data[3].dictValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
classinfoclick2(item) {},
|
||||||
|
classinfoclick(item) {
|
||||||
|
if (this.form.classInfoList.findIndex(e => e == item.id) != -1) {
|
||||||
|
this.form.classInfoList = this.form.classInfoList.filter(
|
||||||
|
e => e != item.id
|
||||||
|
);
|
||||||
|
this.classinfoName = this.classinfoName.filter(e => e.id != item.id);
|
||||||
|
} else {
|
||||||
|
this.form.classInfoList.push(item.id);
|
||||||
|
if (Array.isArray(this.classinfoName)) {
|
||||||
|
this.classinfoName.push(item);
|
||||||
|
} else {
|
||||||
|
this.classinfoName = this.classinfoName.split(",");
|
||||||
|
this.classinfoName.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//选择班级
|
||||||
|
getclassinfo() {
|
||||||
|
listClassinfo(this.classinfoList2).then(response => {
|
||||||
|
this.classinfoList = response.rows;
|
||||||
|
this.total2 = response.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
changeroleIds(row) {
|
changeroleIds(row) {
|
||||||
this.kinshow = false;
|
var b = row.map(String);
|
||||||
|
if (b.length > 0) {
|
||||||
|
if (b.includes("6") == true) {
|
||||||
|
this.statusitem = true;
|
||||||
|
if (this.formkindergartenId) {
|
||||||
|
this.form.kindergartenId = this.formkindergartenId;
|
||||||
|
}
|
||||||
|
this.kinshow = true;
|
||||||
|
} else if (b.includes("10") == true) {
|
||||||
|
this.form.classInfoList = null;
|
||||||
|
// this.form.kindergartenId = null;
|
||||||
|
this.classinfoName = [];
|
||||||
|
this.form.kindergartenId;
|
||||||
|
this.kinshow = true;
|
||||||
|
this.statusitem = false;
|
||||||
|
} else if (b.includes("5") == true) {
|
||||||
|
this.form.classInfoList = null;
|
||||||
|
// this.form.kindergartenId = null;
|
||||||
|
this.classinfoName = [];
|
||||||
|
this.kinshow = true;
|
||||||
|
this.statusitem = false;
|
||||||
|
} else {
|
||||||
|
this.statusitem = false;
|
||||||
|
this.kinshow = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.kinshow = false;
|
||||||
|
this.statusitem = false;
|
||||||
|
this.form.classInfoList = null;
|
||||||
|
this.form.kindergartenId = null;
|
||||||
|
this.classinfoName = [];
|
||||||
|
}
|
||||||
|
// this.kinshow = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
this.roleOptions.forEach(el => {
|
this.roleOptions.forEach(el => {
|
||||||
if (el.roleKey == "enchou") {
|
if (el.roleKey == "enchou") {
|
||||||
@ -636,15 +954,32 @@ export default {
|
|||||||
row.forEach(e => {
|
row.forEach(e => {
|
||||||
if (e == obj.roleId) {
|
if (e == obj.roleId) {
|
||||||
this.kinshow = true;
|
this.kinshow = true;
|
||||||
this.form.kindergartenId = "";
|
// this.form.kindergartenId = "";
|
||||||
this.form.kindergartenName = "请选择幼儿园";
|
// this.form.kindergartenName = "请选择幼儿园";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
remove(e) {
|
||||||
|
// if (e) {
|
||||||
|
// if (e == 6) {
|
||||||
|
// this.form.classInfoList = null;
|
||||||
|
// // this.form.kindergartenId = null;
|
||||||
|
// this.classinfoName = [];
|
||||||
|
// }
|
||||||
|
// else if (e == 5 || e == 10) {
|
||||||
|
// // this.classinfoName= [];
|
||||||
|
// // this.form.classInfoList=null;
|
||||||
|
// // this.form.kindergartenId = null;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
//幼儿园传值
|
//幼儿园传值
|
||||||
kinbatlist(e) {
|
kinbatlist(id, name) {
|
||||||
this.kindergartenId = e;
|
this.$set(this.form, "kindergartenId", id);
|
||||||
this.form.kindergartenId = e;
|
this.$set(this.form, "kindergartenName", name);
|
||||||
|
this.classinfoName = [];
|
||||||
|
this.form.classInfoList = [];
|
||||||
|
this.form.classinfoName = [];
|
||||||
},
|
},
|
||||||
//字典用户类型
|
//字典用户类型
|
||||||
usermemberGrade() {
|
usermemberGrade() {
|
||||||
@ -721,7 +1056,7 @@ export default {
|
|||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
kindergartenId: undefined,
|
kindergartenId: null,
|
||||||
userId: undefined,
|
userId: undefined,
|
||||||
areaId: undefined,
|
areaId: undefined,
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
@ -735,7 +1070,8 @@ export default {
|
|||||||
status: "0",
|
status: "0",
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
postIds: [],
|
postIds: [],
|
||||||
roleIds: []
|
roleIds: [],
|
||||||
|
classInfoList: []
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -772,6 +1108,7 @@ export default {
|
|||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.kinshow = false;
|
this.kinshow = false;
|
||||||
|
this.statusitem = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
getUser().then(response => {
|
getUser().then(response => {
|
||||||
@ -785,15 +1122,42 @@ export default {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.kinshow = false;
|
this.kinshow = false;
|
||||||
|
this.classinfoName = [];
|
||||||
this.reset();
|
this.reset();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
const userId = row.userId || this.ids;
|
const userId = row.userId || this.ids;
|
||||||
getUser(userId).then(response => {
|
getUser(userId).then(response => {
|
||||||
|
response.data.classinfoName = response.data.classInfoList;
|
||||||
|
response.data.classInfoList
|
||||||
|
? (response.data.classInfoList = response.data.classInfoList.map(
|
||||||
|
e => e.id
|
||||||
|
))
|
||||||
|
: (response.data.classInfoList = []);
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
if (response.data.kindergartenId) {
|
||||||
|
this.formkindergartenId = response.data.kindergartenId;
|
||||||
|
}
|
||||||
this.postOptions = response.posts;
|
this.postOptions = response.posts;
|
||||||
this.roleOptions = response.roles;
|
this.roleOptions = response.roles;
|
||||||
this.form.postIds = response.postIds;
|
this.form.postIds = response.postIds;
|
||||||
this.form.roleIds = response.roleIds;
|
this.form.roleIds = response.roleIds;
|
||||||
|
var b = this.form.roleIds.map(String);
|
||||||
|
response.data.classinfoName
|
||||||
|
? (this.classinfoName = response.data.classinfoName)
|
||||||
|
: (this.classinfoName = []);
|
||||||
|
if (b.includes("6") == true) {
|
||||||
|
this.statusitem = true;
|
||||||
|
this.kinshow = true;
|
||||||
|
} else if (b.includes("10") == true) {
|
||||||
|
this.kinshow = true;
|
||||||
|
this.statusitem = false;
|
||||||
|
} else if (b.includes("5") == true) {
|
||||||
|
this.kinshow = true;
|
||||||
|
this.statusitem = false;
|
||||||
|
} else {
|
||||||
|
this.statusitem = false;
|
||||||
|
this.kinshow = false;
|
||||||
|
}
|
||||||
this.title = "修改用户";
|
this.title = "修改用户";
|
||||||
this.form.password = "";
|
this.form.password = "";
|
||||||
var obj = {};
|
var obj = {};
|
||||||
@ -812,6 +1176,18 @@ export default {
|
|||||||
}
|
}
|
||||||
this.open = true;
|
this.open = true;
|
||||||
});
|
});
|
||||||
|
// .then((el) => {
|
||||||
|
// this.getclassinfo();
|
||||||
|
// })
|
||||||
|
// .then((val) => {
|
||||||
|
// getClassInfo({
|
||||||
|
// id: row.id,
|
||||||
|
// }).then((res) => {
|
||||||
|
// this.form.classInfoList = res.data.map((e) => e.id);
|
||||||
|
// this.form.classInfoList.join(",");
|
||||||
|
// res.data.map((e) => this.classinfoName.push(e));
|
||||||
|
// });
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
/** 重置密码按钮操作 */
|
/** 重置密码按钮操作 */
|
||||||
handleResetPwd(row) {
|
handleResetPwd(row) {
|
||||||
@ -824,7 +1200,9 @@ export default {
|
|||||||
})
|
})
|
||||||
.then(({ value }) => {
|
.then(({ value }) => {
|
||||||
resetUserPwd(row.userId, value).then(response => {
|
resetUserPwd(row.userId, value).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
@ -836,19 +1214,24 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
|
var b = this.form.roleIds.map(String);
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.userId != undefined) {
|
if (this.form.userId != undefined) {
|
||||||
updateUser(this.form).then(response => {
|
updateUser(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
if (response.code == 200) {
|
||||||
this.open = false;
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.getList();
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addUser(this.form).then(response => {
|
addUser(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
if (response.code == 200) {
|
||||||
this.open = false;
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.getList();
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user