diff --git a/src/api/modules/cases.js b/src/api/modules/cases.js index 8bcc2cdb..88c02e73 100644 --- a/src/api/modules/cases.js +++ b/src/api/modules/cases.js @@ -102,6 +102,7 @@ const queryComments = function (pageSize) { const majorTypes = function () { return ajax.get('/xboe/m/boe/cases/majorTypes'); } + /** * 详情新*/ const details = function (id, addView) { 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/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 } }); }, diff --git a/src/components/PortalHeader.vue b/src/components/PortalHeader.vue index 586cd46d..c76d0593 100644 --- a/src/components/PortalHeader.vue +++ b/src/components/PortalHeader.vue @@ -93,7 +93,7 @@ 学员 教师 - 管理员 + 管理员 @@ -218,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') { @@ -304,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; }); }) 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/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() } 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 diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue index 90ccd47c..f0eec817 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 { @@ -500,26 +501,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 => { @@ -819,6 +822,7 @@ export default { } }); }, + // 无用 async getdomain() { let key = "org_domain"; await apiDict.items("org_domain").then(res => { @@ -1066,6 +1070,7 @@ export default { } else { this.moreState = 3; } + console.log(res?.result?.list ,'有没有数据'); this.caseList.list = res.result.list this.getCaseUserData(res.result.list); // 给所有的赋值 @@ -1186,6 +1191,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/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/portal/course/Index.vue b/src/views/portal/course/Index.vue index 42d52add..03bc81ce 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -1029,7 +1029,7 @@ export default { //增加死数据 item.children.push({ type: 12, - id: item.id + index, + id: item.id * (index + 200), name: '线上品牌系列课程', children: [], checked: false, @@ -1061,6 +1061,8 @@ export default { }) } $this.oneList.push(newItem); + console.log(newItem); + }); this.loadLocalFilters(); @@ -1433,6 +1435,9 @@ export default { ] } this.count = res?.result?.count + if(this.newData) { + this.count = 1 + } this.moreState = 3 } else { this.moreState = 2; 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)}}