mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 23:36:46 +08:00
feat:合并
This commit is contained in:
7
.env
7
.env
@@ -3,7 +3,7 @@ VUE_APP_BASE=/manage
|
|||||||
# api项目基础url
|
# api项目基础url
|
||||||
VUE_APP_BASE_API=/manageApi
|
VUE_APP_BASE_API=/manageApi
|
||||||
#文件路径
|
#文件路径
|
||||||
VUE_APP_FILE_PATH=/file/
|
VUE_APP_FILE_PATH=/upload/
|
||||||
# 代理url 本地调试,不可以用在其他地方
|
# 代理url 本地调试,不可以用在其他地方
|
||||||
VUE_APP_PROXY_URL=http://111.231.196.214/manageApi
|
VUE_APP_PROXY_URL=http://111.231.196.214/manageApi
|
||||||
# 登录url
|
# 登录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_COURSE_STUDY=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||||
# 导入学员模板
|
# 导入学员模板
|
||||||
VUE_APP_UP_LOAD_HOMEWORK_TEMPLATE=导入作业成绩 模板-1673450632417.xlsx
|
VUE_APP_UP_LOAD_HOMEWORK_TEMPLATE=导入作业成绩模板-1673511599785.xlsx
|
||||||
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673452888323.xlsx
|
# 导入作业成绩学员模板
|
||||||
|
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673511636808.xlsx
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
NODE_ENV=alpine
|
NODE_ENV=alpine
|
||||||
VUE_APP_OUTPUT_DIR=./docker/dist
|
VUE_APP_OUTPUT_DIR=./docker/dist
|
||||||
|
VUE_APP_FILE_PATH=/file/
|
||||||
|
|||||||
4
.env.boe
4
.env.boe
@@ -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_BOE_API_URL=https://u-pre.boe.com
|
||||||
|
|
||||||
|
|
||||||
|
# 导入学员模板
|
||||||
|
VUE_APP_UP_LOAD_HOMEWORK_TEMPLATE=导入作业成绩模板-1673516508029.xlsx
|
||||||
|
# 导入作业成绩学员模板
|
||||||
|
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673516483342.xlsx
|
||||||
31
src/App.vue
31
src/App.vue
@@ -19,9 +19,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { computed, defineComponent, ref } from "vue";
|
import { computed, defineComponent, ref, onMounted } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useStore } from "vuex";
|
import { useStore, createStore } from "vuex";
|
||||||
import NavLeft from "@/components/NavLeft";
|
import NavLeft from "@/components/NavLeft";
|
||||||
import NavTop from "@/components/NavTop";
|
import NavTop from "@/components/NavTop";
|
||||||
import OpenPages from "@/components/OpenPages";
|
import OpenPages from "@/components/OpenPages";
|
||||||
@@ -71,6 +71,31 @@ export default defineComponent({
|
|||||||
getOrgTree();
|
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() {
|
async function getMemberInfo() {
|
||||||
const list = localStorage.getItem("memberInitInfo");
|
const list = localStorage.getItem("memberInitInfo");
|
||||||
if (list) {
|
if (list) {
|
||||||
@@ -124,7 +149,7 @@ export default defineComponent({
|
|||||||
name: currentRouteName,
|
name: currentRouteName,
|
||||||
zhCN,
|
zhCN,
|
||||||
};
|
};
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -63,12 +63,16 @@ import DownLoad from "../components/drawers/DownLoad";
|
|||||||
import * as api from "../api/index1";
|
import * as api from "../api/index1";
|
||||||
import { studentUrl } from "../api/method";
|
import { studentUrl } from "../api/method";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
|
import { useStore, createStore } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "NavTop",
|
name: "NavTop",
|
||||||
components: {
|
components: {
|
||||||
DownLoad,
|
DownLoad,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const store = useStore();
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
selectRole: "管理员",
|
selectRole: "管理员",
|
||||||
username: "",
|
username: "",
|
||||||
@@ -120,6 +124,9 @@ export default {
|
|||||||
getUser();
|
getUser();
|
||||||
|
|
||||||
const logOut = () => {
|
const logOut = () => {
|
||||||
|
|
||||||
|
store.replaceState(createStore({state: {openpages:null}}).state);
|
||||||
|
|
||||||
localStorage.removeItem("faceclassPic");
|
localStorage.removeItem("faceclassPic");
|
||||||
localStorage.removeItem("faceclassClass");
|
localStorage.removeItem("faceclassClass");
|
||||||
localStorage.removeItem("faceclassScene");
|
localStorage.removeItem("faceclassScene");
|
||||||
@@ -138,7 +145,12 @@ export default {
|
|||||||
localStorage.removeItem("projectId");
|
localStorage.removeItem("projectId");
|
||||||
localStorage.removeItem("projectTemplateId");
|
localStorage.removeItem("projectTemplateId");
|
||||||
localStorage.removeItem("orgtreeList");
|
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 {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
//openList: store.state.openpages,
|
openList: store.state.openpages,
|
||||||
});
|
});
|
||||||
|
|
||||||
const closePage = (value) => {
|
const closePage = (value) => {
|
||||||
@@ -91,7 +91,7 @@ export default {
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.openPages {
|
.openPages {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// height: 50px;
|
height: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: rgba(255, 255, 255, 1);
|
background-color: rgba(255, 255, 255, 1);
|
||||||
box-shadow: 0px 8px 8px 0px rgba(118, 136, 166, 0.1);
|
box-shadow: 0px 8px 8px 0px rgba(118, 136, 166, 0.1);
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ export default {
|
|||||||
const state = reactive({
|
const state = reactive({
|
||||||
fileType: ["xls", "xlsx"],
|
fileType: ["xls", "xlsx"],
|
||||||
importHomeWork:
|
importHomeWork:
|
||||||
process.env.VUE_APP_BASE_API + "admin/student/importHomeWork",
|
process.env.VUE_APP_BASE_API + "/admin/student/importHomeWork",
|
||||||
uploadpercent: -1,
|
uploadpercent: -1,
|
||||||
uploadErr: false, //上传失败
|
uploadErr: false, //上传失败
|
||||||
addLoading: false,
|
addLoading: false,
|
||||||
@@ -227,10 +227,6 @@ export default {
|
|||||||
succNum: 0, //成功数据数
|
succNum: 0, //成功数据数
|
||||||
errNum: 0, //失败数据数
|
errNum: 0, //失败数据数
|
||||||
downloadErrUrl: null, //下载失败数据
|
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,
|
userId: store.state.userInfo.id,
|
||||||
userName: store.state.userInfo.realName,
|
userName: store.state.userInfo.realName,
|
||||||
fileName: "",
|
fileName: "",
|
||||||
@@ -351,7 +347,6 @@ export default {
|
|||||||
};
|
};
|
||||||
// 下载失败数据
|
// 下载失败数据
|
||||||
const downloadEeeorData = () => {
|
const downloadEeeorData = () => {
|
||||||
console.log(state.locationHref + state.downloadErrUrl);
|
|
||||||
if (state.downloadErrUrl !== "") {
|
if (state.downloadErrUrl !== "") {
|
||||||
window.open(process.env.VUE_APP_FILE_PATH + state.downloadErrUrl);
|
window.open(process.env.VUE_APP_FILE_PATH + state.downloadErrUrl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -624,7 +624,7 @@ export default {
|
|||||||
`${
|
`${
|
||||||
process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${
|
process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${
|
||||||
props.datasource.chapterId
|
props.datasource.chapterId
|
||||||
}&type=${2}&pid=${props.datasource.routerId}&taskType=${1}`
|
}&type=${2}&pid=${props.datasource.routerId}&taskType=${2}`
|
||||||
);
|
);
|
||||||
// api
|
// api
|
||||||
// .exportTaskStudent({
|
// .exportTaskStudent({
|
||||||
|
|||||||
@@ -341,7 +341,7 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
-->
|
-->
|
||||||
<a-modal
|
<a-modal
|
||||||
style="padding: 0"
|
:style="{padding: 0,position: relative,right: - (screenWidth/2 - 660) + 'px',}"
|
||||||
:closable="true"
|
:closable="true"
|
||||||
:visible="stageVisible"
|
:visible="stageVisible"
|
||||||
:footer="null"
|
:footer="null"
|
||||||
@@ -560,6 +560,7 @@ const stuSelectKeys = ref([]);
|
|||||||
const orgSelectKeys = ref([]);
|
const orgSelectKeys = ref([]);
|
||||||
const auditSelectKeys = ref([]);
|
const auditSelectKeys = ref([]);
|
||||||
const screenHeight = ref(document.body.clientHeight);
|
const screenHeight = ref(document.body.clientHeight);
|
||||||
|
const screenWidth = ref(document.body.clientWidth);
|
||||||
const stuRowSelection = computed(() => ({
|
const stuRowSelection = computed(() => ({
|
||||||
columnWidth: 20,
|
columnWidth: 20,
|
||||||
selectedRowKeys: stuSelectKeys.value,
|
selectedRowKeys: stuSelectKeys.value,
|
||||||
|
|||||||
@@ -124,7 +124,6 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
capacity: 0,
|
capacity: 0,
|
||||||
countCMB: 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() {
|
function getData() {
|
||||||
@@ -180,7 +179,7 @@ export default {
|
|||||||
// 下载文件
|
// 下载文件
|
||||||
function downLoadFile(data) {
|
function downLoadFile(data) {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
window.open(state.locationHref + data.url)
|
window.open(process.env.VUE_APP_FILE_PATH + data.url)
|
||||||
}
|
}
|
||||||
// 删除文件
|
// 删除文件
|
||||||
function removeFile(data) {
|
function removeFile(data) {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<!-- 概览(无数据) -->
|
<!-- 概览(无数据) -->
|
||||||
<div :style="{ display: 'block' }">
|
<div :style="{ display: 'block' }">
|
||||||
<div class="onerow">
|
<div class="onerow">
|
||||||
<div class="taskmain">快速创建项目详情</div>
|
<div class="taskmain">快速创建路径图详情</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="second">
|
<div class="second">
|
||||||
<div @click="totask">
|
<div @click="totask">
|
||||||
|
|||||||
@@ -689,7 +689,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 87px; text-align: center">
|
<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>
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
|
|||||||
@@ -495,7 +495,8 @@
|
|||||||
<div style="width: 87px; text-align: center">
|
<div style="width: 87px; text-align: center">
|
||||||
{{
|
{{
|
||||||
element.cretime
|
element.cretime
|
||||||
? element.cretime + "分钟"
|
?
|
||||||
|
element.type==1? Math.ceil(Number(element.cretime)/60) + "分钟" : element.cretime + "分钟"
|
||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2498,8 +2498,7 @@ export default {
|
|||||||
commonLevelName: "",
|
commonLevelName: "",
|
||||||
evaltype: "",
|
evaltype: "",
|
||||||
evalData: "",
|
evalData: "",
|
||||||
facestudent: "",
|
facestudent: ""
|
||||||
locationHref: location.href.indexOf('http://') !== -1 ? 'http://111.231.196.214:12016/' : location.href.slice(0, location.href.indexOf('/m')) + '/upload/'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const levelList = reactive({
|
const levelList = reactive({
|
||||||
|
|||||||
Reference in New Issue
Block a user