From 8b6f366c6aafab3e5a879a86436e35ed731ecb7a Mon Sep 17 00:00:00 2001 From: "joshen@zcwytd.com" Date: Wed, 2 Aug 2023 17:09:11 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PortalHeader.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/PortalHeader.vue b/src/components/PortalHeader.vue index 586cd46d..a9f63841 100644 --- a/src/components/PortalHeader.vue +++ b/src/components/PortalHeader.vue @@ -93,7 +93,8 @@ 学员 教师 - 管理员 + + 管理员 From 7cb325c38dc86a9bd32c16f3dbcc84e88a2bf131 Mon Sep 17 00:00:00 2001 From: "joshen@zcwytd.com" Date: Wed, 2 Aug 2023 18:29:20 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E6=A1=88=E4=BE=8B=E5=92=8C=E8=AF=BE?= =?UTF-8?q?=E7=A8=8Bedit=20treeList?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/type.js | 16 ++++++++++++++-- src/views/portal/case/Index.vue | 25 ++++++++++++++++--------- src/views/portal/course/Index.vue | 12 ++++++++---- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/src/api/modules/type.js b/src/api/modules/type.js index 05b381aa..37abdd9a 100644 --- a/src/api/modules/type.js +++ b/src/api/modules/type.js @@ -2,6 +2,7 @@ * 分类 */ import ajax from '@/utils/xajax.js' +import request from '../unionAjax.js'; /** * 提取全量树形结构数据 @@ -11,6 +12,16 @@ import ajax from '@/utils/xajax.js' const tree = function(sysResType) { return ajax.get(`/xboe/type/tree-list?sysResType=${sysResType}&status=1`); } +/** + * + * @param {*} sysResType [1] + * @param {*} pid [字典类别码] + * @param {*} current [1当前页码] + * @returns + */ +const treeList = function(sysResType,pid,current) { + return request.get('/infrasApi',`/dict/page?type=${sysResType}&pid=${pid}¤t=${current}`); +} /** * 按父ID查询列表 @@ -24,5 +35,6 @@ const list = function(sysResType, parentId) { export default { tree, - list -} \ No newline at end of file + list, + treeList +} diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue index 4cd2c8c3..96cc28dd 100644 --- a/src/views/portal/case/Index.vue +++ b/src/views/portal/case/Index.vue @@ -346,6 +346,7 @@ import apiUser from "@/api/system/user.js"; import apiSearchterm from "@/api/modules/searchterm.js"; import { deepClone } from "../../../utils"; import apiDict from "@/api/modules/dict.js"; +import apiType from "@/api/modules/type.js"; import { cutFullName } from "@/utils/tools.js"; import apiPlace from "@/api/phase2/place.js" export default { @@ -507,26 +508,28 @@ export default { isBack = true; } console.log(isBack, 'isBack'); - Promise.all([apiDict.items("org_domain"), apiCase.majorTypes()]).then(rs => { - if (rs[0].status == 200) { - rs[0].result.forEach(item => { + // Promise.all([apiType.items("org_domain"), apiCase.majorTypes()]).then(rs => { + Promise.all([apiType.treeList(1,90,1), apiCase.majorTypes()]).then(rs => { + if (rs[0].code == 200) { + const {records} = rs[0].data + records.forEach(item => { item.fielclass = false; item.type = 'org_domain'; - item.list = item.list ? item.list : [] - if (Array.isArray(item.list)) { + item.list = item.children ? item.children : [] + if (Array.isArray(item.children)) { item.list.forEach(sub => { - sub.list = sub.list ? sub.list : [] + sub.list = sub.children ? sub.children : [] sub.fielclass = false - if (Array.isArray(sub.list)) { + if (Array.isArray(sub.children)) { sub.list.forEach(three => { - three.list = three.list ? three.list : [] + three.list = three.children ? three.children : [] three.fielclass = false }) } }) } }) - this.domain = rs[0].result; + this.domain = records; } if (rs[1].status == 200) { rs[1].result.forEach(item => { @@ -812,6 +815,7 @@ export default { } }); }, + // 无用 async getdomain() { let key = "org_domain"; await apiDict.items("org_domain").then(res => { @@ -1179,6 +1183,9 @@ export default { let ids = caseList.map((item, index) => { return item.authorId; }); + //不能为空 + if (!ids.length) return + const noReapetIds = [...new Set(ids)]; apiUser.getByIds(noReapetIds).then(res => { if (res.status == 200) { diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index 42d52add..6caad287 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -1013,10 +1013,12 @@ export default { async loadTypeData() { let $this = this; try { - const { result, status } = await apiType.tree(1); - if (status === 200) { + const result= await apiType.treeList(1,28,1); + const {data:{ records},code} = result + + if (code === 200) { let tree = []; - result.forEach((item, index) => { + records.forEach((item, index) => { let newItem = { type: 11, id: item.id, @@ -1029,7 +1031,7 @@ export default { //增加死数据 item.children.push({ type: 12, - id: item.id + index, + id: item.id * (index + 200), name: '线上品牌系列课程', children: [], checked: false, @@ -1061,6 +1063,8 @@ export default { }) } $this.oneList.push(newItem); + console.log(newItem); + }); this.loadLocalFilters(); From 2e4b7d0a4f630e0d562fdd09ab46120b9460b622 Mon Sep 17 00:00:00 2001 From: "joshen@zcwytd.com" Date: Wed, 2 Aug 2023 20:22:59 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A1=88=E4=BE=8B?= =?UTF-8?q?=E4=B8=93=E4=B8=9A=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/cases.js | 5 +++++ src/views/portal/case/Index.vue | 28 +++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/api/modules/cases.js b/src/api/modules/cases.js index 1548ac52..4023d4bc 100644 --- a/src/api/modules/cases.js +++ b/src/api/modules/cases.js @@ -102,6 +102,10 @@ const queryComments = function (pageSize) { const majorTypes = function () { return ajax.get('/xboe/m/boe/cases/majorTypes'); } + +const newMajorTypes = function(data){ + return ajax.post('/xboe/m/dictionary/queryPage',data); +} /** * 详情新*/ const details = function (id, addView) { @@ -196,6 +200,7 @@ export default { queryPraises, queryComments, majorTypes, + newMajorTypes, details, ids, excellent, diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue index 96cc28dd..367900af 100644 --- a/src/views/portal/case/Index.vue +++ b/src/views/portal/case/Index.vue @@ -416,7 +416,15 @@ export default { type3: 0, isFind: false, fielclassjor: true, - localSessionKey: this.$xpage.constants.localCaseFiltersKey + localSessionKey: this.$xpage.constants.localCaseFiltersKey, + major:{ + key:'major_type', + pageIndex:1, + pageSize:10, + name:'', + filter:'', + code:'' + } }; }, watch: { @@ -509,7 +517,7 @@ export default { } console.log(isBack, 'isBack'); // Promise.all([apiType.items("org_domain"), apiCase.majorTypes()]).then(rs => { - Promise.all([apiType.treeList(1,90,1), apiCase.majorTypes()]).then(rs => { + Promise.all([apiType.treeList(1,90,1), apiCase.newMajorTypes(this.major)]).then(rs => { if (rs[0].code == 200) { const {records} = rs[0].data records.forEach(item => { @@ -532,11 +540,12 @@ export default { this.domain = records; } if (rs[1].status == 200) { - rs[1].result.forEach(item => { + const { list } = rs[1].result + list.forEach(item => { item.fielclass = false; item.type = 'major_type'; }) - this.speciData = rs[1].result; + this.speciData = list; } this.loadLocalFilters(); this.$nextTick(function () { @@ -1042,7 +1051,7 @@ export default { this.moreState = 2; await apiCase.queryListV2(this.queryCondition).then((res) => { if (res.status == 200) { - if (res.result.list.length > 0) { + if (res.result?.list?.length > 0) { this.isSeach = false; res.result.list.forEach(item => { item.majorType = item.majorType ? item.majorType.split(",") : []; @@ -1063,11 +1072,12 @@ export default { } else { this.moreState = 3; } - this.caseList.list = res.result.list - this.getCaseUserData(res.result.list); + console.log(res?.result?.list ,'有没有数据'); + this.caseList.list = res?.result?.list ?? [] + this.getCaseUserData(this.caseList.list); // 给所有的赋值 - this.caseList.count = res.result.count; - this.caseList.showPagCount = res.result.count; + this.caseList.count = res?.result?.count ?? 0; + this.caseList.showPagCount = res?.result?.count ?? 0; } else { this.$message.error(res.message); } From 883c6138237a5c1dcb8f0896627b973ee9470b48 Mon Sep 17 00:00:00 2001 From: "joshen@zcwytd.com" Date: Thu, 3 Aug 2023 11:14:20 +0800 Subject: [PATCH 04/10] =?UTF-8?q?header=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PortalHeader.vue | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/components/PortalHeader.vue b/src/components/PortalHeader.vue index a9f63841..c76d0593 100644 --- a/src/components/PortalHeader.vue +++ b/src/components/PortalHeader.vue @@ -93,7 +93,6 @@ 学员 教师 - 管理员 @@ -219,21 +218,17 @@ export default { // }); }, handleCommand(val) { - if (val === "four") { - this.$emit('showClass',true) - } else { - let urlPre = window.location.protocol + "//" + window.location.host; - // process.env.VUE_APP_BOE_WEB_URL - let obj = { - one: urlPre + "/web/teacherLesson", - two: urlPre + "/grow180/login", - three: this.webBaseUrl + "/study/index?study=1", - // four: 'https://m.qingxuetang.com/x/?appId=qxtcorp306130', - five: urlPre + "/boe/new-employee/index.html", - six: urlPre + "/web/contributor/index", - }; - window.open(obj[val]); - } + let urlPre=window.location.protocol+'//'+window.location.host; + // process.env.VUE_APP_BOE_WEB_URL + let obj = { + one: urlPre+'/web/teacherLesson', + two: urlPre+'/grow180/login', + three: this.webBaseUrl + '/study/index?study=1', + four: 'https://m.qingxuetang.com/x/?appId=qxtcorp306130', + five: urlPre+'/boe/new-employee/index.html', + six: urlPre+'/web/contributor/index' + }; + window.open(obj[val]); }, handleUcCommand(val) { if (val == 'uc') { @@ -305,7 +300,7 @@ export default { }).then(() => { this.$store.dispatch('LogOut').then(() => { //location.href = this.webBaseUrl + '/login'; - sessionStorage.setItem('dialog_session_show'+this.userInfo.aid,null); // 清除兴趣采集的"关闭"缓存 + sessionStorage.setItem('dialog_session_show'+this.userInfo.aid,null); // 清除兴趣采集的"关闭"缓存 location.href = process.env.VUE_APP_LOGIN_URL; }); }) From 570e42491012164603d831fb2309e27551003a78 Mon Sep 17 00:00:00 2001 From: "joshen@zcwytd.com" Date: Thu, 3 Aug 2023 17:16:40 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E6=A1=88=E4=BE=8B=E4=B8=93=E4=B8=9A?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=A4=8D=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/cases.js | 4 ---- src/views/portal/case/Index.vue | 27 +++++++++------------------ src/views/portal/course/Index.vue | 3 +++ 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/src/api/modules/cases.js b/src/api/modules/cases.js index 4023d4bc..a8c6adf6 100644 --- a/src/api/modules/cases.js +++ b/src/api/modules/cases.js @@ -103,9 +103,6 @@ const majorTypes = function () { return ajax.get('/xboe/m/boe/cases/majorTypes'); } -const newMajorTypes = function(data){ - return ajax.post('/xboe/m/dictionary/queryPage',data); -} /** * 详情新*/ const details = function (id, addView) { @@ -200,7 +197,6 @@ export default { queryPraises, queryComments, majorTypes, - newMajorTypes, details, ids, excellent, diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue index 367900af..63389686 100644 --- a/src/views/portal/case/Index.vue +++ b/src/views/portal/case/Index.vue @@ -416,15 +416,7 @@ export default { type3: 0, isFind: false, fielclassjor: true, - localSessionKey: this.$xpage.constants.localCaseFiltersKey, - major:{ - key:'major_type', - pageIndex:1, - pageSize:10, - name:'', - filter:'', - code:'' - } + localSessionKey: this.$xpage.constants.localCaseFiltersKey }; }, watch: { @@ -517,7 +509,7 @@ export default { } console.log(isBack, 'isBack'); // Promise.all([apiType.items("org_domain"), apiCase.majorTypes()]).then(rs => { - Promise.all([apiType.treeList(1,90,1), apiCase.newMajorTypes(this.major)]).then(rs => { + Promise.all([apiType.treeList(1,90,1), apiCase.majorTypes()]).then(rs => { if (rs[0].code == 200) { const {records} = rs[0].data records.forEach(item => { @@ -540,12 +532,11 @@ export default { this.domain = records; } if (rs[1].status == 200) { - const { list } = rs[1].result - list.forEach(item => { + rs[1].result.forEach(item => { item.fielclass = false; item.type = 'major_type'; }) - this.speciData = list; + this.speciData = rs[1].result; } this.loadLocalFilters(); this.$nextTick(function () { @@ -1051,7 +1042,7 @@ export default { this.moreState = 2; await apiCase.queryListV2(this.queryCondition).then((res) => { if (res.status == 200) { - if (res.result?.list?.length > 0) { + if (res.result.list.length > 0) { this.isSeach = false; res.result.list.forEach(item => { item.majorType = item.majorType ? item.majorType.split(",") : []; @@ -1073,11 +1064,11 @@ export default { this.moreState = 3; } console.log(res?.result?.list ,'有没有数据'); - this.caseList.list = res?.result?.list ?? [] - this.getCaseUserData(this.caseList.list); + this.caseList.list = res.result.list + this.getCaseUserData(res.result.list); // 给所有的赋值 - this.caseList.count = res?.result?.count ?? 0; - this.caseList.showPagCount = res?.result?.count ?? 0; + this.caseList.count = res.result.count; + this.caseList.showPagCount = res.result.count; } else { this.$message.error(res.message); } diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index 6caad287..f8f7f2fb 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -1437,6 +1437,9 @@ export default { ] } this.count = res?.result?.count + if(this.newData) { + this.count = 1 + } this.moreState = 3 } else { this.moreState = 2; From a6c754ce43d84ddbbd519689d869b1b8633deed3 Mon Sep 17 00:00:00 2001 From: "joshen@zcwytd.com" Date: Thu, 3 Aug 2023 19:14:51 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E9=97=AE=E7=AD=94=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HomePage/putTo.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/HomePage/putTo.vue b/src/components/HomePage/putTo.vue index f9c634bd..ee448f45 100644 --- a/src/components/HomePage/putTo.vue +++ b/src/components/HomePage/putTo.vue @@ -76,10 +76,11 @@ if(!data.id){ return; } - if(item.info.deleted){ + if(data.deleted){ this.$message.warning("此问题已删除"); return; } + this.$router.push({ path: '/qa/answer', query: { id: data.id } }); }, From 91d1669c4d47756f30a6c703fa2aac24c4552f37 Mon Sep 17 00:00:00 2001 From: "joshen@zcwytd.com" Date: Thu, 3 Aug 2023 20:09:08 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=B8=89=E7=BA=A7?= =?UTF-8?q?=E6=94=B9=E5=9B=9E=E6=9D=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/portal/course/Index.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index f8f7f2fb..03bc81ce 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -1013,12 +1013,10 @@ export default { async loadTypeData() { let $this = this; try { - const result= await apiType.treeList(1,28,1); - const {data:{ records},code} = result - - if (code === 200) { + const { result, status } = await apiType.tree(1); + if (status === 200) { let tree = []; - records.forEach((item, index) => { + result.forEach((item, index) => { let newItem = { type: 11, id: item.id, From c919a62f2b36d407fb2d0304130365098379f853 Mon Sep 17 00:00:00 2001 From: "joshen@zcwytd.com" Date: Fri, 4 Aug 2023 10:31:15 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A1=88=E4=BE=8B?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=84=E6=9C=80=E4=BD=B3=E6=A1=88=E4=BE=8B?= =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/case/ManageList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/case/ManageList.vue b/src/views/case/ManageList.vue index ad93da86..8b855b3a 100644 --- a/src/views/case/ManageList.vue +++ b/src/views/case/ManageList.vue @@ -236,7 +236,7 @@ export default { if (res.status == 200) { this.$message({ type: 'success', - message: '设置优秀案例成功!' + message: '设置最佳案例成功!' }); this.getData() } From 2a6be30a67cc5282982b315d94867251fbd8d8c9 Mon Sep 17 00:00:00 2001 From: nisen Date: Fri, 4 Aug 2023 15:37:27 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E4=B8=80=E7=BA=A7=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tools.js | 5 +---- src/views/portal/course/Detail.vue | 2 +- src/views/study/coursenew.vue | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/utils/tools.js b/src/utils/tools.js index 8a655c2a..185fb2cc 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -23,7 +23,7 @@ export const cutFullName = (fullName,num) => { }; /**截取机构名称路径namePath最后两段,不包含第一个 */ -export const cutOrgNamePath = (namePath,firstOrder = -1) => { +export const cutOrgNamePath = (namePath) => { let newName=namePath; //debugger if(newName){ @@ -36,9 +36,6 @@ export const cutOrgNamePath = (namePath,firstOrder = -1) => { if(!newName){ newName=names[0] } - if(firstOrder == 0){ - newName=names[0] - } } // if(names.length>1){ diff --git a/src/views/portal/course/Detail.vue b/src/views/portal/course/Detail.vue index e82feb3d..0a284846 100644 --- a/src/views/portal/course/Detail.vue +++ b/src/views/portal/course/Detail.vue @@ -121,7 +121,7 @@
{{ item.teacherName }}
-
{{ cutOrgNamePath(item.orgInfo,0) }}
+
{{ cutOrgNamePath(item.orgInfo) }}
diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 5ad21d41..ea7dd297 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -243,7 +243,7 @@ -
{{cutOrgNamePath(item.authorInfo.orgInfo,0)}}
+
{{cutOrgNamePath(item.authorInfo.orgInfo)}}
From f1bb5b2a1c38b6c25b72f7386a7c66935e933aa9 Mon Sep 17 00:00:00 2001 From: daihh Date: Fri, 4 Aug 2023 15:45:37 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E9=92=88=E5=AF=B9=E4=BA=8E=20/audience/u?= =?UTF-8?q?serAudiencesFilter=20=E6=8E=A5=E5=8F=A3=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/exam/ExamList.vue | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/views/exam/ExamList.vue b/src/views/exam/ExamList.vue index 22cfad33..2c281834 100644 --- a/src/views/exam/ExamList.vue +++ b/src/views/exam/ExamList.vue @@ -872,14 +872,27 @@ export default { apiUserBasic.getUserAudiences(params).then(res=>{ if(res.status==200){ let list=[]; - this.pushData.count = res.result.totalElement; - res.result.audienceList.forEach(crowd=>{ + // this.pushData.count = res.result.totalElement; + // res.result.audienceList.forEach(crowd=>{ + // list.push({ + // id:crowd.id, + // kid:crowd.kid, + // name:crowd.audienceName, + // sysCreateTime:crowd.createAt, + // audienceType:crowd.audienceType, + // users:crowd.totalMember, + // type:crowd.type, + // status:crowd.status + // }) + // }); + this.pushData.count = res.result.total; + res.result.list.forEach(crowd=>{ list.push({ id:crowd.id, - kid:crowd.kid, + kid:'', name:crowd.audienceName, sysCreateTime:crowd.createAt, - audienceType:crowd.audienceType, + audienceType:crowd.type, users:crowd.totalMember, type:crowd.type, status:crowd.status