消防安全管理添加扫码查看检查记录

liujun-2024-09-05-九公司人员定位
WenShiJun 2024-09-03 18:07:42 +08:00
parent 1bc847fea9
commit 202af29c01
1 changed files with 41 additions and 22 deletions

View File

@ -73,7 +73,7 @@
<el-tag v-else type="danger"></el-tag> <el-tag v-else type="danger"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="380"> <el-table-column label="操作" width="450">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button <el-button
v-show="true" v-show="true"
@ -97,6 +97,14 @@
size="mini" size="mini"
@click="handleDelete(row)">删除 @click="handleDelete(row)">删除
</el-button> </el-button>
<!-- 新增按钮检查记录二维码 -->
<el-button
class="tiffany-btn"
icon="el-icon-document"
type="info"
size="mini"
@click="handleShowRecordQr(row)">检查记录二维码
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -143,6 +151,22 @@
<el-button v-print="'#printTest'" type="primary"> </el-button> <el-button v-print="'#printTest'" type="primary"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogRecordFormShow" title="查看检查记录二维码" width="680px" class="top-dialog">
<div id="recordPrintTest" style="border: 1px solid #fff;">
<div class="level-title" style="margin-top:20px">
<h1>检查记录二维码</h1>
</div>
<div class="table-qrcode">
<vue-qr :text="recordQrcodeStr" :margin="0" :size="300" color-dark="#000" color-light="#fff" />
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogRecordFormShow = false"> </el-button>
<el-button v-print="'#recordPrintTest'" type="primary"> </el-button>
</div>
</el-dialog>
<el-dialog v-loading ="listLoading" :visible.sync="dialogEditUser" title="批量修改负责人" width="800px"> <el-dialog v-loading ="listLoading" :visible.sync="dialogEditUser" title="批量修改负责人" width="800px">
<el-form ref="firefightingBatchEditDept" :model="dialogEditUserForm" :rules="dialogEditUserRules" label-width="150px"> <el-form ref="firefightingBatchEditDept" :model="dialogEditUserForm" :rules="dialogEditUserRules" label-width="150px">
<el-row> <el-row>
@ -157,7 +181,6 @@
<el-button @click="dialogEditUser = false"> </el-button> <el-button @click="dialogEditUser = false"> </el-button>
<el-button type="primary" @click="dialogEditUserConfirm"> </el-button> <el-button type="primary" @click="dialogEditUserConfirm"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -171,9 +194,7 @@ import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree' import SelectTree from '@/components/SelectTree'
export default { export default {
components: { Pagination, SelectTree, vueQr }, components: { Pagination, SelectTree, vueQr },
directives: { waves }, directives: { waves },
data() { data() {
return { return {
@ -181,7 +202,9 @@ export default {
addBtnType: true, addBtnType: true,
listLoading: true, listLoading: true,
dialogFormShow: false, dialogFormShow: false,
dialogRecordFormShow: false,
qrcodeStr: '', qrcodeStr: '',
recordQrcodeStr: '',
qrInfo: {}, qrInfo: {},
add: false, add: false,
del: false, del: false,
@ -246,39 +269,36 @@ export default {
handleShowQr(ROW) { handleShowQr(ROW) {
this.dialogFormShow = true this.dialogFormShow = true
this.qrInfo = ROW this.qrInfo = ROW
// 2024-07-22 H5created by liu jun
this.qrcodeStr = this.config.weburlWaiwang + 'static/qrcode/views/bsbw/point_list.html?id=' + ROW.FIRE_POINT_ID this.qrcodeStr = this.config.weburlWaiwang + 'static/qrcode/views/bsbw/point_list.html?id=' + ROW.FIRE_POINT_ID
// const json = { },
// MANAGER_TYPE: 'fireListManager', handleShowRecordQr(ROW) {
// FIRE_POINT_ID: ROW.FIRE_POINT_ID this.dialogRecordFormShow = true
// } const json = {
// const jsonStr = JSON.stringify(json) MANAGER_TYPE: 'fireListManager',
// this.qrcodeStr = jsonStr USER_ID: ROW.USER_ID,
DEPARTMENT_ID: ROW.DEPARTMENT_ID
}
this.recordQrcodeStr = JSON.stringify(json)
}, },
handleEdit(FIRE_POINT_ID) { handleEdit(FIRE_POINT_ID) {
this.$parent.FIRE_POINT_ID = FIRE_POINT_ID this.$parent.FIRE_POINT_ID = FIRE_POINT_ID
this.$parent.activeName = 'Edit' this.$parent.activeName = 'Edit'
}, },
selectable(row, index) { selectable(row, index) {
// return row.DEVICE_COUNT == 0
return true return true
}, },
getRowKey(row) { getRowKey(row) {
return row.FIRE_POINT_ID return row.FIRE_POINT_ID
}, },
//
handleAdd() { handleAdd() {
this.$parent.activeName = 'Edit' this.$parent.activeName = 'Edit'
this.$parent.FIRE_POINT_ID = '' this.$parent.FIRE_POINT_ID = ''
this.$parent.FIRE_POINT_CODE = '' this.$parent.FIRE_POINT_CODE = ''
this.$parent.FIRE_POINT_NAME = '' this.$parent.FIRE_POINT_NAME = ''
}, },
//
getQuery() { getQuery() {
// this.$refs.multipleTable.clearSelection()
this.getList() this.getList()
}, },
//
getList(pid) { getList(pid) {
this.listLoading = true this.listLoading = true
this.varList = [] this.varList = []
@ -299,7 +319,8 @@ export default {
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
}, goKeyReset() { },
goKeyReset() {
this.FIRE_POINT_NAME = '' this.FIRE_POINT_NAME = ''
this.FIRE_POINT_CODE = '' this.FIRE_POINT_CODE = ''
this.IS_PUNCTUATION = '' this.IS_PUNCTUATION = ''
@ -345,7 +366,6 @@ export default {
this.listLoading = false this.listLoading = false
}) })
}, },
//
getTreeData() { getTreeData() {
requestFN( requestFN(
'/department/listTreeV2', '/department/listTreeV2',
@ -355,7 +375,6 @@ export default {
}).catch((e) => { }).catch((e) => {
}) })
}, },
//
handleEditUser(row) { handleEditUser(row) {
this.editDataIds = [] this.editDataIds = []
if (row.FIRE_POINT_ID) { if (row.FIRE_POINT_ID) {
@ -510,7 +529,7 @@ export default {
float: right; float: right;
} }
.app-container { .app-container {
display: flex; /**/ display: flex;
align-items: baseline; align-items: baseline;
} }
.table-qrcode { .table-qrcode {