Selaa lähdekoodia

课纲多语言&&资源列表样式&&上传后的link地址

OnePsycho 4 vuotta sitten
vanhempi
commit
d86f5cc45c

+ 13 - 14
TEAMModelOS/ClientApp/src/components/syllabus/DragTree.vue

@@ -43,10 +43,10 @@
 		
 		<!-- 新增或者编辑弹窗 -->
 		<Modal v-model="chapterCopyModal" width="500" footer-hide class="tree-modal add-volume-modal choose-content-modal">
-			<div class="modal-header" slot="header">复制节点</div>
+			<div class="modal-header" slot="header">{{ $t('syllabus.tree.copyNode') }}</div>
 			<div class="modal-content">
-				<p class="node-title">当前章节: <span class="node-name">{{ curChapter.title }}</span></p>
-				<p class="node-title" style="display: inline-block;">目标册别:</p>
+				<p class="node-title">{{ $t('syllabus.tree.curChapter') }}: <span class="node-name">{{ curChapter.title }}</span></p>
+				<p class="node-title" style="display: inline-block;">{{ $t('syllabus.tree.targetV') }}:</p>
 				<Select v-model="copyTargetVolume" style="width: 300px;">
 					<Option v-for="(item,index) in volumeList" :value="index" :key="index">{{item.name}}</Option>
 				</Select>
