Commit 9c8ee7c5 authored by 耿迪迪's avatar 耿迪迪

任务下发 隐患反馈 gengdidi

parent 151f57e5
......@@ -27,7 +27,7 @@ import com.zehong.common.core.page.TableDataInfo;
* @date 2022-03-24
*/
@RestController
@RequestMapping("/system/info")
@RequestMapping("/system/hidden")
public class THiddenTroubleInfoController extends BaseController
{
@Autowired
......@@ -36,7 +36,7 @@ public class THiddenTroubleInfoController extends BaseController
/**
* 查询燃气隐患列表
*/
@PreAuthorize("@ss.hasPermi('system:info:list')")
@PreAuthorize("@ss.hasPermi('system:hidden:list')")
@GetMapping("/list")
public TableDataInfo list(THiddenTroubleInfo tHiddenTroubleInfo)
{
......@@ -53,7 +53,7 @@ public class THiddenTroubleInfoController extends BaseController
/**
* 导出燃气隐患列表
*/
@PreAuthorize("@ss.hasPermi('system:info:export')")
@PreAuthorize("@ss.hasPermi('system:hidden:export')")
@Log(title = "燃气隐患", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(THiddenTroubleInfo tHiddenTroubleInfo)
......@@ -66,7 +66,7 @@ public class THiddenTroubleInfoController extends BaseController
/**
* 获取燃气隐患详细信息
*/
@PreAuthorize("@ss.hasPermi('system:info:query')")
@PreAuthorize("@ss.hasPermi('system:hidden:query')")
@GetMapping(value = "/{hiddenTroubleId}")
public AjaxResult getInfo(@PathVariable("hiddenTroubleId") Long hiddenTroubleId)
{
......@@ -76,7 +76,7 @@ public class THiddenTroubleInfoController extends BaseController
/**
* 新增燃气隐患
*/
@PreAuthorize("@ss.hasPermi('system:info:add')")
@PreAuthorize("@ss.hasPermi('system:hidden:add')")
@Log(title = "燃气隐患", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo)
......@@ -87,7 +87,7 @@ public class THiddenTroubleInfoController extends BaseController
/**
* 修改燃气隐患
*/
@PreAuthorize("@ss.hasPermi('system:info:edit')")
@PreAuthorize("@ss.hasPermi('system:hidden:edit')")
@Log(title = "燃气隐患", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo)
......@@ -98,7 +98,7 @@ public class THiddenTroubleInfoController extends BaseController
/**
* 删除燃气隐患
*/
@PreAuthorize("@ss.hasPermi('system:info:remove')")
@PreAuthorize("@ss.hasPermi('system:hidden:remove')")
@Log(title = "燃气隐患", businessType = BusinessType.DELETE)
@DeleteMapping("/{hiddenTroubleIds}")
public AjaxResult remove(@PathVariable Long[] hiddenTroubleIds)
......
......@@ -83,6 +83,17 @@ public class THiddenTroubleInfo extends BaseEntity
@Excel(name = "备注")
private String remarks;
/**上报人名称*/
private String reportPersonName;
public String getReportPersonName() {
return reportPersonName;
}
public void setReportPersonName(String reportPersonName) {
this.reportPersonName = reportPersonName;
}
public void setHiddenTroubleId(Long hiddenTroubleId)
{
this.hiddenTroubleId = hiddenTroubleId;
......
......@@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="hiddenTroubleDealFinishTime" column="hidden_trouble_deal_finish_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
<result property="reportPersonName" column="report_person_name" />
</resultMap>
<sql id="selectTHiddenTroubleInfoVo">
select hidden_trouble_id, work_id, hidden_trouble_name, hidden_trouble_level, hidden_trouble_type, longitude, latitude, picture_url, hidden_trouble_describe, report_time, (select u.user_name from sys_user u where u.user_id = report_person) AS report_person, hidden_trouble_deal_status, hidden_trouble_deal_condition, hidden_trouble_deal_finish_time, is_del, remarks from t_hidden_trouble_info
select hidden_trouble_id, work_id, hidden_trouble_name, hidden_trouble_level, hidden_trouble_type, longitude, latitude, picture_url, hidden_trouble_describe, report_time, (select u.user_name from sys_user u where u.user_id = report_person) AS report_person_name, report_person, hidden_trouble_deal_status, hidden_trouble_deal_condition, hidden_trouble_deal_finish_time, is_del, remarks from t_hidden_trouble_info
</sql>
<select id="selectTHiddenTroubleInfoList" parameterType="THiddenTroubleInfo" resultMap="THiddenTroubleInfoResult">
......
......@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询燃气隐患列表
export function listInfo(query) {
return request({
url: '/system/info/list',
url: '/system/hidden/list',
method: 'get',
params: query
})
......@@ -12,7 +12,7 @@ export function listInfo(query) {
// 查询燃气隐患
export function hiddenTroubleList(query) {
return request({
url: '/system/info/hiddenTroubleList',
url: '/system/hidden/hiddenTroubleList',
method: 'get',
params: query
})
......@@ -21,41 +21,41 @@ export function hiddenTroubleList(query) {
// 查询燃气隐患详细
export function getInfo(hiddenTroubleId) {
return request({
url: '/system/info/' + hiddenTroubleId,
url: '/system/hidden/' + hiddenTroubleId,
method: 'get'
})
}
// 新增燃气隐患
export function addInfo(data) {
export function addHiddenInfo(data) {
return request({
url: '/system/info',
url: '/system/hidden',
method: 'post',
data: data
})
}
// 修改燃气隐患
export function updateInfo(data) {
export function updateHiddenInfo(data) {
return request({
url: '/system/info',
url: '/system/hidden',
method: 'put',
data: data
})
}
// 删除燃气隐患
export function delInfo(hiddenTroubleId) {
export function delHiddenInfo(hiddenTroubleId) {
return request({
url: '/system/info/' + hiddenTroubleId,
url: '/system/hidden/' + hiddenTroubleId,
method: 'delete'
})
}
// 导出燃气隐患
export function exportInfo(query) {
export function exportHiddenInfo(query) {
return request({
url: '/system/info/export',
url: '/system/hidden/export',
method: 'get',
params: query
})
......
<template>
<div class="hidden">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="small"
@click="handleAdd"
v-if="!isView"
>新增隐患信息</el-button>
</el-col>
</el-row>
<!--隐患信息-->
<el-table :data="hiddenList">
<el-table-column label="隐患名称" align="center" prop="hiddenTroubleName" />
<el-table-column label="隐患等级" align="center" prop="hiddenTroubleLevel">
<template slot-scope="scope">
<span v-if="scope.row.hiddenTroubleLevel == '1'">I级</span>
<span v-if="scope.row.hiddenTroubleLevel == '2'">II级</span>
<span v-if="scope.row.hiddenTroubleLevel == '3'">III级</span>
</template>
</el-table-column>
<el-table-column label="隐患类型" align="center" prop="hiddenTroubleType">
<template slot-scope="scope">
<span v-if="item.dictValue == scope.row.hiddenTroubleType" v-for="item in hiddenTroubleOptions" :key="item.dictValue">
{{ item.dictLabel }}
</span>
</template>
</el-table-column>
<el-table-column label="隐患图片" align="center" prop="pictureUrl">
<template slot-scope="scope">
<el-image :src="scope.row.pictureUrl" :preview-src-list="[scope.row.pictureUrl]" v-if="scope.row.pictureUrl != '' && scope.row.pictureUrl != null" :z-index=5000 style="width: auto;height: auto;"></el-image>
</template>
</el-table-column>
<el-table-column label="上报时间" align="center" prop="reportTime" width="150">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.reportTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="上报人" align="center" prop="reportPersonName" />
<el-table-column label="处理状态" align="center" prop="hiddenTroubleDealStatus">
<template slot-scope="scope">
<span v-if="scope.row.hiddenTroubleDealStatus == '1'">待处理</span>
<span v-if="scope.row.hiddenTroubleDealStatus == '2'">处理中</span>
<span v-if="scope.row.hiddenTroubleDealStatus == '3'">已完成</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="viewDetail(scope.row,scope.$index)"
v-if="isView"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row,scope.$index)"
v-if="!isView"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-if="!isView"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 添加或修改燃气隐患对话框 -->
<el-dialog :title="title" :visible.sync="hiddenOpen" width="900px" append-to-body destroy-on-close @close="cancel">
<el-form ref="hiddenForm" :model="hiddenForm" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="隐患名称" prop="hiddenTroubleName">
<el-input v-model="hiddenForm.hiddenTroubleName" placeholder="请输入隐患名称" :disabled="isView"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患等级" prop="hiddenTroubleLevel">
<el-select v-model="hiddenForm.hiddenTroubleLevel" placeholder="请选择隐患类型" style="width: 330px" :disabled="isView">
<el-option label="I级" value="1" />
<el-option label="II级" value="2" />
<el-option label="III级" value="3" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="隐患类型" prop="hiddenTroubleType">
<el-select v-model="hiddenForm.hiddenTroubleType" placeholder="请选择隐患类型" style="width: 330px" :disabled="isView">
<el-option
v-for="dict in hiddenTroubleOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-row>
<el-col :span="24">
<el-form-item label="经纬度坐标" prop="longitude">
<el-col :span="8">
<el-input v-model="hiddenForm.longitude" placeholder="请输入经度" :disabled="isView"/>
</el-col>
<el-col :span="8" style="margin-left: 20px">
<el-input v-model="hiddenForm.latitude" placeholder="请输入纬度" :disabled="isView"/>
</el-col>
<el-col :span="4" style="margin-left: 30px">
<el-button type="primary" plain @click="MapdialogFun" v-if="!isView">选择经纬度</el-button>
</el-col>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="图片地址" prop="pictureUrl">
<MyFileUpload
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
v-if="!isView"
/>
<div style="width: 20%;" v-if="isView">
<el-image :src="hiddenForm.pictureUrl" :preview-src-list="[hiddenForm.pictureUrl]" style="width: auto;height: auto;" :z-index= "3000"></el-image>
</div>
<el-input v-show="false" disabled v-model="hiddenForm.pictureUrl"></el-input>
</el-form-item>
<el-form-item label="隐患描述" prop="hiddenTroubleDescribe">
<el-input v-model="hiddenForm.hiddenTroubleDescribe" type="textarea" placeholder="请输入隐患描述" :disabled="isView"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" v-if="!isView"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<GetPos
:dialogVisible.sync="dialogTableVisibles"
device=""
:devicePos="devicePos"
@close="dialogcancelFun"
@getPath="getPath"
style="z-index: 3000"
/>
</div>
</template>
<script>
import MyFileUpload from '@/components/MyFileUpload';
import GetPos from '@/components/GetPos';
import moment from "moment";
import { hiddenTroubleList, addHiddenInfo , updateHiddenInfo ,delHiddenInfo } from "@/api/operationMonitor/hiddenTrouble"
export default {
name: "HiddenTrouble",
components: {
MyFileUpload,
GetPos
},
props:{
workId:{
type:Number
},
//是否为查看
isView:{
type:Boolean,
default:true
}
},
data() {
return {
// 遮罩层
loading: true,
// 燃气隐患表格数据
/* infoList: [],*/
// 弹出层标题
title: "",
// 是否显示弹出层
hiddenOpen: false,
// 表单参数
hiddenForm: {
pictureUrl: ""
},
/**隐患信息数据*/
hiddenList:[],
// 表单校验
rules: {
hiddenTroubleName: [
{ required: true, message: "请输入隐患名称", trigger: "blur" }
],
hiddenTroubleLevel: [
{ required: true, message: "请输入隐患等级", trigger: "blur" }
],
hiddenTroubleType: [
{ required: true, message: "请输入隐患类型", trigger: "blur" }
],
longitude: [
{ required: true, message: "请输入经纬度", trigger: ["blur","change"] }
],
pictureUrl: [
{ required: true, message: "请上传图片", trigger: "blur" }
],
hiddenTroubleDescribe: [
{ required: true, message: "请输入隐患描述", trigger: "blur" }
]
},
fileList:[],
devicePos: [],
dialogTableVisibles: false,
hiddenTroubleOptions:[],
/**修改时当前数据下标*/
index: -1,
};
},
created(){
this.getDicts("t_hidden_trouble_type").then(response => {
this.hiddenTroubleOptions = response.data;
});
console.log("fdafdsafds",this.workId)
this.getHiddenInfoList({workId:this.workId});
},
methods: {
// 取消按钮
cancel() {
this.hiddenOpen = false;
this.fileList = [];
this.reset();
},
/**获取隐患信息*/
getHiddenInfoList(param){
hiddenTroubleList(param).then(res =>{
this.hiddenList = res.data;
/* this.hiddenList.forEach(item=>{
item.reportPersonName = item.reportPerson;
})*/
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.title = "新增隐患信息"
this.hiddenOpen = true;
},
/** 详情按钮操作 */
viewDetail(row,index) {
this.reset();
this.index = index;
this.hiddenForm = {...row};
this.title = "查看隐患信息"
this.hiddenOpen = true;
if (this.hiddenForm.pictureUrl) {
this.fileList.push({
url: this.hiddenForm.pictureUrl,
});
}
},
/** 修改按钮操作 */
handleUpdate(row,index) {
this.reset();
this.index = index;
this.hiddenForm = {...row};
console.log(row,"ffffffffff",this.hiddenForm);
this.title = "修改隐患信息"
this.hiddenOpen = true;
if (this.hiddenForm.pictureUrl) {
this.fileList.push({
url: this.hiddenForm.pictureUrl,
});
}
},
/** 提交按钮 */
submitForm() {
this.$refs["hiddenForm"].validate(valid => {
if (valid) {
if (this.hiddenForm.hiddenTroubleId != null) {
updateHiddenInfo(this.hiddenForm).then(response => {
this.msgSuccess("修改成功");
this.hiddenOpen = false;
this.getHiddenInfoList({workId:this.workId});
});
} else {
this.hiddenForm.workId = this.workId;
this.hiddenForm.reportTime = moment().format("YYYY-MM-DD HH:mm:ss");
this.hiddenForm.reportPersonName = this.$store.state.user.name;
this.hiddenForm.reportPerson = this.$store.state.user.userId;
addHiddenInfo(this.hiddenForm).then(response => {
this.msgSuccess("新增成功");
this.hiddenOpen = false;
this.getHiddenInfoList({workId:this.workId});
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const hiddenTroubleId = row.hiddenTroubleId;
this.$confirm('是否确认删除隐患名称为"' + row.hiddenTroubleName + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delHiddenInfo(hiddenTroubleId);
}).then(() => {
this.getHiddenInfoList({workId:this.workId});
this.msgSuccess("删除成功");
}).catch(() => {});
},
getFileInfo(res){
this.hiddenForm.pictureUrl = res.url;
},
listRemove(e) {
this.fileList = [];
},
// 表单重置
reset() {
this.hiddenForm = {
hiddenTroubleId: null,
workId: null,
hiddenTroubleName: null,
hiddenTroubleLevel: null,
hiddenTroubleType: null,
longitude: null,
latitude: null,
pictureUrl: null,
hiddenTroubleDescribe: null,
reportTime: null,
reportPerson: null,
hiddenTroubleDealStatus: null,
hiddenTroubleDealCondition: null,
hiddenTroubleDealFinishTime: null,
isDel: null,
remarks: null,
uniqueMark: null,
reportPersonName:null
};
this.resetForm("hiddenForm");
},
/**
* 经纬度坐标方法
*/
MapdialogFun() {
this.dialogTableVisibles = true;
},
/**
* 地图关闭方法
*/
dialogcancelFun() {
this.dialogTableVisibles = false;
},
/**
* 经纬度 选择
* @param res
*/
getPath(res){
//确认选择经纬度
this.hiddenForm.longitude = res[0];
this.hiddenForm.latitude = res[1];
},
/**父组件校验子组件数据*/
checkChildData(){
return this.hiddenList.length <=0;
}
}
}
</script>
<style lang="scss" scoped>
.hidden{
.el-dialog__header{
height: 52px;
}
}
</style>
......@@ -71,9 +71,10 @@
</template>
</el-table-column>
<!-- <el-table-column label="任务内容" align="center" prop="workContent" />-->
<el-table-column label="创建时间" align="center" prop="createTime" width="180"/>
<el-table-column label="创建单位" align="center" prop="workCreateEnterpriseName" />
<el-table-column label="指派单位" align="center" prop="workAssignEnterproseName" />
<el-table-column label="指派人" align="center" prop="workAssignMan" />
<el-table-column label="执行单位" align="center" prop="workAssignEnterproseName" />
<el-table-column label="执行人" align="center" prop="workAssignMan" />
<el-table-column label="任务状态" align="center" prop="workStatus">
<template slot-scope="scope">
<span v-if="scope.row.workStatus == 0" style="color: #ff7272">派发中</span>
......@@ -98,8 +99,8 @@
<!--<el-table-column label="图片路径" align="center" prop="iconUrl" />-->
<!-- <el-table-column label="整改方案" align="center" prop="rectificationPlan" />
<el-table-column label="整改结果" align="center" prop="rectificationResult" />-->
<el-table-column label="责任单位" align="center" prop="responsibleUnit" />
<el-table-column label="责任人员" align="center" prop="responsiblePerson" />
<!--<el-table-column label="责任单位" align="center" prop="responsibleUnit" />
<el-table-column label="责任人员" align="center" prop="responsiblePerson" />-->
<el-table-column label="截止日期" align="center" prop="expiryDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.expiryDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
......@@ -131,7 +132,7 @@
v-if="('zhengfu'== roleType || (('enterprise'== roleType || 'doubleRole' == roleType) && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId))&& scope.row.workStatus == '0'"
key="detele"
>删除</el-button>
<el-button v-if="'inpector'!= roleType && (scope.row.workAssignManId == '' || scope.row.workAssignManId == null) && scope.row.workStatus == '0'"
<el-button v-if="'inpector'!= roleType && (scope.row.workAssignManId == '' || scope.row.workAssignManId == null) && scope.row.workStatus == '0' && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId"
size="mini"
type="text"
icon="el-icon-edit"
......@@ -155,7 +156,7 @@
v-hasPermi="['system:order:edit']"
key="feedbook"
>反馈</el-button>
<el-button v-if="'zhengfu'!= roleType && scope.row.workStatus == '2'"
<el-button v-if="'inpector'!= roleType && scope.row.workStatus == '2' && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId"
size="mini"
type="text"
icon="el-icon-edit"
......@@ -163,6 +164,14 @@
v-hasPermi="['system:order:edit']"
key="sort"
>归档</el-button>
<el-button v-if="'zhengfu'!= roleType && scope.row.workStatus != '3'"
size="mini"
type="text"
icon="el-icon-edit"
@click="hiddenFeed(scope.row)"
v-hasPermi="['system:order:edit']"
key="hidden"
>隐患反馈</el-button>
</template>
</el-table-column>
</el-table>
......@@ -205,9 +214,9 @@
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="指派单位" prop="workAssignEnterproseId">
<!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />-->
<el-select v-model="form.workAssignEnterproseId" placeholder="请选择指派单位名称" style="width: 100%" @change="selectworkAssignEnterprose($event)" :disabled="isDetail || isEnterproser">
<el-form-item label="执行单位" prop="workAssignEnterproseId">
<!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入执行单位名称" />-->
<el-select v-model="form.workAssignEnterproseId" placeholder="请选择执行单位名称" style="width: 100%" @change="selectworkAssignEnterprose($event)" :disabled="isDetail || isEnterproser">
<el-option
v-for="item in enterprises"
:key="item.enterpriseId"
......@@ -218,9 +227,9 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="指派人" prop="workAssignMan">
<!--<el-input v-model="form.workAssignManId" placeholder="请输入指派人" />-->
<el-select v-model="form.workAssignManId" placeholder="请输入指派人" style="width: 100%" @change="selectInspection($event,'edit')" :disabled="isDetail" clearable>
<el-form-item label="执行人" prop="workAssignMan">
<!--<el-input v-model="form.workAssignManId" placeholder="请输入执行人" />-->
<el-select v-model="form.workAssignManId" placeholder="请输入执行人" style="width: 100%" @change="selectInspection($event,'edit')" :disabled="isDetail" clearable>
<el-option
v-for="item in inspectors"
:key="item.userId "
......@@ -350,9 +359,9 @@
<el-row>
<el-col :span="12">
<el-form-item label="指派单位" prop="workAssignEnterproseId">
<!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />-->
<el-select v-model="workForm.workAssignEnterproseId" placeholder="请选择指派单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)" :disabled="isEnterproser">
<el-form-item label="执行单位" prop="workAssignEnterproseId">
<!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入执行单位名称" />-->
<el-select v-model="workForm.workAssignEnterproseId" placeholder="请选择执行单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)" :disabled="isEnterproser">
<el-option
v-for="item in enterprises"
:key="item.enterpriseId"
......@@ -363,9 +372,9 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="指派人" prop="workAssignMan">
<!--<el-input v-model="form.workAssignManId" placeholder="请输入指派人" />-->
<el-select v-model="workForm.workAssignManId" placeholder="请输入指派人" style="width: 350px" @change="selectInspection($event,'work')">
<el-form-item label="执行人" prop="workAssignMan">
<!--<el-input v-model="form.workAssignManId" placeholder="请输入执行人" />-->
<el-select v-model="workForm.workAssignManId" placeholder="请输入执行人" style="width: 350px" @change="selectInspection($event,'work')">
<el-option
v-for="item in inspectors"
:key="item.userId "
......@@ -432,6 +441,37 @@
<el-button @click="cancelFeedBook"> </el-button>
</div>
</el-dialog>
<!-- 隐患反馈信息 -->
<el-dialog :title="title" :visible.sync="hiddenFeedOpen" width="900px" append-to-body @close="cancelHiddenFeedForm">
<el-form ref="hiddenFeedForm" :model="hiddenFeedForm" :rules="hiddenFeedRules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="任务标题" prop="workTitle">
<span>{{hiddenFeedForm.workTitle}}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务类型" prop="workType">
<span v-if="hiddenFeedForm.workType == '1'">入户安检</span>
<span v-if="hiddenFeedForm.workType == '2'">巡检</span>
<!-- <span v-if="feedBookForm.workType == '3'">报警巡查</span>-->
<span v-if="hiddenFeedForm.workType == '4'">其他</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="隐患信息" prop="hiddenInfo">
<HiddenFeedTrouble
:workId="hiddenFeedForm.workId"
:isView="false"
ref="hiddenChild"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitHiddenFeedForm"> </el-button>
<el-button @click="cancelHiddenFeedForm"> </el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -444,15 +484,24 @@ import { enterpriseLists } from "@/api/regulation/info";
import { getInspectionUsers } from "@/api/system/user";
import ScrollPane from "../../../layout/components/TagsView/ScrollPane";
import HiddenTrouble from "./components/HiddenTrouble";
import HiddenFeedTrouble from "./components/HiddenFeedTrouble"
export default {
name: "Order",
components: {
ScrollPane,
Editor,
MyFileUpload,
HiddenTrouble
HiddenTrouble,
HiddenFeedTrouble
},
data() {
const validateHiddenFeedInfo = (rule, value, callback) => {
if (this.$refs.hiddenChild.checkChildData()) {
callback(new Error("隐患信息不能为空!"));
} else {
callback();
}
};
return {
isOpen:false,
// 遮罩层
......@@ -526,7 +575,7 @@ export default {
{ required: true, message: "任务内容", trigger: "blur" }
],
workAssignEnterproseId: [
{ required: true, message: "指派单位", trigger: "blur" }
{ required: true, message: "执行单位", trigger: "blur" }
],
expiryDate: [
{ required: true, message: "截止时间", trigger: "blur" }
......@@ -535,10 +584,10 @@ export default {
//任务下发表单校验
workRules: {
workAssignEnterproseId: [
{ required: true, message: "指派单位", trigger: "blur" }
{ required: true, message: "执行单位", trigger: "blur" }
],
workAssignMan: [
{ required: true, message: "指派人", trigger: "blur" }
{ required: true, message: "执行人", trigger: "blur" }
]
},
//反馈校验
......@@ -559,7 +608,17 @@ export default {
},
feedBookOpen: false,
//详情隐患信息
hiddenInfoList:[]
hiddenInfoList:[],
hiddenFeedOpen:false,
hiddenFeedForm:{
hiddenList:[]
},
//反馈校验
hiddenFeedRules: {
hiddenInfo: [
{ type: "array", validator: validateHiddenFeedInfo, required: true }
]
}
};
},
......@@ -734,7 +793,7 @@ export default {
showPicture(row){
this.$refs['a'+row.workId].showViewer = true;
},
//指派单位
//执行单位
getEnterpriseLists(){
const param = {};
this.judgeOperateType(param);
......@@ -742,7 +801,7 @@ export default {
this.enterprises = response.rows;
});
},
//根据用户角色和操作类型设置指派人是否可选
//根据用户角色和操作类型设置执行人是否可选
judgeOperateType(param){
if(this.roleType != "zhengfu"){
param.enterpriseId = this.$store.state.user.enterpriseId;
......@@ -762,7 +821,7 @@ export default {
this.inspectors = response.data;
})
},
//选择指派单位
//选择执行单位
selectworkAssignEnterprose(enterpriseId){
this.form.workAssignManId = "";
this.workForm.workAssignManId = "";
......@@ -772,7 +831,7 @@ export default {
let enterpriseName = this.enterprises.find(val=>val.enterpriseId == enterpriseId).enterpriseName;
this.form.workAssignEnterproseName = enterpriseName;
},
//获取指派
//获取执行
selectInspection(userId,type){
if(userId){
let userName = this.inspectors.find(val=>val.userId == userId).userName;
......@@ -944,11 +1003,35 @@ export default {
getHiddenInfos(param){
hiddenTroubleList(param).then(res =>{
this.hiddenInfoList = res.data;
this.hiddenInfoList.forEach(item=>{
/*this.hiddenInfoList.forEach(item=>{
item.reportPersonName = item.reportPerson;
})
})*/
});
},
//隐患信息反馈
hiddenFeed(row){
this.title = "隐患反馈信息";
this.hiddenFeedOpen = true;
this.hiddenFeedForm.workId = row.workId;
this.hiddenFeedForm.workTitle = row.workTitle;
this.hiddenFeedForm.workType = row.workType;
},
//隐患反馈提交
submitHiddenFeedForm(){
this.$refs["hiddenFeedForm"].validate(valid => {
if (valid) {
this.msgSuccess("隐患信息反馈成功");
this.hiddenFeedOpen = false;
this.getList();
}
});
},
//隐患反馈取消
cancelHiddenFeedForm(){
this.hiddenFeedOpen = false;
this.hiddenFeedForm = {hiddenList:[]};
this.fileList = [];
},
}
};
</script>
......
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