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:
@@ -85,6 +85,7 @@
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space>
|
||||
<a-button type="link" @click="() => handleLook(record, String(record.courseform))">查看</a-button>
|
||||
|
||||
<a-button type="link" @click="() => handleModify(record, String(record.courseform))">编辑</a-button>
|
||||
<a-button v-if="record.status == '1'" type="link"
|
||||
@click="() => handleOperate(record, String(record.courseform))">停用</a-button>
|
||||
@@ -101,7 +102,7 @@
|
||||
<div class="tableBox ">
|
||||
<div style="float: right;">
|
||||
|
||||
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="false" :showQuickJumper="true" :hideOnSinglePage="true"
|
||||
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="true" :showQuickJumper="false " :hideOnSinglePage="true"
|
||||
:pageSize="searchParam.pageSize" :current="searchParam.pageNo" :total="tableDataTotal" class="pagination"
|
||||
@change="changePagination" />
|
||||
</div>
|
||||
@@ -118,16 +119,19 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
<div class="item_inp" style="background-color: #fff;">
|
||||
<a-tooltip>
|
||||
<template #title>修改头像</template>
|
||||
<a-upload name="avatar" list-type="picture-card" class="avatar-uploader" :show-upload-list="false"
|
||||
:headers="headers" :before-upload="beforeUpload">
|
||||
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" />
|
||||
<div class="i_upload" v-else>
|
||||
:headers="headers" :before-upload="beforeUpload" >
|
||||
<img class="i_upload_img" v-if="formParam.photo" :src="formParam.photo" alt="avatar" />
|
||||
<div class="i_upload" v-else>
|
||||
<div class="addimg">
|
||||
<div class="heng"></div>
|
||||
<div class="shu"></div>
|
||||
</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
</a-tooltip>
|
||||
<div class="i_bottom">
|
||||
<div class="tip" style="margin-bottom: 10px;">
|
||||
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png 图片最大为500KB</span>
|
||||
@@ -139,12 +143,11 @@
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="讲师名称" name="name">
|
||||
|
||||
<!-- <ProjectManager v-model:value="formParam.userNo"
|
||||
v-model:name="formParam.name"
|
||||
placeholder="请输入工号/讲师姓名进行检索"
|
||||
@onChange="managerChange" mode="multiple"></ProjectManager> -->
|
||||
<SearchTeacher v-model:value="formParam.name" v-model:lable="formParam.orgName"></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"
|
||||
show-search allow-clear tree-data-simple-mode class="draitem"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="请输入讲师名称" /> -->
|
||||
@@ -152,10 +155,12 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="讲师组织" name="orgName">
|
||||
<a-popover title="讲师组织">
|
||||
<a-popover >
|
||||
<template #content>
|
||||
{{ formParam.orgName }}
|
||||
{{formParam.neworgName }}
|
||||
</template>
|
||||
|
||||
<a-input disabled v-model:value="formParam.neworgName" class="draitem"
|
||||
placeholder="自动带出讲师的组织,展示主要部分,鼠标浮上去展示所有" allowClear showSearch>
|
||||
</a-input>
|
||||
@@ -558,13 +563,12 @@ export default {
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
Addtitle: '选择教师专长',
|
||||
log:false,
|
||||
showContent: false,
|
||||
closableQR:false,
|
||||
updialog: false,
|
||||
moreid: 1,
|
||||
byPid: null,
|
||||
currentPage1: 1,
|
||||
pageSize1: 10,
|
||||
tableLoading: false,
|
||||
tagsshow: "1",
|
||||
PlaceOfPayList: [],
|
||||
@@ -592,6 +596,8 @@ export default {
|
||||
photo: 'https://p0.itc.cn/q_70/images01/20211013/f45d91616a364d6ea9c42a8db69734aa.png'
|
||||
},
|
||||
searchParam: {
|
||||
currentPage: 1,
|
||||
pageSize1: 10,
|
||||
teacherNameOrUserNo: null,
|
||||
systemId: null,
|
||||
tlevelId: null,
|
||||
@@ -631,6 +637,13 @@ export default {
|
||||
watch(() => state.formParam.courses, (val) => {
|
||||
console.log(val, 'courses')
|
||||
})
|
||||
watch(()=>state.formParam.orgName,(val)=>{
|
||||
console.log(val, 'orgName')
|
||||
// if( val !==null ){
|
||||
// state.formParam.neworgName=val.split('/')
|
||||
// state.formParam.neworgName= state.formParam.neworgName[state.formParam.neworgName.length-1]
|
||||
// }
|
||||
})
|
||||
let isLt1M = file.size < 500000;
|
||||
console.log(file.size, isLt1M)
|
||||
if (!isLt1M) {
|
||||
@@ -944,7 +957,7 @@ export default {
|
||||
])
|
||||
//列表数据
|
||||
const tableData = ref([
|
||||
|
||||
|
||||
])
|
||||
// 搜索
|
||||
const searchSubmit = () => {
|
||||
@@ -991,8 +1004,8 @@ export default {
|
||||
// // 翻页
|
||||
const changePagination = (page, pageSize) => {
|
||||
state.searchParam.pageNo = page;
|
||||
state.currentPage1 = page;
|
||||
state.pageSize1 = pageSize;
|
||||
// state.currentPage = page;
|
||||
state.searchParam.pageSize = pageSize;
|
||||
getTableDate();
|
||||
};
|
||||
// 新增讲师
|
||||
@@ -1014,7 +1027,12 @@ export default {
|
||||
}
|
||||
//保存
|
||||
const createTeacherDialog = () => {
|
||||
if (state.vf == false) {
|
||||
rule()
|
||||
if( state.log = true){
|
||||
state.teacherdialog = true;
|
||||
}
|
||||
else
|
||||
{ if (state.vf == false) {
|
||||
updateInTeacher(state.formParam).then(response => {
|
||||
message.success("修改成功");
|
||||
});
|
||||
@@ -1028,28 +1046,7 @@ export default {
|
||||
});
|
||||
}
|
||||
state.teacherdialog = false;
|
||||
getTableDate();
|
||||
// let a =
|
||||
// {"teacherType":"0",
|
||||
// "name":"张六0804",
|
||||
// "status": 1,
|
||||
// "certStatus": "0",
|
||||
// "tsystemId":"",
|
||||
// "defaultteachingTime": "110",
|
||||
// "tlevelId":"",
|
||||
// "userNo":"",
|
||||
// "kid":"",
|
||||
// "photo":" ",
|
||||
// "description":"介绍",
|
||||
// "expertise":"工作经历",
|
||||
// "workExperience": "卫健委因无法准确掌握实际数量即日起不再公布无症状感染者数据。2、官方在感染高风险人群、60岁以上老年人群等开展第二剂次加强免疫接种",
|
||||
// }
|
||||
// insertTeacher(a)
|
||||
// .then((res) => {
|
||||
// message.success("保存成功");
|
||||
// }).catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
getTableDate();}
|
||||
};
|
||||
//删除弹窗
|
||||
const deleteModal = (record) => {
|
||||
@@ -1135,8 +1132,35 @@ export default {
|
||||
certStatus: [{ required: true, message: '认证状态不能为空' }],
|
||||
|
||||
}
|
||||
//表格内查看数据操作
|
||||
const rule =()=>{
|
||||
if (state.formParam.name==null){
|
||||
state.log = true
|
||||
message.warning( '讲师不能为空')
|
||||
}
|
||||
if (state.formParam.newdepartId==null){
|
||||
state.log = true
|
||||
message.warning( '组织不能为空')
|
||||
}
|
||||
if (state.formParam.tlevelId==null){
|
||||
state.log = true
|
||||
message.warning( '讲师级别不能为空')
|
||||
}
|
||||
if (state.formParam.tsystemId==null){
|
||||
state.log = true
|
||||
message.warning( '讲师体系不能为空')
|
||||
}
|
||||
if (state.formParam.defaultteachingTime==null){
|
||||
state.log = true
|
||||
message.warning( '授课时长不能为空')
|
||||
}
|
||||
if (state.formParam.certStatus==null){
|
||||
state.log = true
|
||||
message.warning( '认证状态不能为空')
|
||||
}
|
||||
}
|
||||
// //表格内查看数据操作
|
||||
const handleLook = (record) => {
|
||||
|
||||
let id = record.id
|
||||
router.push({ path: '/LookInsideLecturer', query: { id } })
|
||||
}
|
||||
@@ -1144,13 +1168,13 @@ export default {
|
||||
const TeacherSystem = () => {
|
||||
getTeacherById(state.id).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
let objA= res.data.data[0]
|
||||
if( objA.orgName !==null ){
|
||||
objA.neworgName=objA.orgName.split('/')
|
||||
// let objA= res.data.data[0]
|
||||
// if( objA.orgName !==null ){
|
||||
// objA.neworgName=objA.orgName.split('/')
|
||||
|
||||
objA.neworgName= objA.neworgName[objA.neworgName.length-1]
|
||||
}
|
||||
state.formParam = objA
|
||||
// objA.neworgName= objA.neworgName[objA.neworgName.length-1]
|
||||
// }
|
||||
state.formParam = res.data.data[0]
|
||||
state.formParam.description = state.formParam.description === null ? '' : state.formParam.description
|
||||
state.formParam.workExperience = state.formParam.workExperience === null ? '' : state.formParam.workExperience
|
||||
state.formParam.courses = state.formParam.courses === null ? '' : state.formParam.courses
|
||||
@@ -1170,11 +1194,14 @@ export default {
|
||||
// state.searchParam.name = t;
|
||||
// // state.searchParam.trainorgName=orgName
|
||||
// }
|
||||
// const customPreview =(e)=>{
|
||||
// e.stopPropagation()
|
||||
// }
|
||||
//导出功能
|
||||
const handleExport = () => {
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${state.currentPage1
|
||||
}&pageSize=${state.pageSize1}
|
||||
window.open (
|
||||
`${process.env.VUE_APP_BASE_API}/teacher/export?pageNo=${state.searchParam.currentPage
|
||||
}&pageSize=${state.searchParam.pageSize}
|
||||
&teacherNameOrUserNo=${state.searchParam.teacherNameOrUserNo ? state.searchParam.teacherNameOrUserNo : ""}
|
||||
&systemId=${state.searchParam.systemId ? state.searchParam.systemId : ""}
|
||||
&tlevelId=${state.searchParam.tlevelId ? state.searchParam.tlevelId : ""
|
||||
@@ -1189,6 +1216,8 @@ export default {
|
||||
return {
|
||||
...toRefs(state),
|
||||
rules,
|
||||
rule,
|
||||
// customPreview,
|
||||
clearNonNumber,
|
||||
// managerChange,
|
||||
headers,
|
||||
|
||||
Reference in New Issue
Block a user