Browse Source

Merge branch 'develop5.0-tmd' of http://106.12.23.251:10000/TEAMMODEL/TEAMModelOS into develop5.0-tmd

liqk 4 years ago
parent
commit
18343e8e9e

+ 68 - 0
TEAMModelOS.SDK/Models/Cosmos/School/ExamInfo.cs

@@ -60,6 +60,9 @@ namespace TEAMModelOS.SDK.Models
        
         public int year { get; set; }
         public string range { get; set; }
+        /// <summary>
+        /// 评测类型
+        /// </summary>
         public string source { get; set; }
         public List<string> classes { get; set; }
         public List<PaperSimple> papers { get; set; }
@@ -120,7 +123,72 @@ namespace TEAMModelOS.SDK.Models
         //题目类型
         public List<string> type { get; set; } = new List<string>();
         public List<int> field { get; set; } = new List<int>();
+
         //public List<Dictionary<string, int>> record { get; set; } = new List<Dictionary<string, int>>();
+        public SheetConfig sheet { get; set; } 
+    }
+
+    public class SheetConfig
+    {
+        /// <summary>
+        ///  //列数
+        /// </summary>
+        public int columns { get; set; }
+        /// <summary>
+        /// 页面大小(回字组成的)
+        /// </summary>
+        public int pageWidth { get; set; }
+        /// <summary>
+        /// 页面大小(回字组成的)
+        /// </summary>
+        public int pageHeight { get; set; }
+        /// <summary>
+        /// 页码块数量
+        /// </summary>
+        public int pageNumBlockCount { get; set; }
+        /// <summary>
+        /// 页码起始值, 起始是3个空格方块开始,写1; 2个空格1个实心,写0
+        /// </summary>
+        public int pageNumStartValue { get; set; }
+        /// <summary>
+        /// 二值化区间(pc)-->不同扫描仪的结果图像数据有差距, 按需调整
+        /// </summary>
+        public List<int> threshValue { get; set; } = new List<int> { 190,220,10};
+        /// <summary>
+        /// 二值化区间(手机)
+        /// </summary>
+        public List<int> threshValuePhone { get; set; }=new List<int> { 190,220,10};
+        /// <summary>
+        /// 单个整体回字大小
+        /// </summary>
+        public int huiSize { get; set; } = 70;
+        /// <summary>
+        /// 最小回字的大小比列, 以回字最中间的方块为最小
+        /// </summary>
+        public double minHuiSize { get; set; } = 0.005;
+        /// <summary>
+        /// 最大回字的大小比列, 以回字最外层的方块为最大
+        /// </summary>
+        public double maxHuiSize { get; set; } = 0.1;
+        /// <summary>
+        /// 不检测回字区域(pc版辅助效果20%, 手机版50%)
+        /// </summary>
+        public List<double> notHuisRect { get; set; } = new List<double> { 0.3, 0.3, 0.4, 0.4 };
+        /// <summary>
+        /// 内容块 vblockCount为该模块竖向的方块数 hblockCount为该模块横向方块数
+        /// </summary>
+        public List<ConfigContent> contents { get; set; }
+    }
+
+    public class ConfigContent {
+        public int type { get; set; }
+        public int x { get; set; }
+        public int y { get; set; }
+        public int width { get; set; }
+        public int height { get; set; }
+        public int pageNum { get; set; }
+        public int vblockCount { get; set; }
+        public int hblockCount { get; set; }
     }
     /*public class Condition
     {

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

@@ -620,6 +620,8 @@
 				this.nodeInfo.parent = node.parent.data.title || this.volume.name
 				this.nodeInfo.title = node.data.title
 				this.nodeInfo.id = node.data.id
+				this.nodeInfo.creatorId = this.$store.state.userInfo.TEAMModelId
+				node.creatorId = this.$store.state.userInfo.TEAMModelId
 				this.curNode = node
 			},
 			/* 根据节点获取它所在的章节信息 */