@@ -179,7 +179,7 @@
 			onIgnoreShare(data){
 				this.$Modal.confirm({
 					title: this.$t('syllabus.tree.removeTitle'),
-					content: '确认忽略该章节吗?',
+					content: this.$t('syllabus.tree.ignoreTip'),
 					onOk: () => {
 						this.$api.syllabus.ShareAgree({
 							"code": this.$store.state.userInfo.TEAMModelId,
@@ -188,7 +188,7 @@
 							"opt": "ignore"
 						}).then(res => {
 							if(res.status === 200){
-								this.$Message.success('操作成功!')
+								this.$Message.success(this.$t('syllabus.doSuc'))
 								this.$parent.getShareVolumeList(true)
 							}
 						})
@@ -201,7 +201,7 @@
 					this.curChapter = data
 					this.chapterCopyModal = true
 				}else{
-					this.$Message.warning('请先创建您的个人课纲!')
+					this.$Message.warning(this.$t('syllabus.tree.noVTip'))
 				}
 			},
 			/* 复制章节的业务逻辑 */
@@ -216,10 +216,10 @@
 				// 在复制章节过程中 如果章节节点以及子节点有关联试题试卷 则需要询问用户是否进行入库操作
 				if(hasItemOrPaper){
 					this.$Modal.confirm({
-						title: '提示',
-						content: '该章节中有关联试题试卷信息,是否需要同步到您的个人试题试卷库?',
-						okText: '同步并复制',
-						cancelText: '不需要',
+						title: this.$t('syllabus.tip'),
+						content: this.$t('syllabus.tree.hasItemTip'),
+						okText: this.$t('syllabus.tree.okText'),
+						cancelText: this.$t('syllabus.tree.cancelText'),
 						onOk: async () => {
 							let copyResult = await this.doCopyResources(allRNodes,true)
 							console.log('复制后的回调',copyResult)
@@ -248,10 +248,10 @@
 				}]
 				this.$api.syllabus.UpsertTree(upsertParams).then((res) => {
 					if (!res.error && res) {
-						this.$Message.success("复制成功");
+						this.$Message.success(this.$t('syllabus.tree.copySuc'));
 						this.chapterCopyModal = false
 					} else {
-						this.$Message.error("获取数据失败");
+						this.$Message.error(this.$t('syllabus.saveFailTip'));
 					}
 				}).catch(e => {
 					this.$Message.error(e);
@@ -598,7 +598,7 @@
 			// 点击添加展开弹窗
 			onAddNode(node,data, e) {
 				if(node.level === 3){
-					this.$Message.warning('每个章节最多只能有3级!')
+					this.$Message.warning(this.$t('syllabus.tree.nodeCountTip'))
 					return
 				}
 				this.isEditItem = false
@@ -725,7 +725,6 @@
 				return !this.isSchool && this.$parent.activeTab === 'fromShare'
 			},
 			volumeList(){
-				console.log(this.$parent)
 				return this.$parent.myVolumeList
 			}
 		},

+ 17 - 17
TEAMModelOS/ClientApp/src/components/syllabus/InviteTeacher.vue

@@ -1,19 +1,19 @@
 <template>
 	<div class="it-container">
 		<div class="node-info">
-			<span>当前选择章节:</span>
+			<span>{{ $t('syllabus.curChapter') }}:</span>
 			<span class="node-name">{{ nodeInfo.title }}</span>
 			<br>
 			<br>
 			<div style="display: inline-block;" v-if="!isSchool">
-				<span>当前章节已分享教师:</span>
+				<span>{{ $t('syllabus.sharedTeacher') }}:</span>
 				<!-- <span v-for="(item,index) in nodeInfo.auth" :key="item.tmdid" class="share-item">{{ item.tmdname }}( {{ item.tmdid }})</span> -->
-				<span v-if="!nodeInfo.auth || !nodeInfo.auth.length" style="color: #dacaca;">暂无数据</span>
+				<span v-if="!nodeInfo.auth || !nodeInfo.auth.length" style="color: #dacaca;">{{ $t('syllabus.noData') }}</span>
 				<Tag closable color="success" v-for="(item,index) in nodeInfo.auth" :key="item.tmdid" @on-close="doDelShare(item,index)">{{ item.tmdname }}( {{ item.tmdid }})</Tag>
 			</div>
 		</div>
 		<div class="search-wrap" v-if="isSchool">
-			<Input v-model="searchVal"  placeholder="输入教师名字或ID查询..."
+			<Input v-model="searchVal"  :placeholder="$t('syllabus.itPlace1')"
 			icon="ios-close-circle-outline" @on-click="onCloseSearch" @on-change="onSearchChange"/>
 		</div>
 		<div class="teacher-wrap">
@@ -32,17 +32,17 @@
 			</Table>
 			<div class="search-id-wrap" v-else>
 				<div class="id-search">
-					<Input v-model="searchIdVal" placeholder="搜索教师..." search @on-search="onIdSearch"/>
+					<Input v-model="searchIdVal" :placeholder="$t('syllabus.itPlace2')" search @on-search="onIdSearch"/>
 					<p v-html="$t('teachermgmt.addTeacher.content')"></p>
-					<p v-if="curTeacher && curTeacher.id" class="search-result-text">搜索结果</p>
+					<p v-if="curTeacher && curTeacher.id" class="search-result-text">{{ $t('syllabus.searchResult') }}</p>
 					<div v-if="curTeacher && curTeacher.id" class="search-result-wrap">
 						<PersonalPhoto :name="curTeacher.name" :picture="curTeacher.picture" />
 						<p class="t-name">{{ curTeacher.name }}</p>
 						<p class="t-id">{{ curTeacher.id }}</p>
 					</div>
-					<p v-if="!curTeacher && hasSearchResult" class="search-none">暂未查询到相关结果</p>
-					<p v-if="hasSearchResult" class="re-search" @click="onReSearch">重新搜索</p>
-					<Button type="success" :laading="isShareLoading" v-if="hasSearchResult"  @click="doShare">确认分享</Button>
+					<p v-if="!curTeacher && hasSearchResult" class="search-none">{{ $t('syllabus.noSearchResult') }}</p>
+					<p v-if="hasSearchResult" class="re-search" @click="onReSearch">{{ $t('syllabus.reSearch') }}</p>
+					<Button type="success" :laading="isShareLoading" v-if="hasSearchResult"  @click="doShare">{{ $t('syllabus.confirmShare') }}</Button>
 				</div>
 			</div>
 		</div>
@@ -102,7 +102,7 @@
 					  }
 					},
 					{
-						title: '是否共编',
+						title: this.$t('syllabus.isCoEdit'),
 						key:'action',
 						slot: 'action'
 					}
@@ -166,8 +166,8 @@
 			handleBeforeChange(){
 				return new Promise((resolve) => {
 					this.$Modal.confirm({
-						title: '修改确认',
-						content: '确认修改当前用户的共编状态?',
+						title: this.$t('syllabus.modifyTip'),
+						content: this.$t('syllabus.modifyText'),
 						onOk: () => {
 							resolve();
 						}
@@ -177,7 +177,7 @@
 			/* 修改共编权限 */
 			onSwitchChange(val,isAdd){
 				this.sendShareApi(val.id,val.name,false,isAdd).then(res => {
-					this.$Message.success(isAdd ? '授权成功!' : '取消授权成功!')
+					this.$Message.success(isAdd ? this.$t('syllabus.authSuc') : this.$t('syllabus.authFail'))
 					if(isAdd){
 						this.nodeInfo.auth.push({
 							tmdid:val.id,
@@ -196,7 +196,7 @@
 				this.isShareLoading = true
 				this.sendShareApi(val.id,val.name,true,true).then(res => {
 					setTimeout(() => {
-						this.$Message.success('分享成功!')
+						this.$Message.success(this.$t('syllabus.shareSuc'))
 						if(!this.nodeInfo.auth.map(i => i.tmdid).includes(val.id)){
 							this.nodeInfo.auth.push({
 								tmdid:val.id,
@@ -215,12 +215,12 @@
 			/* 取消分享操作 */
 			doDelShare(val,index){
 				this.$Modal.confirm({
-					title: '取消分享',
-					content: '确认取消对' + val.tmdname + '的分享?',
+					title: this.$t('syllabus.cancelShare'),
+					content:this.$t('syllabus.cancelTip1') + val.tmdname + this.$t('syllabus.cancelTip2'),
 					onOk: () => {
 						this.sendShareApi(val.tmdid,val.tmdname,true,false).then(res => {
 							this.nodeInfo.auth.splice(index,1)
-							this.$Message.success('取消分享成功!')
+							this.$Message.success(this.$t('syllabus.shareFail'))
 							this.$forceUpdate()
 						})
 					}

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

@@ -9,6 +9,7 @@ export default {
 	save:'保存问卷',
 	cancelEdit:'取消编辑',
 	surveyResult:'问卷数据',
+	surveyProgress:'问卷进度',
 	addItem:'新增题目',
 	single:'单选题',
 	multiple:'多选题',

+ 45 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/syllabus.js

@@ -1,8 +1,16 @@
 export default{
 	praviteSyllabus:'个人课纲',
+	fromCreate:'我创建的课纲',
+	fromShare:'他人分享的课纲',
 	btnSave:'存储变更',
 	volumeList:'册别清单',
+	search:'搜索',
+	edit:'编辑',
+	delete:'删除',
+	add:'新建册别',
 	place1:'输入册别名称...',
+	isDel:'已失效',
+	deleteDelV:'删除失效册别',
 	syllabusMenu:'课纲目录',
 	relate:'关联资源',
 	addResource:'添加资源',
@@ -31,11 +39,17 @@ export default{
 	count:'题数',
 	deleteVolume:'删除册别',
 	deleteConfirm:'确认删除该册别?',
+	deleteIsDelConfirm:'确认删除该失效册别?',
 	deleteSuc:'删除成功',
 	deleteFail:'删除失败',
+	isDelTip:'该册别已被创建者移除',
 	uploadSuc:'上传成功',
+	tip:'提示',
+	copyTip1:'校本试卷库中已存在名称为',
+	copyTip2:'的试卷,是否继续操作覆盖原试卷?',
 	removeConfirm:'确定要移除该资源吗?',
 	doSuc:'操作成功',
+	saveFailTip:'保存失败',
 	isExistVolume:'已存在相同册别',
     tree:{
 		hasResource:'有关联资源',
@@ -58,5 +72,35 @@ export default{
 		nodeNameTip:'节点名称不能为空',
 		editSucTip:'编辑成功',
 		addSucTip:'添加成功',
-	}
+		copyNode:'复制节点',
+		curChapter:'当前章节',
+		targetV:'目标册别',
+		ignoreTip:'确认忽略该章节?',
+		noVTip:'请先创建您的个人课纲!',
+		hasItemTip:'该章节中有关联试题试卷信息,是否需要同步到您的个人试题试卷库?',
+		okText:'同步并复制',
+		cancelText:'不需要',
+		copySuc:'复制成功',
+		nodeCountTip:'每个章节最多只能有3级!'
+	},
+	curChapter:'当前选择章节',
+	sharedTeacher:'当前章节已分享教师',
+	noData:'暂无数据',
+	itPlace1:'输入教师名字或ID查询...',
+	itPlace2:'搜索教师...',
+	searchResult:'搜索结果',
+	noSearchResult:'暂未查询到相关结果',
+	reSearch:'重新搜索',
+	confirmShare:'确认分享',
+	isCoEdit:'是否共编',
+	modifyTip:'修改确认',
+	modifyText:'确认修改当前用户的共编状态?',
+	authSuc:'授权成功',
+	authFail:'取消授权成功',
+	shareSuc:'分享成功',
+	shareFail:'取消分享成功',
+	cancelShare:'取消分享',
+	cancelTip1:'确认取消对',
+	cancelTip2:'的分享?',
+	
 }

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

@@ -9,6 +9,7 @@ export default {
 	save: '儲存問卷',
 	cancelEdit: '取消編輯',
 	surveyResult: '問卷數據',
+	surveyProgress:'問卷進度',
 	addItem: '新增題目',
 	single: '單選題',
 	multiple: '複選题',

+ 45 - 2
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/syllabus.js

@@ -1,8 +1,16 @@
 export default {
 	praviteSyllabus: '個人課綱',
+	fromCreate: '我創建的課綱',
+	fromShare: '他人分享的課綱',
 	btnSave: '存儲變更',
 	volumeList: '册別清單',
+	search: '蒐索',
+	edit: '編輯',
+	delete: '删除',
+	add: '新建册別',
 	place1: '輸入册別名稱…',
+	isDel: '已失效',
+	deleteDelV: '删除失效册別',
 	syllabusMenu: '課綱目錄',
 	relate: '關聯資源',
 	addResource: '添加資源',
@@ -31,15 +39,21 @@ export default {
 	count: '題數',
 	deleteVolume: '删除册別',
 	deleteConfirm: '確認删除該册別?',
+	deleteIsDelConfirm: '確認删除該失效册別?',
 	deleteSuc: '删除成功',
 	deleteFail: '删除失敗',
+	isDelTip: '該册別已被創建者移除',
 	uploadSuc: '上傳成功',
+	tip: '提示',
+	copyTip1: '校本試卷庫中已存在名稱為',
+	copyTip2: '的試卷,是否繼續操作覆蓋原試卷?',
 	removeConfirm: '確定要移除該資源嗎?',
 	doSuc: '操作成功',
+	saveFailTip: '保存失敗',
 	isExistVolume: '已存在相同册別',
 	tree: {
 		hasResource: '有關聯資源',
-		hasCoEdit:'有共編許可權',
+		hasCoEdit: '有共編許可權',
 		edit: '編輯',
 		add: '添加',
 		remove: '删除',
@@ -58,5 +72,34 @@ export default {
 		nodeNameTip: '節點名稱不能為空',
 		editSucTip: '編輯成功',
 		addSucTip: '添加成功',
-	}
+		copyNode: '複製節點',
+		curChapter: '當前章節',
+		targetV: '目標册別',
+		ignoreTip: '確認忽略該章節?',
+		noVTip: '請先創建您的個人課綱!',
+		hasItemTip: '該章節中有關聯試題試卷資訊,是否需要同步到您的個人試題試卷庫?',
+		okText: '同步並複製',
+		cancelText: '不需要',
+		copySuc: '複製成功',
+		nodeCountTip: '每個章節最多只能有3級!'
+	},
+	curChapter: '當前選擇章節',
+	sharedTeacher: '當前章節已分享教師',
+	noData: '暫無數據',
+	itPlace1: '輸入教師名字或ID査詢…',
+	itPlace2: '蒐索教師…',
+	searchResult: '搜索結果',
+	noSearchResult: '暫未査詢到相關結果',
+	reSearch: '重新搜索',
+	confirmShare: '確認分享',
+	isCoEdit: '是否共編',
+	modifyTip: '修改確認',
+	modifyText: '確認修改當前用戶的共編狀態?',
+	authSuc: '授權成功',
+	authFail: '取消授權成功',
+	shareSuc: '分享成功',
+	shareFail: '取消分享成功',
+	cancelShare: '取消分享',
+	cancelTip1: '確認取消對',
+	cancelTip2: '的分享?',
 }

+ 4 - 0
TEAMModelOS/ClientApp/src/utils/editorLangTw.js

@@ -62,6 +62,10 @@ let editor_tw_config = {
                 },
             },
             panelMenus: {
+				删除:' 删除 ',
+				formula:{
+					插入公式:'插入公式',
+				},
                 emoticon: {
                     默认: '默認',
                     新浪: '新浪',

+ 9 - 7
TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.less

@@ -197,7 +197,7 @@
 			.syllabus-tree-box{
 				height: 100%;
 				overflow: auto;
-				padding-bottom: 80px;
+				padding-bottom: 50px;
 			}
 			
 			.node-resource-box{
@@ -208,14 +208,11 @@
 				
 				.node-resource-item{
 					position: relative;
-					border: 1px solid #5d5d5d;
-					padding: 15px 20px;
-					margin-top: 5px;
+					border-bottom: 1px solid #3a3a3a;
+					padding: 10px 20px;
 					color: #DDDDDD;
 					display: flex;
 					align-items: center;
-					background: #282828;
-					box-shadow: inset 0px 0px 0px 4px #2d2d2d;
 					
 					&:hover{
 						.node-resource-tools{
@@ -223,6 +220,10 @@
 						}
 					}
 					
+					&:last-child{
+						border-bottom: none;
+					}
+					
 					img{
 						width: 25px;
 						height: 25;
@@ -234,6 +235,7 @@
 						right: 30px;
 						align-items: center;
 						display: none;
+						font-size: 12px;
 						
 						.node-resource-tool{
 							display: flex;
@@ -244,7 +246,7 @@
 						
 						.ivu-icon{
 							color: #ddd;
-							font-size: 20px;
+							font-size: 16px;
 							margin-right: 5px;
 						}
 					}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 270 - 211
TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.vue