From 9457e97fd3f1d283d761098f8034fd3ee7a786b2 Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 7 Feb 2023 17:48:44 +0800 Subject: [PATCH 01/37] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=B6=E4=BD=9C?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E8=AF=BE=E4=BB=B6=E9=80=89=E6=8B=A9=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/chooseCourseFile.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/Course/chooseCourseFile.vue b/src/components/Course/chooseCourseFile.vue index 5e3db2e1..e8e34471 100644 --- a/src/components/Course/chooseCourseFile.vue +++ b/src/components/Course/chooseCourseFile.vue @@ -128,6 +128,15 @@ return false; } }); + this.findCourseFile(); + }, + watch:{ + resType(newVal,oldVal){ + if(newVal!=oldVal){ + this.findCourseFile(); + } + + } }, methods:{ handleBeforeUpload(file) { From eefa252c91289e7c8412a3a19126d1712ee68c11 Mon Sep 17 00:00:00 2001 From: daihh Date: Tue, 7 Feb 2023 18:31:22 +0800 Subject: [PATCH 02/37] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=9A=84=E5=B5=8C=E5=85=A5=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data/pages.js | 1 + src/views/exam/ExamList.vue | 9 +- src/views/exam/Test.vue | 2 +- src/views/exam/viewAnswer.vue | 277 ++++++++++++++++++++++++++++++++++ 4 files changed, 286 insertions(+), 3 deletions(-) create mode 100644 src/views/exam/viewAnswer.vue diff --git a/src/data/pages.js b/src/data/pages.js index c531d4ea..35bc4f19 100644 --- a/src/data/pages.js +++ b/src/data/pages.js @@ -104,6 +104,7 @@ export const iframes=[ {title:'课件管理', path:'/iframe/course/coursewares',hidden:false,component:'course/Courseware'}, {title:'课程管理', path:'/iframe/course/manages',hidden:false,component:'course/ManageList'}, {title:'考试试题管理', path:'/iframe/exam/questions',hidden:false,component:'exam/Question'}, + {title:'查看答卷', path:'/iframe/exam/viewanswer',hidden:false,component:'exam/viewAnswer'}, {title:'考试试卷管理', path:'/iframe/exam/papers',hidden:false,component:'exam/TestPaper'}, {title:'考试管理', path:'/iframe/exam/tests',hidden:false,component:'exam/ExamList'}, {title:'案例管理', path:'/iframe/cases/manages',hidden:false,component:'case/ManageList'}, diff --git a/src/views/exam/ExamList.vue b/src/views/exam/ExamList.vue index 5895cbdb..d4c0a35e 100644 --- a/src/views/exam/ExamList.vue +++ b/src/views/exam/ExamList.vue @@ -547,11 +547,15 @@ custom-class="g-dialog">
-
{{didx +1}}.【{{getTypeName(ditem.type)}}】{{ditem.title}}
+
+
{{didx +1}}.【{{getTypeName(ditem.type)}}】{{ditem.title}}
+
+
-
{{toLetter(optIdx+1)}}, {{opt.content}}
+
{{toLetter(optIdx+1)}}, {{opt.content}}
+
@@ -687,6 +691,7 @@ export default { data() { return { swichpublished:false, + imageBaseUrl:process.env.VUE_APP_FILE_BASE_URL, toScoreTow, qnum:0,//这里默认是30吧 examDateTime:[], diff --git a/src/views/exam/Test.vue b/src/views/exam/Test.vue index 8b467b9f..05aba755 100644 --- a/src/views/exam/Test.vue +++ b/src/views/exam/Test.vue @@ -626,7 +626,7 @@ export default { } }); } - console.log('实际得分:'+total) + //console.log('实际得分:'+total) return total; }, reStartTest(row){ //继续考试 diff --git a/src/views/exam/viewAnswer.vue b/src/views/exam/viewAnswer.vue new file mode 100644 index 00000000..e5353847 --- /dev/null +++ b/src/views/exam/viewAnswer.vue @@ -0,0 +1,277 @@ + + + + + From a2d0a0782ce589b578d7ba6e08a9adaec724a7f8 Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Wed, 8 Feb 2023 18:52:16 +0800 Subject: [PATCH 03/37] nnn --- src/api/boe/audience.js | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/api/boe/audience.js diff --git a/src/api/boe/audience.js b/src/api/boe/audience.js new file mode 100644 index 00000000..fb4c08f3 --- /dev/null +++ b/src/api/boe/audience.js @@ -0,0 +1,57 @@ + +/** 受众管理 **/ +import ajax from './boeAjax'; +const baseURL ="/userbasic"; + + +/** + * 获取受众列表 + */ +const list = function(data){ + return ajax.postJson(baseURL,'/audience/list',data); +} + +/** + * 受众发布/停用/启用接口 + */ +const changeStatus = function(data){ + return ajax.postJson(baseURL,'/audience/changeStatus',data); +} + +/** + * 删除受众(状态为未发布、已停用) + */ +const delAudience = function(data){ + return ajax.postJson(baseURL,'/audience/delete',data); +} + +/** + * 查询指定受众详情 + */ +const detail = function(data){ + return ajax.postJson(baseURL,'/audience/detail',data); +} + +/** + * 更新受众 + */ +const update = function(data){ + return ajax.postJson(baseURL,'/audience/update',data); +} + + +/** + * 查询用户列表 + */ +const searchList = function(data){ + return ajax.postJson(baseURL,'/user/searchList',data); +} + +export default { + list, + changeStatus, + delAudience, + detail, + update, + searchList +} From 736cb14f63e86cbdceb7950759263cd76bf3b292 Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Wed, 8 Feb 2023 18:57:52 +0800 Subject: [PATCH 04/37] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.env.development b/.env.development index 78a7b3f5..83473a3e 100644 --- a/.env.development +++ b/.env.development @@ -27,6 +27,10 @@ VUE_APP_FILE_BASE_URL = 'http://127.0.0.1:9090/cdn/upload' # File路径的基础url的相对路径,加此项是为了不影响之前的路径配置 VUE_APP_FILE_RELATIVE_PATH = '/upload' + +# 受众批量导入人员信息URL +VUE_APP_AUDIENCE_IMPORT_URL = 'https://u-pre.boe.com/userbasic/audience/import' + # 登录地址 VUE_APP_LOGIN_URL='/pc/login' From d4953ee7011e5a5d2bdf12034a6cdcd4f1acadfe Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Thu, 9 Feb 2023 14:39:44 +0800 Subject: [PATCH 05/37] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=87=B3=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/manage/AddAudiences.vue | 178 ++++++++++++++++++++++-------- 1 file changed, 133 insertions(+), 45 deletions(-) diff --git a/src/views/manage/AddAudiences.vue b/src/views/manage/AddAudiences.vue index 102e7520..1f37db8d 100644 --- a/src/views/manage/AddAudiences.vue +++ b/src/views/manage/AddAudiences.vue @@ -28,7 +28,7 @@
取消 保存 - 保存并发布 + 保存并发布
@@ -46,7 +46,7 @@
- + 搜索 重置
@@ -72,7 +72,7 @@
注:单个导入文件受众成员请勿超过5000条记录,以员工号为准。必须是本系统人员
文件名称: - + > --> + 选择 上传 @@ -122,6 +137,7 @@ import userApi from "@/api/system/user"; import orgApi from "@/api/system/organiza"; import apiUserBasic from "@/api/boe/userbasic"; + import apiAudience from "@/api/boe/audience.js"; export default{ data(){ return{ @@ -133,6 +149,8 @@ description:'', userGroupItems:[] }, + isUpdate:false, + importUrl:process.env.VUE_APP_AUDIENCE_IMPORT_URL, searchValue:'', tableData:[], tableDataShow:[], @@ -149,7 +167,7 @@ label: 'name' }, userData:[], - userQueryForm:{keyWord:'',departId:''}, + userQueryForm:{keyword:'',departId:''}, userDataLoading:false, userDataPage:{ total:0, @@ -166,14 +184,23 @@ mounted() { let that = this; if (that.$route.query.id) { - usergroupApi.detail(that.$route.query.id).then((res) => { - if (res.status == 200) { - that.form = res.result; - // that.oldUserGroupItems = JSON.parse(JSON.stringify( res.result.userGroupItems )); - that.tableData = res.result.userGroupItems; - that.queryTableData(); - } + let req = {audienceId:that.$route.query.id} + this.isUpdate = true; + apiAudience.detail(req).then((res) => { + if (res.status == 200) { + that.form = res.result; + that.tableData = res.result.memberList; + that.queryTableData(); + } }); + // usergroupApi.detail(that.$route.query.id).then((res) => { + // if (res.status == 200) { + // that.form = res.result; + // // that.oldUserGroupItems = JSON.parse(JSON.stringify( res.result.userGroupItems )); + // that.tableData = res.result.userGroupItems; + // that.queryTableData(); + // } + // }); } }, methods:{ @@ -200,7 +227,7 @@ }); }else{ parentId = node.data.id; - + apiUserBasic.getOrgInfo(parentId).then(rs=>{ if(rs.status==200){ let treeList=[]; @@ -228,7 +255,7 @@ }, openDialog(){ this.addUserShow = true; - this.userQueryForm.keyWord = ''; + this.userQueryForm.keyword = ''; this.userQueryForm.departId = ''; // orgApi.treeList({}).then(res => { // if (res.status == 200) { @@ -239,7 +266,7 @@ //this.loadUserData(this.userDataPage); }, reset() { - this.userQueryForm.keyWord = ''; + this.userQueryForm.keyword = ''; this.userQueryForm.departId = ''; this.userDataPage.pageIndex = 1; this.loadUserData(this.userDataPage, this.userQueryForm); @@ -247,6 +274,8 @@ userSelectionChange(val) { this.userSelection = val; }, + + //搜索员工事件 queryUserData(){ this.userDataPage.pageIndex = 1; this.loadUserData(this.userDataPage, this.userQueryForm); @@ -255,13 +284,30 @@ this.userDataLoading = true; params.pageIndex = page.pageIndex; params.pageSize = page.pageSize; - userApi.list(Object.assign(params, this.userQueryForm)).then(res => { + + let req = { + page:page.pageIndex, + pageSize:page.pageSize, + keyword:this.userQueryForm.keyword, + departId:this.userQueryForm.departId + } + apiAudience.userList(req).then(res => { if (res.status == 200) { - this.userData = res.result.list; - this.userDataPage.total = res.result.count; + console.log("搜索用户信息"); + console.log(res); + this.userData = res.result.userInfoList; + this.userDataPage.total = res.result.totalPage; this.userDataLoading = false; } }) + + // userApi.list(Object.assign(params, this.userQueryForm)).then(res => { + // if (res.status == 200) { + // this.userData = res.result.list; + // this.userDataPage.total = res.result.count; + // this.userDataLoading = false; + // } + // }) }, userDataCurrentChange(pageIndex){ this.userDataPage.pageIndex = pageIndex; @@ -279,7 +325,7 @@ for(let i = 0; i < this.userSelection.length; i++){ let isAdd = true; for(let j = 0; j < this.tableData.length; j++){ - if(this.userSelection[i].id == this.tableData[j].aid){ + if(this.userSelection[i].id == this.tableData[j].id){ isAdd = false; break; } @@ -287,12 +333,15 @@ if(isAdd){ let userItem = {} userItem.aid = this.userSelection[i].id; + userItem.id = this.userSelection[i].id; userItem.name = this.userSelection[i].name; userItem.userNo = this.userSelection[i].userNo; userItem.departId = this.userSelection[i].departId; userItem.departName = this.userSelection[i].departName; userItem.position = this.userSelection[i].duty; this.tableData.push(userItem); + console.log(111); + console.log(this.tableData); } } this.queryTableData(); @@ -443,8 +492,10 @@ this.queryTableData(); this.importUserShow = false; }, + + // 保存、保存并发布事件 saveBack(status){ - if(status === 1 || status === 0){ + if(status === 2 || status === 0){ this.form.status = status; }else{ this.$router.push('/manage/ugroups'); @@ -455,33 +506,70 @@ this.form.userGroupItems = []; if(this.tableData.length > 0){ for(let i = 0; i < this.tableData.length; i++){ - this.form.userGroupItems.push({aid:this.tableData[i].aid}); + // this.form.userGroupItems.push({aid:this.tableData[i].aid}); + this.form.userGroupItems.push(this.tableData[i].id); } } - if (this.form.id != null && this.form.id != "") { - usergroupApi - .update(this.form) - .then((res) => { - if (res.status == 200) { - this.$message({ type: "success", message: "修改成功",offset:50 }); - this.$router.push('/manage/ugroups'); - } - }) - .catch((res) => { - this.$message({ type: "error", message: res.message ,offset:50}); - }); - } else { - usergroupApi - .save(this.form) - .then((res) => { - if (res.status == 200) { - this.$message({ type: "success", message: "新增成功" ,offset:50}); - this.$router.push('/manage/ugroups'); - } - }) - .catch((res) => { - this.$message({ type: "error", message: res.message ,offset:50}); - }); + if (this.form.id != null && this.form.id != "") { // 修改受众 + let req = { + audienceId:this.form.id, + audienceName:this.form.name, + description:this.form.description, + type:this.form.gtype, + status:this.form.status, + memberIdList:this.form.userGroupItems + } + apiAudience.update(req).then((res) => { + if (res.status == 200) { + this.$message({ type: "success", message: "修改成功",offset:50 }); + this.$router.push('/manage/ugroups'); + }else{ + console.log("更新受众异常"); + } + }) + + // usergroupApi + // .update(this.form) + // .then((res) => { + // if (res.status == 200) { + // this.$message({ type: "success", message: "修改成功",offset:50 }); + // this.$router.push('/manage/ugroups'); + // } + // }) + // .catch((res) => { + // this.$message({ type: "error", message: res.message ,offset:50}); + // }); + } else { // 新增受众 + + let req = { + audienceId:this.form.id, + audienceName:this.form.name, + description:this.form.description, + type:this.form.gtype, + status:this.form.status, + memberIdList:this.form.userGroupItems + } + apiAudience.update(req).then((res) => { + if (res.status == 200) { + this.$message({ type: "success", message: "新增成功",offset:50 }); + this.$router.push('/manage/ugroups'); + }else{ + console.log("新增受众异常"); + } + }) + + + // usergroupApi + // .save(this.form) + // .then((res) => { + // if (res.status == 200) { + // this.$message({ type: "success", message: "新增成功" ,offset:50}); + // this.$router.push('/manage/ugroups'); + // } + // }) + // .catch((res) => { + // this.$message({ type: "error", message: res.message ,offset:50}); + // }); } } }); From 67e2e3ce323d5460f446cc5883fce81f19a5ee59 Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Thu, 9 Feb 2023 14:39:58 +0800 Subject: [PATCH 06/37] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=87=B3=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/manage/UserGroupList.vue | 151 +++++++++++++++++++++-------- 1 file changed, 112 insertions(+), 39 deletions(-) diff --git a/src/views/manage/UserGroupList.vue b/src/views/manage/UserGroupList.vue index 79b8cca9..74a6f3b7 100644 --- a/src/views/manage/UserGroupList.vue +++ b/src/views/manage/UserGroupList.vue @@ -9,8 +9,8 @@ 搜索 @@ -24,21 +24,21 @@ - + - - + + - + @@ -102,6 +102,8 @@