diff --git a/.env b/.env index 42a95366..d88b27f1 100644 --- a/.env +++ b/.env @@ -3,11 +3,13 @@ VUE_APP_BASE=/manage # api项目基础url VUE_APP_BASE_API=/manageApi # 导出url -VUE_APP_PROXY_URL=http://111.231.196.214:30001/ +VUE_APP_PROXY_URL=http://111.231.196.214/manageApi # 登录url VUE_APP_LOGIN_URL=https://u-pre.boe.com/web # boe域名 VUE_APP_BOE_API_URL=https://u-pre.boe.com +#打包路径 +VUE_APP_OUTPUT_DIR=./dist # iframe嵌套url VUE_APP_IFRAME_URL=https://u-pre.boe.com/pc/iframe diff --git a/.env.alpine b/.env.alpine new file mode 100644 index 00000000..07a433c1 --- /dev/null +++ b/.env.alpine @@ -0,0 +1,2 @@ +NODE_ENV=alpine +VUE_APP_OUTPUT_DIR=./docker/dist diff --git a/.env.test b/.env.test index 77826102..310c858d 100644 --- a/.env.test +++ b/.env.test @@ -1,5 +1,2 @@ NODE_ENV=test -VUE_APP_BASE=/manage -VUE_APP_BASE_API=/manageApi - VUE_APP_BOE_API_URL=https://u-pre.boe.com \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..26171038 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,5 @@ +FROM devforth/spa-to-http:latest +WORKDIR / + +ADD ./dist/ . +EXPOSE 8080 diff --git a/package.json b/package.json index 91c565dd..50050c3a 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "build:boe": "vue-cli-service build --mode boe", "build:release": "vue-cli-service build --mode release", "build:prod": "vue-cli-service build --mode prod", - "build:test": "vue-cli-service build --mode test" + "build:test": "vue-cli-service build --mode test", + "build:alpine": "vue-cli-service build --mode alpine" }, "dependencies": { "@wangeditor/editor": "^5.1.23", diff --git a/src/App.vue b/src/App.vue index b81561ba..e84908a9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -44,7 +44,7 @@ export default defineComponent({ const store = useStore(); const isLogin = ref(false); // console.log("router", router.getRoutes(), route); - console.log("版本2.0.3------------"); + console.log("版本2.0.4------------"); const routes = computed(() => { return router.getRoutes().filter((e) => e.meta?.isLink); }); diff --git a/src/api/config.js b/src/api/config.js index 28c9621b..8db32374 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -58,7 +58,7 @@ http.interceptors.response.use( return response; } else { if (code === 1000) { - process.env.NODE_ENV === 'development' ? router.push({ path: 'login' }) : (window.location.href = process.env.VUE_APP_LOGIN_URL) + (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') ? router.push({ path: 'login' }) : (window.location.href = process.env.VUE_APP_LOGIN_URL) } console.log("api %o", msg); } diff --git a/src/components/drawers/AddLevelImportStu.vue b/src/components/drawers/AddLevelImportStu.vue index e69a9562..5da64b89 100644 --- a/src/components/drawers/AddLevelImportStu.vue +++ b/src/components/drawers/AddLevelImportStu.vue @@ -31,13 +31,27 @@ name="uploadFile" :multiple="false" @change="handleChange" - :data=" courseType==1?{ - stageId: Number(courseId), - type: 3 - }:{ - targetId: Number(courseId), - type: 3 - }" + :data=" + courseType == 1 + ? { + stageId: Number(courseId), + type: 3, + } + : courseType == 3 + ? { + targetId: Number(courseId), + type: 1, + } + : courseType == 4 + ? { + targetId: Number(courseId), + type: 2, + } + : { + targetId: Number(courseId), + type: 3, + } + " :showUploadList="false" >

@@ -53,33 +67,61 @@

支持扩展名:.xls/.xlsx
-->
- -
+
京东方商业模型.xls
-
上传失败
-
{{uploadpercent==100?"上传成功":"正在上传"}}
+
+ 上传失败 +
+
+ {{ uploadpercent == 100 ? "上传成功" : "正在上传" }} +
-
+
-
{{uploadpercent==-1?0:uploadpercent}}%
-
删除
+
+ {{ uploadpercent == -1 ? 0 : uploadpercent }}% +
+
+ 删除 +
-
-
下载失败数据
+
+
+ 下载失败数据 +
-
+
-
{{succNum}}条数据导入成功,{{errNum}}条数据导入失败
+
+ {{ succNum }}条数据导入成功,{{ errNum }}条数据导入失败 +
', info) + console.log("上传成功返回的UUID", info.file.response.data); + console.log("上传成功返回的UUID----->", info); console.log("我是导入学员接口传递的参数", { uploadFile: info.file.originFileObj, targetId: props.courseId, - type: 3 - }) + type: 3, + }); let i = 0; state.timers = setInterval(() => { - let uid = info.file.response.data; - api - .getImportStatus(uid) - .then((res) => { - console.log("查询导入状态", res); - if (res.data.code === 200) { - if (res.data.data.status !== "START") { - i++; - if (i === 1) { - message.destroy(); - message.success(`${info.file.name}上传成功`); - state.showBottomBar = true; - state.addLoading = false; - state.isAddStudent = true; - } - state.succNum = res.data.data.successNum; - state.errNum = res.data.data.failedNum; - state.downloadErrUrl = res.data.data.url; - clearInterval(state.timers); + let uid = info.file.response.data; + api + .getImportStatus(uid) + .then((res) => { + console.log("查询导入状态", res); + if (res.data.code === 200) { + if (res.data.data.status !== "START") { + i++; + if (i === 1) { + message.destroy(); + message.success(`${info.file.name}上传成功`); + state.showBottomBar = true; + state.addLoading = false; + state.isAddStudent = true; } + state.succNum = res.data.data.successNum; + state.errNum = res.data.data.failedNum; + state.downloadErrUrl = res.data.data.url; + clearInterval(state.timers); } - }) - .catch((err) => { - clearInterval(state.timers); - state.showBottomBar = true; - state.addLoading = false; - console.log("查询导入状态失败", err); - }); + } + }) + .catch((err) => { + clearInterval(state.timers); + state.showBottomBar = true; + state.addLoading = false; + console.log("查询导入状态失败", err); + }); }, 500); } else if (status === "error") { state.addLoading = false; state.uploadErr = true; message.error(`${info.file.name}上传失败`); } - }; // 下载失败数据 const downloadEeeorData = () => { - console.log(state.locationHref + state.downloadErrUrl) - if(state.downloadErrUrl!==""){ - window.open(state.locationHref + state.downloadErrUrl) + console.log(state.locationHref + state.downloadErrUrl); + if (state.downloadErrUrl !== "") { + window.open(state.locationHref + state.downloadErrUrl); } - } + }; //删除 const removeUpload = () => { @@ -301,7 +347,7 @@ export default { handleChange, BATCH_IMPORT_SCORE, downloadEeeorData, - removeUpload + removeUpload, }; }, }; diff --git a/src/components/drawers/ExportScore.vue b/src/components/drawers/ExportScore.vue index 929c4873..b0b879fd 100644 --- a/src/components/drawers/ExportScore.vue +++ b/src/components/drawers/ExportScore.vue @@ -36,7 +36,7 @@ :showUploadList="false" :data="{ type: type, - targetid: Number(id), + targetId: Number(id), }" >

diff --git a/src/components/drawers/project/ProjectEvalManage.vue b/src/components/drawers/project/ProjectEvalManage.vue index 9f989811..4efce258 100644 --- a/src/components/drawers/project/ProjectEvalManage.vue +++ b/src/components/drawers/project/ProjectEvalManage.vue @@ -4,7 +4,7 @@ :visible="Evalvisible" class="drawerStyle ProjectEvalManage" placement="right" - width="60%" + width="80%" @after-visible-change="afterVisibleChange" >

