|
@@ -107,12 +107,27 @@
|
|
|
</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="学校选择" :label-width="formLabelWidth">
|
|
|
- <el-select v-model="sSchool" filterable clearable @clear="clearSchoolList" :allow-create="false"
|
|
|
- @focus="remoteMethodclick" remote placeholder="请输入学校" :remote-method="remoteMethod" :loading="loading"
|
|
|
- no-data-text="暂未查询到此学校">
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <el-select
|
|
|
+ v-model="sSchool"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ @clear="clearSchoolList"
|
|
|
+ :allow-create="false"
|
|
|
+ @focus="remoteMethodclick"
|
|
|
+ remote
|
|
|
+ placeholder="请输入学校"
|
|
|
+ :remote-method="remoteMethod"
|
|
|
+ :loading="loading"
|
|
|
+ no-data-text="暂未查询到此学校"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<div style="text-align: center; color: #adb3b7">
|
|
|
注:添加账号账号密码为123456
|
|
@@ -190,12 +205,12 @@ export default {
|
|
|
},
|
|
|
remoteMethodclick() {
|
|
|
if (!this.options.length) {
|
|
|
- var _option = []
|
|
|
+ var _option = [];
|
|
|
for (var i = 0; i < 10; i++) {
|
|
|
var _a = this.randomNum(0, 10);
|
|
|
- _option.push(this.list[_a])
|
|
|
+ _option.push(this.list[_a]);
|
|
|
}
|
|
|
- this.options = _option
|
|
|
+ this.options = _option;
|
|
|
}
|
|
|
},
|
|
|
remoteMethod(query) {
|
|
@@ -209,12 +224,12 @@ export default {
|
|
|
}, 200);
|
|
|
} else {
|
|
|
// this.options = [];
|
|
|
- var _option = []
|
|
|
+ var _option = [];
|
|
|
for (var i = 0; i < 10; i++) {
|
|
|
var _a = this.randomNum(0, 10);
|
|
|
- _option.push(this.list[_a])
|
|
|
+ _option.push(this.list[_a]);
|
|
|
}
|
|
|
- this.options = _option
|
|
|
+ this.options = _option;
|
|
|
}
|
|
|
},
|
|
|
handleClose(done) {
|
|
@@ -225,7 +240,7 @@ export default {
|
|
|
this.getAdmin();
|
|
|
},
|
|
|
clearSchoolList() {
|
|
|
- this.sSchool = ""
|
|
|
+ this.sSchool = "";
|
|
|
},
|
|
|
search() {
|
|
|
this.page = 1;
|
|
@@ -300,7 +315,7 @@ export default {
|
|
|
n: this.sName,
|
|
|
p: this.sPhone,
|
|
|
t: 6,
|
|
|
- s:this.sSchool,
|
|
|
+ s: this.sSchool,
|
|
|
uid: this.upId,
|
|
|
};
|
|
|
this.ajax
|
|
@@ -323,22 +338,30 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
deUser(id) {
|
|
|
- let params = {
|
|
|
- uid: id,
|
|
|
- };
|
|
|
- this.ajax
|
|
|
- .get(this.$store.state.api + "deleteReviewer", params)
|
|
|
- .then((res) => {
|
|
|
- this.$message({
|
|
|
- message: "删除成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.dialogVisible = false;
|
|
|
- this.getAdmin();
|
|
|
+ this.$confirm("确定删除该账号吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ let params = {
|
|
|
+ uid: id,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "deleteReviewer", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: "删除成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.getAdmin();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
getAdmin() {
|
|
|
let params = {
|
|
@@ -369,12 +392,12 @@ export default {
|
|
|
this.list = this.schoolList.map((item) => {
|
|
|
return { value: item.id, label: item.name };
|
|
|
});
|
|
|
- var _option = []
|
|
|
+ var _option = [];
|
|
|
for (var i = 0; i < 10; i++) {
|
|
|
var _a = this.randomNum(0, this.list.length);
|
|
|
- _option.push(this.list[_a])
|
|
|
+ _option.push(this.list[_a]);
|
|
|
}
|
|
|
- this.options = _option
|
|
|
+ this.options = _option;
|
|
|
this.isloading = false;
|
|
|
})
|
|
|
.catch((err) => {
|