| | |
| | | header: {'token':uni.getStorageSync('token')}, |
| | | method: 'POST', |
| | | }).then((res)=> { |
| | | res = res[1].data |
| | | if (res.code === 200) { |
| | | item = { |
| | | code: res.code, |
| | | data: res.data |
| | | } |
| | | } else if(res.code === 403){ |
| | | item = {code: 403,msg: '请重新登录'} |
| | | } |
| | | },(result)=>{ |
| | | // console.log(res); |
| | | }) |
| | | return item |
| | | } |
| | | |
| | | async function getMonthData() { |
| | | let item = []; |
| | | let ress = await uni.request({ |
| | | url: `${common.baseUrl}/dashboard/currentMonthData/auth`, |
| | | header: {'token':uni.getStorageSync('token')}, |
| | | method: 'POST', |
| | | }).then((res)=> { |
| | | console.log(res); |
| | | res = res[1].data |
| | | if (res.code === 200) { |
| | |
| | | getCompanyData, |
| | | getPersonData, |
| | | getStaffRank, |
| | | getCompanyPostList |
| | | getCompanyPostList, |
| | | getMonthData |
| | | } |
| | |
| | | {username: '李世豪1级',money:'112万元'} |
| | | ], |
| | | bgs: ['bg-blue','bg-red'], |
| | | red: '#aaffff', |
| | | red: '#4286db', |
| | | notices: [ |
| | | {notice: '这条测试公告被修改了asdas这条测试公告被修改了这条测试公告被修改了',crtate_time: '2023-09-09 13:49:46',update_time: '2023-10-09 13:49:46'}, |
| | | {notice: '这是一条测试公告',crtate_time: '2023-09-09 13:49:46',update_time: '2023-10-09 13:49:46'}, |
| | |
| | | {notice: '这是一条测试公告',crtate_time: '2023-09-09 13:49:46',update_time: '2023-10-09 13:49:46'}, |
| | | {notice: '这是一条测试公告',crtate_time: '2023-09-09 13:49:46',update_time: '2023-10-09 13:49:46'}, |
| | | {notice: '浙江中扬立库技术有限公司是中扬集团旗下专业的智能仓储物流设备源头服务商,致力于让制造与物流更高效。集团年销售额超5亿人民币,是中国立体仓库大型厂家之一,集科研、生产、销售、售后为一体的国家高新技术企业,浙江省“专精特新”企业,浙江省“尖兵、领雁”企业,浙江省重点培育企业,综合实力位居行业前列',crtate_time: '2023-09-09 13:49:46',update_time: '2023-10-09 13:49:46'} |
| | | ] |
| | | ], |
| | | Column: { |
| | | categories: ["1月", "2月", "3月", "4月", "5月", "6月","7月", "8月", "9月", "10月", "11月", "12月"], |
| | | series: [{ |
| | | name: "销售额", |
| | | data: [35, 36, 31, 33, 13, 34,18, 27, 21, 24, 6, 28] |
| | | }] |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | this.getPersonData() |
| | | this.getStaffRank() |
| | | this.getCompanyPostList() |
| | | this.getMonthData() |
| | | }, |
| | | mounted() { |
| | | |
| | |
| | | setTimeout(() => { |
| | | //因部分数据格式一样,这里不同图表引用同一数据源的话,需要深拷贝一下构造不同的对象 |
| | | //开发者需要自行处理服务器返回的数据,应与标准数据格式一致,注意series的data数值应为数字格式 |
| | | this.chartsDataColumn4=JSON.parse(JSON.stringify(demodata.Column)) |
| | | this.chartsDataColumn4=JSON.parse(JSON.stringify(this.Column)) |
| | | }, 1500); |
| | | }, |
| | | backGroundRepeat() { |
| | |
| | | }, |
| | | async getCompanyPostList() { |
| | | let res = await getCompanyData.getCompanyPostList() |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.notices = res.data.records.splice(0,5) |
| | | } else if (res.code === 403) { |
| | | this.backLogin(res) |
| | | } |
| | | }, |
| | | |
| | | async getMonthData() { |
| | | let res = await getCompanyData.getMonthData() |
| | | if (res.code === 200) { |
| | | this.Column.series[0].data = res.data |
| | | } else if (res.code === 403) { |
| | | this.backLogin(res) |
| | | } |
| | | }, |
| | | backLogin(res) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(() => { |