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

fixed:修改数据判断类型

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