feat:合并

This commit is contained in:
lixg
2023-01-12 17:43:42 +08:00
14 changed files with 68 additions and 24 deletions

7
.env
View File

@@ -3,7 +3,7 @@ VUE_APP_BASE=/manage
# api项目基础url
VUE_APP_BASE_API=/manageApi
#文件路径
VUE_APP_FILE_PATH=/file/
VUE_APP_FILE_PATH=/upload/
# 代理url 本地调试,不可以用在其他地方
VUE_APP_PROXY_URL=http://111.231.196.214/manageApi
# 登录url
@@ -21,5 +21,6 @@ VUE_APP_IFRAME_STUDENT_URL=https://u-pre.boe.com/pc/loadingVUE_APP_BOE_API_URLVU
# 课程二维码
VUE_APP_COURSE_STUDY=https://u-pre.boe.com/pc/course/studyindex?id=
# 导入学员模板
VUE_APP_UP_LOAD_HOMEWORK_TEMPLATE=导入作业成绩 模板-1673450632417.xlsx
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673452888323.xlsx
VUE_APP_UP_LOAD_HOMEWORK_TEMPLATE=导入作业成绩模板-1673511599785.xlsx
# 导入作业成绩学员模板
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673511636808.xlsx

View File

@@ -1,2 +1,3 @@
NODE_ENV=alpine
VUE_APP_OUTPUT_DIR=./docker/dist
VUE_APP_FILE_PATH=/file/

View File

@@ -7,3 +7,7 @@ VUE_APP_LOGIN_URL=https://u-pre.boe.com/web
VUE_APP_BOE_API_URL=https://u-pre.boe.com
# 导入学员模板
VUE_APP_UP_LOAD_HOMEWORK_TEMPLATE=导入作业成绩模板-1673516508029.xlsx
# 导入作业成绩学员模板
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673516483342.xlsx

View File

@@ -19,9 +19,9 @@
</div>
</template>
<script>
import { computed, defineComponent, ref } from "vue";
import { computed, defineComponent, ref, onMounted } from "vue";
import { useRouter, useRoute } from "vue-router";
import { useStore } from "vuex";
import { useStore, createStore } from "vuex";
import NavLeft from "@/components/NavLeft";
import NavTop from "@/components/NavTop";
import OpenPages from "@/components/OpenPages";
@@ -71,6 +71,31 @@ export default defineComponent({
getOrgTree();
}
// 监听关闭浏览器
let time1 = ref(0);
let time2 = ref(0);
//添加监听事件
function beforeunloadHandler() {
time1.value = new Date().getTime();
// e.returnValue = '关闭提示';
}
function unloadHandler() {
time2.value = new Date().getTime() - time1.value;
if(time2.value<=5){
store.replaceState(createStore({state: {openpages:null}}).state);
localStorage.removeItem("openpages");
}
}
onMounted(()=>{
window.addEventListener('beforeunload', e => beforeunloadHandler(e));
window.addEventListener('unload', e => unloadHandler(e));
})
async function getMemberInfo() {
const list = localStorage.getItem("memberInitInfo");
if (list) {
@@ -124,7 +149,7 @@ export default defineComponent({
name: currentRouteName,
zhCN,
};
},
}
});
</script>
<style lang="scss">

View File

