feat: 综合指挥支撑子系统平台 #22

Merged
ming merged 1 commits from zhoumingxiu into main 2024-03-25 17:05:21 +08:00
10 changed files with 1659 additions and 1 deletions
Showing only changes of commit f259d31086 - Show all commits

View File

@ -95,4 +95,12 @@ public class MachineVisionDefectDetectionController extends BaseController
{ {
return toAjax(machineVisionDefectDetectionService.deleteMachineVisionDefectDetectionByIds(ids)); return toAjax(machineVisionDefectDetectionService.deleteMachineVisionDefectDetectionByIds(ids));
} }
@GetMapping("/listTask")
public TableDataInfo listTask(MachineVisionDefectDetection machineVisionDefectDetection)
{
startPage();
List<MachineVisionDefectDetection> list = machineVisionDefectDetectionService.selectMachineVisionDefectDetectionListTask(machineVisionDefectDetection);
return getDataTable(list);
}
} }

View File

@ -26,6 +26,7 @@ public interface MachineVisionDefectDetectionMapper
* @return 机器视觉缺陷检测集合 * @return 机器视觉缺陷检测集合
*/ */
public List<MachineVisionDefectDetection> selectMachineVisionDefectDetectionList(MachineVisionDefectDetection machineVisionDefectDetection); public List<MachineVisionDefectDetection> selectMachineVisionDefectDetectionList(MachineVisionDefectDetection machineVisionDefectDetection);
public List<MachineVisionDefectDetection> selectMachineVisionDefectDetectionListTask(MachineVisionDefectDetection machineVisionDefectDetection);
/** /**
* 新增机器视觉缺陷检测 * 新增机器视觉缺陷检测

View File

@ -26,6 +26,7 @@ public interface IMachineVisionDefectDetectionService
* @return 机器视觉缺陷检测集合 * @return 机器视觉缺陷检测集合
*/ */
public List<MachineVisionDefectDetection> selectMachineVisionDefectDetectionList(MachineVisionDefectDetection machineVisionDefectDetection); public List<MachineVisionDefectDetection> selectMachineVisionDefectDetectionList(MachineVisionDefectDetection machineVisionDefectDetection);
public List<MachineVisionDefectDetection> selectMachineVisionDefectDetectionListTask(MachineVisionDefectDetection machineVisionDefectDetection);
/** /**
* 新增机器视觉缺陷检测 * 新增机器视觉缺陷检测

View File

@ -45,6 +45,11 @@ public class MachineVisionDefectDetectionServiceImpl implements IMachineVisionDe
return machineVisionDefectDetectionMapper.selectMachineVisionDefectDetectionList(machineVisionDefectDetection); return machineVisionDefectDetectionMapper.selectMachineVisionDefectDetectionList(machineVisionDefectDetection);
} }
@Override
public List<MachineVisionDefectDetection> selectMachineVisionDefectDetectionListTask(MachineVisionDefectDetection machineVisionDefectDetection) {
return machineVisionDefectDetectionMapper.selectMachineVisionDefectDetectionListTask(machineVisionDefectDetection);
}
/** /**
* 新增机器视觉缺陷检测 * 新增机器视觉缺陷检测
* *

View File

@ -34,7 +34,7 @@
<include refid="selectMachineVisionDefectDetectionVo"/> <include refid="selectMachineVisionDefectDetectionVo"/>
<where> <where>
<if test="imageId != null and imageId != ''"> and image_id = #{imageId}</if> <if test="imageId != null and imageId != ''"> and image_id = #{imageId}</if>
<if test="position != null and position != ''"> and position = #{position}</if> <if test="position != null and position != ''"> and position like concat('%', #{position}, '%')</if>
<if test="grayScale != null and grayScale != ''"> and gray_scale = #{grayScale}</if> <if test="grayScale != null and grayScale != ''"> and gray_scale = #{grayScale}</if>
<if test="zoom != null and zoom != ''"> and zoom = #{zoom}</if> <if test="zoom != null and zoom != ''"> and zoom = #{zoom}</if>
<if test="roi != null and roi != ''"> and roi = #{roi}</if> <if test="roi != null and roi != ''"> and roi = #{roi}</if>
@ -52,6 +52,7 @@
<if test="colEleven != null and colEleven != ''"> and col_eleven = #{colEleven}</if> <if test="colEleven != null and colEleven != ''"> and col_eleven = #{colEleven}</if>
<if test="colTwelve != null and colTwelve != ''"> and col_twelve = #{colTwelve}</if> <if test="colTwelve != null and colTwelve != ''"> and col_twelve = #{colTwelve}</if>
</where> </where>
order by col_six desc
</select> </select>
<select id="selectMachineVisionDefectDetectionById" parameterType="String" resultMap="MachineVisionDefectDetectionResult"> <select id="selectMachineVisionDefectDetectionById" parameterType="String" resultMap="MachineVisionDefectDetectionResult">
@ -140,4 +141,29 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="selectMachineVisionDefectDetectionListTask" parameterType="MachineVisionDefectDetection" resultMap="MachineVisionDefectDetectionResult">
<include refid="selectMachineVisionDefectDetectionVo"/>
<where>
col_five != '2'
<if test="imageId != null and imageId != ''"> and image_id = #{imageId}</if>
<if test="position != null and position != ''"> and position = #{position}</if>
<if test="grayScale != null and grayScale != ''"> and gray_scale = #{grayScale}</if>
<if test="zoom != null and zoom != ''"> and zoom = #{zoom}</if>
<if test="roi != null and roi != ''"> and roi = #{roi}</if>
<if test="colOne != null and colOne != ''"> and col_one = #{colOne}</if>
<if test="colTwo != null and colTwo != ''"> and col_two = #{colTwo}</if>
<if test="colThree != null and colThree != ''"> and col_three = #{colThree}</if>
<if test="colFour != null and colFour != ''"> and col_four = #{colFour}</if>
<if test="colSix != null and colSix != ''"> and col_six = #{colSix}</if>
<if test="interfaceType != null and interfaceType != ''"> and interface_type = #{interfaceType}</if>
<if test="colSeven != null and colSeven != ''"> and col_seven = #{colSeven}</if>
<if test="colEight != null and colEight != ''"> and col_eight = #{colEight}</if>
<if test="colNine != null and colNine != ''"> and col_nine = #{colNine}</if>
<if test="colTen != null and colTen != ''"> and col_ten = #{colTen}</if>
<if test="colEleven != null and colEleven != ''"> and col_eleven = #{colEleven}</if>
<if test="colTwelve != null and colTwelve != ''"> and col_twelve = #{colTwelve}</if>
</where>
order by col_six desc
</select>
</mapper> </mapper>

View File

@ -42,3 +42,11 @@ export function delDetection(id) {
method: 'delete' method: 'delete'
}) })
} }
export function listDetectionTask(query) {
return request({
url: '/machineVision/detection/listTask',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,433 @@
<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="position">
<el-input
v-model="queryParams.position"
placeholder="请输入事件名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="事件状态" prop="zoom">
<el-select v-model="queryParams.zoom" placeholder="请选择事件状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.emergency_rescue_incidents_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"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="detectionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="事件名称" align="center" prop="position" width="200"/>
<el-table-column label="事件描述" align="center" prop="grayScale" width="300"/>
<el-table-column label="事件状态" align="center" prop="zoom">
<template v-slot="scope">
<dict-tag
:options="dict.type.emergency_rescue_incidents_status"
:value="scope.row.zoom"
/>
</template>
</el-table-column>
<el-table-column label="发生时间" align="center" prop="colSix" width="150"/>
<el-table-column label="发生地点" align="center" prop="roi" width="200"/>
<el-table-column label="应急方案" align="center" prop="colTen" width="150"/>
<el-table-column label="救援资源" align="center" prop="colEight" width="200"/>
<el-table-column label="汇报时间" align="center" prop="colOne" width="150"/>
<el-table-column label="汇报人" align="center" prop="colTwo"/>
<el-table-column label="汇报内容" align="center" prop="imageId" width="200"/>
<el-table-column label="是否下发" align="center" prop="colThree">
<template v-slot="scope">
<dict-tag
:options="dict.type.emergency_rescue_allots"
:value="scope.row.colThree"
/>
</template>
</el-table-column>
<!-- <el-table-column label="任务接收人" align="center" prop="colFour" width="150"/>
<el-table-column label="任务执行时间" align="center" prop="colSeven" width="150"/>
<el-table-column label="任务状态" align="center" prop="colFive">
<template v-slot="scope">
<dict-tag
:options="dict.type.patrol_task"
:value="scope.row.colFive"
/>
</template>
</el-table-column>
<el-table-column label="任务反馈" align="center" prop="colNine"/>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-download"
@click="handleAllots(scope.row)"
v-if="scope.row.colThree === '20'"
>下发
</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="100px">
<el-form-item label="事件名称" prop="position">
<el-input v-model="form.position" placeholder="请输入事件名称"/>
</el-form-item>
<el-form-item label="事件描述" prop="grayScale">
<el-input v-model="form.grayScale" placeholder="请输入事件描述"/>
</el-form-item>
<el-form-item label="事件状态" prop="zoom">
<el-select v-model="form.zoom" placeholder="请选择事件状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.emergency_rescue_incidents_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发生地点" prop="roi">
<el-input v-model="form.roi" placeholder="请输入发生地点"/>
</el-form-item>
<el-form-item label="发生时间" prop="colSix">
<el-date-picker
style="width: 100%"
v-model="form.colSix"
type="datetime"
placeholder="请选择发生时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="应急方案" prop="colTen">
<el-input v-model="form.colTen" placeholder="请输入应急方案"/>
</el-form-item>
<el-form-item label="汇报人" prop="colTwo">
<el-input v-model="form.colTwo" placeholder="请输入汇报人"/>
</el-form-item>
<el-form-item label="汇报时间" prop="colOne">
<el-date-picker
style="width: 100%"
v-model="form.colOne"
type="datetime"
placeholder="请选择汇报时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="汇报内容" prop="imageId">
<el-input v-model="form.imageId" placeholder="请输入汇报内容"/>
</el-form-item>
<el-form-item label="救援资源" prop="colEight">
<el-input v-model="form.colEight" placeholder="请输入救援资源"/>
</el-form-item>
<el-form-item label="是否下发" prop="colThree">
<el-select v-model="form.colThree" placeholder="请选择是否下发" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.emergency_rescue_allots"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="任务接收人" prop="colFour">
<el-input v-model="form.colFour" placeholder="请输入任务接收人"/>
</el-form-item>
<el-form-item label="任务状态" prop="colFive">
<el-select v-model="form.colFive" placeholder="请选择任务状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.patrol_task"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="任务执行时间" prop="colSeven">
<el-date-picker
style="width: 100%"
v-model="form.colSeven"
type="datetime"
placeholder="请选择任务执行时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="任务反馈" prop="colNine">
<el-input v-model="form.colNine" 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>
<el-dialog :title="title" :visible.sync="openAllots" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="任务接收人" prop="colFour">
<el-input v-model="form.colFour" placeholder="请输入任务接收人"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="finishAllots"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {listDetection, getDetection, delDetection, addDetection, updateDetection} from "@/api/machineVision/detection";
const interfaceType = "EmergencyRescue"
export default {
name: "Detection",
dicts: ['patrol_task', 'emergency_rescue_incidents_status', 'emergency_rescue_allots'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
detectionList: [],
//
title: "",
//
open: false,
openAllots: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
imageId: null,
position: null,
grayScale: null,
zoom: null,
roi: null,
colOne: null,
colTwo: null,
colThree: null,
colFour: null,
colFive: null,
colSix: null,
colSeven: null,
colEight: null,
colNine: null,
colTen: null,
interfaceType: interfaceType
},
//
form: {},
//
rules: {}
};
},
created() {
this.getList();
},
methods: {
/** 查询应急救援管理列表 */
getList() {
this.loading = true;
listDetection(this.queryParams).then(response => {
this.detectionList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.openAllots = false;
this.reset();
this.getList()
},
//
reset() {
this.form = {
id: null,
imageId: null,
position: null,
grayScale: null,
zoom: null,
roi: null,
colOne: null,
colTwo: null,
colThree: "20",
colFour: null,
colFive: null,
colSix: null,
colSeven: null,
colEight: null,
colNine: null,
colTen: null,
interfaceType: interfaceType
};
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
getDetection(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) {
updateDetection(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDetection(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 delDetection(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('machineVision/detection/export', {
...this.queryParams
}, `detection_${new Date().getTime()}.xlsx`)
},
/** 修改按钮操作 */
handleAllots(row) {
this.reset();
this.form = row;
this.openAllots = true;
this.title = "下发应急救援任务";
},
finishAllots(){
this.form.colThree = "10"
this.form.colFive = "0"
this.form.zoom = "20"
updateDetection(this.form).then(response => {
this.$modal.msgSuccess("下发成功");
this.openAllots = false;
this.getList();
});
}
}
};
</script>

View File

@ -0,0 +1,392 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="事件名称" prop="position">
<el-input
v-model="queryParams.position"
placeholder="请输入事件名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务接收人" prop="colFour">
<el-input
v-model="queryParams.colFour"
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"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>反馈
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>-->
<el-table v-loading="loading" :data="detectionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="事件名称" align="center" prop="position" width="200"/>
<el-table-column label="任务内容" align="center" prop="imageId" width="200"/>
<!--<el-table-column label="事件描述" align="center" prop="grayScale" width="300"/>
<el-table-column label="事件状态" align="center" prop="zoom">
<template v-slot="scope">
<dict-tag
:options="dict.type.emergency_rescue_incidents_status"
:value="scope.row.zoom"
/>
</template>
</el-table-column>-->
<el-table-column label="发生时间" align="center" prop="colSix" width="150"/>
<el-table-column label="发生地点" align="center" prop="roi" width="200"/>
<el-table-column label="应急方案" align="center" prop="colTen" width="150"/>
<!-- <el-table-column label="救援资源" align="center" prop="colEight" width="200"/>
<el-table-column label="汇报时间" align="center" prop="colOne" width="150"/>
<el-table-column label="汇报人" align="center" prop="colTwo"/>-->
<!-- <el-table-column label="是否下发" align="center" prop="colThree">
<template v-slot="scope">
<dict-tag
:options="dict.type.emergency_rescue_allots"
:value="scope.row.colThree"
/>
</template>
</el-table-column>-->
<el-table-column label="任务状态" align="center" prop="colFive">
<template v-slot="scope">
<dict-tag
:options="dict.type.patrol_task"
:value="scope.row.colFive"
/>
</template>
</el-table-column>
<el-table-column label="任务接收人" align="center" prop="colFour" width="150"/>
<!-- <el-table-column label="任务执行时间" align="center" prop="colSeven" width="150"/>
<el-table-column label="任务反馈" align="center" prop="colNine" width="200"/>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>反馈
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</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="100px">
<el-form-item label="事件名称" prop="position">
<el-input v-model="form.position" placeholder="请输入事件名称" disabled/>
</el-form-item>
<el-form-item label="事件描述" prop="grayScale">
<el-input v-model="form.grayScale" placeholder="请输入事件描述" disabled/>
</el-form-item>
<el-form-item label="事件状态" prop="zoom">
<el-select v-model="form.zoom" placeholder="请选择事件状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.emergency_rescue_incidents_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发生地点" prop="roi">
<el-input v-model="form.roi" placeholder="请输入发生地点" disabled/>
</el-form-item>
<el-form-item label="发生时间" prop="colSix" >
<el-date-picker
disabled
style="width: 100%"
v-model="form.colSix"
type="datetime"
placeholder="请选择发生时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="应急方案" prop="colTen">
<el-input v-model="form.colTen" placeholder="请输入应急方案" disabled/>
</el-form-item>
<!-- <el-form-item label="汇报人" prop="colTwo">
<el-input v-model="form.colTwo" placeholder="请输入汇报人" disabled/>
</el-form-item>
<el-form-item label="汇报时间" prop="colOne" disabled>
<el-date-picker
style="width: 100%"
v-model="form.colOne"
type="datetime"
placeholder="请选择汇报时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>-->
<el-form-item label="任务内容" prop="imageId">
<el-input v-model="form.imageId" placeholder="请输入任务内容" disabled/>
</el-form-item>
<el-form-item label="救援资源" prop="colEight">
<el-input v-model="form.colEight" placeholder="请输入救援资源"/>
</el-form-item>
<!-- <el-form-item label="是否下发" prop="colThree">
<el-select v-model="form.colThree" placeholder="请选择是否下发" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.emergency_rescue_allots"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>-->
<el-form-item label="任务接收人" prop="colFour">
<el-input v-model="form.colFour" placeholder="请输入任务接收人"/>
</el-form-item>
<el-form-item label="任务状态" prop="colFive">
<el-select v-model="form.colFive" placeholder="请选择任务状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.patrol_task"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="任务执行时间" prop="colSeven">
<el-date-picker
style="width: 100%"
v-model="form.colSeven"
type="datetime"
placeholder="请选择任务执行时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="任务反馈" prop="colNine">
<el-input v-model="form.colNine" 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 {listDetectionTask, getDetection, delDetection, addDetection, updateDetection} from "@/api/machineVision/detection";
const interfaceType = "EmergencyRescue"
export default {
name: "Detection",
dicts: ['patrol_task', 'emergency_rescue_incidents_status', 'emergency_rescue_allots'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
detectionList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
imageId: null,
position: null,
grayScale: null,
zoom: null,
roi: null,
colOne: null,
colTwo: null,
colThree: "10",
colFour: null,
colFive: null,
colSix: null,
colSeven: null,
colEight: null,
colNine: null,
colTen: null,
interfaceType: interfaceType
},
//
form: {},
//
rules: {}
};
},
created() {
this.getList();
},
methods: {
/** 查询应急救援任务列表 */
getList() {
this.loading = true;
listDetectionTask(this.queryParams).then(response => {
this.detectionList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
imageId: null,
position: null,
grayScale: null,
zoom: null,
roi: null,
colOne: null,
colTwo: null,
colThree: null,
colFour: null,
colFive: null,
colSix: null,
colSeven: null,
colEight: null,
colNine: null,
colTen: null,
interfaceType: interfaceType
};
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
getDetection(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) {
updateDetection(this.form).then(response => {
this.$modal.msgSuccess("反馈成功");
this.open = false;
this.getList();
});
} else {
addDetection(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 delDetection(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('machineVision/detection/export', {
...this.queryParams
}, `detection_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,392 @@
<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="position">
<el-input
v-model="queryParams.position"
placeholder="请输入事件名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务状态" prop="colFive">
<el-select v-model="queryParams.colFive" placeholder="请选择任务状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.patrol_task"
: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"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>-->
<el-table v-loading="loading" :data="detectionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="事件名称" align="center" prop="position" width="200"/>
<!-- <el-table-column label="事件描述" align="center" prop="grayScale" width="300"/>
<el-table-column label="事件状态" align="center" prop="zoom">
<template v-slot="scope">
<dict-tag
:options="dict.type.emergency_rescue_incidents_status"
:value="scope.row.zoom"
/>
</template>
</el-table-column>
<el-table-column label="发生时间" align="center" prop="colSix" width="150"/>-->
<el-table-column label="发生地点" align="center" prop="roi" width="200"/>
<el-table-column label="应急方案" align="center" prop="colTen" width="150"/>
<!-- <el-table-column label="救援资源" align="center" prop="colEight" width="200"/>
<el-table-column label="汇报时间" align="center" prop="colOne" width="150"/>
<el-table-column label="汇报人" align="center" prop="colTwo"/>-->
<el-table-column label="任务内容" align="center" prop="imageId" width="200"/>
<!-- <el-table-column label="是否下发" align="center" prop="colThree">
<template v-slot="scope">
<dict-tag
:options="dict.type.emergency_rescue_allots"
:value="scope.row.colThree"
/>
</template>
</el-table-column>-->
<el-table-column label="任务状态" align="center" prop="colFive">
<template v-slot="scope">
<dict-tag
:options="dict.type.patrol_task"
:value="scope.row.colFive"
/>
</template>
</el-table-column>
<el-table-column label="任务接收人" align="center" prop="colFour" width="150"/>
<el-table-column label="任务执行时间" align="center" prop="colSeven" width="150"/>
<el-table-column label="任务反馈" align="center" prop="colNine" width="200"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</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="100px">
<el-form-item label="事件名称" prop="position">
<el-input v-model="form.position" placeholder="请输入事件名称"/>
</el-form-item>
<el-form-item label="事件描述" prop="grayScale">
<el-input v-model="form.grayScale" placeholder="请输入事件描述"/>
</el-form-item>
<el-form-item label="事件状态" prop="zoom">
<el-select v-model="form.zoom" placeholder="请选择事件状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.emergency_rescue_incidents_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发生地点" prop="roi">
<el-input v-model="form.roi" placeholder="请输入发生地点"/>
</el-form-item>
<el-form-item label="发生时间" prop="colSix">
<el-date-picker
style="width: 100%"
v-model="form.colSix"
type="datetime"
placeholder="请选择发生时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="应急方案" prop="colTen">
<el-input v-model="form.colTen" placeholder="请输入应急方案"/>
</el-form-item>
<el-form-item label="汇报人" prop="colTwo">
<el-input v-model="form.colTwo" placeholder="请输入汇报人"/>
</el-form-item>
<el-form-item label="汇报时间" prop="colOne">
<el-date-picker
style="width: 100%"
v-model="form.colOne"
type="datetime"
placeholder="请选择汇报时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="汇报内容" prop="imageId">
<el-input v-model="form.imageId" placeholder="请输入汇报内容"/>
</el-form-item>
<el-form-item label="救援资源" prop="colEight">
<el-input v-model="form.colEight" placeholder="请输入救援资源"/>
</el-form-item>
<el-form-item label="是否下发" prop="colThree">
<el-select v-model="form.colThree" placeholder="请选择是否下发" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.emergency_rescue_allots"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="任务接收人" prop="colFour">
<el-input v-model="form.colFour" placeholder="请输入任务接收人"/>
</el-form-item>
<el-form-item label="任务状态" prop="colFive">
<el-select v-model="form.colFive" placeholder="请选择任务状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.patrol_task"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="任务执行时间" prop="colSeven">
<el-date-picker
style="width: 100%"
v-model="form.colSeven"
type="datetime"
placeholder="请选择任务执行时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="任务反馈" prop="colNine">
<el-input v-model="form.colNine" 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 {listDetection, getDetection, delDetection, addDetection, updateDetection} from "@/api/machineVision/detection";
const interfaceType = "EmergencyRescue"
export default {
name: "Detection",
dicts: ['patrol_task', 'emergency_rescue_incidents_status', 'emergency_rescue_allots'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
detectionList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
imageId: null,
position: null,
grayScale: null,
zoom: null,
roi: null,
colOne: null,
colTwo: null,
colThree: "10",
colFour: null,
colFive: null,
colSix: null,
colSeven: null,
colEight: null,
colNine: null,
colTen: null,
interfaceType: interfaceType
},
//
form: {},
//
rules: {}
};
},
created() {
this.getList();
},
methods: {
/** 查询应急救援管理列表 */
getList() {
this.loading = true;
listDetection(this.queryParams).then(response => {
this.detectionList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
imageId: null,
position: null,
grayScale: null,
zoom: null,
roi: null,
colOne: null,
colTwo: null,
colThree: null,
colFour: null,
colFive: null,
colSix: null,
colSeven: null,
colEight: null,
colNine: null,
colTen: null,
interfaceType: interfaceType
};
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
getDetection(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) {
updateDetection(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDetection(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 delDetection(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('machineVision/detection/export', {
...this.queryParams
}, `detection_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,392 @@
<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="position">
<el-input
v-model="queryParams.position"
placeholder="请输入事件名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="事件状态" prop="zoom">
<el-select v-model="queryParams.zoom" placeholder="请选择事件状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.emergency_rescue_incidents_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"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>-->
<el-table v-loading="loading" :data="detectionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="事件名称" align="center" prop="position" width="200"/>
<el-table-column label="事件描述" align="center" prop="grayScale" width="300"/>
<el-table-column label="事件状态" align="center" prop="zoom">
<template v-slot="scope">
<dict-tag
:options="dict.type.emergency_rescue_incidents_status"
:value="scope.row.zoom"
/>
</template>
</el-table-column>
<el-table-column label="发生时间" align="center" prop="colSix" width="150"/>
<el-table-column label="发生地点" align="center" prop="roi" width="200"/>
<el-table-column label="应急方案" align="center" prop="colTen" width="150"/>
<el-table-column label="救援资源" align="center" prop="colEight" width="200"/>
<el-table-column label="汇报时间" align="center" prop="colOne" width="150"/>
<el-table-column label="汇报人" align="center" prop="colTwo"/>
<el-table-column label="汇报内容" align="center" prop="imageId" width="200"/>
<el-table-column label="是否下发" align="center" prop="colThree">
<template v-slot="scope">
<dict-tag
:options="dict.type.emergency_rescue_allots"
:value="scope.row.colThree"
/>
</template>
</el-table-column>
<el-table-column label="任务接收人" align="center" prop="colFour" width="150"/>
<el-table-column label="任务状态" align="center" prop="colFive">
<template v-slot="scope">
<dict-tag
:options="dict.type.patrol_task"
:value="scope.row.colFive"
/>
</template>
</el-table-column>
<el-table-column label="任务执行时间" align="center" prop="colSeven" width="150"/>
<el-table-column label="任务反馈" align="center" prop="colNine" width="200"/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</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="100px">
<el-form-item label="事件名称" prop="position">
<el-input v-model="form.position" placeholder="请输入事件名称"/>
</el-form-item>
<el-form-item label="事件描述" prop="grayScale">
<el-input v-model="form.grayScale" placeholder="请输入事件描述"/>
</el-form-item>
<el-form-item label="事件状态" prop="zoom">
<el-select v-model="form.zoom" placeholder="请选择事件状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.emergency_rescue_incidents_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发生地点" prop="roi">
<el-input v-model="form.roi" placeholder="请输入发生地点"/>
</el-form-item>
<el-form-item label="发生时间" prop="colSix">
<el-date-picker
style="width: 100%"
v-model="form.colSix"
type="datetime"
placeholder="请选择发生时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="应急方案" prop="colTen">
<el-input v-model="form.colTen" placeholder="请输入应急方案"/>
</el-form-item>
<el-form-item label="汇报人" prop="colTwo">
<el-input v-model="form.colTwo" placeholder="请输入汇报人"/>
</el-form-item>
<el-form-item label="汇报时间" prop="colOne">
<el-date-picker
style="width: 100%"
v-model="form.colOne"
type="datetime"
placeholder="请选择汇报时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="汇报内容" prop="imageId">
<el-input v-model="form.imageId" placeholder="请输入汇报内容"/>
</el-form-item>
<el-form-item label="救援资源" prop="colEight">
<el-input v-model="form.colEight" placeholder="请输入救援资源"/>
</el-form-item>
<el-form-item label="是否下发" prop="colThree">
<el-select v-model="form.colThree" placeholder="请选择是否下发" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.emergency_rescue_allots"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="任务接收人" prop="colFour">
<el-input v-model="form.colFour" placeholder="请输入任务接收人"/>
</el-form-item>
<el-form-item label="任务状态" prop="colFive">
<el-select v-model="form.colFive" placeholder="请选择任务状态" style="width: 100%;" clearable>
<el-option
v-for="dict in dict.type.patrol_task"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="任务执行时间" prop="colSeven">
<el-date-picker
style="width: 100%"
v-model="form.colSeven"
type="datetime"
placeholder="请选择任务执行时间"
value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item label="任务反馈" prop="colNine">
<el-input v-model="form.colNine" 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 {listDetection, getDetection, delDetection, addDetection, updateDetection} from "@/api/machineVision/detection";
const interfaceType = "EmergencyRescue"
export default {
name: "Detection",
dicts: ['patrol_task', 'emergency_rescue_incidents_status', 'emergency_rescue_allots'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
detectionList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
imageId: null,
position: null,
grayScale: null,
zoom: null,
roi: null,
colOne: null,
colTwo: null,
colThree: null,
colFour: null,
colFive: null,
colSix: null,
colSeven: null,
colEight: null,
colNine: null,
colTen: null,
interfaceType: interfaceType
},
//
form: {},
//
rules: {}
};
},
created() {
this.getList();
},
methods: {
/** 查询应急救援管理列表 */
getList() {
this.loading = true;
listDetection(this.queryParams).then(response => {
this.detectionList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
imageId: null,
position: null,
grayScale: null,
zoom: null,
roi: null,
colOne: null,
colTwo: null,
colThree: null,
colFour: null,
colFive: null,
colSix: null,
colSeven: null,
colEight: null,
colNine: null,
colTen: null,
interfaceType: interfaceType
};
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
getDetection(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) {
updateDetection(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDetection(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 delDetection(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('machineVision/detection/export', {
...this.queryParams
}, `detection_${new Date().getTime()}.xlsx`)
}
}
};
</script>