Commit 011f22db authored by 黄奎's avatar 黄奎

页面修改

parent cf6de52e
import request from '../../utils/request'
import {
Loading
} from 'quasar'
/**
* 获取富文本编辑器Font
*/
......@@ -30,6 +32,9 @@ var uploadMsg = {
* 自定义上传文件
*/
export function UploadSelfFile(path, file, isTrans, callback) {
Loading.show({
message: '正在上传文件,请稍后...'
})
var newPath = '/Upload/' + path + "/";
let url = uploadMsg.uploadUrl + "/Upload?filePath=" + newPath;
if (isTrans && isTrans == 1) {
......@@ -47,6 +52,7 @@ export function UploadSelfFile(path, file, isTrans, callback) {
tempArray.push(uploadMsg.imgDomain + item);
})
}
Loading.hide();
var uploadResult = {
resultCode: 1,
FileName: file.name,
......
......@@ -12,6 +12,16 @@
accept=".doc,.docx,.ppt,.pptx,.xls,.xlsx,.pdf" auto-upload :factory="uploadFile" no-thumbnails>
</q-uploader>
</div>
<div class="text-caption q-my-md q-px-xs text-grey-6">附件
</div>
<div class="text-caption q-my-md q-px-xs text-grey-6" v-if="objOption.SourceUrl!=''">
<a :href="objOption.SourceUrl" :download="objOption.PlanName">{{objOption.PlanName}}</a>
<div class="col-6">
<template v-for="item in tempFileList">
<q-img :src="item" style="height: 140px; max-width: 150px"> </q-img>
</template>
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
......@@ -25,7 +35,8 @@
<script>
import {
saveTeachPlanInfo
saveTeachPlanInfo,
queryTeachPlanInfo,
} from '../../api/course/index'
import {
UploadSelfFile,
......@@ -65,6 +76,7 @@
},
optionTitle: "",
saveCourseLoading: false,
tempFileList: [], //生成文件图片路径
}
},
mounted() {
......@@ -85,7 +97,30 @@
},
//初始化表单
initObj() {
this.optionTitle = "";
if (this.saveObj && this.saveObj.PlanId > 0) {
queryTeachPlanInfo({
PlanId: this.saveObj.PlanId
}).then(res => {
console.log("res", res.Data)
this.objOption.PlanName = res.Data.PlanName;
this.objOption.PlanId = res.Data.PlanId;
this.objOption.CourseId = res.Data.CourseId;
this.objOption.ClassBefore = res.Data.ClassBefore;
this.objOption.ClassIn = res.Data.ClassIn;
this.objOption.ClassAfter = res.Data.ClassAfter;
this.objOption.ParentPlanId = res.Data.ParentPlanId;
this.objOption.SourceUrl = res.Data.SourceUrl;
this.objOption.PlanFileExtension = res.Data.PlanFileExtension;
this.objOption.PlanNodeType = res.Data.PlanNodeType;
this.objOption.ExtUrl = res.Data.ExtUrl;
this.objOption.Remark = res.Data.Remark;
this.tempFileList = res.Data.FileList;
})
this.optionTitle = "重新上传教案信息"
} else {
this.optionTitle = "上传教案"
}
},
//关闭弹窗
closeCourseForm() {
......
......@@ -56,8 +56,8 @@
<teachplan-form v-if="IsShowTeachForm" :CourseId="CourseId" :save-obj="teachPlanObj" @close="closeTeachSaveForm"
@success="refreshPage">
</teachplan-form>
<teachupload-form v-if="IsShowTeachUploadForm" :CourseId="CourseId" :save-obj="teachPlanObj" @close="closeTeachUploadForm"
@success="refreshPage">
<teachupload-form v-if="IsShowTeachUploadForm" :CourseId="CourseId" :save-obj="teachPlanObj"
@close="closeTeachUploadForm" @success="refreshPage">
</teachupload-form>
</div>
</div>
......@@ -169,6 +169,7 @@
//刷新页面
refreshPage() {
this.IsShowTeachForm = false;
this.IsShowTeachUploadForm = false;
this.getteachplanList();
},
//新增修改菜单
......@@ -178,7 +179,13 @@
} else {
this.teachPlanObj = null
}
this.IsShowTeachForm = true
if (obj.PlanNodeType == 0) {
this.IsShowTeachForm = true;
this.IsShowTeachUploadForm = false;
} else if (obj.PlanNodeType == 1) {
this.IsShowTeachForm = false;
this.IsShowTeachUploadForm = true;
}
},
//关闭弹窗
closeTeachSaveForm() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment