mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
修改案例专业分类
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user