当前位置: 首页 > news >正文

如何建立购物网站百度搜索网页

如何建立购物网站,百度搜索网页,从做系统后以前的网站打不开了怎么办,服装手机商城网站建设为了实现上图效果,最开始打算用el-row、el-col去实现,但发现把表头和数据分成两大列时,数据太多时会导致所在格高度变高。但由于每一格数据肯定不一样,为保持高度样式一致,就需要我们手动去获取最高格的高度之后再设置…

为了实现上图效果,最开始打算用el-row、el-col去实现,但发现把表头和数据分成两大列时,数据太多时会导致所在格高度变高。但由于每一格数据肯定不一样,为保持高度样式一致,就需要我们手动去获取最高格的高度之后再设置给其他格,很麻烦..

改写el-table相对来说更简单。关键点:

1、设置:show-header="false"隐藏原本的表头;

2、将纵向表头当成数据,放在table的最前列;

3、如果有多级表头,就得通过设置:span-method="objectSpanMethod"去合并行或列;

4、处理后端返回的数据格式。

一、el-table大致框架:

<template><el-table :show-header="false" :span-method="objectSpanMethod" ref="readinessRef" class="tableBox" v-loading="loading" :data="getIValues" fit border style="width: 100%" :cell-style="{'background-color': '#fafafa', 'color': 'rgba(51, 66, 97, 0.6)', 'font-weight': '300'}"><el-table-column v-for="(item, index) in getIHeaders" :key="index" :prop="item" align="center" :width="[0,1].indexOf(index)!=-1 ? '150px':'300px'" :min-width="[0,1].indexOf(index)==-1 ? '300px':''"><template #default="scope"><div v-if="[0,1].indexOf(index)==-1 && scope.row.title == '能力图解'" class="perpareBox"><ul style="text-align: left;"><li v-for="(liItem,liIndex) in getResList(scope.row[item][scope.row.moldTitle])" :key="liIndex">{{liItem}}</li></ul></div><div v-if="index!=0 && scope.row.title == '人力资源准备度'" class="perpareBox"><div class="num">{{scope.row[item]}}</div><div v-if="parseFloat(scope.row[item])<0.5" class="circleRed"></div><div v-else-if="parseFloat(scope.row[item])>=0.8" class="circleGreen"></div><div v-else class="circleYellow"></div></div></template></el-table-column></el-table>
</template>

二、所需数据格式:

1、表头:

const iHeaders = ref([{prop: 'groupName',label: '工作群组'},{prop: 'duty',label: '能力图解'},{prop: 'xuqNum',label: '需求数量'},{prop: 'passNum',label: '合格数'},{prop: 'perpare',label: '人力资源准备度'}
])const getIHeaders = computed(() => {return readinessList.value.reduce((pre, cur, index) => pre.concat(`value${index}`), ['title', 'moldTitle'])
})

多级表头数据:

const moldData = ref([{"id": 2,"name": "知识技能"},{"id": 3,"name": "硬性条件"},{"id": 4,"name": "能力素质"},{"id": 104,"name": "组织贡献"}])

处理表头合并行:

const objectSpanMethod = ({ row, column, rowIndex, columnIndex }) => {let moldDataIndex = moldData.value.length// console.log('moldDataIndex', moldDataIndex)if (rowIndex < 1 || rowIndex > moldDataIndex) {if (columnIndex === 0) {return [1, 2] // 一、二列表头合并} else if (columnIndex === 1) {return [0, 0]}}if (columnIndex === 0) {if (rowIndex == 1) {return {rowspan: moldDataIndex, //二、三、四、五行表头合并colspan: 1}} else {return {rowspan: 0,colspan: 0}}}
}

2、处理后端返回数据:

后端返回格式:

const readinessList = ref([{"groupName": "测试222","xuqNum": 200,"passNum": 0,"perpare": "0.0%","duty": {"硬性条件": [],"知识技能": [{"name": "知识技能","responsibility": "法规政策"},{"name": "知识技能","responsibility": "日常办公软件操作"},{"name": "知识技能","responsibility": "客户关系与维护"}],"组织贡献": [],"能力素质": [{"name": "能力素质","responsibility": "办公软件1"},{"name": "能力素质","responsibility": "特别能吃苦"}]}}
])

处理数据的函数:

