mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 15:56:47 +08:00
细节调整
This commit is contained in:
@@ -123,7 +123,7 @@
|
||||
<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" />
|
||||
<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>
|
||||
@@ -158,11 +158,10 @@
|
||||
<a-form-item label="讲师组织" name="orgName">
|
||||
<a-popover>
|
||||
<template #content>
|
||||
{{ formParam.orgName }}
|
||||
{{ formParam.neworgName }}
|
||||
{{ formParam.orgName }}.
|
||||
</template>
|
||||
|
||||
<a-input disabled v-model:value="formParam.neworgName" class="draitem"
|
||||
<a-input disabled v-model:value="formParam.orgName" class="draitem"
|
||||
placeholder="自动带出讲师的组织,展示主要部分,鼠标浮上去展示所有" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-popover>
|
||||
@@ -261,7 +260,8 @@
|
||||
<a-button type="primary">上传导入文件</a-button>
|
||||
</a-upload>
|
||||
</a-form-item>
|
||||
<a-form-item style="color: #999999;" v-for="(item, index) in filesList">{{ item.name }}</a-form-item>
|
||||
<a-form-item>{{ formParam.filesList }}</a-form-item>
|
||||
<!-- <a-form-item style="color: #999999;" v-for="(item, index) in formParam.filesList">{{ item }}</a-form-item> -->
|
||||
<span></span>
|
||||
</a-form>
|
||||
<div class="del_btnbox">
|
||||
@@ -540,7 +540,8 @@ import SearchTeacher from "@/components/project/SearchTeacher";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { getTeacherSystemList, getTeacherList, getPayRollPlace, getLevel, insertTeacher, deleteInTeacher, updateInTeacher, getTeacherById, updateTeacherState } from "../../api/Lecturer";
|
||||
import { fileUp } from "../../api/indexEval";
|
||||
import { fileUp } from "../../api/indexEval";
|
||||
import { teacherUpload } from "../../api/Teaching";
|
||||
import { getCookieForName } from "@/api/method";
|
||||
// import {getProjSt} from "../../api/indexProjStu";
|
||||
import AddContent from "../../components/project/AddContent.vue"
|
||||
@@ -593,7 +594,7 @@ export default {
|
||||
name: null,
|
||||
certStatus: 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: {
|
||||
currentPage: 1,
|
||||
@@ -614,21 +615,7 @@ export default {
|
||||
},
|
||||
activeName: 'first'
|
||||
})
|
||||
const headers = { token: getCookieForName("token") };
|
||||
//图片上传
|
||||
// const photo = ref('')
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/jpeg" ||
|
||||
file.type === "image/png" ||
|
||||
file.type === "image/bmp" ||
|
||||
file.type === "image/gif";
|
||||
if (!isJpgOrPng) {
|
||||
message.error("仅支持jpg、gif、png、jpeg、bmp格式!");
|
||||
return false;
|
||||
}
|
||||
watch(() => state.formParam.description, (val) => {
|
||||
watch(() => state.formParam.description, (val) => {
|
||||
console.log(val, 'description')
|
||||
})
|
||||
watch(() => state.formParam.workExperience, (val) => {
|
||||
@@ -644,6 +631,20 @@ export default {
|
||||
// state.formParam.neworgName= state.formParam.neworgName[state.formParam.neworgName.length-1]
|
||||
// }
|
||||
})
|
||||
const headers = { token: getCookieForName("token") };
|
||||
//图片上传
|
||||
// const photo = ref('')
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/jpeg" ||
|
||||
file.type === "image/png" ||
|
||||
file.type === "image/bmp" ||
|
||||
file.type === "image/gif";
|
||||
if (!isJpgOrPng) {
|
||||
message.error("仅支持jpg、gif、png、jpeg、bmp格式!");
|
||||
return false;
|
||||
}
|
||||
let isLt1M = file.size < 500000;
|
||||
console.log(file.size, isLt1M)
|
||||
if (!isLt1M) {
|
||||
@@ -667,8 +668,6 @@ export default {
|
||||
};
|
||||
//附件上传
|
||||
const beforeUpload2 = (file) => {
|
||||
console.log(6765555);
|
||||
console.log(file);
|
||||
const fileType = [
|
||||
"pdf",
|
||||
];
|
||||
@@ -682,15 +681,17 @@ export default {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
console.log(file);
|
||||
fileUp(formData).then((res) => {
|
||||
teacherUpload(formData).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.formParam.filesList = [res.data.data];
|
||||
// state.formParam.filesList = [res.data.data];
|
||||
state.formParam.filesList = file.name
|
||||
console.log(state.formParam.filesList);
|
||||
// state.hasImgName = res.data.data;
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
//附件上传交互
|
||||
const handleupdialog = () => {
|
||||
state.updialog = true
|
||||
|
||||
Reference in New Issue
Block a user