Commit 0b181fee authored by 王晓倩's avatar 王晓倩

首页数据接口及路由

parent 17621578
...@@ -8,13 +8,15 @@ import com.zehong.common.utils.file.FileUploadUtils; ...@@ -8,13 +8,15 @@ import com.zehong.common.utils.file.FileUploadUtils;
import com.zehong.common.utils.file.FileUtils; import com.zehong.common.utils.file.FileUtils;
import com.zehong.framework.config.ServerConfig; import com.zehong.framework.config.ServerConfig;
import com.zehong.system.domain.THiddenDangerStandingBook; import com.zehong.system.domain.THiddenDangerStandingBook;
import com.zehong.system.domain.TSafeEquipmentStandingBook;
import com.zehong.system.domain.TTroubleStandingBook; import com.zehong.system.domain.TTroubleStandingBook;
import com.zehong.system.domain.TVideoManager;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm; import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import com.zehong.system.domain.form.TTroubleStandingBookForm; import com.zehong.system.domain.form.TTroubleStandingBookForm;
import com.zehong.system.domain.vo.HomepageVo;
import com.zehong.system.domain.vo.THiddenDangerStandingBookVo; import com.zehong.system.domain.vo.THiddenDangerStandingBookVo;
import com.zehong.system.domain.vo.TTroubleStandingBookVo; import com.zehong.system.domain.vo.TTroubleStandingBookVo;
import com.zehong.system.service.ITHiddenDangerStandingBookService; import com.zehong.system.service.*;
import com.zehong.system.service.ITTroubleStandingBookService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -41,10 +43,18 @@ public class StatisticController ...@@ -41,10 +43,18 @@ public class StatisticController
{ {
private static final Logger log = LoggerFactory.getLogger(StatisticController.class); private static final Logger log = LoggerFactory.getLogger(StatisticController.class);
@Autowired
private ITVideoManagerService tVideoManagerService;
@Autowired
private ITSafeEquipmentStandingBookService tSafeEquipmentStandingBookService;
@Autowired @Autowired
private ITTroubleStandingBookService tTroubleStandingBookService; private ITTroubleStandingBookService tTroubleStandingBookService;
@Autowired @Autowired
private ITHiddenDangerStandingBookService tHiddenDangerStandingBookService; private ITHiddenDangerStandingBookService tHiddenDangerStandingBookService;
@Autowired
private ITComplainDealService tComplainDealService;
@Autowired
private ITWorkOrderService tWorkOrderService;
/** /**
* 燃气事故台账统计 * 燃气事故台账统计
...@@ -64,4 +74,28 @@ public class StatisticController ...@@ -64,4 +74,28 @@ public class StatisticController
return AjaxResult.success(tHiddenDangerStandingBookService.selectTHiddenDangerStandingBookStatistic()); return AjaxResult.success(tHiddenDangerStandingBookService.selectTHiddenDangerStandingBookStatistic());
} }
/**
* 首页统计
*/
@GetMapping("/homepageStatistic")
public AjaxResult homepageStatistic()
{
HomepageVo homepageVo = new HomepageVo();
homepageVo = tComplainDealService.countTComplainDeal();
homepageVo = tWorkOrderService.countTWorkOrder();
List<TVideoManager> tVideoManagerList = tVideoManagerService.selectTVideoManagerList(null);
List<TSafeEquipmentStandingBook> tSafeEquipmentStandingBookList = tSafeEquipmentStandingBookService.selectTSafeEquipmentStandingBookList(null);
List<TTroubleStandingBook> tTroubleStandingBookList = tTroubleStandingBookService.selectTTroubleStandingBookList(null);
List<THiddenDangerStandingBook> tHiddenDangerStandingBookList = tHiddenDangerStandingBookService.selectTHiddenDangerStandingBookList(null);
homepageVo.setVideoTotal(tVideoManagerList.size());
homepageVo.setEquipmentTotal(tSafeEquipmentStandingBookList.size());
homepageVo.setTroubleTotal(tTroubleStandingBookList.size());
homepageVo.setHiddenTotal(tHiddenDangerStandingBookList.size());
return AjaxResult.success(homepageVo);
}
} }
package com.zehong.system.domain.vo;
import lombok.Data;
@Data
public class HomepageVo
{
// 任务总数
private int taskTotal;
// 任务反馈总数
private int taskFeedbackTotal;
// 投诉总数
private int complaintTotal;
// 投诉反馈总数
private int complaintFeedbackTotal;
// 视频监控总数
private int videoTotal;
// 安全装置总数
private int equipmentTotal;
// 事故总数
private int troubleTotal;
// 隐患总数
private int hiddenTotal;
}
...@@ -5,6 +5,7 @@ import java.util.Map; ...@@ -5,6 +5,7 @@ import java.util.Map;
import java.util.Objects; import java.util.Objects;
import com.zehong.system.domain.TComplainDeal; import com.zehong.system.domain.TComplainDeal;
import com.zehong.system.domain.vo.HomepageVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
/** /**
...@@ -31,6 +32,13 @@ public interface TComplainDealMapper ...@@ -31,6 +32,13 @@ public interface TComplainDealMapper
*/ */
public List<TComplainDeal> selectTComplainDealList(TComplainDeal tComplainDeal); public List<TComplainDeal> selectTComplainDealList(TComplainDeal tComplainDeal);
/**
* 投诉处置统计
*
* @return 投诉处置统计
*/
public HomepageVo countTComplainDeal();
/** /**
* 新增投诉处置 * 新增投诉处置
* *
......
...@@ -2,6 +2,7 @@ package com.zehong.system.mapper; ...@@ -2,6 +2,7 @@ package com.zehong.system.mapper;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TWorkOrder; import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.vo.HomepageVo;
/** /**
* 燃气任务Mapper接口 * 燃气任务Mapper接口
...@@ -27,6 +28,13 @@ public interface TWorkOrderMapper ...@@ -27,6 +28,13 @@ public interface TWorkOrderMapper
*/ */
public List<TWorkOrder> selectTWorkOrderList(TWorkOrder tWorkOrder); public List<TWorkOrder> selectTWorkOrderList(TWorkOrder tWorkOrder);
/**
* 燃气任务统计
*
* @return 燃气任务统计
*/
public HomepageVo countTWorkOrder();
/** /**
* 新增燃气任务 * 新增燃气任务
* *
......
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.zehong.system.domain.TComplainDeal; import com.zehong.system.domain.TComplainDeal;
import com.zehong.system.domain.vo.HomepageVo;
/** /**
* 投诉处置Service接口 * 投诉处置Service接口
...@@ -29,6 +30,13 @@ public interface ITComplainDealService ...@@ -29,6 +30,13 @@ public interface ITComplainDealService
*/ */
public List<TComplainDeal> selectTComplainDealList(TComplainDeal tComplainDeal); public List<TComplainDeal> selectTComplainDealList(TComplainDeal tComplainDeal);
/**
* 投诉处置统计
*
* @return 投诉处置统计
*/
public HomepageVo countTComplainDeal();
/** /**
* 新增投诉处置 * 新增投诉处置
* *
......
...@@ -2,6 +2,7 @@ package com.zehong.system.service; ...@@ -2,6 +2,7 @@ package com.zehong.system.service;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TWorkOrder; import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.vo.HomepageVo;
/** /**
* 燃气任务Service接口 * 燃气任务Service接口
...@@ -27,6 +28,13 @@ public interface ITWorkOrderService ...@@ -27,6 +28,13 @@ public interface ITWorkOrderService
*/ */
public List<TWorkOrder> selectTWorkOrderList(TWorkOrder tWorkOrder); public List<TWorkOrder> selectTWorkOrderList(TWorkOrder tWorkOrder);
/**
* 燃气任务统计
*
* @return 燃气任务统计
*/
public HomepageVo countTWorkOrder();
/** /**
* 新增燃气任务 * 新增燃气任务
* *
......
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.vo.HomepageVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TComplainDealMapper; import com.zehong.system.mapper.TComplainDealMapper;
...@@ -46,6 +47,16 @@ public class TComplainDealServiceImpl implements ITComplainDealService ...@@ -46,6 +47,16 @@ public class TComplainDealServiceImpl implements ITComplainDealService
return tComplainDealMapper.selectTComplainDealList(tComplainDeal); return tComplainDealMapper.selectTComplainDealList(tComplainDeal);
} }
/**
* 投诉处置统计
*
* @return 投诉处置统计
*/
public HomepageVo countTComplainDeal()
{
return tComplainDealMapper.countTComplainDeal();
}
/** /**
* 新增投诉处置 * 新增投诉处置
* *
......
...@@ -5,6 +5,7 @@ import com.zehong.common.utils.SecurityUtils; ...@@ -5,6 +5,7 @@ import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils; import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TEnterpriseInfo; import com.zehong.system.domain.TEnterpriseInfo;
import com.zehong.system.domain.TWorkOrder; import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.vo.HomepageVo;
import com.zehong.system.mapper.TEnterpriseInfoMapper; import com.zehong.system.mapper.TEnterpriseInfoMapper;
import com.zehong.system.mapper.TWorkOrderMapper; import com.zehong.system.mapper.TWorkOrderMapper;
import com.zehong.system.service.ITWorkOrderService; import com.zehong.system.service.ITWorkOrderService;
...@@ -52,6 +53,16 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -52,6 +53,16 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
return tWorkOrderMapper.selectTWorkOrderList(tWorkOrder); return tWorkOrderMapper.selectTWorkOrderList(tWorkOrder);
} }
/**
* 燃气任务统计
*
* @return 燃气任务统计
*/
public HomepageVo countTWorkOrder()
{
return tWorkOrderMapper.countTWorkOrder();
}
/** /**
* 新增燃气任务 * 新增燃气任务
* *
......
...@@ -45,12 +45,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -45,12 +45,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where> </where>
ORDER BY create_time DESC
</select> </select>
<select id="selectTComplainDealById" parameterType="Long" resultMap="TComplainDealResult"> <select id="selectTComplainDealById" parameterType="Long" resultMap="TComplainDealResult">
<include refid="selectTComplainDealVo"/> <include refid="selectTComplainDealVo"/>
where complain_deal_id = #{complainDealId} where complain_deal_id = #{complainDealId}
</select> </select>
<select id="countTComplainDeal" resultType="HomepageVo">
select COUNT(t.complain_deal_id) AS complaintTotal,
SUM(CASE t.complain_status WHEN '2' THEN 1 ELSE 0 END) AS complaintFeedbackTotal
from (select * from t_complain_deal where is_del = '0') t
</select>
<insert id="insertTComplainDeal" parameterType="TComplainDeal" useGeneratedKeys="true" keyProperty="complainDealId"> <insert id="insertTComplainDeal" parameterType="TComplainDeal" useGeneratedKeys="true" keyProperty="complainDealId">
insert into t_complain_deal insert into t_complain_deal
......
...@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTVideoManagerList" parameterType="TVideoManager" resultMap="TVideoManagerResult"> <select id="selectTVideoManagerList" parameterType="TVideoManager" resultMap="TVideoManagerResult">
<include refid="selectTVideoManagerVo"/> <include refid="selectTVideoManagerVo"/>
<where> <where> is_del = '0'
<if test="videoName != null and videoName != ''"> and video_name like concat('%', #{videoName}, '%')</if> <if test="videoName != null and videoName != ''"> and video_name like concat('%', #{videoName}, '%')</if>
<if test="resourceId != null and resourceId != ''"> and resource_id = #{resourceId}</if> <if test="resourceId != null and resourceId != ''"> and resource_id = #{resourceId}</if>
<if test="longitude != null "> and longitude = #{longitude}</if> <if test="longitude != null "> and longitude = #{longitude}</if>
...@@ -37,7 +37,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -37,7 +37,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="type != null and type != ''"> and type = #{type}</if> <if test="type != null and type != ''"> and type = #{type}</if>
<if test="beyondEnterpriseId != null "> and beyond_enterprise_id = #{beyondEnterpriseId}</if> <if test="beyondEnterpriseId != null "> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="beyondEnterpriseName != null and beyondEnterpriseName != ''"> and beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')</if> <if test="beyondEnterpriseName != null and beyondEnterpriseName != ''"> and beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where> </where>
</select> </select>
......
...@@ -100,6 +100,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -100,6 +100,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTWorkOrderVo"/> <include refid="selectTWorkOrderVo"/>
where workOrder.work_id = #{workId} where workOrder.work_id = #{workId}
</select> </select>
<select id="countTWorkOrder" resultType="HomepageVo">
select COUNT(t.work_id) AS taskTotal,
SUM(CASE t.work_status WHEN '2' THEN 1 ELSE 0 END) AS taskFeedbackTotal
from (select * from t_work_order where is_del = '0') t
</select>
<insert id="insertTWorkOrder" parameterType="TWorkOrder" useGeneratedKeys="true" keyProperty="workId"> <insert id="insertTWorkOrder" parameterType="TWorkOrder" useGeneratedKeys="true" keyProperty="workId">
insert into t_work_order insert into t_work_order
......
import request from '@/utils/request' import request from '@/utils/request'
// 燃气事故台账统计 // 燃气事故台账统计
export function troubleStatistic(query) { export function troubleStatistic() {
return request({ return request({
url: '/statistic/troubleStatistic', url: '/statistic/troubleStatistic',
method: 'get', method: 'get'
params: query
}) })
} }
// 隐患整治台账统计 // 隐患整治台账统计
export function hiddenStatistic(query) { export function hiddenStatistic() {
return request({ return request({
url: '/statistic/hiddenStatistic', url: '/statistic/hiddenStatistic',
method: 'get', method: 'get'
params: query })
}
// 隐患整治台账统计
export function homepageStatistic() {
return request({
url: '/statistic/homepageStatistic',
method: 'get'
}) })
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<img src="../assets/taskDistribution.png" width="15%" style="margin-top: 2.5rem;"> <img src="../assets/taskDistribution.png" width="15%" style="margin-top: 2.5rem;">
<p>任务下发</p> <p>任务下发</p>
</div> </div>
<div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">0</div> <div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">{{totalObj.taskTotal}}</div>
</el-card> </el-card>
</div> </div>
<div class="div-col1"> <div class="div-col1">
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<img src="../assets/taskFeedback.png" width="15%" style="margin-top: 2.5rem;"> <img src="../assets/taskFeedback.png" width="15%" style="margin-top: 2.5rem;">
<p>任务反馈</p> <p>任务反馈</p>
</div> </div>
<div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">0</div> <div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">{{totalObj.taskFeedbackTotal}}</div>
</el-card> </el-card>
</div> </div>
<div class="div-col1"> <div class="div-col1">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<img src="../assets/complaint.png" width="15%" style="margin-top: 2.5rem;"> <img src="../assets/complaint.png" width="15%" style="margin-top: 2.5rem;">
<p>投诉处置</p> <p>投诉处置</p>
</div> </div>
<div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">0</div> <div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">{{totalObj.complaintTotal}}</div>
</el-card> </el-card>
</div> </div>
<div class="div-col1"> <div class="div-col1">
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<img src="../assets/complaintFeedback.png" width="15%" style="margin-top: 2.5rem;"> <img src="../assets/complaintFeedback.png" width="15%" style="margin-top: 2.5rem;">
<p>投诉反馈</p> <p>投诉反馈</p>
</div> </div>
<div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">0</div> <div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">{{totalObj.complaintFeedbackTotal}}</div>
</el-card> </el-card>
</div> </div>
</div> </div>
...@@ -46,16 +46,16 @@ ...@@ -46,16 +46,16 @@
<img src="../assets/video.png" width="15%" style="margin-top: 2.5rem;"> <img src="../assets/video.png" width="15%" style="margin-top: 2.5rem;">
<p>视频监控</p> <p>视频监控</p>
</div> </div>
<div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">0</div> <div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">{{totalObj.videoTotal}}</div>
</el-card> </el-card>
</div> </div>
<div class="div-col1"> <div class="div-col1">
<el-card> <el-card>
<div style="width: 50%;height: 100%; text-align: center;float: left;font-size: 15px;"> <div style="width: 50%;height: 100%; text-align: center;float: left;font-size: 15px;">
<img src="../assets/detector.png" width="15%" style="margin-top: 2.5rem;"> <img src="../assets/equipment.png" width="15%" style="margin-top: 2.5rem;">
<p>安全装置</p> <p>安全装置</p>
</div> </div>
<div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">0</div> <div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">{{totalObj.equipmentTotal}}</div>
</el-card> </el-card>
</div> </div>
<div class="div-col1"> <div class="div-col1">
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<img src="../assets/trouble.png" width="15%" style="margin-top: 2.5rem;"> <img src="../assets/trouble.png" width="15%" style="margin-top: 2.5rem;">
<p>燃气事故</p> <p>燃气事故</p>
</div> </div>
<div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">0</div> <div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">{{totalObj.troubleTotal}}</div>
</el-card> </el-card>
</div> </div>
<div class="div-col1"> <div class="div-col1">
...@@ -73,55 +73,55 @@ ...@@ -73,55 +73,55 @@
<img src="../assets/hidden.png" width="15%" style="margin-top: 2.5rem;"> <img src="../assets/hidden.png" width="15%" style="margin-top: 2.5rem;">
<p>隐患整治</p> <p>隐患整治</p>
</div> </div>
<div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">0</div> <div style="width: 50%;height: 100%;text-align: center;line-height: 8rem;float: right;font-size: 2.5rem;font-family: 'UnidreamLED';">{{totalObj.hiddenTotal}}</div>
</el-card> </el-card>
</div> </div>
</div> </div>
<div clss="div-row"> <div clss="div-row">
<div class="div-col2"> <div class="div-col2" @click="$router.push('/operationMonitor/monitorData')">
<el-card> <el-card>
<img src="../assets/dataMonitor.png" width="20%"/> <img src="../assets/dataMonitor.png" width="20%"/>
<p>数据监控</p> <p>数据监控</p>
</el-card> </el-card>
</div> </div>
<div class="div-col2"> <div class="div-col2" @click="$router.push('/emergency/eventInfo')">
<el-card> <el-card>
<img src="../assets/emergency.png" width="20%"/> <img src="../assets/emergency.png" width="20%"/>
<p>应急处置</p> <p>应急处置</p>
</el-card> </el-card>
</div> </div>
<div class="div-col2"> <div class="div-col2" @click="$router.push('/regulation/regulation')">
<el-card> <el-card>
<img src="../assets/enterprise.png" width="20%"/> <img src="../assets/enterprise.png" width="20%"/>
<p>燃气企业</p> <p>燃气企业</p>
</el-card> </el-card>
</div> </div>
<div class="div-col2"> <div class="div-col2" @click="$router.push('/regulation/gasuser')">
<el-card> <el-card>
<img src="../assets/user.png" width="20%"/> <img src="../assets/user.png" width="20%"/>
<p>燃气用户</p> <p>燃气用户</p>
</el-card> </el-card>
</div> </div>
<div class="div-col2"> <div class="div-col2" @click="$router.push('/regulation/station')">
<el-card> <el-card>
<img src="../assets/station.png" width="20%"/> <img src="../assets/station.png" width="20%"/>
<p>场站信息</p> <p>场站信息</p>
</el-card> </el-card>
</div> </div>
<div class="div-col2"> <div class="div-col2" @click="$router.push('/regulation/pipe')">
<el-card> <el-card>
<img src="../assets/pipe.png" width="20%"/> <img src="../assets/pipe.png" width="20%"/>
<p>管道信息</p> <p>管道信息</p>
</el-card> </el-card>
</div> </div>
<div class="div-col2"> <div class="div-col2" @click="$router.push('/regulation/device')">
<el-card> <el-card>
<img src="../assets/device.png" width="20%"/> <img src="../assets/device.png" width="20%"/>
<p>设备信息</p> <p>设备信息</p>
</el-card> </el-card>
</div> </div>
<div class="div-col2"> <div class="div-col2" @click="$router.push('/standingBook/equipment')">
<el-card> <el-card>
<img src="../assets/addDetector.png" width="20%"/> <img src="../assets/addDetector.png" width="20%"/>
<p>用户加装安全装置</p> <p>用户加装安全装置</p>
...@@ -133,44 +133,69 @@ ...@@ -133,44 +133,69 @@
<div class="div-col3"> <div class="div-col3">
<el-card> <el-card>
<div slot="header"> <div slot="header">
<span>任务下发</span> <span class="div-header" style="cursor: pointer;" @click="$router.push('/operationMonitor/workOrder')">任务下发</span>
</div> </div>
<div class="body"> <div class="body">
<el-table :data="equipmentList" style="width: 100%; border: 1px solid #e6ebf5;"> <el-table v-loading="orderLoading" :data="orderList" height="265" style="width: 100%; border: 1px solid #e6ebf5;">
<el-table-column label="优先级" align="center" prop="hiddenTitle" width="80"/> <el-table-column label="序号" type="index" align="center">
<el-table-column label="任务名称" align="left" prop="hiddenTitle">
<template slot-scope="scope"> <template slot-scope="scope">
<span></span> <span>{{(orderParams.pageNum - 1) * orderParams.pageSize + scope.$index + 1}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="hiddenTitle" width="80"> <el-table-column label="任务类型" align="center" prop="workType" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span></span> <span v-if="scope.row.workType == '1'">入户安检</span>
<span v-if="scope.row.workType == '2'">巡检</span>
<span v-if="scope.row.workType == '3'">报警巡查</span>
<span v-if="scope.row.workType == '4'">其他</span>
</template>
</el-table-column>
<el-table-column label="任务名称" align="left" prop="workTitle"/>
<el-table-column label="状态" align="center" prop="workStatus" width="100">
<template slot-scope="scope">
<span v-if="scope.row.workStatus == '0'">派发中</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination
v-show="orderTotal>=0"
:total="orderTotal"
:page.sync="orderParams.pageNum"
:limit.sync="orderParams.pageSize"
@pagination="getOrderList"
/>
</div> </div>
</el-card> </el-card>
</div> </div>
<div class="div-col3"> <div class="div-col3">
<el-card> <el-card>
<div slot="header"> <div slot="header">
<span>投诉处置</span> <span class="div-header" style="cursor: pointer;" @click="$router.push('/complainDeal')">投诉处置</span>
</div> </div>
<div class="body"> <div class="body">
<el-table :data="equipmentList" style="width: 100%; border: 1px solid #e6ebf5;"> <el-table v-loading="complainLoading" :data="complainList" height="265" style="width: 100%; border: 1px solid #e6ebf5;">
<el-table-column label="优先级" align="center" prop="hiddenTitle" width="80"/> <el-table-column label="序号" type="index" align="center">
<el-table-column label="任务名称" align="left" prop="hiddenTitle">
<template slot-scope="scope"> <template slot-scope="scope">
<span></span> <span>{{(complainParams.pageNum - 1) * complainParams.pageSize + scope.$index + 1}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="hiddenTitle" width="80"> <el-table-column label="投诉事项" align="left" prop="complainMatter"/>
<el-table-column label="投诉时间" align="center" prop="createTime" width="200"/>
<el-table-column label="状态" align="center" prop="complainStatus" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span></span> <span v-if="scope.row.complainStatus == '1'">派发中</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination
v-show="complainTotal>=0"
:total="complainTotal"
:page.sync="complainParams.pageNum"
:limit.sync="complainParams.pageSize"
@pagination="getComplainDealList"
/>
</div> </div>
</el-card> </el-card>
</div> </div>
...@@ -179,18 +204,72 @@ ...@@ -179,18 +204,72 @@
</template> </template>
<script> <script>
import { homepageStatistic } from "@/api/statistic/statisticAnalysis";
import { listOrder } from "@/api/operationMonitor/order";
import { listComplainDeal } from "@/api/complainDeal/complainDeal";
export default { export default {
name: "index", name: "index",
data() { data() {
return { return {
// 遮罩层
orderLoading: true,
complainLoading: true,
// 统计数据
totalObj: {},
// 列表数据
orderList: [],
complainList: [],
// 总条数
orderTotal: 0,
complainTotal: 0,
// 查询参数
orderParams: {
pageNum: 1,
pageSize: 10,
workStatus: '0',
isDel: '0'
},
complainParams: {
pageNum: 1,
pageSize: 10,
complainStatus: '1',
isDel: '0'
},
}; };
}, },
created(){ created(){
// 默认配置 // 默认配置
console.log(this.$store.state.settings) console.log(this.$store.state.settings)
}, },
mounted() {
this.getStatiData();
this.getOrderList();
this.getComplainDealList();
},
methods: { methods: {
getStatiData() {
homepageStatistic().then(response => {
this.totalObj = response.data;
console.log("this.totalObj",this.totalObj)
});
},
getOrderList() {
this.orderLoading = true;
listOrder(this.orderParams).then(response => {
this.orderList = response.rows;
this.orderTotal = response.total;
this.orderLoading = false;
});
},
getComplainDealList() {
this.complainLoading = true;
listComplainDeal(this.complainParams).then(response => {
this.complainList = response.rows;
this.complainTotal = response.total;
this.complainLoading = false;
});
},
goTarget(href) { goTarget(href) {
window.open(href, "_blank"); window.open(href, "_blank");
}, },
...@@ -229,6 +308,7 @@ export default { ...@@ -229,6 +308,7 @@ export default {
padding: 6px; padding: 6px;
float: left; float: left;
text-align: center; text-align: center;
cursor: pointer;
} }
.div-col3 { .div-col3 {
...@@ -237,6 +317,9 @@ export default { ...@@ -237,6 +317,9 @@ export default {
float: left; float: left;
} }
.div-header:hover {
text-decoration:underline;
}
} }
</style> </style>
...@@ -431,7 +431,6 @@ export default { ...@@ -431,7 +431,6 @@ export default {
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
detailDialogVisible: false, detailDialogVisible: false,
workForm: {},
// 选中数组 // 选中数组
ids: [], ids: [],
// 非单个禁用 // 非单个禁用
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment