Просмотр исходного кода

Merge branch 'develop6.0-tmd' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop6.0-tmd

Li 3 лет назад
Родитель
Сommit
af0c339e4a

+ 4 - 1
TEAMModelOS/ClientApp/src/static/Global.js

@@ -14,6 +14,8 @@ const CONTENT_TYPES = {
 	'res': ['HTE', 'HTEX'],
 	'audio': ['MP3', 'OGG', 'WAV', 'APE', 'CDA', 'AU', 'MIDI', 'MAC', 'AAC']
 }
+/* 需要监听关闭和刷新的路由名单 */
+const WATCH_ROUTE_CLOSE = ['newPrivateExercise','newSchoolExercise','newSchoolPaper','newPrivatePaper']
 //单位对应域名
 const HOST_LIST = () => {
 	return [
@@ -332,7 +334,8 @@ const GLOBAL = {
 	VIDEO_DIMENSIONS,
 	TRAIN_TYPE,
 	HOST_LIST,
-	STD_TYPES
+	STD_TYPES,
+	WATCH_ROUTE_CLOSE
 }
 
 const install = (Vue, options) => {

+ 450 - 417
TEAMModelOS/ClientApp/src/view/Home.vue

@@ -1,445 +1,478 @@
 <template>
-    <div id="main">
-        <Loading v-if="isLoading" :top="300"></Loading>
-        <BaseLayout>
-            <!-- 头部右侧个人中心部分 -->
-            <div class="header-right-box fl-around" slot="header-content">
-                <Icon style="display:block" custom="iconfont icon-home" :color="isHomeLight ? '#1CC0F3':'#d0d0d0'" @click="toHome" :title="$t('system.goHome')" />
-                <Icon type="md-open" @click="changePlatform" :title="$t('system.changePlat')" v-if="hasArea" />
-                <BaseNotification :msgs="msgs"></BaseNotification>
-                <span class="header-split"></span>
-                <BaseUserPoptip @logout="basicMenu('quit')"></BaseUserPoptip>
-            </div>
-            <div id="content" slot="content">
-                <router-view v-if="!$route.meta.isKeep && isRouterAlive" :key="this.$route.name"></router-view>
-                <keep-alive>
-                    <router-view v-if="$route.meta.isKeep && isRouterAlive" :key="this.$route.name"></router-view>
-                </keep-alive>
-            </div>
-        </BaseLayout>
-        <!-- 平台更新提示 -->
-        <Modal v-model="updStatus" footer-hide :width="800" class-name="upd-modal" :closable="false" :mask-closable="false">
-            <div slot="header" class="upd-header">
-                <img src="@/assets/loading/logo_loading.png" alt="" class="tm-logo">
-                <p class="upd-title">
-                    {{$t('system.updTitle')}}
-                </p>
-            </div>
-            <div class="upd-content">
-                <p v-show="add.length" class="upd-block-title" style="margin-top:0px">
-                    {{$t('system.add')}}
-                </p>
-                <p v-for="(item,index) in add" :key="'add' + index">
-                    {{item.content}}
-                </p>
-                <p v-show="opt.length" class="upd-block-title">
-                    {{$t('system.opt')}}
-                </p>
-                <p v-for="(item,index) in opt" :key="'opt' + index">
-                    {{item.content}}
-                </p>
-                <p v-show="bug.length" class="upd-block-title">
-                    {{$t('system.bug')}}
-                </p>
-            </div>
-            <div class="close-btn">
-                <Button type="primary" :disabled="countDown > 0" @click="iKnow">
-                    {{$t('system.iKnow')}}
-                    <span v-show="countDown > 0">
-                        {{`(${countDown}S)`}}
-                    </span>
-                </Button>
-            </div>
-        </Modal>
-    </div>
+	<div id="main">
+		<Loading v-if="isLoading" :top="300"></Loading>
+		<BaseLayout>
+			<!-- 头部右侧个人中心部分 -->
+			<div class="header-right-box fl-around" slot="header-content">
+				<Icon style="display:block" custom="iconfont icon-home" :color="isHomeLight ? '#1CC0F3':'#d0d0d0'"
+					@click="toHome" :title="$t('system.goHome')" />
+				<Icon type="md-open" @click="changePlatform" :title="$t('system.changePlat')" v-if="hasArea" />
+				<BaseNotification :msgs="msgs"></BaseNotification>
+				<span class="header-split"></span>
+				<BaseUserPoptip @logout="basicMenu('quit')"></BaseUserPoptip>
+			</div>
+			<div id="content" slot="content">
+				<router-view v-if="!$route.meta.isKeep && isRouterAlive" :key="this.$route.name"></router-view>
+				<keep-alive>
+					<router-view v-if="$route.meta.isKeep && isRouterAlive" :key="this.$route.name"></router-view>
+				</keep-alive>
+			</div>
+		</BaseLayout>
+		<!-- 平台更新提示 -->
+		<Modal v-model="updStatus" footer-hide :width="800" class-name="upd-modal" :closable="false"
+			:mask-closable="false">
+			<div slot="header" class="upd-header">
+				<img src="@/assets/loading/logo_loading.png" alt="" class="tm-logo">
+				<p class="upd-title">
+					{{$t('system.updTitle')}}
+				</p>
+			</div>
+			<div class="upd-content">
+				<p v-show="add.length" class="upd-block-title" style="margin-top:0px">
+					{{$t('system.add')}}
+				</p>
+				<p v-for="(item,index) in add" :key="'add' + index">
+					{{item.content}}
+				</p>
+				<p v-show="opt.length" class="upd-block-title">
+					{{$t('system.opt')}}
+				</p>
+				<p v-for="(item,index) in opt" :key="'opt' + index">
+					{{item.content}}
+				</p>
+				<p v-show="bug.length" class="upd-block-title">
+					{{$t('system.bug')}}
+				</p>
+			</div>
+			<div class="close-btn">
+				<Button type="primary" :disabled="countDown > 0" @click="iKnow">
+					{{$t('system.iKnow')}}
+					<span v-show="countDown > 0">
+						{{`(${countDown}S)`}}
+					</span>
+				</Button>
+			</div>
+		</Modal>
+	</div>
 </template>
 
 <script>
-import excel from '@/utils/excel.js'
-export default {
-    name: 'headers',
-    props: ['parentToChild', 'identityselect'],
-    components: {},
-    provide() {
-        return {
-            reload: this.reload
-        }
-    },
-    data() {
-        return {
-            updStatus: false,
-            isRouterAlive: true,
-            msgs: [],
-            isShowMock: false,
-            isOpenDrawer: false,
-            routerName: '',
-            isLoading: false,
-            curPlatform: '',
-            location: '',
-            countDown: 5,
-            add: [],//新增功能
-            opt: [],//优化功能
-            bug: []//bug
-        }
-    },
-    created() {
-        this.getVersionInfo()
-        this.$Message.config({
-            duration: 3
-        });
-        // 检查超时操作页面,清空缓存数据
-        let webEndTime = localStorage.getItem('webEndTime')
-        let time_now = new Date().getTime()
-        if (webEndTime && time_now > webEndTime) {
-            console.log('长时间未操作,清空storage,重新登录')
-            this.loginOut()
-        }
-        this.$store.dispatch('user/checkSchoolCode');// 設定登入成功的學校簡碼
-        this.$store.dispatch('user/checkUserProfile');// 檢查使用者個人詳細資訊
-        this.$store.dispatch('user/checkStudentProfile');// 檢查學生的詳細資訊
+	import excel from '@/utils/excel.js'
+	export default {
+		name: 'headers',
+		props: ['parentToChild', 'identityselect'],
+		components: {},
+		provide() {
+			return {
+				reload: this.reload
+			}
+		},
+		data() {
+			return {
+				updStatus: false,
+				isRouterAlive: true,
+				msgs: [],
+				isShowMock: false,
+				isOpenDrawer: false,
+				routerName: '',
+				isLoading: false,
+				curPlatform: '',
+				location: '',
+				countDown: 5,
+				add: [], //新增功能
+				opt: [], //优化功能
+				bug: [] //bug
+			}
+		},
+		created() {
+			this.getVersionInfo()
+			this.$Message.config({
+				duration: 3
+			});
+			// 检查超时操作页面,清空缓存数据
+			let webEndTime = localStorage.getItem('webEndTime')
+			let time_now = new Date().getTime()
+			if (webEndTime && time_now > webEndTime) {
+				console.log('长时间未操作,清空storage,重新登录')
+				this.loginOut()
+			}
+			this.$store.dispatch('user/checkSchoolCode'); // 設定登入成功的學校簡碼
+			this.$store.dispatch('user/checkUserProfile'); // 檢查使用者個人詳細資訊
+			this.$store.dispatch('user/checkStudentProfile'); // 檢查學生的詳細資訊
 
-        let user = JSON.parse(decodeURIComponent(localStorage.userInfo, "utf-8"))
-        let user_profile = JSON.parse(decodeURIComponent(localStorage.user_profile, "utf-8"))
-        this.location = user_profile.location
-        if (user_profile.schools) {
-            user_profile.schools = user_profile.schools.filter((item) => {
-                return item.status == 'join'
-            })
-        } else {
-            user_profile.schools = []
-        }
-        if (user_profile.schools.length) {
-            this.$store.commit('setUserInfo', {
-                TEAMModelId: user.id || user.sub,
-                name: user.name,
-                schoolCode: user_profile.defaultschool || user_profile.schools[0].schoolId
-            })
-        } else {
-            this.$store.commit('setUserInfo', {
-                TEAMModelId: user.id || user.sub,
-                name: user.name,
-                schoolCode: this.$GLOBAL.DEFAULT_SCHOOL_CODE
-            })
-        }
-        this.$store.commit('setPrivateSpace', user_profile.total || 0)
-        this.getAllNotice(user_profile, user.id)
-        this.curPlatform = localStorage.getItem('platform') || 'school'
+			let user = JSON.parse(decodeURIComponent(localStorage.userInfo, "utf-8"))
+			let user_profile = JSON.parse(decodeURIComponent(localStorage.user_profile, "utf-8"))
+			this.location = user_profile.location
+			if (user_profile.schools) {
+				user_profile.schools = user_profile.schools.filter((item) => {
+					return item.status == 'join'
+				})
+			} else {
+				user_profile.schools = []
+			}
+			if (user_profile.schools.length) {
+				this.$store.commit('setUserInfo', {
+					TEAMModelId: user.id || user.sub,
+					name: user.name,
+					schoolCode: user_profile.defaultschool || user_profile.schools[0].schoolId
+				})
+			} else {
+				this.$store.commit('setUserInfo', {
+					TEAMModelId: user.id || user.sub,
+					name: user.name,
+					schoolCode: this.$GLOBAL.DEFAULT_SCHOOL_CODE
+				})
+			}
+			this.$store.commit('setPrivateSpace', user_profile.total || 0)
+			this.getAllNotice(user_profile, user.id)
+			this.curPlatform = localStorage.getItem('platform') || 'school'
 
-        //处理平台更新功能
-        let timer = setInterval(() => {
-            if (this.countDown > 0) {
-                this.countDown--
-            } else {
-                clearInterval(timer)
-            }
-        }, 1000)
+			//处理平台更新功能
+			let timer = setInterval(() => {
+				if (this.countDown > 0) {
+					this.countDown--
+				} else {
+					clearInterval(timer)
+				}
+			}, 1000)
 
-    },
-    methods: {
-        iKnow(){
-            this.updStatus = false
-            let version = localStorage.getItem('version')
-            let data = {
-                [version]: true
-            } 
-            localStorage.setItem('versionFlag',JSON.stringify(data))
-        },
-        readBuffer(data) {
-            const { header, results } = excel.read(data, 'array')
-            this.add = results.filter(item => item.type === 'add')
-            this.opt = results.filter(item => item.type === 'opt')
-            this.bug = results.filter(item => item.type === 'bug')
-            this.updStatus = true
-        },
-        async getVersionInfo() {
-            let version = localStorage.getItem('version')
-            let versionFlag = localStorage.getItem('versionFlag') || '{}'
-            let d = JSON.parse(versionFlag)
-            if (d && d[version]) {
-                return
-            }
-            if (version) {
-                try {
-                    let blobHost = this.$evTools.getBlobHost()
-                    let local = localStorage.getItem('local') || ''
-                    let lang = local.includes('en') ? 'en' : local.includes('tw') ? 'tw' : 'cn'
-                    let xlsx = await this.$tools.getFile(`${blobHost}/0-public/version/${lang}/${version}.xlsx`, 'arraybuffer')
-                    this.readBuffer(xlsx)
-                } catch (e) {
-                    console.log(e)
-                }
-            }
-        },
-        loginOut() {
-            let login_schoolCode = localStorage.getItem('login_schoolCode')
-            let srvAdr = localStorage.getItem('srvAdr')
-            let versionFlag = localStorage.getItem('versionFlag')
-            localStorage.clear()
-            localStorage.setItem('srvAdr', srvAdr)
-            localStorage.setItem('versionFlag', versionFlag)
-            localStorage.setItem('login_schoolCode', login_schoolCode)
-            window.location.href = window.location.origin + '/login'
-        },
-        reload() {
-            this.isRouterAlive = false
-            this.$nextTick(() => {
-                this.isRouterAlive = true
-            })
-        },
-        changePlatform() {
-            let goPlatform = this.curPlatform === 'area' ? 'school' : 'area'
-            let homePath = this.$store.state.config.srvAdr == 'China' ? 'home' : 'myCourse'
-            this.$router.push({
-                name: goPlatform === 'area' ? 'area' : homePath
-            })
-            localStorage.setItem('platform', this.curPlatform === 'area' ? 'school' : 'area')
-            this.curPlatform = goPlatform
-        },
-        async getAllNotice(user_profile, userId) {
-            let schoolNotice = await this.getSchoolNotice(user_profile, userId)
-            let privateNotice = await this.getPrivateNotice(userId)
-            this.msgs = schoolNotice.concat(privateNotice)
-            if (this.msgs.length) {
-                this.msgs.forEach(i => {
-                    i.body = JSON.parse(this.getBodyJson(i.body))
-                })
-            }
-            localStorage.setItem('msgs', JSON.stringify(this.msgs))
-            console.log('端外通知', this.msgs)
-        },
-        getBodyJson(str) {
-            let reg = /\\/g;
-            //使用replace方法将全部匹配正则表达式的转义符替换为空
-            let replaceAfter = str.replace(reg, '').replace(/=/g, ':');
-            return replaceAfter
-        },
-        getSchoolNotice(user_profile, userId) {
-            return new Promise((r, j) => {
-                if (this.hasSchool) {
-                    let srvAdr = this.$store.state.config.srvAdr
-                    let host = srvAdr == 'Global' ? this.$store.state.config.Global.coreAPIUrl : this.$store.state.config.China.coreAPIUrl
-                    this.$api.service.getNotification(host, {
-                        "from": "ies5:" + this.location + ':' + (user_profile.defaultschool || user_profile.schools[0].schoolId),
-                        "receiver": userId
-                    }).then(res => {
-                        r(res.msgs)
-                    })
-                } else {
-                    r([])
-                }
-            })
-        },
-        getPrivateNotice(userId) {
-            return new Promise((r, j) => {
-                let srvAdr = this.$store.state.config.srvAdr
-                let host = srvAdr == 'Global' ? this.$store.state.config.Global.coreAPIUrl : this.$store.state.config.China.coreAPIUrl
-                this.$api.service.getNotification(host, {
-                    "from": "ies5:" + this.location + ":private",
-                    "receiver": userId
-                }).then(res => {
-                    r(res.msgs)
-                })
-            })
-        },
-        toHome() {
-            let homePath = this.$store.state.config.srvAdr == 'China' ? 'home' : 'myCourse'
-            this.$router.push({ name: homePath })
-        },
-        toSettings() {
-            this.$router.push({ path: '/home/settings' })
-        },
-        toFeedback() {
-            this.$router.push({ path: '/home/feedback' })
-        },
-        closeMenu() {
-            this.isOpenDrawer = false
-        },
-        basicMenu(name) {
-            if (name == 'quit') {
-                this.$store.commit('user/resetSchoolProfile')
-                this.$User.logout()
-                this.$router.push({
-                    path: '/login'
-                })
-            }
-        }
-    },
-    mounted() {
+		},
+		methods: {
+			iKnow() {
+				this.updStatus = false
+				let version = localStorage.getItem('version')
+				let data = {
+					[version]: true
+				}
+				localStorage.setItem('versionFlag', JSON.stringify(data))
+			},
+			readBuffer(data) {
+				const {
+					header,
+					results
+				} = excel.read(data, 'array')
+				this.add = results.filter(item => item.type === 'add')
+				this.opt = results.filter(item => item.type === 'opt')
+				this.bug = results.filter(item => item.type === 'bug')
+				this.updStatus = true
+			},
+			async getVersionInfo() {
+				let version = localStorage.getItem('version')
+				let versionFlag = localStorage.getItem('versionFlag') || '{}'
+				let d = JSON.parse(versionFlag)
+				if (d && d[version]) {
+					return
+				}
+				if (version) {
+					try {
+						let blobHost = this.$evTools.getBlobHost()
+						let local = localStorage.getItem('local') || ''
+						let lang = local.includes('en') ? 'en' : local.includes('tw') ? 'tw' : 'cn'
+						let xlsx = await this.$tools.getFile(`${blobHost}/0-public/version/${lang}/${version}.xlsx`,
+							'arraybuffer')
+						this.readBuffer(xlsx)
+					} catch (e) {
+						console.log(e)
+					}
+				}
+			},
+			loginOut() {
+				let login_schoolCode = localStorage.getItem('login_schoolCode')
+				let srvAdr = localStorage.getItem('srvAdr')
+				let versionFlag = localStorage.getItem('versionFlag')
+				localStorage.clear()
+				localStorage.setItem('srvAdr', srvAdr)
+				localStorage.setItem('versionFlag', versionFlag)
+				localStorage.setItem('login_schoolCode', login_schoolCode)
+				window.location.href = window.location.origin + '/login'
+			},
+			reload() {
+				this.isRouterAlive = false
+				this.$nextTick(() => {
+					this.isRouterAlive = true
+				})
+			},
+			changePlatform() {
+				let goPlatform = this.curPlatform === 'area' ? 'school' : 'area'
+				let homePath = this.$store.state.config.srvAdr == 'China' ? 'home' : 'myCourse'
+				this.$router.push({
+					name: goPlatform === 'area' ? 'area' : homePath
+				})
+				localStorage.setItem('platform', this.curPlatform === 'area' ? 'school' : 'area')
+				this.curPlatform = goPlatform
+			},
+			async getAllNotice(user_profile, userId) {
+				let schoolNotice = await this.getSchoolNotice(user_profile, userId)
+				let privateNotice = await this.getPrivateNotice(userId)
+				this.msgs = schoolNotice.concat(privateNotice)
+				if (this.msgs.length) {
+					this.msgs.forEach(i => {
+						i.body = JSON.parse(this.getBodyJson(i.body))
+					})
+				}
+				localStorage.setItem('msgs', JSON.stringify(this.msgs))
+				console.log('端外通知', this.msgs)
+			},
+			getBodyJson(str) {
+				let reg = /\\/g;
+				//使用replace方法将全部匹配正则表达式的转义符替换为空
+				let replaceAfter = str.replace(reg, '').replace(/=/g, ':');
+				return replaceAfter
+			},
+			getSchoolNotice(user_profile, userId) {
+				return new Promise((r, j) => {
+					if (this.hasSchool) {
+						let srvAdr = this.$store.state.config.srvAdr
+						let host = srvAdr == 'Global' ? this.$store.state.config.Global.coreAPIUrl : this.$store
+							.state.config.China.coreAPIUrl
+						this.$api.service.getNotification(host, {
+							"from": "ies5:" + this.location + ':' + (user_profile.defaultschool ||
+								user_profile.schools[0].schoolId),
+							"receiver": userId
+						}).then(res => {
+							r(res.msgs)
+						})
+					} else {
+						r([])
+					}
+				})
+			},
+			getPrivateNotice(userId) {
+				return new Promise((r, j) => {
+					let srvAdr = this.$store.state.config.srvAdr
+					let host = srvAdr == 'Global' ? this.$store.state.config.Global.coreAPIUrl : this.$store.state
+						.config.China.coreAPIUrl
+					this.$api.service.getNotification(host, {
+						"from": "ies5:" + this.location + ":private",
+						"receiver": userId
+					}).then(res => {
+						r(res.msgs)
+					})
+				})
+			},
+			toHome() {
+				let homePath = this.$store.state.config.srvAdr == 'China' ? 'home' : 'myCourse'
+				this.$router.push({
+					name: homePath
+				})
+			},
+			toSettings() {
+				this.$router.push({
+					path: '/home/settings'
+				})
+			},
+			toFeedback() {
+				this.$router.push({
+					path: '/home/feedback'
+				})
+			},
+			closeMenu() {
+				this.isOpenDrawer = false
+			},
+			basicMenu(name) {
+				if (name == 'quit') {
+					this.$store.commit('user/resetSchoolProfile')
+					this.$User.logout()
+					this.$router.push({
+						path: '/login'
+					})
+				}
+			}
+		},
+		mounted() {
 
-        if (localStorage.getItem('noSave') && JSON.parse(localStorage.getItem('noSave')).length) {
-            this.$tools.deleteNoSave(JSON.parse(localStorage.getItem('noSave')))
-        } else {
-            localStorage.setItem('noSave', '[]')
-        }
+			if (localStorage.getItem('noSave') && JSON.parse(localStorage.getItem('noSave')).length) {
+				this.$tools.deleteNoSave(JSON.parse(localStorage.getItem('noSave')))
+			} else {
+				localStorage.setItem('noSave', '[]')
+			}
 
-        this.$EventBus.$off('noSave')
-        this.$EventBus.$on('noSave', val => {
-            let curNoSaveArr = JSON.parse(localStorage.getItem('noSave'))
-            curNoSaveArr.push(val)
-            localStorage.setItem('noSave', JSON.stringify(curNoSaveArr))
-        })
-    },
-    computed: {
-        hasSchool() {
-            return this.$store.state.userInfo.hasSchool;
-        },
-        hasArea() {
-            return this.$store.state.user.userProfile.areas.length > 0
-        },
-        isHomeLight() {
-            return this.routerName == 'homePage' || (this.$store.state.config.srvAdr == 'Global' && this.routerName == 'myCourse')
-        }
-    },
-    watch: {
-        $route: {
-            handler(val, oldval) {
-                this.routerName = val.name
-            },
-            // 深度观察监听
-            deep: true,
-            //立即执行
-            immediate: true
-        }
-    },
-}
+			this.$EventBus.$off('noSave')
+			this.$EventBus.$on('noSave', val => {
+				let curNoSaveArr = JSON.parse(localStorage.getItem('noSave'))
+				curNoSaveArr.push(val)
+				localStorage.setItem('noSave', JSON.stringify(curNoSaveArr))
+			})
+		},
+		computed: {
+			hasSchool() {
+				return this.$store.state.userInfo.hasSchool;
+			},
+			hasArea() {
+				return this.$store.state.user.userProfile.areas.length > 0
+			},
+			isHomeLight() {
+				return this.routerName == 'homePage' || (this.$store.state.config.srvAdr == 'Global' && this.routerName ==
+					'myCourse')
+			}
+		},
+		watch: {
+			$route: {
+				handler(val, oldval) {
+					this.routerName = val.name
+					// 指定几个模块页面 需要监听页面关闭和页面刷新
+					if (this.$GLOBAL.WATCH_ROUTE_CLOSE.includes(val.name)) {
+						window.onbeforeunload = function(e) {
+							var e = window.event || e;
+							e.returnValue = ("");
+						}
+					}else{
+						window.onbeforeunload = function(){};
+					}
+				},
+				// 深度观察监听
+				deep: true,
+				//立即执行
+				immediate: true
+			}
+		},
+	}
 </script>
 
 <style scoped>
-.upd-block-title {
-    font-weight: 600;
-    font-size: 14px;
-    color: #2d8cf0;
-    margin-top: 20px;
-    margin-bottom: 5px;
-}
-.upd-content {
-    width: 100%;
-    padding: 0px 30px;
-}
-.close-btn {
-    width: 100%;
-    text-align: center;
-    padding: 30px 0px 20px 0px;
-}
-.upd-title {
-    width: fit-content;
-    font-size: 20px;
-    margin-left: 10px;
-    font-weight: 600;
-    color: black;
-}
-.tm-logo {
-    width: 30px;
-}
-.upd-header {
-    width: 100%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    padding-top: 30px;
-}
-.header-split {
-    display: block;
-    width: 0;
-    background: #636363;
-    height: 25px;
-    margin: 0 15px;
-}
-.header-right-box {
-    margin: 12px 0;
-    line-height: 1.5;
-    float: right;
-    height: 25px;
-    padding-right: 20px;
-}
+	.upd-block-title {
+		font-weight: 600;
+		font-size: 14px;
+		color: #2d8cf0;
+		margin-top: 20px;
+		margin-bottom: 5px;
+	}
 
-.header-right-box .ivu-icon {
-    font-size: 20px;
-    margin-right: 20px;
-    color: #d0d0d0;
-    cursor: pointer;
-}
+	.upd-content {
+		width: 100%;
+		padding: 0px 30px;
+	}
 
-.header-right-box img {
-    width: 40px;
-    border-radius: 50%;
-    border: 2px solid #595959;
-}
+	.close-btn {
+		width: 100%;
+		text-align: center;
+		padding: 30px 0px 20px 0px;
+	}
 
-.fl-around {
-    display: flex;
-    align-items: center;
-    justify-content: space-around;
-}
+	.upd-title {
+		width: fit-content;
+		font-size: 20px;
+		margin-left: 10px;
+		font-weight: 600;
+		color: black;
+	}
+
+	.tm-logo {
+		width: 30px;
+	}
+
+	.upd-header {
+		width: 100%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding-top: 30px;
+	}
+
+	.header-split {
+		display: block;
+		width: 0;
+		background: #636363;
+		height: 25px;
+		margin: 0 15px;
+	}
+
+	.header-right-box {
+		margin: 12px 0;
+		line-height: 1.5;
+		float: right;
+		height: 25px;
+		padding-right: 20px;
+	}
+
+	.header-right-box .ivu-icon {
+		font-size: 20px;
+		margin-right: 20px;
+		color: #d0d0d0;
+		cursor: pointer;
+	}
+
+	.header-right-box img {
+		width: 40px;
+		border-radius: 50%;
+		border: 2px solid #595959;
+	}
+
+	.fl-around {
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+	}
 </style>
 
 <style>
-html,
-body {
-    height: 100%;
-    width: 100%;
-    margin: 0px;
-    padding: 0px;
-}
+	html,
+	body {
+		height: 100%;
+		width: 100%;
+		margin: 0px;
+		padding: 0px;
+	}
 
-#main {
-    width: 100%;
-    height: 100%;
-}
+	#main {
+		width: 100%;
+		height: 100%;
+	}
 
-#main .layout {
-    border: none;
-    border-radius: 0px;
-}
+	#main .layout {
+		border: none;
+		border-radius: 0px;
+	}
 
-#content {
-    height: 100%;
-    /* background: #242328; */
-    overflow: hidden;
-}
+	#content {
+		height: 100%;
+		/* background: #242328; */
+		overflow: hidden;
+	}
 
-/*重绘滚动条样式*/
-.scrollstyle::-webkit-scrollbar {
-    width: 5px;
-}
+	/*重绘滚动条样式*/
+	.scrollstyle::-webkit-scrollbar {
+		width: 5px;
+	}
 
-.ivu-drawer-body::-webkit-scrollbar-track {
-    display: none;
-}
+	.ivu-drawer-body::-webkit-scrollbar-track {
+		display: none;
+	}
 
-.scrollstyle::-webkit-scrollbar-thumb {
-    border-radius: 10px;
-    background: #94998a;
-}
+	.scrollstyle::-webkit-scrollbar-thumb {
+		border-radius: 10px;
+		background: #94998a;
+	}
 
-.scrollstyle::-webkit-scrollbar-button {
-    display: none;
-}
-.upd-modal .ivu-modal-header {
-    border: none;
-}
+	.scrollstyle::-webkit-scrollbar-button {
+		display: none;
+	}
+
+	.upd-modal .ivu-modal-header {
+		border: none;
+	}
 </style>
 
 <style lang="less">
-@import "../css/dark-iview-modal.less";
-@import "../css/dark-iview-tabs.less";
-@import "../css/dark-iview-collapse.less";
-@import "../css/dark-iview-form.less";
-@import "../css/dark-iview-upload.less";
-@import "../css/dark-iview-table.less";
-@import "../css/dark-iview-split.less";
-@import "../css/dark-iview-page.less";
-@import "../css/custom-animate.less";
-@import "../css/dark-wang-editor.less";
-@import "../css/dark-iview-loading.less";
-@import "../css/disabled-iview-form.less";
-@import "../css/common-style.less";
-@import "../css/dark-iview-drawer.less";
-@import "../css/dark-iview-card.less";
-@import "../css/dark-iview-poptip.less";
-@import "../css/dark-iview-checkbox.less";
-@import "../css/dark-el-cascader.less";
-@import "../css/dark-iview-style.less";
-@import "../css/custom-iview.less";
-@import "../css/light-iview-form.less";
-</style>
+	@import "../css/dark-iview-modal.less";
+	@import "../css/dark-iview-tabs.less";
+	@import "../css/dark-iview-collapse.less";
+	@import "../css/dark-iview-form.less";
+	@import "../css/dark-iview-upload.less";
+	@import "../css/dark-iview-table.less";
+	@import "../css/dark-iview-split.less";
+	@import "../css/dark-iview-page.less";
+	@import "../css/custom-animate.less";
+	@import "../css/dark-wang-editor.less";
+	@import "../css/dark-iview-loading.less";
+	@import "../css/disabled-iview-form.less";
+	@import "../css/common-style.less";
+	@import "../css/dark-iview-drawer.less";
+	@import "../css/dark-iview-card.less";
+	@import "../css/dark-iview-poptip.less";
+	@import "../css/dark-iview-checkbox.less";
+	@import "../css/dark-el-cascader.less";
+	@import "../css/dark-iview-style.less";
+	@import "../css/custom-iview.less";
+	@import "../css/light-iview-form.less";
+</style>

