| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554 | 
							- <!-- 数据看板-危化品 -->
 
- <template>
 
- 	<view class="hazardSources">
 
- 		<view class="statistics">
 
- 			<view class="statistics-t">
 
- 				<view class="statistics-t-l">危化品总数:</view>
 
- 				<view class="statistics-t-r">1455 </view>
 
- 			</view>
 
- 			<view class="statistics-b">
 
- 				<view class="statistics-b-li">
 
- 					<view class="statistics-b-li-t color-A">1769 kg</view>
 
- 					<view class="statistics-b-li-b">总量</view>
 
- 				</view>
 
- 				<view class="line"></view>
 
- 				<view class="statistics-b-li">
 
- 					<view class="statistics-b-li-t color-B">14 </view>
 
- 					<view class="statistics-b-li-b">今日新增数</view>
 
- 				</view>
 
- 				<view class="line"></view>
 
- 				<view class="statistics-b-li">
 
- 					<view class="statistics-b-li-t color-C">115.3 kg</view>
 
- 					<view class="statistics-b-li-b">今日新增量</view>
 
- 				</view>
 
- 			</view>
 
- 		</view>
 
- 		<view class="small-title">
 
- 			<view class="small-title-l">危化品存量排行TOP5</view>
 
- 			<img class="small-title-r" src="@/pages/images/icon_wdwg_gd.png">
 
- 		</view>
 
- 		<view class="chart">
 
- 			<view class="chart-t">
 
- 				<qiun-data-charts type="funnel" :opts="opts" :echartsH5="true" :chartData="chartData" />
 
- 			</view>
 
- 			<view class="chart-b" v-for="(item,index) in dataList" :key="index">
 
- 				<view :class="index==0?'chartOne':(index==1?'chartTow':(index==2?'chartThree':'chartFive'))">
 
- 					{{index+1}}
 
- 				</view>
 
- 				<view>{{item.data1}}</view>
 
- 				<view>总数{{item.data2}}</view>
 
- 				<view>|</view>
 
- 				<view>今日新增{{item.data3}}</view>
 
- 				<img src="@/pages/images/dataBoard/dataBoard-icon2.png">
 
- 			</view>
 
- 		</view>
 
- 		<view class="table">
 
- 			<view class="table-border">
 
- 				<view class="table-th">
 
- 					<view class="table-th-li">
 
- 						<view>排行</view>
 
- 						<view>学院单位</view>
 
- 						<view>总数</view>
 
- 						<view>总量</view>
 
- 						<view>今日新增</view>
 
- 					</view>
 
- 				</view>
 
- 				<view class="table-tb">
 
- 					<view class="table-tb-li" v-for="(item,index) in dataList" :key="index">
 
- 						<view>
 
- 							<text :class="index==0?'sortOne':(index==1?'sortTow':(index==2?'sortThree':'sortFive'))">{{index+1}}</text>
 
- 						</view>
 
- 						<view>{{item.data1}}</view>
 
- 						<view>{{item.data2}}</view>
 
- 						<view>{{item.data3}}</view>
 
- 						<view>{{item.data4}}</view>
 
- 					</view>
 
- 				</view>
 
- 			</view>
 
- 		</view>
 
- 	</view>
 
- </template>
 
- <script>
 
- 	import {
 
- 		config
 
- 	} from '@/api/request/config.js'
 
- 	import {
 
- 	} from '@/pages_basics/api/index.js'
 
