|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: wanglj 471442253@qq.com
|
|
|
* @Date: 2023-01-11 15:52:49
|
|
|
* @LastEditors: wanglj
|
|
|
- * @LastEditTime: 2023-02-17 17:57:12
|
|
|
+ * @LastEditTime: 2023-02-27 11:42:17
|
|
|
* @Description: file content
|
|
|
* @FilePath: \opms_frontend\src\views\index\index.vue
|
|
|
-->
|
|
|
@@ -216,78 +216,78 @@
|
|
|
return {
|
|
|
editFlag: false,
|
|
|
privateBoard: [
|
|
|
- {
|
|
|
- report_name: '当前客户数(个)',
|
|
|
- id: 1,
|
|
|
- report_icon: 'account-circle-line',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '新增客户数(个)',
|
|
|
- id: 2,
|
|
|
- report_icon: 'user-add-line',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '跟进客户数(个)',
|
|
|
- id: 3,
|
|
|
- report_icon: 'account-pin-box-line',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '合同订单数(个)',
|
|
|
- id: 4,
|
|
|
- report_icon: 'account-circle-line',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '合同订单金额(元)',
|
|
|
- id: 5,
|
|
|
- report_icon: 'exchange-cny-fill',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '新增机会数(个)',
|
|
|
- id: 6,
|
|
|
- report_icon: 'mail-add-line',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '新增机会金额(元)',
|
|
|
- id: 7,
|
|
|
- report_icon: 'exchange-cny-fill',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '采购合同数(个)',
|
|
|
- id: 8,
|
|
|
- report_icon: 'account-circle-line',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '采购金额(元)',
|
|
|
- id: 9,
|
|
|
- report_icon: 'money-cny-circle-line',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '应收未收(元)',
|
|
|
- id: 10,
|
|
|
- report_icon: 'money-cny-circle-line',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '计划付款(元)',
|
|
|
- id: 11,
|
|
|
- report_icon: 'money-cny-circle-line',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
- {
|
|
|
- report_name: '当前库存成本(元)',
|
|
|
- id: 12,
|
|
|
- report_icon: 'money-cny-circle-line',
|
|
|
- checked: false,
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // report_name: '当前客户数(个)',
|
|
|
+ // id: 1,
|
|
|
+ // report_icon: 'account-circle-line',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '新增客户数(个)',
|
|
|
+ // id: 2,
|
|
|
+ // report_icon: 'user-add-line',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '跟进客户数(个)',
|
|
|
+ // id: 3,
|
|
|
+ // report_icon: 'account-pin-box-line',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '合同订单数(个)',
|
|
|
+ // id: 4,
|
|
|
+ // report_icon: 'account-circle-line',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '合同订单金额(元)',
|
|
|
+ // id: 5,
|
|
|
+ // report_icon: 'exchange-cny-fill',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '新增机会数(个)',
|
|
|
+ // id: 6,
|
|
|
+ // report_icon: 'mail-add-line',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '新增机会金额(元)',
|
|
|
+ // id: 7,
|
|
|
+ // report_icon: 'exchange-cny-fill',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '采购合同数(个)',
|
|
|
+ // id: 8,
|
|
|
+ // report_icon: 'account-circle-line',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '采购金额(元)',
|
|
|
+ // id: 9,
|
|
|
+ // report_icon: 'money-cny-circle-line',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '应收未收(元)',
|
|
|
+ // id: 10,
|
|
|
+ // report_icon: 'money-cny-circle-line',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '计划付款(元)',
|
|
|
+ // id: 11,
|
|
|
+ // report_icon: 'money-cny-circle-line',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // report_name: '当前库存成本(元)',
|
|
|
+ // id: 12,
|
|
|
+ // report_icon: 'money-cny-circle-line',
|
|
|
+ // checked: false,
|
|
|
+ // },
|
|
|
],
|
|
|
addBoard: [],
|
|
|
addLayout: [],
|
|
|
@@ -316,6 +316,9 @@
|
|
|
})
|
|
|
window.addEventListener('resize', this.handleResize)
|
|
|
},
|
|
|
+ beforeDestroy() {
|
|
|
+ window.removeEventListener('resize', this.handleResize)
|
|
|
+ },
|
|
|
methods: {
|
|
|
async getHomeNumReportData() {
|
|
|
let ids = this.privateBoard.map((item) => {
|
|
|
@@ -341,19 +344,21 @@
|
|
|
const [err, res] = await to(indexApi.getHomeReport({ module_code: 'HomePage' }))
|
|
|
if (err) return
|
|
|
const obj = JSON.parse(res.data.configInfo)
|
|
|
- this.privateBoard = obj.num_report_config
|
|
|
- this.layout = obj.data_report_config.map((item) => {
|
|
|
- return {
|
|
|
- x: item.location_x,
|
|
|
- y: item.location_y,
|
|
|
- i: item.id,
|
|
|
- desc: item.report_desc,
|
|
|
- name: item.report_name,
|
|
|
- type: item.report_type,
|
|
|
- h: item.size_h,
|
|
|
- w: item.size_w,
|
|
|
- }
|
|
|
- })
|
|
|
+ this.privateBoard = obj.num_report_config || []
|
|
|
+ if (obj.data_report_config && obj.data_report_config.length) {
|
|
|
+ this.layout = obj.data_report_config.map((item) => {
|
|
|
+ return {
|
|
|
+ x: item.location_x,
|
|
|
+ y: item.location_y,
|
|
|
+ i: item.id,
|
|
|
+ desc: item.report_desc,
|
|
|
+ name: item.report_name,
|
|
|
+ type: item.report_type,
|
|
|
+ h: item.size_h,
|
|
|
+ w: item.size_w,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
await this.$nextTick()
|
|
|
this.initChart()
|
|
|
this.getHomeNumReportData()
|