This commit is contained in:
parent
ac12a15a86
commit
fc7e8a1232
|
@ -383,7 +383,16 @@
|
|||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="商家备注" min-width="100" />
|
||||
<el-table-column prop="is_audited" label="待审核类型" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ auditedList[scope.row.is_audited] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="商品售价" min-width="80" />
|
||||
<el-table-column prop="refusal" label="拒绝/锁定原因" min-width="110" />
|
||||
<el-table-column prop="extend" label="操作人" min-width="110" />
|
||||
<el-table-column prop="create_time" sortable='custom' label="创建时间" min-width="120" />
|
||||
<el-table-column prop="update_time" sortable='custom' label="更新时间" min-width="120" />
|
||||
<!-- <el-table-column label="是否惠美乡村店铺" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.merchant.is_huimei ? "是" : "否" }}</span>
|
||||
|
@ -394,26 +403,12 @@
|
|||
<span>{{ scope.row.is_huimei ? "是" : "否" }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="price" label="商品售价" min-width="80" />
|
||||
<el-table-column prop="sales" label="销量" min-width="70" />
|
||||
<el-table-column prop="stock" label="库存" min-width="70" />
|
||||
<el-table-column prop="is_audited" label="待审核类型" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ auditedList[scope.row.is_audited] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="推荐级别" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-rate disabled v-model="scope.row.star" :colors="colors">
|
||||
</el-rate>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="storeCategory.cate_name"
|
||||
label="平台分类"
|
||||
min-width="80"
|
||||
/>
|
||||
<el-table-column prop="rank" label="排序" min-width="60" />
|
||||
<el-table-column prop="remark" label="商家备注" min-width="100" />
|
||||
<el-table-column prop="status" label="是否显示" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
|
@ -431,10 +426,15 @@
|
|||
<span>{{ scope.row.us_status | productStatusFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="refusal" label="拒绝/锁定原因" min-width="110" />
|
||||
<el-table-column prop="extend" label="操作人" min-width="110" />
|
||||
<el-table-column prop="create_time" sortable='custom' label="创建时间" min-width="120" />
|
||||
<el-table-column prop="update_time" sortable='custom' label="更新时间" min-width="120" />
|
||||
<el-table-column label="推荐级别" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-rate disabled v-model="scope.row.star" :colors="colors">
|
||||
</el-rate>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rank" label="排序" min-width="60" />
|
||||
<el-table-column prop="sales" label="销量" min-width="70" />
|
||||
<el-table-column prop="stock" label="库存" min-width="70" />
|
||||
<el-table-column key="8" label="操作" min-width="260" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
import ExcelJS from 'exceljs'
|
||||
onmessage = (res) => {
|
||||
let { arr, sk, worksheet } = res.data
|
||||
/**
|
||||
* 处理超过26个字母的列
|
||||
* @param {*} number
|
||||
* @returns
|
||||
*/
|
||||
function getLetter(number) {
|
||||
if (number < 26) {
|
||||
return letter[number];
|
||||
} else {
|
||||
let n = number % 26
|
||||
let l = Math.floor(number % 26)
|
||||
return letter[l] + letter[n]
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 占多行的数组
|
||||
* @param {*} arr
|
||||
* @param {*} sk
|
||||
*/
|
||||
function setArrayContent(arr, sk) {
|
||||
/**
|
||||
* 循环二维数组,在循环行
|
||||
*/
|
||||
let al = arr.length;
|
||||
let sl = al - 1;
|
||||
console.log('gssgg');
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
let lcomunNow = worksheet.getRow(lcomun);
|
||||
for (let v = 0; v < arr[i].length; v++) {
|
||||
lcomunNow.getCell(getLetter(sk + v)).value = arr[i][v];
|
||||
lcomunNow.getCell(getLetter(sk + v)).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
|
||||
lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' };
|
||||
}
|
||||
lcomunNow.height = 25;
|
||||
lcomunNow.commit()
|
||||
if (i < sl) lcomun++
|
||||
}
|
||||
}
|
||||
|
||||
setArrayContent(arr, sk)
|
||||
postMessage('ok')
|
||||
}
|
Loading…
Reference in New Issue