@@ -140,9 +140,14 @@ | |||||
<el-tab-pane label="接待报告" name="2"> | <el-tab-pane label="接待报告" name="2"> | ||||
<el-table :data="gridDatas" @row-click="msgTaps"> | <el-table :data="gridDatas" @row-click="msgTaps"> | ||||
<el-table-column prop="title" :show-header="false"> | <el-table-column prop="title" :show-header="false"> | ||||
</el-table-column> | |||||
<el-table-column prop="createTime" :show-header="false"> | |||||
<template slot-scope="{ row }"> | |||||
<span v-if="row.messageType == 2"> | |||||
{{ row.weekDate }} {{ row.title }} | |||||
</span> | |||||
<span v-else> | |||||
{{ fomatDate(row.createTime) }} {{ row.title }} | |||||
</span> | |||||
</template> | |||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
</el-tab-pane> | </el-tab-pane> | ||||
@@ -318,6 +323,13 @@ export default { | |||||
this.info = getStore({ name: "userInfo" }); | this.info = getStore({ name: "userInfo" }); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
fomatDate(date) { | |||||
if (!date) return "--"; | |||||
let arr = date.split(" "); | |||||
let str = arr[0]; | |||||
let result = str.split("-"); | |||||
return `${result[1]}月${result[2]}日`; | |||||
}, | |||||
handleClick() {}, | handleClick() {}, | ||||
// 获取升级消息列表 | // 获取升级消息列表 | ||||
getMessage() { | getMessage() { | ||||
@@ -327,6 +339,7 @@ export default { | |||||
num: 1, // 第几页 | num: 1, // 第几页 | ||||
size: 5, // 条数 | size: 5, // 条数 | ||||
messageType: Number(this.activeName), | messageType: Number(this.activeName), | ||||
projectId: localStorage.getItem("houseId") || "", | |||||
}; | }; | ||||
this.$api.http | this.$api.http | ||||
.messageList(paramsData) | .messageList(paramsData) | ||||
@@ -6,7 +6,7 @@ | |||||
:class="{ activecllasscet: activeTotal == 0 }" | :class="{ activecllasscet: activeTotal == 0 }" | ||||
:style="{ background: activeTotal == 0 ? '#2671E2' : '#ffffff' }" | :style="{ background: activeTotal == 0 ? '#2671E2' : '#ffffff' }" | ||||
> | > | ||||
设备在线记录 | |||||
设备离线记录 | |||||
</div> | </div> | ||||
<div | <div | ||||
@click="tapclickyab(1)" | @click="tapclickyab(1)" | ||||
@@ -25,7 +25,7 @@ | |||||
padding-top: 18px; | padding-top: 18px; | ||||
" | " | ||||
> | > | ||||
<span style="line-height: 40px" class="demonstration">在线时间:</span> | |||||
<span style="line-height: 40px" class="demonstration">离线时间:</span> | |||||
<el-date-picker | <el-date-picker | ||||
@change="confirmtime()" | @change="confirmtime()" | ||||
v-model="customtime" | v-model="customtime" | ||||
@@ -104,14 +104,11 @@ | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column prop="accountName" label="领用人" align="center"> | <el-table-column prop="accountName" label="领用人" align="center"> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column prop="openTime" label="在线时间" align="center"> | |||||
<el-table-column prop="openTime" label="离线开始时间" align="center"> | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column prop="closeTime" label="离线时间" align="center"> | |||||
<el-table-column prop="closeTime" label="恢复在线时间" align="center"> | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column prop="offlineTime" label="离线时长" align="center"> | |||||
<template slot-scope="{row}"> | |||||
{{row.offlineTime||'--'}} | |||||
</template> | |||||
<el-table-column prop="offlineTimeStr" label="离线时长" align="center"> | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column prop="offStatusName" label="离线原因" align="center"> | <el-table-column prop="offStatusName" label="离线原因" align="center"> | ||||
</el-table-column> | </el-table-column> | ||||
@@ -4,16 +4,24 @@ | |||||
<!-- 内容盒子 --> | <!-- 内容盒子 --> | ||||
<div class="table-box"> | <div class="table-box"> | ||||
<!-- <el-tabs v-model="activeName" @tab-click="handleClick"> --> | <!-- <el-tabs v-model="activeName" @tab-click="handleClick"> --> | ||||
<!-- <el-tab-pane label="接待报告" name="2"> --> | |||||
<el-table class="tabs" :data="gridDatas" @row-click="msgTaps"> | |||||
<el-table-column prop="title" :show-header="false"> | |||||
</el-table-column> | |||||
<el-table-column prop="createTime" :show-header="false"> | |||||
</el-table-column> | |||||
</el-table> | |||||
<!-- </el-tab-pane> --> | |||||
<!-- <el-tab-pane label="升级公告" name="3"> | |||||
<!-- <el-tab-pane label="接待报告" name="2"> --> | |||||
<el-table class="tabs" :data="gridDatas" @row-click="msgTaps"> | |||||
<el-table-column prop="title" :show-header="false"> | |||||
<template slot-scope="{ row }"> | |||||
<span v-if="row.messageType == 2"> | |||||
{{ row.weekDate }} {{ row.title }} | |||||
</span> | |||||
<span v-else> | |||||
{{ fomatDate(row.createTime) }} {{ row.title }} | |||||
</span> | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column prop="createTime" :show-header="false"> | |||||
</el-table-column> | |||||
</el-table> | |||||
<!-- </el-tab-pane> --> | |||||
<!-- <el-tab-pane label="升级公告" name="3"> | |||||
<el-table | <el-table | ||||
:data="tableData" | :data="tableData" | ||||
style="width: 100%; height: 100%" | style="width: 100%; height: 100%" | ||||
@@ -82,6 +90,7 @@ export default { | |||||
num: 1, | num: 1, | ||||
size: 10, | size: 10, | ||||
messageType: 2, | messageType: 2, | ||||
projectId: localStorage.getItem("houseId") || "", | |||||
}, | }, | ||||
gridData: [], // 消息列表 | gridData: [], // 消息列表 | ||||
@@ -103,12 +112,18 @@ export default { | |||||
}, | }, | ||||
methods: { | methods: { | ||||
fomatDate(date) { | |||||
if (!date) return "--"; | |||||
let arr = date.split(" "); | |||||
let str = arr[0]; | |||||
let result = str.split("-"); | |||||
return `${result[1]}月${result[2]}日`; | |||||
}, | |||||
// 弹窗消息点击触发事件 | // 弹窗消息点击触发事件 | ||||
msgTap(e) { | msgTap(e) { | ||||
console.log(e, 'asdjilksajl') | |||||
this.$store.commit('setMessage', e) | |||||
this.$router.push('/message/detail') | |||||
console.log(e, "asdjilksajl"); | |||||
this.$store.commit("setMessage", e); | |||||
this.$router.push("/message/detail"); | |||||
}, | }, | ||||
// 弹窗消息点击触发事件 | // 弹窗消息点击触发事件 | ||||
@@ -3,10 +3,10 @@ | |||||
* https://cli.vuejs.org/zh/config/ | * https://cli.vuejs.org/zh/config/ | ||||
*/ | */ | ||||
// const url = 'http://192.168.31.161:9999' //长龙 | // const url = 'http://192.168.31.161:9999' //长龙 | ||||
const url = 'http://192.168.31.147:9999' // 胜浩 | |||||
// const url = 'http://192.168.31.147:9999' // 胜浩 | |||||
// const url = 'https://zanyong.hfju.com' // 正式域名 | // const url = 'https://zanyong.hfju.com' // 正式域名 | ||||
// const url = 'http://127.0.0.1:9999' // 本地 | // const url = 'http://127.0.0.1:9999' // 本地 | ||||
// const url = 'http://81.70.55.170:9999' // 新测试 | |||||
const url = 'http://81.70.55.170:9999' // 新测试 | |||||
// const url = 'http://82.156.35.22:9999' // 新正式ip | // const url = 'http://82.156.35.22:9999' // 新正式ip | ||||
const CompressionWebpackPlugin = require('compression-webpack-plugin') | const CompressionWebpackPlugin = require('compression-webpack-plugin') | ||||
const productionGzipExtensions = ['js', 'css'] | const productionGzipExtensions = ['js', 'css'] | ||||