上传附件

This commit is contained in:
zhangyc
2022-12-24 00:10:55 +08:00
parent ea31837912
commit c730b97898
11 changed files with 185 additions and 31 deletions

View File

@@ -1954,6 +1954,7 @@
<a-range-picker
style="width: 440px; height: 40px; border-radius: 8px"
:show-time="{ format: 'HH:mm' }"
:disabled-date="disabledDate" :disabled-time="disabledRangeTime"
format="YYYY-MM-DD HH:mm"
v-model:value="xjkkinputV3"
separator="至"
@@ -2106,31 +2107,11 @@
</div> -->
<div class="cstm_items items_fj">
<div class="signbox">
<span style="margin-right: 3px">附件</span>
<span style="margin-right: 3px"></span>
</div>
<div class="b_input">
<a-upload
name="file"
:show-upload-list="false"
:before-upload="beforeUpload3"
>
<div class="upload_box">
<div class="upload_icon">
<img
src="@/assets/images/coursewareManage/enclosure.png"
alt=""
/>
</div>
<span style="color: #4ea6ff">上传附件</span>
</div>
<!-- <template #itemRender="{ file }">
<a-space>
<span :style="file.status === 'error' ? 'color: red' : ''">
{{ file.name }}
</span>
</a-space>
</template> -->
</a-upload>
<FJUpload v-model:value="attach" @changevalue="changevalue"/>
</div>
</div>
<div class="cstm_items">
@@ -2810,6 +2791,7 @@ import {
toRefs,
defineComponent,
ref,
shallowRef,
onMounted,
onBeforeUnmount,
@@ -2817,7 +2799,6 @@ import {
} from "vue";
import * as api from "../../api/indexInvist.js";
import { message } from "ant-design-vue";
import { useRouter, useRoute } from "vue-router";
// import StuAdd from "../../components/drawers/StuAdd";
@@ -2839,6 +2820,7 @@ import {
exportP,
deletePlan,
planList,
editPlan,
studentList,
addStudent,
@@ -2873,6 +2855,7 @@ import { queryExaminationDetailById } from "@/api/indexExam";
import AddHomework from "../../components/drawers/AddHomework.vue";
import AddTest from "../../components/drawers/AddTest.vue";
import TableStudent from "@/components/student/TableStudent";
import FJUpload from "@/components/common/FJUpload";
//列表表格
const columns1 = [
// {
@@ -3382,6 +3365,7 @@ export default defineComponent({
Toolbar,
SeeModal,
CourseModal,
FJUpload,
// StuAdd,
ProjectManager,
ProjOwnerShip,
@@ -4617,6 +4601,22 @@ export default defineComponent({
// label: "专业力",
// },
]);
// 删除文件返回参数
const changevalue = (e) => {
let arr = state.attach.split(',')
let newarr = []
for(let i=0;i<arr.length;i++){
if(i!==e){
newarr.push(arr[i])
}
}
if(newarr.length==0){
state.attach = "";
}else{
state.attach = newarr.toString()
}
console.log('changevalue', e, newarr, state.attach)
}
const options4CurId = ref("");
const options4CurName = ref("张");
const of_hShow = () => {
@@ -5768,11 +5768,32 @@ export default defineComponent({
}
}
);
const range = (start, end) => {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
};
const closeOnlineCoursevisible = () => {
console.log("执行");
getTableDate();
};
const disabledDate = (current) => {
// Can not select days before today and today
console.log('1111', dayjs().endOf('day'))
return current && current < dayjs().startOf('day');
};
const disabledDateTime = () => {
return {
disabledHours: () => range(0, 24).splice(4, 20),
disabledMinutes: () => range(30, 60),
disabledSeconds: () => [55, 56],
};
};
return {
...toRefs(state),
@@ -5780,6 +5801,8 @@ export default defineComponent({
getdateToDateFn,
moment,
disabledDate,
disabledDateTime,
getdateToTimeFn,
handlePostSure,
handleDeleteKaike,
@@ -5805,6 +5828,7 @@ export default defineComponent({
handleOpen,
handleEdit,
handleDelete,
changevalue,
columns1,
columns2,
columns4,