|
@@ -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()
|
|
|
})
|
|
|
}
|