|
@@ -1,12 +1,19 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class="visitBtnWrap">
|
|
|
- <auth auths='studentAttendance/findStudentAttendance'>
|
|
|
- <el-button type="text" @click="recordVisible = true">学员考勤</el-button>
|
|
|
+ <auth auths="studentAttendance/findStudentAttendance">
|
|
|
+ <el-button type="text" @click="recordVisible = true"
|
|
|
+ >学员考勤</el-button
|
|
|
+ >
|
|
|
+ </auth>
|
|
|
+ <auth
|
|
|
+ :auths="[
|
|
|
+ 'webCurseHomework/getStudentHomeWorks',
|
|
|
+ 'extracurricularExercisesReply/queryPageList',
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <el-button type="text" @click="workVisible = true">训练情况</el-button>
|
|
|
</auth>
|
|
|
- <auth :auths="['webCurseHomework/getStudentHomeWorks','extracurricularExercisesReply/queryPageList']">
|
|
|
- <el-button type="text" @click="workVisible=true">训练情况</el-button>
|
|
|
- </auth>
|
|
|
</div>
|
|
|
<el-form
|
|
|
:model="visitForm"
|
|
@@ -20,7 +27,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="回访类型" prop="visitType">
|
|
|
<el-cascader
|
|
|
- :disabled='isMainGo || !!useVisitType'
|
|
|
+ :disabled="isMainGo || !!useVisitType"
|
|
|
expand-trigger="hover"
|
|
|
clearable
|
|
|
style="width: 80% !important"
|
|
@@ -38,7 +45,7 @@
|
|
|
style="width: 80% !important"
|
|
|
placeholder="选择日期"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- :picker-options="pickerOptions"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="学员情况" prop="overview">
|
|
@@ -79,7 +86,7 @@
|
|
|
append-to-body
|
|
|
v-if="recordVisible"
|
|
|
>
|
|
|
- <record :studentId="this.detail.userId"/>
|
|
|
+ <record :studentId="this.detail.userId" />
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog
|
|
@@ -89,20 +96,20 @@
|
|
|
:visible.sync="workVisible"
|
|
|
append-to-body
|
|
|
>
|
|
|
- <studentWork :studentId="this.detail.userId"/>
|
|
|
+ <studentWork :studentId="this.detail.userId" />
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import cleanDeep from "clean-deep";
|
|
|
-import { visitChiose,visitChiose1 } from "@/utils/searchArray";
|
|
|
+import { visitChiose, visitChiose1 } from "@/utils/searchArray";
|
|
|
import { addVisit } from "@/views/returnVisitManager/api";
|
|
|
-import record from './record'
|
|
|
-import studentWork from './studentWork'
|
|
|
+import record from "./record";
|
|
|
+import studentWork from "./studentWork";
|
|
|
export default {
|
|
|
// useVisitType 自定义回访类型
|
|
|
- props: ["detail", "username",'isMainGo', "useVisitType"],
|
|
|
- components:{record,studentWork},
|
|
|
+ props: ["detail", "username", "isMainGo", "useVisitType"],
|
|
|
+ components: { record, studentWork },
|
|
|
data() {
|
|
|
return {
|
|
|
visitChiose,
|
|
@@ -123,9 +130,9 @@ export default {
|
|
|
visitTime: [{ required: true, message: "请输入回访时间" }],
|
|
|
visitType: [{ required: true, message: "请选择回访类型" }],
|
|
|
},
|
|
|
- recordVisible:false,
|
|
|
- workVisible:false,
|
|
|
- pickerOptions: {
|
|
|
+ recordVisible: false,
|
|
|
+ workVisible: false,
|
|
|
+ pickerOptions: {
|
|
|
firstDayOfWeek: 1,
|
|
|
disabledDate(time) {
|
|
|
return time.getTime() > new Date().getTime();
|
|
@@ -133,24 +140,30 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
- mounted(){
|
|
|
- if(this.isMainGo){
|
|
|
- this.visitChiose = visitChiose1
|
|
|
- this.$set(this.visitForm,'visitType',['常规回访','考勤申诉'])
|
|
|
- } else if(this.useVisitType) {
|
|
|
- this.visitChiose = visitChiose1
|
|
|
- this.$set(this.visitForm,'visitType', this.useVisitType)
|
|
|
- } else{
|
|
|
- this.visitChiose = visitChiose
|
|
|
+ mounted() {
|
|
|
+ if (this.isMainGo) {
|
|
|
+ this.visitChiose = visitChiose1;
|
|
|
+ this.$set(this.visitForm, "visitType", ["常规回访", "考勤申诉"]);
|
|
|
+ } else if (this.useVisitType) {
|
|
|
+ this.visitChiose = visitChiose1;
|
|
|
+ this.$set(this.visitForm, "visitType", this.useVisitType);
|
|
|
+ } else {
|
|
|
+ this.visitChiose = visitChiose;
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
userName() {
|
|
|
- return this.username || this.detail.user?.username || this.detail.realName || this.detail.userName || this.detail.studentName
|
|
|
+ return (
|
|
|
+ this.username ||
|
|
|
+ this.detail.user?.username ||
|
|
|
+ this.detail.realName ||
|
|
|
+ this.detail.userName ||
|
|
|
+ this.detail.studentName
|
|
|
+ );
|
|
|
+ },
|
|
|
+ studentId() {
|
|
|
+ return this.detail.userId || this.detail.studentId;
|
|
|
},
|
|
|
- studentId(){
|
|
|
- return this.detail.userId || this.detail.studentId
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
submitAddVisit() {
|