消防资源统计功能模块

pull/6/head
liujun 2024-01-17 09:10:55 +08:00
parent 7e4ba6c714
commit 10dfc04e47
10 changed files with 3443 additions and 529 deletions

View File

@ -1,169 +0,0 @@
<template>
<div class="app-container">
<div class="rightCont">
<el-form label-width="50px">
<el-col :span="5">
<el-form-item label="名称:" label-width="110px">
<el-input v-model="form.FIRERESOURCES_NAME" style="width:206px" placeholder="请输入内容"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-form>
<div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="FIRERESOURCES_NAME" label="名称"/>
<el-table-column prop="FIRERESOURCES_TYPENAME" label="消防资源类型"/>
<el-table-column prop="LONGTITUDE" label="消防资源经纬度">
<template slot-scope="{row}">
{{ row.LONGTITUDE }} -- {{ row.LATITUDE }}
</template>
</el-table-column>
<el-table-column prop="CREATIME" label="创建时间"/>
</el-table>
<div class="page-btn-group">
<div>
<el-button @click="getBack"></el-button>
</div>
<pagination
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList()"/>
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree'
import TiandiMap from '../../../../components/TianMap/TiandiMap'
export default {
components: { Pagination, SelectTree, TiandiMap },
directives: { waves },
inject: ['setActiveName', 'getInfo', 'setInfo'],
data() {
return {
config: config,
firekzsImgs: [],
waitForDeleteImgs: [],
dialogImageUrl: '',
dialogVisible: false,
dialogFormMap: false,
map: null,
corpList: [],
marker: null,
describeList: [
{
code: '',
palce: '',
name: '',
type: '',
corp: '',
ramake: ''
}
],
addBtnType: true,
FIRE_RESOURCES_TYPE: '',
listLoading: true,
form: {
FIRERESOURCES_NAME: '',
FIRERESOURCES_TYPE: 'xfkzs01',
CORPINFO_ID: ''
},
diaLoading: false,
LONGTITUDE: '', //
LATITUDE: '', //
treeData: [],
typeData: [],
listQuery: {
page: 1,
limit: 20
},
ls: [],
dates: [],
total: 0,
KEYWORDS: '',
//
varList: []
}
},
created() {
this.form.CORPINFO_ID = this.getInfo().CORPINFO_ID
this.getList()
},
methods: {
getRowKey(row) {
return row.FIRE_DEVICE_ID
},
getQuery() {
this.getList()
},
//
getList() {
this.listLoading = true
this.varList = []
requestFN(
'/fireResources/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, this.form
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
}).catch((e) => {
this.listLoading = false
})
},
goKeyReset() {
this.form.FIRERESOURCES_NAME = ''
this.getList()
},
getBack() {
this.setActiveName('List')
}
}
}
</script>
<style scoped>
.returnBtn {
float: right;
}
.app-container {
display: flex; /**/
align-items: baseline;
}
.rightCont {
width: 100%
}
#map {
width: 1000px;
height: 500px;
}
</style>

View File

