Commit d978fc83 authored by 姬鋆屾's avatar 姬鋆屾

fixed:修改数据判断类型

parent 53cd9da3
......@@ -128,18 +128,23 @@ export default {
this.$post("/company/stat").then((res) => {
const { data, code } = res;
if (code == 1) {
this.enterpriseNums = data.enterpriseNums;
this.productNums = data.productNums;
this.staffNums = data.staffNums;
this.newsNums = data.newsNums;
this.feedbackNums = data.feedbackNums;
this.customerNums = data.customerNums;
data.enterpriseNums
? (this.enterpriseNums = data.enterpriseNums)
: "--";
data.productNums ? (this.productNums = data.productNums) : "--";
data.staffNums ? (this.staffNums = data.staffNums) : "--";
data.newsNums ? (this.newsNums = data.newsNums) : "--";
data.feedbackNums ? (this.feedbackNums = data.feedbackNums) : "--";
data.customerNums ? (this.customerNums = data.customerNums) : "--";
this.lineDayValue = data.accessStatList ? data.accessStatList : [];
this.barDayValue = data.sendCardStaffList
? data.sendCardStaffList
: [];
if (data.newsDistributionList.length > 0) {
if (
data.newsDistributionList &&
data.newsDistributionList.length > 0
) {
let arr = [];
data.newsDistributionList.forEach((item) => {
arr.push({
......@@ -152,7 +157,10 @@ export default {
this.xwfbDayValue = [];
}
if (data.productDistributionList.length > 0) {
if (
data.productDistributionList &&
data.productDistributionList.length > 0
) {
let arr = [];
data.productDistributionList.forEach((item) => {
arr.push({
......@@ -165,7 +173,10 @@ export default {
this.cpfbDayValue = [];
}
if (data.businessCardDistributionList.length > 0) {
if (
data.businessCardDistributionList &&
data.businessCardDistributionList.length > 0
) {
let arr = [];
data.businessCardDistributionList.forEach((item) => {
arr.push({
......
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