事件数据,停车信息,地理信息数据
This commit is contained in:
parent
499b96ca13
commit
40ec600459
@ -0,0 +1,98 @@
|
||||
package com.god.web.controller.cityManage;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.god.common.annotation.Log;
|
||||
import com.god.common.core.controller.BaseController;
|
||||
import com.god.common.core.domain.AjaxResult;
|
||||
import com.god.common.enums.BusinessType;
|
||||
import com.god.passenger.cityManage.domain.JlpqEventInfo;
|
||||
import com.god.passenger.cityManage.service.IJlpqEventInfoService;
|
||||
import com.god.common.utils.poi.ExcelUtil;
|
||||
import com.god.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 事件数据Controller
|
||||
*
|
||||
* @author wangyan
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cityManage/event")
|
||||
public class JlpqEventInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IJlpqEventInfoService jlpqEventInfoService;
|
||||
|
||||
/**
|
||||
* 查询事件数据列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cityManage:event:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(JlpqEventInfo jlpqEventInfo) {
|
||||
startPage();
|
||||
List<JlpqEventInfo> list = jlpqEventInfoService.selectJlpqEventInfoList(jlpqEventInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出事件数据列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cityManage:event:export')")
|
||||
@Log(title = "事件数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, JlpqEventInfo jlpqEventInfo) {
|
||||
List<JlpqEventInfo> list = jlpqEventInfoService.selectJlpqEventInfoList(jlpqEventInfo);
|
||||
ExcelUtil<JlpqEventInfo> util = new ExcelUtil<JlpqEventInfo>(JlpqEventInfo.class);
|
||||
util.exportExcel(response, list, "事件数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取事件数据详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cityManage:event:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return success(jlpqEventInfoService.selectJlpqEventInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cityManage:event:add')")
|
||||
@Log(title = "事件数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody JlpqEventInfo jlpqEventInfo) {
|
||||
return toAjax(jlpqEventInfoService.insertJlpqEventInfo(jlpqEventInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改事件数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cityManage:event:edit')")
|
||||
@Log(title = "事件数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody JlpqEventInfo jlpqEventInfo) {
|
||||
return toAjax(jlpqEventInfoService.updateJlpqEventInfo(jlpqEventInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('cityManage:event:remove')")
|
||||
@Log(title = "事件数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
return toAjax(jlpqEventInfoService.deleteJlpqEventInfoByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
package com.god.passenger.cityManage.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.god.common.annotation.Excel;
|
||||
import com.god.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 事件数据对象 jlpq_event_info
|
||||
*
|
||||
* @author wangyan
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public class JlpqEventInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 事件名称 */
|
||||
@Excel(name = "事件名称")
|
||||
private String eventName;
|
||||
|
||||
/** 发生时间 */
|
||||
@Excel(name = "发生时间")
|
||||
private String eventTime;
|
||||
|
||||
/** 主办单位 */
|
||||
@Excel(name = "主办单位")
|
||||
private String hostUnit;
|
||||
|
||||
/** 事件详情 */
|
||||
@Excel(name = "事件详情")
|
||||
private String eventInfo;
|
||||
|
||||
/** 事件类型 */
|
||||
@Excel(name = "事件类型")
|
||||
private String eventType;
|
||||
|
||||
/** 事件状态 */
|
||||
@Excel(name = "事件状态")
|
||||
private String eventSource;
|
||||
|
||||
/** 发布日期 */
|
||||
@Excel(name = "发布日期")
|
||||
private String releaseDate;
|
||||
|
||||
/** 数据类型 */
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setEventName(String eventName)
|
||||
{
|
||||
this.eventName = eventName;
|
||||
}
|
||||
|
||||
public String getEventName()
|
||||
{
|
||||
return eventName;
|
||||
}
|
||||
public void setEventTime(String eventTime)
|
||||
{
|
||||
this.eventTime = eventTime;
|
||||
}
|
||||
|
||||
public String getEventTime()
|
||||
{
|
||||
return eventTime;
|
||||
}
|
||||
public void setHostUnit(String hostUnit)
|
||||
{
|
||||
this.hostUnit = hostUnit;
|
||||
}
|
||||
|
||||
public String getHostUnit()
|
||||
{
|
||||
return hostUnit;
|
||||
}
|
||||
public void setEventInfo(String eventInfo)
|
||||
{
|
||||
this.eventInfo = eventInfo;
|
||||
}
|
||||
|
||||
public String getEventInfo()
|
||||
{
|
||||
return eventInfo;
|
||||
}
|
||||
public void setEventType(String eventType)
|
||||
{
|
||||
this.eventType = eventType;
|
||||
}
|
||||
|
||||
public String getEventType()
|
||||
{
|
||||
return eventType;
|
||||
}
|
||||
public void setEventSource(String eventSource)
|
||||
{
|
||||
this.eventSource = eventSource;
|
||||
}
|
||||
|
||||
public String getEventSource()
|
||||
{
|
||||
return eventSource;
|
||||
}
|
||||
public void setReleaseDate(String releaseDate)
|
||||
{
|
||||
this.releaseDate = releaseDate;
|
||||
}
|
||||
|
||||
public String getReleaseDate()
|
||||
{
|
||||
return releaseDate;
|
||||
}
|
||||
public void setDataType(String dataType)
|
||||
{
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public String getDataType()
|
||||
{
|
||||
return dataType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("eventName", getEventName())
|
||||
.append("eventTime", getEventTime())
|
||||
.append("hostUnit", getHostUnit())
|
||||
.append("eventInfo", getEventInfo())
|
||||
.append("eventType", getEventType())
|
||||
.append("eventSource", getEventSource())
|
||||
.append("releaseDate", getReleaseDate())
|
||||
.append("dataType", getDataType())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.passenger.cityManage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.god.passenger.cityManage.domain.JlpqEventInfo;
|
||||
|
||||
/**
|
||||
* 事件数据Mapper接口
|
||||
*
|
||||
* @author wangyan
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public interface JlpqEventInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询事件数据
|
||||
*
|
||||
* @param id 事件数据主键
|
||||
* @return 事件数据
|
||||
*/
|
||||
public JlpqEventInfo selectJlpqEventInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询事件数据列表
|
||||
*
|
||||
* @param jlpqEventInfo 事件数据
|
||||
* @return 事件数据集合
|
||||
*/
|
||||
public List<JlpqEventInfo> selectJlpqEventInfoList(JlpqEventInfo jlpqEventInfo);
|
||||
|
||||
/**
|
||||
* 新增事件数据
|
||||
*
|
||||
* @param jlpqEventInfo 事件数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertJlpqEventInfo(JlpqEventInfo jlpqEventInfo);
|
||||
|
||||
/**
|
||||
* 修改事件数据
|
||||
*
|
||||
* @param jlpqEventInfo 事件数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateJlpqEventInfo(JlpqEventInfo jlpqEventInfo);
|
||||
|
||||
/**
|
||||
* 删除事件数据
|
||||
*
|
||||
* @param id 事件数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJlpqEventInfoById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除事件数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJlpqEventInfoByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.passenger.cityManage.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.god.passenger.cityManage.domain.JlpqEventInfo;
|
||||
|
||||
/**
|
||||
* 事件数据Service接口
|
||||
*
|
||||
* @author wangyan
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public interface IJlpqEventInfoService
|
||||
{
|
||||
/**
|
||||
* 查询事件数据
|
||||
*
|
||||
* @param id 事件数据主键
|
||||
* @return 事件数据
|
||||
*/
|
||||
public JlpqEventInfo selectJlpqEventInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询事件数据列表
|
||||
*
|
||||
* @param jlpqEventInfo 事件数据
|
||||
* @return 事件数据集合
|
||||
*/
|
||||
public List<JlpqEventInfo> selectJlpqEventInfoList(JlpqEventInfo jlpqEventInfo);
|
||||
|
||||
/**
|
||||
* 新增事件数据
|
||||
*
|
||||
* @param jlpqEventInfo 事件数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertJlpqEventInfo(JlpqEventInfo jlpqEventInfo);
|
||||
|
||||
/**
|
||||
* 修改事件数据
|
||||
*
|
||||
* @param jlpqEventInfo 事件数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateJlpqEventInfo(JlpqEventInfo jlpqEventInfo);
|
||||
|
||||
/**
|
||||
* 批量删除事件数据
|
||||
*
|
||||
* @param ids 需要删除的事件数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJlpqEventInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除事件数据信息
|
||||
*
|
||||
* @param id 事件数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJlpqEventInfoById(String id);
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.god.passenger.cityManage.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.god.common.utils.StringUtils;
|
||||
import com.god.common.utils.uuid.IdUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.god.passenger.cityManage.mapper.JlpqEventInfoMapper;
|
||||
import com.god.passenger.cityManage.domain.JlpqEventInfo;
|
||||
import com.god.passenger.cityManage.service.IJlpqEventInfoService;
|
||||
|
||||
/**
|
||||
* 事件数据Service业务层处理
|
||||
*
|
||||
* @author wangyan
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
@Service
|
||||
public class JlpqEventInfoServiceImpl implements IJlpqEventInfoService {
|
||||
@Autowired
|
||||
private JlpqEventInfoMapper jlpqEventInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询事件数据
|
||||
*
|
||||
* @param id 事件数据主键
|
||||
* @return 事件数据
|
||||
*/
|
||||
@Override
|
||||
public JlpqEventInfo selectJlpqEventInfoById(String id) {
|
||||
return jlpqEventInfoMapper.selectJlpqEventInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询事件数据列表
|
||||
*
|
||||
* @param jlpqEventInfo 事件数据
|
||||
* @return 事件数据
|
||||
*/
|
||||
@Override
|
||||
public List<JlpqEventInfo> selectJlpqEventInfoList(JlpqEventInfo jlpqEventInfo) {
|
||||
return jlpqEventInfoMapper.selectJlpqEventInfoList(jlpqEventInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件数据
|
||||
*
|
||||
* @param jlpqEventInfo 事件数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertJlpqEventInfo(JlpqEventInfo jlpqEventInfo) {
|
||||
if (StringUtils.isBlank(jlpqEventInfo.getId())){
|
||||
jlpqEventInfo.setId(IdUtils.fastSimpleUUID());
|
||||
}
|
||||
return jlpqEventInfoMapper.insertJlpqEventInfo(jlpqEventInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改事件数据
|
||||
*
|
||||
* @param jlpqEventInfo 事件数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateJlpqEventInfo(JlpqEventInfo jlpqEventInfo) {
|
||||
return jlpqEventInfoMapper.updateJlpqEventInfo(jlpqEventInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件数据
|
||||
*
|
||||
* @param ids 需要删除的事件数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteJlpqEventInfoByIds(String[] ids) {
|
||||
return jlpqEventInfoMapper.deleteJlpqEventInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件数据信息
|
||||
*
|
||||
* @param id 事件数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteJlpqEventInfoById(String id) {
|
||||
return jlpqEventInfoMapper.deleteJlpqEventInfoById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.god.passenger.cityManage.mapper.JlpqEventInfoMapper">
|
||||
|
||||
<resultMap type="JlpqEventInfo" id="JlpqEventInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="eventName" column="event_name" />
|
||||
<result property="eventTime" column="event_time" />
|
||||
<result property="hostUnit" column="host_unit" />
|
||||
<result property="eventInfo" column="event_info" />
|
||||
<result property="eventType" column="event_type" />
|
||||
<result property="eventSource" column="event_source" />
|
||||
<result property="releaseDate" column="release_date" />
|
||||
<result property="dataType" column="data_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectJlpqEventInfoVo">
|
||||
select id, event_name, event_time, host_unit, event_info, event_type, event_source, release_date, data_type from jlpq_event_info
|
||||
</sql>
|
||||
|
||||
<select id="selectJlpqEventInfoList" parameterType="JlpqEventInfo" resultMap="JlpqEventInfoResult">
|
||||
<include refid="selectJlpqEventInfoVo"/>
|
||||
<where>
|
||||
<if test="eventName != null and eventName != ''"> and event_name like concat('%', #{eventName}, '%')</if>
|
||||
<if test="eventTime != null and eventTime != ''"> and event_time >= #{eventTime}</if>
|
||||
<if test="hostUnit != null and hostUnit != ''"> and host_unit like concat('%', #{hostUnit}, '%')</if>
|
||||
<if test="eventInfo != null and eventInfo != ''"> and event_info like concat('%', #{eventInfo}, '%')</if>
|
||||
<if test="eventType != null and eventType != ''"> and event_type = #{eventType}</if>
|
||||
<if test="eventSource != null and eventSource != ''"> and event_source = #{eventSource}</if>
|
||||
<if test="releaseDate != null and releaseDate != ''"> and release_date >= #{releaseDate}</if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type like concat('%', #{dataType}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectJlpqEventInfoById" parameterType="String" resultMap="JlpqEventInfoResult">
|
||||
<include refid="selectJlpqEventInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertJlpqEventInfo" parameterType="JlpqEventInfo">
|
||||
insert into jlpq_event_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="eventName != null">event_name,</if>
|
||||
<if test="eventTime != null">event_time,</if>
|
||||
<if test="hostUnit != null">host_unit,</if>
|
||||
<if test="eventInfo != null">event_info,</if>
|
||||
<if test="eventType != null">event_type,</if>
|
||||
<if test="eventSource != null">event_source,</if>
|
||||
<if test="releaseDate != null">release_date,</if>
|
||||
<if test="dataType != null">data_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="eventName != null">#{eventName},</if>
|
||||
<if test="eventTime != null">#{eventTime},</if>
|
||||
<if test="hostUnit != null">#{hostUnit},</if>
|
||||
<if test="eventInfo != null">#{eventInfo},</if>
|
||||
<if test="eventType != null">#{eventType},</if>
|
||||
<if test="eventSource != null">#{eventSource},</if>
|
||||
<if test="releaseDate != null">#{releaseDate},</if>
|
||||
<if test="dataType != null">#{dataType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateJlpqEventInfo" parameterType="JlpqEventInfo">
|
||||
update jlpq_event_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="eventName != null">event_name = #{eventName},</if>
|
||||
<if test="eventTime != null">event_time = #{eventTime},</if>
|
||||
<if test="hostUnit != null">host_unit = #{hostUnit},</if>
|
||||
<if test="eventInfo != null">event_info = #{eventInfo},</if>
|
||||
<if test="eventType != null">event_type = #{eventType},</if>
|
||||
<if test="eventSource != null">event_source = #{eventSource},</if>
|
||||
<if test="releaseDate != null">release_date = #{releaseDate},</if>
|
||||
<if test="dataType != null">data_type = #{dataType},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteJlpqEventInfoById" parameterType="String">
|
||||
delete from jlpq_event_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteJlpqEventInfoByIds" parameterType="String">
|
||||
delete from jlpq_event_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -35,6 +35,7 @@
|
||||
"type": "git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"axios": "0.24.0",
|
||||
"clipboard": "2.0.8",
|
||||
|
44
god-ui/src/api/cityManage/event.js
Normal file
44
god-ui/src/api/cityManage/event.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询事件数据列表
|
||||
export function listEvent(query) {
|
||||
return request({
|
||||
url: '/cityManage/event/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询事件数据详细
|
||||
export function getEvent(id) {
|
||||
return request({
|
||||
url: '/cityManage/event/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增事件数据
|
||||
export function addEvent(data) {
|
||||
return request({
|
||||
url: '/cityManage/event',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改事件数据
|
||||
export function updateEvent(data) {
|
||||
return request({
|
||||
url: '/cityManage/event',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除事件数据
|
||||
export function delEvent(id) {
|
||||
return request({
|
||||
url: '/cityManage/event/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
373
god-ui/src/views/cityManage/event/index.vue
Normal file
373
god-ui/src/views/cityManage/event/index.vue
Normal file
@ -0,0 +1,373 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="事件名称" prop="eventName">
|
||||
<el-input
|
||||
v-model="queryParams.eventName"
|
||||
placeholder="请输入事件名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发生时间" prop="eventTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.eventTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择发生时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="主办单位" prop="hostUnit">
|
||||
<el-input
|
||||
v-model="queryParams.hostUnit"
|
||||
placeholder="请输入主办单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="事件类型" prop="eventType">
|
||||
<el-select v-model="queryParams.eventType" placeholder="请选择事件类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_notice_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="事件状态" prop="eventSource">
|
||||
<el-select v-model="queryParams.eventSource" placeholder="请选择事件状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_notice_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布日期" prop="releaseDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.releaseDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择发布日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['cityManage:event:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['cityManage:event:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['cityManage:event:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['cityManage:event:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="eventList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="事件名称" align="center" prop="eventName" />
|
||||
<el-table-column label="发生时间" align="center" prop="eventTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.eventTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="主办单位" align="center" prop="hostUnit" />
|
||||
<el-table-column label="事件详情" align="center" prop="eventInfo" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="事件类型" align="center" prop="eventType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_notice_type" :value="scope.row.eventType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="事件状态" align="center" prop="eventSource">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_notice_status" :value="scope.row.eventSource"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发布日期" align="center" prop="releaseDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.releaseDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="数据类型" align="center" prop="dataType" />-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['cityManage:event:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['cityManage:event:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改事件数据对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="事件名称" prop="eventName">
|
||||
<el-input v-model="form.eventName" placeholder="请输入事件名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发生时间" prop="eventTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.eventTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择发生时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="主办单位" prop="hostUnit">
|
||||
<el-input v-model="form.hostUnit" placeholder="请输入主办单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="事件详情" prop="eventInfo">
|
||||
<el-input v-model="form.eventInfo" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="事件类型" prop="eventType">
|
||||
<el-select v-model="form.eventType" placeholder="请选择事件类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_notice_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="事件状态" prop="eventSource">
|
||||
<el-select v-model="form.eventSource" placeholder="请选择事件状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_notice_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布日期" prop="releaseDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.releaseDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择发布日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input v-model="form.dataType" placeholder="请输入数据类型" />-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEvent, getEvent, delEvent, addEvent, updateEvent } from "@/api/cityManage/event";
|
||||
|
||||
export default {
|
||||
name: "Event",
|
||||
dicts: ['sys_notice_status', 'sys_notice_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 事件数据表格数据
|
||||
eventList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
eventName: null,
|
||||
eventTime: null,
|
||||
hostUnit: null,
|
||||
eventInfo: null,
|
||||
eventType: null,
|
||||
eventSource: null,
|
||||
releaseDate: null,
|
||||
dataType: "事件数据"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询事件数据列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listEvent(this.queryParams).then(response => {
|
||||
this.eventList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
eventName: null,
|
||||
eventTime: null,
|
||||
hostUnit: null,
|
||||
eventInfo: null,
|
||||
eventType: null,
|
||||
eventSource: null,
|
||||
releaseDate: null,
|
||||
dataType: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加事件数据";
|
||||
this.form.dataType = "事件数据";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getEvent(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改事件数据";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateEvent(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addEvent(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除事件数据编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delEvent(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('cityManage/event/export', {
|
||||
...this.queryParams
|
||||
}, `event_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
10
god-ui/src/views/cityManage/mapInfo/assets/index.js
Normal file
10
god-ui/src/views/cityManage/mapInfo/assets/index.js
Normal file
@ -0,0 +1,10 @@
|
||||
const modulesFiles = require.context('./', true, /\.png$/)
|
||||
|
||||
const ImageMap = new Map()
|
||||
modulesFiles.keys().forEach(key => {
|
||||
const filename = key.split('/').pop();
|
||||
const url = modulesFiles(key);
|
||||
ImageMap.set(filename, url);
|
||||
})
|
||||
|
||||
export { ImageMap }
|
125
god-ui/src/views/cityManage/mapInfo/geography/index.vue
Normal file
125
god-ui/src/views/cityManage/mapInfo/geography/index.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div style="width: 100%; height: 500px">
|
||||
<div>
|
||||
<el-input
|
||||
style="width: 60%"
|
||||
v-model="inputObject.userInput"
|
||||
:id="inputObject.inputId"
|
||||
placeholder="请输入你要查找的关键词"
|
||||
type="text"
|
||||
></el-input>
|
||||
<el-button type="primary" @click="send">搜索</el-button>
|
||||
</div>
|
||||
<div id="container"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AMapLoader from "@amap/amap-jsapi-loader";
|
||||
// import { getStation } from "@/api/pile/station.js";
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: "b6314ade5a42c3f3ac2284b6d4d89b1f",
|
||||
};
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
map: null,
|
||||
autoOptions: {
|
||||
input: "",
|
||||
},
|
||||
inputObject: {
|
||||
userInput: "",
|
||||
inputId: "searchInput",
|
||||
},
|
||||
searchPlaceInput: "",
|
||||
auto: null,
|
||||
placeSearch: "",
|
||||
stationId: this.$route.params.id,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
send() {
|
||||
this.autoOptions.input = this.inputObject.inputId;
|
||||
this.searchPlaceInput = this.inputObject.userInput;
|
||||
// console.log(this.lng, this.lat);
|
||||
},
|
||||
queryStationInfo() {
|
||||
// getStation(this.stationId).then((response) => {
|
||||
// this.lat = response.data.stationLat;
|
||||
// this.lng = response.data.stationLng;
|
||||
this.lat = "29.462288";
|
||||
this.lng = "106.381089";
|
||||
console.log(this.lat, this.lng);
|
||||
this.initMap(this.lat, this.lng);
|
||||
// });
|
||||
},
|
||||
initMap(lat, lng) {
|
||||
// console.log(lat, lng);
|
||||
AMapLoader.load({
|
||||
key: "e49669059fa36494531a82ed982f395c", // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||
version: "1.4.15", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||
plugins: ["AMap.AutoComplete", "AMap.PlaceSearch"], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
||||
})
|
||||
.then((AMap) => {
|
||||
this.map = new AMap.Map("container", {
|
||||
//设置地图容器id
|
||||
viewMode: "3D", //是否为3D地图模式
|
||||
zoom: 15, //初始化地图级别
|
||||
center: [+lng, +lat], //初始化地图中心点位置
|
||||
resizeEnable: true,
|
||||
});
|
||||
// console.log("map", this.map);
|
||||
// 设置鼠标的样式
|
||||
this.map.setDefaultCursor("pointer");
|
||||
// 点标记
|
||||
let marker = new AMap.Marker({
|
||||
position: new AMap.LngLat(+lng, +lat),
|
||||
});
|
||||
// 将创建的点标记添加到已有的地图实例
|
||||
this.map.add(marker);
|
||||
AMap.plugin("AMap.AutoComplete", function () {
|
||||
let auto = new AMap.AutoComplete(this.autoOptions);
|
||||
//构造地点查询类
|
||||
auto.on("select", this.select);
|
||||
});
|
||||
this.placeSearch = new AMap.PlaceSearch({
|
||||
map: this.map,
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
},
|
||||
select(e) {
|
||||
this.placeSearch.search(e.poi.name); //关键字查询查询
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//DOM初始化完成进行地图初始化
|
||||
this.queryStationInfo();
|
||||
},
|
||||
created() {
|
||||
this.send();
|
||||
},
|
||||
watch: {
|
||||
searchPlaceInput(newValue) {
|
||||
if (newValue != null) {
|
||||
console.log(newValue);
|
||||
|
||||
this.placeSearch.search(newValue);
|
||||
this.map.setZoom(16, true, 1);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
#container {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
}
|
||||
</style>
|
343
god-ui/src/views/cityManage/parking/index.vue
Normal file
343
god-ui/src/views/cityManage/parking/index.vue
Normal file
@ -0,0 +1,343 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="车牌号" prop="personName">
|
||||
<el-input
|
||||
v-model="queryParams.personName"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="personSex">
|
||||
<el-select v-model="queryParams.personSex" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.driving_in_out"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域" prop="nation">
|
||||
<el-input
|
||||
v-model="queryParams.nation"
|
||||
placeholder="请输入区域"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['cityManage:leader:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['cityManage:leader:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['cityManage:leader:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="leaderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
<el-table-column label="车牌号" align="center" prop="personName" />
|
||||
<el-table-column label="抓拍图片" align="center" prop="photoInfo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.photoInfo" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间" align="center" prop="birthTime" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.birthTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="类型" align="center" prop="personSex">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.driving_in_out" :value="scope.row.personSex"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="区域" align="center" prop="nation" />
|
||||
|
||||
|
||||
<el-table-column label="区域坐标" align="center" prop="duty" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="是由备注" align="center" prop="manageJobs" :show-overflow-tooltip="true"/>
|
||||
|
||||
<!-- <el-table-column label="数据类型" align="center" prop="dataType" />-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['cityManage:leader:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['cityManage:leader:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改人员信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="车牌号" prop="personName">
|
||||
<el-input v-model="form.personName" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="抓拍图片" prop="photoInfo">
|
||||
<image-upload v-model="form.photoInfo"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间" prop="birthTime">
|
||||
<el-date-picker
|
||||
v-model="form.birthTime"
|
||||
type="datetime"
|
||||
placeholder="选择时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="personSex">
|
||||
<!-- <el-select v-model="form.personSex" placeholder="请选择性别">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.driving_in_out"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- ></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<el-radio-group v-model="form.personSex">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.driving_in_out"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域" prop="nation">
|
||||
<el-input v-model="form.nation" placeholder="请输入区域" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="学历" prop="education">-->
|
||||
<!-- <el-input v-model="form.education" placeholder="请输入学历" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="区域坐标" prop="duty">
|
||||
<el-input v-model="form.duty" placeholder="请输入区域坐标" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是由备注" prop="manageJobs">
|
||||
<el-input v-model="form.manageJobs" type="textarea" placeholder="请输入是由备注" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input v-model="form.dataType" placeholder="请输入数据类型" />-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listLeader, getLeader, delLeader, addLeader, updateLeader } from "@/api/cityManage/leader";
|
||||
|
||||
export default {
|
||||
//停车信息
|
||||
name: "Parking",
|
||||
dicts: ['sys_user_sex','driving_in_out'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 人员信息表格数据
|
||||
leaderList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
personName: null,
|
||||
personSex: null,
|
||||
nation: null,
|
||||
birthTime: null,
|
||||
education: null,
|
||||
duty: null,
|
||||
manageJobs: null,
|
||||
photoInfo: null,
|
||||
dataType: "停车信息"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询人员信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listLeader(this.queryParams).then(response => {
|
||||
this.leaderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
personName: null,
|
||||
personSex: null,
|
||||
nation: null,
|
||||
birthTime: null,
|
||||
education: null,
|
||||
duty: null,
|
||||
manageJobs: null,
|
||||
photoInfo: null,
|
||||
dataType: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加停车信息";
|
||||
this.form.dataType = "停车信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getLeader(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改停车信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateLeader(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addLeader(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除人员信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delLeader(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('cityManage/leader/export', {
|
||||
...this.queryParams
|
||||
}, `leader_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user