@ -0,0 +1,485 @@
<template>
<div class="app-container">
<el-form label-width="120px">
<el-row>
<el-col :span="4">
<el-form-item label="检查项关键字" label-width="120px">
<el-input v-model="KEYWORDS" placeholder="搜索"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="消防器材类型">
<el-select v-model="FIRE_DEVICE_TYPE" placeholder="请选择">
<el-option
v-for="item in typeData"
:key="item.NAME"
:label="item.NAME"
:value="item.BIANMA"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="20px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item style="text-align: right">
<el-button v-waves class="filter-item" type="info" icon="el-icon-bottom-right" size="mini" plain @click="dialogFormDaoru = true">
导入
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table v-loading="listLoading" ref="multipleTable" :data="varList" :row-key="getRowKey" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column :reserve-selection="true" type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="DEVICE_NAME" label="消防器材名称" />
<el-table-column prop="DEVICE_TYPE_NAME" label="消防器材类型" />
<el-table-column prop="FIRE_CHECK_STANDARD_ITEM" label="检查项" />
<el-table-column prop="EMPLOYER" label="单位名称" />
<el-table-column prop="OPERATTIME" label="导入时间" />
<el-table-column label="操作" align="center" width="450">
<template slot-scope="{row}">
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.FIRE_CHECK_STANDARD_ID)"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.FIRE_CHECK_STANDARD_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="batchDel"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='edit'?'修改':'新增'" width="600px">
<el-form ref="form" :rules="rules" :model="form" label-width="120px" style="width: 500px;">
<el-form-item label="请选择设备类型" prop="FIRE_DEVICE_TYPE">
<el-select v-model="form.FIRE_DEVICE_TYPE" placeholder="请选择">
<el-option
v-for="item in typeData"
:key="item.NAME"
:label="item.NAME"
:value="item.BIANMA"/>
</el-select>
</el-form-item>
<el-form-item label="消防器材名称" prop="DEVICE_NAME">
<el-input id="DEVICE_NAME" ref="DEVICE_NAME" v-model="form.DEVICE_NAME" maxlength="255" placeholder="这里输入..." />
</el-form-item>
<el-form-item label="单位名称" prop="EMPLOYER">
<el-input id="EMPLOYER" ref="EMPLOYER" v-model="form.EMPLOYER" maxlength="255" placeholder="这里输入..." />
</el-form-item>
<el-form-item label="检查项" prop="FIRE_CHECK_STANDARD_ITEM">
<el-input id="FIRE_CHECK_STANDARD_ITEM" ref="FIRE_CHECK_STANDARD_ITEM" v-model="form.FIRE_CHECK_STANDARD_ITEM" type="textarea"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormDaoru" title="导入" width="800px">
<template>
<div class="app-container">
<el-form ref="form" :model="daoruFrom" :rules="rules" label-width="120px" class="in-uploader">
<el-form-item label="请选择设备类型" prop="importType">
<el-select v-model="daoruFrom.FIRE_DEVICE_TYPE" placeholder="请选择">
<el-option
v-for="item in typeData"
:key="item.NAME"
:label="item.NAME"
:value="item.BIANMA"/>
</el-select>
</el-form-item>
<el-form-item label="上传附件" prop="FIELDS">
<div class="uploader">
<el-input v-model="daoruFrom.FFILEName" :disabled="true" />
<el-upload :before-upload="beforeFileUpload" class="avatar-uploader" action="#">
<el-button type="primary" icon="el-icon-upload" style="margin-left:10px">上传附件</el-button>
</el-upload>
<el-button v-waves type="success" icon="el-icon-right" style="margin-left:10px;width:150px" @click="getExcelModel">
导出模板
</el-button>
</div>
</el-form-item>
</el-form>
</div>
</template>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormDaoru = false"> </el-button>
<el-button type="primary" @click="goUpload"> </el-button>
</div>
</el-dialog>
<div v-html="styleText" />
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import SelectTree from '@/components/SelectTree'
import waves from '@/directive/waves' // waves directive
import vueQr from 'vue-qr'
import { upload } from '@/utils/upload'
import { Message } from 'element-ui'
export default {
components: { Pagination, SelectTree, vueQr },
directives: { waves },
inject: ['setActiveName', 'getInfo', 'setInfo'],
data() {
return {
styleText: '<style type="text/css" media="print">\n' + ' @page { size: landscape; }\n' + '</style>',
config: config,
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 20
},
total: 0,
KEYWORDS: this.$route.query.KEYWORDS || '',
DEPARTMENT_ID: '',
varList: [],
pd: {
RISKUNITNAME: '',
DEPT_NAME: '',
HEADMAN: '',
CORP_NAME: ''
},
qrcodeStr: '',
form: {
FIRE_CHECK_STANDARD_ID: '',
EMPLOYER: '',
FIRE_CHECK_STANDARD_ITEM: '',
DEVICE_NAME: '',
FIRE_DEVICE_TYPE: ''
},
rules: {
FIRE_DEVICE_TYPE: [{ required: true, message: '设备类型不能为空', trigger: 'blur' }],
DEVICE_NAME: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
importType: [{ required: true, message: '请选择器材类型', trigger: 'blur' }],
FIELDS: [{ required: true, message: '请选择文件', trigger: 'blur' }],
FIRE_CHECK_STANDARD_ITEM: [{ required: true, message: '检查标准不能为空', trigger: 'blur' }],
EMPLOYER: [{ required: true, message: '单位名称不能为空', trigger: 'blur' }]
},
defaultProps: {
value: 'id',
children: 'nodes',
label: 'name'
},
treeData: [],
typeData: [],
multipleSelectionAll: [], //
multipleSelection: [], //
dialogFormEdit: false,
dialogFormShow: false,
dialogType: 'add',
FIRE_DEVICE_TYPE: '',
dialogFormDaoru: false,
daoruFrom: {
FFILE: '',
FFILEName: '',
FIRE_DEVICE_TYPE: ''
}
}
},
created() {
this.getList()
this.getDict()
this.getTreeList()
},
methods: {
getQuery() {
this.getList()
},
getRowKey(row) {
return row.FIRE_CHECK_STANDARD_ID
},
getTreeList() {
requestFN(
'/department/listTree',
{}
).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
},
//
getuery() {
this.getList()
},
goKeyReset() {
this.KEYWORDS = ''
this.FIRE_DEVICE_TYPE = ''
this.getQuery()
},
//
getList() {
this.listLoading = true
requestFN(
'/fireCheckStandard/getList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.KEYWORDS,
FIRE_DEVICE_TYPE: this.FIRE_DEVICE_TYPE,
CORPINFO_ID: this.getInfo().CORPINFO_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
}).catch((e) => {
this.listLoading = false
})
},
//
handleAdd() {
this.dialogType = 'add'
this.dialogFormEdit = true
this.resetForm()
this.$refs.deptTree.clearHandle()
this.getDict()
},
//
handleEdit(ID) {
this.getDict()
this.dialogType = 'edit'
console.log(ID)
requestFN(
'/fireCheckStandard/getInfo',
{
FIRE_CHECK_STANDARD_ID: ID
}
).then((data) => {
this.form = Object.assign({}, data.res) // copy obj
const node = {}
node.id = this.form.FIRE_DEVICE_TYPE
this.dialogFormEdit = true
this.$refs.deptTree.clearHandle()
this.$nextTick(() => { // 使
this.$refs.deptTree.handleNodeClick(node)
})
}).catch((e) => {
this.listLoading = false
})
},
//
confirm() {
this.$refs.form.validate(valid => {
if (valid) {
this.listLoading = true
requestFN(
'/fireCheckStandard/' + this.dialogType,
this.form
).then((data) => {
this.listLoading = false
this.dialogFormEdit = false
this.getList()
}).catch((e) => {
this.listLoading = false
})
} else {
return false
}
})
},
beforeFileUpload(file) {
this.daoruFrom.FFILE = file
this.daoruFrom.FFILEName = file.name
this.$forceUpdate()
return false
},
goUpload() {
if (this.daoruFrom.FFILE === '') {
this.$message({
message: '必须选择文件',
type: 'error'
})
return false
}
if (this.daoruFrom.FIRE_DEVICE_TYPE === '') {
this.$message({
message: '必须选择设备类型',
type: 'error'
})
return false
}
const formData = new FormData()
Object.keys(this.daoruFrom).map(key => {
formData.append(key, this.daoruFrom[key])
})
upload(
'/fireCheckStandard/importExcelTemplate',
formData
).then((data) => {
if (data.msg) {
Message({
message: data.msg,
type: data.type,
duration: 5 * 1000
})
}
this.dialogFormDaoru = false
this.getList()
}).catch((e) => {
this.listLoading = false
})
},
getExcelModel() {
this.$confirm('确定要下载excel模板吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = false
window.location.href = config.httpurl + 'fireCheckStandard/excelModel'
}).catch(() => {
this.listLoading = false
})
this.listLoading = false
},
handleDelete(id) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/fireCheckStandard/delByIds',
{
DATA_IDS: id
}
).then((res) => {
if (res.result === 'success') {
this.$message({
message: '删除成功',
type: 'success'
})
}
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
batchDel() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const ids = _selectData.map((item, index) => {
return item.FIRE_CHECK_STANDARD_ID
}).join(',')
this.$confirm('确定要删除选中的数据吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/fireCheckStandard/delByIds',
{
DATA_IDS: ids
}
).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
//
hasButton() {
var keys = 'riskunit:add,riskunit:del,riskunit:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.riskunitfhadminadd //
this.del = data.riskunitfhadmindel //
this.edit = data.riskunitfhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
//
getDict() {
requestFN(
'dictionaries/getLevels',
{
DICTIONARIES_ID: '249151f04fd64132a949fdd430a7b9c5'
}
).then((data) => {
this.typeData = data.list
console.log(this.typeData)
})
},
resetForm() {
this.form = {
FIRE_CHECK_STANDARD_ID: '',
EMPLOYER: '',
FIRE_CHECK_STANDARD_ITEM: '',
DEVICE_NAME: '',
FIRE_DEVICE_TYPE: ''
}
},
goDetail(row) {
this.$parent.activeName = 'Info'
this.$parent.RISKUNIT_ID = row.RISKUNIT_ID
this.$parent.RISKUNITNAME = row.RISKUNITNAME
this.$parent.DEPT_NAME = row.DEPT_NAME
}
}
}
</script>
<style lang="sass" scoped>
.table-qrcode
text-align: center
padding-top: 20px
width: 100%
.filter-container
position: relative
.filter-flot
position: absolute
right: 0
top: 0
.uploader
width: 570px
display: flex
align-items: center
.el-form-item__content
line-height: 1
</style>

View File

@ -1,169 +0,0 @@
<template>
<div class="app-container">
<div class="rightCont">
<el-form label-width="50px">
<el-col :span="5">
<el-form-item label="名称:" label-width="110px">
<el-input v-model="form.FIRERESOURCES_NAME" style="width:206px" placeholder="请输入内容"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-form>
<div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="FIRERESOURCES_NAME" label="名称"/>
<el-table-column prop="FIRERESOURCES_TYPENAME" label="消防资源类型"/>
<el-table-column prop="LONGTITUDE" label="消防资源经纬度">
<template slot-scope="{row}">
{{ row.LONGTITUDE }} -- {{ row.LATITUDE }}
</template>
</el-table-column>
<el-table-column prop="CREATIME" label="创建时间"/>
</el-table>
<div class="page-btn-group">
<div>
<el-button @click="getBack"></el-button>
</div>
<pagination
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList()"/>
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree'
import TiandiMap from '../../../../components/TianMap/TiandiMap'
export default {
components: { Pagination, SelectTree, TiandiMap },
directives: { waves },
inject: ['setActiveName', 'getInfo', 'setInfo'],
data() {
return {
config: config,
firekzsImgs: [],
waitForDeleteImgs: [],
dialogImageUrl: '',
dialogVisible: false,
dialogFormMap: false,
map: null,
corpList: [],
marker: null,
describeList: [
{
code: '',
palce: '',
name: '',
type: '',
corp: '',
ramake: ''
}
],
addBtnType: true,
FIRE_RESOURCES_TYPE: '',
listLoading: true,
form: {
FIRERESOURCES_NAME: '',
FIRERESOURCES_TYPE: 'xfbf01',
CORPINFO_ID: ''
},
diaLoading: false,
LONGTITUDE: '', //
LATITUDE: '', //
treeData: [],
typeData: [],
listQuery: {
page: 1,
limit: 20
},
ls: [],
dates: [],
total: 0,
KEYWORDS: '',
//
varList: []
}
},
created() {
this.form.CORPINFO_ID = this.getInfo().CORPINFO_ID
this.getList()
},
methods: {
getRowKey(row) {
return row.FIRE_DEVICE_ID
},
getQuery() {
this.getList()
},
//
getList() {
this.listLoading = true
this.varList = []
requestFN(
'/fireResources/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, this.form
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
}).catch((e) => {
this.listLoading = false
})
},
goKeyReset() {
this.form.FIRERESOURCES_NAME = ''
this.getList()
},
getBack() {
this.setActiveName('List')
}
}
}
</script>
<style scoped>
.returnBtn {
float: right;
}
.app-container {
display: flex; /**/
align-items: baseline;
}
.rightCont {
width: 100%
}
#map {
width: 1000px;
height: 500px;
}
</style>

