讲师费统计页面调整

This commit is contained in:
wangxuemei
2024-07-30 18:22:40 +08:00
parent bc9ab4fa7d
commit 768097ba05
10 changed files with 2196 additions and 460 deletions

View File

@@ -5,10 +5,16 @@
<div class="filter" style="min-width: 1380px;">
<a-form layout="inline">
<a-form-item class="select">
<div style="width: 276px; height: 40px; border-radius: 8px" >
<ProjectManager v-model:value="searchParam.managerId"
v-model:name="searchParam.manager"
placeholder="请输入工号/讲师姓名进行检索"
@onChange="managerChange" mode="multiple"></ProjectManager>
</div>
<!-- v-model:value="searchParam.name" -->
<a-input v-model:value="searchParam.userNo" style="width: 276px; height: 40px; border-radius: 8px"
<!-- <a-input v-model:value="searchParam.userNo" style="width: 276px; height: 40px; border-radius: 8px"
placeholder="请输入工号/讲师姓名进行检索" allowClear showSearch>
</a-input>
</a-input> -->
<!-- <a-tree-select
:fieldNames="{
@@ -137,26 +143,39 @@
</a-row>
<a-row :gutter="16">
<a-col :span="24">
<a-upload
v-model:file-list="fileList"
name="avatar"
avatar-uploader
list-type="picture-card"
class=""
:show-upload-list="false"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
:before-upload="beforeUpload"
@change="handleChange"
/>
<div class="item_inp" style="background-color: #fff;">
<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="imageUrl" :src="imageUrl" alt="avatar" />
<div class="i_upload" v-else>
<div class="addimg">
<div class="heng"></div>
<div class="shu"></div>
</div>
</div>
</a-upload>
<div class="i_bottom">
<div class="tip" style="margin-bottom: 10px;">
<span style="color: #999999; margin-left: 8px">支持图片格式为jpg/jpeg/png 图片最大为2MB</span>
</div>
</div>
</div>
</a-col>
</a-row>
<!-- 讲师名称组织 -->
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="讲师名称" name="name">
<a-tree-select v-model:value="formParam.name"
<ProjectManager v-model:value="formParam.managerId"
v-model:name="formParam.manager"
placeholder="请输入工号/讲师姓名进行检索"
@onChange="managerChange" mode="multiple"></ProjectManager>
<!-- <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="请输入讲师名称" />
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="请输入讲师名称" /> -->
</a-form-item>
</a-col>
<a-col :span="12">
@@ -194,7 +213,7 @@
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="初始授课时长" name="defaultTeachingTime">
<a-input v-model:value="formParam.defaultTeachingTime" style="width:80%; height: 40px; " placeholder="0"
<a-input v-model:value="formParam.defaultTeachingTime" style="width:80%; height: 40px; border-radius: 8px; " placeholder="0"
allowClear showSearch suffix="分钟">
</a-input>
<span style="margin-left: 5px ;">{{ (formParam.defaultTeachingTime /60 ).toFixed(2)}}小时</span>
@@ -330,16 +349,17 @@ import {
FolderAddOutlined
} from '@ant-design/icons-vue';
import Editor from "@/components/project/Editor";
// import Upload from "@/components/common/BaseUpload";
// import FJUpload from "@/components/common/FJUpload";
import ProjectManager from "@/components/project/ProjectManagerNew";
import { message } from "ant-design-vue";
import { useRouter } from "vue-router";
import { getTeacherSystemList, getTeacherList, getPayRollPlace, getLevel, insertTeacher, deleteInTeacher, updateInTeacher, getTeacherById, updateTeacherState, getTeacherExpertise, getTeacherExpertiseByPid, infoteacher, } from "../../api/Lecturer";
import { getTeacherSystemList, getTeacherList, getPayRollPlace, getLevel, insertTeacher, deleteInTeacher, updateInTeacher, getTeacherById, updateTeacherState, getTeacherExpertise, getTeacherExpertiseByPid, infoteacher, fileUp } from "../../api/Lecturer";
import {getCookieForName} from "@/api/method";
// import {getProjSt} from "../../api/indexProjStu";
import AddContent from "../../components/project/AddContent.vue"
export default {
name: "InsideLecturer",
components: {
ProjectManager,
AddContent,
Editor,
// FJUpload,
@@ -398,6 +418,40 @@ export default {
},
activeName: 'first'
})
const headers = { token: getCookieForName("token") };
const beforeUpload = (file) => {
const isJpgOrPng =
file.type === "image/jpg" ||
file.type === "image/jpeg" ||
file.type === "image/png" ||
file.type === "image/svg" ||
file.type === "image/bmp" ||
file.type === "image/gif";
if (!isJpgOrPng) {
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
return false;
}
let isLt1M = file.size < 2000000;
console.log(file.size, isLt1M)
if (!isLt1M) {
message.error("图片大小超过2MB!");
return false;
}
const formDatas = new FormData();
formDatas.append("file", file);
fileUp(formDatas).then((res) => {
if (res.data.code === 200) {
console.log(res.data.data, 45);
imageUrl.value = process.env.VUE_APP_FILE_PATH + res.data.data;
// state.hasImgName = file.name;
// emit("src", { id: '', src: res.data.data });
}
});
return false;
};
const LecturerSystemList = ref([
// { value: 0, systemName: "讲师体系" },
]);
@@ -704,7 +758,7 @@ console.log( "讲师体系id" +val);
dataIndex: 'operation',
key: 'operation',
elipsis: true,
width: 300,
width: 400,
align: "right",
scopedSlots: { customRender: "action" },
},
@@ -934,6 +988,8 @@ console.log( "讲师体系id" +val);
return {
...toRefs(state),
rules,
headers,
beforeUpload,
handlemoreid,
changeSelect,
handleExport,
@@ -978,6 +1034,7 @@ console.log( "讲师体系id" +val);
};
</script>
<style lang="scss" scoped>
.add_content{
width: 40px;
height: 40px;
@@ -1270,4 +1327,61 @@ position: relative;
border-radius:8px;
margin-right:20px
}
::v-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{
border-radius:8px;
height:40px;
line-height: 40px;
}
.ant-col-12{
height:80px;
}
.item_inp {
flex: 1;
text-align: center ;
.i_upload_img {
width: 100px;
height: 100px;
border-radius: 8px;
}
.i_upload {
width: 100px;
height: 100px;
border: 1px solid #4ea6ff;
border-radius:50%;
text-align: center;
align-items: center;
cursor: pointer;
.addimg {
position: relative;
.heng {
position: absolute;
top: 50px;
left: 25px;
width: 50px;
border: 1px solid #4ea6ff;
}
.shu {
position: absolute;
top: 25px;
left: 50px;
height: 50px;
border: 1px solid #4ea6ff;
}
}
}
.ant-upload.ant-upload-select-picture-card {
border: 0px !important;
border-radius: 50%!important;
}
}
.ant-upload.ant-upload-select-picture-card {
border: 0px !important;
border-radius: 50%!important;
}
</style>