OnePsycho 4 лет назад
Родитель
Сommit
04c9403142

+ 10 - 1
TEAMModelOS/ClientApp/src/common/BaseNotification.vue

@@ -1,7 +1,9 @@
 <template>
 	<div class="base-notification">
 		<Poptip :title="$t('utils.newNotice')" class="dark-iview-poptip">
-			<Icon type="md-notifications" />
+			<Badge :count="3">
+				<Icon type="md-notifications" />
+			</Badge>
 			<!-- <div slot="content" class="notice-wrap">
 				<div class="notice-item">
 					<p class="item-name">青城山学校</p>
@@ -37,6 +39,13 @@
 		.dark-iview-poptip .ivu-poptip-popper{
 			padding: 0;
 			top: 40px !important;
+			z-index: 9999;
+		}
+		
+		.ivu-badge-count{
+			height: auto;
+			padding: 2px 3px;
+			line-height: 10px;
 		}
 		
 		.notice-wrap{

+ 0 - 96
TEAMModelOS/ClientApp/src/components/syllabus/DragTree.vue

@@ -151,63 +151,6 @@
 				this.nodeInfo.title = node.data.title
 			},
 
-
-			onRelatedContent(node, data, e) {
-				e.stopPropagation() // 防止点击事件穿透到父层
-				this.isRelatedContent = true
-				this.currentEditData = data
-			},
-
-			onShowContent(val, data) {
-				console.log(data)
-				this.contentIndex = val
-				this.currentItems = []
-				this.currentResources = []
-				// data.items.length && this.findQuestionById(data.items)
-				data.resources.length && this.findResourceById(data.resources)
-				this.isShowContent = true
-			},
-
-			/**
-			 * 通过id查询内容信息
-			 * */
-			findResourceById(ids) {
-
-				this.$api.learnActivity.FindSyllabusResourceById(ids).then(
-					res => {
-						if (!res.error) {
-							this.currentResources = res.result.data
-						} else {
-							this.$Message.error("API ERROR")
-						}
-					},
-					err => {
-						this.$Message.error("API ERROR")
-
-					}
-				)
-
-			},
-			/**
-			 * 通过id查询题目信息
-			 * */
-			findQuestionById(ids) {
-				this.$api.learnActivity.FindQuestionById(ids).then(
-					res => {
-						if (!res.error) {
-							this.currentItems = res.result.data
-						} else {
-							this.$Message.error("API ERROR")
-						}
-					},
-					err => {
-						this.$Message.error("API ERROR")
-
-					}
-				)
-			},
-
-
 			// 提交编辑或者新增
 			onSubmitNode() {
 				if (!this.nodeInfo.title) {
@@ -231,50 +174,11 @@
 					}
 					this.currentParentData.children.push(newChild)
 				}
-
 				this.isEditOrAdd = false
 				this.$parent.hasModify = true
 				this.$Message.success(this.isEditItem ? '编辑成功' : '添加成功')
 			},
 