@@ -63,12 +63,16 @@ import DownLoad from "../components/drawers/DownLoad";
import * as api from "../api/index1";
import { studentUrl } from "../api/method";
import router from "@/router";
import { useStore, createStore } from "vuex";
export default {
name: "NavTop",
components: {
DownLoad,
},
setup() {
const store = useStore();
const state = reactive({
selectRole: "管理员",
username: "",
@@ -120,6 +124,9 @@ export default {
getUser();
const logOut = () => {
store.replaceState(createStore({state: {openpages:null}}).state);
localStorage.removeItem("faceclassPic");
localStorage.removeItem("faceclassClass");
localStorage.removeItem("faceclassScene");
@@ -138,7 +145,12 @@ export default {
localStorage.removeItem("projectId");
localStorage.removeItem("projectTemplateId");
localStorage.removeItem("orgtreeList");
process.env.NODE_ENV === 'development' ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
process.env.NODE_ENV === 'development' ? router.push({path: '/learningpath'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
if(process.env.NODE_ENV === 'development'){
setTimeout(() => {
window.location.reload();
}, 3000);
}
};
return {
...toRefs(state),

View File

@@ -51,7 +51,7 @@ export default {
const store = useStore();
const $router = useRouter();
const state = reactive({
//openList: store.state.openpages,
openList: store.state.openpages,
});
const closePage = (value) => {
@@ -91,7 +91,7 @@ export default {
<style lang="scss">
.openPages {
width: 100%;
// height: 50px;
height: 50px;
display: flex;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 8px 8px 0px rgba(118, 136, 166, 0.1);

View File

@@ -219,7 +219,7 @@ export default {
const state = reactive({
fileType: ["xls", "xlsx"],
importHomeWork:
process.env.VUE_APP_BASE_API + "admin/student/importHomeWork",
process.env.VUE_APP_BASE_API + "/admin/student/importHomeWork",
uploadpercent: -1,
uploadErr: false, //上传失败
addLoading: false,
@@ -227,10 +227,6 @@ export default {
succNum: 0, //成功数据数
errNum: 0, //失败数据数
downloadErrUrl: null, //下载失败数据
locationHref:
location.href.indexOf("http://") !== -1
? "http://111.231.196.214:12016/"
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
userId: store.state.userInfo.id,
userName: store.state.userInfo.realName,
fileName: "",
@@ -351,7 +347,6 @@ export default {
};
// 下载失败数据
const downloadEeeorData = () => {
console.log(state.locationHref + state.downloadErrUrl);
if (state.downloadErrUrl !== "") {
window.open(process.env.VUE_APP_FILE_PATH + state.downloadErrUrl);
}

View File

@@ -624,7 +624,7 @@ export default {
`${
process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${
props.datasource.chapterId
}&type=${2}&pid=${props.datasource.routerId}&taskType=${1}`
}&type=${2}&pid=${props.datasource.routerId}&taskType=${2}`
);
// api
// .exportTaskStudent({

View File

@@ -341,7 +341,7 @@
</a-modal>
-->
<a-modal
style="padding: 0"
:style="{padding: 0,position: relative,right: - (screenWidth/2 - 660) + 'px',}"
:closable="true"
:visible="stageVisible"
:footer="null"
@@ -560,6 +560,7 @@ const stuSelectKeys = ref([]);
const orgSelectKeys = ref([]);
const auditSelectKeys = ref([]);
const screenHeight = ref(document.body.clientHeight);
const screenWidth = ref(document.body.clientWidth);
const stuRowSelection = computed(() => ({
columnWidth: 20,
selectedRowKeys: stuSelectKeys.value,

View File

@@ -124,7 +124,6 @@ export default {
total: 0,
capacity: 0,
countCMB: 0,
locationHref: location.href.indexOf('http://') !== -1 ? 'http://111.231.196.214:12016/' : location.href.slice(0, location.href.indexOf('/m')) + '/upload/'
});
function getData() {
@@ -180,7 +179,7 @@ export default {
// 下载文件
function downLoadFile(data) {
console.log(data)
window.open(state.locationHref + data.url)
window.open(process.env.VUE_APP_FILE_PATH + data.url)
}
// 删除文件
function removeFile(data) {

View File

@@ -51,7 +51,7 @@
<!-- 概览无数据 -->
<div :style="{ display: 'block' }">
<div class="onerow">
<div class="taskmain">快速创建项目详情</div>
<div class="taskmain">快速创建路径图详情</div>
</div>
<div class="second">
<div @click="totask">

View File

@@ -689,7 +689,13 @@
</div>
</div>
<div style="width: 87px; text-align: center">
{{ element.cretime ? element.cretime + "分钟" : "-" }}
<!-- {{ element.cretime ? element.cretime + "分钟" : "-" }} -->
{{
element.cretime
?
element.type==1? Math.ceil(Number(element.cretime)/60) + "分钟" : element.cretime + "分钟"
: "-"
}}
</div>
<div
style="

View File

@@ -495,7 +495,8 @@
<div style="width: 87px; text-align: center">
{{
element.cretime
? element.cretime + "分钟"
?
element.type==1? Math.ceil(Number(element.cretime)/60) + "分钟" : element.cretime + "分钟"
: "-"
}}
</div>

View File

@@ -2498,8 +2498,7 @@ export default {
commonLevelName: "",
evaltype: "",
evalData: "",
facestudent: "",
locationHref: location.href.indexOf('http://') !== -1 ? 'http://111.231.196.214:12016/' : location.href.slice(0, location.href.indexOf('/m')) + '/upload/'
facestudent: ""
});
const levelList = reactive({