@@ -72,7 +67,6 @@ import Setting from "@/setting";
export default {
data: function() {
return {
- isHh: Setting.isHh,
activeName: "1",
loginForm: {
account: "",
@@ -111,7 +105,7 @@ export default {
},
methods: {
...mapActions("user", [
- "login"
+ "login", "setTitle", "setLogoUrl"
]),
getVerImg() { // 获取验证码图片
this.loginForm.random = Math.floor(Math.random() * 999999999);
diff --git a/src/pages/course/add/index.vue b/src/pages/course/add/index.vue
index 78bf7de..1d9e5ad 100644
--- a/src/pages/course/add/index.vue
+++ b/src/pages/course/add/index.vue
@@ -69,7 +69,6 @@ export default {
headers: {
token: util.local.get(Setting.tokenKey)
},
- schoolId: Setting.schoolId,
id: this.$route.query.id,
isDetail: Boolean(this.$route.query.show),
username: this.$store.state.name,
@@ -107,8 +106,6 @@ export default {
coverUrl: this.coverUrl,
description: this.description,
name: this.name,
-
- schoolId: this.schoolId,
founderId: this.userId,
founderName: this.username,
distinguish: 1
diff --git a/src/pages/course/list/courseManagement/index.vue b/src/pages/course/list/courseManagement/index.vue
index bc94fde..10b49d8 100644
--- a/src/pages/course/list/courseManagement/index.vue
+++ b/src/pages/course/list/courseManagement/index.vue
@@ -80,7 +80,6 @@ export default {
name: "courseManagement",
data() {
return {
- schoolId: this.$store.state.schoolId,
keyword: "",
classificationId: "",
courseData: [],
diff --git a/src/pages/match/add/index.vue b/src/pages/match/add/index.vue
index 12983bc..0119d8a 100644
--- a/src/pages/match/add/index.vue
+++ b/src/pages/match/add/index.vue
@@ -121,7 +121,6 @@ export default {
headers: {
token: util.local.get(Setting.tokenKey)
},
- schoolId: Setting.schoolId,
id: "",
coverUrl: "",
carouselUrl: "",
diff --git a/src/pages/system/list/staff.vue b/src/pages/system/list/staff.vue
index 0e59b78..7e295ac 100644
--- a/src/pages/system/list/staff.vue
+++ b/src/pages/system/list/staff.vue
@@ -198,9 +198,6 @@ export default {
uploadList: [], // 上传文件列表
uploadFaild: false, // 上传失败
- oneDepartmentIds: "",
- twoDepartmentIds: "",
-
gradeId: "", // 员工年级ID
staffArchitectureId: "", // 员工部门ID
};
@@ -221,6 +218,14 @@ export default {
this.getData();
},
methods: {
+ removeByValue(val) {
+ for (var i = 0; i < this.length; i++) {
+ if (JSON.stringify(this[i]).indexOf(JSON.stringify(val)) != -1) {
+ this.splice(i, 1);
+ break;
+ }
+ }
+ },
handleCheck(data) {
let oneDepartmentIds = [];
let twoDepartmentIds = [];
@@ -232,14 +237,14 @@ export default {
}
e.children.forEach(r => {
if (r.ischeck) {
- twoDepartmentIds.push(r.staffGradeId);
+ twoDepartmentIds.push(r.gradeId);
} else {
- this.removeByValue(twoDepartmentIds, r.staffGradeId);
+ this.removeByValue(twoDepartmentIds, r.gradeId);
}
});
});
- this.oneDepartmentIds = oneDepartmentIds.toString();
- this.twoDepartmentIds = twoDepartmentIds.toString();
+ this.staffArchitectureId = oneDepartmentIds.toString();
+ this.gradeId = twoDepartmentIds.toString();
this.initData();
},
fircheck(val, val2) {
@@ -251,7 +256,7 @@ export default {
val.ischeck = !val.ischeck;
val2.map(e => {
e.children.map(r => {
- if (r.staffGradeId == val.staffGradeId) {
+ if (r.gradeId == val.gradeId) {
if (e.children.every(i => i.ischeck)) {
e.ischeck = true;
} else {
@@ -325,7 +330,7 @@ export default {
},
resetPassword(row) { // 重置密码
this.$confirm(`重置后的密码为:${Setting.initialPassword},确定重置?`, "提示", { type: "warning" }).then(() => {
- this.$get(`${this.api.resetPassword}?userId=${row.accountId}&newPwd=111aaa`).then(res => {
+ this.$get(`${this.api.resetPassword}?userId=${row.userId}&newPwd=111aaa`).then(res => {
if (res.status === 200) {
util.successMsg("重置成功");
} else {
diff --git a/src/pages/system/list/staffSide.vue b/src/pages/system/list/staffSide.vue
index 5f1bb2c..69a6507 100644
--- a/src/pages/system/list/staffSide.vue
+++ b/src/pages/system/list/staffSide.vue
@@ -11,7 +11,7 @@
-
+