mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 10:12:54 +08:00
讲师费统计页面调整
This commit is contained in:
@@ -6,9 +6,12 @@
|
||||
<a-form layout="inline">
|
||||
<a-form-item class="select">
|
||||
<!-- v-model:value="searchParam.name" -->
|
||||
<a-input v-model:value="searchParam.name" style="width: 230px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入讲师姓名检索" allowClear showSearch>
|
||||
</a-input>
|
||||
<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>
|
||||
</a-form-item >
|
||||
<a-form-item class="select">
|
||||
<a-select style="width: 230px" v-model:value="searchParam.status" placeholder="账号状态"
|
||||
@@ -80,24 +83,33 @@
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="avatar"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
: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" tree-data-simple-mode class="draitem"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="请输入讲师名称" />
|
||||
<a-input v-model:value="searchParam.name " class="draitem"
|
||||
placeholder="请输入讲师姓名" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@@ -234,14 +246,21 @@ import { reactive, toRefs, ref } from "vue";
|
||||
import Editor from "@/components/project/Editor";
|
||||
import { useRouter } from "vue-router";
|
||||
import { message } from "ant-design-vue";
|
||||
import { getOutTeacherList, getOuterTeacherById, getOuterTeacherCourseList, deleteInTeacher, updateInTeacher, updateTeacherState, insertTeacherOutSide, updateOutTeacher } from "../../api/Lecturer";
|
||||
// import {getProjSt} from "../../api/indexProjStu";
|
||||
// import AddTeacher from "../../components/drawers/project/AddTeacher"
|
||||
import {
|
||||
UploadOutlined,
|
||||
FolderAddOutlined
|
||||
} from '@ant-design/icons-vue';
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import { getOutTeacherList, getOuterTeacherById, fileUp, deleteInTeacher, updateInTeacher, updateTeacherState, insertTeacherOutSide, updateOutTeacher } from "../../api/Lecturer";
|
||||
import {getCookieForName} from "@/api/method";
|
||||
export default {
|
||||
name: "ExternalLecturer",
|
||||
components: {
|
||||
// AddTeacher,
|
||||
Editor
|
||||
ProjectManager,
|
||||
Editor,
|
||||
FolderAddOutlined,//图标--新增
|
||||
UploadOutlined,//图标--导出
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
@@ -275,6 +294,41 @@ 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 AccountStatusList = ref([
|
||||
{ value: 0, label: "启用" },
|
||||
{ value: 1, label: "停用" },
|
||||
@@ -340,7 +394,7 @@ export default {
|
||||
dataIndex: 'operation',
|
||||
key: 'operation',
|
||||
elipsis: true, align: "right",
|
||||
width: 300,
|
||||
width: 400,
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
])
|
||||
@@ -546,6 +600,8 @@ export default {
|
||||
return {
|
||||
...toRefs(state),
|
||||
rules,
|
||||
headers,
|
||||
beforeUpload,
|
||||
handleExport,
|
||||
AccountStatusList,
|
||||
searchSubmit,
|
||||
@@ -853,4 +909,59 @@ export default {
|
||||
border-radius:8px;
|
||||
margin-right:20px
|
||||
}
|
||||
::v-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{
|
||||
border-radius:8px;
|
||||
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>
|
||||
Reference in New Issue
Block a user