SanHQin há 8 meses atrás
pai
commit
d87487cc6a

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.903ba505a4ccbf11768842aa6934ebb4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.00bfcafc8431113801f1.js></script><script type=text/javascript src=./static/js/vendor.2b137013dd41e15d099d.js></script><script type=text/javascript src=./static/js/app.3ecf81178c45c388ca43.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.c58b78abe655ab46779bf91072d9b150.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.00bfcafc8431113801f1.js></script><script type=text/javascript src=./static/js/vendor.2b137013dd41e15d099d.js></script><script type=text/javascript src=./static/js/app.c6d57d35b909ce5abc64.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.c58b78abe655ab46779bf91072d9b150.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.c58b78abe655ab46779bf91072d9b150.css.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.c6d57d35b909ce5abc64.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.c6d57d35b909ce5abc64.js.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/manifest.00bfcafc8431113801f1.js.map


+ 44 - 3
src/components/pages/classroomObservation/components/baseMessage.vue

@@ -171,10 +171,12 @@
 						<span></span>
 						<!-- <span>(建议视频比例16:9,最多上传1个)</span> -->
 					</div>
+  
 					<div class="m-m-formImage" v-loading="uploadVideoLoading">
+						
 								<div
 									class="m-m-fi-imageItem"
-									style="max-width:60%;"
+									style="max-width:100%;"
 									v-if="!imageList.videoList.length==0"
 									v-for="(item, index) in imageList.videoList?imageList.videoList:[]"
 									:key="index"
@@ -189,10 +191,25 @@
 									<span @click.stop="delVideo('videoList')"></span>
 								</div>
 							<!-- <el-progress v-if="progressData.uploadVideo && !imageList.videoList.length" class="m_m_fi_progress" :percentage="progressData.value"></el-progress> -->
+							<el-popover
+  					  placement="top"
+  					  width="180"
+  					  trigger="hover"
+							style="width: 140px"
+							:disabled="!tid"
+							v-if="(((imageList.videoList&&imageList.videoList.length<=0) || !imageList.videoList) && !progressData.uploadVideo)"
+  					>
+						<div class="m_m_box">
+							<el-button-group style="width: 100%;display: flex;justify-content: center;">
+							  <el-button size="small" @click="localUploadVideo()">本地上传</el-button>
+								<el-button size="small" @click="resourceUploadVideo()">资源库上传</el-button>
+							</el-button-group>
+						</div>
 							<div
+							  slot="reference"
 								class="m-m-fi-imageItem"
 								@click.stop="addVideo()"
-								style="max-width:60%;"
+								style="max-width:100%;"
 								v-if="(((imageList.videoList&&imageList.videoList.length<=0) || !imageList.videoList) && !progressData.uploadVideo)"
 							>
 								<img
@@ -210,6 +227,7 @@
 									点击上传视频
 								</div>
 							</div>
+						</el-popover>
 
 							<div
 								class="m-m-fi-imageItem"
@@ -286,6 +304,7 @@
 		</div>
 		<previewVideoDialog ref="previewVideoDialogRef" />
 		<uploadFile v-if="progressData.uploadVideo" ref="uploadFileRef" @progressUpdate="videoProgressUpdate" @delUpload="videoDelUpload" @success="updateVideoSuccess" @startUpload="videoStartUpload"/>
+		<resourceLibraryDialog ref="resourceLibraryDialogRef" @addFile="resourceLibraryDialogAddFile"/>
 	</div>
 </template>
 
@@ -294,12 +313,14 @@ import previewVideoDialog from './previewVideoDialog.vue';
 import wordcloudEChart from './wordcloudEChart.vue'
 import uploadFile from './uploadFile.vue';
 import { v4 as uuidv4 } from "uuid";
+import resourceLibraryDialog from './resourceLibraryDialog.vue';
 export default {
 	emits: ["saveData", "saveImage", "saveVideo","delImage","saveNephogram"],
 	components:{
 		previewVideoDialog,
 		wordcloudEChart,
-		uploadFile
+		uploadFile,
+		resourceLibraryDialog
 	},
 	props: {
 		data: {
@@ -780,6 +801,26 @@ ${this.data.editorBarData?this.data.editorBarData.content:""}
 			this.$refs.uploadFileRef.stopUpload();
 			this.$refs.uploadFileRef.abortMultipartUpload(this.progressData.key,this.progressData.uploadid);
 		},
+		localUploadVideo(){
+			this.addVideo();
+		},
+		resourceUploadVideo(){
+			this.$refs.resourceLibraryDialogRef.open();
+		},
+		resourceLibraryDialogAddFile(file){
+			let _file = file[0];
+			if(!_file.file.endsWith(".mp4")){
+				this.$message.error("请选择mp4视频文件")
+				return;
+			}
+			this.$emit('saveVideo',{
+					name: _file.name,
+					status: "success",
+					uid: _file.id,
+					url: _file.file,
+			})
+			this.$message.success("上传成功")
+		}
 	},
 	mounted() {
 		// this.showNephogram();

+ 101 - 0
src/components/pages/classroomObservation/components/resourceLibraryDialog.vue

@@ -0,0 +1,101 @@
+<template>
+	<el-dialog title="素材库" :visible="show" :append-to-body="true" width="100%"
+			:before-close="handleClose" class="dialog_diy">
+			<div style="width: 100%;height: 100%;">
+					<fileBox type="2" ref="fileBoxRef" @addFile="addFile"></fileBox>
+			</div>
+	</el-dialog>    
+</template>
+
+<script>
+import fileBox from '../../library.vue';
+export default {
+	components: {
+			fileBox,
+	},
+	props: {
+
+	},
+	data() {
+			return {
+					show:false,
+					progress: 0,
+					isFinishSize: 0,
+					proVisible: false,
+					isAllSize: 0,
+					dialogVisiblefile2: false,
+					userid: this.$route.query.userid,
+					page: 1,
+					isLoading: false,
+					total: 0,
+					chapInfo: [],
+					choose: 0,
+					mtp: require("../../../../assets/tup1.png"),
+					msp: require("../../../../assets/icon/fileIcon/isVideo.png"),
+					mfj: require("../../../../assets/icon/fileIcon/word2.png"),
+			};
+	},
+	methods: {
+		open(){
+			this.show = true;
+			this.$refs.fileBoxRef.getData();
+		},
+		handleClose(done) {
+			this.close();
+					done();
+			},
+			handleClose2(done) {
+					done();
+			},
+			close() {
+				this.show = false;
+			},
+			addFile(file){
+					this.$emit("addFile",file);
+					this.close();
+			}
+
+	}   
+};
+</script>
+
+<style scoped>
+.dialog_diy>>>.el-dialog {
+	height: 100%;
+	margin: 0 auto !important;
+}
+
+.dialog_diy>>>.el-dialog__header {
+	background: #454545 !important;
+	padding: 15px 20px;
+}
+
+.dialog_diy>>>.el-dialog__body {
+	height: calc(100% - 55px);
+	box-sizing: border-box;
+	padding: 0px;
+}
+
+.dialog_diy>>>.el-dialog__title {
+	color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+	top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+	color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+	color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__body,
+.dialog_diy>>>.el-dialog__footer {
+	background: #fafafa;
+}
+
+
+</style>

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff