Commit 0646ef63 authored by 吴春's avatar 吴春

修改

parent f6da8301
......@@ -91,10 +91,14 @@
{{ item.CreateTime }}
</td>
<td>
{{item.StuProfession}}
<div class="text-blue cursor-pointer" @click="getStuBaseInfo(item)">
{{item.StuProfession}}
</div>
</td>
<td>
{{ item.StuPurposeName }}
<div class="text-blue cursor-pointer" @click="getStuBaseInfo(item)">
{{ item.StuPurposeName }}
</div>
</td>
<td>
<span v-html="getTeacherManager(item)"></span>
......@@ -158,14 +162,57 @@
<studentRight-form v-if="isShowStuRight" :BelongType="BelongType" :save-obj="stuOption" @close="closeStuForm"
@success="refreshTable">
</studentRight-form>
<studentFUForm v-if="isShowStuFU" :save-obj="stuOption" @close="closeStuForm">
</studentFUForm>
<q-dialog v-model="isShowStuBaseInfo">
<q-card style="width: 450px;">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">【{{customObj.StuName}}】</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section>
<q-separator />
<q-card-section>
<div style="width:100%;margin-bottom:15px;">
<div style="width:12%;display:inline-block;">职业:</div><div style="width:87%;display:inline-block;"><q-input filled v-model="customObj.StuProfession" dense ></q-input></div>
</div>
<div style="width:100%;margin-bottom:15px;">
<div style="width:12%;display:inline-block;">目的: </div><div style="width:87%;display:inline-block;"><q-select filled v-model="customObj.StuPurpose" dense :options="goalsList" option-label="Name"
option-value="Id" emit-value map-options /></div>
</div>
<div style="width:100%;margin-bottom:15px;">
<div style="width:12%;display:inline-block;vertical-align:top;">跟进:</div>
<div style="width:87%;display:inline-block;"> <UeEditor
v-model="customObj.Remark"
class="q-pb-sm"
:config="config"
></UeEditor></div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="clearMsg()" />
<q-btn color="accent" class="q-mr-md" label="确定" @click="saveStu()"
:loading="stuloading" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import studentRightForm from "./studentRight-form";
import studentFUForm from "./studentFu-form";
import {
getGuestLearningGoalsEnumList,
} from "../../../api/sale/sale";
import {
saveStudentBaseInfo, //保存学员信息
} from "../../../api/school/index";
import UeEditor from "../../editor/UeEditor";
export default {
props: {
//数据
......@@ -194,27 +241,50 @@
},
components: {
studentRightForm,
studentFUForm
studentFUForm,
UeEditor,
},
data() {
return {
isShowStuFU: false,
isShowStuRight: false,
isShowStuBaseInfo:false,
stuloading:false,
//学习目的列表
goalsList: [],
config: {
initialFrameWidth: null,
initialFrameHeight: 90
},
stuOption: {},
BelongType: 0,
ShowAuthObj: {
//是否显示同行、状态等信息
isShowSaleInfo: true,
},
//客户对象
customObj: {
StuId: 0,
StuProfession: "", //职业
StuPurpose: "", //学习目的
Remark:"",
StuName:"",
},
};
},
mounted() {
if (this.AuthObj) {
this.ShowAuthObj.isShowSaleInfo = this.AuthObj.isShowSaleInfo;
}
this.queryGoalsList();
},
methods: {
//获取学习目的列表
queryGoalsList() {
getGuestLearningGoalsEnumList({}).then(res => {
this.goalsList = res.Data;
});
},
//刷新表格
refreshTable() {
this.$emit("success");
......@@ -238,10 +308,62 @@
}
this.isShowStuRight = true;
},
//清除
clearMsg() {
this.customObj.Remark = "";
this.customObj.StuId = 0;
this.customObj.StuName = "";
this.customObj.Remark = "";
this.customObj.StuProfession = "";
this.customObj.StuPurpose = "";
this.stuloading = false;
this.isShowStuBaseInfo = false;
},
//保存学员信息
saveStu() {
if (this.customObj.Remark == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请输入内容!"
});
return;
}
this.stuloading=true;
saveStudentBaseInfo(this.customObj).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top"
});
this.$emit("update");
this.$emit("success");
this.$emit("getrecord");
this.stuloading=false;
this.isShowStuBaseInfo=false;
this.clearMsg();
}
});
},
//点击学生姓名弹出
getStuBaseInfo(obj) {
if (obj) {
this.customObj.StuId = obj.StuId;
this.customObj.StuName = obj.StuName;
this.customObj.StuProfession = obj.StuProfession;
this.customObj.StuPurpose = obj.StuPurpose;
}
this.stuloading=false;
this.isShowStuBaseInfo = true;
},
//关闭弹窗
closeStuForm() {
this.isShowStuRight = false;
this.isShowStuFU = false
this.isShowStuFU = false;
},
}
};
......
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