mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-20 00:06:47 +08:00
保存修改验证调整
This commit is contained in:
@@ -70,7 +70,7 @@
|
|||||||
<!-- 弹窗组件 -->
|
<!-- 弹窗组件 -->
|
||||||
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
|
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
|
||||||
width="60%" :title="teacherdialogtitle">
|
width="60%" :title="teacherdialogtitle">
|
||||||
<a-form :model="formParam" :rules="rules" layout="vertical">
|
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
|
||||||
<!-- 基本信息 -->
|
<!-- 基本信息 -->
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -268,6 +268,7 @@ export default {
|
|||||||
UploadOutlined,//图标--导出
|
UploadOutlined,//图标--导出
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const formRef = ref();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
currentPage1: 1,
|
currentPage1: 1,
|
||||||
@@ -467,28 +468,32 @@ export default {
|
|||||||
}
|
}
|
||||||
//保存
|
//保存
|
||||||
const createTeacherDialog = () => {
|
const createTeacherDialog = () => {
|
||||||
console.log(state.formParam);
|
formRef.value
|
||||||
rule()
|
.validate()
|
||||||
if( state.log = true){
|
.then(() => {
|
||||||
state.teacherdialog = true;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
if (state.vf == false) {
|
if (state.vf == false) {
|
||||||
updateOutTeacher(state.formParam).then(response => {
|
updateOutTeacher(state.formParam).then(response => {
|
||||||
message.success("修改成功");
|
message.success("修改成功");
|
||||||
|
state.teacherdialog = false;
|
||||||
|
cancel()
|
||||||
|
getTableDate();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
insertTeacherOutSide(state.formParam)
|
insertTeacherOutSide(state.formParam)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
|
state.teacherdialog = false;
|
||||||
|
cancel()
|
||||||
|
getTableDate();
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
state.teacherdialog = false;
|
.catch(() => {
|
||||||
getTableDate();
|
console.log('error', error);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
//删除弹窗
|
//删除弹窗
|
||||||
const deleteModal = (record) => {
|
const deleteModal = (record) => {
|
||||||
@@ -537,6 +542,7 @@ export default {
|
|||||||
//取消按钮 清空输入的数据
|
//取消按钮 清空输入的数据
|
||||||
const cancelTeacherDialog = () => {
|
const cancelTeacherDialog = () => {
|
||||||
if (state.teacherdialog = true) {
|
if (state.teacherdialog = true) {
|
||||||
|
formRef.value.resetFields();
|
||||||
state.teacherdialog = false
|
state.teacherdialog = false
|
||||||
cancel()
|
cancel()
|
||||||
}
|
}
|
||||||
@@ -627,6 +633,7 @@ export default {
|
|||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
rules,
|
rules,
|
||||||
rule,
|
rule,
|
||||||
|
formRef,
|
||||||
sendPhone,
|
sendPhone,
|
||||||
sendEmail,
|
sendEmail,
|
||||||
// managerChange,
|
// managerChange,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="select">
|
<a-form-item class="select">
|
||||||
<a-input v-model:value="searchParam.name" style="width: 260px; height: 40px; border-radius: 8px"
|
<a-input v-model:value="searchParam.name" style="width: 276px; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入课程名称进行搜索" allowClear showSearch>
|
placeholder="请输入课程名称进行搜索" allowClear showSearch>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -269,6 +269,7 @@
|
|||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import { reactive, toRefs, ref } from "vue";
|
import { reactive, toRefs, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
import { useStore } from "vuex";
|
||||||
import {
|
import {
|
||||||
RightOutlined,
|
RightOutlined,
|
||||||
UpOutlined,
|
UpOutlined,
|
||||||
@@ -281,7 +282,7 @@ import ProjectManager from "@/components/project/ProjectManagerNew";
|
|||||||
import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher";
|
import ProjectManagerOutTeacher from "@/components/project/ProjectManagerOutTeacher";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { updateInTeacher, getTeacherExpertise } from "../../api/Lecturer";
|
import { updateInTeacher, getTeacherExpertise } from "../../api/Lecturer";
|
||||||
import { getOuterTeacherCourseList, getAddress, updateInTeacherCourse, deleteInTeacherCourse, insertInTeacherCourse,getOuterTeacherCourseDetail } from "../../api/Teaching";
|
import { getTeacherCourseList, getAddress, updateInTeacherCourse, deleteInTeacherCourse, insertInTeacherCourse,getOuterTeacherCourseDetail } from "../../api/Teaching";
|
||||||
// import {getProjSt} from "../../api/indexProjStu";
|
// import {getProjSt} from "../../api/indexProjStu";
|
||||||
// import AddTeacher from "../../components/drawers/project/AddTeacher"
|
// import AddTeacher from "../../components/drawers/project/AddTeacher"
|
||||||
export default {
|
export default {
|
||||||
@@ -296,6 +297,7 @@ export default {
|
|||||||
ProjectManagerOutTeacher,
|
ProjectManagerOutTeacher,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const store = useStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
vf: false,
|
vf: false,
|
||||||
@@ -472,11 +474,11 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
key: "keywords",
|
key: "keywords",
|
||||||
align: "center",
|
align: "center",
|
||||||
customRender: ({ record,text }) =>
|
//customRender: ({ record,text }) =>
|
||||||
`${getSysTypeMap(record.sysType1, record.sysTypeId)?getSysTypeMap(record.sysType1) : ""}
|
//`${getSysTypeMap(record.sysType1, record.sysTypeId)?getSysTypeMap//(record.sysType1) : ""}
|
||||||
${getSysTypeMap(record.sysType2, record.sysTypeId)?'-'+getSysTypeMap(record.sysType2) : ""}
|
//${getSysTypeMap(record.sysType2, record.sysTypeId)?'-'+getSysTypeMap//(record.sysType2) : ""}
|
||||||
${getSysTypeMap(record.sysType3, record.sysTypeId)?'-'+getSysTypeMap(record.sysType3) : ""}
|
//${getSysTypeMap(record.sysType3, record.sysTypeId)?'-'+getSysTypeMap//(record.sysType3) : ""}
|
||||||
`
|
// `
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '授课时长(H) ',
|
title: '授课时长(H) ',
|
||||||
@@ -545,6 +547,12 @@ export default {
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
])
|
])
|
||||||
|
const getSysTypeMap = (code) => {
|
||||||
|
if(code=="")return
|
||||||
|
// console.log(store.state.sysTypeMap,'map集合');
|
||||||
|
return store.state.sysTypeMap.get(code)
|
||||||
|
}
|
||||||
|
// getSysTypeMap()
|
||||||
// 搜索
|
// 搜索
|
||||||
const searchSubmit = () => {
|
const searchSubmit = () => {
|
||||||
getTableDate();
|
getTableDate();
|
||||||
@@ -574,7 +582,7 @@ export default {
|
|||||||
let objA = { ...state.searchParam };
|
let objA = { ...state.searchParam };
|
||||||
objA.startDate = state.searchParam.startDate !== null ? dayjs(new Date(state.searchParam.startDate).getTime()).format("YYYY-MM-DD") : "",
|
objA.startDate = state.searchParam.startDate !== null ? dayjs(new Date(state.searchParam.startDate).getTime()).format("YYYY-MM-DD") : "",
|
||||||
objA.endDate = state.searchParam.endDate !== null ? dayjs(new Date(state.searchParam.endDate).getTime()).format("YYYY-MM-DD") : "",
|
objA.endDate = state.searchParam.endDate !== null ? dayjs(new Date(state.searchParam.endDate).getTime()).format("YYYY-MM-DD") : "",
|
||||||
getOuterTeacherCourseList(objA)
|
getTeacherCourseList(objA)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
tableData.value = res.data.data.records
|
tableData.value = res.data.data.records
|
||||||
state.tableDataTotal = Number(res.data.data.total);
|
state.tableDataTotal = Number(res.data.data.total);
|
||||||
@@ -582,7 +590,7 @@ export default {
|
|||||||
console.log("获取tableData", tableData);
|
console.log("获取tableData", tableData);
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
getTableDate();
|
getTableDate()
|
||||||
// // 翻页
|
// // 翻页
|
||||||
const changePagination = (page) => {
|
const changePagination = (page) => {
|
||||||
state.searchParam.pageNo = page;
|
state.searchParam.pageNo = page;
|
||||||
@@ -780,6 +788,7 @@ export default {
|
|||||||
// getStu
|
// getStu
|
||||||
AddressLista,
|
AddressLista,
|
||||||
TeacherSystem,
|
TeacherSystem,
|
||||||
|
// getSysTypeMap
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -102,15 +102,15 @@
|
|||||||
<div class="tableBox ">
|
<div class="tableBox ">
|
||||||
<div style="float: right;">
|
<div style="float: right;">
|
||||||
|
|
||||||
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false " :hideOnSinglePage="true"
|
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false"
|
||||||
:pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal" class="pagination"
|
:hideOnSinglePage="true" :pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal"
|
||||||
@change="changePagination" />
|
class="pagination" @change="changePagination" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 弹窗组件 -->
|
<!-- 弹窗组件 -->
|
||||||
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
|
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
|
||||||
width="60%" :title="teacherdialogtitle">
|
width="60%" :title="teacherdialogtitle">
|
||||||
<a-form :model="formParam" :rules="rules" layout="vertical">
|
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<span class="line"></span><span>基本信息</span>
|
<span class="line"></span><span>基本信息</span>
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>修改头像</template>
|
<template #title>修改头像</template>
|
||||||
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
|
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
|
||||||
:headers="headers" :before-upload="beforeUpload" >
|
:headers="headers" :before-upload="beforeUpload">
|
||||||
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" />
|
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" />
|
||||||
<div class="i_upload" v-else>
|
<div class="i_upload" v-else>
|
||||||
<div class="addimg">
|
<div class="addimg">
|
||||||
@@ -147,7 +147,8 @@
|
|||||||
v-model:name="formParam.name"
|
v-model:name="formParam.name"
|
||||||
placeholder="请输入工号/讲师姓名进行检索"
|
placeholder="请输入工号/讲师姓名进行检索"
|
||||||
@onChange="managerChange" mode="multiple"></ProjectManager> -->
|
@onChange="managerChange" mode="multiple"></ProjectManager> -->
|
||||||
<SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgName" v-model:newlable="formParam.neworgName"></SearchTeacher>
|
<SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgName"
|
||||||
|
v-model:newlable="formParam.neworgName"></SearchTeacher>
|
||||||
<!-- <a-tree-select v-model:value="formParam.name"
|
<!-- <a-tree-select v-model:value="formParam.name"
|
||||||
show-search allow-clear tree-data-simple-mode class="draitem"
|
show-search allow-clear tree-data-simple-mode class="draitem"
|
||||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="请输入讲师名称" /> -->
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="请输入讲师名称" /> -->
|
||||||
@@ -155,10 +156,10 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="讲师组织" name="orgName">
|
<a-form-item label="讲师组织" name="orgName">
|
||||||
<a-popover >
|
<a-popover>
|
||||||
<template #content>
|
<template #content>
|
||||||
{{ formParam.orgName }}
|
{{ formParam.orgName }}
|
||||||
{{formParam.neworgName }}
|
{{ formParam.neworgName }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<a-input disabled v-model:value="formParam.neworgName" class="draitem"
|
<a-input disabled v-model:value="formParam.neworgName" class="draitem"
|
||||||
@@ -177,9 +178,10 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="讲师级别" name="tlevelId" ><div @click="handlesel">
|
<a-form-item label="讲师级别" name="tlevelId">
|
||||||
|
<div @click="handlesel">
|
||||||
<a-select class="draitem" v-model:value="formParam.tlevelId" placeholder="请选择讲师级别" allowClear
|
<a-select class="draitem" v-model:value="formParam.tlevelId" placeholder="请选择讲师级别" allowClear
|
||||||
:disabled="getLevelList.length !== 0 ? false : true" :options="getLevelList" >
|
:disabled="getLevelList.length !== 0 ? false : true" :options="getLevelList">
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -188,8 +190,8 @@
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="初始授课时长" name="defaultteachingTime">
|
<a-form-item label="初始授课时长" name="defaultteachingTime">
|
||||||
<a-input v-model:value="formParam.defaultteachingTime" style="width:80%; height: 40px; border-radius: 8px; " @blur="clearNonNumber"
|
<a-input v-model:value="formParam.defaultteachingTime" style="width:80%; height: 40px; border-radius: 8px; "
|
||||||
placeholder="0" allowClear showSearch suffix="分钟">
|
@blur="clearNonNumber" placeholder="0" allowClear showSearch suffix="分钟">
|
||||||
</a-input>
|
</a-input>
|
||||||
<span style="margin-left: 5px ;" v-if="formParam.defaultteachingTime != null">{{
|
<span style="margin-left: 5px ;" v-if="formParam.defaultteachingTime != null">{{
|
||||||
(formParam.defaultteachingTime / 60).toFixed(2) }}小时</span>
|
(formParam.defaultteachingTime / 60).toFixed(2) }}小时</span>
|
||||||
@@ -216,7 +218,7 @@
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="讲师介绍">
|
<a-form-item label="讲师介绍">
|
||||||
<Editor v-model:value="formParam.description "/>
|
<Editor v-model:value="formParam.description" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -230,7 +232,7 @@
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="擅长课程">
|
<a-form-item label="擅长课程">
|
||||||
<Editor v-model:value="formParam.courses "/>
|
<Editor v-model:value="formParam.courses" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -494,14 +496,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 修改状态功能弹窗 -->
|
<!-- 修改状态功能弹窗 -->
|
||||||
<div>
|
<div>
|
||||||
<a-modal
|
<a-modal v-model:visible="editTeacher" :footer="null" :closable="closableQR" wrapClassName="DelModal"
|
||||||
v-model:visible="editTeacher"
|
style="margin-top: 400px" :zIndex="9999">
|
||||||
:footer="null"
|
|
||||||
:closable="closableQR"
|
|
||||||
wrapClassName="DelModal"
|
|
||||||
style="margin-top: 400px"
|
|
||||||
:zIndex="9999"
|
|
||||||
>
|
|
||||||
<div class="delete">
|
<div class="delete">
|
||||||
<div class="del_header"></div>
|
<div class="del_header"></div>
|
||||||
<div class="del_main">
|
<div class="del_main">
|
||||||
@@ -531,6 +527,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="jsx">
|
<script lang="jsx">
|
||||||
import { reactive, toRefs, ref, watch } from "vue";
|
import { reactive, toRefs, ref, watch } from "vue";
|
||||||
|
import { useStore } from "vuex";
|
||||||
import {
|
import {
|
||||||
RightOutlined,
|
RightOutlined,
|
||||||
UpOutlined,
|
UpOutlined,
|
||||||
@@ -561,12 +558,14 @@ export default {
|
|||||||
FolderAddOutlined,//图标--新增
|
FolderAddOutlined,//图标--新增
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const formRef = ref();
|
||||||
|
const store = useStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
Addtitle: '选择教师专长',
|
Addtitle: '选择教师专长',
|
||||||
log:false,
|
log: false,
|
||||||
showContent: false,
|
showContent: false,
|
||||||
closableQR:false,
|
closableQR: false,
|
||||||
updialog: false,
|
updialog: false,
|
||||||
moreid: 1,
|
moreid: 1,
|
||||||
byPid: null,
|
byPid: null,
|
||||||
@@ -590,11 +589,11 @@ export default {
|
|||||||
tableDataTotal: -1,//table列表总条数
|
tableDataTotal: -1,//table列表总条数
|
||||||
vf: false,
|
vf: false,
|
||||||
formParam: {
|
formParam: {
|
||||||
teachenType:'0',
|
teachenType: '0',
|
||||||
name: null,
|
name: null,
|
||||||
certStatus: 0,//认证状态
|
certStatus: 0,//认证状态
|
||||||
defaultteachingTime: '0',
|
defaultteachingTime: '0',
|
||||||
photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png'
|
// photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png'
|
||||||
},
|
},
|
||||||
searchParam: {
|
searchParam: {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
@@ -638,7 +637,7 @@ export default {
|
|||||||
watch(() => state.formParam.courses, (val) => {
|
watch(() => state.formParam.courses, (val) => {
|
||||||
console.log(val, 'courses')
|
console.log(val, 'courses')
|
||||||
})
|
})
|
||||||
watch(()=>state.formParam.orgName,(val)=>{
|
watch(() => state.formParam.orgName, (val) => {
|
||||||
console.log(val, 'orgName')
|
console.log(val, 'orgName')
|
||||||
// if( val !==null ){
|
// if( val !==null ){
|
||||||
// state.formParam.neworgName=val.split('/')
|
// state.formParam.neworgName=val.split('/')
|
||||||
@@ -962,6 +961,7 @@ export default {
|
|||||||
])
|
])
|
||||||
// 搜索
|
// 搜索
|
||||||
const searchSubmit = () => {
|
const searchSubmit = () => {
|
||||||
|
store.commit("setShouInclude", ['lecturerlist']);
|
||||||
getTableDate();
|
getTableDate();
|
||||||
};
|
};
|
||||||
//重置
|
//重置
|
||||||
@@ -981,6 +981,7 @@ export default {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
};
|
};
|
||||||
|
store.commit("setShouInclude", []);
|
||||||
getTableDate();
|
getTableDate();
|
||||||
};
|
};
|
||||||
// List接口数据
|
// List接口数据
|
||||||
@@ -990,11 +991,12 @@ export default {
|
|||||||
getTeacherList(objA)
|
getTeacherList(objA)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// tableData.value = res.data.data.records
|
// tableData.value = res.data.data.records
|
||||||
let objA= res.data.data.records
|
let objA = res.data.data.records
|
||||||
objA.map((item)=>{
|
objA.map((item) => {
|
||||||
if( item.organizationName !==null ){
|
if (item.organizationName !== null) {
|
||||||
item.neworganizationName=item.organizationName.split('/')
|
item.neworganizationName = item.organizationName.split('/')
|
||||||
item.neworganizationName= item.neworganizationName[item.neworganizationName.length-1]}
|
item.neworganizationName = item.neworganizationName[item.neworganizationName.length - 1]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
tableData.value = objA
|
tableData.value = objA
|
||||||
state.tableDataTotal = Number(res.data.data.total);
|
state.tableDataTotal = Number(res.data.data.total);
|
||||||
@@ -1014,7 +1016,7 @@ export default {
|
|||||||
cancel()
|
cancel()
|
||||||
state.teacherdialog = true;
|
state.teacherdialog = true;
|
||||||
state.teacherdialogtitle = '新增讲师'
|
state.teacherdialogtitle = '新增讲师'
|
||||||
state.formParam.photo = state.formParam.photo === null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo
|
// state.formParam.photo = state.formParam.photo === null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo
|
||||||
state.formParam.status = '1'
|
state.formParam.status = '1'
|
||||||
state.vf = true
|
state.vf = true
|
||||||
}
|
}
|
||||||
@@ -1028,26 +1030,73 @@ export default {
|
|||||||
}
|
}
|
||||||
//保存
|
//保存
|
||||||
const createTeacherDialog = () => {
|
const createTeacherDialog = () => {
|
||||||
rule()
|
formRef.value
|
||||||
if( state.log = true){
|
.validate()
|
||||||
state.teacherdialog = true;
|
.then(() => {
|
||||||
}
|
if (state.vf == false) {
|
||||||
else
|
|
||||||
{ if (state.vf == false) {
|
|
||||||
updateInTeacher(state.formParam).then(response => {
|
updateInTeacher(state.formParam).then(response => {
|
||||||
message.success("修改成功");
|
message.success("修改成功");
|
||||||
|
state.teacherdialog = false;
|
||||||
|
cancel()
|
||||||
|
getTableDate();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
insertTeacher(state.formParam)
|
insertTeacher(state.formParam)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
|
state.teacherdialog = false;
|
||||||
|
cancel()
|
||||||
|
getTableDate();
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
state.teacherdialog = false;
|
})
|
||||||
getTableDate();}
|
.catch(() => {
|
||||||
|
console.log('error', error);
|
||||||
|
});
|
||||||
|
// rule()
|
||||||
|
// if (state.log = true) {
|
||||||
|
// state.teacherdialog = true;
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// // formRef.value.validate(valid => {
|
||||||
|
// // if (valid) {
|
||||||
|
// // if (state.vf == false) {
|
||||||
|
// // updateInTeacher(state.formParam).then(response => {
|
||||||
|
// // message.success("修改成功");
|
||||||
|
// // });
|
||||||
|
// // }
|
||||||
|
// // else {
|
||||||
|
// // insertTeacher(state.formParam)
|
||||||
|
// // .then((res) => {
|
||||||
|
// // message.success("保存成功");
|
||||||
|
// // }).catch((err) => {
|
||||||
|
// // console.log(err);
|
||||||
|
// // });
|
||||||
|
// // }
|
||||||
|
// // state.teacherdialog = false;
|
||||||
|
// // getTableDate();
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // )
|
||||||
|
// if (state.vf == false) {
|
||||||
|
// updateInTeacher(state.formParam).then(response => {
|
||||||
|
// message.success("修改成功");
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// insertTeacher(state.formParam)
|
||||||
|
// .then((res) => {
|
||||||
|
// message.success("保存成功");
|
||||||
|
// }).catch((err) => {
|
||||||
|
// console.log(err);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// state.teacherdialog = false;
|
||||||
|
// getTableDate();
|
||||||
|
// }
|
||||||
};
|
};
|
||||||
//删除弹窗
|
//删除弹窗
|
||||||
const deleteModal = (record) => {
|
const deleteModal = (record) => {
|
||||||
@@ -1095,6 +1144,7 @@ export default {
|
|||||||
//取消按钮 清空输入的数据
|
//取消按钮 清空输入的数据
|
||||||
const cancelTeacherDialog = () => {
|
const cancelTeacherDialog = () => {
|
||||||
if (state.teacherdialog = true) {
|
if (state.teacherdialog = true) {
|
||||||
|
formRef.value.resetFields();
|
||||||
state.teacherdialog = false
|
state.teacherdialog = false
|
||||||
cancel()
|
cancel()
|
||||||
}
|
}
|
||||||
@@ -1106,9 +1156,9 @@ export default {
|
|||||||
//清空数据
|
//清空数据
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
state.formParam = {
|
state.formParam = {
|
||||||
name:null,
|
name: null,
|
||||||
status:null,
|
status: null,
|
||||||
teacherType:'0',
|
teacherType: '0',
|
||||||
photo: null,
|
photo: null,
|
||||||
teacherNameOrUserNo: null,
|
teacherNameOrUserNo: null,
|
||||||
newdepartId: null,
|
newdepartId: null,
|
||||||
@@ -1129,34 +1179,41 @@ export default {
|
|||||||
newdepartId: [{ required: true, message: '组织不能为空' }],
|
newdepartId: [{ required: true, message: '组织不能为空' }],
|
||||||
tlevelId: [{ required: true, message: '讲师级别不能为空' }],
|
tlevelId: [{ required: true, message: '讲师级别不能为空' }],
|
||||||
tsystemId: [{ required: true, message: '讲师体系不能为空' }],
|
tsystemId: [{ required: true, message: '讲师体系不能为空' }],
|
||||||
defaultteachingTime: [{ required: true, message: '授课时长不能为空' }],
|
defaultteachingTime: [{ required: true, message: '' }],
|
||||||
certStatus: [{ required: true, message: '认证状态不能为空' }],
|
certStatus: [{ required: true, message: '认证状态不能为空' }],
|
||||||
|
|
||||||
}
|
}
|
||||||
const rule =()=>{
|
const rule = () => {
|
||||||
if (state.formParam.name==null){
|
if (state.formParam.name == null) {
|
||||||
state.log = true
|
state.log = true
|
||||||
message.warning( '讲师不能为空')
|
message.warning('讲师不能为空')
|
||||||
|
return
|
||||||
|
600000000000000000000000000000000
|
||||||
}
|
}
|
||||||
if (state.formParam.departId==null){
|
if (state.formParam.departId == null) {
|
||||||
state.log = true
|
state.log = true
|
||||||
message.warning( '组织不能为空')
|
message.warning('组织不能为空')
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if (state.formParam.tlevelId==null){
|
if (state.formParam.tlevelId == null) {
|
||||||
state.log = true
|
state.log = true
|
||||||
message.warning( '讲师级别不能为空')
|
message.warning('讲师级别不能为空')
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if (state.formParam.tsystemId==null){
|
if (state.formParam.tsystemId == null) {
|
||||||
state.log = true
|
state.log = true
|
||||||
message.warning( '讲师体系不能为空')
|
message.warning('讲师体系不能为空')
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if (state.formParam.defaultteachingTime==null){
|
if (state.formParam.defaultteachingTime == null) {
|
||||||
state.log = true
|
state.log = true
|
||||||
message.warning( '授课时长不能为空')
|
message.warning('授课时长不能为空')
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if (state.formParam.certStatus==null){
|
if (state.formParam.certStatus == null) {
|
||||||
state.log = true
|
state.log = true
|
||||||
message.warning( '认证状态不能为空')
|
message.warning('认证状态不能为空')
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// //表格内查看数据操作
|
// //表格内查看数据操作
|
||||||
@@ -1177,7 +1234,7 @@ export default {
|
|||||||
// }
|
// }
|
||||||
state.formParam = res.data.data[0]
|
state.formParam = res.data.data[0]
|
||||||
state.formParam.description = state.formParam.description === null ? '' : state.formParam.description
|
state.formParam.description = state.formParam.description === null ? '' : state.formParam.description
|
||||||
state.formParam.workExperience = state.formParam.workExperience === null ? '' : state.formParam.workExperience
|
state.formParam.workExp0erience = state.formParam.workExperience === null ? '' : state.formParam.workExperience
|
||||||
state.formParam.courses = state.formParam.courses === null ? '' : state.formParam.courses
|
state.formParam.courses = state.formParam.courses === null ? '' : state.formParam.courses
|
||||||
state.formParam.photo = state.formParam.photo === null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo
|
state.formParam.photo = state.formParam.photo === null ? 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png' : state.formParam.photo
|
||||||
}
|
}
|
||||||
@@ -1198,15 +1255,15 @@ export default {
|
|||||||
// const customPreview =(e)=>{
|
// const customPreview =(e)=>{
|
||||||
// e.stopPropagation()
|
// e.stopPropagation()
|
||||||
// }
|
// }
|
||||||
const handlesel=()=>{
|
const handlesel = () => {
|
||||||
console.log( '请下选择讲师体系')
|
console.log('请下选择讲师体系')
|
||||||
if (state.formParam.tsystemId == undefimed) {
|
if (state.formParam.tsystemId == undefimed) {
|
||||||
message.warning( '请下选择讲师体系')
|
message.warning('请下选择讲师体系')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//导出功能
|
//导出功能
|
||||||
const handleExport = () => {
|
const handleExport = () => {
|
||||||
window.open (
|
window.open(
|
||||||
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${state.searchParam.currentPage
|
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${state.searchParam.currentPage
|
||||||
}&pageSize=${state.searchParam.pageSize}
|
}&pageSize=${state.searchParam.pageSize}
|
||||||
&teacherNameOrUserNo=${state.searchParam.teacherNameOrUserNo ? state.searchParam.teacherNameOrUserNo : ""}
|
&teacherNameOrUserNo=${state.searchParam.teacherNameOrUserNo ? state.searchParam.teacherNameOrUserNo : ""}
|
||||||
@@ -1224,6 +1281,7 @@ export default {
|
|||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
rules,
|
rules,
|
||||||
rule,
|
rule,
|
||||||
|
formRef,
|
||||||
handlesel,
|
handlesel,
|
||||||
// customPreview,
|
// customPreview,
|
||||||
clearNonNumber,
|
clearNonNumber,
|
||||||
@@ -1272,6 +1330,10 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .ant-upload.ant-upload-select-picture-card {
|
||||||
|
border-radius: 50% !important;
|
||||||
|
}
|
||||||
|
|
||||||
.add_content {
|
.add_content {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -1590,7 +1652,8 @@ export default {
|
|||||||
.item_inp .i_upload[data-v-6b882d01] {
|
.item_inp .i_upload[data-v-6b882d01] {
|
||||||
border-radius: 50% !important;
|
border-radius: 50% !important;
|
||||||
}
|
}
|
||||||
::v-deep .ant-modal-close{
|
|
||||||
|
::v-deep .ant-modal-close {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -19,9 +19,23 @@
|
|||||||
placeholder="请输入课程名称进行搜索" allowClear showSearch>
|
placeholder="请输入课程名称进行搜索" allowClear showSearch>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="select ">
|
<!-- <a-form-item class="select ">
|
||||||
<a-range-picker style="width: 260px; height: 40px; border-radius: 8px" v-model:value="searchdate" separator="至"
|
<a-range-picker style="width: 260px; height: 40px; border-radius: 8px" v-model:value="searchdate" separator="至"
|
||||||
:placeholder="[' 开始时间', ' 结束时间']" @change="searchTimeChange" />
|
:placeholder="[' 开始时间', ' 结束时间']" @change="searchTimeChange" />
|
||||||
|
</a-form-item> -->
|
||||||
|
<a-form-item class="select ">
|
||||||
|
<div class="select addTimeBox">
|
||||||
|
<div class="addTime" >创建时间:</div>
|
||||||
|
<a-range-picker
|
||||||
|
v-model:value="searchdate"
|
||||||
|
style="width: 420px"
|
||||||
|
@change="searchTimeChange"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
valueFormat="YYYY-MM-DD"
|
||||||
|
separator="至"
|
||||||
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<div style="display: flex; margin-bottom: 20px">
|
<div style="display: flex; margin-bottom: 20px">
|
||||||
<a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button>
|
<a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button>
|
||||||
@@ -87,16 +101,11 @@
|
|||||||
<a-button @click="addTeacher()" type="primary" class="langbtn">
|
<a-button @click="addTeacher()" type="primary" class="langbtn">
|
||||||
<FolderAddOutlined /> 添加授课记录
|
<FolderAddOutlined /> 添加授课记录
|
||||||
</a-button>
|
</a-button>
|
||||||
<!-- <div style="margin-left: 20px ;">
|
<!-- <a-upload multiple :headers="headers" :show-upload-list="false" :before-upload="beforeUpload2"> -->
|
||||||
<a-button @click="addTeacher()" class="langbtn">
|
<a-button class="resetbtn" @click="handleImport()" >
|
||||||
<UploadOutlined /> 一键生成讲师费
|
|
||||||
</a-button>
|
|
||||||
</div> -->
|
|
||||||
<a-upload multiple :headers="headers" :show-upload-list="false" :before-upload="beforeUpload2">
|
|
||||||
<a-button class="resetbtn">
|
|
||||||
<DownloadOutlined /> 导入
|
<DownloadOutlined /> 导入
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-upload>
|
<!-- </a-upload> -->
|
||||||
<a-button @click="handleExport()" class="resetbtn">
|
<a-button @click="handleExport()" class="resetbtn">
|
||||||
<UploadOutlined /> 导出
|
<UploadOutlined /> 导出
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -129,7 +138,7 @@
|
|||||||
<!-- 弹窗组件 -->
|
<!-- 弹窗组件 -->
|
||||||
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
|
<a-drawer v-model:visible="teacherdialog" placement="right" @closa="cancelTeacherDialog" :maskClosable="true"
|
||||||
dropdown-style="drawaer" width="60%" :title="teacherdialogtitle">
|
dropdown-style="drawaer" width="60%" :title="teacherdialogtitle">
|
||||||
<a-form :model="formParam" :rules="rules" layout="vertical">
|
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
|
||||||
<!-- 讲师姓名 teacher 组织 departId-->
|
<!-- 讲师姓名 teacher 组织 departId-->
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@@ -380,6 +389,7 @@ export default {
|
|||||||
FolderAddOutlined,//图标--新增
|
FolderAddOutlined,//图标--新增
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const formRef = ref();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
moreid: 1,
|
moreid: 1,
|
||||||
@@ -641,7 +651,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '授课/课程日期 ',
|
title: '授课时间',
|
||||||
dataIndex: 'beginTime',
|
dataIndex: 'beginTime',
|
||||||
key: 'beginTime',
|
key: 'beginTime',
|
||||||
elipsis: true, align: "center",
|
elipsis: true, align: "center",
|
||||||
@@ -739,7 +749,7 @@ export default {
|
|||||||
state.searchParam.trainorgId = null
|
state.searchParam.trainorgId = null
|
||||||
state.searchParam.systemId = null
|
state.searchParam.systemId = null
|
||||||
state.searchParam.id = null
|
state.searchParam.id = null
|
||||||
state.searchParam.scoreranges = null
|
state.searchParam.scoreranges = []
|
||||||
state.searchParam.studysranges = []
|
state.searchParam.studysranges = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -748,16 +758,13 @@ export default {
|
|||||||
getTableDate();
|
getTableDate();
|
||||||
};
|
};
|
||||||
//修改时间
|
//修改时间
|
||||||
const searchTimeChange = (e, date) => {
|
function searchTimeChange(time, timeStr) {
|
||||||
let startDate = date[0] + " 00:00:00";
|
state.searchParam.startDate = timeStr[0];
|
||||||
let endDate = date[1] + " 23:59:59";
|
state.searchParam.endDate = timeStr[1];
|
||||||
state.startDate = new Date(startDate).getTime();
|
console.log( state.searchParam.startDate)
|
||||||
state.endDate = new Date(endDate).getTime();
|
console.log(state.searchParam.endDate)
|
||||||
// state.searchParam.startDate = new Date(startDate).getTime() ;
|
}
|
||||||
// state.searchParam.endDate = new Date(endDate).getTime() ;
|
|
||||||
state.searchParam.startDate = state.startDate ? state.startDate : null,
|
|
||||||
state.searchParam.endDate = state.endDate ? state.endDate : null
|
|
||||||
};
|
|
||||||
const editTimeChange = (e, date) => {
|
const editTimeChange = (e, date) => {
|
||||||
console.log(date);
|
console.log(date);
|
||||||
state.beginTime = date;
|
state.beginTime = date;
|
||||||
@@ -823,28 +830,32 @@ export default {
|
|||||||
}
|
}
|
||||||
//保存
|
//保存
|
||||||
const createTeacherDialog = () => {
|
const createTeacherDialog = () => {
|
||||||
rule()
|
formRef.value
|
||||||
if (state.log = true) {
|
.validate()
|
||||||
state.teacherdialog = true;
|
.then(() => {
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (state.vf == false) {
|
if (state.vf == false) {
|
||||||
updateInTeacherCourse(state.formParam).then(response => {
|
updateInTeacherCourse(state.formParam).then(response => {
|
||||||
message.success("修改成功");
|
message.success("修改成功");
|
||||||
|
state.teacherdialog = false;
|
||||||
|
cancel()
|
||||||
|
getTableDate();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
insertInTeacherCourse(state.formParam)
|
insertInTeacherCourse(state.formParam)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
|
state.teacherdialog = false;
|
||||||
|
cancel()
|
||||||
|
getTableDate();
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
cancel()
|
|
||||||
}
|
|
||||||
getTableDate();
|
|
||||||
state.teacherdialog = false
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
console.log('error', error);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
//删除弹窗
|
//删除弹窗
|
||||||
const deleteModal = (record) => {
|
const deleteModal = (record) => {
|
||||||
@@ -872,6 +883,7 @@ export default {
|
|||||||
//取消按钮 清空输入的数据
|
//取消按钮 清空输入的数据
|
||||||
const cancelTeacherDialog = () => {
|
const cancelTeacherDialog = () => {
|
||||||
if (state.teacherdialog = true) {
|
if (state.teacherdialog = true) {
|
||||||
|
formRef.value.resetFields();
|
||||||
state.teacherdialog = false
|
state.teacherdialog = false
|
||||||
cancel()
|
cancel()
|
||||||
}
|
}
|
||||||
@@ -1135,6 +1147,7 @@ export default {
|
|||||||
beforeUpload2,
|
beforeUpload2,
|
||||||
rules,
|
rules,
|
||||||
rule,
|
rule,
|
||||||
|
formRef,
|
||||||
column,
|
column,
|
||||||
tableDatas,
|
tableDatas,
|
||||||
gettableDatas,
|
gettableDatas,
|
||||||
@@ -1192,7 +1205,9 @@ export default {
|
|||||||
color: rgba(0, 0, 0, 0.4);
|
color: rgba(0, 0, 0, 0.4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.addTimeBox .ant-picker{
|
||||||
|
padding-left: 85px;
|
||||||
|
}
|
||||||
//导出按钮icon
|
//导出按钮icon
|
||||||
.daochu {
|
.daochu {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="select">
|
<a-form-item class="select">
|
||||||
<a-select style="width: 276px" v-model:value="searchParam.trainorgId" placeholder="培训发生组织" allowClear
|
<a-input v-model:value="searchParam.trainorgId" style="width: 276px; height: 40px; border-radius: 8px"
|
||||||
:options="trainOrglist">
|
placeholder="请输入培训发生组织进行搜索" allowClear showSearch>
|
||||||
</a-select>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item class="select ">
|
<a-form-item class="select ">
|
||||||
<a-range-picker style="width: 260px; height: 40px; border-radius: 8px" v-model:value="searchdate" separator="至"
|
<a-range-picker style="width: 260px; height: 40px; border-radius: 8px" v-model:value="searchdate" separator="至"
|
||||||
|
|||||||
Reference in New Issue
Block a user