Commit b42ad3ea authored by zhang's avatar zhang

feat: (首页/信息管理/检验内容库)页面数据按章节排序

parent f7d8846e
......@@ -215,11 +215,12 @@ import { mapGetters } from 'vuex'
import vehicleModelDialog from './components/vehicleModelDialog'
import documentReviewDialog from './components/documentReviewDialog'
import request from '../../../utils/request'
import { Change, RowHeight } from '@icon-park/vue'
import { Change, Float, RowHeight } from '@icon-park/vue'
import { forEach } from 'lodash'
import { listInspection } from '../../../api/setting/standardTerms'
import detailModel from './components/detailModel.vue'
import standard from '../../../store/modules/standard'
import { parse } from 'postcss'
export default {
// 绑定组件
components: {
......@@ -407,12 +408,14 @@ export default {
if(this.chapterOptions.length < tempOptions.length || this.chapterOptions.length == 0){
this.chapterOptions = tempOptions
}
let count = 0
// 继续加工数据,对page容器中的每条数据pageItem处理
forEach(tempData,async (tempDataItem)=>{ // 对临时数据tempData中每条数据tempDataItem处理
// 当pageItem和tempDataItem章节属性匹配时,将tempDataItem数据进行模板化并储存到page容器中
count++
let obj = {
index:count,
id:tempDataItem.id,
label:'标准要求',
chapter:tempDataItem.chapter,
......@@ -436,10 +439,19 @@ export default {
this.loading = false // 加载动画结束
}
page.push(obj)
page = page.sort(function(a,b){
return a.index - b.index
})
})
// page=page.sort(function(a,b){
// return a.index - b.index
// })
})
this.tableData = page // 将临时数据容器赋给结果数据容器
//this.tableData = res.rows
this.total = res.total
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment