123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567 |
- <template>
- <div class="main-data data-unit-access">
- <!-- <div class="title-area">各单位的接入情况</div> -->
- <div class="content-area">
- <div class="content-title">
- <span class="title">工程现场监控接入情况</span>
- </div>
- <div class="content">
- <div class="table-cont">
- <div class="table-top">
- <div class="fir">接入单位名称</div>
- <div class="snd">已接入项目数量</div>
- <div class="thd">已接入摄像头数量</div>
- </div>
- <div class="table-bot">
- <div class="table-list" v-for="(item,index) in monitorList" :key="index" @click="choose">
- <div class="said"></div>
- <div class="fir">{{item.name}}</div>
- <div class="snd">{{item.num}}</div>
- <div class="thd color">{{item.onLineNum}}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import BarChart from "@/components/Echarts/BarChart";
- import LineChart from "@/components/Echarts/LineChart.vue";
- import echarts from "echarts";
- import { getProjectCameraNumList } from '@/api/screen/service'
- export default {
- name: "UnitAccessTo",
- components: {
- LineChart,
- BarChart,
- },
- props:{
- appOrg: {
- type: String,
- default: "0000",
- },
- },
- watch:{
- appOrg(newVal, oldVal){
- // this.handleDataList();
- // this.handleUnitDataList();
- // this.handleCurrentArea();
- // this.handleOnlineData();
- }
- },
- data() {
- return {
- show: true,
- barData: [],
- barAxis: {},
- barYAxis: {},
- barGrid: {
- top: 30,
- left: "3%",
- right: "6%",
- containLabel: true,
- bottom: 0,
- },
- dataList: [
- {
- name: "接入单位数量",
- num: "56",
- unit: "个",
- },
- {
- name: "应接入项目数量",
- num: "56",
- unit: "个",
- },
- {
- name: "已接入项目数量",
- num: "56",
- unit: "个",
- },
- {
- name: "已接入摄像头数量",
- num: "56",
- unit: "个",
- },
- {
- name: "已接入摄像头在线数量",
- num: "56",
- unit: "个",
- },
- {
- name: "已接入摄像头在线率",
- num: "56",
- unit: "%",
- },
- ],
- lineData: [],
- lineAxis: {},
- lineYAxis: {
- name: "历史摄像头在线率",
- nameTextStyle: {
- color: "#fff",
- padding: [0, 0, 0, 30],
- },
- axisLabel: {
- color: "#FFF",
- },
- splitLine: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitArea: false,
- },
- onlineData: [],
- onlineAxis: {},
- onlineYAxis: {
- name: "历史摄像头数(个)",
- nameTextStyle: {
- color: "#fff",
- fontSize: 14,
- padding: [0,0,0,35]
- },
- axisLabel: {
- color: "#FFF",
- },
- splitLine: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- splitArea: false,
- },
- monitorList: [],
- unitDataList: [],
- };
- },
- created() {
- this.handleDataList();
- this.handleUnitDataList();
- this.handleCurrentArea();
- this.handleOnlineData();
- this.getProjectCameraNumList()
- },
- destroyed() {},
- beforeDestroy() {},
- mounted() {},
- methods: {
- getProjectCameraNumList(){
- getProjectCameraNumList(this.$props.appOrg).then((res) => {
- if (Number(res.code) === 200) {
- this.monitorList = res.data;
- this.monitorList.forEach((item, index) => {
- item.name = item.unitName;
- item.num = item.projectNum;
- item.onLineNum = item.cameraNum;
- });
- }
- });
- },
- choose(){
- this.$emit('chooseUnit')
- },
- handleDataList() {
- this.dataList = [];
- setTimeout(()=>{
- this.dataList = [
- {
- name: "接入单位数量",
- num: "56",
- unit: "个",
- },
- {
- name: "应接入项目数量",
- num: "56",
- unit: "个",
- },
- {
- name: "已接入项目数量",
- num: "56",
- unit: "个",
- },
- {
- name: "已接入摄像头数量",
- num: "56",
- unit: "个",
- },
- {
- name: "已接入摄像头在线数量",
- num: "56",
- unit: "个",
- },
- {
- name: "已接入摄像头在线率",
- num: "56",
- unit: "%",
- },
- ];
- },100)
- },
- //初始化
- handleUnitDataList() {
- let unitDataList = [];
- unitDataList.push({
- name: "国网山西省电力公司",
- num: 56,
- onLineNum: 46
- });
- unitDataList.push({
- name: "国网太原供电公司",
- num: 10,
- onLineNum: 8
- });
- unitDataList.push({
- name: "国网运城供电公司",
- num: 8,
- onLineNum: 4
- });
- unitDataList.push({
- name: "国网临汾供电公司",
- num: 7,
- onLineNum: 6
- });
- unitDataList.push({
- name: "国网晋城供电公司",
- num: 6,
- onLineNum: 6
- });
- unitDataList.push({
- name: "国网吕梁供电公司",
- num: 4,
- onLineNum: 3
- });
- unitDataList.push({
- name: "国网大同供电公司",
- num: 4,
- onLineNum: 3
- });
- this.unitDataList = unitDataList;
- },
- handleCurrentArea() {
- (this.lineData = [
- {
- name: "",
- type: "line",
- areaStyle: {
- opacity: 0.8,
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0.03,
- color: "rgba(30, 240, 215, 0.4196)",
- },
- {
- offset: 0.68,
- color: "rgba(23, 240, 240, 0)",
- },
- ]),
- },
- lineStyle: {
- width: 2, // 设置线宽
- color: "#00FFFF", // 设置线的颜色
- },
- smooth: true,
- data: [40, 60, 80, 50],
- },
- ]),
- (this.lineAxis = {
- type: "category",
- data: ["0-6", "6-12", "12-18", "18-24"],
- axisLabel: {
- color: "white", // 设置横坐标轴字体颜色为红色
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: "#465A64",
- },
- },
- boundaryGap: false,
- });
- },
- handleOnlineData() {
- (this.onlineData = [
- {
- name: "",
- type: "line",
- areaStyle: {
- opacity: 0.8,
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- {
- offset: 0.03,
- color: "rgba(30, 240, 215, 0.4196)",
- },
- {
- offset: 0.68,
- color: "rgba(23, 240, 240, 0)",
- },
- ]),
- },
- lineStyle: {
- width: 2, // 设置线宽
- color: "#00FFFF", // 设置线的颜色
- },
- smooth: true,
- data: [40, 60, 80, 50],
- },
- ]),
- (this.onlineAxis = {
- type: "category",
- data: ["0-6", "6-12", "12-18", "18-24"],
- axisLabel: {
- color: "white", // 设置横坐标轴字体颜色为红色
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- lineStyle: {
- color: "#465A64",
- },
- },
- boundaryGap: false,
- });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .content-title {
- width: 100%;
- height: 26px;
- background: url("../../../assets/images/main/title_pro_long.png") no-repeat;
- background-size: 100% 100%;
- font-family: "PingFangSC";
- font-size: 16px;
- font-weight: bold;
- color: #00ffff;
- padding-left: 15px;
- .title {
- display: block;
- position: relative;
- top:-5px;
- }
- }
- .data-unit-access {
- height: 100%;
- overflow: hidden;
- .content-area {
- display: flex;
- flex-direction: column;
- padding: 15px 20px 0 15px;
- }
- .said{
- width: 1px;
- height: 13px;
- background-color: #00FFFF;
- }
- .content {
- width: 100%;
- margin-top: 20px;
- display: flex;
- flex-direction: column;
- .title-format {
- display: flex;
- flex-direction: row;
- align-items: center;
- img {
- width: 6px;
- height: 24px;
- margin-right: 6px;
- }
- .title-info {
- display: flex;
- flex-direction: column;
- font-size: 14px;
- color: #ffffff;
- .title-en {
- font-size: 8px;
- color: #ffffff;
- opacity: 0.4;
- }
- }
- }
- .total-data {
- display: flex;
- align-items: baseline;
- color: #19fcde;
- margin-top: 4px;
- .total {
- font-size: 35px;
- font-family: "electronicFont";
- }
- .unit {
- font-size: 12px;
- }
- }
- data-detail{
- align-items: center;
- }
- .data-list {
- display: flex;
- width: 100%;
- .data-item {
- display: flex;
- flex-direction: column;
- justify-content: center;
- width: 50%;
- margin-bottom: 11px;
- .data-detail {
- display: flex;
- flex-direction: row;
- align-items: center;
- color: #00ffff;
- margin-top: 11px;
- font-size: 12px;
- .data {
- font-size: 30px;
- font-family: "electronicFont";
- }
- }
- }
- .data-item:nth-child(3n) {
- margin-right: 0;
- }
- }
- .rate-area {
- position: relative;
- margin-left: 35px;
- img {
- width: 168px;
- height: 97px;
- }
- .rate {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 100%;
- position: absolute;
- top: 0;
- left: -10px;
- color: #fff;
- .rate-data {
- display: flex;
- flex-direction: row;
- align-items: baseline;
- color: #ffba44;
- .data {
- font-size: 30px;
- font-family: "electronicFont";
- }
- .unit {
- font-size: 12px;
- }
- }
- .desc {
- font-size: 12px;
- text-align: center;
- }
- }
- }
- .chart-area{
- margin-top: 50px;
- }
- }
- .iaco{
- width: 58px;
- height:56px ;
- margin-left: 45px;
- margin-right: 5px;
- }
- .table-cont{
- width:100%;
- .table-top{
- width:100%;
- height: 26px;
- background: url("../../../assets/images/building_guarantee/img_11.png") no-repeat;
- background-size: 100% 100%;
- padding:0 25px 0 10px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size:14px;
- color:#00FFFF;
- }
- .table-bot{
- width:100%;
- .table-list{
- width:100%;
- height:30px;
- margin-top: 3px;
- padding:5px 25px 0 10px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size:14px;
- color:#FFFFFF;
- font-weight: 500;
- }
- .table-list:hover{
- cursor: pointer;
- }
- }
- .fir{
- width:40%;
- text-align: left;
- margin-left: 5px;
- }
- .snd{
- width:30%;
- text-align: left;
- }
- .thd{
- width:30%;
- text-align: left;
- }
- }
- ::-webkit-scrollbar {
- display: none;
- width: 3px;
- height: 3px;
- }
- ::-webkit-scrollbar-thumb {
- //滑块部分
- // border-radius: 5px;
- background-color: #58cbbb;
- }
- ::-webkit-scrollbar-track {
- //轨道部分
- // box-shadow: inset 0 0 5px #ddd;
- background: #ddd;
- // border-radius: 5px;
- }
- }
- </style>
|