@@ -639,6 +641,7 @@
 				}
 				if (this.isEditItem) {
 					this.currentEditData.title = this.nodeInfo.title
+					this.currentEditData.creatorId = this.$store.state.userInfo.TEAMModelId
 				} else {
 					let newChild = Object.assign({}, this.nodeInfo) // 创建新节点
 					let parentNode = this.currentParentData

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/knowledge.js

@@ -1,4 +1,5 @@
 export default {
+	colorTip:'* 绿色背景代表所选知识点,蓝色背景代表知识块关联的知识点',
     subject: '学科',
     label: '名称',
     blockP: '请输入知识块名称',

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/knowledge.js

@@ -1,4 +1,5 @@
 export default {
+	colorTip:'*綠色背景代表所選知識點,藍色背景代表知識塊關聯的知識點',
     subject: '學科',
     label: '名稱',
     blockP: '請輸入知識塊名稱',

+ 11 - 11
TEAMModelOS/ClientApp/src/view/knowledge-point/index/Index.less

@@ -2,16 +2,16 @@
 @borderColor: #444444;
 @primary-textColor:#e0e0e0; //文本主颜色
 @second-textColor:#a5a5a5; //文本副级颜色
-@primary-fontSize:16px;
-@second-fontSize:14px;
-@title-fontSize:18px;
+@primary-fontSize:14px;
+@second-fontSize:12px;
+@title-fontSize:16px;
 
 .new-syllabus {
 
 
     &-container {
         height: 100%;
-        background: @main-bgColor;
+        // background: @main-bgColor;
     }
 
     &-header {
@@ -24,10 +24,11 @@
         z-index: 1;
 
         .school-tools {
-            font-size: var(--font-size-normal);
-            margin-right: 30px;
-            margin-top: 13px;
-            float: right;
+            position: absolute;
+            right: 20px;
+            background-color: #1fb06d;
+            color: #fff;
+            border: none;
         }
 
         .school-tools .ivu-icon {
@@ -120,7 +121,7 @@
                     }
 
                     &-info {
-                        padding: 1px 0;
+                        margin-top: 5px;
                         font-size: @second-fontSize;
                         color: @second-textColor;
 
@@ -205,7 +206,6 @@
 
         .ns-col3 {
             width: 66%;
-            background: #2c2c2cd6;
 
 
             .btn-compose-block {
@@ -218,7 +218,7 @@
             .points-wrap {
                 display: flex;
                 flex-wrap: wrap;
-                padding-top: 20px;
+                padding-top: 5px;
 
                 .point-item {
                     position: relative;

+ 123 - 45
TEAMModelOS/ClientApp/src/view/knowledge-point/index/Index.vue

@@ -6,14 +6,14 @@
 	<div class="new-syllabus-container">
 		<Loading :top="200" bgColor="rgba(103, 103, 103, 0.27)" type="1" v-if="isLoading"></Loading>
 		<!-- 课纲头部 切换来源以及选择学段 -->
-		<div class="new-syllabus-header common-save-btn">
+		<div class="new-syllabus-header">
 			<div class="new-syllabus-select">
-				<span>{{$t("knowledge.period")}}:</span>
-				<Select ref="periodSelect" v-model="currentPeriodIndex" style="width:100px;" @on-change="onPeriodChange">
+				<!-- <span>{{$t("knowledge.period")}}:</span> -->
+				<Select ref="periodSelect" v-model="currentPeriodIndex" style="width:200px;" @on-change="onPeriodChange" @on-select="onPeriodSelect">
 					<Option v-for="(item,index) in periodList" :value="index" :key="index">{{ item.name }}</Option>
 				</Select>
 			</div>
-			<Button v-if="$access.ability('admin','schoolSetting-upd').validateAll" :disabled="!updated"  class="school-tools ivu-btn ivu-btn-default" icon="ios-albums-outline" @click="saveData()">{{$t('schoolBaseInfo.saveInfo')}}</Button>
+			<Button type="success" v-if="$access.ability('admin','schoolSetting-upd').validateAll && updated"  class="school-tools ivu-btn ivu-btn-default" icon="ios-albums-outline" @click="saveData()">{{$t('schoolBaseInfo.saveInfo')}}</Button>
 		</div>
 		<!-- 主体内容 -->
 		<div class="new-syllabus-content">
@@ -74,6 +74,7 @@
 							<EmptyData :top="100"></EmptyData>
 						</div>
 						<div v-else>
+							<p style="font-size: 12px;font-weight: 400;margin-left: 10px;margin-top: 10px;color: #888686;">{{$t("knowledge.colorTip")}}</p>
 							<draggable class="points-wrap" tag="div" v-model="pointList" v-bind="dragOptions">
 								<transition-group type="transition" :name="!drag ? 'flip-list' : null" class="points-wrap">
 									<div v-for="(item,index) in pointList" :key="index" :class="['point-item', isBlockPoint(item) ? 'block-point-item' : '' , isChecked(item) ? 'point-item-active' : '']"
@@ -251,7 +252,8 @@ import { json } from 'd3'
 				pointIndex: null,
 				pointDatas: {},
 				updated: false,
-				setCount: false
+				setCount: false,
+				prePeriodIndex:0
 			}
 		},
 		components: {
@@ -450,56 +452,130 @@ import { json } from 'd3'
 				}
 				this.handleSubjectTap(0)
 			},
+			
+			onPeriodSelect(){
+				this.prePeriodIndex = this.currentPeriodIndex
+			},
 
 			// 学段切换处理
 			onPeriodChange(index) {
 				this.$nextTick(() => {
-					this.preSelectVal = this.$refs.periodSelect.value
-					if (this.hasModify) {
-						this.handleConfirmSave({}, '3')
-					} else {
-						let that = this
-						this.isLoadSubject = true
-						this.activePeriodIndex = index
-						this.currentParams.periodId = this.originData.period[index].id
-						this.subjectList = this.periodList[index].subjects // 切换学段后更新 学科 列表
-						this.originSubjectList = this.periodList[index].subjects // 筛选学科源数据
-						if (this.subjectList.length) {
-							this.handleSubjectTap(0)
-							this.initBlockCount()
+					if(this.updated){
+						this.$Modal.confirm({
+							title: this.$t('schoolBaseInfo.saveWarning'),
+							content: this.$t('schoolBaseInfo.ssTips8'),
+							okText: this.$t('schoolBaseInfo.leaveText'),
+							onOk: () => {
+							   this.updated = false
+							   this.preSelectVal = this.$refs.periodSelect.value
+							   if (this.hasModify) {
+							   	this.handleConfirmSave({}, '3')
+							   } else {
+							   	let that = this
+							   	this.isLoadSubject = true
+							   	this.activePeriodIndex = index
+							   	this.currentParams.periodId = this.originData.period[index].id
+							   	this.subjectList = this.periodList[index].subjects // 切换学段后更新 学科 列表
+							   	this.originSubjectList = this.periodList[index].subjects // 筛选学科源数据
+							   	if (this.subjectList.length) {
+							   		this.handleSubjectTap(0)
+							   		this.initBlockCount()
+							   	} else {
+							   		this.pointList = []
+							   		this.originBlockList = []
+							   		this.blockList = []
+							   		this.originPointList = []
+							   	}
+							   	setTimeout(function () {
+							   		that.isLoadSubject = false
+							   	}, 400)
+							   }
+							},
+							onCancel: () => {
+							    this.currentPeriodIndex = this.prePeriodIndex
+							}
+						})
+					}else{
+						this.preSelectVal = this.$refs.periodSelect.value
+						if (this.hasModify) {
+							this.handleConfirmSave({}, '3')
 						} else {
-							this.pointList = []
-							this.originBlockList = []
-							this.blockList = []
-							this.originPointList = []
+							let that = this
+							this.isLoadSubject = true
+							this.activePeriodIndex = index
+							this.currentParams.periodId = this.originData.period[index].id
+							this.subjectList = this.periodList[index].subjects // 切换学段后更新 学科 列表
+							this.originSubjectList = this.periodList[index].subjects // 筛选学科源数据
+							if (this.subjectList.length) {
+								this.handleSubjectTap(0)
+								this.initBlockCount()
+							} else {
+								this.pointList = []
+								this.originBlockList = []
+								this.blockList = []
+								this.originPointList = []
+							}
+							setTimeout(function () {
+								that.isLoadSubject = false
+							}, 400)
 						}
-						setTimeout(function () {
-							that.isLoadSubject = false
-						}, 400)
 					}
+					
 				})
 			},
 
 			// 学科点击事件
 			handleSubjectTap(index) {
-				this.checkedPointList = []
-				this.blockList = []
-				this.originBlockList = []
-				this.pointList = []
-                this.curBlockPoints = []
-				this.originPointList = []
-                this.activeBlockIndex = 0
-				this.schoolParams = {
-					schoolCode: this.originData.id,
-					subjectId: this.subjectList[index].id,
-					period: this.currentParams.periodId
+				if(this.updated){
+					this.$Modal.confirm({
+						title: this.$t('schoolBaseInfo.saveWarning'),
+						content: this.$t('schoolBaseInfo.ssTips8'),
+						okText: this.$t('schoolBaseInfo.leaveText'),
+						onOk: () => {
+						   this.checkedPointList = []
+						   this.blockList = []
+						   this.originBlockList = []
+						   this.pointList = []
+						   this.curBlockPoints = []
+						   this.originPointList = []
+						   this.activeBlockIndex = 0
+						   this.schoolParams = {
+						   	schoolCode: this.originData.id,
+						   	subjectId: this.subjectList[index].id,
+						   	period: this.currentParams.periodId
+						   }
+						   this.currentSubjectIndex = index
+						   this.currentParams.subjectId = this.subjectList[index].id
+						   this.activeSubjectIndex = index
+						   this.isLoadBlocks = true
+						   this.getPointsData()
+						   this.getBlocksData()
+						},
+						onCancel: () => {
+						    return
+						}
+					})
+				}else{
+					this.checkedPointList = []
+					this.blockList = []
+					this.originBlockList = []
+					this.pointList = []
+					this.curBlockPoints = []
+					this.originPointList = []
+					this.activeBlockIndex = 0
+					this.schoolParams = {
+						schoolCode: this.originData.id,
+						subjectId: this.subjectList[index].id,
+						period: this.currentParams.periodId
+					}
+					this.currentSubjectIndex = index
+					this.currentParams.subjectId = this.subjectList[index].id
+					this.activeSubjectIndex = index
+					this.isLoadBlocks = true
+					this.getPointsData()
+					this.getBlocksData()
 				}
-				this.currentSubjectIndex = index
-				this.currentParams.subjectId = this.subjectList[index].id
-				this.activeSubjectIndex = index
-				this.isLoadBlocks = true
-				this.getPointsData()
-				this.getBlocksData()
+				
 			},
 
 			// 知识块点击事件
@@ -879,9 +955,11 @@ import { json } from 'd3'
 <style >
 	.new-syllabus-header .ivu-select-single .ivu-select-selection,
 	.funnel-box .ivu-select-single .ivu-select-selection {
-		background: transparent;
-		color: #fbfbfb;
-		border: 1px solid #424242;
+		width: 140px;
+		background-color: #252525e3 !important;
+		border-radius: 0;
+		border-color: #96969640 !important;
+		color: #D0D0D0;
 	}
 
 	.new-syllabus-header .ivu-select-single .ivu-select-arrow,

+ 2 - 2
TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/AddBlock.vue

@@ -9,13 +9,13 @@
             </FormItem>-->
             <FormItem :label="$t('knowledge.label')">
                 <Input v-model="formTop.name" :placeholder="$t('knowledge.blockP')" />
-                <vuescroll>
+                <!-- <vuescroll>
                     <ul class="search-list" v-show="filterData.length > 0">
                         <li v-for="(list,index) in filterData">
                             <span>{{list.name}}</span>
                         </li>
                     </ul>
-                </vuescroll>
+                </vuescroll> -->
             </FormItem>
             <FormItem>
                 <Button @click="handleSubmit" :loading="isLoading">{{$t("knowledge.confirm")}}</Button>

+ 4 - 1
TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.vue

@@ -868,7 +868,7 @@
 					}
 				});
 			},
-			
+			/* 新增的章节 需要把创建者加入到共编数据内 */
 			doShareMyself(id,name){
 				return new Promise((r,j) => {
 					let curVolume = this.curVolume
@@ -955,6 +955,7 @@
 					type: 'link',
 					ctnr: ''
 				})
+				this.$refs.treeRef.curData.creatorId = this.$store.state.userInfo.TEAMModelId
 				this.modifyIdArr.push(this.curChapter.data.id)
 				this.hasModify = true
 				this.isShowLinkModal = false
@@ -1437,6 +1438,7 @@
 					this.isRelateContentModal = false
 					this.hasModify = true
 					this.modifyIdArr.push(this.curChapter.data.id)
+					this.$refs.treeRef.curData.creatorId = this.$store.state.userInfo.TEAMModelId
 				}).catch(err => {
 					console.log(err)
 					this.isRelateLoading = false
@@ -1559,6 +1561,7 @@
 								this.$refs.treeRef.curData.rnodes.splice(index, 1)
 								this.hasModify = true
 								this.modifyIdArr.push(this.curChapter.data.id)
+								this.$refs.treeRef.curData.creatorId = this.$store.state.userInfo.TEAMModelId
 							}).catch(err => {
 								this.$Message.error(err)
 							}).finally(() => {