View File

@ -0,0 +1,315 @@
<template>
<div class="app-container">
<el-form label-width="120px">
<el-row>
<el-col :span="6">
<el-form-item label="检查表名称">
<el-input v-model="KEYWORDS" placeholder="请输入关键字" class="filter-item" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="周期内检查状态">
<el-select v-model="STATUS" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in statusList" :key="item.ID" :label="item.NAME" :value="item.ID" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="部门">
<SelectTree ref="deptTree_Select" :clearable="false" :options="treeData" :props="defaultProps" v-model="DEPARTMENT_ID" placeholder="请选择部门" style="width: 100%;" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="人员">
<el-input v-model="USERNAME" placeholder="这里输入人员" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="排查周期">
<el-select v-model="PERIOD" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in periodList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div>
<el-table v-loading="listLoading" ref="multipleTable" :data="varList" :row-key="getRowKey" :header-cell-style="{'font-weight': 'bold','color': '#000'}" tooltip-effect="dark" border fit highlight-current-row>
<el-table-column :reserve-selection="true" :selectable="selectable" type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="FIRE_CHECK_STANDARD_NAME" label="检查表名称" />
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
<el-table-column prop="USER_NAME" label="人员" width="90" align="center" show-overflow-tooltip />
<el-table-column prop="PERIODNAME" label="排查周期" width="90" align="center" />
<el-table-column prop="DATESTART" label="周期" width="260" align="center"/>
<el-table-column prop="COUNT" label="检查次数" width="90" align="center" />
<el-table-column prop="checkCount" label="周期内次数" width="120" align="center" show-overflow-tooltip>
<template slot-scope="{row}">
<template v-if="row.checkCount == 0">
<span class="color-red">{{ row.checkCount }}/1</span>
</template>
<template v-if="row.checkCount != 0">
<span>{{ row.checkCount }}/1</span>
</template>
</template>
</el-table-column>
<el-table-column prop="STATE" label="清单状态" width="90" align="center">
<template slot-scope="{row}">
<template v-if="row.STATE == 1">
禁用
</template>
<template v-if="row.STATE == 0">
启用
</template>
<template v-if="row.STATE == 2">
已删除
</template>
</template>
</el-table-column>
<el-table-column v-if="false" label="操作" align="center">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-tickets" size="mini" @click="goDetail(row.FIRE_CHECK_ID,row.FIRE_RECORD_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div >
<el-button @click="getBack"> </el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree'
export default {
components: { Pagination, SelectTree },
inject: ['setActiveName', 'getInfo', 'setInfo'],
directives: { waves },
data() {
return {
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 20
},
ls: [],
dates: [],
total: 0,
KEYWORDS: '',
varList: [],
pd: [],
defaultProps: {
value: 'id',
children: 'nodes',
label: 'name'
},
tableData: [{
number: '1',
listname: '菜市场上厕所从上次说',
bm: '海洋肥料车间(一期) ',
gw: '海洋肥料车间(一期)班长',
ry: '',
pczq: ' 每周',
zq: '2021-06-07 00:00:00-2021-06-13 23:59:59',
jccs: '1',
yhs: '1',
qdlx: '日常',
qdzt: '启用'
}],
STARTTIME: '',
ENDTIME: '',
DEPARTMENT_ID: '',
USERNAME: '',
periodList: [],
typeList: [],
PERIOD: '',
OVERTIME: '',
TYPE: '',
statusList: [
{ ID: '', NAME: '请选择' },
{ ID: '0', NAME: '未检查' },
{ ID: '1', NAME: '已检查' }
],
STATUS: '',
hasHiddenList: [
{ ID: '', NAME: '请选择' },
{ ID: '0', NAME: '无隐患' },
{ ID: '1', NAME: '有隐患' }
],
HASHIDDEN: '',
listingLevelList: [
{ 'BIANMA': '', 'NAME': '请选择' },
{ 'BIANMA': '1', 'NAME': '公司' }
],
overTimeList: [
{ ID: '', NAME: '请选择' },
{ ID: '1', NAME: '无超期' },
{ ID: '0', NAME: '有超期' }
],
LISTINGLEVEL: '',
treeData: []
}
},
created() {
this.getList()
this.getTreeData()
this.getDict()
},
methods: {
getRowKey(row) {
return row.FIRE_CHECK_ID
},
selectable(row, index) {
return row.STATE == 2
},
//
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
getTreeData() {
requestFN(
'/department/listTree',
{}
).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
},
//
getList() {
this.listLoading = true
requestFN(
'/fireRecord/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
STARTTIME: this.dates[0],
ENDTIME: this.dates[1],
DEPARTMENT_ID: this.DEPARTMENT_ID,
USERNAME: this.USERNAME,
PERIOD: this.PERIOD,
TYPE: this.TYPE,
STATUS: this.STATUS,
OVERTIME: this.OVERTIME,
HASHIDDEN: this.HASHIDDEN,
LISTINGLEVEL: this.LISTINGLEVEL,
KEYWORDS: this.KEYWORDS,
tm: new Date().getTime(),
CORPINFO_ID: this.getInfo().CORPINFO_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.ls = data.ls
this.total = data.page.totalResult
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
}, goKeyReset() {
this.KEYWORDS = ''
this.USERNAME = ''
this.PERIOD = ''
this.STATUS = ''
this.LISTINGLEVEL = ''
this.OVERTIME = ''
this.TYPE = ''
this.STARTTIME = ''
this.ENDTIME = ''
this.dates = []
this.$refs.deptTree_Select.clearHandle()
this.DEPARTMENT_ID = ''
this.getList()
this.getTreeData()
this.getDict()
}, getDict() {
requestFN(
'dictionaries/getLevels',
{
DICTIONARIES_ID: '4a3d0d99b0ea4e268c11dd0b18866917'
}
).then((data) => {
this.typeList = data.list
})
.catch((e) => {
this.listLoading = false
})
requestFN(
'dictionaries/getLevels',
{
DICTIONARIES_ID: 'f60cf0e8315b4993b6d6049dd29f2ba5'
}
).then((data) => {
this.periodList = data.list
})
.catch((e) => {
this.listLoading = false
})
requestFN(
'dictionaries/getLevels',
{
DICTIONARIES_ID: '4a661fa8aedc4d158c9cddaa9d2ec47e'
}
).then((data) => {
this.listingLevelList = this.listingLevelList.concat(data.list)
})
.catch((e) => {
this.listLoading = false
})
},
goDetail(id, FIRE_RECORD_ID) {
this.setActiveName('RecordInfo')
const info = this.getInfo()
info.FIRE_CHECK_ID = id
info.FIRE_RECORD_ID = FIRE_RECORD_ID
this.setInfo(info)
},
hasButton: function() {
var keys = 'checkrecord:add,checkrecord:del,checkrecord:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.checkrecordfhadminadd //
this.del = data.checkrecordfhadmindel //
this.edit = data.checkrecordfhadminedit //
this.toExcel = data.toExcel // excel
}).catch((e) => {
this.listLoading = false
})
},
getBack() {
this.setActiveName('List')
}
}
}
</script>
<style>
</style>

