提交 60861a06 编写于 作者: 杨广俊's avatar 杨广俊

uat 排序问题

上级 91f6334a
...@@ -97,8 +97,10 @@ export default { ...@@ -97,8 +97,10 @@ export default {
}, },
watch: { watch: {
orderNum(val) { orderNum(val) {
if (this.showOrder) {
this.orderAction(1, true) this.orderAction(1, true)
} }
}
}, },
components: { components: {
GroupTitle GroupTitle
...@@ -189,6 +191,7 @@ export default { ...@@ -189,6 +191,7 @@ export default {
}) })
} }
this.searchForOrder('1', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => { this.searchForOrder('1', this.cSearchText, orderIndex, this.groupNum, this.parmData).then( param => {
// this.$refs.courseListGT.resetShowOrderIndex()
this.list = param this.list = param
}) })
} }
......
...@@ -99,8 +99,10 @@ export default { ...@@ -99,8 +99,10 @@ export default {
} }
}, },
orderNum(val) { orderNum(val) {
if (this.showOrder) {
this.orderAction(1, true) this.orderAction(1, true)
} }
}
}, },
created() { created() {
let _this = this; let _this = this;
......
...@@ -85,8 +85,10 @@ export default { ...@@ -85,8 +85,10 @@ export default {
}, },
watch: { watch: {
orderNum(val) { orderNum(val) {
if (this.showOrder) {
this.orderAction(1, true) this.orderAction(1, true)
} }
}
}, },
mounted() { mounted() {
let _this = this let _this = this
......
...@@ -93,8 +93,10 @@ export default { ...@@ -93,8 +93,10 @@ export default {
}, },
watch: { watch: {
orderNum(val) { orderNum(val) {
if (this.showOrder) {
this.orderAction(1, true) this.orderAction(1, true)
} }
}
}, },
methods: { methods: {
//跳转 //跳转
......
...@@ -97,6 +97,7 @@ module.exports = { ...@@ -97,6 +97,7 @@ module.exports = {
// 根据条件排序 // 根据条件排序
async searchForOrder(searchCategory = '1', searchValue = '', sortItem = 1, pageSize = 10, sourceData = []) { async searchForOrder(searchCategory = '1', searchValue = '', sortItem = 1, pageSize = 10, sourceData = []) {
if(pageSize <=0 ) return;
let str2 = (searchValue || '').replace(/[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\?]/g, '');// 去掉特殊字符 let str2 = (searchValue || '').replace(/[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\?]/g, '');// 去掉特殊字符
let _this = this, let _this = this,
para = { para = {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<div class="list-container" v-show="navIndex === '0' && showTab0"> <div class="list-container" v-show="navIndex === '0' && showTab0">
<!-- 课程 --> <!-- 课程 -->
<div v-show="showTab1"> <div v-show="showTab1">
<CourseList ref="courseListRef" :parmData="contentAppModels" :groupNum="contentAppModelCount"/> <CourseList :parmData="contentAppModels" :groupNum="contentAppModelCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="1" /> <ShowAllItem @showAllItem="showAllItem" itemIndex="1" />
<SplitLine borderWidth="3px"/> <SplitLine borderWidth="3px"/>
</div> </div>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<NoMoreItem/> <NoMoreItem/>
</div> </div>
<div class="list-container" v-show="navIndex === '1' && showTab1"> <div class="list-container" v-show="navIndex === '1' && showTab1">
<CourseList :showTitle="showTitle" :showOrder="showOrder" :parmData="contentAppModelsAll" :groupNum="contentAppModelCount"/> <CourseList ref="courseListRef" :showTitle="showTitle" :showOrder="showOrder" :parmData="contentAppModelsAll" :groupNum="contentAppModelCount"/>
<NoMoreItem/> <NoMoreItem/>
</div> </div>
<div class="list-container" v-show="navIndex === '2' && showTab2"> <div class="list-container" v-show="navIndex === '2' && showTab2">
...@@ -218,7 +218,7 @@ export default { ...@@ -218,7 +218,7 @@ export default {
keywordColor: 'rgba(244,122,72,1)', keywordColor: 'rgba(244,122,72,1)',
sortItem: 1, sortItem: 1,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 4,
token: _this.token, token: _this.token,
setEntry: 'headers', setEntry: 'headers',
} }
...@@ -234,19 +234,16 @@ export default { ...@@ -234,19 +234,16 @@ export default {
// _this.searchText = '' // _this.searchText = ''
_this.navIndex = '0' _this.navIndex = '0'
if (res.code == '000000') { if (res.code == '000000') {
console.log(res)
// 课程 // 课程
_this.contentAppModels = this.spliceCertenNumData(res.data.contentAppModels, 4) _this.contentAppModels = this.spliceCertenNumData(res.data.contentAppModels, 4)
_this.contentAppModelsAll = res.data.contentAppModels _this.contentAppModelsAll = res.data.contentAppModels
_this.contentAppModelCount = res.data.contentAppModelCount + '' _this.contentAppModelCount = res.data.contentAppModelCount + ''
if(res.data.contentAppModelCount > 100){ // if(res.data.contentAppModelCount > 100){
_this.searchForOrder('1', str2, 1, res.data.contentAppModelCount).then( param => { // _this.searchForOrder('1', str2, 1, res.data.contentAppModelCount).then( param => {
_this.contentAppModelsAll = param // _this.contentAppModelsAll = param
console.log('2222', param) // })
}) // }
} // _this.$refs.courseListRef.orderAction(1, true)
// _this.$refs.courseListRef.resetGT()
_this.setOrderNum((_this.orderNum + 1))
if(res.data.contentAppModelCount === 0){ if(res.data.contentAppModelCount === 0){
_this.showTab1 = false _this.showTab1 = false
} }
...@@ -271,6 +268,7 @@ export default { ...@@ -271,6 +268,7 @@ export default {
if(res.data.educationContentCount === 0){ if(res.data.educationContentCount === 0){
_this.showTab4 = false _this.showTab4 = false
} }
_this.setOrderNum((_this.orderNum + 1))
} }
}) })
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册