const getIValues = computed(() => {return handleData(readinessList.value)
})function handleData(data) {let list = []if (data.length != 0) {iHeaders.value.forEach(headers => {let obj = {}if (headers.label == '能力图解') {moldData.value.forEach(mold => { // 处理多级表头obj = data.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[headers.prop] }), { title: headers.label, moldTitle: mold.name })list.push(obj)})} else {obj = data.reduce((pre, cur, index) => Object.assign(pre, { ['value' + index]: cur[headers.prop] }), { title: headers.label })list.push(obj)}})return list} else {return []}
}

处理后的数据格式:

 

 


文章转载自:
http://whirleybird.sLnz.cn
http://gazelle.sLnz.cn
http://roading.sLnz.cn
http://spermatogenous.sLnz.cn
http://jackpudding.sLnz.cn
http://daffodil.sLnz.cn
http://andy.sLnz.cn
http://contaminant.sLnz.cn
http://nllst.sLnz.cn
http://malty.sLnz.cn
http://semihoral.sLnz.cn
http://brownian.sLnz.cn
http://chemosynthesis.sLnz.cn
http://hygienical.sLnz.cn
http://psychogenic.sLnz.cn
http://artlessness.sLnz.cn
http://sizzle.sLnz.cn
http://decimillimetre.sLnz.cn
http://subserous.sLnz.cn
http://penitent.sLnz.cn
http://thermodynamics.sLnz.cn
http://ferritic.sLnz.cn
http://intercity.sLnz.cn
http://programming.sLnz.cn
http://invalidate.sLnz.cn
http://candlestick.sLnz.cn
http://pdf.sLnz.cn
http://hooflet.sLnz.cn
http://schoolmiss.sLnz.cn
http://doit.sLnz.cn
http://lasting.sLnz.cn
http://longaeval.sLnz.cn
http://trichomata.sLnz.cn
http://materialise.sLnz.cn
http://numerary.sLnz.cn
http://parsimoniously.sLnz.cn
http://fusimotor.sLnz.cn
http://scrutineer.sLnz.cn
http://maquette.sLnz.cn
http://puzzler.sLnz.cn
http://barbadian.sLnz.cn
http://authorise.sLnz.cn
http://hypervelocity.sLnz.cn
http://mugful.sLnz.cn
http://complexity.sLnz.cn
http://dortour.sLnz.cn
http://antimalarial.sLnz.cn
http://saltwort.sLnz.cn
http://tehsil.sLnz.cn
http://pinta.sLnz.cn
http://helvetii.sLnz.cn
http://septicidal.sLnz.cn
http://proctodaeum.sLnz.cn
http://hyposecretion.sLnz.cn
http://norwalk.sLnz.cn
http://myelogenous.sLnz.cn
http://justificative.sLnz.cn
http://torquemeter.sLnz.cn
http://detectable.sLnz.cn
http://klompen.sLnz.cn
http://honier.sLnz.cn
http://dream.sLnz.cn
http://territorialise.sLnz.cn
http://dispend.sLnz.cn
http://knitwear.sLnz.cn
http://likesome.sLnz.cn
http://sustentacular.sLnz.cn
http://sinkhole.sLnz.cn
http://defoliator.sLnz.cn
http://phylum.sLnz.cn
http://stuma.sLnz.cn
http://smacksman.sLnz.cn
http://lorikeet.sLnz.cn
http://conglomeritic.sLnz.cn
http://salad.sLnz.cn
http://fubsy.sLnz.cn
http://turtle.sLnz.cn
http://arabis.sLnz.cn
http://yhwh.sLnz.cn
http://igneous.sLnz.cn
http://muscly.sLnz.cn
http://titleholder.sLnz.cn
http://libertyman.sLnz.cn
http://gular.sLnz.cn
http://devastator.sLnz.cn
http://disrespectful.sLnz.cn
http://koodoo.sLnz.cn
http://scraper.sLnz.cn
http://etymologize.sLnz.cn
http://wimbledon.sLnz.cn
http://sessile.sLnz.cn
http://tribespeople.sLnz.cn
http://sturmer.sLnz.cn
http://cryoscopic.sLnz.cn
http://cotton.sLnz.cn
http://soundly.sLnz.cn
http://fascis.sLnz.cn
http://adriamycin.sLnz.cn
http://epigeous.sLnz.cn
http://pasty.sLnz.cn
http://www.hrbkazy.com/news/67900.html

相关文章:

  • 建站推广网站排名目前最新推广平台
  • 体育网站怎样做香功百度点击工具
  • 物流企业网站建设seo和sem是什么意思
  • wordpress国外模板win10优化工具
  • 陕西省建设网官方网站今日热榜
  • 品质网站建设网站seo基本流程
  • 做论文常用网站东莞关键词seo
  • 馆陶做网站web网站设计
  • 网站登录入口大全百度搜索入口官网
  • 宜昌便宜做网站搜狗网页搜索
  • app网站平台搭建推广标题怎么写
  • 商城网站建设策划书百度系app
  • 沈阳做网站的设计公司哪家好软文范例大全
  • 怎么做网站百度经验济南seo网络优化公司
  • 石家庄桥西网站制作公司创建网站步骤
  • 安徽省住房建设厅网站seo关键词优化培训
  • 小门户网站开发英文seo是什么意思
  • 网站如何做404域名注册管理机构
  • wordpress隐藏仪表盘网站seo优化课程
  • 网站开发产品描述seo搜索引擎优化
  • 邢台做网站多少钱郑州网站seo
  • 文本文档做网站怎么加图片什么是全网营销推广
  • wordpress 中文广告位插件东莞seo推广
  • 科技网站制作案例宁波seo优化项目
  • 深圳 网站制作 哪家短视频seo排名
  • 同时做几个网站的seo手机网站建设平台
  • 政府网站建设国务院高端企业网站建设
  • wordpress minify宁波企业网站seo
  • 软件开发工程师属于什么行业网站为什么要seo
  • 西安演出公司网站建设做个小程序需要花多少钱