develop_cloud #1

Merged
dashixiong merged 234 commits from develop_cloud into main-cloud 2026-02-11 02:06:04 +00:00
107 changed files with 12036 additions and 30 deletions
Showing only changes of commit cbc7a341c9 - Show all commits

View File

@ -64,9 +64,9 @@ export function getDeviceList(siteId) {
}
//获取设备点位table
export function getDevicePointList({siteId,deviceId,deviceCategory,pageNum,pageSize}) {
export function getDevicePointList({siteId,deviceId,deviceCategory,pageNum,pageSize,dataPointName=''}) {
return request({
url: `/ems/siteConfig/getDevicePointList?siteId=${siteId}&deviceId=${deviceId}&pageNum=${pageNum}&pageSize=${pageSize}&deviceCategory=${deviceCategory}`,
url: `/ems/siteConfig/getDevicePointList?siteId=${siteId}&deviceId=${deviceId}&pageNum=${pageNum}&pageSize=${pageSize}&deviceCategory=${deviceCategory}&dataPointName=${dataPointName}`,
method: 'get',
})
}

View File

@ -12,6 +12,18 @@
title="点位列表"
width="800px"
>
<div style="margin-bottom: 20px">
<el-input v-model="pointName" placeholder="请输入点位" clearable style="width: 200px"></el-input>
<!-- <el-autocomplete-->
<!-- v-model="pointName"-->
<!-- placeholder="请输入点位"-->
<!-- clearable-->
<!-- :fetch-suggestions="querySearchAsync"-->
<!-- @select="handleSelect"-->
<!-- ></el-autocomplete>-->
<el-button type="primary" style="margin-left: 20px" @click="pointNameSearch">搜索</el-button>
</div>
<el-table
:data="tableData"
class="common-table"
@ -54,6 +66,7 @@
</template>
<script>
import {getDevicePointList} from "@/api/ems/site";
import {pointFuzzyQuery} from "@/api/ems/search";
export default {
watch:{
@ -61,10 +74,12 @@ export default {
if(!val){
this.tableData=[]
this.deviceId=''
this.deviceName=''
this.siteId=''
this.pageSize=10
this.pageNum=1
this.totalSize=0
this.pointName=''
this.loading =false
}
},
@ -73,7 +88,10 @@ export default {
return{
show:false,
loading:false,
pointName:'',//点位名称
deviceCategory:'',
deviceName:'',
deviceId:'',
siteId:'',
tableData:[],
pageSize:10,//分页栏当前每个数据总数
@ -82,21 +100,22 @@ export default {
}
},
methods:{
showTable({deviceCategory,siteId,deviceId}){
pointNameSearch(){
this.pageNum=1
this.getData()
},
showTable({deviceCategory,siteId,deviceId,deviceName}){
this.deviceCategory =deviceCategory
this.siteId=siteId
this.deviceId=deviceId
this.tableData=[]
this.pageSize=10//分页栏当前每个数据总数
this.pageNum=1//分页栏当前页数
this.totalSize=0//table表格数据总数
this.deviceName=deviceName
this.show=true
this.getData()
},
getData(){
this.loading=true
const {siteId,deviceId,deviceCategory,pageNum,pageSize} =this
getDevicePointList({siteId,deviceId,deviceCategory,pageNum,pageSize}).then(response => {
const {siteId,deviceId,deviceCategory,pageNum,pageSize,pointName} =this
getDevicePointList({siteId,deviceId,deviceCategory,pageNum,pageSize,dataPointName:pointName}).then(response => {
this.tableData=response?.rows || [];
this.totalSize = response?.total || 0
}).finally(() => {this.loading=false})
@ -114,6 +133,23 @@ export default {
this.getData()
})
},
//点位
handleSelect(data){
this.pointName = data.value
},
querySearchAsync(query,cb){
console.log('查询数据',query)
pointFuzzyQuery({
siteIds:[this.siteId],
categoryName:this.deviceName,
pointName:query,
}).then(response => {
const data = response?.data || []
cb(data.map(item => {
return {name: item, value: item}
}))
})
},
}
}
</script>

View File

@ -152,7 +152,7 @@ export default {
methods:{
// 查看设备电位表格
pointDetail(row){
this.$refs.pointTable.showTable({deviceCategory:row.deviceCategory,siteId:row.siteId,deviceId:row.deviceId})
this.$refs.pointTable.showTable(row)
},
clearEditDeviceData(){
this.mode = '';