From 1ef38f7b420900816f27bdea509017cab11a96d2 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期日, 29 十月 2023 23:34:48 +0800 Subject: [PATCH] 主页面 --- src/views/dashboard/IndexBdc.vue | 957 ++++++++++++------- src/views/dashboard/Analysis.vue | 100 - src/views/dashboard/Workplace.vue | 539 ++++++---- src/views/dashboard/IndexTask.vue | 641 ++++++++----- src/views/dashboard/Monitor.vue | 7 src/views/dashboard/IndexChart.vue | 578 +++++++---- 6 files changed, 1,687 insertions(+), 1,135 deletions(-) diff --git a/src/views/dashboard/Analysis.vue b/src/views/dashboard/Analysis.vue index 505d8a7..a51d831 100644 --- a/src/views/dashboard/Analysis.vue +++ b/src/views/dashboard/Analysis.vue @@ -1,81 +1,41 @@ <template> <div> <index-chart v-if="indexStyle==1"></index-chart> - <!--<index-bdc v-if="indexStyle==2"></index-bdc>--> - <!--<index-task v-if="indexStyle==3"></index-task>--> - <!--<div style="width: 100%;text-align: right;margin-top: 20px">--> - <!--璇烽�夋嫨棣栭〉鏍峰紡锛�--> - <!--<!–<a-radio-group v-model="indexStyle">–>--> - <!--<!–<a-radio :value="1">缁熻鍥捐〃</a-radio>–>--> - <!--<!–<a-radio :value="2">缁熻鍥捐〃2</a-radio>–>--> - <!--<!–<a-radio :value="3">浠诲姟琛ㄦ牸</a-radio>–>--> - <!--<!–</a-radio-group>–>--> - <!--</div>--> - <a-button type="primary" size="large" v-for="item in workshopList" :key="item.workshopId" - @click="navigateToWorkshopSignage(item.id)">{{item.workshopName}} - </a-button> + <index-bdc v-if="indexStyle==2"></index-bdc> + <index-task v-if="indexStyle==3"></index-task> + <div style="width: 100%;text-align: right;margin-top: 20px"> + 璇烽�夋嫨棣栭〉鏍峰紡锛� + <a-radio-group v-model="indexStyle"> + <a-radio :value="1">缁熻鍥捐〃</a-radio> + <a-radio :value="2">缁熻鍥捐〃2</a-radio> + <a-radio :value="3">浠诲姟琛ㄦ牸</a-radio> + </a-radio-group> + </div> </div> </template> <script> - import IndexChart from './IndexChart' - import IndexTask from './IndexTask' - import IndexBdc from './IndexBdc' - import api from '@/api/mdc' +import IndexChart from './IndexChart' +import IndexTask from "./IndexTask" +import IndexBdc from './IndexBdc' - export default { - name: 'Analysis', - components: { - IndexChart, - IndexTask, - IndexBdc - }, - data() { - return { - indexStyle: 1, - workshopList: [ - { - workshopName: '闀挎矙杞﹂棿', - id: '5321' - }, - { - workshopName: '澶╂触杞﹂棿', - id: '6312' - }, - { - workshopName: '姝︽眽杞﹂棿', - id: '3463' - }, - { - workshopName: '鍖椾含杞﹂棿', - id: '8421' - } - ] - } - }, - created() { - this.getWorkshopListByApi() - }, - methods: { - /** - * 閫氳繃杞﹂棿Id璺宠浆鑷崇浉搴旇溅闂村ぇ灞忕湅鏉� - * @param id 杞﹂棿Id - */ - navigateToWorkshopSignage(id) { - const url = this.$router.resolve(`/workshopSignage/${id}`).href - window.open(url, '_blank') - }, - /** - * 鑾峰彇杞﹂棿鍒楄〃 - */ - getWorkshopListByApi() { - api.getWorkshopListInHomePageApi().then(res => { - console.log('res', res) - if (res.result && res.result.length > 0) { - this.workshopList = res.result - } - }) - } +export default { + name: "Analysis", + components: { + IndexChart, + IndexTask, + IndexBdc + }, + data() { + return { + indexStyle: 1 } + }, + created() { + + }, + methods: { + } +} </script> \ No newline at end of file diff --git a/src/views/dashboard/IndexBdc.vue b/src/views/dashboard/IndexBdc.vue index fa8edea..87a6d25 100644 --- a/src/views/dashboard/IndexBdc.vue +++ b/src/views/dashboard/IndexBdc.vue @@ -1,9 +1,21 @@ <template> <div class="page-header-index-wide"> <a-row :gutter="24"> - <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> - <chart-card :loading="loading" title="鍙楃悊閲�" :total="cardCount.sll | NumberFormat"> - <a-tooltip title="鎸囨爣璇存槑" slot="action"> + <a-col + :sm="24" + :md="12" + :xl="6" + :style="{ marginBottom: '24px' }" + > + <chart-card + :loading="loading" + title="鍙楃悊閲�" + :total="cardCount.sll | NumberFormat" + > + <a-tooltip + title="鎸囨爣璇存槑" + slot="action" + > <a-icon type="info-circle-o" /> </a-tooltip> <div> @@ -12,45 +24,98 @@ <template slot="footer">浠婃棩鍙楃悊閲忥細<span>{{ todaySll }}</span></template> </chart-card> </a-col> - <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> - <chart-card :loading="loading" title="鍔炵粨閲�" :total="cardCount.bjl | NumberFormat"> - <a-tooltip title="鎸囨爣璇存槑" slot="action"> + <a-col + :sm="24" + :md="12" + :xl="6" + :style="{ marginBottom: '24px' }" + > + <chart-card + :loading="loading" + title="鍔炵粨閲�" + :total="cardCount.bjl | NumberFormat" + > + <a-tooltip + title="鎸囨爣璇存槑" + slot="action" + > <a-icon type="info-circle-o" /> </a-tooltip> <div> - <mini-area :data-source="chartData.bjl"/> + <mini-area :data-source="chartData.bjl" /> </div> <template slot="footer">浠婃棩鍔炵粨閲忥細<span>{{ todayBjl }}</span></template> </chart-card> </a-col> - <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> - <chart-card :loading="loading" title="鐢ㄦ埛鍙楃悊閲�" :total="cardCount.isll | NumberFormat"> - <a-tooltip title="鎸囨爣璇存槑" slot="action"> + <a-col + :sm="24" + :md="12" + :xl="6" + :style="{ marginBottom: '24px' }" + > + <chart-card + :loading="loading" + title="鐢ㄦ埛鍙楃悊閲�" + :total="cardCount.isll | NumberFormat" + > + <a-tooltip + title="鎸囨爣璇存槑" + slot="action" + > <a-icon type="info-circle-o" /> </a-tooltip> <div> - <mini-bar :datasource="chartData.isll" :height="50"/> + <mini-bar + :datasource="chartData.isll" + :height="50" + /> </div> <template slot="footer">鐢ㄦ埛浠婃棩鍙楃悊閲忥細<span>{{ todayISll }}</span></template> </chart-card> </a-col> - <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> - <chart-card :loading="loading" title="鐢ㄦ埛鍔炵粨閲�" :total="cardCount.ibjl | NumberFormat"> - <a-tooltip title="鎸囨爣璇存槑" slot="action"> + <a-col + :sm="24" + :md="12" + :xl="6" + :style="{ marginBottom: '24px' }" + > + <chart-card + :loading="loading" + title="鐢ㄦ埛鍔炵粨閲�" + :total="cardCount.ibjl | NumberFormat" + > + <a-tooltip + title="鎸囨爣璇存槑" + slot="action" + > <a-icon type="info-circle-o" /> </a-tooltip> <div> - <mini-bar :datasource="chartData.ibjl" :height="50"/> + <mini-bar + :datasource="chartData.ibjl" + :height="50" + /> </div> <template slot="footer">鐢ㄦ埛浠婃棩鍔炵粨閲忥細<span>{{ todayIBjl }}</span></template> </chart-card> </a-col> </a-row> - <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}"> + <a-card + :loading="loading" + :bordered="false" + :body-style="{padding: '0'}" + > <div class="salesCard"> - <a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}"> - <div class="extra-wrapper" slot="tabBarExtraContent"> + <a-tabs + default-active-key="1" + size="large" + :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}" + > + <div + class="extra-wrapper" + slot="tabBarExtraContent" + > <div class="extra-item"> <a>浠婃棩</a> <a>鏈懆</a> @@ -60,18 +125,50 @@ <a-range-picker :style="{width: '256px'}" /> </div> - <a-tab-pane loading="true" tab="鍙楃悊鐩戠" key="1"> + <a-tab-pane + loading="true" + tab="鍙楃悊鐩戠" + key="1" + > <a-row> - <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24"> + <a-col + :xl="16" + :lg="12" + :md="12" + :sm="24" + :xs="24" + > <index-bar title="鍙楃悊閲忕粺璁�" /> </a-col> - <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24"> + <a-col + :xl="8" + :lg="12" + :md="12" + :sm="24" + :xs="24" + > - <a-card title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" style="margin-bottom: 24px" :bordered="false" :body-style="{padding: 0}"> + <a-card + title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" + style="margin-bottom: 24px" + :bordered="false" + :body-style="{padding: 0}" + > <div class="item-group"> <a-row> - <a-col :class="'more-btn'" :span="12" v-for="(item,index) in registerTypeList" :key=" 'registerType'+index "> - <a-button @click="goPage(index)" style="margin-bottom:10px" size="small" type="primary" ghost>{{ item.text }}</a-button> + <a-col + :class="'more-btn'" + :span="12" + v-for="(item,index) in registerTypeList" + :key=" 'registerType'+index " + > + <a-button + @click="goPage(index)" + style="margin-bottom:10px" + size="small" + type="primary" + ghost + >{{ item.text }}</a-button> </a-col> </a-row> </div> @@ -81,18 +178,53 @@ </a-row> </a-tab-pane> - <a-tab-pane tab="浜や簰鐩戠" key="2"> + <a-tab-pane + tab="浜や簰鐩戠" + key="2" + > <a-row> - <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24"> - <bar-multid :sourceData="jhjgData" :fields="jhjgFields" title="骞冲彴涓庨儴闂ㄤ氦浜掗噺缁熻"></bar-multid> + <a-col + :xl="16" + :lg="12" + :md="12" + :sm="24" + :xs="24" + > + <bar-multid + :sourceData="jhjgData" + :fields="jhjgFields" + title="骞冲彴涓庨儴闂ㄤ氦浜掗噺缁熻" + ></bar-multid> </a-col> - <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24"> + <a-col + :xl="8" + :lg="12" + :md="12" + :sm="24" + :xs="24" + > - <a-card title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" style="margin-bottom: 24px" :bordered="false" :body-style="{padding: 0}"> + <a-card + title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" + style="margin-bottom: 24px" + :bordered="false" + :body-style="{padding: 0}" + > <div class="item-group"> <a-row> - <a-col :class="'more-btn'" :span="12" v-for="(item,index) in registerTypeList" :key=" 'registerType'+index "> - <a-button @click="goPage(index)" style="margin-bottom:10px" size="small" type="primary" ghost>{{ item.text }}</a-button> + <a-col + :class="'more-btn'" + :span="12" + v-for="(item,index) in registerTypeList" + :key=" 'registerType'+index " + > + <a-button + @click="goPage(index)" + style="margin-bottom:10px" + size="small" + type="primary" + ghost + >{{ item.text }}</a-button> </a-col> </a-row> </div> @@ -102,25 +234,63 @@ </a-row> </a-tab-pane> - <a-tab-pane tab="瀛樺偍鐩戠" key="4"> + <a-tab-pane + tab="瀛樺偍鐩戠" + key="4" + > <a-row> - <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24"> + <a-col + :xl="16" + :lg="12" + :md="12" + :sm="24" + :xs="24" + > <a-row> <template v-if="diskInfo && diskInfo.length>0"> - <a-col :span="12" v-for="(item,index) in diskInfo" :key=" 'diskInfo'+index "> - <dash-chart-demo :title="item.name" :datasource="item.restPPT"></dash-chart-demo> + <a-col + :span="12" + v-for="(item,index) in diskInfo" + :key=" 'diskInfo'+index " + > + <dash-chart-demo + :title="item.name" + :datasource="item.restPPT" + ></dash-chart-demo> </a-col> </template> </a-row> </a-col> - <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24"> + <a-col + :xl="8" + :lg="12" + :md="12" + :sm="24" + :xs="24" + > - <a-card title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" style="margin-bottom: 24px" :bordered="false" :body-style="{padding: 0}"> + <a-card + title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" + style="margin-bottom: 24px" + :bordered="false" + :body-style="{padding: 0}" + > <div class="item-group"> <a-row> - <a-col :class="'more-btn'" :span="10" v-for="(item,index) in registerTypeList" :key=" 'registerType'+index "> - <a-button @click="goPage(index)" style="margin-bottom:10px" size="small" type="primary" ghost>{{ item.text }}</a-button> + <a-col + :class="'more-btn'" + :span="10" + v-for="(item,index) in registerTypeList" + :key=" 'registerType'+index " + > + <a-button + @click="goPage(index)" + style="margin-bottom:10px" + size="small" + type="primary" + ghost + >{{ item.text }}</a-button> </a-col> </a-row> </div> @@ -136,36 +306,83 @@ </a-card> <a-row :gutter="12"> - <a-card :loading="loading" :class="{ 'anty-list-cust':true }" :bordered="false" :style="{ marginTop: '24px' }"> + <a-card + :loading="loading" + :class="{ 'anty-list-cust':true }" + :bordered="false" + :style="{ marginTop: '24px' }" + > - <a-tabs v-model="indexBottomTab" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}"> - <div class="extra-wrapper" slot="tabBarExtraContent"> - <a-radio-group v-model="indexRegisterType" @change="changeRegisterType"> + <a-tabs + v-model="indexBottomTab" + size="large" + :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}" + > + <div + class="extra-wrapper" + slot="tabBarExtraContent" + > + <a-radio-group + v-model="indexRegisterType" + @change="changeRegisterType" + > <a-radio-button value="杞Щ鐧昏">杞Щ鐧昏</a-radio-button> <a-radio-button value="鎶垫娂鐧昏">鎶垫娂鐧昏</a-radio-button> <a-radio-button value="">鎵�鏈�</a-radio-button> </a-radio-group> </div> - <a-tab-pane loading="true" tab="涓氬姟娴佺▼闄愭椂鐩戠" key="1"> + <a-tab-pane + loading="true" + tab="涓氬姟娴佺▼闄愭椂鐩戠" + key="1" + > - <a-table :dataSource="dataSource1" size="default" rowKey="id" :columns="columns" :pagination="ipagination1" @change="tableChange1"> - <template slot="flowRate" slot-scope="text, record, index"> - <a-progress :strokeColor="getPercentColor(record.flowRate)" :format="getPercentFormat" :percent="getFlowRateNumber(record.flowRate)" style="width:80px" /> + <a-table + :dataSource="dataSource1" + size="default" + rowKey="id" + :columns="columns" + :pagination="ipagination1" + @change="tableChange1" + > + <template + slot="flowRate" + slot-scope="text, record, index" + > + <a-progress + :strokeColor="getPercentColor(record.flowRate)" + :format="getPercentFormat" + :percent="getFlowRateNumber(record.flowRate)" + style="width:80px" + /> </template> </a-table> </a-tab-pane> - <a-tab-pane loading="true" tab="涓氬姟鑺傜偣闄愭椂鐩戠" key="2"> - <a-table :dataSource="dataSource2" size="default" rowKey="id" :columns="columns2" :pagination="ipagination2" @change="tableChange2"> - <template slot="flowRate" slot-scope="text, record, index"> + <a-tab-pane + loading="true" + tab="涓氬姟鑺傜偣闄愭椂鐩戠" + key="2" + > + <a-table + :dataSource="dataSource2" + size="default" + rowKey="id" + :columns="columns2" + :pagination="ipagination2" + @change="tableChange2" + > + <template + slot="flowRate" + slot-scope="text, record, index" + > <span style="color: red;">{{ record.flowRate }}灏忔椂</span> </template> </a-table> </a-tab-pane> </a-tabs> - </a-card> </a-row> @@ -175,345 +392,355 @@ <script> - import ACol from "ant-design-vue/es/grid/Col" - import ATooltip from "ant-design-vue/es/tooltip/Tooltip" - import ChartCard from '@/components/ChartCard' - import MiniBar from '@/components/chart/MiniBar' - import MiniArea from '@/components/chart/MiniArea' - import IndexBar from '@/components/chart/IndexBar' - import BarMultid from '@/components/chart/BarMultid' - import DashChartDemo from '@/components/chart/DashChartDemo' +import ACol from "ant-design-vue/es/grid/Col" +import ATooltip from "ant-design-vue/es/tooltip/Tooltip" +import ChartCard from '@/components/ChartCard' +import MiniBar from '@/components/chart/MiniBar' +import MiniArea from '@/components/chart/MiniArea' +import IndexBar from '@/components/chart/IndexBar' +import BarMultid from '@/components/chart/BarMultid' +import DashChartDemo from '@/components/chart/DashChartDemo' - const jhjgData = [ - { type: '鎴跨', '1鏈�': 900, '2鏈�': 1120, '3鏈�': 1380, '4鏈�': 1480, '5鏈�': 1450, '6鏈�': 1100, '7鏈�':1300, '8鏈�':900,'9鏈�':1000 ,'10鏈�':1200 ,'11鏈�':600 ,'12鏈�':900 }, - { type: '绋庡姟', '1鏈�':1200, '2鏈�': 1500, '3鏈�': 1980, '4鏈�': 2000, '5鏈�': 1000, '6鏈�': 600, '7鏈�':900, '8鏈�':1100,'9鏈�':1300 ,'10鏈�':2000 ,'11鏈�':900 ,'12鏈�':1100 }, - { type: '涓嶅姩浜�', '1鏈�':2000, '2鏈�': 1430, '3鏈�': 1300, '4鏈�': 1400, '5鏈�': 900, '6鏈�': 500, '7鏈�':600, '8鏈�':1000,'9鏈�':600 ,'10鏈�':1000 ,'11鏈�':1500 ,'12鏈�':1200 } - ] +const jhjgData = [ + { type: '鎴跨', '1鏈�': 900, '2鏈�': 1120, '3鏈�': 1380, '4鏈�': 1480, '5鏈�': 1450, '6鏈�': 1100, '7鏈�': 1300, '8鏈�': 900, '9鏈�': 1000, '10鏈�': 1200, '11鏈�': 600, '12鏈�': 900 }, + { type: '绋庡姟', '1鏈�': 1200, '2鏈�': 1500, '3鏈�': 1980, '4鏈�': 2000, '5鏈�': 1000, '6鏈�': 600, '7鏈�': 900, '8鏈�': 1100, '9鏈�': 1300, '10鏈�': 2000, '11鏈�': 900, '12鏈�': 1100 }, + { type: '涓嶅姩浜�', '1鏈�': 2000, '2鏈�': 1430, '3鏈�': 1300, '4鏈�': 1400, '5鏈�': 900, '6鏈�': 500, '7鏈�': 600, '8鏈�': 1000, '9鏈�': 600, '10鏈�': 1000, '11鏈�': 1500, '12鏈�': 1200 } +] - const jhjgFields=[ - '1鏈�','2鏈�','3鏈�','4鏈�','5鏈�','6鏈�', - '7鏈�','8鏈�','9鏈�','10鏈�','11鏈�','12鏈�' - ] +const jhjgFields = [ + '1鏈�', '2鏈�', '3鏈�', '4鏈�', '5鏈�', '6鏈�', + '7鏈�', '8鏈�', '9鏈�', '10鏈�', '11鏈�', '12鏈�' +] - const xljgData = [ - {type:'涓�鏈�',"鎴跨":1.12,"绋庡姟":1.55,"涓嶅姩浜�":1.2}, - {type:'浜屾湀',"鎴跨":1.65,"绋庡姟":1.32,"涓嶅姩浜�":1.42}, - {type:'涓夋湀',"鎴跨":1.85,"绋庡姟":1.1,"涓嶅姩浜�":1.5}, +const xljgData = [ + { type: '涓�鏈�', "鎴跨": 1.12, "绋庡姟": 1.55, "涓嶅姩浜�": 1.2 }, + { type: '浜屾湀', "鎴跨": 1.65, "绋庡姟": 1.32, "涓嶅姩浜�": 1.42 }, + { type: '涓夋湀', "鎴跨": 1.85, "绋庡姟": 1.1, "涓嶅姩浜�": 1.5 }, - {type:'鍥涙湀',"鎴跨":1.33,"绋庡姟":1.63,"涓嶅姩浜�":1.4}, - {type:'浜旀湀',"鎴跨":1.63,"绋庡姟":1.8,"涓嶅姩浜�":1.7}, - {type:'鍏湀',"鎴跨":1.85,"绋庡姟":1.98,"涓嶅姩浜�":1.8}, + { type: '鍥涙湀', "鎴跨": 1.33, "绋庡姟": 1.63, "涓嶅姩浜�": 1.4 }, + { type: '浜旀湀', "鎴跨": 1.63, "绋庡姟": 1.8, "涓嶅姩浜�": 1.7 }, + { type: '鍏湀', "鎴跨": 1.85, "绋庡姟": 1.98, "涓嶅姩浜�": 1.8 }, - {type:'涓冩湀',"鎴跨":1.98,"绋庡姟":1.5,"涓嶅姩浜�":1.76}, - {type:'鍏湀',"鎴跨":1.48,"绋庡姟":1.2,"涓嶅姩浜�":1.3}, - {type:'涔濇湀',"鎴跨":1.41,"绋庡姟":1.9,"涓嶅姩浜�":1.6}, + { type: '涓冩湀', "鎴跨": 1.98, "绋庡姟": 1.5, "涓嶅姩浜�": 1.76 }, + { type: '鍏湀', "鎴跨": 1.48, "绋庡姟": 1.2, "涓嶅姩浜�": 1.3 }, + { type: '涔濇湀', "鎴跨": 1.41, "绋庡姟": 1.9, "涓嶅姩浜�": 1.6 }, - {type:'鍗佹湀',"鎴跨":1.1,"绋庡姟":1.1,"涓嶅姩浜�":1.4}, - {type:'鍗佷竴鏈�',"鎴跨":1.85,"绋庡姟":1.6,"涓嶅姩浜�":1.5}, - {type:'鍗佷簩鏈�',"鎴跨":1.5,"绋庡姟":1.4,"涓嶅姩浜�":1.3} - ] - const xljgFields=["鎴跨","绋庡姟","涓嶅姩浜�"] + { type: '鍗佹湀', "鎴跨": 1.1, "绋庡姟": 1.1, "涓嶅姩浜�": 1.4 }, + { type: '鍗佷竴鏈�', "鎴跨": 1.85, "绋庡姟": 1.6, "涓嶅姩浜�": 1.5 }, + { type: '鍗佷簩鏈�', "鎴跨": 1.5, "绋庡姟": 1.4, "涓嶅姩浜�": 1.3 } +] +const xljgFields = ["鎴跨", "绋庡姟", "涓嶅姩浜�"] - const dataCol1 = [{ - title: '涓氬姟鍙�', - align:"center", - dataIndex: 'reBizCode' - },{ - title: '涓氬姟绫诲瀷', - align:"center", - dataIndex: 'type' - },{ - title: '鍙楃悊浜�', - align:"center", - dataIndex: 'acceptBy' - },{ - title: '鍙楃悊鏃堕棿', - align:"center", - dataIndex: 'acceptDate' - },{ - title: '褰撳墠鑺傜偣', - align:"center", - dataIndex: 'curNode' - },{ - title: '鍔炵悊鏃堕暱', - align:"center", - dataIndex: 'flowRate', - scopedSlots: { customRender: 'flowRate' } - }]; - const dataSource1=[ - {reBizCode:"1",type:"杞Щ鐧昏",acceptBy:'寮犱笁',acceptDate:"2019-01-22",curNode:"浠诲姟鍒嗘淳",flowRate:60}, - {reBizCode:"2",type:"鎶垫娂鐧昏",acceptBy:'鏉庡洓',acceptDate:"2019-01-23",curNode:"棰嗗瀹℃牳",flowRate:30}, - {reBizCode:"3",type:"杞Щ鐧昏",acceptBy:'鐜嬫',acceptDate:"2019-01-25",curNode:"浠诲姟澶勭悊",flowRate:20}, - {reBizCode:"4",type:"杞Щ鐧昏",acceptBy:'璧垫ゼ',acceptDate:"2019-11-22",curNode:"閮ㄩ棬瀹℃牳",flowRate:80}, - {reBizCode:"5",type:"杞Щ鐧昏",acceptBy:'閽卞氨',acceptDate:"2019-12-12",curNode:"浠诲姟鍒嗘淳",flowRate:90}, - {reBizCode:"6",type:"杞Щ鐧昏",acceptBy:'瀛欏惂',acceptDate:"2019-03-06",curNode:"浠诲姟澶勭悊",flowRate:10}, - {reBizCode:"7",type:"鎶垫娂鐧昏",acceptBy:'鍛ㄥぇ',acceptDate:"2019-04-13",curNode:"浠诲姟鍒嗘淳",flowRate:100}, - {reBizCode:"8",type:"鎶垫娂鐧昏",acceptBy:'鍚翠簩',acceptDate:"2019-05-09",curNode:"浠诲姟涓婃姤",flowRate:50}, - {reBizCode:"9",type:"鎶垫娂鐧昏",acceptBy:'閮戠埥',acceptDate:"2019-07-12",curNode:"浠诲姟澶勭悊",flowRate:63}, - {reBizCode:"20",type:"鎶垫娂鐧昏",acceptBy:'鏋楁湁',acceptDate:"2019-12-12",curNode:"浠诲姟鎵撳洖",flowRate:59}, - {reBizCode:"11",type:"杞Щ鐧昏",acceptBy:'鐮佷簯',acceptDate:"2019-09-10",curNode:"浠诲姟绛炬敹",flowRate:87}, - ] +const dataCol1 = [{ + title: '涓氬姟鍙�', + align: "center", + dataIndex: 'reBizCode' +}, { + title: '涓氬姟绫诲瀷', + align: "center", + dataIndex: 'type' +}, { + title: '鍙楃悊浜�', + align: "center", + dataIndex: 'acceptBy' +}, { + title: '鍙楃悊鏃堕棿', + align: "center", + dataIndex: 'acceptDate' +}, { + title: '褰撳墠鑺傜偣', + align: "center", + dataIndex: 'curNode' +}, { + title: '鍔炵悊鏃堕暱', + align: "center", + dataIndex: 'flowRate', + scopedSlots: { customRender: 'flowRate' } +}]; +const dataSource1 = [ + { reBizCode: "1", type: "杞Щ鐧昏", acceptBy: '寮犱笁', acceptDate: "2019-01-22", curNode: "浠诲姟鍒嗘淳", flowRate: 60 }, + { reBizCode: "2", type: "鎶垫娂鐧昏", acceptBy: '鏉庡洓', acceptDate: "2019-01-23", curNode: "棰嗗瀹℃牳", flowRate: 30 }, + { reBizCode: "3", type: "杞Щ鐧昏", acceptBy: '鐜嬫', acceptDate: "2019-01-25", curNode: "浠诲姟澶勭悊", flowRate: 20 }, + { reBizCode: "4", type: "杞Щ鐧昏", acceptBy: '璧垫ゼ', acceptDate: "2019-11-22", curNode: "閮ㄩ棬瀹℃牳", flowRate: 80 }, + { reBizCode: "5", type: "杞Щ鐧昏", acceptBy: '閽卞氨', acceptDate: "2019-12-12", curNode: "浠诲姟鍒嗘淳", flowRate: 90 }, + { reBizCode: "6", type: "杞Щ鐧昏", acceptBy: '瀛欏惂', acceptDate: "2019-03-06", curNode: "浠诲姟澶勭悊", flowRate: 10 }, + { reBizCode: "7", type: "鎶垫娂鐧昏", acceptBy: '鍛ㄥぇ', acceptDate: "2019-04-13", curNode: "浠诲姟鍒嗘淳", flowRate: 100 }, + { reBizCode: "8", type: "鎶垫娂鐧昏", acceptBy: '鍚翠簩', acceptDate: "2019-05-09", curNode: "浠诲姟涓婃姤", flowRate: 50 }, + { reBizCode: "9", type: "鎶垫娂鐧昏", acceptBy: '閮戠埥', acceptDate: "2019-07-12", curNode: "浠诲姟澶勭悊", flowRate: 63 }, + { reBizCode: "20", type: "鎶垫娂鐧昏", acceptBy: '鏋楁湁', acceptDate: "2019-12-12", curNode: "浠诲姟鎵撳洖", flowRate: 59 }, + { reBizCode: "11", type: "杞Щ鐧昏", acceptBy: '鐮佷簯', acceptDate: "2019-09-10", curNode: "浠诲姟绛炬敹", flowRate: 87 }, +] - const dataCol2 = [{ - title: '涓氬姟鍙�', - align:"center", - dataIndex: 'reBizCode' - },{ - title: '鍙楃悊浜�', - align:"center", - dataIndex: 'acceptBy' - },{ - title: '鍙戣捣鏃堕棿', - align:"center", - dataIndex: 'acceptDate' - },{ - title: '褰撳墠鑺傜偣', - align:"center", - dataIndex: 'curNode' - },{ - title: '瓒呮椂鏃堕棿', - align:"center", - dataIndex: 'flowRate', - scopedSlots: { customRender: 'flowRate' } - }]; - const dataSource2=[ - {reBizCode:"A001",type:"杞Щ鐧昏",acceptBy:'寮犲洓',acceptDate:"2019-01-22",curNode:"浠诲姟鍒嗘淳",flowRate:12}, - {reBizCode:"A002",type:"鎶垫娂鐧昏",acceptBy:'鏉庡惂',acceptDate:"2019-01-23",curNode:"浠诲姟绛炬敹",flowRate:3}, - {reBizCode:"A003",type:"杞Щ鐧昏",acceptBy:'鐜嬩笁',acceptDate:"2019-01-25",curNode:"浠诲姟澶勭悊",flowRate:24}, - {reBizCode:"A004",type:"杞Щ鐧昏",acceptBy:'璧典簩',acceptDate:"2019-11-22",curNode:"閮ㄩ棬瀹℃牳",flowRate:10}, - {reBizCode:"A005",type:"杞Щ鐧昏",acceptBy:'閽卞ぇ',acceptDate:"2019-12-12",curNode:"浠诲姟绛炬敹",flowRate:8}, - {reBizCode:"A006",type:"杞Щ鐧昏",acceptBy:'瀛欏氨',acceptDate:"2019-03-06",curNode:"浠诲姟澶勭悊",flowRate:10}, - {reBizCode:"A007",type:"鎶垫娂鐧昏",acceptBy:'鍛ㄦ檿',acceptDate:"2019-04-13",curNode:"閮ㄩ棬瀹℃牳",flowRate:24}, - {reBizCode:"A008",type:"鎶垫娂鐧昏",acceptBy:'鍚存湁',acceptDate:"2019-05-09",curNode:"閮ㄩ棬瀹℃牳",flowRate:30}, - {reBizCode:"A009",type:"鎶垫娂鐧昏",acceptBy:'閮戞',acceptDate:"2019-07-12",curNode:"浠诲姟鍒嗘淳",flowRate:1}, - {reBizCode:"A0010",type:"鎶垫娂鐧昏",acceptBy:'鏋楃埥',acceptDate:"2019-12-12",curNode:"閮ㄩ棬瀹℃牳",flowRate:16}, - {reBizCode:"A0011",type:"杞Щ鐧昏",acceptBy:'鐮佹ゼ',acceptDate:"2019-09-10",curNode:"閮ㄩ棬瀹℃牳",flowRate:7}, - ] +const dataCol2 = [{ + title: '涓氬姟鍙�', + align: "center", + dataIndex: 'reBizCode' +}, { + title: '鍙楃悊浜�', + align: "center", + dataIndex: 'acceptBy' +}, { + title: '鍙戣捣鏃堕棿', + align: "center", + dataIndex: 'acceptDate' +}, { + title: '褰撳墠鑺傜偣', + align: "center", + dataIndex: 'curNode' +}, { + title: '瓒呮椂鏃堕棿', + align: "center", + dataIndex: 'flowRate', + scopedSlots: { customRender: 'flowRate' } +}]; +const dataSource2 = [ + { reBizCode: "A001", type: "杞Щ鐧昏", acceptBy: '寮犲洓', acceptDate: "2019-01-22", curNode: "浠诲姟鍒嗘淳", flowRate: 12 }, + { reBizCode: "A002", type: "鎶垫娂鐧昏", acceptBy: '鏉庡惂', acceptDate: "2019-01-23", curNode: "浠诲姟绛炬敹", flowRate: 3 }, + { reBizCode: "A003", type: "杞Щ鐧昏", acceptBy: '鐜嬩笁', acceptDate: "2019-01-25", curNode: "浠诲姟澶勭悊", flowRate: 24 }, + { reBizCode: "A004", type: "杞Щ鐧昏", acceptBy: '璧典簩', acceptDate: "2019-11-22", curNode: "閮ㄩ棬瀹℃牳", flowRate: 10 }, + { reBizCode: "A005", type: "杞Щ鐧昏", acceptBy: '閽卞ぇ', acceptDate: "2019-12-12", curNode: "浠诲姟绛炬敹", flowRate: 8 }, + { reBizCode: "A006", type: "杞Щ鐧昏", acceptBy: '瀛欏氨', acceptDate: "2019-03-06", curNode: "浠诲姟澶勭悊", flowRate: 10 }, + { reBizCode: "A007", type: "鎶垫娂鐧昏", acceptBy: '鍛ㄦ檿', acceptDate: "2019-04-13", curNode: "閮ㄩ棬瀹℃牳", flowRate: 24 }, + { reBizCode: "A008", type: "鎶垫娂鐧昏", acceptBy: '鍚存湁', acceptDate: "2019-05-09", curNode: "閮ㄩ棬瀹℃牳", flowRate: 30 }, + { reBizCode: "A009", type: "鎶垫娂鐧昏", acceptBy: '閮戞', acceptDate: "2019-07-12", curNode: "浠诲姟鍒嗘淳", flowRate: 1 }, + { reBizCode: "A0010", type: "鎶垫娂鐧昏", acceptBy: '鏋楃埥', acceptDate: "2019-12-12", curNode: "閮ㄩ棬瀹℃牳", flowRate: 16 }, + { reBizCode: "A0011", type: "杞Щ鐧昏", acceptBy: '鐮佹ゼ', acceptDate: "2019-09-10", curNode: "閮ㄩ棬瀹℃牳", flowRate: 7 }, +] - export default { - name: "IndexBdc", - components: { - ATooltip, - ACol, - ChartCard, - MiniArea, - MiniBar, - DashChartDemo, - BarMultid, - IndexBar - }, - data() { - return { - loading: true, - cardCount:{ - sll:100, - bjl:87, - isll:15, - ibjl:9 +export default { + name: "IndexBdc", + components: { + ATooltip, + ACol, + ChartCard, + MiniArea, + MiniBar, + DashChartDemo, + BarMultid, + IndexBar + }, + data() { + return { + loading: true, + cardCount: { + sll: 100, + bjl: 87, + isll: 15, + ibjl: 9 + }, + + todaySll: 60, + todayBjl: 54, + todayISll: 13, + todayIBjl: 7, + + chartData: { + sll: [], + bjl: [], + isll: [], + ibjl: [] + }, + jhjgFields, + jhjgData, + + xljgData, + xljgFields, + + diskInfo: [ + { name: "C鐩�", restPPT: 7 }, + { name: "D鐩�", restPPT: 5 } + ], + + registerTypeList: [{ + text: "涓氬姟鍙楃悊" + }, { + text: "涓氬姟绠$悊" + }, { + text: "鏂囦欢绠$悊" + }, { + text: "淇℃伅鏌ヨ" + }], + + dataSource1: [], + dataSource2: [], + columns: dataCol1, + columns2: dataCol2, + ipagination1: { + current: 1, + pageSize: 5, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" }, + showQuickJumper: true, + showSizeChanger: true, + total: 0, - todaySll:60, - todayBjl:54, - todayISll:13, - todayIBjl:7, - - chartData:{ - sll:[], - bjl:[], - isll:[], - ibjl:[] + }, + ipagination2: { + current: 1, + pageSize: 5, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" }, - jhjgFields, - jhjgData, + showQuickJumper: true, + showSizeChanger: true, + total: 0, + }, + indexRegisterType: "杞Щ鐧昏", + indexBottomTab: "1" - xljgData, - xljgFields, - - diskInfo:[ - {name:"C鐩�",restPPT:7}, - {name:"D鐩�",restPPT:5} - ], - - registerTypeList:[{ - text:"涓氬姟鍙楃悊" - },{ - text:"涓氬姟绠$悊" - },{ - text:"鏂囦欢绠$悊" - },{ - text:"淇℃伅鏌ヨ" - }], - - dataSource1:[], - dataSource2:[], - columns:dataCol1, - columns2:dataCol2, - ipagination1:{ - current: 1, - pageSize: 5, - pageSizeOptions: ['10', '20', '30'], - showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" - }, - showQuickJumper: true, - showSizeChanger: true, - total: 0, - - }, - ipagination2:{ - current: 1, - pageSize: 5, - pageSizeOptions: ['10', '20', '30'], - showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" - }, - showQuickJumper: true, - showSizeChanger: true, - total: 0, - }, - indexRegisterType:"杞Щ鐧昏", - indexBottomTab:"1" - - } - }, - methods:{ - goPage(){ - this.$message.success("鏍规嵁涓氬姟鑷澶勭悊璺宠浆椤甸潰!") - }, - changeRegisterType(e){ - this.indexRegisterType = e.target.value - if(this.indexBottomTab=="1"){ - this.loadDataSource1() - }else{ - this.loadDataSource2() - } - }, - tableChange1(pagination){ - this.ipagination1.current = pagination.current - this.ipagination1.pageSize = pagination.pageSize - this.queryTimeoutInfo() - }, - tableChange2(pagination){ - this.ipagination2.current = pagination.current - this.ipagination2.pageSize = pagination.pageSize - this.queryNodeTimeoutInfo() - }, - getFlowRateNumber(value){ - return Number(value) - }, - getPercentFormat(value){ - if(value==100){ - return "瓒呮椂" - }else{ - return value+"%" - } - }, - getPercentColor(value){ - let p = Number(value) - if(p>=90 && p<100){ - return 'rgb(244, 240, 89)' - }else if(p>=100){ - return 'red' - }else{ - return 'rgb(16, 142, 233)' - } - }, - - loadDataSource1(){ - this.dataSource1 = dataSource1.filter(item=>{ - if(!this.indexRegisterType){ - return true - } - return item.type==this.indexRegisterType - }) - }, - loadDataSource2(){ - this.dataSource2 = dataSource2.filter(item=>{ - if(!this.indexRegisterType){ - return true - } - return item.type==this.indexRegisterType - }) - } - }, - created() { - this.loadDataSource1() - this.loadDataSource2() - setTimeout(() => { - this.loading = !this.loading - }, 1000) } + }, + methods: { + goPage() { + this.$message.success("鏍规嵁涓氬姟鑷澶勭悊璺宠浆椤甸潰!") + }, + changeRegisterType(e) { + this.indexRegisterType = e.target.value + if (this.indexBottomTab == "1") { + this.loadDataSource1() + } else { + this.loadDataSource2() + } + }, + tableChange1(pagination) { + this.ipagination1.current = pagination.current + this.ipagination1.pageSize = pagination.pageSize + this.queryTimeoutInfo() + }, + tableChange2(pagination) { + this.ipagination2.current = pagination.current + this.ipagination2.pageSize = pagination.pageSize + this.queryNodeTimeoutInfo() + }, + getFlowRateNumber(value) { + return Number(value) + }, + getPercentFormat(value) { + if (value == 100) { + return "瓒呮椂" + } else { + return value + "%" + } + }, + getPercentColor(value) { + let p = Number(value) + if (p >= 90 && p < 100) { + return 'rgb(244, 240, 89)' + } else if (p >= 100) { + return 'red' + } else { + return 'rgb(16, 142, 233)' + } + }, + + loadDataSource1() { + this.dataSource1 = dataSource1.filter(item => { + if (!this.indexRegisterType) { + return true + } + return item.type == this.indexRegisterType + }) + }, + loadDataSource2() { + this.dataSource2 = dataSource2.filter(item => { + if (!this.indexRegisterType) { + return true + } + return item.type == this.indexRegisterType + }) + } + }, + created() { + this.loadDataSource1() + this.loadDataSource2() + setTimeout(() => { + this.loading = !this.loading + }, 1000) } +} </script> <style lang="less" scoped> - .extra-wrapper { - line-height: 55px; - padding-right: 24px; +.extra-wrapper { + line-height: 55px; + padding-right: 24px; - .extra-item { - display: inline-block; - margin-right: 24px; - - a { - margin-left: 24px; - } - } - } - - .item-group { - padding: 20px 0 8px 24px; - font-size: 0; - a { - color: rgba(0, 0, 0, 0.65); - display: inline-block; - font-size: 14px; - margin-bottom: 13px; - width: 25%; - } - } - - .item-group { - .more-btn { - margin-bottom: 13px; - text-align: center; - } - } - - .list-content-item { - color: rgba(0, 0, 0, .45); + .extra-item { display: inline-block; - vertical-align: middle; + margin-right: 24px; + + a { + margin-left: 24px; + } + } +} + +.item-group { + padding: 20px 0 8px 24px; + font-size: 0; + a { + color: rgba(0, 0, 0, 0.65); + display: inline-block; font-size: 14px; - margin-left: 40px; + margin-bottom: 13px; + width: 25%; } +} - @media only screen and (min-width: 1600px) { - .list-content-item{ - margin-left:60px; - } +.item-group { + .more-btn { + margin-bottom: 13px; + text-align: center; } +} - @media only screen and (max-width: 1300px) { - .list-content-item{ - margin-left:20px; - } - .width-hidden4{ - display:none - } - } - .list-content-item{ - span{line-height: 20px;} - } - .list-content-item{ - p{margin-top: 4px;margin-bottom:0;line-height:22px;} - } - .anty-list-cust { - .ant-list-item-meta{flex: 0.3 !important;} - } - .anty-list-cust { - .ant-list-item-content{flex:1 !important; justify-content:flex-start !important;margin-left: 20px;} - } +.list-content-item { + color: rgba(0, 0, 0, 0.45); + display: inline-block; + vertical-align: middle; + font-size: 14px; + margin-left: 40px; +} +@media only screen and (min-width: 1600px) { + .list-content-item { + margin-left: 60px; + } +} +@media only screen and (max-width: 1300px) { + .list-content-item { + margin-left: 20px; + } + .width-hidden4 { + display: none; + } +} +.list-content-item { + span { + line-height: 20px; + } +} +.list-content-item { + p { + margin-top: 4px; + margin-bottom: 0; + line-height: 22px; + } +} +.anty-list-cust { + .ant-list-item-meta { + flex: 0.3 !important; + } +} +.anty-list-cust { + .ant-list-item-content { + flex: 1 !important; + justify-content: flex-start !important; + margin-left: 20px; + } +} </style> \ No newline at end of file diff --git a/src/views/dashboard/IndexChart.vue b/src/views/dashboard/IndexChart.vue index 60406f6..eccd692 100644 --- a/src/views/dashboard/IndexChart.vue +++ b/src/views/dashboard/IndexChart.vue @@ -1,134 +1,276 @@ <template> <div class="page-header-index-wide"> - <!--<a-row :gutter="24">--> - <!--<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">--> - <!--<chart-card :loading="loading" title="鎬婚攢鍞" total="锟�126,560">--> - <!--<a-tooltip title="鎸囨爣璇存槑" slot="action">--> - <!--<a-icon type="info-circle-o" />--> - <!--</a-tooltip>--> - <!--<div>--> - <!--<trend flag="up" style="margin-right: 16px;">--> - <!--<span slot="term">鍛ㄥ悓姣�</span>--> - <!--12%--> - <!--</trend>--> - <!--<trend flag="down">--> - <!--<span slot="term">鏃ュ悓姣�</span>--> - <!--11%--> - <!--</trend>--> - <!--</div>--> - <!--<template slot="footer">鏃ュ潎閿�鍞<span>锟� 234.56</span></template>--> - <!--</chart-card>--> - <!--</a-col>--> - <!--<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">--> - <!--<chart-card :loading="loading" title="璁㈠崟閲�" :total="8846 | NumberFormat">--> - <!--<a-tooltip title="鎸囨爣璇存槑" slot="action">--> - <!--<a-icon type="info-circle-o" />--> - <!--</a-tooltip>--> - <!--<div>--> - <!--<mini-area />--> - <!--</div>--> - <!--<template slot="footer">鏃ヨ鍗曢噺<span> {{ '1234' | NumberFormat }}</span></template>--> - <!--</chart-card>--> - <!--</a-col>--> - <!--<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">--> - <!--<chart-card :loading="loading" title="鏀粯绗旀暟" :total="6560 | NumberFormat">--> - <!--<a-tooltip title="鎸囨爣璇存槑" slot="action">--> - <!--<a-icon type="info-circle-o" />--> - <!--</a-tooltip>--> - <!--<div>--> - <!--<mini-bar :height="40" />--> - <!--</div>--> - <!--<template slot="footer">杞寲鐜� <span>60%</span></template>--> - <!--</chart-card>--> - <!--</a-col>--> - <!--<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">--> - <!--<chart-card :loading="loading" title="杩愯惀娲诲姩鏁堟灉" total="78%">--> - <!--<a-tooltip title="鎸囨爣璇存槑" slot="action">--> - <!--<a-icon type="info-circle-o" />--> - <!--</a-tooltip>--> - <!--<div>--> - <!--<mini-progress color="rgb(19, 194, 194)" :target="80" :percentage="78" :height="8" />--> - <!--</div>--> - <!--<template slot="footer">--> - <!--<trend flag="down" style="margin-right: 16px;">--> - <!--<span slot="term">鍚屽懆姣�</span>--> - <!--12%--> - <!--</trend>--> - <!--<trend flag="up">--> - <!--<span slot="term">鏃ョ幆姣�</span>--> - <!--80%--> - <!--</trend>--> - <!--</template>--> - <!--</chart-card>--> - <!--</a-col>--> - <!--</a-row>--> + <a-row :gutter="24"> + <a-col + :sm="24" + :md="12" + :xl="6" + :style="{ marginBottom: '24px' }" + > + <chart-card + :loading="loading" + title="鎬婚攢鍞" + total="锟�126,560" + > + <a-tooltip + title="鎸囨爣璇存槑" + slot="action" + > + <a-icon type="info-circle-o" /> + </a-tooltip> + <div> + <trend + flag="up" + style="margin-right: 16px;" + > + <span slot="term">鍛ㄥ悓姣�</span> + 12% + </trend> + <trend flag="down"> + <span slot="term">鏃ュ悓姣�</span> + 11% + </trend> + </div> + <template slot="footer">鏃ュ潎閿�鍞<span>锟� 234.56</span></template> + </chart-card> + </a-col> + <a-col + :sm="24" + :md="12" + :xl="6" + :style="{ marginBottom: '24px' }" + > + <chart-card + :loading="loading" + title="璁㈠崟閲�" + :total="8846 | NumberFormat" + > + <a-tooltip + title="鎸囨爣璇存槑" + slot="action" + > + <a-icon type="info-circle-o" /> + </a-tooltip> + <div> + <mini-area /> + </div> + <template slot="footer">鏃ヨ鍗曢噺<span> {{ '1234' | NumberFormat }}</span></template> + </chart-card> + </a-col> + <a-col + :sm="24" + :md="12" + :xl="6" + :style="{ marginBottom: '24px' }" + > + <chart-card + :loading="loading" + title="鏀粯绗旀暟" + :total="6560 | NumberFormat" + > + <a-tooltip + title="鎸囨爣璇存槑" + slot="action" + > + <a-icon type="info-circle-o" /> + </a-tooltip> + <div> + <mini-bar :height="40" /> + </div> + <template slot="footer">杞寲鐜� <span>60%</span></template> + </chart-card> + </a-col> + <a-col + :sm="24" + :md="12" + :xl="6" + :style="{ marginBottom: '24px' }" + > + <chart-card + :loading="loading" + title="杩愯惀娲诲姩鏁堟灉" + total="78%" + > + <a-tooltip + title="鎸囨爣璇存槑" + slot="action" + > + <a-icon type="info-circle-o" /> + </a-tooltip> + <div> + <mini-progress + color="rgb(19, 194, 194)" + :target="80" + :percentage="78" + :height="8" + /> + </div> + <template slot="footer"> + <trend + flag="down" + style="margin-right: 16px;" + > + <span slot="term">鍚屽懆姣�</span> + 12% + </trend> + <trend flag="up"> + <span slot="term">鏃ョ幆姣�</span> + 80% + </trend> + </template> + </chart-card> + </a-col> + </a-row> - <!--<a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}">--> - <!--<div class="salesCard">--> - <!--<a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">--> - <!--<div class="extra-wrapper" slot="tabBarExtraContent">--> - <!--<div class="extra-item">--> - <!--<a>浠婃棩</a>--> - <!--<a>鏈懆</a>--> - <!--<a>鏈湀</a>--> - <!--<a>鏈勾</a>--> - <!--</div>--> - <!--<a-range-picker :style="{width: '256px'}" />--> - <!--</div>--> - <!--<a-tab-pane loading="true" tab="閿�鍞" key="1">--> - <!--<a-row>--> - <!--<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">--> - <!--<bar title="閿�鍞鎺掕" :dataSource="barData"/>--> - <!--</a-col>--> - <!--<a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">--> - <!--<rank-list title="闂ㄥ簵閿�鍞帓琛屾" :list="rankList"/>--> - <!--</a-col>--> - <!--</a-row>--> - <!--</a-tab-pane>--> - <!--<a-tab-pane tab="閿�鍞秼鍔�" key="2">--> - <!--<a-row>--> - <!--<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">--> - <!--<bar title="閿�鍞瓒嬪娍" :dataSource="barData"/>--> - <!--</a-col>--> - <!--<a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">--> - <!--<rank-list title="闂ㄥ簵閿�鍞帓琛屾" :list="rankList"/>--> - <!--</a-col>--> - <!--</a-row>--> - <!--</a-tab-pane>--> - <!--</a-tabs>--> - <!--</div>--> - <!--</a-card>--> + <a-card + :loading="loading" + :bordered="false" + :body-style="{padding: '0'}" + > + <div class="salesCard"> + <a-tabs + default-active-key="1" + size="large" + :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}" + > + <div + class="extra-wrapper" + slot="tabBarExtraContent" + > + <div class="extra-item"> + <a>浠婃棩</a> + <a>鏈懆</a> + <a>鏈湀</a> + <a>鏈勾</a> + </div> + <a-range-picker :style="{width: '256px'}" /> + </div> + <a-tab-pane + loading="true" + tab="閿�鍞" + key="1" + > + <a-row> + <a-col + :xl="16" + :lg="12" + :md="12" + :sm="24" + :xs="24" + > + <bar + title="閿�鍞鎺掕" + :dataSource="barData" + /> + </a-col> + <a-col + :xl="8" + :lg="12" + :md="12" + :sm="24" + :xs="24" + > + <rank-list + title="闂ㄥ簵閿�鍞帓琛屾" + :list="rankList" + /> + </a-col> + </a-row> + </a-tab-pane> + <a-tab-pane + tab="閿�鍞秼鍔�" + key="2" + > + <a-row> + <a-col + :xl="16" + :lg="12" + :md="12" + :sm="24" + :xs="24" + > + <bar + title="閿�鍞瓒嬪娍" + :dataSource="barData" + /> + </a-col> + <a-col + :xl="8" + :lg="12" + :md="12" + :sm="24" + :xs="24" + > + <rank-list + title="闂ㄥ簵閿�鍞帓琛屾" + :list="rankList" + /> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </div> + </a-card> <a-row> <a-col :span="24"> - <a-card :loading="loading" :bordered="false" title="鏈�杩戜竴鍛ㄨ闂噺缁熻" :style="{ marginTop: '24px' }"> + <a-card + :loading="loading" + :bordered="false" + title="鏈�杩戜竴鍛ㄨ闂噺缁熻" + :style="{ marginTop: '24px' }" + > <a-row> <a-col :span="6"> - <head-info title="浠婃棩IP" :content="loginfo.todayIp"></head-info> + <head-info + title="浠婃棩IP" + :content="loginfo.todayIp" + ></head-info> </a-col> <a-col :span="2"> <a-spin class='circle-cust'> - <a-icon slot="indicator" type="environment" style="font-size: 24px" /> + <a-icon + slot="indicator" + type="environment" + style="font-size: 24px" + /> </a-spin> </a-col> <a-col :span="6"> - <head-info title="浠婃棩璁块棶" :content="loginfo.todayVisitCount"></head-info> + <head-info + title="浠婃棩璁块棶" + :content="loginfo.todayVisitCount" + ></head-info> </a-col> <a-col :span="2"> <a-spin class='circle-cust'> - <a-icon slot="indicator" type="team" style="font-size: 24px" /> + <a-icon + slot="indicator" + type="team" + style="font-size: 24px" + /> </a-spin> </a-col> <a-col :span="6"> - <head-info title="鎬昏闂噺" :content="loginfo.totalVisitCount"></head-info> + <head-info + title="鎬昏闂噺" + :content="loginfo.totalVisitCount" + ></head-info> </a-col> <a-col :span="2"> <a-spin class='circle-cust'> - <a-icon slot="indicator" type="rise" style="font-size: 24px" /> + <a-icon + slot="indicator" + type="rise" + style="font-size: 24px" + /> </a-spin> </a-col> </a-row> - <line-chart-multid :fields="visitFields" :dataSource="visitInfo"></line-chart-multid> + <line-chart-multid + :fields="visitFields" + :dataSource="visitInfo" + ></line-chart-multid> </a-card> </a-col> </a-row> @@ -136,133 +278,133 @@ </template> <script> - import ChartCard from '@/components/ChartCard' - import ACol from "ant-design-vue/es/grid/Col" - import ATooltip from "ant-design-vue/es/tooltip/Tooltip" - import MiniArea from '@/components/chart/MiniArea' - import MiniBar from '@/components/chart/MiniBar' - import MiniProgress from '@/components/chart/MiniProgress' - import RankList from '@/components/chart/RankList' - import Bar from '@/components/chart/Bar' - import LineChartMultid from '@/components/chart/LineChartMultid' - import HeadInfo from '@/components/tools/HeadInfo.vue' +import ChartCard from '@/components/ChartCard' +import ACol from "ant-design-vue/es/grid/Col" +import ATooltip from "ant-design-vue/es/tooltip/Tooltip" +import MiniArea from '@/components/chart/MiniArea' +import MiniBar from '@/components/chart/MiniBar' +import MiniProgress from '@/components/chart/MiniProgress' +import RankList from '@/components/chart/RankList' +import Bar from '@/components/chart/Bar' +import LineChartMultid from '@/components/chart/LineChartMultid' +import HeadInfo from '@/components/tools/HeadInfo.vue' - import Trend from '@/components/Trend' - import { getLoginfo,getVisitInfo } from '@/api/api' +import Trend from '@/components/Trend' +import { getLoginfo, getVisitInfo } from '@/api/api' - const rankList = [] - for (let i = 0; i < 7; i++) { - rankList.push({ - name: '鐧介弓宀� ' + (i+1) + ' 鍙峰簵', - total: 1234.56 - i * 100 - }) - } - const barData = [] - for (let i = 0; i < 12; i += 1) { - barData.push({ - x: `${i + 1}鏈坄, - y: Math.floor(Math.random() * 1000) + 200 - }) - } - export default { - name: "IndexChart", - components: { - ATooltip, - ACol, - ChartCard, - MiniArea, - MiniBar, - MiniProgress, - RankList, - Bar, - Trend, - LineChartMultid, - HeadInfo - }, - data() { - return { - loading: true, - center: null, - rankList, - barData, - loginfo:{}, - visitFields:['ip','visit'], - visitInfo:[], - indicator: <a-icon type="loading" style="font-size: 24px" spin /> - } - }, - created() { - setTimeout(() => { - this.loading = !this.loading - }, 1000) - this.initLogInfo(); - }, - methods: { - initLogInfo () { - getLoginfo(null).then((res)=>{ - if(res.success){ - Object.keys(res.result).forEach(key=>{ - res.result[key] =res.result[key]+"" - }) - this.loginfo = res.result; - } - }) - getVisitInfo().then(res=>{ - if(res.success){ - this.visitInfo = res.result; - } - }) - }, +const rankList = [] +for (let i = 0; i < 7; i++) { + rankList.push({ + name: '鐧介弓宀� ' + (i + 1) + ' 鍙峰簵', + total: 1234.56 - i * 100 + }) +} +const barData = [] +for (let i = 0; i < 12; i += 1) { + barData.push({ + x: `${i + 1}鏈坄, + y: Math.floor(Math.random() * 1000) + 200 + }) +} +export default { + name: "IndexChart", + components: { + ATooltip, + ACol, + ChartCard, + MiniArea, + MiniBar, + MiniProgress, + RankList, + Bar, + Trend, + LineChartMultid, + HeadInfo + }, + data() { + return { + loading: true, + center: null, + rankList, + barData, + loginfo: {}, + visitFields: ['ip', 'visit'], + visitInfo: [], + indicator: <a-icon type="loading" style="font-size: 24px" spin /> } + }, + created() { + setTimeout(() => { + this.loading = !this.loading + }, 1000) + this.initLogInfo(); + }, + methods: { + initLogInfo() { + getLoginfo(null).then((res) => { + if (res.success) { + Object.keys(res.result).forEach(key => { + res.result[key] = res.result[key] + "" + }) + this.loginfo = res.result; + } + }) + getVisitInfo().then(res => { + if (res.success) { + this.visitInfo = res.result; + } + }) + }, } +} </script> <style lang="less" scoped> - .circle-cust{ - position: relative; - top: 28px; - left: -100%; - } - .extra-wrapper { - line-height: 55px; - padding-right: 24px; +.circle-cust { + position: relative; + top: 28px; + left: -100%; +} +.extra-wrapper { + line-height: 55px; + padding-right: 24px; - .extra-item { - display: inline-block; - margin-right: 24px; + .extra-item { + display: inline-block; + margin-right: 24px; - a { - margin-left: 24px; - } + a { + margin-left: 24px; } } +} - /* 棣栭〉璁块棶閲忕粺璁� */ - .head-info { - position: relative; - text-align: left; - padding: 0 32px 0 0; - min-width: 125px; +/* 棣栭〉璁块棶閲忕粺璁� */ +.head-info { + position: relative; + text-align: left; + padding: 0 32px 0 0; + min-width: 125px; - &.center { - text-align: center; - padding: 0 32px; - } + &.center { + text-align: center; + padding: 0 32px; + } - span { - color: rgba(0, 0, 0, .45); - display: inline-block; - font-size: .95rem; - line-height: 42px; - margin-bottom: 4px; - } - p { - line-height: 42px; - margin: 0; - a { - font-weight: 600; - font-size: 1rem; - } + span { + color: rgba(0, 0, 0, 0.45); + display: inline-block; + font-size: 0.95rem; + line-height: 42px; + margin-bottom: 4px; + } + p { + line-height: 42px; + margin: 0; + a { + font-weight: 600; + font-size: 1rem; } } +} </style> \ No newline at end of file diff --git a/src/views/dashboard/IndexTask.vue b/src/views/dashboard/IndexTask.vue index 8e9d84b..b945acf 100644 --- a/src/views/dashboard/IndexTask.vue +++ b/src/views/dashboard/IndexTask.vue @@ -1,15 +1,29 @@ <template> <div class="index-container-ty"> <a-spin :spinning="loading"> - <a-row type="flex" justify="start" :gutter="3"> - <a-col :sm="24" :lg="12"> + <a-row + type="flex" + justify="start" + :gutter="3" + > + <a-col + :sm="24" + :lg="12" + > <a-card> - <div slot="title" class="index-md-title"> - <img src="../../assets/daiban.png"/> + <div + slot="title" + class="index-md-title" + > + <img src="../../assets/daiban.png" /> 鎴戠殑寰呭姙銆恵{ dataSource1.length }}銆� </div> <div slot="extra"> - <a v-if="dataSource1 && dataSource1.length>0" slot="footer" @click="goPage">鏇村 <a-icon type="double-right" /></a> + <a + v-if="dataSource1 && dataSource1.length>0" + slot="footer" + @click="goPage" + >鏇村 <a-icon type="double-right" /></a> </div> <a-table :class="'my-index-table tytable1'" @@ -18,16 +32,34 @@ rowKey="id" :columns="columns" :dataSource="dataSource1" - :pagination="false"> - <template slot="ellipsisText" slot-scope="text"> - <j-ellipsis :value="text" :length="textMaxLength"></j-ellipsis> + :pagination="false" + > + <template + slot="ellipsisText" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="textMaxLength" + ></j-ellipsis> </template> - <template slot="dayWarnning" slot-scope="text,record"> - <a-icon type="bulb" theme="twoTone" style="font-size:22px" :twoToneColor="getTipColor(record)"/> + <template + slot="dayWarnning" + slot-scope="text,record" + > + <a-icon + type="bulb" + theme="twoTone" + style="font-size:22px" + :twoToneColor="getTipColor(record)" + /> </template> - <span slot="action" slot-scope="text, record"> + <span + slot="action" + slot-scope="text, record" + > <a @click="handleData">鍔炵悊</a> </span> @@ -35,14 +67,24 @@ </a-card> </a-col> - <a-col :sm="24" :lg="12"> + <a-col + :sm="24" + :lg="12" + > <a-card> - <div slot="title" class="index-md-title"> - <img src="../../assets/zaiban.png"/> + <div + slot="title" + class="index-md-title" + > + <img src="../../assets/zaiban.png" /> 鎴戠殑鍦ㄥ姙銆恵{ dataSource2.length }}銆� </div> <div slot="extra"> - <a v-if="dataSource2 && dataSource2.length>0" slot="footer" @click="goPage">鏇村 <a-icon type="double-right" /></a> + <a + v-if="dataSource2 && dataSource2.length>0" + slot="footer" + @click="goPage" + >鏇村 <a-icon type="double-right" /></a> </div> <a-table :class="'my-index-table tytable2'" @@ -51,16 +93,34 @@ rowKey="id" :columns="columns" :dataSource="dataSource2" - :pagination="false"> - <template slot="ellipsisText" slot-scope="text"> - <j-ellipsis :value="text" :length="textMaxLength"></j-ellipsis> + :pagination="false" + > + <template + slot="ellipsisText" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="textMaxLength" + ></j-ellipsis> </template> - <template slot="dayWarnning" slot-scope="text,record"> - <a-icon type="bulb" theme="twoTone" style="font-size:22px" :twoToneColor="getTipColor(record)"/> + <template + slot="dayWarnning" + slot-scope="text,record" + > + <a-icon + type="bulb" + theme="twoTone" + style="font-size:22px" + :twoToneColor="getTipColor(record)" + /> </template> - <span slot="action" slot-scope="text, record"> + <span + slot="action" + slot-scope="text, record" + > <a @click="handleData">鍔炵悊</a> </span> @@ -72,10 +132,16 @@ <div style="height: 5px;"></div> </a-col> - <a-col :sm="24" :lg="12"> + <a-col + :sm="24" + :lg="12" + > <a-card> - <div slot="title" class="index-md-title"> - <img src="../../assets/guaz.png"/> + <div + slot="title" + class="index-md-title" + > + <img src="../../assets/guaz.png" /> 鎴戠殑鎸傝处銆恵{ dataSource4.length }}銆� </div> <a-table @@ -85,16 +151,34 @@ rowKey="id" :columns="columns" :dataSource="dataSource4" - :pagination="false"> - <template slot="ellipsisText" slot-scope="text"> - <j-ellipsis :value="text" :length="textMaxLength"></j-ellipsis> + :pagination="false" + > + <template + slot="ellipsisText" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="textMaxLength" + ></j-ellipsis> </template> - <template slot="dayWarnning" slot-scope="text,record"> - <a-icon type="bulb" theme="twoTone" style="font-size:22px" :twoToneColor="getTipColor(record)"/> + <template + slot="dayWarnning" + slot-scope="text,record" + > + <a-icon + type="bulb" + theme="twoTone" + style="font-size:22px" + :twoToneColor="getTipColor(record)" + /> </template> - <span slot="action" slot-scope="text, record"> + <span + slot="action" + slot-scope="text, record" + > <a @click="handleData">鍔炵悊</a> </span> @@ -102,10 +186,16 @@ </a-card> </a-col> - <a-col :sm="24" :lg="12"> + <a-col + :sm="24" + :lg="12" + > <a-card> - <div slot="title" class="index-md-title"> - <img src="../../assets/duban.png"/> + <div + slot="title" + class="index-md-title" + > + <img src="../../assets/duban.png" /> 鎴戠殑鐫e姙銆恵{ dataSource3.length }}銆� </div> <a-table @@ -115,16 +205,34 @@ rowKey="id" :columns="columns" :dataSource="dataSource3" - :pagination="false"> - <template slot="ellipsisText" slot-scope="text"> - <j-ellipsis :value="text" :length="textMaxLength"></j-ellipsis> + :pagination="false" + > + <template + slot="ellipsisText" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="textMaxLength" + ></j-ellipsis> </template> - <template slot="dayWarnning" slot-scope="text,record"> - <a-icon type="bulb" theme="twoTone" style="font-size:22px" :twoToneColor="getTipColor(record)"/> + <template + slot="dayWarnning" + slot-scope="text,record" + > + <a-icon + type="bulb" + theme="twoTone" + style="font-size:22px" + :twoToneColor="getTipColor(record)" + /> </template> - <span slot="action" slot-scope="text, record"> + <span + slot="action" + slot-scope="text, record" + > <a @click="handleData">鍔炵悊</a> </span> @@ -139,234 +247,279 @@ </template> <script> - import noDataPng from '@/assets/nodata.png' - import JEllipsis from '@/components/jeecg/JEllipsis' +import noDataPng from '@/assets/nodata.png' +import JEllipsis from '@/components/jeecg/JEllipsis' - const tempSs1=[{ - id:"001", - orderNo:"鐢礫1]1267102", - orderTitle:"鑽搧鍑洪棶棰樹簡", - restDay:1 - },{ - id:"002", - orderNo:"鐢礫4]5967102", - orderTitle:"鍚冧簡xxx鍖婚櫌鐨勮嵂锛岀梾鎯呰秺鏉ヨ秺涓ラ噸", - restDay:0 - },{ - id:"003", - orderNo:"鐢礫3]5988987", - orderTitle:"浠婂ぉ鍘昏秴甯備拱楦¤泲锛岄浮铔嬮兘鏄潖鐨�", - restDay:7 - },{ - id:"004", - orderNo:"鐢礫2]5213491", - orderTitle:"xx瀹濆疄浣撳簵楂樹环鍞崠xx", - restDay:5 - },{ - id:"005", - orderNo:"鐢礫1]1603491", - orderTitle:"浠ョ孩鍒╃浉璇憋紝绛斿簲閫�淇濆悗鎵d竴骞磋垂鐢�", - restDay:0 - }] +const tempSs1 = [{ + id: "001", + orderNo: "鐢礫1]1267102", + orderTitle: "鑽搧鍑洪棶棰樹簡", + restDay: 1 +}, { + id: "002", + orderNo: "鐢礫4]5967102", + orderTitle: "鍚冧簡xxx鍖婚櫌鐨勮嵂锛岀梾鎯呰秺鏉ヨ秺涓ラ噸", + restDay: 0 +}, { + id: "003", + orderNo: "鐢礫3]5988987", + orderTitle: "浠婂ぉ鍘昏秴甯備拱楦¤泲锛岄浮铔嬮兘鏄潖鐨�", + restDay: 7 +}, { + id: "004", + orderNo: "鐢礫2]5213491", + orderTitle: "xx瀹濆疄浣撳簵楂樹环鍞崠xx", + restDay: 5 +}, { + id: "005", + orderNo: "鐢礫1]1603491", + orderTitle: "浠ョ孩鍒╃浉璇憋紝绛斿簲閫�淇濆悗鎵d竴骞磋垂鐢�", + restDay: 0 +}] - const tempSs2=[{ - id:"001", - orderTitle:"鎴戣鎶曡瘔杩欎釜澶ц秴甯�", - orderNo:"鐢礫1]10299456", - restDay:6 - },{ - id:"002", - orderTitle:"xxx鍖婚櫌涔卞紑鑽柟,鍞崠鍋囪嵂", - orderNo:"鐢礫2]20235691", - restDay:0 - },{ - id:"003", - orderTitle:"鎴戞兂闂棶杩欏搴楁槸骞插暐鐨�", - orderNo:"鐢礫3]495867322", - restDay:7 - },{ - id:"004", - orderTitle:"鎴戣涓炬姤鏈濋槼鍖哄ゥ妫叕鍥厭搴�", - orderNo:"鐢礫2]1193849", - restDay:3 - },{ - id:"005", - orderTitle:"鎴戜粖澶╁悆楗悆鍒颁竴涓煶澶村瓙", - orderNo:"鐢礫4]56782344", - restDay:9 - }] +const tempSs2 = [{ + id: "001", + orderTitle: "鎴戣鎶曡瘔杩欎釜澶ц秴甯�", + orderNo: "鐢礫1]10299456", + restDay: 6 +}, { + id: "002", + orderTitle: "xxx鍖婚櫌涔卞紑鑽柟,鍞崠鍋囪嵂", + orderNo: "鐢礫2]20235691", + restDay: 0 +}, { + id: "003", + orderTitle: "鎴戞兂闂棶杩欏搴楁槸骞插暐鐨�", + orderNo: "鐢礫3]495867322", + restDay: 7 +}, { + id: "004", + orderTitle: "鎴戣涓炬姤鏈濋槼鍖哄ゥ妫叕鍥厭搴�", + orderNo: "鐢礫2]1193849", + restDay: 3 +}, { + id: "005", + orderTitle: "鎴戜粖澶╁悆楗悆鍒颁竴涓煶澶村瓙", + orderNo: "鐢礫4]56782344", + restDay: 9 +}] - //4-7澶� - const tip_green = "rgba(0, 255, 0, 1)" - //1-3澶� - const tip_yellow = "rgba(255, 255, 0, 1)" - //瓒呮湡 - const tip_red = "rgba(255, 0, 0, 1)" +//4-7澶� +const tip_green = "rgba(0, 255, 0, 1)" +//1-3澶� +const tip_yellow = "rgba(255, 255, 0, 1)" +//瓒呮湡 +const tip_red = "rgba(255, 0, 0, 1)" - export default { - name: "IndexTask", - components:{ JEllipsis }, - data() { - return { - loading:false, - textMaxLength:8, - dataSource1:[], - dataSource2:[], - dataSource3:[], - dataSource4:[], - columns: [ - { - title: '', - dataIndex: '', - key:'rowIndex', - width:50, - fixed:'left', - align:"center", - scopedSlots: {customRender: "dayWarnning"} - }, - { - title:'鍓╀綑澶╂暟', - align:"center", - dataIndex: 'restDay', - width:80 - }, - { - title:'宸ュ崟鏍囬', - align:"center", - dataIndex: 'orderTitle', - scopedSlots: {customRender: "ellipsisText"} - }, - { - title:'宸ュ崟缂栧彿', - align:"center", - dataIndex: 'orderNo', - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align:"center", - scopedSlots: { customRender: 'action' } - } - ] - - } - }, - created() { - this.mock(); - }, - mounted(){ - - }, - methods: { - getTipColor(rd){ - let num = rd.restDay - if(num<=0){ - return tip_red - }else if(num>=1 && num<4){ - return tip_yellow - }else if(num>=4){ - return tip_green +export default { + name: "IndexTask", + components: { JEllipsis }, + data() { + return { + loading: false, + textMaxLength: 8, + dataSource1: [], + dataSource2: [], + dataSource3: [], + dataSource4: [], + columns: [ + { + title: '', + dataIndex: '', + key: 'rowIndex', + width: 50, + fixed: 'left', + align: "center", + scopedSlots: { customRender: "dayWarnning" } + }, + { + title: '鍓╀綑澶╂暟', + align: "center", + dataIndex: 'restDay', + width: 80 + }, + { + title: '宸ュ崟鏍囬', + align: "center", + dataIndex: 'orderTitle', + scopedSlots: { customRender: "ellipsisText" } + }, + { + title: '宸ュ崟缂栧彿', + align: "center", + dataIndex: 'orderNo', + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: "center", + scopedSlots: { customRender: 'action' } } - }, - goPage(){ - this.$message.success("璇锋牴鎹叿浣撲笟鍔¤烦杞〉闈�") - //this.$router.push({ path: '/comp/mytask' }) - }, - mock(){ - this.dataSource1=tempSs1 - this.dataSource2=tempSs2 - this.dataSource3=tempSs1 - this.dataSource4=[] - this.ifNullDataSource(this.dataSource4,'.tytable4') - }, - - ifNullDataSource(ds,tb){ - this.$nextTick(()=>{ - if(!ds || ds.length==0){ - var tmp = document.createElement('img'); - tmp.src=noDataPng - tmp.width=300 - let tbclass=`${tb} .ant-table-placeholder` - document.querySelector(tbclass).innerHTML="" - document.querySelector(tbclass).appendChild(tmp) - } - }) - }, - handleData(){ - this.$message.success("鍔炵悊瀹屾垚") - } - - - + ] } + }, + created() { + this.mock(); + }, + mounted() { + + }, + methods: { + getTipColor(rd) { + let num = rd.restDay + if (num <= 0) { + return tip_red + } else if (num >= 1 && num < 4) { + return tip_yellow + } else if (num >= 4) { + return tip_green + } + }, + goPage() { + this.$message.success("璇锋牴鎹叿浣撲笟鍔¤烦杞〉闈�") + //this.$router.push({ path: '/comp/mytask' }) + }, + mock() { + this.dataSource1 = tempSs1 + this.dataSource2 = tempSs2 + this.dataSource3 = tempSs1 + this.dataSource4 = [] + this.ifNullDataSource(this.dataSource4, '.tytable4') + }, + + ifNullDataSource(ds, tb) { + this.$nextTick(() => { + if (!ds || ds.length == 0) { + var tmp = document.createElement('img'); + tmp.src = noDataPng + tmp.width = 300 + let tbclass = `${tb} .ant-table-placeholder` + document.querySelector(tbclass).innerHTML = "" + document.querySelector(tbclass).appendChild(tmp) + } + }) + }, + handleData() { + this.$message.success("鍔炵悊瀹屾垚") + } + + + + } +} </script> <style> - .my-index-table{height:270px} - .my-index-table table{font-size: 14px !important;} +.my-index-table { + height: 270px; +} +.my-index-table table { + font-size: 14px !important; +} - .index-container-ty .ant-card-head-title{padding-top: 6px;padding-bottom: 6px;} - .index-container-ty .ant-card-extra{padding:0} - .index-container-ty .ant-card-extra a{color:#fff} - .index-container-ty .ant-card-extra a:hover{color:#152ede} - .index-container-ty .ant-card-head-wrapper,.index-container-ty .ant-card-head{ - line-height:24px; - min-height:24px; - /*background: #90aeff;*/ - background: #7196fb; - } - .index-container-ty .ant-card-body{padding: 10px 12px 0px 12px} +.index-container-ty .ant-card-head-title { + padding-top: 6px; + padding-bottom: 6px; +} +.index-container-ty .ant-card-extra { + padding: 0; +} +.index-container-ty .ant-card-extra a { + color: #fff; +} +.index-container-ty .ant-card-extra a:hover { + color: #152ede; +} +.index-container-ty .ant-card-head-wrapper, +.index-container-ty .ant-card-head { + line-height: 24px; + min-height: 24px; + /*background: #90aeff;*/ + background: #7196fb; +} +.index-container-ty .ant-card-body { + padding: 10px 12px 0px 12px; +} - /* .index-container-ty .ant-card-actions{background: #fff} +/* .index-container-ty .ant-card-actions{background: #fff} .index-container-ty .ant-card-actions li {margin:2px 0;} .index-container-ty .ant-card-actions > li > span{width: 100%}*/ +.index-container-ty .ant-table-footer { + text-align: right; + padding: 6px 12px 6px 6px; + background: #fff; + border-top: 2px solid #f7f1f1; +} - .index-container-ty .ant-table-footer{text-align: right;padding:6px 12px 6px 6px;background: #fff;border-top: 2px solid #f7f1f1;} +.index-md-title { + postion: relative; + padding-left: 24px; + width: 100%; + color: #fff; + font-size: 21px; + font-family: cursive; +} +.index-md-title img { + position: absolute; + height: 32px; + top: 2px; + left: 14px; +} - .index-md-title{ - postion:relative; - padding-left:24px; - width: 100%; - color: #fff; - font-size: 21px; - font-family: cursive; - } - .index-md-title img{ - position: absolute; - height:32px; - top: 2px; - left:14px; - } - - .index-container-ty .ant-card-body{ - /*border-left:1px solid #90aeff; +.index-container-ty .ant-card-body { + /*border-left:1px solid #90aeff; /*border-right:1px solid #90aeff; border-bottom:1px solid #90aeff;*/ - } +} +.index-container-ty .ant-table-thead > tr > th, +.index-container-ty .ant-table-tbody > tr > td { + border-bottom: 1px solid #90aeff; +} - .index-container-ty .ant-table-thead > tr > th, - .index-container-ty .ant-table-tbody > tr > td{ - border-bottom: 1px solid #90aeff; - } +.index-container-ty + .ant-table-small + > .ant-table-content + > .ant-table-fixed-left + > .ant-table-body-outer + > .ant-table-body-inner + > table + > .ant-table-thead + > tr + > th, +.index-container-ty + .ant-table-small + > .ant-table-content + > .ant-table-fixed-right + > .ant-table-body-outer + > .ant-table-body-inner + > table + > .ant-table-thead + > tr + > th { + border-bottom: 1px solid #90aeff; +} - .index-container-ty .ant-table-small > .ant-table-content > .ant-table-fixed-left > .ant-table-body-outer > .ant-table-body-inner > table > .ant-table-thead > tr > th, - .index-container-ty .ant-table-small > .ant-table-content > .ant-table-fixed-right > .ant-table-body-outer > .ant-table-body-inner > table > .ant-table-thead > tr > th{ - border-bottom: 1px solid #90aeff; - } +.index-container-ty + .ant-table-small + > .ant-table-content + > .ant-table-scroll + > .ant-table-body + > table + > .ant-table-thead + > tr + > th { + border-bottom: 1px solid #90aeff; +} - .index-container-ty .ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-body > table > .ant-table-thead > tr > th{ - border-bottom: 1px solid #90aeff; - } +.index-container-ty .ant-table-small { + border: 1px solid #90aeff; +} - .index-container-ty .ant-table-small{ - border: 1px solid #90aeff; - } - - .index-container-ty .ant-table-placeholder { - padding: 0 - } +.index-container-ty .ant-table-placeholder { + padding: 0; +} </style> \ No newline at end of file diff --git a/src/views/dashboard/Monitor.vue b/src/views/dashboard/Monitor.vue index 144e237..c827145 100644 --- a/src/views/dashboard/Monitor.vue +++ b/src/views/dashboard/Monitor.vue @@ -5,11 +5,10 @@ </template> <script> - export default { - name: "Monitor" - } +export default { + name: "Monitor" +} </script> <style scoped> - </style> \ No newline at end of file diff --git a/src/views/dashboard/Workplace.vue b/src/views/dashboard/Workplace.vue index 57d0a06..243b9f9 100644 --- a/src/views/dashboard/Workplace.vue +++ b/src/views/dashboard/Workplace.vue @@ -7,37 +7,74 @@ <div slot="extra"> <a-row class="more-info"> <a-col :span="8"> - <head-info title="椤圭洰鏁�" content="56" :center="false" :bordered="false"/> + <head-info + title="椤圭洰鏁�" + content="56" + :center="false" + :bordered="false" + /> </a-col> <a-col :span="8"> - <head-info title="鍥㈤槦鎺掑悕" content="8/24" :center="false" :bordered="false"/> + <head-info + title="鍥㈤槦鎺掑悕" + content="8/24" + :center="false" + :bordered="false" + /> </a-col> <a-col :span="8"> - <head-info title="椤圭洰璁块棶" content="2,223" :center="false" /> + <head-info + title="椤圭洰璁块棶" + content="2,223" + :center="false" + /> </a-col> </a-row> </div> <div> <a-row :gutter="24"> - <a-col :xl="16" :lg="24" :md="24" :sm="24" :xs="24"> + <a-col + :xl="16" + :lg="24" + :md="24" + :sm="24" + :xs="24" + > <a-card class="project-list" :loading="loading" style="margin-bottom: 24px;" :bordered="false" title="杩涜涓殑椤圭洰" - :body-style="{ padding: 0 }"> + :body-style="{ padding: 0 }" + > <a slot="extra">鍏ㄩ儴椤圭洰</a> <div> - <a-card-grid class="project-card-grid" :key="i" v-for="(item, i) in projects"> - <a-card :bordered="false" :body-style="{ padding: 0 }"> + <a-card-grid + class="project-card-grid" + :key="i" + v-for="(item, i) in projects" + > + <a-card + :bordered="false" + :body-style="{ padding: 0 }" + > <a-card-meta> - <div slot="title" class="card-title"> - <a-avatar size="small" :src="item.cover"/> + <div + slot="title" + class="card-title" + > + <a-avatar + size="small" + :src="item.cover" + /> <a>{{ item.title }}</a> </div> - <div slot="description" class="card-description"> + <div + slot="description" + class="card-description" + > {{ item.description }} </div> </a-card-meta> @@ -50,11 +87,21 @@ </div> </a-card> - <a-card :loading="loading" title="鍔ㄦ��" :bordered="false"> + <a-card + :loading="loading" + title="鍔ㄦ��" + :bordered="false" + > <a-list> - <a-list-item :key="index" v-for="(item, index) in activities"> + <a-list-item + :key="index" + v-for="(item, index) in activities" + > <a-list-item-meta> - <a-avatar slot="avatar" :src="item.user.avatar" /> + <a-avatar + slot="avatar" + :src="item.user.avatar" + /> <div slot="title"> <span>{{ item.user.nickname }}</span> 鍦� <a href="#">{{ item.project.name }}</a> @@ -73,8 +120,14 @@ :lg="24" :md="24" :sm="24" - :xs="24"> - <a-card title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" style="margin-bottom: 24px" :bordered="false" :body-style="{padding: 0}"> + :xs="24" + > + <a-card + title="蹇�熷紑濮� / 渚挎嵎瀵艰埅" + style="margin-bottom: 24px" + :bordered="false" + :body-style="{padding: 0}" + > <div class="item-group"> <a>鎿嶄綔涓�</a> <a>鎿嶄綔浜�</a> @@ -82,21 +135,43 @@ <a>鎿嶄綔鍥�</a> <a>鎿嶄綔浜�</a> <a>鎿嶄綔鍏�</a> - <a-button size="small" type="primary" ghost icon="plus">娣诲姞</a-button> + <a-button + size="small" + type="primary" + ghost + icon="plus" + >娣诲姞</a-button> </div> </a-card> - <a-card title="XX 鎸囨暟" style="margin-bottom: 24px" :loading="radarLoading" :bordered="false" :body-style="{ padding: 0 }"> + <a-card + title="XX 鎸囨暟" + style="margin-bottom: 24px" + :loading="radarLoading" + :bordered="false" + :body-style="{ padding: 0 }" + > <div style="min-height: 400px;"> <!-- :scale="scale" :axis1Opts="axis1Opts" :axis2Opts="axis2Opts" --> <radar :data="radarData" /> </div> </a-card> - <a-card :loading="loading" title="鍥㈤槦" :bordered="false"> + <a-card + :loading="loading" + title="鍥㈤槦" + :bordered="false" + > <div class="members"> <a-row> - <a-col :span="12" v-for="(item, index) in teams" :key="index"> + <a-col + :span="12" + v-for="(item, index) in teams" + :key="index" + > <a> - <a-avatar size="small" :src="item.avatar" /> + <a-avatar + size="small" + :src="item.avatar" + /> <span class="member">{{ item.name }}</span> </a> </a-col> @@ -110,251 +185,247 @@ </template> <script> - import { timeFix } from "@/utils/util" - import {mapGetters} from "vuex" +import { timeFix } from "@/utils/util" +import { mapGetters } from "vuex" - import PageLayout from '@/components/page/PageLayout' - import HeadInfo from '@/components/tools/HeadInfo' - import Radar from '@/components/chart/Radar' - import { getRoleList, getServiceList, getFileAccessHttpUrl } from "@/api/manage" +import PageLayout from '@/components/page/PageLayout' +import HeadInfo from '@/components/tools/HeadInfo' +import Radar from '@/components/chart/Radar' +import { getRoleList, getServiceList, getFileAccessHttpUrl } from "@/api/manage" - const DataSet = require('@antv/data-set') +const DataSet = require('@antv/data-set') - export default { - name: "Workplace", - components: { - PageLayout, - HeadInfo, - Radar - }, - data() { - return { - timeFix: timeFix(), - avatar: '', - user: {}, +export default { + name: "Workplace", + components: { + PageLayout, + HeadInfo, + Radar + }, + data() { + return { + timeFix: timeFix(), + avatar: '', + user: {}, - projects: [], - loading: true, - radarLoading: true, - activities: [], - teams: [], + projects: [], + loading: true, + radarLoading: true, + activities: [], + teams: [], - // data - axis1Opts: { - dataKey: 'item', - line: null, - tickLine: null, - grid: { - lineStyle: { - lineDash: null - }, - hideFirstLine: false + // data + axis1Opts: { + dataKey: 'item', + line: null, + tickLine: null, + grid: { + lineStyle: { + lineDash: null + }, + hideFirstLine: false + } + }, + axis2Opts: { + dataKey: 'score', + line: null, + tickLine: null, + grid: { + type: 'polygon', + lineStyle: { + lineDash: null } - }, - axis2Opts: { - dataKey: 'score', - line: null, - tickLine: null, - grid: { - type: 'polygon', - lineStyle: { - lineDash: null - } - } - }, - scale: [{ - dataKey: 'score', - min: 0, - max: 80 - }], - axisData: [ - { item: '寮曠敤', a: 70, b: 30, c: 40 }, - { item: '鍙g', a: 60, b: 70, c: 40 }, - { item: '浜ч噺', a: 50, b: 60, c: 40 }, - { item: '璐$尞', a: 40, b: 50, c: 40 }, - { item: '鐑害', a: 60, b: 70, c: 40 }, - { item: '寮曠敤', a: 70, b: 50, c: 40 } - ], - radarData: [] - } - }, - computed: { - userInfo() { - return this.$store.getters.userInfo - } - }, - created() { - this.user = this.userInfo - this.avatar = getFileAccessHttpUrl(this.userInfo.avatar) - console.log('this.avatar :'+ this.avatar) - - getRoleList().then(res => { - console.log('workplace -> call getRoleList()', res) - }) - - getServiceList().then(res => { - console.log('workplace -> call getServiceList()', res) - }) - }, - mounted() { - this.getProjects() - this.getActivity() - this.getTeams() - this.initRadar() - }, - methods: { - ...mapGetters(["nickname", "welcome"]), - getProjects() { - this.$http.get('/mock/api/list/search/projects') - .then(res => { - this.projects = res.result && res.result.data - this.loading = false - }) + } }, - getActivity() { - this.$http.get('/mock/api/workplace/activity') - .then(res => { - this.activities = res.result - }) - }, - getTeams() { - this.$http.get('/mock/api/workplace/teams') - .then(res => { - this.teams = res.result - }) - }, - initRadar() { - this.radarLoading = true + scale: [{ + dataKey: 'score', + min: 0, + max: 80 + }], + axisData: [ + { item: '寮曠敤', a: 70, b: 30, c: 40 }, + { item: '鍙g', a: 60, b: 70, c: 40 }, + { item: '浜ч噺', a: 50, b: 60, c: 40 }, + { item: '璐$尞', a: 40, b: 50, c: 40 }, + { item: '鐑害', a: 60, b: 70, c: 40 }, + { item: '寮曠敤', a: 70, b: 50, c: 40 } + ], + radarData: [] + } + }, + computed: { + userInfo() { + return this.$store.getters.userInfo + } + }, + created() { + this.user = this.userInfo + this.avatar = getFileAccessHttpUrl(this.userInfo.avatar) + console.log('this.avatar :' + this.avatar) - this.$http.get('/mock/api/workplace/radar') - .then(res => { + getRoleList().then(res => { + console.log('workplace -> call getRoleList()', res) + }) - const dv = new DataSet.View().source(res.result) - dv.transform({ - type: 'fold', - fields: ['涓汉', '鍥㈤槦', '閮ㄩ棬'], - key: 'user', - value: 'score' - }) + getServiceList().then(res => { + console.log('workplace -> call getServiceList()', res) + }) + }, + mounted() { + this.getProjects() + this.getActivity() + this.getTeams() + this.initRadar() + }, + methods: { + ...mapGetters(["nickname", "welcome"]), + getProjects() { + this.$http.get('/mock/api/list/search/projects') + .then(res => { + this.projects = res.result && res.result.data + this.loading = false + }) + }, + getActivity() { + this.$http.get('/mock/api/workplace/activity') + .then(res => { + this.activities = res.result + }) + }, + getTeams() { + this.$http.get('/mock/api/workplace/teams') + .then(res => { + this.teams = res.result + }) + }, + initRadar() { + this.radarLoading = true - this.radarData = dv.rows - this.radarLoading = false + this.$http.get('/mock/api/workplace/radar') + .then(res => { + + const dv = new DataSet.View().source(res.result) + dv.transform({ + type: 'fold', + fields: ['涓汉', '鍥㈤槦', '閮ㄩ棬'], + key: 'user', + value: 'score' }) - } + + this.radarData = dv.rows + this.radarLoading = false + }) } } +} </script> <style lang="less" scoped> - .project-list { - - .card-title { - font-size: 0; - - a { - color: rgba(0, 0, 0, 0.85); - margin-left: 12px; - line-height: 24px; - height: 24px; - display: inline-block; - vertical-align: top; - font-size: 14px; - - &:hover { - color: #1890ff; - } - } - } - .card-description { - color: rgba(0, 0, 0, 0.45); - height: 44px; - line-height: 22px; - overflow: hidden; - } - .project-item { - display: flex; - margin-top: 8px; - overflow: hidden; - font-size: 12px; - height: 20px; - line-height: 20px; - a { - color: rgba(0, 0, 0, 0.45); - display: inline-block; - flex: 1 1 0; - - &:hover { - color: #1890ff; - } - } - .datetime { - color: rgba(0, 0, 0, 0.25); - flex: 0 0 auto; - float: right; - } - } - .ant-card-meta-description { - color: rgba(0, 0, 0, 0.45); - height: 44px; - line-height: 22px; - overflow: hidden; - } - } - - .item-group { - padding: 20px 0 8px 24px; +.project-list { + .card-title { font-size: 0; - a { - color: rgba(0, 0, 0, 0.65); - display: inline-block; - font-size: 14px; - margin-bottom: 13px; - width: 25%; - } - } - .members { a { - display: block; - margin: 12px 0; + color: rgba(0, 0, 0, 0.85); + margin-left: 12px; line-height: 24px; height: 24px; - .member { - font-size: 14px; - color: rgba(0, 0, 0, .65); - line-height: 24px; - max-width: 100px; - vertical-align: top; - margin-left: 12px; - transition: all 0.3s; - display: inline-block; - } + display: inline-block; + vertical-align: top; + font-size: 14px; + &:hover { - span { - color: #1890ff; - } + color: #1890ff; } } } + .card-description { + color: rgba(0, 0, 0, 0.45); + height: 44px; + line-height: 22px; + overflow: hidden; + } + .project-item { + display: flex; + margin-top: 8px; + overflow: hidden; + font-size: 12px; + height: 20px; + line-height: 20px; + a { + color: rgba(0, 0, 0, 0.45); + display: inline-block; + flex: 1 1 0; - .mobile { - - .project-list { - - .project-card-grid { - width: 100%; + &:hover { + color: #1890ff; } } - - .more-info { - border: 0; - padding-top: 16px; - margin: 16px 0 16px; + .datetime { + color: rgba(0, 0, 0, 0.25); + flex: 0 0 auto; + float: right; } + } + .ant-card-meta-description { + color: rgba(0, 0, 0, 0.45); + height: 44px; + line-height: 22px; + overflow: hidden; + } +} - .headerContent .title .welcome-text { - display: none; +.item-group { + padding: 20px 0 8px 24px; + font-size: 0; + a { + color: rgba(0, 0, 0, 0.65); + display: inline-block; + font-size: 14px; + margin-bottom: 13px; + width: 25%; + } +} + +.members { + a { + display: block; + margin: 12px 0; + line-height: 24px; + height: 24px; + .member { + font-size: 14px; + color: rgba(0, 0, 0, 0.65); + line-height: 24px; + max-width: 100px; + vertical-align: top; + margin-left: 12px; + transition: all 0.3s; + display: inline-block; + } + &:hover { + span { + color: #1890ff; + } + } + } +} + +.mobile { + .project-list { + .project-card-grid { + width: 100%; } } + .more-info { + border: 0; + padding-top: 16px; + margin: 16px 0 16px; + } + + .headerContent .title .welcome-text { + display: none; + } +} </style> \ No newline at end of file -- Gitblit v1.9.3