View File

@ -1,169 +0,0 @@
<template>
<div class="app-container">
<div class="rightCont">
<el-form label-width="50px">
<el-col :span="5">
<el-form-item label="名称:" label-width="110px">
<el-input v-model="form.FIRERESOURCES_NAME" style="width:206px" placeholder="请输入内容"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-form>
<div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="FIRERESOURCES_NAME" label="名称"/>
<el-table-column prop="FIRERESOURCES_TYPENAME" label="消防资源类型"/>
<el-table-column prop="LONGTITUDE" label="消防资源经纬度">
<template slot-scope="{row}">
{{ row.LONGTITUDE }} -- {{ row.LATITUDE }}
</template>
</el-table-column>
<el-table-column prop="CREATIME" label="创建时间"/>
</el-table>
<div class="page-btn-group">
<div>
<el-button @click="getBack"></el-button>
</div>
<pagination
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList()"/>
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree'
import TiandiMap from '../../../../components/TianMap/TiandiMap'
export default {
components: { Pagination, SelectTree, TiandiMap },
directives: { waves },
inject: ['setActiveName', 'getInfo', 'setInfo'],
data() {
return {
config: config,
firekzsImgs: [],
waitForDeleteImgs: [],
dialogImageUrl: '',
dialogVisible: false,
dialogFormMap: false,
map: null,
corpList: [],
marker: null,
describeList: [
{
code: '',
palce: '',
name: '',
type: '',
corp: '',
ramake: ''
}
],
addBtnType: true,
FIRE_RESOURCES_TYPE: '',
listLoading: true,
form: {
FIRERESOURCES_NAME: '',
FIRERESOURCES_TYPE: 'xfsy01',
CORPINFO_ID: ''
},
diaLoading: false,
LONGTITUDE: '', //
LATITUDE: '', //
treeData: [],
typeData: [],
listQuery: {
page: 1,
limit: 20
},
ls: [],
dates: [],
total: 0,
KEYWORDS: '',
//
varList: []
}
},
created() {
this.form.CORPINFO_ID = this.getInfo().CORPINFO_ID
this.getList()
},
methods: {
getRowKey(row) {
return row.FIRE_DEVICE_ID
},
getQuery() {
this.getList()
},
//
getList() {
this.listLoading = true
this.varList = []
requestFN(
'/fireResources/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, this.form
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.hasButton()
}).catch((e) => {
this.listLoading = false
})
},
goKeyReset() {
this.form.FIRERESOURCES_NAME = ''
this.getList()
},
getBack() {
this.setActiveName('List')
}
}
}
</script>
<style scoped>
.returnBtn {
float: right;
}
.app-container {
display: flex; /**/
align-items: baseline;
}
.rightCont {
width: 100%
}
#map {
width: 1000px;
height: 500px;
}
</style>

