|
@@ -271,7 +271,7 @@
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
import disclaimer from "./disclaimer.vue";
|
|
import disclaimer from "./disclaimer.vue";
|
|
|
import { getToken } from "@/utils/auth";
|
|
import { getToken } from "@/utils/auth";
|
|
|
-import { getDeptTree, getProjectGroupList, getDictDataByType } from "@/api/dict";
|
|
|
|
|
|
|
+import { getDeptTree, getProjectGroupList, getDictDataByType, getProjectGroupByUser } from "@/api/dict";
|
|
|
import { getUserList } from "@/api/instr";
|
|
import { getUserList } from "@/api/instr";
|
|
|
import { create } from "@/api/platform"
|
|
import { create } from "@/api/platform"
|
|
|
import to from "await-to-js";
|
|
import to from "await-to-js";
|
|
@@ -366,7 +366,6 @@ export default {
|
|
|
if (!token) {
|
|
if (!token) {
|
|
|
return this.$router.push("/login?redirect=/technical-plat/index");
|
|
return this.$router.push("/login?redirect=/technical-plat/index");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
this.form = {
|
|
this.form = {
|
|
|
id: 0,
|
|
id: 0,
|
|
|
memberId: 0,
|
|
memberId: 0,
|
|
@@ -417,7 +416,7 @@ export default {
|
|
|
const nodes = this.$refs.mentorDept.getCheckedNodes();
|
|
const nodes = this.$refs.mentorDept.getCheckedNodes();
|
|
|
this.form.mentorDeptName = nodes[0].label;
|
|
this.form.mentorDeptName = nodes[0].label;
|
|
|
},
|
|
},
|
|
|
- memberChange(user) {
|
|
|
|
|
|
|
+ async memberChange(user) {
|
|
|
this.form.memberId = user.id || null;
|
|
this.form.memberId = user.id || null;
|
|
|
this.form.memberName = user.nickName || null;
|
|
this.form.memberName = user.nickName || null;
|
|
|
this.form.memberPhone = user.phone || '';
|
|
this.form.memberPhone = user.phone || '';
|
|
@@ -427,6 +426,13 @@ export default {
|
|
|
this.form.deptId = user.deptId || null;
|
|
this.form.deptId = user.deptId || null;
|
|
|
this.form.deptName = user.deptName || '';
|
|
this.form.deptName = user.deptName || '';
|
|
|
this.form.memberType = user.userType || '';
|
|
this.form.memberType = user.userType || '';
|
|
|
|
|
+ if (this.form.memberId) {
|
|
|
|
|
+ const [err, res] = await to(getProjectGroupByUser({ id: this.form.memberId }))
|
|
|
|
|
+ if (err) return
|
|
|
|
|
+ this.form.pgId = res.data.id || 0
|
|
|
|
|
+ this.form.pgName = res.data.pgName || 0
|
|
|
|
|
+ this.form.applyPg = res.data
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
mentorChange(user) {
|
|
mentorChange(user) {
|
|
|
this.form.mentorId = user.id || null;
|
|
this.form.mentorId = user.id || null;
|