车间公厕管理

This commit is contained in:
卢序振 2023-11-10 17:17:07 +08:00
parent 69ca122d14
commit e473bd4162
8 changed files with 961 additions and 0 deletions

View File

@ -0,0 +1,98 @@
package com.god.industrial.controller;
import com.god.common.annotation.Log;
import com.god.common.core.controller.BaseController;
import com.god.common.core.domain.AjaxResult;
import com.god.common.core.page.TableDataInfo;
import com.god.common.enums.BusinessType;
import com.god.common.utils.poi.ExcelUtil;
import com.god.industrial.domain.GyyqTaskProcessManagement;
import com.god.industrial.service.IGyyqTaskProcessManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 任务流程管理Controller
*
* @author Lxz
* @date 2023-11-10
*/
@RestController
@RequestMapping("/industrial/gyyqTaskProcessManagement")
public class GyyqTaskProcessManagementController extends BaseController
{
@Autowired
private IGyyqTaskProcessManagementService gyyqTaskProcessManagementService;
/**
* 查询任务流程管理列表
*/
@PreAuthorize("@ss.hasPermi('industrial:gyyqTaskProcessManagement:list')")
@GetMapping("/list")
public TableDataInfo list(GyyqTaskProcessManagement gyyqTaskProcessManagement)
{
startPage();
List<GyyqTaskProcessManagement> list = gyyqTaskProcessManagementService.selectGyyqTaskProcessManagementList(gyyqTaskProcessManagement);
return getDataTable(list);
}
/**
* 导出任务流程管理列表
*/
@PreAuthorize("@ss.hasPermi('industrial:gyyqTaskProcessManagement:export')")
@Log(title = "任务流程管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, GyyqTaskProcessManagement gyyqTaskProcessManagement)
{
List<GyyqTaskProcessManagement> list = gyyqTaskProcessManagementService.selectGyyqTaskProcessManagementList(gyyqTaskProcessManagement);
ExcelUtil<GyyqTaskProcessManagement> util = new ExcelUtil<GyyqTaskProcessManagement>(GyyqTaskProcessManagement.class);
util.exportExcel(response, list, "任务流程管理数据");
}
/**
* 获取任务流程管理详细信息
*/
@PreAuthorize("@ss.hasPermi('industrial:gyyqTaskProcessManagement:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(gyyqTaskProcessManagementService.selectGyyqTaskProcessManagementById(id));
}
/**
* 新增任务流程管理
*/
@PreAuthorize("@ss.hasPermi('industrial:gyyqTaskProcessManagement:add')")
@Log(title = "任务流程管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody GyyqTaskProcessManagement gyyqTaskProcessManagement)
{
return toAjax(gyyqTaskProcessManagementService.insertGyyqTaskProcessManagement(gyyqTaskProcessManagement));
}
/**
* 修改任务流程管理
*/
@PreAuthorize("@ss.hasPermi('industrial:gyyqTaskProcessManagement:edit')")
@Log(title = "任务流程管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody GyyqTaskProcessManagement gyyqTaskProcessManagement)
{
return toAjax(gyyqTaskProcessManagementService.updateGyyqTaskProcessManagement(gyyqTaskProcessManagement));
}
/**
* 删除任务流程管理
*/
@PreAuthorize("@ss.hasPermi('industrial:gyyqTaskProcessManagement:remove')")
@Log(title = "任务流程管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(gyyqTaskProcessManagementService.deleteGyyqTaskProcessManagementByIds(ids));
}
}

View File

@ -0,0 +1,149 @@
package com.god.industrial.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;
/**
* 任务流程管理对象 gyyq_task_process_management
*
* @author Lxz
* @date 2023-11-10
*/
public class GyyqTaskProcessManagement extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private String id;
/** 任务名称 */
@Excel(name = "任务名称")
private String pollingName;
/** 任务类型 */
@Excel(name = "任务类型")
private String pollingStyle;
/** 任务内容 */
@Excel(name = "任务内容")
private String pollingContent;
/** 开始时间 */
@Excel(name = "开始时间")
private String pollingStartTime;
/** 结束时间 */
@Excel(name = "结束时间")
private String pollingEndTime;
/** 制单人 */
@Excel(name = "制单人")
private String pollingPerson;
/** 制单时间 */
@Excel(name = "制单时间")
private String pollingTime;
/** 状态 */
@Excel(name = "状态")
private String pollingStatus;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setPollingName(String pollingName)
{
this.pollingName = pollingName;
}
public String getPollingName()
{
return pollingName;
}
public void setPollingStyle(String pollingStyle)
{
this.pollingStyle = pollingStyle;
}
public String getPollingStyle()
{
return pollingStyle;
}
public void setPollingContent(String pollingContent)
{
this.pollingContent = pollingContent;
}
public String getPollingContent()
{
return pollingContent;
}
public void setPollingStartTime(String pollingStartTime)
{
this.pollingStartTime = pollingStartTime;
}
public String getPollingStartTime()
{
return pollingStartTime;
}
public void setPollingEndTime(String pollingEndTime)
{
this.pollingEndTime = pollingEndTime;
}
public String getPollingEndTime()
{
return pollingEndTime;
}
public void setPollingPerson(String pollingPerson)
{
this.pollingPerson = pollingPerson;
}
public String getPollingPerson()
{
return pollingPerson;
}
public void setPollingTime(String pollingTime)
{
this.pollingTime = pollingTime;
}
public String getPollingTime()
{
return pollingTime;
}
public void setPollingStatus(String pollingStatus)
{
this.pollingStatus = pollingStatus;
}
public String getPollingStatus()
{
return pollingStatus;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("pollingName", getPollingName())
.append("pollingStyle", getPollingStyle())
.append("pollingContent", getPollingContent())
.append("pollingStartTime", getPollingStartTime())
.append("pollingEndTime", getPollingEndTime())
.append("pollingPerson", getPollingPerson())
.append("pollingTime", getPollingTime())
.append("pollingStatus", getPollingStatus())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.god.industrial.mapper;
import java.util.List;
import com.god.industrial.domain.GyyqTaskProcessManagement;
/**
* 任务流程管理Mapper接口
*
* @author Lxz
* @date 2023-11-10
*/
public interface GyyqTaskProcessManagementMapper
{
/**
* 查询任务流程管理
*
* @param id 任务流程管理主键
* @return 任务流程管理
*/
public GyyqTaskProcessManagement selectGyyqTaskProcessManagementById(String id);
/**
* 查询任务流程管理列表
*
* @param gyyqTaskProcessManagement 任务流程管理
* @return 任务流程管理集合
*/
public List<GyyqTaskProcessManagement> selectGyyqTaskProcessManagementList(GyyqTaskProcessManagement gyyqTaskProcessManagement);
/**
* 新增任务流程管理
*
* @param gyyqTaskProcessManagement 任务流程管理
* @return 结果
*/
public int insertGyyqTaskProcessManagement(GyyqTaskProcessManagement gyyqTaskProcessManagement);
/**
* 修改任务流程管理
*
* @param gyyqTaskProcessManagement 任务流程管理
* @return 结果
*/
public int updateGyyqTaskProcessManagement(GyyqTaskProcessManagement gyyqTaskProcessManagement);
/**
* 删除任务流程管理
*
* @param id 任务流程管理主键
* @return 结果
*/
public int deleteGyyqTaskProcessManagementById(String id);
/**
* 批量删除任务流程管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteGyyqTaskProcessManagementByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.god.industrial.service;
import java.util.List;
import com.god.industrial.domain.GyyqTaskProcessManagement;
/**
* 任务流程管理Service接口
*
* @author Lxz
* @date 2023-11-10
*/
public interface IGyyqTaskProcessManagementService
{
/**
* 查询任务流程管理
*
* @param id 任务流程管理主键
* @return 任务流程管理
*/
public GyyqTaskProcessManagement selectGyyqTaskProcessManagementById(String id);
/**
* 查询任务流程管理列表
*
* @param gyyqTaskProcessManagement 任务流程管理
* @return 任务流程管理集合
*/
public List<GyyqTaskProcessManagement> selectGyyqTaskProcessManagementList(GyyqTaskProcessManagement gyyqTaskProcessManagement);
/**
* 新增任务流程管理
*
* @param gyyqTaskProcessManagement 任务流程管理
* @return 结果
*/
public int insertGyyqTaskProcessManagement(GyyqTaskProcessManagement gyyqTaskProcessManagement);
/**
* 修改任务流程管理
*
* @param gyyqTaskProcessManagement 任务流程管理
* @return 结果
*/
public int updateGyyqTaskProcessManagement(GyyqTaskProcessManagement gyyqTaskProcessManagement);
/**
* 批量删除任务流程管理
*
* @param ids 需要删除的任务流程管理主键集合
* @return 结果
*/
public int deleteGyyqTaskProcessManagementByIds(String[] ids);
/**
* 删除任务流程管理信息
*
* @param id 任务流程管理主键
* @return 结果
*/
public int deleteGyyqTaskProcessManagementById(String id);
}

View File

@ -0,0 +1,96 @@
package com.god.industrial.service.impl;
import com.god.common.utils.uuid.IdUtils;
import com.god.industrial.domain.GyyqTaskProcessManagement;
import com.god.industrial.mapper.GyyqTaskProcessManagementMapper;
import com.god.industrial.service.IGyyqTaskProcessManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 任务流程管理Service业务层处理
*
* @author Lxz
* @date 2023-11-10
*/
@Service
public class GyyqTaskProcessManagementServiceImpl implements IGyyqTaskProcessManagementService
{
@Autowired
private GyyqTaskProcessManagementMapper gyyqTaskProcessManagementMapper;
/**
* 查询任务流程管理
*
* @param id 任务流程管理主键
* @return 任务流程管理
*/
@Override
public GyyqTaskProcessManagement selectGyyqTaskProcessManagementById(String id)
{
return gyyqTaskProcessManagementMapper.selectGyyqTaskProcessManagementById(id);
}
/**
* 查询任务流程管理列表
*
* @param gyyqTaskProcessManagement 任务流程管理
* @return 任务流程管理
*/
@Override
public List<GyyqTaskProcessManagement> selectGyyqTaskProcessManagementList(GyyqTaskProcessManagement gyyqTaskProcessManagement)
{
return gyyqTaskProcessManagementMapper.selectGyyqTaskProcessManagementList(gyyqTaskProcessManagement);
}
/**
* 新增任务流程管理
*
* @param gyyqTaskProcessManagement 任务流程管理
* @return 结果
*/
@Override
public int insertGyyqTaskProcessManagement(GyyqTaskProcessManagement gyyqTaskProcessManagement)
{
gyyqTaskProcessManagement.setId(IdUtils.fastUUID());
return gyyqTaskProcessManagementMapper.insertGyyqTaskProcessManagement(gyyqTaskProcessManagement);
}
/**
* 修改任务流程管理
*
* @param gyyqTaskProcessManagement 任务流程管理
* @return 结果
*/
@Override
public int updateGyyqTaskProcessManagement(GyyqTaskProcessManagement gyyqTaskProcessManagement)
{
return gyyqTaskProcessManagementMapper.updateGyyqTaskProcessManagement(gyyqTaskProcessManagement);
}
/**
* 批量删除任务流程管理
*
* @param ids 需要删除的任务流程管理主键
* @return 结果
*/
@Override
public int deleteGyyqTaskProcessManagementByIds(String[] ids)
{
return gyyqTaskProcessManagementMapper.deleteGyyqTaskProcessManagementByIds(ids);
}
/**
* 删除任务流程管理信息
*
* @param id 任务流程管理主键
* @return 结果
*/
@Override
public int deleteGyyqTaskProcessManagementById(String id)
{
return gyyqTaskProcessManagementMapper.deleteGyyqTaskProcessManagementById(id);
}
}

View File

@ -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.industrial.mapper.GyyqTaskProcessManagementMapper">
<resultMap type="GyyqTaskProcessManagement" id="GyyqTaskProcessManagementResult">
<result property="id" column="id" />
<result property="pollingName" column="polling_name" />
<result property="pollingStyle" column="polling_style" />
<result property="pollingContent" column="polling_content" />
<result property="pollingStartTime" column="polling_start_time" />
<result property="pollingEndTime" column="polling_end_time" />
<result property="pollingPerson" column="polling_person" />
<result property="pollingTime" column="polling_time" />
<result property="pollingStatus" column="polling_status" />
</resultMap>
<sql id="selectGyyqTaskProcessManagementVo">
select id, polling_name, polling_style, polling_content, polling_start_time, polling_end_time, polling_person, polling_time, polling_status from gyyq_task_process_management
</sql>
<select id="selectGyyqTaskProcessManagementList" parameterType="GyyqTaskProcessManagement" resultMap="GyyqTaskProcessManagementResult">
<include refid="selectGyyqTaskProcessManagementVo"/>
<where>
<if test="pollingName != null and pollingName != ''"> and polling_name like concat('%', #{pollingName}, '%')</if>
<if test="pollingStyle != null and pollingStyle != ''"> and polling_style = #{pollingStyle}</if>
<if test="pollingContent != null and pollingContent != ''"> and polling_content = #{pollingContent}</if>
<if test="pollingStartTime != null and pollingStartTime != ''"> and polling_start_time = #{pollingStartTime}</if>
<if test="pollingEndTime != null and pollingEndTime != ''"> and polling_end_time = #{pollingEndTime}</if>
<if test="pollingPerson != null and pollingPerson != ''"> and polling_person = #{pollingPerson}</if>
<if test="pollingTime != null and pollingTime != ''"> and polling_time = #{pollingTime}</if>
<if test="pollingStatus != null and pollingStatus != ''"> and polling_status = #{pollingStatus}</if>
</where>
</select>
<select id="selectGyyqTaskProcessManagementById" parameterType="String" resultMap="GyyqTaskProcessManagementResult">
<include refid="selectGyyqTaskProcessManagementVo"/>
where id = #{id}
</select>
<insert id="insertGyyqTaskProcessManagement" parameterType="GyyqTaskProcessManagement">
insert into gyyq_task_process_management
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="pollingName != null">polling_name,</if>
<if test="pollingStyle != null">polling_style,</if>
<if test="pollingContent != null">polling_content,</if>
<if test="pollingStartTime != null">polling_start_time,</if>
<if test="pollingEndTime != null">polling_end_time,</if>
<if test="pollingPerson != null">polling_person,</if>
<if test="pollingTime != null">polling_time,</if>
<if test="pollingStatus != null">polling_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="pollingName != null">#{pollingName},</if>
<if test="pollingStyle != null">#{pollingStyle},</if>
<if test="pollingContent != null">#{pollingContent},</if>
<if test="pollingStartTime != null">#{pollingStartTime},</if>
<if test="pollingEndTime != null">#{pollingEndTime},</if>
<if test="pollingPerson != null">#{pollingPerson},</if>
<if test="pollingTime != null">#{pollingTime},</if>
<if test="pollingStatus != null">#{pollingStatus},</if>
</trim>
</insert>
<update id="updateGyyqTaskProcessManagement" parameterType="GyyqTaskProcessManagement">
update gyyq_task_process_management
<trim prefix="SET" suffixOverrides=",">
<if test="pollingName != null">polling_name = #{pollingName},</if>
<if test="pollingStyle != null">polling_style = #{pollingStyle},</if>
<if test="pollingContent != null">polling_content = #{pollingContent},</if>
<if test="pollingStartTime != null">polling_start_time = #{pollingStartTime},</if>
<if test="pollingEndTime != null">polling_end_time = #{pollingEndTime},</if>
<if test="pollingPerson != null">polling_person = #{pollingPerson},</if>
<if test="pollingTime != null">polling_time = #{pollingTime},</if>
<if test="pollingStatus != null">polling_status = #{pollingStatus},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteGyyqTaskProcessManagementById" parameterType="String">
delete from gyyq_task_process_management where id = #{id}
</delete>
<delete id="deleteGyyqTaskProcessManagementByIds" parameterType="String">
delete from gyyq_task_process_management where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询任务流程管理列表
export function listGyyqTaskProcessManagement(query) {
return request({
url: '/industrial/gyyqTaskProcessManagement/list',
method: 'get',
params: query
})
}
// 查询任务流程管理详细
export function getGyyqTaskProcessManagement(id) {
return request({
url: '/industrial/gyyqTaskProcessManagement/' + id,
method: 'get'
})
}
// 新增任务流程管理
export function addGyyqTaskProcessManagement(data) {
return request({
url: '/industrial/gyyqTaskProcessManagement',
method: 'post',
data: data
})
}
// 修改任务流程管理
export function updateGyyqTaskProcessManagement(data) {
return request({
url: '/industrial/gyyqTaskProcessManagement',
method: 'put',
data: data
})
}
// 删除任务流程管理
export function delGyyqTaskProcessManagement(id) {
return request({
url: '/industrial/gyyqTaskProcessManagement/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,359 @@
<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="pollingName">
<el-input
v-model="queryParams.pollingName"
placeholder="请输入任务名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务类型" prop="pollingStyle">
<el-input
v-model="queryParams.pollingStyle"
placeholder="请输入任务类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="pollingStatus">
<el-select v-model="queryParams.pollingStatus" placeholder="请选择状态" clearable>
<el-option
v-for="dict in dict.type.order_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</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="['industrial:gyyqTaskProcessManagement: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="['industrial:gyyqTaskProcessManagement: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="['industrial:gyyqTaskProcessManagement: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="['industrial:gyyqTaskProcessManagement:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="gyyqTaskProcessManagementList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="任务名称" align="center" prop="pollingName"/>
<el-table-column label="任务类型" align="center" prop="pollingStyle"/>
<el-table-column label="任务内容" align="center" prop="pollingContent"/>
<el-table-column label="开始时间" align="center" prop="pollingStartTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.pollingStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" prop="pollingEndTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.pollingEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="制单人" align="center" prop="pollingPerson"/>
<el-table-column label="制单时间" align="center" prop="pollingTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.pollingTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="pollingStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.order_status" :value="scope.row.pollingStatus"/>
</template>
</el-table-column>
<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="['industrial:gyyqTaskProcessManagement:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['industrial:gyyqTaskProcessManagement: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="pollingName">
<el-input v-model="form.pollingName" placeholder="请输入任务名称"/>
</el-form-item>
<el-form-item label="任务类型" prop="pollingStyle">
<el-input v-model="form.pollingStyle" placeholder="请输入任务类型"/>
</el-form-item>
<el-form-item label="任务内容" prop="pollingContent">
<el-input v-model="form.pollingContent" type="textarea" placeholder="请输入内容"/>
</el-form-item>
<el-form-item label="开始时间" prop="pollingStartTime">
<el-date-picker clearable
v-model="form.pollingStartTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择开始时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="pollingEndTime">
<el-date-picker clearable
v-model="form.pollingEndTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="制单人" prop="pollingPerson">
<el-input v-model="form.pollingPerson" placeholder="请输入制单人"/>
</el-form-item>
<el-form-item label="制单时间" prop="pollingTime">
<!-- <el-input v-model="form.pollingTime" placeholder="请输入制单时间" />-->
<el-date-picker clearable
v-model="form.pollingTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="状态" prop="pollingStatus">
<el-radio-group v-model="form.pollingStatus">
<el-radio
v-for="dict in dict.type.order_status"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</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 {
listGyyqTaskProcessManagement,
getGyyqTaskProcessManagement,
delGyyqTaskProcessManagement,
addGyyqTaskProcessManagement,
updateGyyqTaskProcessManagement
} from '@/api/industrial/gyyqTaskProcessManagement'
export default {
name: 'GyyqTaskProcessManagement',
dicts: ['order_status'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
gyyqTaskProcessManagementList: [],
//
title: '',
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
pollingName: null,
pollingStyle: null,
pollingContent: null,
pollingStartTime: null,
pollingEndTime: null,
pollingPerson: null,
pollingTime: null,
pollingStatus: null
},
//
form: {},
//
rules: {}
}
},
created() {
this.getList()
},
methods: {
/** 查询任务流程管理列表 */
getList() {
this.loading = true
listGyyqTaskProcessManagement(this.queryParams).then(response => {
this.gyyqTaskProcessManagementList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
pollingName: null,
pollingStyle: null,
pollingContent: null,
pollingStartTime: null,
pollingEndTime: null,
pollingPerson: null,
pollingTime: null,
pollingStatus: 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 = '添加任务流程管理'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getGyyqTaskProcessManagement(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) {
updateGyyqTaskProcessManagement(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addGyyqTaskProcessManagement(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 delGyyqTaskProcessManagement(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {
this.download('industrial/gyyqTaskProcessManagement/export', {
...this.queryParams
}, `gyyqTaskProcessManagement_${new Date().getTime()}.xlsx`)
}
}
}
</script>