@@ -20,7 +20,7 @@
起止时间:{{ datasource.startTime }} ~ {{ datasource.endTime }} @@ -35,7 +35,7 @@
姓名:
@@ -44,12 +44,11 @@
@@ -159,7 +158,7 @@ export default { pageSize: 10, currentPage: 1, tableDataTotal: 0, - projectName: "", + projectName:undefined, projectNameList: [ { id: 1, @@ -186,9 +185,10 @@ export default { title: "工号", dataIndex: "studentUserNo", key: "studentUserNo", - width: 50, + width: 60, align: "center", className: "h head", + ellipsis: true, customRender: (text) => { return (
@@ -203,6 +203,7 @@ export default { key: "studentName", width: 50, align: "left", + ellipsis: true, className: "h head", customRender: (text) => { return ( @@ -218,6 +219,7 @@ export default { key: "studentDepartName", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -233,6 +235,7 @@ export default { key: "studentJobName", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -248,6 +251,7 @@ export default { key: "currentStageName", width: 60, align: "center", + ellipsis: true, className: "h", customRender: () => { return ( @@ -263,7 +267,8 @@ export default { key: "endStudyTime", width: 60, align: "center", - className: "h", + ellipsis: true, + className: "h", customRender: (text) => { return (
@@ -279,7 +284,8 @@ export default { key: "finishStatus", width: 60, align: "center", - className: "h", + ellipsis: true, + className: "h", customRender: (text) => { return (
@@ -294,6 +300,7 @@ export default { key: "PDFstatus", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -311,7 +318,7 @@ export default { ctx.emit("update:Evalvisible", false); state.currentPage = 1; state.name = ""; - state.projectName = ""; + state.projectName = undefined; state.tabledata = []; }; const afterVisibleChange = (bol) => { @@ -385,7 +392,7 @@ export default { state.tableDataTotalLoading = true; state.currentPage = 1; state.name = ""; - state.projectName = ""; + state.projectName = undefined; getData(); } diff --git a/src/components/drawers/project/ProjectExamManage.vue b/src/components/drawers/project/ProjectExamManage.vue index 2a32f0a4..ea6ef595 100644 --- a/src/components/drawers/project/ProjectExamManage.vue +++ b/src/components/drawers/project/ProjectExamManage.vue @@ -4,7 +4,7 @@ :visible="TMvisible" class="drawerStyle ProjectExamManage" placement="right" - width="60%" + width="80%" @after-visible-change="afterVisibleChange" >
@@ -23,7 +23,7 @@
姓名:
@@ -32,7 +32,7 @@
{ @@ -217,6 +217,7 @@ export default { key: "studentDepartName", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -232,7 +233,8 @@ export default { key: "studentJobName", width: 60, align: "center", - className: "h", + ellipsis: true, + className: "h", customRender: (text) => { return (
@@ -247,7 +249,8 @@ export default { key: "testNumber", width: 60, align: "center", - className: "h", + ellipsis: true, + className: "h", customRender: (text) => { return (
@@ -262,6 +265,7 @@ export default { key: "score", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -278,6 +282,7 @@ export default { key: "finishedTime", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -293,6 +298,7 @@ export default { key: "status", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { console.log(text.record.status); @@ -310,7 +316,7 @@ export default { const closeDrawer = () => { ctx.emit("update:TMvisible", false); state.name = ""; - state.projectName = ""; + state.projectName = undefined; state.selectedRowKeys = []; state.currentPage = 1; state.tabledata = []; @@ -395,7 +401,7 @@ export default { state.loadingData = true; state.currentPage = 1; state.name = ''; - state.projectName = ''; + state.projectName = undefined; getData(); } diff --git a/src/components/drawers/project/ProjectFaceStu.vue b/src/components/drawers/project/ProjectFaceStu.vue index 7fb78452..385752cb 100644 --- a/src/components/drawers/project/ProjectFaceStu.vue +++ b/src/components/drawers/project/ProjectFaceStu.vue @@ -30,7 +30,9 @@ : "-" }}
-
签到时间:14:00
+
+ 签到时间:{{ beginTime }}~{{ endTime }} +
@@ -62,7 +64,7 @@
{ if (bol == true) { getStudent(); + isSignClick(); } }; //考勤 @@ -358,7 +364,7 @@ export default { const closeDrawer = () => { ctx.emit("update:FSvisible", false); state.name = null; - state.projectName2 = null; + state.projectName2 = undefined; state.selectedRowKeys = []; state.selectedStudents = []; state.currentPage = 1; @@ -492,6 +498,7 @@ export default { key: "studentUserNo", width: 50, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -530,6 +537,7 @@ export default { width: 50, align: "center", className: "h", + ellipsis: true, customRender: (text) => { return (
@@ -548,6 +556,7 @@ export default { key: "studentJobName", width: 50, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -567,6 +576,7 @@ export default { key: "signTime", width: 110, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -590,6 +600,7 @@ export default { key: "signStatus", width: 50, align: "center", + ellipsis: true, className: "h", customRender: (text) => { // console.log("text", text); @@ -612,6 +623,7 @@ export default { key: "signStatus", width: 50, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -623,6 +635,7 @@ export default { }, { title: "考勤情况", + ellipsis: true, className: "h", dataIndex: "opacation", key: "opacation", @@ -831,7 +844,7 @@ export default { function resetTaskList() { state.currentPage = 1; state.name = null; - state.projectName2 = null; + state.projectName2 = undefined; state.tableDataTotal = -1; state.tableDataTotal2 = 0; getStudent(); @@ -882,7 +895,31 @@ export default { getStudent(); } }; + // 计算签到时间 + const isSignClick = () => { + let beginTime = new Date(props.datasource.startTime).getTime(); + let endTime = !props.datasource.afterStart + ? new Date(props.datasource.endTime).getTime() + : new Date(props.datasource.beginTime).getTime(); + if (props.datasource.beforeStart && props.datasource.afterStart) { + //有开始前有开始后 + beginTime = beginTime - props.datasource.beforeStart * 60 * 1000; + endTime = endTime + props.datasource.afterStart * 60 * 1000; + console.log("1111"); + } else if (props.datasource.beforeStart && !props.datasource.afterStart) { + //只有开始前无开始后 + beginTime = beginTime - props.datasource.beforeStart * 60 * 1000; + console.log("11112222"); + } else if (!props.datasource.beforeStart && props.datasource.afterStart) { + //无开始前有开始后 + endTime = endTime + props.datasource.afterStart * 60 * 1000; + console.log("1111333"); + } + state.beginTime = toDate(beginTime / 1000, "Y/M/D h:m:s"); + state.endTime = toDate(endTime / 1000, "Y/M/D h:m:s"); + console.log("beginTime,endTime", state.beginTime, state.endTime); + }; return { ...toRefs(state), selectProjectName, diff --git a/src/components/drawers/project/ProjectFaceTaskManage.vue b/src/components/drawers/project/ProjectFaceTaskManage.vue index 86e3a639..f7fa54b8 100644 --- a/src/components/drawers/project/ProjectFaceTaskManage.vue +++ b/src/components/drawers/project/ProjectFaceTaskManage.vue @@ -34,7 +34,7 @@
姓名:
@@ -43,7 +43,7 @@
{ return (
@@ -325,6 +326,7 @@ export default { key: "studentJobName", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -344,6 +346,7 @@ export default { key: "workScore", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -363,6 +366,7 @@ export default { key: "examinationScore", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -383,6 +387,7 @@ export default { key: "assessmentScore", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -403,6 +408,7 @@ export default { key: "finishStatus", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -427,6 +433,7 @@ export default { key: "operation", width: 100, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return text.record.finishStatus == 1 ? ( @@ -558,7 +565,7 @@ export default { const closeDrawer = () => { ctx.emit("update:Fvisible", false); state.name = ""; - state.projectName = ""; + state.projectName = undefined; state.selectedRowKeys = []; state.currentPage = 1; state.tableDataTotal = -1; @@ -651,7 +658,7 @@ export default { function resetTaskList() { state.currentPage = 1; state.name = ""; - state.projectName = ""; + state.projectName = undefined; state.tableDataTotal = -1; state.tableDataTotal2 = 0; getStudent(); diff --git a/src/components/drawers/project/ProjectHomeWorkManage.vue b/src/components/drawers/project/ProjectHomeWorkManage.vue index edfa30f7..bfb07e1f 100644 --- a/src/components/drawers/project/ProjectHomeWorkManage.vue +++ b/src/components/drawers/project/ProjectHomeWorkManage.vue @@ -3,7 +3,7 @@ :visible="Wvisible" class="drawerStyle ProjectHomeWorkManage" placement="right" - width="60%" + width="80%" @after-visible-change="afterVisibleChange" :zIndex="100" > @@ -35,7 +35,7 @@
姓名:
@@ -44,7 +44,7 @@
{ return (
@@ -294,6 +295,7 @@ export default { key: "studentJobName", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -313,6 +315,7 @@ export default { key: "studentOrgName", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -332,6 +335,7 @@ export default { key: "workScore", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -352,6 +356,7 @@ export default { key: "lastStudyTime", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -369,6 +374,7 @@ export default { key: "finishStatus", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -393,6 +399,7 @@ export default { key: "operation", width: 100, align: "center", + ellipsis: true, className: "h", }, ], @@ -449,7 +456,7 @@ export default { const closeDrawer = () => { ctx.emit("update:Wvisible", false); state.name = ""; - state.projectName = ""; + state.projectName = undefined; state.selectedRowKeys = []; state.currentPage = 1; state.tableDataTotal = -1; @@ -542,7 +549,7 @@ export default { function resetTaskList() { state.currentPage = 1; state.name = ""; - state.projectName = ""; + state.projectName = undefined; state.tableDataTotal = -1; state.tableDataTotal2 = 0; getStudent(); diff --git a/src/components/drawers/project/ProjectOnlineManage.vue b/src/components/drawers/project/ProjectOnlineManage.vue index 530a6e6f..51baca8c 100644 --- a/src/components/drawers/project/ProjectOnlineManage.vue +++ b/src/components/drawers/project/ProjectOnlineManage.vue @@ -4,7 +4,7 @@ :visible="Tvisible" class="drawerStyle ProjectOnlineManage" placement="right" - width="60%" + width="80%" @after-visible-change="afterVisibleChange" >
@@ -51,7 +51,7 @@
姓名:
@@ -60,7 +60,7 @@
{ return ( @@ -249,6 +250,7 @@ export default { key: "studentJobName", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -264,6 +266,7 @@ export default { key: "currentStageName", width: 60, align: "center", + ellipsis: true, className: "h", customRender: () => { return ( @@ -279,6 +282,7 @@ export default { key: "lastStudyTime", width: 100, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -294,6 +298,7 @@ export default { key: "finishStatus", width: 60, align: "center", + ellipsis: true, className: "h", customRender: (text) => { return ( @@ -311,7 +316,7 @@ export default { ctx.emit("update:Tvisible", false); state.currentPage = 1; state.name = ""; - state.projectName = ""; + state.projectName = undefined; state.tabledata = []; }; const afterVisibleChange = (bol) => { diff --git a/src/components/drawers/router/RouterCommonManage.vue b/src/components/drawers/router/RouterCommonManage.vue index 20445442..2f00ab89 100644 --- a/src/components/drawers/router/RouterCommonManage.vue +++ b/src/components/drawers/router/RouterCommonManage.vue @@ -51,7 +51,7 @@
姓名:
@@ -60,7 +60,7 @@
{ @@ -444,7 +440,7 @@ export default { state.tableDataTotalLoading = true; state.currentPage = 1; state.name = ""; - state.projectName = ""; + state.projectName = undefined; getData(); } diff --git a/src/components/drawers/router/RouterEvaluationManage.vue b/src/components/drawers/router/RouterEvaluationManage.vue index c70633ed..d7f71520 100644 --- a/src/components/drawers/router/RouterEvaluationManage.vue +++ b/src/components/drawers/router/RouterEvaluationManage.vue @@ -1,657 +1,663 @@ -