| | |
| | | <template> |
| | | <div> |
| | | <el-row :gutter="20"> |
| | | <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="4" v-for="item in listMyTask"> |
| | | <div class="box" :style="item.style"> |
| | | {{item.name}} |
| | | <div><avue-count-up class="value" :end="item.count"></avue-count-up></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <avue-data-box :option="option" :animation="true"></avue-data-box> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {validatenull} from "@/util/validate"; |
| | | import {getList} from "@/api/system/statistic"; |
| | | import {flowRoute} from "@/util/flow"; |
| | | |
| | | export default { |
| | | name: "Statistic", |
| | | data(){ |
| | | return { |
| | | countByServer:true, |
| | | listMyTask:[] |
| | | // listMyTask:[] |
| | | option: { |
| | | span:6, |
| | | data: [ |
| | | { |
| | | click: this.handleItemAClick, |
| | | title: '物品主数据', |
| | | count: 0, |
| | | icon: 'iconfont iconicon_doc', |
| | | color: 'rgb(49, 180, 141)', |
| | | uiUrl: "/MasterData/items?id=wupin@name=物品主数据", |
| | | countUrl:'priceIndexController/countNeedConfirmPlan' |
| | | }, |
| | | { |
| | | click: this.handleItemBClick, |
| | | title: '人员主数据', |
| | | count: 0, |
| | | icon: 'iconfont iconicon_dispose', |
| | | color: 'rgb(56, 161, 242)', |
| | | uiUrl:'/MasterData/items?id=renyuan@@name=人员主数据', |
| | | countUrl:'priceIndexController/countPricingPlan' |
| | | }, |
| | | { |
| | | click: this.handleItemCClick, |
| | | title: '主题库定义', |
| | | count: 0, |
| | | icon: 'el-icon-setting', |
| | | color: 'rgb(117, 56, 199)', |
| | | uiUrl:'/modeling/classifyTree', |
| | | countUrl:'priceIndexController/countNeedFeedbackPlan' |
| | | }, |
| | | { |
| | | click: this.handleItemDClick, |
| | | title: '供应商主数据', |
| | | count: 0, |
| | | icon: 'iconfont iconicon_work', |
| | | color: 'rgb(255, 102, 51)', |
| | | uiUrl:'/MasterData/items?id=gongyingshang@@name=供应商主数据', |
| | | countUrl:'priceIndexController/countMyUnCreatePricePlan' |
| | | }, |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | // this.getList(); |
| | | }, |
| | | computed(){ |
| | | |
| | | }, |
| | | methods: { |
| | | handleItemAClick() { |
| | | this.$router.push({ path: "/MasterData/items?id=wupin@name=物品主数据"} ); |
| | | }, |
| | | handleItemBClick() { |
| | | this.$router.push({ path: '/MasterData/items?id=renyuan@@name=人员主数据'} ); |
| | | }, |
| | | handleItemCClick() { |
| | | this.$router.push({ path: '/modeling/classifyTree'} ); |
| | | }, |
| | | handleItemDClick() { |
| | | this.$router.push({ path: '/MasterData/items?id=gongyingshang@@name=供应商主数据'} ); |
| | | }, |
| | | getList() { |
| | | let data = [{ |
| | | "backgroundColor": "#FF5722", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countNeedConfirmPlan", |
| | | "name": "待确认计划", |
| | | "nameOid": "", |
| | | "oid": "34aebfde-eb11-4555-87eb-0a779be9aad0", |
| | | "uiUrl": "USEJS:rpm/wrj/ProductPricePlan", |
| | | }, { |
| | | "backgroundColor": "#5FB878", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countPricingPlan", |
| | | "name": "今日已确认计划", |
| | | "nameOid": "2C72EA23-8AA5-E5FC-9BC1-DE4AD182EF7B", |
| | | "oid": "6256ae79-7765-4c66-afc7-f12fad350065", |
| | | "uiUrl": "USEJS:rpm/wrj/ProductPricePlan", |
| | | }, |
| | | { |
| | | "backgroundColor": "#1E9FFF", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countNeedFeedbackPlan", |
| | | "name": "已谈、待反馈", |
| | | "nameOid": "2536978C-CD1B-5B56-6529-A8C3456B5260", |
| | | "oid": "3043cdf1-8479-4c2a-9eab-fc35e9f9d5a7", |
| | | "uiUrl": "USEJS:rpm/wrj/ProductPricePlan", |
| | | }, |
| | | { |
| | | "backgroundColor": "#FF5722", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countMyUnCreatePricePlan", |
| | | "name": "采购谈价-经办", |
| | | "nameOid": "", |
| | | "oid": "529634e7-1854-4f61-b911-a91e3c406757", |
| | | "uiUrl": "USEJS:rpm/wrj/PurchaseRequstUndo", |
| | | }, |
| | | { |
| | | "backgroundColor": "#5FB878", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countPricingPlan", |
| | | "name": "今日已确认计划--经办人", |
| | | "nameOid": "", |
| | | "oid": "a03a6ab2-f87d-4e45-94cb-9ef4d66fbba2", |
| | | "uiUrl": "USEJS:rpm/wrj/PurchaseRequstUndo?showPlan=true", |
| | | }, |
| | | { |
| | | "backgroundColor": "#1E9FFF", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countNeedFeedbackPlan", |
| | | "name": "已谈、待反馈--经办人", |
| | | "nameOid": "", |
| | | "oid": "8e56cce6-c955-4624-99d5-6c5b870a8c09", |
| | | "uiUrl": "USEJS:rpm/wrj/PurchaseRequstUndo?showPlan=true", |
| | | }, |
| | | { |
| | | "backgroundColor": "", |
| | | "btmname": "", |
| | | "countUrl": "priceIndexController/countMyWillAuditPlan", |
| | | "name": "采购谈价-经办", |
| | | "nameOid": "", |
| | | "oid": "f7d5c541-3a3a-4f24-bf76-b1538abb7abd", |
| | | "uiUrl": "USEJS:rpm/wrj/PurchaseRequstUndo?showPlan=true", |
| | | }, |
| | | { |
| | | "backgroundColor": "", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countNeedDispatch", |
| | | "name": "采购谈价-分派", |
| | | "nameOid": "BAD3108F-6F6B-F287-705C-82D69A5E030A", |
| | | "oid": "6093b1cb-bd7b-438b-8a76-05ab486ccf63", |
| | | "uiUrl": "USEJS:rpm/wrj/PurchaseRequstUndo?showPlan=true" |
| | | } |
| | | ] |
| | | this.listMyTask = data.map(record => { |
| | | record.style=record.style || '' |
| | | if(record.backgroundColor!=''){ |
| | | record.style = 'background-color:'+record.backgroundColor; |
| | | } |
| | | record.count=record.count || 0; |
| | | if(!this.countByServer){ |
| | | //是前端查询 |
| | | getList(record.countUrl,{}).then(res=>{ |
| | | if(res.data.data.success){ |
| | | record.count=res.data.data.obj; |
| | | }else{ |
| | | record.count=0 |
| | | Object.values(this.option.data).map(record => { |
| | | record.count = record.count || 0; |
| | | if (!this.countByServer) { |
| | | // 是前端查询 |
| | | getList(record.countUrl, {}).then(res => { |
| | | if (res.data.data.success) { |
| | | record.count = res.data.data.obj; |
| | | } else { |
| | | record.count = 0; |
| | | } |
| | | }) |
| | | |
| | | }); |
| | | } |
| | | return { |
| | | ...record |
| | | } |
| | | }) |
| | | } |
| | | }; |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-col{margin-bottom: 0} |
| | | .box{ |
| | | text-align: center; |
| | | background: rgb(235, 238, 245); |
| | | color: #303133; |
| | | height: 70px; |
| | | margin: 10px 0!important; |
| | | padding: 15px 10px; |
| | | position: relative; |
| | | border-radius: 4px; |
| | | box-sizing: border-box; |
| | | font-size: 14px; |
| | | } |
| | | .value{ |
| | | font-size: 12px; |
| | | opacity: .69; |
| | | line-height: 20px; |
| | | margin-top: 5px; |
| | | display: block; |
| | | } |
| | | |
| | | </style> |