Commit 0c976ebc authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents aaceffd8 ac0ad566
......@@ -37,8 +37,8 @@
</a-table>
</div>
</template>
<script>
<script>
import { mapState } from "vuex";
import storage from "@/utils/js/Storage";
import { export2Excel } from "@/utils/js/exportExcel";
......@@ -100,7 +100,7 @@ export default {
title: "取件人联系电话",
dataIndex: "phone",
width: 150,
customRender: (text) => text.phone || "--",
customRender: (text) => text || "--",
},
{
title: "取件码",
......@@ -297,6 +297,5 @@ export default {
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<style lang="less" scoped></style>
......@@ -26,8 +26,8 @@
</a-table>
</div>
</template>
<script>
<script>
import { mapState } from "vuex";
import storage from "@/utils/js/Storage";
import { export2Excel } from "@/utils/js/exportExcel";
......@@ -40,7 +40,7 @@ const tHeader = [
"箱号",
"联系电话",
"取件时间",
"邮递员",
"操作人身份",
"存件时间",
]; // 导出的表头名信息
const filterVal = [
......@@ -51,9 +51,14 @@ const filterVal = [
"boxNo",
"phone",
"update_time",
"courier",
"userType",
"create_time",
]; // 导出的表头字段名,需要导出表格字段名
let userType = {
1: "用户",
2: "管理员",
3: "邮递员",
};
export default {
components: {},
data() {
......@@ -83,7 +88,7 @@ export default {
title: "联系电话",
dataIndex: "phone",
width: 150,
customRender: (text) => text.phone || "--",
customRender: (text) => text || "--",
},
{
title: "取件方式",
......@@ -122,9 +127,11 @@ export default {
},
{
title: "操作人身份",
dataIndex: "courier",
dataIndex: "userType",
width: 150,
customRender: (text) => text || "--",
customRender: (text) => {
return this.userType[text];
},
},
{
title: "存件时间",
......@@ -136,6 +143,7 @@ export default {
return {
baseurl: process.env.VUE_APP_API_PHP_URL,
siteId: storage.get(2, "siteId"),
userType,
columns,
tHeader,
filterVal,
......@@ -242,11 +250,8 @@ export default {
// 深度克隆避免影响页面表格展示
let data = this.$_.cloneDeep(this.excelData);
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.type == key) {
item.type = obj[key];
}
});
item.type = obj[item.type];
item.userType = this.userType[item.userType];
}
export2Excel(
this.tHeader,
......@@ -261,11 +266,8 @@ export default {
return;
}
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.type == key) {
item.type = obj[key];
}
});
item.type = obj[item.type];
item.userType = this.userType[item.userType];
}
export2Excel(
this.tHeader,
......@@ -305,6 +307,5 @@ export default {
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<style lang="less" scoped></style>
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