+ 4 - 3
TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.less

@@ -190,10 +190,11 @@
             height: 100%;
             right: 50px;
             top: 0;
-            font-size: 16px;
+            font-size: 14px;
+			color: #767676;
             .fl-row-center;
-            display: none;
-            color: var(--normal-icon-color);
+            // display: none;
+            // color: var(--normal-icon-color);
 
 			
 			.ivu-icon{

+ 5 - 10
TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.vue

@@ -70,7 +70,7 @@
 						</span> -->
 						<span class="paper-item-tools-edit" @click.stop="goToPaper(paper)"
 							v-if="($access.can('admin.*||exercise-upd') || !isSchool)">
-							<Icon type="ios-create" />
+							<Icon type="md-create" />
 							<span>{{$t('evaluation.editItem')}}</span>
 						</span>
 						<span class="paper-item-tools-delete" @click.stop="onDeletePaper(paper)"
@@ -80,16 +80,11 @@
 						</span>
 					</div>
 					<div v-if="chooseModel" class="paper-item-select">
-						<div @click.stop="onCheckPaper(paper)"
-							v-if="!checkedPaperList.length || (checkedPaperList.length && !checkedPaperList.map(i => i.id).includes(paper.id))">
-							<Icon type="md-add" />
-							<span>{{$t('evaluation.paperList.choosePaper')}}</span>
+						<div>
+							<Button :type="checkedPaperList.map(i => i.id).includes(paper.id) ? 'warning' : 'info'" @click.stop="checkedPaperList.map(i => i.id).includes(paper.id) ? onCancelCheck(paper) : onCheckPaper(paper)">
+								{{ checkedPaperList.map(i => i.id).includes(paper.id) ? $t('evaluation.paperList.choosed') : $t('evaluation.paperList.choosePaper')}}
+							</Button>
 						</div>
-						<div @click.stop="onCancelCheck(paper)" v-else>
-							<Icon type="md-checkmark-circle" color="#32b67b" />
-							<span>{{$t('evaluation.paperList.choosed')}}</span>
-						</div>
-
 					</div>
 				</div>
 

+ 1 - 1
TEAMModelOS/ClientApp/src/view/evaluation/index/CommonExercise.less

@@ -312,7 +312,7 @@
       }
     }
     .ivu-icon {
-      font-size: 16px;
+	  font-size: 14px;
       font-weight: bold;
     }
     .ivu-btn {

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

@@ -787,6 +787,7 @@
 				this.getSchoolInfo(storageInfo.period,storageInfo)
 				// this.$Message.info('已自动为您快速切换到上次题目的学段科目和年级信息')
 			}