View File

@ -33,24 +33,10 @@
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column label="企业名称" align="center" prop="CORP_NAME"/>
<el-table-column label="属地" align="center" prop="COMPANY_AREA"/>
<el-table-column label="消防控制室数" align="center">
<el-table-column label="检查次数" align="center">
<template slot-scope="{row}">
<div class="link-type" @click="goControlRoomInfo({CORPINFO_ID:row.CORPINFO_ID,TYPE:'FireControlRoom'})">
{{ row.xiaoFangKongZhiShiNum }}
</div>
</template>
</el-table-column>
<el-table-column label="消防泵房数" align="center">
<template slot-scope="{row}">
<div class="link-type" @click="goControlRoomInfo({CORPINFO_ID:row.CORPINFO_ID,TYPE:'FirePumpRoom'})">
{{ row.xiaoFangBengFangNum }}
</div>
</template>
</el-table-column>
<el-table-column label="消防水源数" align="center">
<template slot-scope="{row}">
<div class="link-type" @click="goControlRoomInfo({CORPINFO_ID:row.CORPINFO_ID,TYPE:'FireResources'})">
{{ row.xiaoFangShuiYuanNum }}
<div class="link-type" @click="goControlRoomInfo({CORPINFO_ID:row.CORPINFO_ID,TYPE:'fireRecord'})">
{{ row.xiaoJianChaNum }}
</div>
</template>
</el-table-column>
@ -96,7 +82,7 @@ export default {
getList() {
this.loading = true
requestFN(
'/fireReport/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, this.form
'/fireReport/recordList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, this.form
).then((data) => {
this.list = data.list
this.total = data.page.totalResult

View File

@ -0,0 +1,431 @@
<template>
<div>
<div id="printTest" class="app-contprint print-midi">
<div class="level-title">
<h1>点位检查表基础信息</h1>
</div>
<div class="mb-20">
<table class="table-ui">
<tr>
<td class="tbg">点检表名称</td>
<td colspan="3">{{ form.FIRE_CHECK_STANDARD_NAME }}</td>
</tr>
<tr>
<td class="tbg">所属部门</td>
<td>{{ form.DEPARTMENTNAME }}</td>
<td class="tbg">所属岗位</td>
<td>{{ form.POSTNAME }}</td>
</tr>
<tr>
<td class="tbg">排查周期</td>
<td>{{ form.FIRE_CHECK_TYPE_NAME }}</td>
<td class="tbg">责任人</td>
<td>{{ form.USERNAME }}</td>
</tr>
<tr>
<td class="tbg">检查时间</td>
<td>{{ recordBase.CHECK_TIME }}</td>
<td class="tbg">检查周期</td>
<td v-if="form.FIRE_CHECK_TYPE !== 'checkPeriod0001'"> {{ recordBase.PERIODSTART.split(" ")[0] }}~{{ recordBase.PERIODEND.split(" ")[0] }}</td>
<td v-else> {{ recordBase.PERIODSTART.split(" ")[0] }}</td>
</tr>
<tr>
<td class="tbg">检查情况</td>
<td>
<template v-if="recordBase.FINISHED===1">
已检查
</template>
<template v-else>
未检查
</template>
</td>
<td class="tbg">检查人</td>
<td>{{ recordBase.USER_NAME }}</td>
</tr>
<tr v-if="qianming != ''">
<td class="tbg">签字</td>
<td colspan="3">
<img :src="qianming" style="width: 200px;height: 97px;">
</td>
</tr>
</table>
</div>
<div class="level-title">
<h1>检查内容</h1>
</div>
<div class="mb-20">
<table class="table-ui">
<tr>
<th width="55" style="text-align:center">序号</th>
<th>消防区域</th>
<th>消防点位</th>
<th>消防设备编号</th>
<th>检查情况</th>
<th>点位检查照片</th>
<!-- <th>点位合格照片</th>-->
</tr>
<template v-if="varList.length !== 0">
<tr v-for="(data,index) in varList" :key="index">
<td align="center">{{ index+1 }}</td>
<td>{{ data.FIRE_REGION_NAME }}</td>
<td>{{ data.FIRE_POINT_NAME }}</td>
<td>{{ data.FIRE_DEVICE_CODE }}</td>
<template v-if="data.ISNORMAL==0">
<template>
<td class="text-center" >
<a style="text-decoration: underline" @click="handelShowCheck(data.fireDeviceTypeList)"></a>
</td>
</template>
</template>
<template v-else-if="data.ISNORMAL==1 || data.ISNORMAL==3">
<td class="text-center" ><a style="text-decoration: underline" @click="goHidden(data.HIDDEN_ID)"></a></td>
</template>
<template v-else-if="data.ISNORMAL==2">
<td class="text-center" ><a style="text-decoration: underline">不涉及</a></td>
</template>
<template v-else-if="data.ISNORMAL==2">
<td class="text-center" ><a style="text-decoration: underline">不涉及</a></td>
</template>
<template v-else>
<td class="text-center" />
</template>
<template>
<td v-if="data.INDEX_F == '1'" :rowspan="data.ROWSPAN" class="text-center">
<a style="text-decoration: underline" @click="qualified(data.EQUIPMENT_POINT_ID,14)"></a>
</td>
</template>
<!-- <template>-->
<!-- <td v-if="data.INDEX_F == '1'" :rowspan="data.ROWSPAN" class="text-center">-->
<!-- <a style="text-decoration: underline" @click="qualified(data.QUALIFIED_PHOTOS_ID,115)"></a>-->
<!-- </td>-->
<!-- </template>-->
</tr>
</template>
<template v-else>
<tr>
<td colspan="7" style="text-align: center">暂无数据</td>
</tr>
</template>
</table>
</div>
<div class="mb-20">
<table class="table-ui">
<tr>
<th width="55" style="text-align:center">序号</th>
<th width="100">设备编号</th>
<th>隐患描述</th>
<th v-if="otherHiddenList.length !== 0" width="200"></th>
</tr>
<template v-if="otherHiddenList.length !== 0">
<tr v-for="(data,index) in otherHiddenList" :key="index">
<td align="center">{{ index+1 }}</td>
<td>{{ data.FIRE_DEVICE_CODE }}</td>
<td>{{ data.HIDDENDESCR }}</td>
<td class="noprint">
<el-button icon="el-icon-view" size="mini" @click="goHidden(data.HIDDEN_ID)"></el-button>
</td>
</tr>
</template>
<template v-else>
<tr>
<td colspan="3" style="text-align: center">暂无数据</td>
</tr>
</template>
</table>
</div>
</div>
<div class="ui-height" />
<div class="ui-foot">
<el-button v-print="'#printTest'" type="primary"> </el-button>
<el-button plain type="info" @click="back"> </el-button>
</div>
<!--检查项数组-->
<el-dialog :visible.sync="checkShow" title="检查项列表" width="80%">
<div>
<el-table
ref="multipleTableRisk"
:data="csList"
border
tooltip-effect="dark"
style="width: 100%;">
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="FIRE_CHECK_STANDARD_ITEM" label="检查项"/>
</el-table>
</div>
<div class="page-btn-group">
<div>
<el-button plain type="info" @click="closAddOtherPoint"> </el-button>
</div>
</div>
</el-dialog>
<!--检查照片-->
<el-dialog :visible.sync="dialogImgVisible" title="检查照片">
<el-form ref="imgForm" :model="imgForm" label-width="140px" style="padding:0 20px">
<el-row>
<el-col :span="24">
<el-form-item label="检查照片:">
<div class="disContent">
<div v-for="(item, index) in qualifiedImgs" :key="index" class="img-div">
<img :src="config.fileUrl + item.FILEPATH" alt="">
<div class="disContent-hide">
<el-tooltip class="item" effect="dark" content="预览" placement="top">
<span class="el-icon-zoom-in yuLan">
<viewer :images="qualifiedImgs">
<img :src="config.fileUrl + item.FILEPATH" alt="" class="yuLanImg">
</viewer>
</span>
</el-tooltip>
</div>
</div>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogImgVisible = false"> </el-button>
</div>
</el-dialog>
<information ref="information"/>
<div v-html="styleText" />
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import SelectTree from '@/components/SelectTree'
import information from '../../../hiddenUtil/information.vue'
export default {
components: { Pagination, SelectTree, information },
inject: ['setActiveName', 'getInfo', 'setInfo'],
directives: { waves },
data() {
return {
styleText: '<style type="text/css" media="print">\n' + ' @page { size: landscape; }\n' + '</style>',
SHOW_OR_EDIT: '',
treeData: [],
FIRE_RECORD_ID: '',
config: config,
imgForm: {},
checkShow: false,
csList: [],
qualifiedImgs: [],
qualifiedFiles: [],
dialogImgVisible: false,
defaultProps: {
value: 'id',
children: 'nodes',
label: 'name'
},
form: '',
pd: {
CHECK_TIME: '',
DEPARTMENT_ID: '',
USER_ID: ''
},
recordBase: '',
qianming: '',
otherHiddenList: [],
varList: [],
// myself
FIRE_CHECK_ID: '',
expireTimeOPtion: {
disabledDate(time) {
return time.getTime() > Date.now() // -8.64e7
}
}
}
},
created() {
this.FIRE_CHECK_ID = this.getInfo().FIRE_CHECK_ID
this.FIRE_RECORD_ID = this.getInfo().FIRE_RECORD_ID
this.SHOW_OR_EDIT = this.$parent.SHOW_OR_EDIT
this.recordBase = Object.assign({}, this.$parent.row)
this.getData()
this.getSignImgs(this.FIRE_RECORD_ID)
},
methods: {
//
qualified(id, TYPE) {
if (id) {
this.qualifiedImgs = [] //
this.getQualifiedImgs(id, TYPE)
} else {
this.$message.warning('暂无照片')
}
},
handelShowCheck(varList) {
this.checkShow = true
this.csList = []
this.csList = varList
},
closAddOtherPoint() {
this.checkShow = false
},
getQualifiedImgs(EQUIPMENT_RECORD_ID, TYPE) {
this.listLoading = true
requestFN(
'/imgfiles/listImgs',
{
FOREIGN_KEY: EQUIPMENT_RECORD_ID,
TYPE: TYPE
}
).then((data) => {
this.qualifiedImgs = data.imgs
if (this.qualifiedImgs.length > 0) {
//
this.dialogImgVisible = true
} else {
//
this.$message({
message: '无检查照片',
type: 'error'
})
}
this.listLoading = false
}).catch((e) => {
this.listLoading = false
})
},
getSignImgs(FIRE_RECORD_ID) {
this.listLoading = true
requestFN(
'/imgfiles/listImgs',
{
FOREIGN_KEY: FIRE_RECORD_ID,
TYPE: '13'
}
).then((data) => {
this.qianming = this.config.fileUrl + data.imgs[0].FILEPATH
this.listLoading = false
}).catch((e) => {
this.listLoading = false
})
},
goHidden(id) {
this.$refs.information.init(id)
},
back() {
this.$parent.activeName = 'RecordList'
},
//
getData() {
this.listLoading = true
//
requestFN(
'/fireRecord/getInfo',
{
FIRE_CHECK_ID: this.FIRE_CHECK_ID,
FIRE_RECORD_ID: this.FIRE_RECORD_ID,
CORPINFO_ID: this.getInfo().CORPINFO_ID
}
).then((data) => {
this.listLoading = false
this.form = data.res// copy obj
this.varList = data.varList
if (data.otherHiddenList !== null) {
this.otherHiddenList = data.otherHiddenList
}
//
}).catch((e) => {
this.listLoading = false
})
}
}
}
</script>
<style lang="sass" scoped>
.avatar-uploader
ul
margin: 0
li
padding: 0
.el-dialog__body
padding: 0
.map-flex
display: flex
width: 500px
align-items: center
.ud-flex
display: flex
.form-group
display: flex
align-items: center
.form-label
padding: 0px 15px
font-size: 14px
width: 240px
font-weight: 400
text-align: right
margin-bottom: 18px
.star
color: red
padding-right: 4px
.input-block
display: flex
.disContent
display: flex
align-items: center
flex-wrap: wrap
.img-div
position: relative
margin: 0 10px 0px 0
width: 108px
height: 108px
border-radius: 4px
overflow: hidden
&>img
width: 100%
height: 100%
.disContent-hide
position: absolute
width: 100%
height: 100%
border-radius: 4px
background-color: rgba(48, 48, 48, 0.59)
display: none
top: 0
left: 0
line-height: 32px
.Delete
position: absolute
bottom: 14px
right: 10px
font-size: 16px
color: white
cursor: pointer
.yuLan
position: absolute
bottom: 23px
right: 50px
font-size: 16px
color: white
cursor: pointer
.yuLanImg
position: absolute
bottom: 0
right: 0
width: 100%
height: 100%
opacity: 0
.img-div:hover .disContent-hide
display: block
.pitchCss
border: 1px solid #202e78
transition: all linear 0.1s
width: 116px
height: 116px
</style>

View File

@ -0,0 +1,233 @@
<template>
<div class="app-container">
<el-form label-width="90px">
<el-row>
<el-col :span="4">
<el-form-item label="清单名称">
<el-input v-model="KEYWORDS" placeholder="请输入关键字" class="filter-item" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="检查日期">
<el-date-picker
:default-time="['00:00:00', '23:59:59']"
v-model="dates"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%;"
/>
</el-form-item>
</el-col>
<!-- <el-col :span="4">-->
<!-- <el-form-item label="检查状态">-->
<!-- <el-select v-model="STATUS" placeholder="请选择">-->
<!-- <el-option v-for="item in statusList" :key="item.ID" :label="item.NAME" :value="item.ID" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div>
<el-table ref="multipleTable" :row-key="getRowKey" :data="varList" border tooltip-effect="dark" style="width: 100%">
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="FIRE_CHECK_STANDARD_NAME" label="清单名称"/>
<el-table-column prop="USER_NAME" label="检查人" width="90" align="center" show-overflow-tooltip />
<el-table-column prop="CHECK_TIME" label="检查时间" />
<el-table-column label="检查周期">
<template slot-scope="{row}">
<template v-if="row.PERIODSTART && row.PERIODEND">
{{ row.PERIODSTART }}-{{ row.PERIODEND }}
</template>
</template>
</el-table-column>
<el-table-column prop="qdlx" label="检查状态" width="120" align="center">
<template slot-scope="{row}">
<template v-if="row.FINISHED===1">
已检查
</template>
<template v-else>
未检查
</template>
</template>
</el-table-column>
<el-table-column prop="" label="操作" width="240" align="center">
<template slot-scope="{row}">
<template v-if="row.FINISHED === 1">
<el-button type="primary" icon="el-icon-tickets" size="mini" @click="goCheck(row,row.FIRE_CHECK_ID,row.FIRE_RECORD_ID)" >检查记录</el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="delById(row.FIRE_RECORD_ID)"></el-button>
</template>
<template v-else>
<el-button type="success" icon="el-icon-edit" size="mini" @click="goRecording(row,row.PERIODSTART,row.PERIODEND)"></el-button>
</template>
</template>
</el-table-column>
</el-table>
<div class="ui-foot" style="width:100%">
<el-button plain type="info" @click="back"> </el-button>
</div>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
export default {
components: { Pagination },
directives: { waves },
data() {
return {
listLoading: true,
add: false,
del: false,
edit: false,
listQuery: {
page: 1,
limit: 20
},
dates: [],
total: 0,
KEYWORDS: '',
varList: [],
pd: [],
STARTTIME: '',
ENDTIME: '',
statusList: [
{ 'ID': '1', 'NAME': '已检查' },
{ 'ID': '0', 'NAME': '超期未检查' }
],
STATUS: '',
ls: {}
}
},
created() {
this.getList()
this.hasButton()
},
methods: {
getRowKey(row) {
return row.CHECKRECORD_ID
},
//
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
//
getList() {
this.listLoading = true
requestFN(
'/fireRecord/getRecordListById?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
STARTTIME: this.dates[0],
ENDTIME: this.dates[1],
FIRE_CHECK_ID: this.$parent.FIRE_CHECK_ID,
KEYWORDS: this.KEYWORDS,
STATUS: this.STATUS
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
// this.hasButton()
this.ls = data.ls
}).catch((e) => {
this.listLoading = false
})
},
goKeyReset() {
this.KEYWORDS = ''
this.STATUS = ''
this.dates = []
this.$refs.multipleTable.clearSelection()
this.getList()
},
goRecording(row, startTime, endTime) {
this.$parent.row = row
this.$parent.activeName = 'Recording'
this.$parent.startTime = startTime
this.$parent.endTime = endTime
this.$parent.FIRE_CHECK_ID = row.FIRE_CHECK_ID
this.$parent.FIRE_RECORD_ID = row.FIRE_RECORD_ID
},
//
delById(FIRE_RECORD_ID) {
this.$confirm('确定要删除吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'fireRecord/delByIds',
{
FIRE_RECORD_ID: FIRE_RECORD_ID
}
).then((data) => {
this.listLoading = false
this.$message({
message: '删除成功',
type: 'success'
})
this.getList()
}).catch((e) => {
this.listLoading = false
})
})
},
//
goCheck(row, id, FIRE_RECORD_ID) {
this.$parent.FIRE_CHECK_ID = id
this.$parent.FIRE_RECORD_ID = FIRE_RECORD_ID
this.$parent.SHOW_OR_EDIT = 'SHOW'
this.$parent.row = row
this.$parent.activeName = 'RecordInfo'
},
//
back() {
this.$parent.activeName = 'List'
},
hasButton: function() {
var keys = 'checkrecord:add,checkrecord:del,checkrecord:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.checkrecordfhadminadd //
this.del = data.checkrecordfhadmindel //
this.edit = data.checkrecordfhadminedit //
this.toExcel = data.toExcel // excel
}).catch((e) => {
this.listLoading = false
})
}
}
}
</script>
<style>
</style>

File diff suppressed because it is too large Load Diff

View File

@ -3,12 +3,12 @@
</template>
<script>
import List from './components/list'
import FirePumpRoom from './components/firePumpRoom'
import FireResources from './components/fireResources.vue'
import FireControlRoom from './components/fireControlRoom.vue'
import FireRecord from './components/fireRecord.vue'
import FireList from './components/fireList.vue'
import RecordInfo from './components/recordInfo.vue'
export default {
components: {
List, FirePumpRoom, FireResources, FireControlRoom
List, FireRecord, FireList, RecordInfo
},
data() {
return {