重庆市永川区,非法越界,明火识别,烟雾识别
This commit is contained in:
parent
219336a9a7
commit
b64c1a42e8
376
god-ui/src/views/cqycsjManage/crossBorder/index.vue
Normal file
376
god-ui/src/views/cqycsjManage/crossBorder/index.vue
Normal file
@ -0,0 +1,376 @@
|
||||
<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="nameInfo">
|
||||
<el-input
|
||||
v-model="queryParams.nameInfo"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工号" prop="personNumber">
|
||||
<el-input
|
||||
v-model="queryParams.personNumber"
|
||||
placeholder="请输入工号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测设备" prop="detectEquip">
|
||||
<el-input
|
||||
v-model="queryParams.detectEquip"
|
||||
placeholder="请输入监测设备"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发生时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeDetectTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域类型" prop="sexInfo">
|
||||
<el-input
|
||||
v-model="queryParams.sexInfo"
|
||||
placeholder="请输入区域类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域名称" prop="behaviour">
|
||||
<el-input
|
||||
v-model="queryParams.behaviour"
|
||||
placeholder="请输入区域名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警信息" prop="address">
|
||||
<el-input
|
||||
v-model="queryParams.address"
|
||||
placeholder="请输入报警信息"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['cqycsjManage:behaviour:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['cqycsjManage:behaviour:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['cqycsjManage:behaviour:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="behaviourList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="姓名" align="center" prop="nameInfo" />
|
||||
<el-table-column label="工号" align="center" prop="personNumber" />
|
||||
<el-table-column label="监测设备" align="center" prop="detectEquip" />
|
||||
<el-table-column label="发生时间" align="center" prop="detectTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.detectTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="区域类型" align="center" prop="sexInfo">
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="区域名称" align="center" prop="behaviour" />
|
||||
<!-- <el-table-column label="抓拍图片" align="center" prop="imageInfo" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <image-preview :src="scope.row.imageInfo" :width="50" :height="50"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="是否越界" align="center" prop="postRange" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.postRange === '否'">{{scope.row.postRange}}</el-tag>
|
||||
<el-tag type="danger" v-else-if="scope.row.postRange === '是'">{{scope.row.postRange}}</el-tag>
|
||||
<el-tag type="info" v-else>{{scope.row.postRange}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警信息" align="center" prop="address" />
|
||||
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['cqycsjManage:behaviour:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['cqycsjManage:behaviour:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改异常行为识别对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="姓名" prop="nameInfo">
|
||||
<el-input v-model="form.nameInfo" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工号" prop="personNumber">
|
||||
<el-input v-model="form.personNumber" placeholder="请输入工号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测设备" prop="detectEquip">
|
||||
<el-input v-model="form.detectEquip" placeholder="请输入监测设备" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发生时间" prop="detectTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.detectTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择发生时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域类型" prop="sexInfo">
|
||||
<el-input v-model="form.sexInfo" placeholder="请输入区域类型" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="区域名称" prop="behaviour">
|
||||
<el-input v-model="form.behaviour" placeholder="请输入区域名称" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="抓拍图片" prop="imageInfo">-->
|
||||
<!-- <image-upload v-model="form.imageInfo"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="是否越界" prop="postRange">
|
||||
<el-input v-model="form.postRange" placeholder="请输入是否越界" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警信息" prop="address">
|
||||
<el-input v-model="form.address" placeholder="请输入报警信息" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" 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 { listBehaviour, getBehaviour, delBehaviour, addBehaviour, updateBehaviour } from "@/api/cqycsjManage/behaviour";
|
||||
|
||||
export default {
|
||||
//非法越界识别
|
||||
name: "Behaviour",
|
||||
dicts: ['sys_user_sex'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 异常行为识别表格数据
|
||||
behaviourList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeDetectTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nameInfo: null,
|
||||
personNumber: null,
|
||||
detectEquip: null,
|
||||
detectTime: null,
|
||||
sexInfo: null,
|
||||
postRange: null,
|
||||
behaviour: null,
|
||||
imageInfo: null,
|
||||
address: null,
|
||||
dataType: "非法越界识别",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询异常行为识别列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeDetectTime && '' != this.daterangeDetectTime) {
|
||||
this.queryParams.params["beginDetectTime"] = this.daterangeDetectTime[0];
|
||||
this.queryParams.params["endDetectTime"] = this.daterangeDetectTime[1];
|
||||
}
|
||||
listBehaviour(this.queryParams).then(response => {
|
||||
this.behaviourList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
nameInfo: null,
|
||||
personNumber: null,
|
||||
detectEquip: null,
|
||||
detectTime: null,
|
||||
sexInfo: null,
|
||||
postRange: null,
|
||||
behaviour: null,
|
||||
imageInfo: null,
|
||||
address: null,
|
||||
dataType: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeDetectTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加非法越界识别";
|
||||
this.form.dataType = "非法越界识别";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getBehaviour(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) {
|
||||
updateBehaviour(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addBehaviour(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 delBehaviour(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('cqycsjManage/behaviour/export', {
|
||||
...this.queryParams
|
||||
}, `behaviour_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
510
god-ui/src/views/cqycsjManage/flame/index.vue
Normal file
510
god-ui/src/views/cqycsjManage/flame/index.vue
Normal file
@ -0,0 +1,510 @@
|
||||
<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="nameInfo">
|
||||
<el-input
|
||||
v-model="queryParams.nameInfo"
|
||||
placeholder="请输入区域名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型" prop="personNumber">
|
||||
<el-input
|
||||
v-model="queryParams.personNumber"
|
||||
placeholder="请输入设备类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测设备" prop="detectEquip">
|
||||
<el-input
|
||||
v-model="queryParams.detectEquip"
|
||||
placeholder="请输入监测设备"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeDetectTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="发生情况" prop="behaviour">
|
||||
<el-input
|
||||
v-model="queryParams.behaviour"
|
||||
placeholder="请输入发生情况"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['cqycsjManage:behaviour:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['cqycsjManage:behaviour:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['cqycsjManage:behaviour:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="behaviourList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="区域名称" align="center" prop="nameInfo" />
|
||||
<el-table-column label="设备类型" align="center" prop="personNumber" />
|
||||
<el-table-column label="监测设备" align="center" prop="detectEquip" />
|
||||
<el-table-column label="检测时间" align="center" prop="detectTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.detectTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="性别" align="center" prop="sexInfo">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sexInfo"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column label="发生情况" align="center" prop="behaviour" />
|
||||
<el-table-column label="抓拍图片" align="center" prop="imageInfo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.imageInfo" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理状态" align="center" prop="postRange" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.postRange === '已处理'">{{scope.row.postRange}}</el-tag>
|
||||
<el-tag type="danger" v-else-if="scope.row.postRange === '未处理'">{{scope.row.postRange}}</el-tag>
|
||||
<el-tag type="info" v-else>{{scope.row.postRange}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报警信息" align="center" prop="address" />
|
||||
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['cqycsjManage:behaviour:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['cqycsjManage:behaviour:remove']"
|
||||
>删除</el-button>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-video-camera"
|
||||
@click="playVideo(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="80px">
|
||||
<el-form-item label="区域名称" prop="nameInfo">
|
||||
<el-input v-model="form.nameInfo" placeholder="请输入区域名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型" prop="personNumber">
|
||||
<el-input v-model="form.personNumber" placeholder="请输入设备类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测设备" prop="detectEquip">
|
||||
<el-input v-model="form.detectEquip" placeholder="请输入监测设备" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检测时间" prop="detectTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.detectTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择检测时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="性别" prop="sexInfo">-->
|
||||
<!-- <el-select v-model="form.sexInfo" placeholder="请选择性别">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.sys_user_sex"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- ></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item label="发生情况" prop="behaviour">
|
||||
<el-input v-model="form.behaviour" placeholder="请输入发生情况" />
|
||||
</el-form-item>
|
||||
<el-form-item label="抓拍图片" prop="imageInfo">
|
||||
<image-upload v-model="form.imageInfo"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理状态" prop="postRange">
|
||||
<el-input v-model="form.postRange" placeholder="请输入处理状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警信息" prop="address">
|
||||
<el-input v-model="form.address" placeholder="请输入报警信息" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="文件上传">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
ref="uploadFile"
|
||||
action=""
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemoveFiles"
|
||||
:on-change="handleChangeFiles"
|
||||
:before-upload="beforeUploadFiles"
|
||||
:file-list="fileList"
|
||||
:auto-upload="true"
|
||||
multiple
|
||||
>
|
||||
<el-button size="small" type="primary">上传视频</el-button>
|
||||
<div slot="tip" class="el-upload__tip">只能上传mp4文件,且不超过100M</div>
|
||||
</el-upload>
|
||||
</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 :visible="isShow" width="600px" @close="closeDialog" class="videoBox">
|
||||
<video
|
||||
:src="videoUrl"
|
||||
controls
|
||||
autoplay
|
||||
class="video"
|
||||
width="100%"
|
||||
></video>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listBehaviour, getBehaviour, delBehaviour, addBehaviour, updateBehaviour } from "@/api/cqycsjManage/behaviour";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import request from "@/utils/request";
|
||||
|
||||
export default {
|
||||
//明火报警
|
||||
name: "Behaviour",
|
||||
dicts: ['sys_user_sex'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 异常行为识别表格数据
|
||||
behaviourList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeDetectTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nameInfo: null,
|
||||
personNumber: null,
|
||||
detectEquip: null,
|
||||
detectTime: null,
|
||||
sexInfo: null,
|
||||
postRange: null,
|
||||
behaviour: null,
|
||||
imageInfo: null,
|
||||
address: null,
|
||||
dataType: "明火报警",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
// 附件信息表格数据
|
||||
fileInfoList: [],
|
||||
fileList: [],
|
||||
//文件上传参数
|
||||
upload: {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// TODO 上传的地址
|
||||
url: "/species/video/upload/file",
|
||||
// 上传的图片地址
|
||||
imageUrl: "",
|
||||
//携带值
|
||||
data: {
|
||||
tableName: "",
|
||||
linkId: "",
|
||||
workId: "",
|
||||
},
|
||||
|
||||
},
|
||||
isShow: false,
|
||||
videoUrl: '',
|
||||
baseUrl: process.env.VUE_APP_BASE_API,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 视频播放
|
||||
playVideo(row) {
|
||||
this.isShow = true
|
||||
// 将接受的值赋值给src
|
||||
let url1 = row.sexInfo;
|
||||
// this.videoUrl=this.baseUrl+"/profile/upload/2023/10/24/水果_20231024154211A001.mp4";
|
||||
this.videoUrl = this.baseUrl + url1;
|
||||
},
|
||||
/**
|
||||
* 关闭视频
|
||||
*/
|
||||
closeDialog () {
|
||||
// 关闭弹框
|
||||
this.isShow = false
|
||||
this.videoUrl = '' // 清空数据 关闭视频播放
|
||||
},
|
||||
//提交上传
|
||||
submit() {
|
||||
this.submitUploadFiles();
|
||||
},
|
||||
|
||||
handlePreview(file, fileList) {
|
||||
console.log("--->>预览文件", file);
|
||||
},
|
||||
beforeUploadFiles: (file, fileList) => {
|
||||
// 处理文件
|
||||
// 阻止默认上传事件
|
||||
return false;
|
||||
},
|
||||
// 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。function(file, fileList)
|
||||
handleRemoveFiles(file, fileList) {
|
||||
this.fileList = fileList;
|
||||
},
|
||||
handleChangeFiles(file, fileList) {
|
||||
this.fileList = fileList;
|
||||
this.submitUploadFiles();
|
||||
},
|
||||
submitUploadFiles() {
|
||||
if (this.fileList.length === 0) {
|
||||
return this.$message.warning("请选取文件后再上传");
|
||||
}
|
||||
// 下面的代码将创建一个空的FormData对象:
|
||||
const formData = new FormData();
|
||||
// 你可以使用FormData.append来添加键/值对到表单里面;
|
||||
this.fileList.forEach((file) => {
|
||||
formData.append("files", file.raw);
|
||||
});
|
||||
|
||||
if (this.form.id && this.form.id != "null") {
|
||||
formData.set("workId", this.form.id);
|
||||
}
|
||||
formData.set("dataType", this.form.dataType);
|
||||
request({
|
||||
method: "POST",
|
||||
url: this.upload.url, //填写自己的接口
|
||||
data: formData, //填写包装好的formData对象
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success("上传成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
console.log("查看上传结果:",res);
|
||||
if (res.data) {
|
||||
this.form.sexInfo = res.data.fileUrl;
|
||||
}
|
||||
} else {
|
||||
this.$message.error("上传失败");
|
||||
}
|
||||
//清空fileList
|
||||
this.fileList = [];
|
||||
});
|
||||
// this.$refs.uploadFile.submit();
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** 查询异常行为识别列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeDetectTime && '' != this.daterangeDetectTime) {
|
||||
this.queryParams.params["beginDetectTime"] = this.daterangeDetectTime[0];
|
||||
this.queryParams.params["endDetectTime"] = this.daterangeDetectTime[1];
|
||||
}
|
||||
listBehaviour(this.queryParams).then(response => {
|
||||
this.behaviourList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
nameInfo: null,
|
||||
personNumber: null,
|
||||
detectEquip: null,
|
||||
detectTime: null,
|
||||
sexInfo: null,
|
||||
postRange: null,
|
||||
behaviour: null,
|
||||
imageInfo: null,
|
||||
address: null,
|
||||
dataType: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeDetectTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加明火报警";
|
||||
this.form.dataType = "明火报警";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getBehaviour(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) {
|
||||
updateBehaviour(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addBehaviour(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 delBehaviour(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('cqycsjManage/behaviour/export', {
|
||||
...this.queryParams
|
||||
}, `behaviour_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
370
god-ui/src/views/cqycsjManage/smoke/index.vue
Normal file
370
god-ui/src/views/cqycsjManage/smoke/index.vue
Normal file
@ -0,0 +1,370 @@
|
||||
<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="nameInfo">
|
||||
<el-input
|
||||
v-model="queryParams.nameInfo"
|
||||
placeholder="请输入区域名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域类型" prop="personNumber">
|
||||
<el-input
|
||||
v-model="queryParams.personNumber"
|
||||
placeholder="请输入区域类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测设备" prop="detectEquip">
|
||||
<el-input
|
||||
v-model="queryParams.detectEquip"
|
||||
placeholder="请输入监测设备"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeDetectTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="behaviour">
|
||||
<el-input
|
||||
v-model="queryParams.behaviour"
|
||||
placeholder="请输入负责人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['cqycsjManage:behaviour:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['cqycsjManage:behaviour:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['cqycsjManage:behaviour:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="behaviourList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="区域名称" align="center" prop="nameInfo" />
|
||||
<el-table-column label="区域类型" align="center" prop="personNumber" />
|
||||
<el-table-column label="监测设备" align="center" prop="detectEquip" />
|
||||
<el-table-column label="检测时间" align="center" prop="detectTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.detectTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="性别" align="center" prop="sexInfo">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sexInfo"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column label="负责人" align="center" prop="behaviour" />
|
||||
<el-table-column label="抓拍图片" align="center" prop="imageInfo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.imageInfo" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否烟雾" align="center" prop="postRange" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.postRange === '否'">{{scope.row.postRange}}</el-tag>
|
||||
<el-tag type="danger" v-else-if="scope.row.postRange === '是'">{{scope.row.postRange}}</el-tag>
|
||||
<el-tag type="info" v-else>{{scope.row.postRange}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预警信息" align="center" prop="address" />
|
||||
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['cqycsjManage:behaviour:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['cqycsjManage:behaviour:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改异常行为识别对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="区域名称" prop="nameInfo">
|
||||
<el-input v-model="form.nameInfo" placeholder="请输入区域名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域类型" prop="personNumber">
|
||||
<el-input v-model="form.personNumber" placeholder="请输入区域类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监测设备" prop="detectEquip">
|
||||
<el-input v-model="form.detectEquip" placeholder="请输入监测设备" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检测时间" prop="detectTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.detectTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择检测时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="性别" prop="sexInfo">-->
|
||||
<!-- <el-select v-model="form.sexInfo" placeholder="请选择性别">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.sys_user_sex"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- ></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item label="负责人" prop="behaviour">
|
||||
<el-input v-model="form.behaviour" placeholder="请输入负责人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="抓拍图片" prop="imageInfo">
|
||||
<image-upload v-model="form.imageInfo"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否烟雾" prop="postRange">
|
||||
<el-input v-model="form.postRange" placeholder="请输入是否烟雾" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预警信息" prop="address">
|
||||
<el-input v-model="form.address" placeholder="请输入报警信息" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" 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 { listBehaviour, getBehaviour, delBehaviour, addBehaviour, updateBehaviour } from "@/api/cqycsjManage/behaviour";
|
||||
|
||||
export default {
|
||||
//烟雾识别报警
|
||||
name: "Behaviour",
|
||||
dicts: ['sys_user_sex'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 异常行为识别表格数据
|
||||
behaviourList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeDetectTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nameInfo: null,
|
||||
personNumber: null,
|
||||
detectEquip: null,
|
||||
detectTime: null,
|
||||
sexInfo: null,
|
||||
postRange: null,
|
||||
behaviour: null,
|
||||
imageInfo: null,
|
||||
address: null,
|
||||
dataType: "烟雾识别报警",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询异常行为识别列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeDetectTime && '' != this.daterangeDetectTime) {
|
||||
this.queryParams.params["beginDetectTime"] = this.daterangeDetectTime[0];
|
||||
this.queryParams.params["endDetectTime"] = this.daterangeDetectTime[1];
|
||||
}
|
||||
listBehaviour(this.queryParams).then(response => {
|
||||
this.behaviourList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
nameInfo: null,
|
||||
personNumber: null,
|
||||
detectEquip: null,
|
||||
detectTime: null,
|
||||
sexInfo: null,
|
||||
postRange: null,
|
||||
behaviour: null,
|
||||
imageInfo: null,
|
||||
address: null,
|
||||
dataType: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeDetectTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加烟雾识别报警";
|
||||
this.form.dataType = "烟雾识别报警";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getBehaviour(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) {
|
||||
updateBehaviour(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addBehaviour(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 delBehaviour(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('cqycsjManage/behaviour/export', {
|
||||
...this.queryParams
|
||||
}, `behaviour_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user