- 	export default {
 
- 		name: "hazardSources",
 
- 		components: {
 
- 		},
 
- 		data() {
 
- 			return {
 
- 				opts: {
 
- 					color: ['#FF0000','#D40000','#FF5900','#FF9900','#FF9900'],
 
- 					legend:{
 
- 						show:false,
 
- 					},
 
- 					padding: [15, 15, 6, 15],
 
- 					enableScroll: false,
 
- 					extra: {
 
- 						funnel: {
 
- 							type: 'triangle',
 
- 							border: false,
 
- 							labelAlign: "right",
 
- 						}
 
- 					}
 
- 				},
 
- 				chartData: {},
 
- 				// 查询参数
 
- 				queryParams: {
 
- 					page: 1,
 
- 					pageSize: 10,
 
- 				},
 
- 				dataList: [{
 
- 						data1: '植物保护',
 
- 						data2: '499',
 
- 						data3: '47',
 
- 						data4: '220',
 
- 						data5: '137',
 
- 					},
 
- 					{
 
- 						data1: '资源环境',
 
- 						data2: '199',
 
- 						data3: '7',
 
- 						data4: '120',
 
- 						data5: '37',
 
- 					},
 
- 					{
 
- 						data1: '生命科学',
 
- 						data2: '299',
 
- 						data3: '71',
 
- 						data4: '10',
 
- 						data5: '37',
 
- 					},
 
- 					{
 
- 						data1: '资源环境',
 
- 						data2: '199',
 
- 						data3: '7',
 
- 						data4: '120',
 
- 						data5: '37',
 
- 					},
 
- 					{
 
- 						data1: '生命科学',
 
- 						data2: '299',
 
- 						data3: '71',
 
- 						data4: '10',
 
- 						data5: '37',
 
- 					},
 
- 				],
 
- 				total: 0,
 
- 			}
 
- 		},
 
- 		created() {
 
- 		},
 
- 		beforeMount() {
 
- 		},
 
- 		mounted() {
 
- 			this.getServerData();
 
- 		},
 
- 		methods: {
 
- 			dateClick(index) {
 
- 				this.dateIndex = index;
 
- 			},
 
- 			getServerData() {
 
- 				//模拟从服务器获取数据时的延时
 
- 				setTimeout(() => {
 
- 					//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
 
- 					let res = {
 
- 						series: [{
 
- 							data: [{
 
- 								"name": "植物保护",
 
- 								"centerText": "50",
 
- 								"value": 50,
 
- 								"labelText":"总量88.88kg",
 
- 							}, {
 
- 								"name": "园林艺术",
 
- 								"centerText": "30",
 
- 								"value": 30,
 
- 								"labelText":"总量88.88kg"
 
- 							}, {
 
- 								"name": "生命科学",
 
- 								"centerText": "20",
 
- 								"value": 20,
 
- 								"labelText":"总量88.88kg"
 
- 							}, {
 
- 								"name": "理学院",
 
- 								"centerText": "18",
 
- 								"value": 18,
 
- 								"labelText":"总量88.88kg"
 
- 							}, {
 
- 								"name": "农学院",
 
- 								"centerText": "8",
 
- 								"value": 8,
 
- 								"labelText":"总量88.88kg"
 
- 							}]
 
- 						}]
 
- 					};
 
- 					this.chartData = JSON.parse(JSON.stringify(res));
 
- 				}, 500);
 
- 			},
 
- 		},
 
- 	}
 
- </script>
 
- <style lang="stylus" scoped>
 
- 	.hazardSources {
 
- 		height: 100%;
 
- 		width: 100%;
 
- 		background: #363744;
 
- 		padding: 20rpx 30rpx 0;
 
- 		box-sizing: border-box;
 
- 		.small-title {
 
- 			display: flex;
 
- 			justify-content: space-between;
 
- 			align-items: center;
 
- 			.small-title-l {
 
- 				font-weight: 400;
 
- 				font-size: 32rpx;
 
- 				color: #FFFFFF;
 
- 				line-height: 45rpx;
 
- 				text-align: left;
 
- 				margin: 28rpx 0;
 
- 			}
 
- 			.small-title-r {
 
- 				width: 15rpx;
 
- 				height: 18rpx;
 
- 			}
 
- 		}
 
- 		.chart {
 
- 			width: 690rpx;
 
- 			height: 850rpx;
 
- 			background: #3E414F;
 
- 			border-radius: 20rpx 20rpx 20rpx 20rpx;
 
- 			padding: 24rpx 20rpx 0;
 
- 			box-sizing: border-box;
 
- 			.chart-t {
 
- 				width: 650rpx;
 
- 				height: 452rpx;
 
- 			}
 
- 			.chart-b {
 
- 				padding: 0 30rpx;
 
- 				box-sizing: border-box;
 
- 				display: flex;
 
- 				justify-content: flex-start;
 
- 				align-items: center;
 
- 				height: 40rpx;
 
- 				margin-bottom: 36rpx;
 
- 				>view {
 
- 					overflow: hidden;
 
- 					text-overflow: ellipsis;
 
- 					white-space: nowrap;
 
- 				}
 
- 				>view:nth-of-type(1) {
 
- 					width: 32rpx;
 
- 					height: 32rpx;
 
- 					font-weight: 400;
 
- 					font-size: 28rpx;
 
- 					line-height: 32rpx;
 
- 					text-align: center;
 
- 					margin-right: 18rpx;
 
- 				}
 
- 				>view:nth-of-type(2) {
 
- 					width: 246rpx;
 
- 					font-weight: 400;
 
- 					font-size: 28rpx;
 
- 					color: #FFFFFF;
 
- 					line-height: 39rpx;
 
- 				}
 
- 				>view:nth-of-type(3) {
 
- 					width: 132rpx;
 
- 					font-weight: 400;
 
- 					font-size: 28rpx;
 
- 					color: #FFFFFF;
 
- 					line-height: 39rpx;
 
- 				}
 
- 				>view:nth-of-type(4) {
 
- 					width: 2rpx;
 
- 					height: 20rpx;
 
- 					background: #D8D8D8;
 
- 					margin-right: 22rpx;
 
- 				}
 
- 				>view:nth-of-type(5) {
 
- 					width: 154rpx;
 
- 					font-weight: 400;
 
- 					font-size: 28rpx;
 
- 					color: #FFFFFF;
 
- 					line-height: 39rpx;
 
- 				}
 
- 				>img {
 
- 					width: 22rpx;
 
- 					height: 28rpx;
 
- 				}
 
- 			}
 
- 			.chartOne{
 
- 				background: rgba(255, 0, 0, 0.2);
 
- 				color: #FF0000;
 
- 			}
 
- 			.chartTow{
 
- 				background: #FFE3CC;
 
- 				color: #FF9900;
 
- 			}
 
- 			.chartThree{
 
- 				background: #FFEECC;
 
- 				color: #FFAA00;
 
- 			}
 
- 			.chartFive{
 
- 				background: #CCE6FE;
 
- 				color: #0183FA;
 
- 			}
 
- 		}
 
- 		.statistics {
 
- 			width: 690rpx;
 
- 			height: 241rpx;
 
- 			background: #3E414F;
 
- 			border-radius: 20rpx 20rpx 20rpx 20rpx;
 
- 			margin-top: 20rpx;
 
- 			.statistics-t {
 
- 				height: 100rpx;
 
- 				display: flex;
 
- 				justify-content: space-between;
 
- 				align-items: center;
 
- 				border-bottom: 1rpx solid #52545F;
 
- 				padding: 0 42rpx 0 38rpx;
 
- 				box-sizing: border-box;
 
- 				.statistics-t-l {
 
- 					font-weight: 400;
 
- 					font-size: 32rpx;
 
- 					color: #FFFFFF;
 
- 					line-height: 45rpx;
 
- 				}
 
- 				.statistics-t-r {
 
- 					font-weight: 400;
 
- 					font-size: 36rpx;
 
- 					color: #FFFFFF;
 
- 					line-height: 50rpx;
 
- 				}
 
- 			}
 
- 			.statistics-b {
 
- 				display: flex;
 
- 				justify-content: space-between;
 
- 				align-items: center;
 
- 				.statistics-b-li {
 
- 					flex: 1;
 
- 					text-align: center;
 
- 					.statistics-b-li-t {
 
- 						font-weight: 400;
 
- 						font-size: 36rpx;
 
- 						line-height: 50rpx;
 
- 						margin-top: 28rpx;
 
- 					}
 
- 					.statistics-b-li-b {
 
- 						font-weight: 400;
 
- 						font-size: 28rpx;
 
- 						color: #FFFFFF;
 
- 						line-height: 39rpx;
 
- 						margin-top: 9rpx;
 
- 					}
 
- 				}
 
- 				.line {
 
- 					width: 2rpx;
 
- 					height: 30rpx;
 
- 					background: #D8D8D8;
 
- 				}
 
- 				.color-A {
 
- 					color: #FF8C00;
 
- 				}
 
- 				.color-B {
 
- 					color: #26C736;
 
- 				}
 
- 				.color-C {
 
- 					color: #FF0000;
 
- 				}
 
- 			}
 
- 		}
 
- 		.table {
 
- 			width: 720rpx;
 
- 			margin-top: 20rpx;
 
- 			.table-border {
 
- 				overflow: auto;
 
- 			}
 
- 			.table-th {
 
- 				width: 860rpx;
 
- 				height: 80rpx;
 
- 				background: rgba(162, 162, 162, 0.2);
 
- 				border-radius: 20rpx 20rpx 0rpx 0rpx;
 
- 				padding: 0 30rpx;
 
- 				box-sizing: border-box;
 
- 				.table-th-li {
 
- 					height: 80rpx;
 
- 					display: flex;
 
- 					justify-content: flex-start;
 
- 					>view {
 
- 						font-weight: 400;
 
- 						font-size: 30rpx;
 
- 						color: #FFFFFF;
 
- 						line-height: 80rpx;
 
- 						text-align: center;
 
- 						margin-right: 38rpx;
 
- 						width: 120rpx;
 
- 						overflow: hidden;
 
- 						text-overflow: ellipsis;
 
- 						white-space: nowrap;
 
- 					}
 
- 					>view:nth-of-type(1) {
 
- 						width: 64rpx;
 
- 					}
 
- 					>view:nth-of-type(2) {
 
- 						width: 168rpx;
 
- 					}
 
- 					>view:last-child {
 
- 						margin-right: 0;
 
- 						width: 168rpx;
 
- 					}
 
- 				}
 
- 			}
 
- 			.table-tb {
 
- 				width: 860rpx;
 
- 				border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
 
- 				background: #3E414F;
 
- 				padding: 0 30rpx;
 
- 				box-sizing: border-box;
 
- 				.table-tb-li {
 
- 					height: 80rpx;
 
- 					border-bottom: 1rpx dashed rgba(216, 216, 216, 0.2);
 
- 					display: flex;
 
- 					justify-content: flex-start;
 
- 					>view {
 
- 						font-weight: 400;
 
- 						font-size: 28rpx;
 
- 						color: #FFFFFF;
 
- 						line-height: 80rpx;
 
- 						text-align: center;
 
- 						margin-right: 38rpx;
 
- 						width: 120rpx;
 
- 						overflow: hidden;
 
- 						text-overflow: ellipsis;
 
- 						white-space: nowrap;
 
- 					}
 
- 					>view:nth-of-type(1) {
 
- 						width: 64rpx;
 
- 					}
 
- 					>view:nth-of-type(2) {
 
- 						width: 168rpx;
 
- 					}
 
- 					>view:last-child {
 
- 						margin-right: 0;
 
- 						width: 168rpx;
 
- 					}
 
- 				}
 
- 				.sortOne {
 
- 					display: inline-block;
 
- 					width: 40rpx;
 
- 					height: 40rpx;
 
- 					padding: 4rpx;
 
- 					box-sizing: border-box;
 
- 					background: rgba(255, 0, 0, 0.2);
 
- 					font-weight: 400;
 
- 					font-size: 28rpx;
 
- 					color: #FF0000;
 
- 					line-height: 40rpx;
 
- 					text-align: center;
 
- 					border-radius: 20rpx;
 
- 				}
 
- 				
 
- 				.sortTow {
 
- 					display: inline-block;
 
- 					width: 40rpx;
 
- 					height: 40rpx;
 
- 					padding: 4rpx;
 
- 					box-sizing: border-box;
 
- 					background: rgba(255, 153, 0, 0.2);
 
- 					font-weight: 400;
 
- 					font-size: 28rpx;
 
- 					color: #FF9900;
 
- 					line-height: 40rpx;
 
- 					text-align: center;
 
- 					border-radius: 20rpx;
 
- 				}
 
- 				
 
- 				.sortThree {
 
- 					display: inline-block;
 
- 					width: 40rpx;
 
- 					height: 40rpx;
 
- 					padding: 4rpx;
 
- 					box-sizing: border-box;
 
- 					background: rgba(255, 242, 0, 0.2);
 
- 					font-weight: 400;
 
- 					font-size: 28rpx;
 
- 					color: #FFF200;
 
- 					line-height: 40rpx;
 
- 					text-align: center;
 
- 					border-radius: 20rpx;
 
- 				}
 
- 				
 
- 				.sortFive {
 
- 					display: inline-block;
 
- 					width: 40rpx;
 
- 					height: 40rpx;
 
- 					padding: 4rpx;
 
- 					box-sizing: border-box;
 
- 					background: rgba(1, 131, 250, 0.2);
 
- 					font-weight: 400;
 
- 					font-size: 28rpx;
 
- 					color: #0183FA;
 
- 					line-height: 40rpx;
 
- 					text-align: center;
 
- 					border-radius: 20rpx;
 
- 				}
 
- 			}
 
- 		}
 
- 	}
 
- </style>
 
 
  |