| | |
| | | </el-col>
|
| | | <el-col :span="6">
|
| | | <div class="stat-card">
|
| | | <div class="title fs--14 color-grey-6">处理进度</div>
|
| | | <div class="title fs--14 color-grey-6">处置率</div>
|
| | | <div class="value fs--20 color1 mt--10">
|
| | | {{ progress }}%
|
| | | </div>
|
| | |
| | | let arr = [{ name: '全部' }]
|
| | | this.options = [...arr, ...res];
|
| | | });
|
| | | const query = this.$route.query;
|
| | | if (query && Object.keys(query).length > 0) {
|
| | | if (query.name) {
|
| | | this.activeName = query.name;
|
| | | }
|
| | | }
|
| | | },
|
| | | methods: {
|
| | | closeDrawer() {
|
| | |
| | | <!-- 预警情况统计 --> |
| | | <div class="warnCount"> |
| | | <div class="title ">预警情况统计</div> |
| | | <div class="countChart" id="countChart"></div> |
| | | <div class="noData" v-if="countList.length == 0"> |
| | | <el-table v-if="tableData.length" :data="tableData" border stripe style="width: 100%"> |
| | | <el-table-column prop="operate_type" label="车辆类型"> |
| | | <template #default="{ row }"> |
| | | <span class="operate_type" @click="toWarningList(row.operate_type)">{{ row.operate_type }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="total" label="预警总数"></el-table-column> |
| | | <el-table-column prop="processed" label="已处理数"></el-table-column> |
| | | <el-table-column prop="unprocessed" label="未处理数"></el-table-column> |
| | | <el-table-column prop="rate" label="处置率"></el-table-column> |
| | | </el-table> |
| | | <!-- <div class="countChart" id="countChart"></div> --> |
| | | <div class="noData" v-else> |
| | | <el-empty description="暂无数据" :image-size="80"></el-empty> |
| | | </div> |
| | | </div> |
| | |
| | | getRealVideo, |
| | | playDetection, |
| | | closeRealVideo, |
| | | getAllWarnGroupVehicleType |
| | | } from "./service"; |
| | | export default { |
| | | data() { |
| | |
| | | serverPort: "", //监控端口 |
| | | carId: "", //监控车辆 |
| | | urlLink: '',//视频地址 |
| | | tableData: [], //预警情况统计数据 |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | this.getCarStatusData(); |
| | | // this.getMapCarData(); // 移除这里的调用,因为 initMap 中会调用 |
| | | this.getWarnListData(); |
| | | this.getWarnGroupData(); |
| | | // this.getWarnGroupData(); |
| | | this.getWarnTop10Data(); |
| | | this.getVehicleType(); |
| | | |
| | | this.initMap(); |
| | | if (this.timer) { |
| | |
| | | this.getCarStatusData(); |
| | | this.getMapCarData(); // 保留定时器中的调用 |
| | | this.getWarnListData(); |
| | | this.getWarnGroupData(); |
| | | // this.getWarnGroupData(); |
| | | this.getWarnTop10Data(); |
| | | this.getVehicleType(); |
| | | }, 60000); |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | next(); |
| | | }, |
| | | methods: { |
| | | toWarningList(name) { |
| | | this.$router.push({ |
| | | path: "/early-warning", |
| | | query: { name }, |
| | | }); |
| | | }, |
| | | getVehicleType() { |
| | | getAllWarnGroupVehicleType().then(res => { |
| | | this.tableData = res; |
| | | }) |
| | | }, |
| | | toCarManage(id) { |
| | | this.$router.push({ |
| | | path: "/car-manage", |
| | |
| | | } |
| | | }, |
| | | // 获取预警统计情况数据 |
| | | async getWarnGroupData() { |
| | | try { |
| | | const res = await getWarnGroupCount(); |
| | | this.countList = res; |
| | | this.getCountList(); |
| | | } catch (error) { |
| | | this.$message.error("获取预警统计情况数据失败"); |
| | | } |
| | | }, |
| | | // async getWarnGroupData() { |
| | | // try { |
| | | // const res = await getWarnGroupCount(); |
| | | // this.countList = res; |
| | | // this.getCountList(); |
| | | // } catch (error) { |
| | | // this.$message.error("获取预警统计情况数据失败"); |
| | | // } |
| | | // }, |
| | | // 获取预警排行数据 |
| | | async getWarnTop10Data() { |
| | | try { |
| | |
| | | } |
| | | }, |
| | | // 获取预警情况统计 |
| | | getCountList() { |
| | | echarts.dispose(document.getElementById("countChart")); |
| | | if (this.countList.length > 0) { |
| | | this.chartTnit(); |
| | | } |
| | | }, |
| | | chartTnit() { |
| | | // 基于准备好的dom,初始化echarts实例 |
| | | const myChart = echarts.init(document.getElementById("countChart")); |
| | | // 绘制数量图表 |
| | | myChart.setOption({ |
| | | tooltip: { |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: "shadow", |
| | | }, |
| | | }, |
| | | grid: { |
| | | width: "auto", |
| | | height: "auto", |
| | | top: "5%", |
| | | left: "3%", |
| | | right: "4%", |
| | | bottom: "0%", |
| | | containLabel: true, |
| | | }, |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: this.countList.map((item) => item.warnType), |
| | | axisTick: { |
| | | alignWithLabel: true, |
| | | lineStyle: { |
| | | color: "#777777", |
| | | }, |
| | | }, |
| | | axisLabel: { |
| | | color: "rgba(0, 0, 0, 0.45)", |
| | | interval: 0, // 强制显示所有标签 |
| | | width: 60, // 设置标签宽度 |
| | | height: 20, // 设置标签高度 |
| | | overflow: 'truncate', // 截断模式 |
| | | ellipsis: true, // 超出显示省略号 |
| | | rotate: -40, // 可以根据需要调整角度 |
| | | formatter: function (value) { |
| | | if (value.length > 4) { |
| | | return value.substring(0, 4) + '...'; |
| | | } |
| | | return value; |
| | | } |
| | | }, |
| | | }, |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | type: "value", |
| | | }, |
| | | ], |
| | | series: [ |
| | | { |
| | | type: "bar", |
| | | barWidth: "20px", |
| | | itemStyle: { |
| | | borderRadius: [20, 20, 20, 20], |
| | | color: (params) => { |
| | | return [ |
| | | "#5B8FF9", |
| | | "#5AD8A6", |
| | | "#F6BD16", |
| | | "#6DC8EC", |
| | | "#945FB9", |
| | | "rgba(248, 204, 65, 0.5)", |
| | | "rgba(2, 179, 118, 0.5)", |
| | | "rgba(254, 41, 94, 0.5)", |
| | | "rgba(255, 102, 39, 0.5)", |
| | | "rgba(169, 14, 253, 0.5)", |
| | | "rgba(109, 200, 236, 0.5)", |
| | | ][params.dataIndex]; |
| | | }, |
| | | }, |
| | | data: this.countList.map((item) => item.num), |
| | | }, |
| | | ], |
| | | }); |
| | | myChart.resize(); |
| | | }, |
| | | // getCountList() { |
| | | // echarts.dispose(document.getElementById("countChart")); |
| | | // if (this.countList.length > 0) { |
| | | // this.chartTnit(); |
| | | // } |
| | | // }, |
| | | // chartTnit() { |
| | | // // 基于准备好的dom,初始化echarts实例 |
| | | // const myChart = echarts.init(document.getElementById("countChart")); |
| | | // // 绘制数量图表 |
| | | // myChart.setOption({ |
| | | // tooltip: { |
| | | // trigger: "axis", |
| | | // axisPointer: { |
| | | // type: "shadow", |
| | | // }, |
| | | // }, |
| | | // grid: { |
| | | // width: "auto", |
| | | // height: "auto", |
| | | // top: "5%", |
| | | // left: "3%", |
| | | // right: "4%", |
| | | // bottom: "0%", |
| | | // containLabel: true, |
| | | // }, |
| | | // xAxis: [ |
| | | // { |
| | | // type: "category", |
| | | // data: this.countList.map((item) => item.warnType), |
| | | // axisTick: { |
| | | // alignWithLabel: true, |
| | | // lineStyle: { |
| | | // color: "#777777", |
| | | // }, |
| | | // }, |
| | | // axisLabel: { |
| | | // color: "rgba(0, 0, 0, 0.45)", |
| | | // interval: 0, // 强制显示所有标签 |
| | | // width: 60, // 设置标签宽度 |
| | | // height: 20, // 设置标签高度 |
| | | // overflow: 'truncate', // 截断模式 |
| | | // ellipsis: true, // 超出显示省略号 |
| | | // rotate: -40, // 可以根据需要调整角度 |
| | | // formatter: function (value) { |
| | | // if (value.length > 4) { |
| | | // return value.substring(0, 4) + '...'; |
| | | // } |
| | | // return value; |
| | | // } |
| | | // }, |
| | | // }, |
| | | // ], |
| | | // yAxis: [ |
| | | // { |
| | | // type: "value", |
| | | // }, |
| | | // ], |
| | | // series: [ |
| | | // { |
| | | // type: "bar", |
| | | // barWidth: "20px", |
| | | // itemStyle: { |
| | | // borderRadius: [20, 20, 20, 20], |
| | | // color: (params) => { |
| | | // return [ |
| | | // "#5B8FF9", |
| | | // "#5AD8A6", |
| | | // "#F6BD16", |
| | | // "#6DC8EC", |
| | | // "#945FB9", |
| | | // "rgba(248, 204, 65, 0.5)", |
| | | // "rgba(2, 179, 118, 0.5)", |
| | | // "rgba(254, 41, 94, 0.5)", |
| | | // "rgba(255, 102, 39, 0.5)", |
| | | // "rgba(169, 14, 253, 0.5)", |
| | | // "rgba(109, 200, 236, 0.5)", |
| | | // ][params.dataIndex]; |
| | | // }, |
| | | // }, |
| | | // data: this.countList.map((item) => item.num), |
| | | // }, |
| | | // ], |
| | | // }); |
| | | // myChart.resize(); |
| | | // }, |
| | | |
| | | // 跳转车辆详情 |
| | | toCarDetail(id) { |
| | |
| | | |
| | | .carCount { |
| | | flex: 8; |
| | | background: #ffffff; |
| | | background: #f4f4ff; |
| | | box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); |
| | | border-radius: 10px; |
| | | padding: 14px 20px 20px 20px; |
| | |
| | | margin-top: 11px; |
| | | |
| | | .countCard { |
| | | background: #ffffff; |
| | | margin-right: 20px; |
| | | padding: 14px 60px 18px 24px; |
| | | } |
| | |
| | | justify-content: space-between; |
| | | |
| | | .countCard { |
| | | background: #ffffff; |
| | | margin-right: 15px; |
| | | } |
| | | |
| | |
| | | |
| | | .carStatus { |
| | | flex: 5; |
| | | background: #ffffff; |
| | | background: #f4f4ff; |
| | | box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); |
| | | border-radius: 10px; |
| | | padding: 14px 84px 20px 84px; |
| | |
| | | flex: 1; |
| | | height: calc(100% - 20px); |
| | | margin: 20px 17px 0 20px; |
| | | background: #ffffff; |
| | | background: #f4f4ff; |
| | | box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); |
| | | border-radius: 10px 10px 0px 0px; |
| | | padding: 20px; |
| | |
| | | .companyCard { |
| | | width: 140px; |
| | | // height: 90px; |
| | | background: #f4f4ff; |
| | | background: #fff; |
| | | border-radius: 0px 10px 10px 0px; |
| | | position: relative; |
| | | |
| | |
| | | } |
| | | |
| | | .warnCount { |
| | | position: relative; |
| | | // position: relative; |
| | | |
| | | #countChart { |
| | | width: 100%; |
| | |
| | | flex-direction: column; |
| | | align-content: center; |
| | | justify-content: center; |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | // position: absolute; |
| | | // bottom: 0; |
| | | // left: 0; |
| | | width: 100%; |
| | | height: 180px; |
| | | } |
| | |
| | | position: relative; |
| | | |
| | | .rankChart { |
| | | padding: 5px; |
| | | width: 100%; |
| | | background: #fff; |
| | | // height: 300px; |
| | | |
| | | .rankItem { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .operate_type { |
| | | color: #1677ff; |
| | | cursor: pointer; |
| | | |
| | | &:hover { |
| | | color: #0052d9; |
| | | } |
| | | |
| | | text-decoration: underline; |
| | | } |
| | | </style> |
| | |
| | | // 通知后端开始关闭视频流 |
| | | export const closeRealVideo = (id) => { |
| | | return axios.get(`/system/car/closeRealVideo/${id}`) |
| | | } |
| | | |
| | | // 预警情况统计 |
| | | export const getAllWarnGroupVehicleType = (id) => { |
| | | return axios.get(`/system/warn/getAllWarnGroupVehicleType`) |
| | | } |
| | |
| | | <template> |
| | | <div> |
| | | <el-card> |
| | | <el-form :inline="true" class="demo-form-inline"> |
| | | <div class="form flex a-center j-between mt--23"> |
| | | <el-form :inline="true" class="demo-form-inline ml--30"> |
| | | <el-form-item label="角色名称"> |
| | | <el-input v-model="roleName" placeholder="请输入角色名称"></el-input> |
| | | </el-form-item> |
| | |
| | | <el-button type="primary" @click="onSubmit">查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | <el-card style="margin-top: 20px;"> |
| | | <div class="add_btn"> |
| | | <el-button v-permission="24" icon="el-icon-plus" @click="add" type="primary">添加角色</el-button> |
| | | </div> |
| | | <el-table ref="tableSort" v-loading="listLoading" stripe :data="data" |
| | | :element-loading-text="elementLoadingText"> |
| | | </div> |
| | | <div class="table-box-btn mt--23 ml--30"> |
| | | <el-button v-permission="24" icon="el-icon-plus" @click="add" type="primary">添加角色</el-button> |
| | | </div> |
| | | <div class="table-box ml--30 mt--23 mr--30"> |
| | | <el-table ref="tableSort" v-loading="listLoading" stripe :data="data" :element-loading-text="elementLoadingText"> |
| | | <el-table-column type="index" width="55" label="序号"></el-table-column> |
| | | <el-table-column prop="roleName" label="角色名称"></el-table-column> |
| | | <el-table-column prop="remark" label="备注"></el-table-column> |
| | |
| | | <div> |
| | | <el-button v-permission="27" type="text" |
| | | @click="$router.push(`/systemManage/role-detail?roleId=${row.roleId}`)">详情</el-button> |
| | | <el-button v-if="row.roleId != 1" v-permission="25" type="text" @click="$router.push(`/systemManage/add-role?roleId=${row.roleId}`)">编辑</el-button> |
| | | <el-button v-if="row.roleId != 1" v-permission="25" type="text" |
| | | @click="$router.push(`/systemManage/add-role?roleId=${row.roleId}`)">编辑</el-button> |
| | | <el-button v-if="row.roleId != 1" v-permission="26" type="text" @click="del(row)">删除</el-button> |
| | | </div> |
| | | </template> |
| | |
| | | <span>共{{ pagination.total }}条</span> |
| | | </el-pagination> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <ShowDelConfirm :show="delShow" @close="delShow = false" @confirm="delConfirm" /> |
| | | </div> |
| | | </template> |