-
-			/**
-			 * 选择关联题目
-			 * @param val 当前已选题目
-			 */
-			onSelectQuestion(val) {
-				this.questionList = val.questions
-			},
-
-			/**
-			 * 选择关联内容
-			 * @param val 当前已选内容
-			 */
-			onSelectFile(val) {
-				this.fileList = val.files
-				console.log(val)
-			},
-
-			/** 保存内容与题目关联 */
-			onSaveNode() {
-				this.isLoading = true
-				this.currentEditData.items = this.currentEditData.items ? [...new Set(this.currentEditData.items.concat(
-					this.questionList.map(item => item.id)))] : [...new Set(this.questionList.map(item => item.id))]
-				this.currentEditData.resources = this.currentEditData.resources ? [...new Set(this.currentEditData
-					.resources.concat(this.fileList.map(item => item.url)))] : [...new Set(this.fileList.map(item =>
-					item.url))]
-				this.$api.syllabus.SaveOrUpdateAsNodes([this.currentEditData]).then(res => {
-					if (!res.error && res) {
-						this.isRelatedContent = false
-						this.$emit('onTreeUpdate')
-						this.isLoading = false
-						this.$parent.hasModify = true
-					} else {
-						this.$Message.warning('获取数据失败')
-					}
-				})
-			},
-
 		},
 		computed:{
 			isFirstLevel(){

+ 16 - 13
TEAMModelOS/ClientApp/src/view/answersheet/BaseEditor.vue

@@ -313,7 +313,6 @@
 					}
 					
 					// 如果自定义插入的是作文题 则进行对应题型渲染
-					console.log('插入的主观题',subjectiveItem)
 					if(subjectiveItem.maxWords > 0){
 						this.myEditor.txt.clear()
 						addStr = '<p>' +  itemOrder + "、 作文(" + (subjectiveItem.score + "分)") + '</p>'; 
@@ -349,18 +348,22 @@
 						let isNewPage = this.$store.state.answerSheet.isNewPage;
 						let lastBottomGap = 20;
 						let rectTop = editorDom.getBoundingClientRect().top
-						let Y = rectTop + scrollDis - 90;
+						let Y = scrollDis > 90 ? scrollDis - Math.abs(rectTop)  - 90 : rectTop + scrollDis - 90;
 						let paperH = PAPER_H;
 						let curEditorY = Y > paperH ? +((Y % paperH).toFixed(4)) : Y;
 						let curEditorH = editorDom.clientHeight; // 默认200px
-						console.log(itemOrder, 'rectTop', rectTop);
-						console.log(itemOrder, 'scrollDis', scrollDis);
-						console.log(itemOrder, '当前Y', Y);
 						let leftHeight = paperH - curEditorY - lastBottomGap - SVG_BORDER_MB;
-						console.log(itemOrder, '高度', curEditorH)
-						console.log(itemOrder, 'LEFT高度', leftHeight)
 						let fixHeight = curEditorH - leftHeight + 20
-						console.log(itemOrder, '需要fix的高度', fixHeight)
+						if(itemOrder === 6){
+							console.log(itemOrder, 'rectTop', rectTop);
+							console.log(itemOrder, 'scrollDis', scrollDis);
+							console.log(itemOrder, '距离第一页顶点的Y', Y);
+							console.log(itemOrder, '距离当前页面顶点的Y', curEditorY);
+							console.log(itemOrder, '高度', curEditorH)
+							console.log(itemOrder, 'LEFT高度', leftHeight)
+							console.log(itemOrder, '需要fix的高度', fixHeight)
+						}
+						
 						// 如果 渲染当前富文本的时候 需要渲染的高度超过当前页的剩余高度 则需要进行加页处理
 						if (curEditorY + curEditorH + lastBottomGap + SVG_BORDER_MB > PAPER_H) {
 							// console.log(itemOrder, Y , curEditorY , curEditorH , '超出了')
@@ -373,8 +376,8 @@
 								heightArr.push(leftHeight)
 								// 如果渲染的客观题高度在这个区间 才需要在下一页添加补充作答区域 其余全部按照正常 跨页处理不需要补充作答区域
 								let fixCount = Math.ceil(fixHeight / SVG_BORDER_PROP.height)
-								console.log(itemOrder + "需要处理跨页,数量为" + fixCount);
-								console.log(itemOrder + "剩余渲染高度" + fixHeight);
+								// console.log(itemOrder + "需要处理跨页,数量为" + fixCount);
+								// console.log(itemOrder + "剩余渲染高度" + fixHeight);
 								for(let i = 0;i < fixCount;i++){
 									this.fixArr.push(0)
 										let curFixHeight = fixHeight > SVG_BORDER_PROP.height  ? SVG_BORDER_PROP.height - 30 : fixHeight
@@ -388,8 +391,8 @@
 								this.$nextTick(() => {
 									let splitHtmlArr = this.getSplitHtml(this.pArr,heightArr)
 									splitHtmlArr.forEach((curEditorContent,editorIndex) => {
-										console.log('富文本的分割高度',heightArr)
-										console.log('富文本的分割',splitHtmlArr)
+										// console.log('富文本的分割高度',heightArr)
+										// console.log('富文本的分割',splitHtmlArr)
 										
 										let editorHeight = curEditorContent.html === '' ? heightArr[editorIndex] : heightArr[editorIndex]
 										// let curEditorContent = this.getSplitHtml(this.pArr,curEditorHeight)
@@ -902,7 +905,7 @@
 		top: 10px;
 		font-size: 12px;
 		background-color: orangered;
-		display: inline-flex;
+		display: none;
 		justify-content: center;
 		align-items: center;
 		color: #fff;

+ 5 - 1
TEAMModelOS/ClientApp/src/view/evaluation/index/index.vue

@@ -2,7 +2,7 @@
     <div class="evaluation">
         
         <Loading :top="100" v-show="dataLoading" type="3"></Loading>
-        <vuescroll ref="evScroll" id="evScroll">
+        <vuescroll ref="evScroll" id="evScroll" @handle-scroll="handleScroll">
             <div class="ev-body">
                 <div class="ev-content">
                     <router-view />
@@ -42,6 +42,10 @@
               name: name
             })
       },
+	  // 判断容器滚动距离
+	  handleScroll(vertical, horizontal, nativeEvent) {
+	  	console.log(vertical.scrollTop)
+	  },
 
       
     },

+ 1 - 1
TEAMModelOS/ClientApp/src/view/questionnaire/ManageQuestionnaire.less

@@ -181,7 +181,7 @@
 
     .qn-info-box {
         border-right: 1px solid @borderColor;
-		background-color: #2b2b2e;
+		background-color: #242328;
 
         .qn-info-wrap{
             color:#AAAAAA !important;

+ 1 - 1
TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.less

@@ -15,7 +15,7 @@
 		display: flex;
 		align-items: center;
 		padding-left: 15px;
-		z-index: 999;
+		z-index: 10;
 		
 		.subject-select{
 			&-item{

+ 14 - 5
TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.vue

@@ -102,7 +102,7 @@
 							<img src="../../assets/source/zip.png" v-else-if="item.type === 'res'" />
 							<img src="../../assets/source/image.png" v-else-if="item.type === 'thum'" />
 							<img src="../../assets/source/unknow.png" v-else="item.type === 'other'" />
-							<span v-html="item.title"></span>
+							<span v-html="getSimpleText(item.title)" style="max-width: 70%;"></span>
 							<div class="node-resource-tools">
 								<div class="node-resource-tool" @click="onPreview(item)">
 									<Icon type="md-eye" />
@@ -197,8 +197,8 @@
 			<div class="modal-header" slot="header">
 				选择{{ isSchool ? '共编' : '分享' }}教师
 			</div>
-			<InviteTeacher :node="curShareNode"></InviteTeacher>
-			<Button slot="footer" @click="onRelateContent" style="margin-bottom: 20px;" class="modal-btn">确认</Button>
+			<InviteTeacher :node="curShareNode" ref="inviteRef"></InviteTeacher>
+			<Button slot="footer" @click="doInviteTeacher" style="margin-bottom: 20px;" class="modal-btn">确认</Button>
 		</Modal>
 
 		<!-- 预览试题试卷弹窗 -->
@@ -343,6 +343,11 @@
 					}
 				});
 			},
+			/* 提取富文本内容中的文本 */
+			getSimpleText(html) {
+				html = html || '';
+				    return html.replace(/<[^>]+>/g, "");//去掉所有的html标记
+			},
 			/* 切换学段的操作 */
 			onPeriodChange(val) {
 				this.subjectList = this.periodList[val].subjects;
@@ -460,8 +465,8 @@
 				this.curNode.rnodes = []
 				this.curNode.id = ''
 				this.$api.syllabus.GetTreeByVolume({
-					id: volume.id,
-					code: volume.code.replace('Volume-', ''),
+					code: volume.id,
+					// code: volume.code.replace('Volume-', ''),
 					scope: volume.scope
 				}).then(res => {
 					if (!res.error) {
@@ -520,6 +525,10 @@
 				this.curShareNode = data
 				this.isInviteModal = true
 			},
+			/* 点击确认进行课纲的共编或者分享功能 */
+			doInviteTeacher(){
+				let selectedTeacher = this.$refs.inviteRef.teacherList
+			},
 			/* 添加超链接 */
 			onAddLink() {
 				this.$refs.treeRef.curNode.rnodes.push({

+ 1 - 1
TEAMModelOS/ClientApp/src/view/vote/ManageVote.less

@@ -148,7 +148,7 @@
 
     .hw-info-box {
         width: 100%;
-		background-color: #2b2b2e;
+		background-color: #242328;
         border-right: 1px solid @borderColor;
     }