mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-24 02:02:53 +08:00
Compare commits
1 Commits
bugfix-132
...
20251203-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63229eea7d |
12
src/App.vue
12
src/App.vue
@@ -87,16 +87,4 @@
|
|||||||
border: 1px solid #e7e7e7 !important;
|
border: 1px solid #e7e7e7 !important;
|
||||||
box-shadow: 0px 1px 5px 1px rgba(92,98,111,.3);
|
box-shadow: 0px 1px 5px 1px rgba(92,98,111,.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#app > *:not(.case-expert-dialog) {
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.case-expert-dialog {
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -52,12 +52,7 @@ formRequest.interceptors.response.use(res => {
|
|||||||
if(code === 401){
|
if(code === 401){
|
||||||
//Message({message: msg, type: 'error'});
|
//Message({message: msg, type: 'error'});
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = this.webBaseUrl + ReLoginUrl;
|
||||||
top.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
|
|||||||
@@ -54,12 +54,7 @@ formRequest.interceptors.response.use(res => {
|
|||||||
}else{
|
}else{
|
||||||
if(code === 401){
|
if(code === 401){
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = this.webBaseUrl + ReLoginUrl;
|
||||||
top.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
|
|||||||
@@ -53,12 +53,7 @@ jsonRequest.interceptors.response.use(res => {
|
|||||||
}else{
|
}else{
|
||||||
if(code == 6001){ //对方是字符串,所以这里不要使用三个等号
|
if(code == 6001){ //对方是字符串,所以这里不要使用三个等号
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = ReLoginUrl;
|
||||||
top.location.href = ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
@@ -122,12 +117,7 @@ formRequest.interceptors.response.use(res => {
|
|||||||
}else{
|
}else{
|
||||||
if(code == 6001){ //对方是字符串,所以这里不要使用三个等号
|
if(code == 6001){ //对方是字符串,所以这里不要使用三个等号
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = ReLoginUrl;
|
||||||
top.location.href = ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
|
|||||||
@@ -50,12 +50,7 @@ jsonRequest.interceptors.response.use(res => {
|
|||||||
}else{
|
}else{
|
||||||
if(code === 401){
|
if(code === 401){
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = this.webBaseUrl + ReLoginUrl;
|
||||||
top.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
@@ -117,12 +112,7 @@ formRequest.interceptors.response.use(res => {
|
|||||||
}else{
|
}else{
|
||||||
if(code === 401){
|
if(code === 401){
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = this.webBaseUrl + ReLoginUrl;
|
||||||
top.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
|
|||||||
@@ -50,12 +50,7 @@ jsonRequest.interceptors.response.use(res => {
|
|||||||
}else{
|
}else{
|
||||||
if(code === 401){
|
if(code === 401){
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = this.webBaseUrl + ReLoginUrl;
|
||||||
top.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
@@ -117,12 +112,7 @@ formRequest.interceptors.response.use(res => {
|
|||||||
}else{
|
}else{
|
||||||
if(code === 401){
|
if(code === 401){
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = this.webBaseUrl + ReLoginUrl;
|
||||||
top.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = this.webBaseUrl + ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
|
|||||||
@@ -86,12 +86,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
//console.log(location.href,'location.href');
|
//console.log(location.href,'location.href');
|
||||||
//let urlPre=window.location.protocol+'//'+window.location.host;
|
//let urlPre=window.location.protocol+'//'+window.location.host;
|
||||||
//let backUrl=location.href.substring(urlPre.length); encodeURIComponent()
|
//let backUrl=location.href.substring(urlPre.length); encodeURIComponent()
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href=process.env.VUE_APP_LOGIN_URL+"?returnUrl="+encodeURIComponent(location.href);
|
||||||
top.location.href = process.env.VUE_APP_LOGIN_URL + "?returnUrl=" + encodeURIComponent(location.href);
|
|
||||||
} else {
|
|
||||||
window.location.href = process.env.VUE_APP_LOGIN_URL + "?returnUrl=" + encodeURIComponent(location.href);
|
|
||||||
}
|
|
||||||
// location.href=process.env.VUE_APP_LOGIN_URL+"?returnUrl="+encodeURIComponent(location.href);
|
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,30 +53,15 @@ jsonRequest.interceptors.response.use(res => {
|
|||||||
}else{
|
}else{
|
||||||
if(code == 6001){ //针对于老系统的处理
|
if(code == 6001){ //针对于老系统的处理
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = ReLoginUrl;
|
||||||
top.location.href = ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code === 401){
|
}else if(code === 401){
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = ReLoginUrl;
|
||||||
top.location.href = ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code === 402){
|
}else if(code === 402){
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = ReLoginUrl;
|
||||||
top.location.href = ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
@@ -84,12 +69,7 @@ jsonRequest.interceptors.response.use(res => {
|
|||||||
return Promise.reject(new Error(msg))
|
return Promise.reject(new Error(msg))
|
||||||
//return res.data;
|
//return res.data;
|
||||||
}else if(code===302){
|
}else if(code===302){
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = ReLoginUrl;
|
||||||
top.location.href = ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = ReLoginUrl;
|
|
||||||
}else{
|
}else{
|
||||||
//Message({message: res.data.message, type: 'error'});
|
//Message({message: res.data.message, type: 'error'});
|
||||||
//console.log('err:' + res.data.error);
|
//console.log('err:' + res.data.error);
|
||||||
@@ -147,42 +127,22 @@ formRequest.interceptors.response.use(res => {
|
|||||||
}else{
|
}else{
|
||||||
if(code == 6001){ //针对于老系统的处理,因为老系统是字符串,所以这里不使用三等于号
|
if(code == 6001){ //针对于老系统的处理,因为老系统是字符串,所以这里不使用三等于号
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = ReLoginUrl;
|
||||||
top.location.href = ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code === 401){
|
}else if(code === 401){
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = ReLoginUrl;
|
||||||
top.location.href = ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code === 402){
|
}else if(code === 402){
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = ReLoginUrl;
|
||||||
top.location.href = ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = ReLoginUrl;
|
|
||||||
})
|
})
|
||||||
}else if(code===403){
|
}else if(code===403){
|
||||||
var msg='当前操作没有权限';
|
var msg='当前操作没有权限';
|
||||||
Message({message: msg, type: 'error'});
|
Message({message: msg, type: 'error'});
|
||||||
return Promise.reject(new Error(msg))
|
return Promise.reject(new Error(msg))
|
||||||
}else if(code===302){
|
}else if(code===302){
|
||||||
if (top !== window) { // 判断当前是否在iframe内
|
location.href = ReLoginUrl;
|
||||||
top.location.href = ReLoginUrl;
|
|
||||||
} else {
|
|
||||||
window.location.href = ReLoginUrl;
|
|
||||||
}
|
|
||||||
// location.href = ReLoginUrl;
|
|
||||||
}else{
|
}else{
|
||||||
//Message({message: res.data.message, type: 'error'});
|
//Message({message: res.data.message, type: 'error'});
|
||||||
//console.log('err' + res.data.error);
|
//console.log('err' + res.data.error);
|
||||||
|
|||||||
@@ -163,12 +163,11 @@
|
|||||||
<!-- 精品课模块 -->
|
<!-- 精品课模块 -->
|
||||||
<div class="xcontent2-main">
|
<div class="xcontent2-main">
|
||||||
<div class="modules-title xindex-main" v-if="this.qusisityList.list.length > 0">
|
<div class="modules-title xindex-main" v-if="this.qusisityList.list.length > 0">
|
||||||
<!-- <span class="jin-text">精品课</span> -->
|
<!-- <span class="modules-text" style="color: #3D86F4;">精品课</span> -->
|
||||||
<div class="jin-zhe"></div>
|
|
||||||
<span class="quyer-tag" style="margin-left: 0px;">
|
<span class="quyer-tag" style="margin-left: 0px;">
|
||||||
|
<!-- <img src="../assets/images/tutoring1.pn" alt=""> -->
|
||||||
<img class="modules-text" style="height: 28px;" src="../assets/images/course/courseTitle.png" alt="">
|
<img class="modules-text" style="height: 28px;" src="../assets/images/course/courseTitle.png" alt="">
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="more">
|
<span class="more">
|
||||||
<router-link to="/qualityCourse">查看更多>></router-link>
|
<router-link to="/qualityCourse">查看更多>></router-link>
|
||||||
</span>
|
</span>
|
||||||
@@ -2827,15 +2826,6 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.modules-title {
|
.modules-title {
|
||||||
position: relative;
|
|
||||||
.jin-zhe{
|
|
||||||
width: 410px;
|
|
||||||
height: 30px;
|
|
||||||
background: #f7f7f9;
|
|
||||||
position: absolute;
|
|
||||||
left: 86px;
|
|
||||||
|
|
||||||
}
|
|
||||||
.modules-text {
|
.modules-text {
|
||||||
height: 28px;
|
height: 28px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
@@ -3146,13 +3136,4 @@ export default {
|
|||||||
border: 1px solid #d9edf7;
|
border: 1px solid #d9edf7;
|
||||||
//overflow: hidden;
|
//overflow: hidden;
|
||||||
}
|
}
|
||||||
.jin-text{
|
|
||||||
font-family: "Source Han Sans CN", "SourceHanSansCN", sans-serif !important;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 20px;
|
|
||||||
color: #3E87F5;
|
|
||||||
// line-height: 29px;/
|
|
||||||
text-align: justify;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Cookies from "vue-cookies";
|
import Cookies from 'vue-cookies'
|
||||||
import apiLogin from "@/api/login.js";
|
import apiLogin from '@/api/login.js'
|
||||||
import { getToken, setToken } from "@/utils/token";
|
import { getToken,setToken } from '@/utils/token'
|
||||||
export default{
|
export default{
|
||||||
mounted(){
|
mounted(){
|
||||||
this.toUrl=this.$route.query.returnUrl;
|
this.toUrl=this.$route.query.returnUrl;
|
||||||
@@ -19,16 +19,11 @@ export default {
|
|||||||
$this.curToken=getToken();
|
$this.curToken=getToken();
|
||||||
if(!$this.curToken){
|
if(!$this.curToken){
|
||||||
//console.log(token,'第二次未获取token');
|
//console.log(token,'第二次未获取token');
|
||||||
if (top !== window) {
|
location.href = process.env.VUE_APP_LOGIN_URL;
|
||||||
// 判断当前是否在iframe内
|
|
||||||
top.location.href = process.env.VUE_APP_LOGIN_URL;
|
|
||||||
} else {
|
|
||||||
window.location.href = process.env.VUE_APP_LOGIN_URL;
|
|
||||||
}
|
|
||||||
// location.href = process.env.VUE_APP_LOGIN_URL;
|
|
||||||
}else{
|
}else{
|
||||||
$this.boeLogin();
|
$this.boeLogin();
|
||||||
}
|
}
|
||||||
|
|
||||||
},500);
|
},500);
|
||||||
}else{
|
}else{
|
||||||
this.curToken=token;
|
this.curToken=token;
|
||||||
@@ -37,29 +32,29 @@ export default {
|
|||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
curToken: "",
|
curToken:'',
|
||||||
toUrl: "",
|
toUrl:''
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
boeLogin(){
|
boeLogin(){
|
||||||
apiLogin.boeLogin(this.curToken).then((rs) => {
|
apiLogin.boeLogin(this.curToken).then(rs=>{
|
||||||
if(rs.status==200){
|
if(rs.status==200){
|
||||||
//setToken(rs.result.access_token);
|
//setToken(rs.result.access_token);
|
||||||
localStorage.setItem(this.$xpage.constants.newLoginKey,1);
|
localStorage.setItem(this.$xpage.constants.newLoginKey,1);
|
||||||
if(this.toUrl){
|
if(this.toUrl){
|
||||||
location.href=this.toUrl;
|
location.href=this.toUrl;
|
||||||
}else{
|
}else{
|
||||||
this.$router.push({ path: "/index" });
|
this.$router.push({ path: "/index" })
|
||||||
}
|
}
|
||||||
//this.$router.push({ path: "/index" })
|
//this.$router.push({ path: "/index" })
|
||||||
}else{
|
}else{
|
||||||
this.$message.error("登录失败:"+rs.message);
|
this.$message.error("登录失败:"+rs.message);
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -134,10 +134,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div style="line-height: 30px;">
|
<div style="line-height: 30px;">
|
||||||
<div>请在当前面板选择需要上传的课件</div>
|
<div>请在当前面板选择需要上传的课件</div>
|
||||||
<div style="">提示:<br>
|
<div style="">提示:课件大小超过1G时,无法上传,请先压缩视频,或剪切成多个再上传。视频码率需在1.5Mb/s及以下,帧数需在30帧及以下。如果上传zip文件必须是scorm标准打包文件</div>
|
||||||
1、课件大小超过1G时,无法上传,请先压缩视频,或剪切成多个再上传。<br>
|
|
||||||
2、视频码率需在1.5Mb/s及以下,帧数需在30帧及以下。<br>
|
|
||||||
3、如果上传zip文件必须是scorm标准打包文件。</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div style="display: flex;line-height: 30px;padding: 5px 0px;">
|
<div style="display: flex;line-height: 30px;padding: 5px 0px;">
|
||||||
|
|||||||
@@ -2,15 +2,17 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- 最大化状态的弹窗 -->
|
<!-- 最大化状态的弹窗 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-if="dialogVisible && windowState === 'maximized'"
|
v-show=" windowState === 'maximized'"
|
||||||
|
v-if="dialogVisible"
|
||||||
:visible="true"
|
:visible="true"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
@close="onClose"
|
@close="onClose"
|
||||||
class="case-expert-dialog"
|
class="case-expert-dialog"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
|
:append-to-body="true"
|
||||||
:fullscreen="false"
|
:fullscreen="false"
|
||||||
top="0"
|
top="10vh"
|
||||||
v-resizeable
|
v-resizeable
|
||||||
v-draggable
|
v-draggable
|
||||||
>
|
>
|
||||||
@@ -33,7 +35,6 @@
|
|||||||
class="welcome-message"
|
class="welcome-message"
|
||||||
ref="messageContainer"
|
ref="messageContainer"
|
||||||
@scroll="handleScroll"
|
@scroll="handleScroll"
|
||||||
@wheel="handleWheel"
|
|
||||||
>
|
>
|
||||||
<div class="message-text" v-for="(item, index) in messageList" :key="index">
|
<div class="message-text" v-for="(item, index) in messageList" :key="index">
|
||||||
<messages :messageData="item" :suggestions="suggestions" @getMinWindow="minimizeWindow"></messages>
|
<messages :messageData="item" :suggestions="suggestions" @getMinWindow="minimizeWindow"></messages>
|
||||||
@@ -192,7 +193,7 @@ export default {
|
|||||||
left: parseInt(dialogEl.style.left),
|
left: parseInt(dialogEl.style.left),
|
||||||
top: parseInt(dialogEl.style.top)
|
top: parseInt(dialogEl.style.top)
|
||||||
};
|
};
|
||||||
// sessionStorage.setItem('aiCallDialogPosition', JSON.stringify(currentPosition));
|
sessionStorage.setItem('aiCallDialogPosition', JSON.stringify(currentPosition));
|
||||||
|
|
||||||
// 移除全局事件监听
|
// 移除全局事件监听
|
||||||
document.removeEventListener('mousemove', handleMouseMove);
|
document.removeEventListener('mousemove', handleMouseMove);
|
||||||
@@ -497,9 +498,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
dialogVisible: {
|
dialogVisible: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
console.log('dialogVisible发生变化');
|
|
||||||
console.log(newVal);
|
|
||||||
console.log(this.windowState);
|
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 获取对话框元素
|
// 获取对话框元素
|
||||||
@@ -516,12 +514,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否有保存的位置状态
|
// 检查是否有保存的位置状态
|
||||||
// const savedPosition = sessionStorage.getItem('aiCallDialogPosition');
|
const savedPosition = sessionStorage.getItem('aiCallDialogPosition');
|
||||||
// if (savedPosition) {
|
if (savedPosition) {
|
||||||
// const { left, top } = JSON.parse(savedPosition);
|
const { left, top } = JSON.parse(savedPosition);
|
||||||
// dialogEl.style.left = left + 'px';
|
dialogEl.style.left = left + 'px';
|
||||||
// dialogEl.style.top = top + 'px';
|
dialogEl.style.top = top + 'px';
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let doc = document.querySelector('.welcome-message')
|
let doc = document.querySelector('.welcome-message')
|
||||||
@@ -568,7 +566,7 @@ closeMinimizedWindow() {
|
|||||||
console.log('关闭弹窗')
|
console.log('关闭弹窗')
|
||||||
// 清除保存的状态
|
// 清除保存的状态
|
||||||
sessionStorage.removeItem('aiCallDialogSize');
|
sessionStorage.removeItem('aiCallDialogSize');
|
||||||
// sessionStorage.removeItem('aiCallDialogPosition');
|
sessionStorage.removeItem('aiCallDialogPosition');
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
// 可以在这里执行其他逻辑
|
// 可以在这里执行其他逻辑
|
||||||
},
|
},
|
||||||
@@ -597,7 +595,6 @@ closeMinimizedWindow() {
|
|||||||
|
|
||||||
// 处理加载状态
|
// 处理加载状态
|
||||||
handleLoading(status) {
|
handleLoading(status) {
|
||||||
console.log('handleLoading---'+status);
|
|
||||||
this.isLoading = status;
|
this.isLoading = status;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -658,31 +655,6 @@ closeMinimizedWindow() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理鼠标滚轮事件
|
|
||||||
handleWheel(event) {
|
|
||||||
const element = this.$refs.messageContainer;
|
|
||||||
if (!element) return;
|
|
||||||
|
|
||||||
// 阻止事件冒泡,防止滚动底层页面
|
|
||||||
event.stopPropagation();
|
|
||||||
|
|
||||||
// 计算滚动方向和距离
|
|
||||||
const delta = event.deltaY || event.detail || event.wheelDelta;
|
|
||||||
|
|
||||||
// 检查是否可以继续滚动
|
|
||||||
if (delta < 0 && element.scrollTop === 0) {
|
|
||||||
// 向上滚动且已在顶部,阻止默认行为
|
|
||||||
event.preventDefault();
|
|
||||||
} else if (delta > 0 && element.scrollHeight - element.scrollTop <= element.clientHeight) {
|
|
||||||
// 向下滚动且已在底部,阻止默认行为
|
|
||||||
event.preventDefault();
|
|
||||||
} else {
|
|
||||||
// 允许在容器内滚动
|
|
||||||
element.scrollTop += delta;
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 最小化窗口的点击事件处理方法
|
// 最小化窗口的点击事件处理方法
|
||||||
onMinimizedWindowClick() {
|
onMinimizedWindowClick() {
|
||||||
// 当点击最小化窗口时,如果dialogVisible为false,则通过事件通知父组件显示对话框
|
// 当点击最小化窗口时,如果dialogVisible为false,则通过事件通知父组件显示对话框
|
||||||
@@ -697,9 +669,6 @@ closeMinimizedWindow() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
::v-deep .el-dialog__wrapper{
|
|
||||||
position: unset!important;
|
|
||||||
}
|
|
||||||
.case-expert-dialog {
|
.case-expert-dialog {
|
||||||
::v-deep .el-dialog{
|
::v-deep .el-dialog{
|
||||||
background: url("./components/u762.svg") no-repeat ;
|
background: url("./components/u762.svg") no-repeat ;
|
||||||
@@ -708,8 +677,6 @@ closeMinimizedWindow() {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
pointer-events: auto;
|
|
||||||
z-index: 2000;
|
|
||||||
|
|
||||||
//background-color: rgba(255, 255, 255, 0.8);
|
//background-color: rgba(255, 255, 255, 0.8);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
class="input-placeholder"
|
class="input-placeholder"
|
||||||
placeholder="有问题,尽管问"
|
placeholder="有问题,尽管问"
|
||||||
@keyup.enter.native.prevent="handleSend"
|
@keyup.enter.native="handleSend"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:autosize="{ minRows: 2, maxRows: 4}"
|
:autosize="{ minRows: 2, maxRows: 4}"
|
||||||
resize="none"
|
resize="none"
|
||||||
@@ -56,14 +56,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSend(event) {
|
handleSend() {
|
||||||
// 阻止事件的默认行为和冒泡
|
|
||||||
if (event) {
|
|
||||||
event.preventDefault();
|
|
||||||
event.stopPropagation();
|
|
||||||
console.log('preventDefault');
|
|
||||||
}
|
|
||||||
console.log('handleSend');
|
|
||||||
if (!this.inputContent.trim() || this.disabled) return
|
if (!this.inputContent.trim() || this.disabled) return
|
||||||
// 添加用户消息到列表
|
// 添加用户消息到列表
|
||||||
const userMessage = {
|
const userMessage = {
|
||||||
|
|||||||
@@ -2590,7 +2590,7 @@ a.custom2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.course-tags {
|
.course-tags {
|
||||||
margin: 10px 0 0;
|
margin: 5px 0;
|
||||||
min-height: 20px;
|
min-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2477,10 +2477,6 @@ export default {
|
|||||||
background-color: #f4f4f5;
|
background-color: #f4f4f5;
|
||||||
border-color: #e9e9eb;
|
border-color: #e9e9eb;
|
||||||
}
|
}
|
||||||
.course-tags {
|
|
||||||
margin: 10px 0 0;
|
|
||||||
min-height: 20px;
|
|
||||||
}
|
|
||||||
.course-tags ::v-deep .el-tag .keyword-highlight,
|
.course-tags ::v-deep .el-tag .keyword-highlight,
|
||||||
.course-tags ::v-deep .el-tag .exact-match-highlight {
|
.course-tags ::v-deep .el-tag .exact-match-highlight {
|
||||||
color: #387DF7 !important;
|
color: #387DF7 !important;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user