讲师管理bug

This commit is contained in:
zhangsir
2024-12-01 16:52:48 +08:00
parent 3c76e1b2d2
commit c5ea811d69
2 changed files with 322 additions and 34 deletions

View File

@@ -113,21 +113,21 @@
</div>
</div>
<!-- 弹窗组件 -->
<a-drawer v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false"
<a-drawer v-model:visible="teacherdialog" placement="right" :closable="false" :maskClosable="false"
width="800" :title="false">
<div class="headers" style="margin-top:-24px;">
<div class="headerTitle" style="margin-left: 30px;">{{ teacherdialogtitle }}</div>
<div class="headerTitle" style="margin-left: 14px;">{{ teacherdialogtitle }}</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="@/assets/images/basicinfo/close.png"
@click="cancelTeacherDialog"
/>
</div>
<div style="padding-left: 40px;padding-right: 158px;">
<div ref="drawerContent" id="drawerScorll" style="padding-left: 40px;padding-right: 158px;">
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
<a-row>
<a-col :span="24">
<span class="line"></span><span>基本信息</span>
<span class="line"></span><span style="color:#333333;font-weight: 600;">基本信息</span>
</a-col>
</a-row>
<a-row :gutter="16">
@@ -222,7 +222,7 @@
</a-row>
<a-row>
<a-col :span="24">
<span class="line" style="margin-bottom:10px;"></span><span>其他信息</span>
<span class="line" style="margin-bottom:10px;"></span><span style="color:#333333;font-weight: 600;">其他信息</span>
</a-col>
</a-row>
<a-row :gutter="16">
@@ -252,11 +252,16 @@
<a-tag color="blue" style="line-height: 40px; ">管理业务</a-tag>
</a-col> -->
<a-col :span="20">
<div class="add_content" @click="addContentData">+</div>
<!-- <div class="add_content" @click="addContentData">
<div class="text">+</div>
</div> -->
<div class="add_list">
<div :title="item.name" class="add_item" v-for="(item,index) in formParam.orgLists">
{{item.name}}
</div>
<div class="add_content" @click="addContentData">
<div class="text">+</div>
</div>
</div>
</a-col>
</a-row>
@@ -269,6 +274,7 @@
style="margin-top: 400px"
@cancel="cancelupdialog"
:maskClosable="false"
:destroyOnClose="true"
>
<div class="selectonlineface" style="width: 660px;" :style="{ display: updialog ? 'block' : 'none' }">
<div class="bg_headers"></div>
@@ -281,8 +287,8 @@
<a-form style="margin-top:30px ;">
<a-form-item style="color: #999999;">注意 :文件支持PDFPNGJPG ,文件大小不可超过5MB</a-form-item>
<a-form-item label="上传文件">
<UploadDragger :size="5000000" ref="uploadRef" style="width:80%;" @change="changeUpload" :accept="accept"
:uploadUrl="uploadUrl" :params="folderId" />
<UploadDragger :size="5000000" ref="uploadRef" style="width:86%;height:148px;" @change="changeUpload" :accept="accept"
@removeList="removeList" :uploadUrl="uploadUrl" :params="folderId" :loadTrue="formParam.certificationName" />
</a-form-item>
</a-form>
<div class="bg_footer" style="margin-left: 160px;margin-top: 30px">
@@ -381,7 +387,7 @@
</div>
</template>
<script lang="jsx">
import { reactive, toRefs, ref, watch,computed,onMounted } from "vue";
import { reactive, toRefs, ref, watch,computed,onMounted,nextTick } from "vue";
import { useStore } from "vuex";
import {
RightOutlined,
@@ -400,7 +406,7 @@ import { teacherUpload } from "../../api/Teaching";
import { getCookieForName } from "@/api/method";
// import {getProjSt} from "../../api/indexProjStu";
import AddContent from "../../components/project/AddContent.vue"
import UploadDragger from "@/components/Grateful/UploadDragger.vue"
import UploadDragger from "@/components/project/UploadDragger.vue"
import avatar from '@/assets/avatar.png'
import LookInsideLecturer from "../../components/project/LookInsideLecturer.vue"
export default {
@@ -564,8 +570,8 @@ export default {
const changeUpload = (newValue) => {
if (newValue[0].status == 'done' && newValue[0]?.response?.status == 200) {
const { id, name, path } = newValue[0].response.result
state.formParam.certification = path
state.formParam.certificationName = name
state.formParam.certifications = path
state.formParam.certificationNames = name
}
}
@@ -599,13 +605,19 @@ export default {
state.updialog = true
}
const cancelupdialog = () => {
state.formParam.certification = null
state.formParam.certificationName = null
uploadRef.value.removeUpload()
// state.formParam.certification = null
// state.formParam.certificationName = null
// uploadRef.value.removeUpload()
state.updialog = false
}
const removeList = (val) => {
state.formParam.certifications = null
state.formParam.certificationNames = null
}
const createupdialog = () => {
uploadRef.value.removeUpload()
// uploadRef.value.removeUpload()
state.formParam.certification = state.formParam.certifications
state.formParam.certificationName = state.formParam.certificationNames
state.updialog = false
}
const LecturerSystemList = ref([
@@ -635,12 +647,10 @@ export default {
console.log(val, 'val')
}
const drawerContent = ref(null);
const addContentData = () => {
state.showContent = true
}
watch(()=>state.showContent, (newVal)=>{
console.log(state.formParam.orgLists,'xixixixixi')
})
const AddContentList = (data) => {
// console.log(data, 'treedatalist')
// state.formParam.orgLists = data
@@ -1249,6 +1259,8 @@ export default {
name: names[index],
id: id
}))||[]
state.formParam.certifications = state.formParam.certification
state.formParam.certificationNames = state.formParam.certificationName
}
@@ -1341,6 +1353,7 @@ export default {
infoteacherList,
getinfoteacher,
addContentData,
drawerContent,
isupload,
AddContentList,
beforeUpload2,
@@ -1352,13 +1365,14 @@ export default {
handleupdialog,
cancelupdialog,
createupdialog,
removeList,
}
},
};
</script>
<style lang="scss" scoped>
.headers {
height: 73px;
height: 56px;
border-bottom: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
@@ -1731,15 +1745,19 @@ export default {
}
.add_content {
width: 40px;
height: 40px;
width: 20px;
height: 20px;
cursor: pointer;
border-radius: 50%;
background-color: #4ea6ff;
text-align: center;
line-height: 40px;
color: #ffffff;
font-size: 26px;
display: flex;
justify-content: center;
align-items: center;
.text{
font-size: 20px;
color: #fff;
margin-top: -4px;
}
}
.add_list{
width: 150%;
@@ -1747,18 +1765,37 @@ export default {
flex-wrap: wrap;
margin-top: 10px;
// overflow: auto;
& div{
.add_item{
padding: 0 10px;
background: aliceblue;
color: #096dd9;
background: #e6f7ff;
border: 1px solid #91d5ff;
margin-left: 10px;
width: 140px;
height: 40px;
line-height: 40px;
width: 66px;
height: 22px;
line-height: 22px;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 20px;
font-size: 12px;
}
.add_content {
width: 20px;
height: 20px;
cursor: pointer;
border-radius: 50%;
background-color: #4ea6ff;
display: flex;
justify-content: center;
align-items: center;
margin-left: 10px;
.text{
font-size: 20px;
color: #fff;
margin-top: -4px;
}
}
}
//导出按钮icon
@@ -1978,10 +2015,10 @@ export default {
.line {
float: left;
width: 3px;
height: 25px;
height: 17px;
background: #4ea6ff;
border-radius: 30%;
margin-right: 5px;
margin-left: -14px;
margin-top: 3px;
}
//抽屉功能