|
@@ -21,25 +21,39 @@
|
|
|
<el-input v-model="queryLine.equipmentName" placeholder="请输入设备名称" clearable/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="设备类型">
|
|
|
- <el-input v-model="queryLine.equipmentTypeName" placeholder="请输入设备类型" clearable/>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="更新阈值设置" label-width="100">
|
|
|
- <el-input v-model="queryLine.threshold" min="0" max="100" step="1" style="width: 65px">
|
|
|
- <template #suffix>
|
|
|
- <i slot="suffix" style="color: #181818">%</i>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
-
|
|
|
-<!-- <el-input-number-->
|
|
|
-<!-- v-model="queryLine.threshold"-->
|
|
|
-<!-- :min="1"-->
|
|
|
-<!-- :max="10"-->
|
|
|
-<!-- size="large"-->
|
|
|
-<!-- style="width: 100px"-->
|
|
|
-<!-- />-->
|
|
|
+ <!-- <el-input v-model="queryLine.equipmentType" placeholder="请输入设备类型" clearable/>-->
|
|
|
+ <el-select
|
|
|
+ v-model="queryLine.equipmentType"
|
|
|
+ placeholder="请选择"
|
|
|
+ size="default"
|
|
|
+ style="width: 180px; "
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in equipmentTypes"
|
|
|
+ :key="item"
|
|
|
+ :label="item"
|
|
|
+ :value="item"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
+<!-- <el-form-item label="更新阈值设置" label-width="100">-->
|
|
|
+<!-- <el-input v-model="queryLine.threshold" min="0" max="100" step="1" style="width: 65px">-->
|
|
|
+<!-- <template #suffix>-->
|
|
|
+<!-- <i slot="suffix" style="color: #181818">%</i>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </el-input>-->
|
|
|
+
|
|
|
+<!--<!– <el-input-number–>-->
|
|
|
+<!--<!– v-model="queryLine.threshold"–>-->
|
|
|
+<!--<!– :min="1"–>-->
|
|
|
+<!--<!– :max="10"–>-->
|
|
|
+<!--<!– size="large"–>-->
|
|
|
+<!--<!– style="width: 100px"–>-->
|
|
|
+<!--<!– />–>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
<el-form-item>
|
|
|
- <el-button type="danger" @click="onSubmit">查询</el-button>
|
|
|
+ <el-button type="danger" @click="queryRecordByCondition">查询</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="danger" @click="onSubmit">重置</el-button>
|
|
@@ -54,18 +68,43 @@
|
|
|
<!-- </div>-->
|
|
|
</el-form>
|
|
|
</div>
|
|
|
+<!-- <el-table stripe style="background-color: rgba(255,0,0,99%);width: 100%" border :data="tableData"-->
|
|
|
+<!-- fixed ref="multipleTableRef" :cell-style="{ textAlign: 'center'}" :header-cell-style="{ textAlign: 'center'}">-->
|
|
|
+<!-- <el-table-column type="selection" width="55"/>-->
|
|
|
+<!-- <el-table-column prop="equipmentName" label="设备名称"/>-->
|
|
|
+<!-- <el-table-column prop="equipmentTypeName" label="设备类型"/>-->
|
|
|
+<!-- <el-table-column prop="mapId" label="地图id"/>-->
|
|
|
+<!-- <el-table-column prop="originalPgm" label="原始pgm"/>-->
|
|
|
+<!-- <el-table-column prop="updateTime" label="地图更新时间"/>-->
|
|
|
+<!-- <el-table-column prop="cumulativeUpdateRate" label="累积地图更新率"/>-->
|
|
|
+<!-- <el-table-column prop="currentPgm" label="当前pgm"/>-->
|
|
|
+<!-- </el-table>-->
|
|
|
+ <el-image-viewer @close="closeImgViewer" :url-list="imageUrl" v-if="showImageViewer"></el-image-viewer>
|
|
|
<el-table stripe style="background-color: rgba(255,0,0,99%);width: 100%" border :data="tableData"
|
|
|
fixed ref="multipleTableRef" :cell-style="{ textAlign: 'center'}" :header-cell-style="{ textAlign: 'center'}">
|
|
|
<el-table-column type="selection" width="55"/>
|
|
|
- <el-table-column prop="equipmentName" label="设备名称"/>
|
|
|
- <el-table-column prop="equipmentTypeName" label="设备类型"/>
|
|
|
- <el-table-column prop="mapId" label="地图id"/>
|
|
|
- <el-table-column prop="originalPgm" label="原始pgm"/>
|
|
|
- <el-table-column prop="updateTime" label="地图更新时间"/>
|
|
|
- <el-table-column prop="cumulativeUpdateRate" label="累积地图更新率"/>
|
|
|
- <el-table-column prop="currentPgm" label="当前pgm"/>
|
|
|
- </el-table>
|
|
|
+ <el-table-column prop="device_name" label="设备名称"/>
|
|
|
+ <el-table-column prop="device_type" label="设备类型"/>
|
|
|
+ <el-table-column prop="map_id" label="地图id"/>
|
|
|
+ <el-table-column prop="update_time" label="地图更新时间" :formatter="formatDate"/>
|
|
|
+<!-- <el-table-column prop="update_rate" label="地图更新率"/>-->
|
|
|
+ <el-table-column prop="cumulative_update_rate" label="累积地图更新率"/>
|
|
|
+ <el-table-column prop="rescan_notify_threshold" label="地图续扫阈值"/>
|
|
|
+<!-- <el-table-column prop="update_flag" label="地图更新状态" :formatter="formatStatus"/>-->
|
|
|
+ <el-table-column prop="update_flag" label="地图续扫提醒" :formatter="formatStatus"/>
|
|
|
+ <el-table-column prop="pre_pgm_url" label="原始pgm" width="400px">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <img :src="'http://oss-cn-beijing-gqzl-d01-a.ops.gqzl-cloud.com/pji-bucket1/' + scope.row.pre_png_url" @click="viewImg" alt="" style="width:300px; height: 100%; cursor: pointer">
|
|
|
+ </template>
|
|
|
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="current_pgm_url" label="当前pgm" width="400px">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <img :src="'http://oss-cn-beijing-gqzl-d01-a.ops.gqzl-cloud.com/pji-bucket1/' + scope.row.current_png_url" @click="viewImg" alt="" style="width:300px; height: 100%; cursor: pointer">
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ </el-table>
|
|
|
<p></p> <!--空行-->
|
|
|
<el-pagination
|
|
|
v-model:current-page="currentPage"
|
|
@@ -89,15 +128,43 @@
|
|
|
<script lang="ts" setup>
|
|
|
import {onBeforeMount, reactive, ref} from "vue";
|
|
|
import axios from "axios";
|
|
|
-import {ElTable} from "element-plus";
|
|
|
+import {ElLoading, ElMessage, ElTable} from "element-plus";
|
|
|
+import moment from "moment/moment";
|
|
|
+
|
|
|
+const showImageViewer = ref(false);
|
|
|
+const imageUrl = ref([])
|
|
|
+
|
|
|
+const formatDate = (row) => {
|
|
|
+ return moment(+row.update_time).format("YYYY-MM-DD HH:mm:ss")
|
|
|
+}
|
|
|
+
|
|
|
+const formatStatus = (row) => {
|
|
|
+ if (row.rescan_notify_flag == 0) return "未发送续扫提醒";
|
|
|
+ if (row.rescan_notify_flag == 1) return "已发送续扫提醒";
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+const viewImg = (event) => {
|
|
|
+ if (event.target.nodeName == "IMG") {
|
|
|
+ let src = event.target.currentSrc;
|
|
|
+ imageUrl.value = [src]
|
|
|
+ showImageViewer.value = true
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const closeImgViewer = () => {
|
|
|
+ showImageViewer.value = false;
|
|
|
+}
|
|
|
|
|
|
// 数据容量单位从B转成MB
|
|
|
const queryLine = reactive({
|
|
|
equipmentName: '',
|
|
|
equipmentTypeName: '',
|
|
|
- threshold:'20'
|
|
|
+ threshold:'',
|
|
|
+ equipmentType: '',
|
|
|
})
|
|
|
-
|
|
|
+const equipmentTypes =ref(["引导服务机器人"])
|
|
|
+const resetTableData = ref([]);
|
|
|
const onSubmit = () => {
|
|
|
page()
|
|
|
}
|
|
@@ -108,22 +175,51 @@ onBeforeMount(() => {
|
|
|
page()
|
|
|
})
|
|
|
|
|
|
-function page() {
|
|
|
- axios.get('http://1.202.169.139:8081/open/scene/list?equipmentType=YI_DAO_JI_QI_REN&page=' + currentPage.value + '&size=' + pageSize.value,
|
|
|
- {
|
|
|
- headers: {
|
|
|
- "Authorization": "4773hd92ysj54paflw2jem3onyhywxt2"
|
|
|
- }
|
|
|
- }
|
|
|
- ).then(function (response) {
|
|
|
- tableData.value = response.data.data.content
|
|
|
- total.value = response.data.data.totalElements
|
|
|
- // total.value = tableData.value.length
|
|
|
- // console.log(tableData);
|
|
|
- // console.log(response.data.data);
|
|
|
- }).catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
+// 根据条件筛选结果
|
|
|
+const queryRecordByCondition = async () => {
|
|
|
+ let response = await axios.post('/local/map/rescan/notify/list?page=' + currentPage.value + '&pageSize=' + pageSize.value, {
|
|
|
+ "device_name": queryLine.equipmentName,
|
|
|
+ "device_type": queryLine.equipmentType
|
|
|
+ })
|
|
|
+
|
|
|
+ if (!response.data.status){ // 不存在
|
|
|
+ ElMessage.error("地图续扫提醒记录查询失败!");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 解析结果
|
|
|
+ tableData.value = JSON.parse(response.data.data)
|
|
|
+ total.value = response.data.total
|
|
|
+}
|
|
|
+
|
|
|
+async function page() {
|
|
|
+ // axios.get('http://1.202.169.139:8081/open/scene/list?equipmentType=YI_DAO_JI_QI_REN&page=' + currentPage.value + '&size=' + pageSize.value,
|
|
|
+ // {
|
|
|
+ // headers: {
|
|
|
+ // "Authorization": "4773hd92ysj54paflw2jem3onyhywxt2"
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // ).then(function (response) {
|
|
|
+ // tableData.value = response.data.data.content
|
|
|
+ // total.value = response.data.data.totalElements
|
|
|
+ // // total.value = tableData.value.length
|
|
|
+ // // console.log(tableData);
|
|
|
+ // // console.log(response.data.data);
|
|
|
+ // }).catch(function (error) {
|
|
|
+ // console.log(error);
|
|
|
+ // });
|
|
|
+
|
|
|
+ // 查询地图更新记录
|
|
|
+ let response = await axios.get('/local/map/rescan/notify/list?page=' + currentPage.value + '&pageSize=' + pageSize.value)
|
|
|
+
|
|
|
+ if (!response.data.status){ // 不存在
|
|
|
+ ElMessage.error("地图续扫提醒记录查询失败!");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 解析结果
|
|
|
+ tableData.value = JSON.parse(response.data.data)
|
|
|
+ console.log("tableData.value", tableData.value)
|
|
|
+ resetTableData.value = tableData.value // for reset purpose
|
|
|
+ total.value = response.data.total
|
|
|
}
|
|
|
|
|
|
const currentPage = ref(1)
|