于添 6 mēneši atpakaļ
vecāks
revīzija
541595ac60

+ 5 - 6
.env.development

@@ -5,12 +5,11 @@ NODE_ENV = development
 VITE_TITLE = 飞行学院
 
 # 接口地址
-#VITE_API_BASEURL = http://192.168.31.56:19003
-#VITE_API_BASEURL = http://192.168.31.80:19003
-VITE_API_BASEURL = http://192.168.1.213:9003
-#VITE_API_BASEURL = http://192.168.1.245:9003
-VITE_FILEURL = http://192.168.1.213:10005/education/
-#VITE_FILEURL = http://192.168.31.14:10005/education/
+VITE_API_BASEURL = http://192.168.1.245:9003
+# VITE_API_BASEURL = http://192.168.31.81:19003
+VITE_FILEURL = http://192.168.1.245:10005/education/
+# VITE_API_BASEURL = http://192.168.31.14:9003
+# VITE_API_BASEURL = http://192.168.31.6:9003
 
 # 本地端口
 VITE_PORT = 9000

+ 1 - 1
src/api/resourceAudit.js

@@ -89,7 +89,7 @@ export default {
 	},
 	// 学院接口
 	orgList(data = {}) {
-		return request('sys/org/queryList', data, 'get')
+		return request('bus/org/queryList', data, 'get')
 	},
 	//根据学院id和专业id查询班级
 	gradeByZyAndOrgId(data = {}) {

+ 27 - 2
src/components/UpLoadBreakPoint/index.vue

@@ -13,7 +13,7 @@
 			>
 				<div style="padding: 40px; text-align: center">
 					<span class="text"> 点击上传或将文件拖拽至此区域上传 </span>
-					<p class="text">按住Ctrl可同时多选,支持上传PPT/excel/pdf/mp4/zip/rar,等单个文件不能超过2G</p>
+					<p class="text">按住Ctrl可同时多选,支持上传{{props.upLoadfileLists.join('/')}},等单个文件不能超过2G</p>
 				</div>
 			</a-upload-dragger>
 	</a-spin>
@@ -133,7 +133,11 @@
 		uploadCount: {
 			type: Number,
 			default: () => 10
-		}
+		},
+		upLoadfileLists: {
+			type: Array,
+			default: () => ['jpg','png','pdf','mp4','docx','doc','xlsx','xls','pptx','ppt','txt','cad','zip','rar']
+		},
 	})
 
 	const handlerRemoveItem = (index) => {
@@ -646,9 +650,30 @@
 	const downloadFile = (url) => {
 		window.location.href = url
 	}
+	/**
+	 * 判断文件名的后缀是否存在于指定数组中
+	 * @param {string} fileName - 文件名(如 "sss.mp4")
+	 * @param {Array<string>} suffixArray - 后缀数组(如 ['jpg','png','pdf','mp4',...])
+	 * @returns {boolean} - 是否存在
+	 */
+	const isFileSuffixInArray = (fileName, suffixArray) => {
+		// 获取文件后缀(包括点号)
+		const fileSuffix =  fileName.split('.').pop();
+
+		// 检查后缀是否在数组中(包含点号匹配)
+		return suffixArray.includes(fileSuffix);
+	}
 	const beforeUpload = async (file) => {
 		console.log('选择了文件', file)
 		spinning.value = true
+
+		// upLoadfileLists
+		if(!isFileSuffixInArray(	file.name,props.upLoadfileLists)){
+			const fileSuffix =  file.name.split('.').pop();
+			message.error('不允许上传后缀' +fileSuffix)
+			spinning.value = false
+			return false
+		}
 		if(uploadFileList.value.length >= props.uploadCount){
 			message.error('超过上传条目' + props.uploadCount + "条")
 			spinning.value = false

+ 11 - 0
src/views/answerManagement/components/DialogView.vue

@@ -97,6 +97,15 @@ const edit = (item) => {
 	})
 
 }
+
+const handlePaste = (e) => {
+	const clipboardData = e.clipboardData;
+	const types = clipboardData.types;
+	if (types.includes('Files')) {
+// 禁止粘贴图片
+		e.preventDefault();
+	}
+}
 const handleOk = (e) => {
 	formRef.value.validate().then(() => {
 		let json = JSON.parse(JSON.stringify(formState))
@@ -125,6 +134,8 @@ const handleOk = (e) => {
 }
 onMounted(() => {
 	// getOrgTreeSelector()
+	let quill = quillEditorRef.value.quill;
+	quill.root.addEventListener('paste', handlePaste, false);
 })
 
 defineExpose({open,edit})

+ 2 - 2
src/views/courseAdd/components/courseProduction/ListView.vue

@@ -138,7 +138,7 @@ const handleDelete = (record) => {
 }
 const getList = () => {
 
-	courceDownList({...pagination}).then((data) => {
+	courceDownList({...pagination,...{isVedio:1}}).then((data) => {
 		if (data.code == 200) {
 			let list = []
 			for (let i = 0; i < data.data.records.length; i++) {
@@ -157,7 +157,7 @@ const getList = () => {
 const setList = (search) => {
 	formState.value = search
 	pagination.current = 1
-	courceDownList({...pagination, ...search}).then((data) => {
+	courceDownList({...pagination, ...search,...{isVedio:1}}).then((data) => {
 		if (data.code == 200) {
 			dataSource.value = data.data.records
 			pagination.current = data.data.current

+ 2 - 5
src/views/courseAdd/components/courseProduction/resourceUpload.vue

@@ -125,12 +125,9 @@
 				@confirm="confirmUser"
 			></userSelection>
 		</a-form>
-		<template v-if="isState == 0">
-
 			<!-- 资源上传 -->
 			<!-- <UploadModal @success="uploadSuccess"></UploadModal> -->
-			<UpLoadBreakPoint ref="UpLoadBreakPointRef" @onSuccess="onSuccess"></UpLoadBreakPoint>
-		</template>
+			<UpLoadBreakPoint ref="UpLoadBreakPointRef" :upLoadfileLists="['mp4']" @onSuccess="onSuccess"></UpLoadBreakPoint>
 	</a-modal>
 </template>
 
@@ -208,7 +205,7 @@ const userRelateIdss = ref([])
 const uploadModalVisible = ref(false)
 // 用户选择模态框
 const userReleaseVisible = ref(false)
-const UpLoadBreakPointRef = ref(false)
+const UpLoadBreakPointRef = ref(null)
 const files = ref({})
 // 文件列表
 const fileList = ref([])

+ 4 - 1
src/views/myResources/myResources.vue

@@ -187,7 +187,7 @@
 												下载
 											</a>
 										</a-menu-item>
-										<a-menu-item v-if="formState.verifyStatus !== '2'">
+										<a-menu-item >
 											<a href="javascript:;" @click="edit(record)">编辑</a>
 										</a-menu-item>
 										<a-menu-item v-if="formState.verifyStatus !== '2'">
@@ -877,7 +877,10 @@
 	const edit = (record) => {
 		console.log('Restore:', record)
 		uploadModalVisible.value = true
+
+		console.log('打开什么呢:', formState.verifyStatus)
 		isState.value = 1
+		formState.verifyStatus = '0,3'
 		editResourcesId.value = record.id
 	}
 	//资源删除

+ 4 - 0
src/views/myResources/resourceUpload.vue

@@ -507,6 +507,10 @@
 			// formState.majorId = res.data.majorId
 			formState.keywordValue = res.data.keywordValue?.split(',')
 			formState.keyword = res.data.keyword.split(',').filter(Boolean).map(Number)
+
+			formState.isRecommend = Number(res.data.isRecommend) || 0
+			formState.isHot = Number(res.data.isHot) || 0
+			formState.authType = res.data.authType
 		})
 	}
 	// 获取历史添加表单

+ 4 - 2
src/views/myResources/userSelection.vue

@@ -169,8 +169,10 @@
 	// 替换原来的onSelect方法
 	const onCheck = (checkedKeysValue, { checked, node, checkedNodes }) => {
 		// 过滤掉非叶子节点
-		const leafNodes = checkedNodes.filter((node) => node.isLeaf)
-		checkedKeys.value = leafNodes.map((node) => node.id)
+		const leafNodes = checkedNodes.filter((node) => node.isLeaf && node.infoType == 'user')
+		checkedKeys.value = leafNodes.map((node) => {
+				return  node.id
+		})
 		selectedUsers.value = leafNodes.map((node) => ({
 			id: node.id,
 			name: node.name

+ 1 - 1
src/views/portal/components/Header.vue

@@ -47,7 +47,7 @@
 
 
 
-<!--						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="forum">论坛</a-menu-item>-->
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="forum">论坛</a-menu-item>
 
 						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="resourceConversionLog">资源转换</a-menu-item>
 						<!--					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="portal/courseManagement">站内信</a-menu-item>-->

+ 1 - 4
vite.config.js

@@ -41,10 +41,7 @@ export default defineConfig(({command, mode}) => {
 			port: envConfig.VITE_PORT,
 			proxy: {
 				'/api': {
-					target: 'http://192.168.1.213:19003',
-					// target: 'http://192.168.1.235:9003',
-					// target: 'http://192.168.31.15:9003',
-					// target: 'http://192.168.31.15:9003',
+					target: 'http://192.168.1.245:9003',
 					ws: false,
 					changeOrigin: true
 					// rewrite: (path) => path.replace(/^\/api/, '')