安全管理(巡检点):巡检点增删查

This commit is contained in:
骆乐 2022-08-24 19:16:14 +08:00
parent 9ae9c84a0c
commit c36032e510
6 changed files with 1805 additions and 1229 deletions

View File

@ -68,16 +68,16 @@ export default {
hint: '提示',
hintContent: '此操作将永久删除该文件, 是否继续?',
safeLvList: [{
label: '一级',
label: '正常',
value: 1
},{
label: '二级',
label: '超报警',
value: 2
},{
label: '三级',
label: '超控制',
value: 3
},{
label: '四级',
label: '变化速率报警',
value: 4
}],
allCheck: '全选',

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -14,6 +14,7 @@ export const selectMeasurePointListApi = data => post('xmgl/deepExcavationMeasur
export const addDeepExcavationMeasurePointApi = data => post('xmgl/deepExcavationMeasurePoint/add', data); //添加深基坑-测点信息
export const deleteDeepExcavationMeasurePointApi = data => post('xmgl/deepExcavationMeasurePoint/delete', data); //删除深基坑-测点信息
export const getDetailDeepExcavationApi = data => get('/xmgl/deepExcavationMeasurePoint/getDetailsByMeasurePointNumber', data); //测点信息-测点管理-详情
export const getSensorListApi = data => post('/xmgl/deepExcavationSensor/getSensorListByMeasurePointNumber', data); //通过测点编号查询传感器列表
export const selectDeepExcavationSensorTypeListApi = data => post('xmgl/deepExcavationSensorType/selectDeepExcavationSensorTypeList', data); //列表查询深基坑-传感器类型信息

File diff suppressed because it is too large Load Diff

View File

@ -337,6 +337,15 @@
:value="item.measurePointNumber">
</el-option>
</el-select>
<span>传感器编号</span>
<!-- <el-select v-model="checkList" size="small" @change="checkNum" placeholder="请选择">
<el-option
v-for="item in getSensorList"
:key="item.id"
:label="item.sensorTypeName"
:value="item.measurePointNumber">
</el-option>
</el-select> -->
</div>
<div class="form-item">
<!-- 选择日期 -->
@ -419,7 +428,8 @@ import {
selectDeepExcavationPlaneFigureCoordinateApi,
selectDeepExcavationAllMeasurePointListApi,
queryByIdDeepExcavationMonitorTypeApi,
selectMonitorTypeListApi
selectMonitorTypeListApi,
getSensorListApi
} from "@/assets/js/api/deepFoundationPitManage.js"
export default {
data(){
@ -493,6 +503,7 @@ export default {
id: 5,
}],
options:[],
getSensorList:[], //
checkList:"",
dateTime: [],
searchDate: 1,
@ -537,8 +548,8 @@ export default {
measurePointNumber: this.checkList,
relaId: this.relaId,
projectSn: this.projectSn,
// startTime: this.dateTime[0],
// endTime: this.dateTime[1]
startTime: this.dateTime[0],
endTime: this.dateTime[1]
}).then(res=>{
console.log(res)
if(res.code == 200 && res.result){
@ -553,8 +564,9 @@ export default {
this.echartData7.unit = '('+item.keyName.split('(')[1]
}
})
res.result.records.forEach(item=>{
this.echartData7.xAxis.push(item.receiveTime.split(' ')[1])
res.result.data.records.forEach(item=>{
// this.echartData7.xAxis.push(item.receiveTime.split(' ')[1])
this.echartData7.xAxis.push(item.receiveTime.split(' ')[0])
this.echartData7.data.push(item.data)
})
// console.log('',this.echartData7)
@ -568,7 +580,7 @@ export default {
deepExcavationId: this.deepExcavation,
relaId: this.relaId
}).then(res=>{
// console.log('',res)
console.log('列表查询测点',res)
if(res.code == 200 && res.result){
this.options = res.result
let arr = []
@ -584,6 +596,14 @@ export default {
}
})
},
//
selectDeepExcavationAllgetSensorList(){
let data = {}
getSensorListApi(data).then((res)=>{
console.log('0000000',res)
})
},
// id
queryByIdDeepExcavationMonitorType(val){
console.log(val)
@ -1453,8 +1473,9 @@ export default {
// status: val.alarmType == 1 ? this.$t('message.deepFoundConfig.no'):this.$t('message.deepFoundConfig.yes'),
// tableHeader: arr
// }
let nowTime = this.selectNowDate()
this.dateTime = [nowTime.split(' ')[0] + ' ' + '00:00:00',nowTime]
//
// let nowTime = this.selectNowDate()
// this.dateTime = [nowTime.split(' ')[0] + ' ' + '00:00:00',nowTime]
// this.queryByIdDeepExcavationMonitorType(val.id)
this.selectDeepExcavationAllMeasurePointList()
this.$nextTick(()=>{
@ -1530,8 +1551,22 @@ export default {
// this.createdEchart7()
},
checkNum(val){
console.log(val)
console.log('当前选择',val)
this.selectDeepExcavationCurrentDataList()
// measurePointNumber = val
//
getSensorListApi({measurePointNumber:val}).then((res)=>{
console.log('0000000',res)
if(res.code == 200 && res.result){
this.getSensorList = res.result.data.records
console.log('------------',this.getSensorList)
}
})
},
checkDateTime(val){
console.log(val)

View File

@ -11,9 +11,18 @@
<el-table class="tables" :data="tableData">
<el-table-column prop="checkingPointName" label="名称" align="center"></el-table-column>
<el-table-column prop="position" label="位置" align="center"></el-table-column>
<el-table-column prop="createUserName" label="创建人" align="center"></el-table-column>
<el-table-column prop="createUserName" label="创建人" align="center">
</el-table-column>
<el-table-column prop="createDate" label="创建时间" align="center"></el-table-column>
<el-table-column prop="beaconMinor" label="二维码" align="center"></el-table-column>
<el-table-column prop="qrCode" label="二维码" align="center">
<template slot-scope="{ row }">
<!-- {{$store.state.FILEURL + row.qrCode}} -->
<el-image style="margin-right: 8px;width: 80px; height: 80px;cursor: pointer;border-radius: 4px"
fit="cover"
:src="$store.state.FILEURL + row.qrCode"
/>
</template>
</el-table-column>
<el-table-column
:label="$t('message.personnelPosition.beaconManage.table.operation')"
@ -24,7 +33,7 @@
<div class="tableBtns">
<div class="operationText">
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
<a>下载</a>
<a class="download" target="_blank" :href="$store.state.FILEURL + scope.row.qrCode">下载</a>
</div>
<div @click="toDelete(scope.row)" class="operationText">
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
@ -74,6 +83,7 @@
:placeholder="$t('message.personnelPosition.please_enter')"
></el-input>
</el-form-item>
<div id="qrCode" ref="qrCodeDiv"></div>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@ -84,7 +94,7 @@
<el-button
type="primary"
icon="el-icon-circle-check"
@click="addCardFn"
@click.once="addCardFn"
size="medium"
>生成二维码</el-button>
</div>
@ -100,6 +110,7 @@ import {
addPointApi,
deletePointApi
} from "@/assets/js/api/insect.js";
import QRCode from "qrcodejs2";
export default {
data() {
return {
@ -107,19 +118,23 @@ export default {
workerName: ""
},
cardDialogTitle: "新建巡检点",
tableData: [{ beaconMinor: "111" }],
tableData: [],
total: 0,
pageNo: 1,
pageSize: 10,
cardForm: {
checkingPointName:'',
position:"",
checkingPointName: "",
position: ""
},
qrCode: "",
cardDialog: false,
projectSn: "",
cardFormRules: {
cardNo: [
checkingPointName: [
{ required: true, message: "请输入巡检点名称", trigger: "blur" }
],
position: [
{ required: true, message: "请输入巡检位置", trigger: "blur" }
]
}
};
@ -148,11 +163,12 @@ export default {
};
getPointListApi(data).then(res => {
console.log("----巡检点列表", res);
this.tableData = res.result.records
});
},
//
toRefresh() {
this.getPointList()
this.getPointList();
},
//
toAdd() {
@ -192,11 +208,79 @@ export default {
});
});
},
// YYYY-MM-DD HH:mm:ss
selectNowDate() {
var date = new Date(),
year = date.getFullYear(),
month = date.getMonth() + 1,
day = date.getDate(),
hours = date.getHours(), //(0-23)
minutes = date.getMinutes(), //(0-59)
seconds = date.getSeconds();
month >= 1 && month <= 9 ? (month = "0" + month) : "";
day >= 0 && day <= 9 ? (day = "0" + day) : "";
hours >= 0 && hours <= 9 ? (hours = "0" + hours) : "";
minutes >= 0 && minutes <= 9 ? (minutes = "0" + minutes) : "";
seconds >= 0 && seconds <= 9 ? (seconds = "0" + seconds) : "";
var timer =
year +
"-" +
month +
"-" +
day +
" " +
hours +
":" +
minutes +
":" +
seconds;
return timer;
},
//
addCardFn() {}
addCardFn() {
//
let data = this.cardForm;
data.projectSn = this.$store.state.projectSn;
data.createUserId = this.$store.state.userInfo.userId;
data.createUserName = this.$store.state.userInfo.account;
this.$refs["cardForm"].validate(valid => {
if (valid) {
document.getElementById("qrCode").innerHTML = "";
console.log("QRCode", QRCode);
let QRCodeData = new QRCode(this.$refs.qrCodeDiv, {
text: JSON.stringify(data),
width: 150,
height: 150,
colorDark: "#333333", //
colorLight: "#ffffff", //
correctLevel: QRCode.CorrectLevel.L //L/M/H
});
console.log("QRCodeData", QRCodeData);
setTimeout(() => {
let img = QRCodeData._el.innerHTML;
let baseurl = img
.split("=")[5].split('"')[1]
console.log("baseurl", baseurl);
data.qrCode = baseurl;
data.createDate = this.selectNowDate();
addPointApi(data).then(res => {
console.log("新增", res);
if (res.code == 200) {
this.cardDialog = false;
this.getPointList()
}
});
}, 500);
}
});
}
}
};
</script>
<style>
<style lang="less" scoped>
.download{
text-decoration: none;
}
</style>