+			
 
 		},
 		computed: {

+ 16 - 11
TEAMModelOS/ClientApp/src/view/newsheet/BaseEditor.vue

@@ -453,8 +453,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)
 										if(editorIndex !== 0){
@@ -512,16 +512,19 @@
 			// 跨页内容分割处理
 			getSplitHtml(pArr,heightArr){
 				let result = []
+				console.log(pArr)
+				console.log(heightArr)
 				heightArr.forEach(height => {
+					height = height - 20
 					let fillHtml = ''
 					let fillHeight = 0
 					let delEles = []
 					pArr.forEach((pElement,index) => {
-						fillHeight += (pElement.getBoundingClientRect().height + 2)
-						// console.log(height)
-						// console.log(fillHeight)
+						fillHeight += (pElement.getBoundingClientRect().height + 10)
+						console.log(height)
+						console.log(fillHeight)
 						if(fillHeight < height){
-							// console.log('纳入',pElement.innerHTML)
+							console.log('纳入',pElement.innerHTML)
 							fillHtml += this.nodeToString(pElement)
 							delEles.push(index)
 						}
@@ -532,6 +535,7 @@
 					})
 					pArr = pArr.filter((i,index) => !delEles.includes(index))
 				})
+				console.log(result)
 				return result
 			},
 			
@@ -705,8 +709,6 @@
 					"image",
 					"indent",
 					"lineHeight",
-					"foreColor",
-					"backColor",
 					"undo",
 				];
 				editor.config.onfocus = (html) => {
@@ -717,6 +719,10 @@
 						this.isShowTools = true
 					}
 				};
