Commit 40acc4e5 authored by 耿迪迪's avatar 耿迪迪

任务督办 gengdidi

parent 7617257a
package com.zehong.web.controller.operationMonitor;
import java.util.List;
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.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TSupervisorInfo;
import com.zehong.system.service.ITSupervisorInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 燃气督办Controller
*
* @author zehong
* @date 2022-03-31
*/
@RestController
@RequestMapping("/supervisor/info")
public class TSupervisorInfoController extends BaseController
{
@Autowired
private ITSupervisorInfoService tSupervisorInfoService;
/**
* 查询燃气督办列表
*/
@PreAuthorize("@ss.hasPermi('supervisor:info:list')")
@GetMapping("/list")
public TableDataInfo list(TSupervisorInfo tSupervisorInfo)
{
startPage();
List<TSupervisorInfo> list = tSupervisorInfoService.selectTSupervisorInfoList(tSupervisorInfo);
return getDataTable(list);
}
/**
* 查询燃气督办list
* @param tSupervisorInfo
* @return
*/
@GetMapping("/supervisorInfoList")
public AjaxResult supervisorInfoList(TSupervisorInfo tSupervisorInfo)
{
return AjaxResult.success( tSupervisorInfoService.selectTSupervisorInfoList(tSupervisorInfo));
}
/**
* 导出燃气督办列表
*/
@PreAuthorize("@ss.hasPermi('supervisor:info:export')")
@Log(title = "燃气督办", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSupervisorInfo tSupervisorInfo)
{
List<TSupervisorInfo> list = tSupervisorInfoService.selectTSupervisorInfoList(tSupervisorInfo);
ExcelUtil<TSupervisorInfo> util = new ExcelUtil<TSupervisorInfo>(TSupervisorInfo.class);
return util.exportExcel(list, "燃气督办数据");
}
/**
* 获取燃气督办详细信息
*/
@PreAuthorize("@ss.hasPermi('supervisor:info:query')")
@GetMapping(value = "/{supervisorId}")
public AjaxResult getInfo(@PathVariable("supervisorId") Long supervisorId)
{
return AjaxResult.success(tSupervisorInfoService.selectTSupervisorInfoById(supervisorId));
}
/**
* 新增燃气督办
*/
@PreAuthorize("@ss.hasPermi('supervisor:info:add')")
@Log(title = "燃气督办", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSupervisorInfo tSupervisorInfo)
{
return toAjax(tSupervisorInfoService.insertTSupervisorInfo(tSupervisorInfo));
}
/**
* 修改燃气督办
*/
@PreAuthorize("@ss.hasPermi('supervisor:info:edit')")
@Log(title = "燃气督办", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSupervisorInfo tSupervisorInfo)
{
return toAjax(tSupervisorInfoService.updateTSupervisorInfo(tSupervisorInfo));
}
/**
* 删除燃气督办
*/
@PreAuthorize("@ss.hasPermi('supervisor:info:remove')")
@Log(title = "燃气督办", businessType = BusinessType.DELETE)
@DeleteMapping("/{supervisorIds}")
public AjaxResult remove(@PathVariable Long[] supervisorIds)
{
return toAjax(tSupervisorInfoService.deleteTSupervisorInfoByIds(supervisorIds));
}
}
......@@ -7,13 +7,17 @@ import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.SysPost;
import com.zehong.system.domain.THiddenTroubleInfo;
import com.zehong.system.domain.TSupervisorInfo;
import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.service.ISysPostService;
import com.zehong.system.service.ITHiddenTroubleInfoService;
import com.zehong.system.service.ITSupervisorInfoService;
import com.zehong.system.service.ITWorkOrderService;
import com.zehong.system.service.impl.TSupervisorInfoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
......@@ -40,6 +44,9 @@ public class TWorkOrderController extends BaseController
@Autowired
private ITHiddenTroubleInfoService troubleInfoService;
@Autowired
private ITSupervisorInfoService itSupervisorInfoService;
/**
* 查询燃气任务列表
*/
......@@ -50,6 +57,16 @@ public class TWorkOrderController extends BaseController
startPage();
judgeUserRole(tWorkOrder);
List<TWorkOrder> list = tWorkOrderService.selectTWorkOrderList(tWorkOrder);
if(null != tWorkOrder.getWorkAssignEnterproseId()){
for(TWorkOrder order : list){
TSupervisorInfo tSupervisorInfo = new TSupervisorInfo();
tSupervisorInfo.setWorkId(order.getWorkId());
List<TSupervisorInfo> supervisorInfos = itSupervisorInfoService.selectTSupervisorInfoList(tSupervisorInfo);
if(null != supervisorInfos && supervisorInfos.size()>0){
order.setSupervisorInfoList(supervisorInfos);
}
}
}
return getDataTable(list);
}
......
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 燃气督办对象 t_supervisor_info
*
* @author zehong
* @date 2022-03-31
*/
public class TSupervisorInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 督办id */
private Long supervisorId;
/** 巡检任务id */
@Excel(name = "巡检任务id")
private Long workId;
/** 督办内容 */
@Excel(name = "督办内容")
private String supervisorContent;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setSupervisorId(Long supervisorId)
{
this.supervisorId = supervisorId;
}
public Long getSupervisorId()
{
return supervisorId;
}
public void setWorkId(Long workId)
{
this.workId = workId;
}
public Long getWorkId()
{
return workId;
}
public void setSupervisorContent(String supervisorContent)
{
this.supervisorContent = supervisorContent;
}
public String getSupervisorContent()
{
return supervisorContent;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("supervisorId", getSupervisorId())
.append("workId", getWorkId())
.append("supervisorContent", getSupervisorContent())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
......@@ -108,6 +108,16 @@ public class TWorkOrder extends BaseEntity
@Excel(name = "备注")
private String remarks;
private List<TSupervisorInfo> supervisorInfoList;
public List<TSupervisorInfo> getSupervisorInfoList() {
return supervisorInfoList;
}
public void setSupervisorInfoList(List<TSupervisorInfo> supervisorInfoList) {
this.supervisorInfoList = supervisorInfoList;
}
/**
* 隐患信息
*/
......
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TSupervisorInfo;
/**
* 燃气督办Mapper接口
*
* @author zehong
* @date 2022-03-31
*/
public interface TSupervisorInfoMapper
{
/**
* 查询燃气督办
*
* @param supervisorId 燃气督办ID
* @return 燃气督办
*/
public TSupervisorInfo selectTSupervisorInfoById(Long supervisorId);
/**
* 查询燃气督办列表
*
* @param tSupervisorInfo 燃气督办
* @return 燃气督办集合
*/
public List<TSupervisorInfo> selectTSupervisorInfoList(TSupervisorInfo tSupervisorInfo);
/**
* 新增燃气督办
*
* @param tSupervisorInfo 燃气督办
* @return 结果
*/
public int insertTSupervisorInfo(TSupervisorInfo tSupervisorInfo);
/**
* 修改燃气督办
*
* @param tSupervisorInfo 燃气督办
* @return 结果
*/
public int updateTSupervisorInfo(TSupervisorInfo tSupervisorInfo);
/**
* 删除燃气督办
*
* @param supervisorId 燃气督办ID
* @return 结果
*/
public int deleteTSupervisorInfoById(Long supervisorId);
/**
* 批量删除燃气督办
*
* @param supervisorIds 需要删除的数据ID
* @return 结果
*/
public int deleteTSupervisorInfoByIds(Long[] supervisorIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TSupervisorInfo;
/**
* 燃气督办Service接口
*
* @author zehong
* @date 2022-03-31
*/
public interface ITSupervisorInfoService
{
/**
* 查询燃气督办
*
* @param supervisorId 燃气督办ID
* @return 燃气督办
*/
public TSupervisorInfo selectTSupervisorInfoById(Long supervisorId);
/**
* 查询燃气督办列表
*
* @param tSupervisorInfo 燃气督办
* @return 燃气督办集合
*/
public List<TSupervisorInfo> selectTSupervisorInfoList(TSupervisorInfo tSupervisorInfo);
/**
* 新增燃气督办
*
* @param tSupervisorInfo 燃气督办
* @return 结果
*/
public int insertTSupervisorInfo(TSupervisorInfo tSupervisorInfo);
/**
* 修改燃气督办
*
* @param tSupervisorInfo 燃气督办
* @return 结果
*/
public int updateTSupervisorInfo(TSupervisorInfo tSupervisorInfo);
/**
* 批量删除燃气督办
*
* @param supervisorIds 需要删除的燃气督办ID
* @return 结果
*/
public int deleteTSupervisorInfoByIds(Long[] supervisorIds);
/**
* 删除燃气督办信息
*
* @param supervisorId 燃气督办ID
* @return 结果
*/
public int deleteTSupervisorInfoById(Long supervisorId);
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TSupervisorInfoMapper;
import com.zehong.system.domain.TSupervisorInfo;
import com.zehong.system.service.ITSupervisorInfoService;
/**
* 燃气督办Service业务层处理
*
* @author zehong
* @date 2022-03-31
*/
@Service
public class TSupervisorInfoServiceImpl implements ITSupervisorInfoService
{
@Autowired
private TSupervisorInfoMapper tSupervisorInfoMapper;
/**
* 查询燃气督办
*
* @param supervisorId 燃气督办ID
* @return 燃气督办
*/
@Override
public TSupervisorInfo selectTSupervisorInfoById(Long supervisorId)
{
return tSupervisorInfoMapper.selectTSupervisorInfoById(supervisorId);
}
/**
* 查询燃气督办列表
*
* @param tSupervisorInfo 燃气督办
* @return 燃气督办
*/
@Override
public List<TSupervisorInfo> selectTSupervisorInfoList(TSupervisorInfo tSupervisorInfo)
{
return tSupervisorInfoMapper.selectTSupervisorInfoList(tSupervisorInfo);
}
/**
* 新增燃气督办
*
* @param tSupervisorInfo 燃气督办
* @return 结果
*/
@Override
public int insertTSupervisorInfo(TSupervisorInfo tSupervisorInfo)
{
tSupervisorInfo.setCreateTime(DateUtils.getNowDate());
return tSupervisorInfoMapper.insertTSupervisorInfo(tSupervisorInfo);
}
/**
* 修改燃气督办
*
* @param tSupervisorInfo 燃气督办
* @return 结果
*/
@Override
public int updateTSupervisorInfo(TSupervisorInfo tSupervisorInfo)
{
return tSupervisorInfoMapper.updateTSupervisorInfo(tSupervisorInfo);
}
/**
* 批量删除燃气督办
*
* @param supervisorIds 需要删除的燃气督办ID
* @return 结果
*/
@Override
public int deleteTSupervisorInfoByIds(Long[] supervisorIds)
{
return tSupervisorInfoMapper.deleteTSupervisorInfoByIds(supervisorIds);
}
/**
* 删除燃气督办信息
*
* @param supervisorId 燃气督办ID
* @return 结果
*/
@Override
public int deleteTSupervisorInfoById(Long supervisorId)
{
return tSupervisorInfoMapper.deleteTSupervisorInfoById(supervisorId);
}
}
<?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.zehong.system.mapper.TSupervisorInfoMapper">
<resultMap type="TSupervisorInfo" id="TSupervisorInfoResult">
<result property="supervisorId" column="supervisor_id" />
<result property="workId" column="work_id" />
<result property="supervisorContent" column="supervisor_content" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTSupervisorInfoVo">
select supervisor_id, work_id, supervisor_content, create_by, create_time, is_del, remarks from t_supervisor_info
</sql>
<select id="selectTSupervisorInfoList" parameterType="TSupervisorInfo" resultMap="TSupervisorInfoResult">
<include refid="selectTSupervisorInfoVo"/>
<where>
<if test="workId != null "> and work_id = #{workId}</if>
<if test="supervisorContent != null and supervisorContent != ''"> and supervisor_content = #{supervisorContent}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTSupervisorInfoById" parameterType="Long" resultMap="TSupervisorInfoResult">
<include refid="selectTSupervisorInfoVo"/>
where supervisor_id = #{supervisorId}
</select>
<insert id="insertTSupervisorInfo" parameterType="TSupervisorInfo" useGeneratedKeys="true" keyProperty="supervisorId">
insert into t_supervisor_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="workId != null">work_id,</if>
<if test="supervisorContent != null">supervisor_content,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workId != null">#{workId},</if>
<if test="supervisorContent != null">#{supervisorContent},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTSupervisorInfo" parameterType="TSupervisorInfo">
update t_supervisor_info
<trim prefix="SET" suffixOverrides=",">
<if test="workId != null">work_id = #{workId},</if>
<if test="supervisorContent != null">supervisor_content = #{supervisorContent},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where supervisor_id = #{supervisorId}
</update>
<delete id="deleteTSupervisorInfoById" parameterType="Long">
delete from t_supervisor_info where supervisor_id = #{supervisorId}
</delete>
<delete id="deleteTSupervisorInfoByIds" parameterType="String">
delete from t_supervisor_info where supervisor_id in
<foreach item="supervisorId" collection="array" open="(" separator="," close=")">
#{supervisorId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询燃气督办列表
export function listSupervisorInfo(query) {
return request({
url: '/supervisor/info/list',
method: 'get',
params: query
})
}
// 查询燃气督办list
export function supervisorInfoList(query) {
return request({
url: '/supervisor/info/supervisorInfoList',
method: 'get',
params: query
})
}
// 查询燃气督办详细
export function getSupervisorInfo(supervisorId) {
return request({
url: '/supervisor/info/' + supervisorId,
method: 'get'
})
}
// 新增燃气督办
export function addSupervisorInfo(data) {
return request({
url: '/supervisor/info',
method: 'post',
data: data
})
}
// 修改燃气督办
export function updateSupervisorInfo(data) {
return request({
url: '/supervisor/info',
method: 'put',
data: data
})
}
// 删除燃气督办
export function delSupervisorInfo(supervisorId) {
return request({
url: '/supervisor/info/' + supervisorId,
method: 'delete'
})
}
// 导出燃气督办
export function exportSupervisorInfo(query) {
return request({
url: '/supervisor/info/export',
method: 'get',
params: query
})
}
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1648695033085" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2427" data-spm-anchor-id="a313x.7781069.0.i3" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M512.99 355.35l45.31 143.99h140.34l-112.75 75.77 44.3 134.06-116.94-85.87-117.32 84.82L440.2 574.5l-113.27-75.17h140.74l45.32-143.98m0-229.99l-97.97 301.51H98l256.48 178.2-97.98 294.51 256.49-186.14 256.49 187.64-97.97-296.24L928 426.87H610.96l-97.97-301.51z" fill="#d81e06" p-id="2428"></path></svg>
\ No newline at end of file
......@@ -58,10 +58,34 @@
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<!--<el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="任务标题" align="center" prop="workTitle" />
<el-table-column label="任务标题" align="center" prop="workTitle">
<template slot-scope="scope">
<span style="margin-left: 10px;display: inline-block">{{ scope.row.workTitle }}</span>
<el-popover
placement="right"
title="督办信息"
width="350"
trigger="click"
v-if="null!=scope.row.supervisorInfoList">
<div class="timeline">
<el-timeline>
<el-timeline-item
v-for="(activity, index) in scope.row.supervisorInfoList"
:key="index"
:timestamp="activity.createTime">
{{activity.supervisorContent}}
</el-timeline-item>
</el-timeline>
</div>
<!--<el-button slot="reference">click 激活</el-button>-->
<div style="display:inline-block;position:relative" slot="reference">
<img src="@/assets/image/start.svg" style="position:absolute;top:-15px;left:0;width: 20px;height: 20px"/>
</div>
</el-popover>
</template>
</el-table-column>
<el-table-column label="任务类型" align="center" prop="workType">
<template slot-scope="scope">
<span v-if="scope.row.workType == 1">入户安检</span>
......@@ -172,6 +196,14 @@
v-hasPermi="['system:order:edit']"
key="hidden"
>隐患反馈</el-button>
<el-button v-if="'zhengfu'== roleType && scope.row.workStatus != '2' && scope.row.workStatus != '3' && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId"
size="mini"
type="text"
icon="el-icon-edit"
@click="supervisor(scope.row)"
v-hasPermi="['system:order:edit']"
key="supervisor"
>督办</el-button>
</template>
</el-table-column>
</el-table>
......@@ -327,6 +359,32 @@
</el-col>
</el-row>
</el-form>
<div v-if="supervisorList.length > 0 && isDetail">
<div class="hiddenInfo">督办信息</div>
<el-timeline ref="timeline">
<el-timeline-item
v-for="(activity, index) in supervisorList"
:key="index"
:timestamp="activity.createTime"
v-show='index>1?false:true'>
<el-card>
{{activity.supervisorContent}}
</el-card>
</el-timeline-item>
</el-timeline>
<div style="width: 95%;position: relative;" @click="changeDisplay()" v-if="supervisorList.length >2">
<!-- <el-button type="primary"> -->
<i class="el-icon-arrow-down" v-if="isDisplay==false"
style="margin-left: 100px;color: #909399;font-size: 14px;">
<span style="text-decoration:underline">显示全部</span>
</i>
<i class="el-icon-arrow-up" v-else style="color: #909399;font-size: 14px;margin-left: 100px;">
<span style="text-decoration:underline">收起</span>
</i>
<!-- </el-button> -->
</div>
</div>
<div v-if="hiddenInfoList.length > 0">
<div class="hiddenInfo">隐患信息</div>
<HiddenTrouble
......@@ -472,12 +530,41 @@
<el-button @click="cancelHiddenFeedForm"> </el-button>
</div>
</el-dialog>
<!-- 督办 -->
<el-dialog :title="title" :visible.sync="supervisorOpen" width="900px" append-to-body @close="cancelSupervisor">
<el-form ref="supervisorForm" :model="supervisorForm" :rules="supervisorRules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="任务标题" prop="workTitle">
<!--<el-input v-model="feedBookForm.workTitle" placeholder="请输入任务标题"/>-->
<span>{{supervisorForm.workTitle}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务类型" prop="workType">
<span v-if="supervisorForm.workType == '1'">入户安检</span>
<span v-if="supervisorForm.workType == '2'">巡检</span>
<span v-if="supervisorForm.workType == '4'">其他</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="督办意见" prop="supervisorContent">
<el-input v-model="supervisorForm.supervisorContent" type="textarea" placeholder="督办意见" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitSupervisorForm"> </el-button>
<el-button @click="cancelSupervisor"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder } from "@/api/operationMonitor/order";
import { hiddenTroubleList } from "@/api/operationMonitor/hiddenTrouble"
import { addSupervisorInfo, supervisorInfoList } from "@/api/operationMonitor/supervisor"
import Editor from '@/components/Editor';
import MyFileUpload from '@/components/MyFileUpload';
import { enterpriseLists } from "@/api/regulation/info";
......@@ -520,7 +607,9 @@ export default {
// 总条数
total: 0,
// 燃气任务表格数据
orderList: [],
orderList: [
{activities:[]}
],
// 弹出层标题
title: "",
// 是否显示弹出层
......@@ -618,8 +707,20 @@ export default {
hiddenInfo: [
{ type: "array", validator: validateHiddenFeedInfo, required: true }
]
}
},
//督办form
supervisorForm: {},
//督办弹框
supervisorOpen: false,
//督办校验
supervisorRules:{
supervisorContent: [
{ required: true, message: "督办内容", trigger: "blur" }
]
},
supervisorList:[],
isDisplay: false,
showAndHide: false
};
},
created() {
......@@ -653,6 +754,12 @@ export default {
this.loading = true;
listOrder(this.queryParams).then(response => {
this.orderList = response.rows;
/* const param = response.rows;
param.forEach(item =>{
this.supervisorData(item);
})
this.orderList = param;
console.log(this.orderList,"fdsfdsfdfdsfd========")*/
this.total = response.total;
this.loading = false;
});
......@@ -872,6 +979,7 @@ export default {
this.getHiddenInfos({workId : this.form.workId});
this.getEnterpriseLists();
this.getInspectionUserList(response.data.workAssignEnterproseId);
this.supervisorData(this.form.workId);
});
},
//任务下发
......@@ -1032,6 +1140,61 @@ export default {
this.hiddenFeedForm = {hiddenList:[]};
this.fileList = [];
},
//督办
supervisor(row){
this.title = "任务督办";
this.supervisorOpen = true;
this.supervisorForm.workId = row.workId;
this.supervisorForm.workTitle = row.workTitle;
this.supervisorForm.workType = row.workType;
},
//督办提交
submitSupervisorForm(){
this.$refs["supervisorForm"].validate(valid => {
if (valid) {
this.supervisorForm.createBy = this.$store.state.user.userId;
addSupervisorInfo(this.supervisorForm).then(res =>{
this.msgSuccess("督办成功");
this.supervisorOpen = false;
this.getList();
});
}
});
},
//督办取消
cancelSupervisor(){
this.supervisorOpen = false;
this.supervisorForm = {};
},
//查询督办时间线
supervisorData(workId){
supervisorInfoList({workId: workId}).then(res =>{
this.supervisorList = res.data;
});
},
// 点击按钮显示隐藏
changeDisplay() {
this.isDisplay = !this.isDisplay
let $timeline = this.$refs.timeline;
if (!this.showAndHide) {
for (let i = 0; i < $timeline.$children.length; i++) {
if (i > 1) {
$timeline.$children[i].$el.style.display = "block";
}
}
this.showAndHide = true;
} else {
for (let i = 0; i < $timeline.$children.length; i++) {
if (i > 1) {
$timeline.$children[i].$el.style.display = "none";
}
}
this.showAndHide = false;
}
//$timeline.toggleRowExpansion(row,true)
}
}
};
</script>
......@@ -1042,4 +1205,23 @@ export default {
margin-left: 12px;
margin-bottom: 9px;
}
.timeline{
width: 330px;
height: 240px;
padding: 15px;
overflow-y: auto;
&::-webkit-scrollbar {
width: 5px;
background: #dfe4ed;
position: absolute;
top: 0;
}
&::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
// border-radius: 10px;
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #cccccc;
border-radius: 5px;
}
}
</style>
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