<template>
	<scroll-view>
		<view class="overview content">
			<view class="part">
				<view class="card" v-for="(item,index) in cardList" :key="index" :style="{'background-color':item.color}">
					<view>
						<image :src="item.icon" mode="scaleToFill"></image>
					</view>
					<view>
						<view>{{item.text}}</view>
						<view style="margin-top: 20rpx;font-size: 50rpx;font-weight:600">{{item.value}} 件</view>
					</view>
				</view>
			</view>
			<view class="other">
				<button type="primary" @click="link1">住建一张图</button>
				<button type="primary" @click="link2">数据分析平台</button>
			</view>
		</view>
		<scroll-view class="tableList content">
			<myTable :column="column" :tableData="tableData"></myTable>
		</scroll-view>
	</scroll-view>
</template>

<script setup>
	import {ref} from "vue"
	
	const cardList = ref([
		{
			icon: "../../static/digitalIcon/u1.svg",
			text: "党建工作",
			color: "#cfe8f5",
			value: 0
		},
		{
			icon: "../../static/digitalIcon/u2.svg",
			text: "公文办理",
			color: "#cfe8f5",
			value: 5
		},
		{
			icon: "../../static/digitalIcon/u3.svg",
			text: "业务办理",
			color: "#cfe8f5",
			value: 0
		},
		{
			icon: "../../static/digitalIcon/u4.svg",
			text: "数字住建",
			color: "#ffeccf",
			value: 0
		},
		{
			icon: "../../static/digitalIcon/u5.svg",
			text: "政务管理",
			color: "#eae9f7",
			value: 1
		},
		{
			icon: "../../static/digitalIcon/u6.svg",
			text: "监察督办",
			color: "#eae9f7",
			value: 0
		}
	])
	const column = ref(["紧急程度", "公文种类", "标题", "操作"])
	const tableData = ref([
		{
			"date": "紧急",
			"name": "Dcloud1",
			"address": "上海市普陀区金沙江路 1518 弄"
		}, {
			"date": "紧急",
			"name": "Dcloud2",
			"address": "上海市普陀区金沙江路 1517 弄"
		}, {
			"date": "紧急",
			"name": "Dcloud3",
			"address": "上海市普陀区金沙江路 1519 弄"
		}, {
			"date": "紧急",
			"name": "Dcloud4",
			"address": "上海市普陀区金沙江路 1516 弄"
		}
	])

	const subList = ref([
		{
			name: '待发货',
			num: 10
		}, 
		{
			name: '待付款'
		}
	])
	function link1() {
		console.log(123)
	}
	function link2() {
		console.log(4562)
	}
	

	
</script>

<style lang="scss" scoped>	
	body{
		background-color: #0063d0;
	}
	.content{
		margin: 50rpx;
		background-color: #fff;
		border-radius: 20rpx;
		width: calc(100vw - 100rpx);
	}
	.overview{
		height: 600rpx;
		padding: 30rpx;
		.part{
			display: flex;
			flex-direction: row;
			justify-content: center;
			.card{
				width: calc((100vw - 100rpx)/6.5);
				margin: 10rpx;
				height: 300rpx;
				border-radius: 10rpx;
				display: flex;
				flex-direction: row;
				justify-content: center;
				align-items: center;
				>view:nth-child(1){
					width: 150rpx;
					height: 150rpx;
					border-radius: 20rpx;
					background-color: #91d2f6;
					margin-right: 40rpx;
					display: flex;
					justify-content: center;
					align-items: center;
					image{
						width: 75rpx;
						height: 75rpx;
					}
				}
			}
		}
		.other{
			display: flex;
			flex-direction: row;
			justify-content: space-around;
			margin-top: 50rpx;
			button{
				width: 45vw;
				height: 120rpx;
				display: flex;
				justify-content: center;
				align-items: center;
			}
		}
	}
	.tableList{
		padding: 50rpx 0;
		height: calc(100vh - 950rpx);
		margin-top: 0;
	}
</style>
