Commit 336787b0 authored by honghuiliu's avatar honghuiliu 💬

Merge remote-tracking branch 'origin/master'

parents e31bbace db8ad46e
...@@ -1775,6 +1775,63 @@ ...@@ -1775,6 +1775,63 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"ssri": { "ssri": {
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
...@@ -1783,6 +1840,28 @@ ...@@ -1783,6 +1840,28 @@
"requires": { "requires": {
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
} }
} }
}, },
...@@ -5121,6 +5200,11 @@ ...@@ -5121,6 +5200,11 @@
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"dev": true "dev": true
}, },
"ezuikit-js": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/ezuikit-js/-/ezuikit-js-0.6.3.tgz",
"integrity": "sha512-nFaQXHALzGgXop4aZ23g96EmKT+IRfvibx4I4jLIcNAjXWI+PZk3g/365end7trMY646+5BeP0kn9CXzHH9s1g=="
},
"fast-deep-equal": { "fast-deep-equal": {
"version": "3.1.3", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
...@@ -10709,87 +10793,6 @@ ...@@ -10709,87 +10793,6 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "4.0.12", "version": "4.0.12",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.12.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.0.12.tgz",
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"core-js": "^3.6.5", "core-js": "^3.6.5",
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"element-plus": "^2.0.1", "element-plus": "^2.0.1",
"ezuikit-js": "^0.6.3",
"pinia": "^2.0.14", "pinia": "^2.0.14",
"vue": "^3.0.0", "vue": "^3.0.0",
"vue-router": "^4.0.0-0", "vue-router": "^4.0.0-0",
......
<template>
<div class="hello-ezuikit-js">
<div id="video-container" style="flex: 1;"></div>
<div style="flex-shrink: 0;padding:5px 0;text-align: right">
<el-button type="primary" @click="stop">暂停</el-button>
<el-button type="primary" @click="play">播放</el-button>
<!--<el-button @click="openSound">openSound</el-button>-->
<!--<el-button @click="closeSound">closeSound</el-button>-->
<!--<el-button @click="startSave">startSave</el-button>-->
<!--<el-button @click="stopSave">stopSave</el-button>-->
<!--<el-button @click="capturePicture">capturePicture</el-button>-->
<!--<el-button @click="fullScreen">fullScreen</el-button>-->
<!--<el-button @click="getOSDTime">getOSDTime</el-button>-->
<!--<el-button @click="ezopenStartTalk">开始对讲</el-button>-->
<!--<el-button @click="ezopenStopTalk">结束对讲</el-button>-->
<!--<el-button @click="destroy">销毁</el-button>-->
</div>
</div>
</template>
<script>
import EZUIKit from "ezuikit-js";
let player = null;
export default {
name: "esu",
props: {
url: String,
accessToken: String,
},
data(){
return {
next_time:Date.now()
}
},
mounted(){
this.init();
window.addEventListener('onresize',this.resize);
},
methods: {
play() {
const playPromise = player.play();
playPromise.then((data) => {
console.log("promise 获取 数据", data)
})
},
stop() {
const stopPromise = player.stop();
stopPromise.then((data) => {
console.log("promise 获取 数据", data)
})
},
getOSDTime() {
const getOSDTimePromise = player.getOSDTime();
getOSDTimePromise.then((data) => {
console.log("promise 获取 数据", data)
})
},
capturePicture() {
const capturePicturePromise = player.capturePicture(`${new Date().getTime()}`);
capturePicturePromise.then((data) => {
console.log("promise 获取 数据", data)
})
},
openSound() {
const openSoundPromise = player.openSound();
openSoundPromise.then((data) => {
console.log("promise 获取 数据", data)
})
},
closeSound() {
const openSoundPromise = player.closeSound();
openSoundPromise.then((data) => {
console.log("promise 获取 数据", data)
})
},
startSave() {
const startSavePromise = player.startSave(`${new Date().getTime()}`);
startSavePromise.then((data) => {
console.log("promise 获取 数据", data)
})
},
stopSave() {
const stopSavePromise = player.stopSave();
stopSavePromise.then((data) => {
console.log("promise 获取 数据", data)
})
},
ezopenStartTalk() {
player.startTalk();
},
ezopenStopTalk() {
player.stopTalk();
},
fullScreen() {
player.fullScreen();
},
destroy() {
const destroyPromise = player.destroy();
destroyPromise.then((data) => {
console.log("promise 获取 数据", data)
})
},
resize(){
if(Date.now() - this.next_time>600){
this.next_time = Date.now();
}
},
init(){
player = new EZUIKit.EZUIKitPlayer({
id: 'video-container', // 视频容器ID
accessToken: this.accessToken,
url: this.url,
// simple - 极简版; pcLive-pc直播;pcRec-pc回放;mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
// template: 'simple',
// plugin: ['talk'], // 加载插件,talk-对讲
// width: 600,
// height: 400,
});
this.$nextTick(()=>{
player.play();
});
}
}
};
</script>
<style lang="less" scoped>
.hello-ezuikit-js{
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
</style>
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
</div> </div>
</div> </div>
<div class="body-one monitor" v-else-if="tab=='monitor'"> <div class="body-one monitor" v-else-if="tab=='monitor'">
<esu :url="detail.url" :accessToken="detail.accessToken"></esu>
</div> </div>
<div class="body-one process" v-else-if="tab=='process'"> <div class="body-one process" v-else-if="tab=='process'">
<div class="process-box"> <div class="process-box">
...@@ -278,12 +278,15 @@ ...@@ -278,12 +278,15 @@
setup(props, {emit}) { setup(props, {emit}) {
const state = reactive({ const state = reactive({
show:false, show:false,
url:'ezopen://open.ys7.com/E77565052/1.hd.live',
order_id:'', order_id:'',
detail: { detail: {
poster:[], poster:[],
index: 0, index: 0,
yewei:0.7, yewei:0.7,
type:1 type:1,
accessToken:'at.bvx2ea007tfqqdvkcb9iuhk70q6gjodm-7smdnjfh9j-1wdmw5f-mal3go2vz',
url:'ezopen://open.ys7.com/E77565052/1.live',
}, },
showBanner:false, showBanner:false,
tabs: [ tabs: [
...@@ -613,7 +616,8 @@ ...@@ -613,7 +616,8 @@
} }
}, },
components: { components: {
orderDetail:defineAsyncComponent(()=>import("@/views/order-detail.vue")) orderDetail:defineAsyncComponent(()=>import("@/views/order-detail.vue")),
esu:defineAsyncComponent(()=>import("@/components/EZUIKitJs.vue")),
} }
} }
</script> </script>
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<div> <div>
<div class="gva-search-box"> <div class="gva-search-box">
<el-form :inline="true" :model="searchInfo" class="demo-form-inline"> <el-form :inline="true" :model="searchInfo" class="demo-form-inline">
<el-form-item label="原始设备id"> <el-form-item label="原始设备ID">
<el-input v-model="searchInfo.rawDeviceId" placeholder="搜索条件" /> <el-input v-model="searchInfo.rawDeviceId" placeholder="搜索条件"/>
</el-form-item> </el-form-item>
<el-form-item label="数据类型"> <el-form-item label="数据类型">
<el-input v-model="searchInfo.typeName" placeholder="搜索条件" /> <el-input v-model="searchInfo.typeName" placeholder="搜索条件"/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button> <el-button size="small" type="primary" icon="search" @click="onSubmit">查询</el-button>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
<div class="gva-table-box"> <div class="gva-table-box">
<div class="gva-btn-list"> <div class="gva-btn-list">
<el-button size="small" type="primary" icon="plus" @click="openDialog">新增</el-button> <!--<el-button size="small" type="primary" icon="plus" @click="openDialog">新增</el-button>-->
<el-popover v-model:visible="deleteVisible" placement="top" width="160"> <el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗?</p> <p>确定要删除吗?</p>
<div style="text-align: right; margin-top: 8px;"> <div style="text-align: right; margin-top: 8px;">
...@@ -24,31 +24,38 @@ ...@@ -24,31 +24,38 @@
<el-button size="small" type="primary" @click="onDelete">确定</el-button> <el-button size="small" type="primary" @click="onDelete">确定</el-button>
</div> </div>
<template #reference> <template #reference>
<el-button icon="delete" size="small" style="margin-left: 10px;" :disabled="!multipleSelection.length" @click="deleteVisible = true">删除</el-button> <el-button icon="delete" size="small" style="margin-left: 10px;"
:disabled="!multipleSelection.length" @click="deleteVisible = true">删除
</el-button>
</template> </template>
</el-popover> </el-popover>
</div> </div>
<el-table <el-table
ref="multipleTable" ref="multipleTable"
style="width: 100%" style="flex: 1;"
height="100%"
tooltip-effect="dark" tooltip-effect="dark"
:data="tableData" :data="tableData"
row-key="ID" row-key="ID"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55"/>
<el-table-column align="left" label="日期" width="180">
<el-table-column align="left" label="原始设备ID" prop="rawDeviceId" min-width="120"/>
<el-table-column align="left" label="公厕ID" prop="toiletId" min-width="120"/>
<el-table-column align="left" label="数据类型" prop="typeName" min-width="120"/>
<el-table-column align="left" label="数据值单位" prop="unit" min-width="120"/>
<el-table-column align="left" label="数据值" prop="value" min-width="120"/>
<el-table-column align="left" label="创建时间" min-width="180">
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template> <template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column> </el-table-column>
<el-table-column align="left" label="原始设备id" prop="rawDeviceId" width="120" /> <el-table-column align="left" label="操作" min-width="120" fixed="right">
<el-table-column align="left" label="公厕id" prop="toiletId" width="120" />
<el-table-column align="left" label="数据类型" prop="typeName" width="120" />
<el-table-column align="left" label="数据值单位" prop="unit" width="120" />
<el-table-column align="left" label="数据值" prop="value" width="120" />
<el-table-column align="left" label="按钮组">
<template #default="scope"> <template #default="scope">
<el-button type="primary" link icon="edit" size="small" class="table-button" @click="updateQshMonitorDataFunc(scope.row)">变更</el-button> <el-button type="primary" link icon="edit" size="small" class="table-button"
<el-button type="primary" link icon="delete" size="small" @click="deleteRow(scope.row)">删除</el-button> @click="updateQshMonitorDataFunc(scope.row)">查看
</el-button>
<el-button type="primary" link icon="delete" size="small" @click="deleteRow(scope.row)">删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -64,28 +71,28 @@ ...@@ -64,28 +71,28 @@
/> />
</div> </div>
</div> </div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="弹窗操作"> <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="历史数据">
<el-form :model="formData" label-position="right" label-width="80px"> <el-form :model="formData" label-position="right" label-width="120px">
<el-form-item label="原始设备id:"> <el-form-item label="原始设备ID:">
<el-input v-model="formData.rawDeviceId" clearable placeholder="请输入" /> <el-input v-model="formData.rawDeviceId" clearable placeholder="请输入"/>
</el-form-item> </el-form-item>
<el-form-item label="公厕id:"> <el-form-item label="公厕ID:">
<el-input v-model.number="formData.toiletId" clearable placeholder="请输入" /> <el-input v-model="formData.toiletId" clearable placeholder="请输入"/>
</el-form-item> </el-form-item>
<el-form-item label="数据类型:"> <el-form-item label="数据类型:">
<el-input v-model="formData.typeName" clearable placeholder="请输入" /> <el-input v-model="formData.typeName" clearable placeholder="请输入"/>
</el-form-item> </el-form-item>
<el-form-item label="数据值单位:"> <el-form-item label="数据值单位:">
<el-input v-model="formData.unit" clearable placeholder="请输入" /> <el-input v-model="formData.unit" clearable placeholder="请输入"/>
</el-form-item> </el-form-item>
<el-form-item label="数据值:"> <el-form-item label="数据值:">
<el-input v-model="formData.value" clearable placeholder="请输入" /> <el-input v-model="formData.value" clearable placeholder="请输入"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button size="small" @click="closeDialog">取 消</el-button> <el-button size="small" @click="closeDialog">取 消</el-button>
<el-button size="small" type="primary" @click="enterDialog">确 定</el-button> <!--<el-button size="small" type="primary" @click="enterDialog">确 定</el-button>-->
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
...@@ -93,98 +100,98 @@ ...@@ -93,98 +100,98 @@
</template> </template>
<script> <script>
export default { export default {
name: 'QshMonitorData' name: 'QshMonitorData'
} }
</script> </script>
<script setup> <script setup>
import { import {
createQshMonitorData, createQshMonitorData,
deleteQshMonitorData, deleteQshMonitorData,
deleteQshMonitorDataByIds, deleteQshMonitorDataByIds,
updateQshMonitorData, updateQshMonitorData,
findQshMonitorData, findQshMonitorData,
getQshMonitorDataList getQshMonitorDataList
} from '@/api/qshMonitorData' } from '@/api/qshMonitorData'
// 全量引入格式化工具 请按需保留 // 全量引入格式化工具 请按需保留
import { getDictFunc, formatDate, formatBoolean, filterDict } from '@/utils/format' import {getDictFunc, formatDate, formatBoolean, filterDict} from '@/utils/format'
import { ElMessage, ElMessageBox } from 'element-plus' import {ElMessage, ElMessageBox} from 'element-plus'
import { ref } from 'vue' import {ref} from 'vue'
// 自动化生成的字典(可能为空)以及字段 // 自动化生成的字典(可能为空)以及字段
const formData = ref({ const formData = ref({
rawDeviceId: '', rawDeviceId: '',
toiletId: 0, toiletId: '',
typeName: '', typeName: '',
unit: '', unit: '',
value: '', value: '',
}) })
// =========== 表格控制部分 =========== // =========== 表格控制部分 ===========
const page = ref(1) const page = ref(1)
const total = ref(0) const total = ref(0)
const pageSize = ref(10) const pageSize = ref(10)
const tableData = ref([]) const tableData = ref([])
const searchInfo = ref({}) const searchInfo = ref({})
// 重置 // 重置
const onReset = () => { const onReset = () => {
searchInfo.value = {} searchInfo.value = {}
} }
// 搜索 // 搜索
const onSubmit = () => { const onSubmit = () => {
page.value = 1 page.value = 1
pageSize.value = 10 pageSize.value = 10
getTableData() getTableData()
} }
// 分页 // 分页
const handleSizeChange = (val) => { const handleSizeChange = (val) => {
pageSize.value = val pageSize.value = val
getTableData() getTableData()
} }
// 修改页面容量 // 修改页面容量
const handleCurrentChange = (val) => { const handleCurrentChange = (val) => {
page.value = val page.value = val
getTableData() getTableData()
} }
// 查询 // 查询
const getTableData = async() => { const getTableData = async () => {
const table = await getQshMonitorDataList({ page: page.value, pageSize: pageSize.value, ...searchInfo.value }) const table = await getQshMonitorDataList({page: page.value, pageSize: pageSize.value, ...searchInfo.value})
if (table.code === 0) { if (table.code === 0) {
tableData.value = table.data.list tableData.value = table.data.list
total.value = table.data.total total.value = table.data.total
page.value = table.data.page page.value = table.data.page
pageSize.value = table.data.pageSize pageSize.value = table.data.pageSize
} }
} }
getTableData() getTableData()
// ============== 表格控制部分结束 =============== // ============== 表格控制部分结束 ===============
// 获取需要的字典 可能为空 按需保留 // 获取需要的字典 可能为空 按需保留
const setOptions = async () =>{ const setOptions = async () => {
} }
// 获取需要的字典 可能为空 按需保留 // 获取需要的字典 可能为空 按需保留
setOptions() setOptions()
// 多选数据 // 多选数据
const multipleSelection = ref([]) const multipleSelection = ref([])
// 多选 // 多选
const handleSelectionChange = (val) => { const handleSelectionChange = (val) => {
multipleSelection.value = val multipleSelection.value = val
} }
// 删除行 // 删除行
const deleteRow = (row) => { const deleteRow = (row) => {
ElMessageBox.confirm('确定要删除吗?', '提示', { ElMessageBox.confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -195,11 +202,11 @@ const deleteRow = (row) => { ...@@ -195,11 +202,11 @@ const deleteRow = (row) => {
} }
// 批量删除控制标记 // 批量删除控制标记
const deleteVisible = ref(false) const deleteVisible = ref(false)
// 多选删除 // 多选删除
const onDelete = async() => { const onDelete = async () => {
const ids = [] const ids = []
if (multipleSelection.value.length === 0) { if (multipleSelection.value.length === 0) {
ElMessage({ ElMessage({
...@@ -212,7 +219,7 @@ const onDelete = async() => { ...@@ -212,7 +219,7 @@ const onDelete = async() => {
multipleSelection.value.map(item => { multipleSelection.value.map(item => {
ids.push(item.ID) ids.push(item.ID)
}) })
const res = await deleteQshMonitorDataByIds({ ids }) const res = await deleteQshMonitorDataByIds({ids})
if (res.code === 0) { if (res.code === 0) {
ElMessage({ ElMessage({
type: 'success', type: 'success',
...@@ -226,23 +233,23 @@ const onDelete = async() => { ...@@ -226,23 +233,23 @@ const onDelete = async() => {
} }
} }
// 行为控制标记(弹窗内部需要增还是改) // 行为控制标记(弹窗内部需要增还是改)
const type = ref('') const type = ref('')
// 更新行 // 更新行
const updateQshMonitorDataFunc = async(row) => { const updateQshMonitorDataFunc = async (row) => {
const res = await findQshMonitorData({ ID: row.ID }) const res = await findQshMonitorData({ID: row.ID})
type.value = 'update' type.value = 'update'
if (res.code === 0) { if (res.code === 0) {
formData.value = res.data.reqshMonitorData formData.value = res.data.reqshMonitorData
dialogFormVisible.value = true dialogFormVisible.value = true
} }
} }
// 删除行 // 删除行
const deleteQshMonitorDataFunc = async (row) => { const deleteQshMonitorDataFunc = async (row) => {
const res = await deleteQshMonitorData({ ID: row.ID }) const res = await deleteQshMonitorData({ID: row.ID})
if (res.code === 0) { if (res.code === 0) {
ElMessage({ ElMessage({
type: 'success', type: 'success',
...@@ -253,30 +260,30 @@ const deleteQshMonitorDataFunc = async (row) => { ...@@ -253,30 +260,30 @@ const deleteQshMonitorDataFunc = async (row) => {
} }
getTableData() getTableData()
} }
} }
// 弹窗控制标记 // 弹窗控制标记
const dialogFormVisible = ref(false) const dialogFormVisible = ref(false)
// 打开弹窗 // 打开弹窗
const openDialog = () => { const openDialog = () => {
type.value = 'create' type.value = 'create'
dialogFormVisible.value = true dialogFormVisible.value = true
} }
// 关闭弹窗 // 关闭弹窗
const closeDialog = () => { const closeDialog = () => {
dialogFormVisible.value = false dialogFormVisible.value = false
formData.value = { formData.value = {
rawDeviceId: '', rawDeviceId: '',
toiletId: 0, toiletId: '',
typeName: '', typeName: '',
unit: '', unit: '',
value: '', value: '',
} }
} }
// 弹窗确定 // 弹窗确定
const enterDialog = async () => { const enterDialog = async () => {
let res let res
switch (type.value) { switch (type.value) {
case 'create': case 'create':
...@@ -297,7 +304,7 @@ const enterDialog = async () => { ...@@ -297,7 +304,7 @@ const enterDialog = async () => {
closeDialog() closeDialog()
getTableData() getTableData()
} }
} }
</script> </script>
<style> <style>
......
...@@ -45,14 +45,14 @@ ...@@ -45,14 +45,14 @@
> >
<el-table-column type="selection" width="55"/> <el-table-column type="selection" width="55"/>
<el-table-column align="left" label="点位名称" prop="name" min-width="180"/> <el-table-column align="left" label="点位名称" prop="name" min-width="180"/>
<el-table-column align="left" label="公厕地址" prop="address" min-width="180"/> <el-table-column align="left" label="公厕地址" prop="address" min-width="200"/>
<el-table-column align="left" label="公厕类型" prop="type" min-width="120"> <el-table-column align="left" label="公厕类型" prop="type" min-width="120">
<template #default="scope"> <template #default="scope">
{{ filterDict(scope.row.type,typeOptions) }} {{ filterDict(scope.row.type,typeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="left" label="纬度" prop="lat" min-width="120"/> <el-table-column align="left" label="纬度" prop="lat" min-width="180"/>
<el-table-column align="left" label="经度" prop="lng" min-width="120"/> <el-table-column align="left" label="经度" prop="lng" min-width="180"/>
<el-table-column align="left" label="管理人员" prop="manager" min-width="120"/> <el-table-column align="left" label="管理人员" prop="manager" min-width="120"/>
<el-table-column align="left" label="管理员联系电话" prop="managerPhone" min-width="140"/> <el-table-column align="left" label="管理员联系电话" prop="managerPhone" min-width="140"/>
<el-table-column align="left" label="创建时间" min-width="180"> <el-table-column align="left" label="创建时间" min-width="180">
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
/> />
</div> </div>
</div> </div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="弹窗操作"> <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="公厕详情">
<el-form :model="formData" label-position="right" label-width="120px"> <el-form :model="formData" label-position="right" label-width="120px">
<el-form-item label="点位名称:"> <el-form-item label="点位名称:">
<el-input v-model="formData.name" clearable placeholder="请输入"/> <el-input v-model="formData.name" clearable placeholder="请输入"/>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="公厕地址:"> <el-form-item label="公厕地址:">
<el-input v-model="formData.address" clearable placeholder="请输入"/> <el-input v-model="formData.address" type="textarea" resize="none" clearable placeholder="请输入"/>
</el-form-item> </el-form-item>
<el-form-item label="展示图片:"> <el-form-item label="展示图片:">
<new-upload v-if="dialogFormVisible" :list="[formData.showImage]" @upload="(file)=>formData.showImage = file[0]"></new-upload> <new-upload v-if="dialogFormVisible" :list="[formData.showImage]" @upload="(file)=>formData.showImage = file[0]"></new-upload>
...@@ -112,8 +112,14 @@ ...@@ -112,8 +112,14 @@
<el-form-item label="管理员联系电话:"> <el-form-item label="管理员联系电话:">
<el-input v-model="formData.managerPhone" clearable placeholder="请输入"/> <el-input v-model="formData.managerPhone" clearable placeholder="请输入"/>
</el-form-item> </el-form-item>
<el-form-item label="监控信息:"> <el-form-item label="监控账号:">
<el-input v-model="formData.monitor" clearable placeholder="请输入"/> <el-input v-model="formData.monitor_ac" clearable placeholder="请输入"/>
</el-form-item>
<el-form-item label="监控ID:">
<el-input v-model="formData.monitor_id" clearable placeholder="请输入"/>
</el-form-item>
<el-form-item label="设备ID:">
<el-input v-model="formData.yewei_device" clearable placeholder="请输入"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
...@@ -156,7 +162,9 @@ ...@@ -156,7 +162,9 @@
lng: '', lng: '',
manager: '', manager: '',
managerPhone: '', managerPhone: '',
monitor: '', monitor_ac: '',//监控账号
monitor_id: '',//监控ID
yewei_device: '',//设备ID
name: '', name: '',
showImage: '', showImage: '',
type: undefined, type: undefined,
...@@ -315,7 +323,9 @@ ...@@ -315,7 +323,9 @@
lng: '', lng: '',
manager: '', manager: '',
managerPhone: '', managerPhone: '',
monitor: '', monitor_ac: '',//监控账号
monitor_id: '',//监控ID
yewei_device: '',//设备ID
name: '', name: '',
showImage: '', showImage: '',
type: undefined, type: undefined,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment