Browse Source

需求优化

master
xuhuajiao 2 months ago
parent
commit
1823e7dd35
  1. 17
      src/views/archivesManage/archivesList/mixins/archives.js
  2. 21
      src/views/components/AccessDoor.vue
  3. 82
      src/views/components/WarehouseWarning.vue
  4. 8
      src/views/environmentalScreen/index.vue

17
src/views/archivesManage/archivesList/mixins/archives.js

@ -320,13 +320,16 @@ export const archivesCrud = {
// 选择删除 // 选择删除
toDelete(data) { toDelete(data) {
// 已装盒的档案不可删除 // 已装盒的档案不可删除
const indexCaseBool = data.findIndex(item => item.case_no !== '')
if (indexCaseBool !== -1) {
this.$message.error('已装盒的档案不可删除!')
} else {
this.$refs.deltArchives.deleteVisible = true
this.getTotalSumAll()
}
// const indexCaseBool = data.findIndex(item => item.case_no !== '')
// if (indexCaseBool !== -1) {
// this.$message.error('已装盒的档案不可删除!')
// } else {
// this.$refs.deltArchives.deleteVisible = true
// this.getTotalSumAll()
// }
this.$refs.deltArchives.deleteVisible = true
this.getTotalSumAll()
}, },
getTotalSumAll(data) { getTotalSumAll(data) {
this.totalSumAll = 0 this.totalSumAll = 0

21
src/views/components/AccessDoor.vue

@ -13,12 +13,12 @@
<div>{{ scope.row.time | parseTime }}</div> <div>{{ scope.row.time | parseTime }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="姓名" align="center" :show-overflow-tooltip="true" min-width="60">
<el-table-column label="姓名" align="center" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.name }}</div> <div>{{ scope.row.name }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="minorName" label="说明" align="center" :show-overflow-tooltip="true" min-width="80" />
<el-table-column prop="minorName" label="说明" align="center" :show-overflow-tooltip="true" width="148" />
</el-table> </el-table>
</div> </div>
</template> </template>
@ -56,13 +56,18 @@ export default {
}, },
watch: { watch: {
// `tableData` // `tableData`
tableData: function(newData, oldData) {
this.tableRefScroll()
}
// tableData: function(newData, oldData) {
// this.tableRefScroll()
// }
}, },
created() { created() {
this.getAccessdoor() this.getAccessdoor()
}, },
mounted() {
this.scrollTimer = setInterval(() => {
this.getAccessdoor()
}, 15000)
},
destroyed() { destroyed() {
clearInterval(this.scrollTimer) clearInterval(this.scrollTimer)
this.scrollTimer = null this.scrollTimer = null
@ -131,8 +136,12 @@ export default {
}, },
getAccessdoor() { getAccessdoor() {
FetchInitHikDoorLog({ page: 0, size: this.size }).then((data) => { FetchInitHikDoorLog({ page: 0, size: this.size }).then((data) => {
this.tableData = []
if (data.content && data.content.length > 0) { if (data.content && data.content.length > 0) {
this.tableData.splice(0, data.content.length, ...data.content)
// this.tableData.splice(0, data.content.length, ...data.content)
this.tableData = data.content
} else {
this.tableData = []
} }
}) })
} }

82
src/views/components/WarehouseWarning.vue

@ -12,10 +12,11 @@
<el-table-column prop="TS" label="时间" align="center" width="160"> <el-table-column prop="TS" label="时间" align="center" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.TS">{{ scope.row.TS | formatTs }}</span> <span v-if="scope.row.TS">{{ scope.row.TS | formatTs }}</span>
<!-- <span v-if="scope.row.TS">{{ scope.row.TS | parseTime }}</span> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="设备" align="center" :show-overflow-tooltip="true" width="80" />
<el-table-column prop="value" label="警情" align="center" :show-overflow-tooltip="true" min-width="60" />
<el-table-column prop="name" label="设备" align="center" :show-overflow-tooltip="true" width="100" />
<el-table-column prop="value" label="警情" align="center" :show-overflow-tooltip="true" width="148" />
</el-table> </el-table>
</div> </div>
</template> </template>
@ -51,13 +52,18 @@ export default {
}, },
watch: { watch: {
// `tableData` // `tableData`
tableData: function(newData, oldData) {
this.tableRefScroll()
}
// tableData: function(newData, oldData) {
// this.tableRefScroll()
// }
}, },
created() { created() {
this.getAlarmInfo() this.getAlarmInfo()
}, },
mounted() {
this.scrollTimer = setInterval(() => {
this.getAlarmInfo()
}, 15000)
},
destroyed() { destroyed() {
clearInterval(this.scrollTimer) clearInterval(this.scrollTimer)
this.scrollTimer = null this.scrollTimer = null
@ -140,8 +146,72 @@ export default {
}, },
getAlarmInfo() { getAlarmInfo() {
alarmApi.info({ storeroomId: this.storeroomId }).then((data) => { alarmApi.info({ storeroomId: this.storeroomId }).then((data) => {
// this.tableData = [
// {
// 'id': 'eb6b8653',
// 'lscid': 0,
// 'wyid': '',
// 'itemLevels': 1,
// 'siteName': '.',
// 'TS': 1765944141000,
// 'isAd': true,
// 'type': 0,
// 'ip': '192.168.99.101:6003',
// 'name': '',
// 'value': '线',
// 'dw': '',
// 'itemClass': 1
// },
// {
// 'id': 'eeeeeeee',
// 'lscid': 0,
// 'wyid': null,
// 'itemLevels': 1,
// 'siteName': '线',
// 'TS': 1765867832000,
// 'isAd': true,
// 'type': 0,
// 'ip': '192.168.99.100',
// 'name': '线',
// 'value': '线',
// 'dw': null,
// 'itemClass': 1
// },
// {
// 'id': 'eb6b8653',
// 'lscid': 0,
// 'wyid': '',
// 'itemLevels': 1,
// 'siteName': '.',
// 'TS': 1765944141000,
// 'isAd': true,
// 'type': 0,
// 'ip': '192.168.99.101:6003',
// 'name': '',
// 'value': '线',
// 'dw': '',
// 'itemClass': 1
// },
// {
// 'id': 'eeeeeeee',
// 'lscid': 0,
// 'wyid': null,
// 'itemLevels': 1,
// 'siteName': '线',
// 'TS': 1765867832000,
// 'isAd': true,
// 'type': 0,
// 'ip': '192.168.99.100',
// 'name': '线',
// 'value': '线',
// 'dw': null,
// 'itemClass': 1
// }
// ]
this.tableData = []
if (data && data.length > 0) { if (data && data.length > 0) {
this.tableData.splice(0, data.length, ...data)
// this.tableData.splice(0, data.length, ...data)
this.tableData = data
} else { } else {
this.tableData = [] this.tableData = []
} }

8
src/views/environmentalScreen/index.vue

@ -89,21 +89,21 @@
<svg-icon icon-class="voc" class-name="msg-list-svg" /> <svg-icon icon-class="voc" class-name="msg-list-svg" />
<div class="msg-txt"> <div class="msg-txt">
<span class="msg-list-num">{{ avgData.tvoc }}</span> <span class="msg-list-num">{{ avgData.tvoc }}</span>
<p class="msg-list-unit">TVOC <br>{{ avgData.tvocUnit }}</p>
<p class="msg-list-unit">TVOC {{ avgData.tvocUnit }}</p>
</div> </div>
</li> </li>
<li> <li>
<svg-icon icon-class="co2" class-name="msg-list-svg" /> <svg-icon icon-class="co2" class-name="msg-list-svg" />
<div class="msg-txt"> <div class="msg-txt">
<span class="msg-list-num">{{ avgData.co2 }}</span> <span class="msg-list-num">{{ avgData.co2 }}</span>
<p class="msg-list-unit">二氧化碳 <br>{{ avgData.co2Unit }}</p>
<p class="msg-list-unit">二氧化碳 {{ avgData.co2Unit }}</p>
</div> </div>
</li> </li>
<li> <li>
<svg-icon icon-class="jiaquan" class-name="msg-list-svg" style="font-size: 68px;" /> <svg-icon icon-class="jiaquan" class-name="msg-list-svg" style="font-size: 68px;" />
<div class="msg-txt"> <div class="msg-txt">
<span class="msg-list-num">{{ avgData.formaldehyde }}</span> <span class="msg-list-num">{{ avgData.formaldehyde }}</span>
<p class="msg-list-unit">甲醛 <br>{{ avgData.formaldehydeUnit }}</p>
<p class="msg-list-unit">甲醛 {{ avgData.formaldehydeUnit }}</p>
</div> </div>
</li> </li>
</ul> </ul>
@ -253,7 +253,7 @@
<!-- 环控实时报警 --> <!-- 环控实时报警 -->
<warehouse-warning :height="'calc(100% - 38px)'" /> <warehouse-warning :height="'calc(100% - 38px)'" />
<!-- 门禁出入记录 --> <!-- 门禁出入记录 -->
<AccessDoor :height="'calc(100% - 40px)'" size="5" />
<AccessDoor :height="'calc(100% - 40px)'" size="4" />
<!-- 当日告警统计 --> <!-- 当日告警统计 -->
<div class="env-item container-wrap"> <div class="env-item container-wrap">
<span class="right-top-line" /> <span class="right-top-line" />

Loading…
Cancel
Save