+				/* 如果内容发生变化 也视为发生修改 */
+				editor.txt.eventHooks.keyupEvents.push(() => {
+					this.$EventBus.$emit('hasDrag')
+				})
 				editor.config.onblur = (html) => {
 					let scrollHeight = editor.$textElem.elems[0].scrollHeight
 					let editorHeight = editor.$textElem.elems[0].clientHeight
@@ -726,6 +732,7 @@
 					if(scrollHeight > editorHeight){
 						editor.config.height = scrollHeight > 200 ? scrollHeight : 200
 						this.$EventBus.$emit('doRefresh')
+						this.$EventBus.$emit('hasDrag')
 					}
 					
 					document.getElementById(curId) && (document.getElementById(curId).getElementsByClassName(
@@ -765,7 +772,7 @@
 				let curItemWhichPage = this.$store.state.answerSheet.pages
 				this.setSubjectiveConfig(60,height,true,itemOrder,count,type,'')
 				const editor = new E("#" + curId);
-				editor.config.height = height;
+				editor.config.height = height + 20;
 				editor.config.menus = [
 					"bold",
 					"fontSize",
@@ -776,8 +783,6 @@
 					"image",
 					"indent",
 					"lineHeight",
-					"foreColor",
-					"backColor",
 					"undo",
 				];
 				this.define({

+ 1 - 1
TEAMModelOS/ClientApp/src/view/newsheet/index.vue

@@ -599,7 +599,7 @@
 					}
 				}
 				this.$router.push({
-					name: this.fromRouter || 'schoolBank',
+					name: this.fromRouter || 'personalBank',
 					params: params
 				})
 				// this.$router.go(-1)