安全管理(巡检点):巡检点增删查
This commit is contained in:
parent
9ae9c84a0c
commit
c36032e510
@ -68,16 +68,16 @@ export default {
|
|||||||
hint: '提示',
|
hint: '提示',
|
||||||
hintContent: '此操作将永久删除该文件, 是否继续?',
|
hintContent: '此操作将永久删除该文件, 是否继续?',
|
||||||
safeLvList: [{
|
safeLvList: [{
|
||||||
label: '一级',
|
label: '正常',
|
||||||
value: 1
|
value: 1
|
||||||
},{
|
},{
|
||||||
label: '二级',
|
label: '超报警',
|
||||||
value: 2
|
value: 2
|
||||||
},{
|
},{
|
||||||
label: '三级',
|
label: '超控制',
|
||||||
value: 3
|
value: 3
|
||||||
},{
|
},{
|
||||||
label: '四级',
|
label: '变化速率报警',
|
||||||
value: 4
|
value: 4
|
||||||
}],
|
}],
|
||||||
allCheck: '全选',
|
allCheck: '全选',
|
||||||
|
|||||||
BIN
src/assets/images/menu/saosao.png
Normal file
BIN
src/assets/images/menu/saosao.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@ -14,6 +14,7 @@ export const selectMeasurePointListApi = data => post('xmgl/deepExcavationMeasur
|
|||||||
export const addDeepExcavationMeasurePointApi = data => post('xmgl/deepExcavationMeasurePoint/add', data); //添加深基坑-测点信息
|
export const addDeepExcavationMeasurePointApi = data => post('xmgl/deepExcavationMeasurePoint/add', data); //添加深基坑-测点信息
|
||||||
export const deleteDeepExcavationMeasurePointApi = data => post('xmgl/deepExcavationMeasurePoint/delete', data); //删除深基坑-测点信息
|
export const deleteDeepExcavationMeasurePointApi = data => post('xmgl/deepExcavationMeasurePoint/delete', data); //删除深基坑-测点信息
|
||||||
export const getDetailDeepExcavationApi = data => get('/xmgl/deepExcavationMeasurePoint/getDetailsByMeasurePointNumber', 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); //列表查询深基坑-传感器类型信息
|
export const selectDeepExcavationSensorTypeListApi = data => post('xmgl/deepExcavationSensorType/selectDeepExcavationSensorTypeList', data); //列表查询深基坑-传感器类型信息
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -337,6 +337,15 @@
|
|||||||
:value="item.measurePointNumber">
|
:value="item.measurePointNumber">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</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>
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
<!-- 选择日期 -->
|
<!-- 选择日期 -->
|
||||||
@ -419,7 +428,8 @@ import {
|
|||||||
selectDeepExcavationPlaneFigureCoordinateApi,
|
selectDeepExcavationPlaneFigureCoordinateApi,
|
||||||
selectDeepExcavationAllMeasurePointListApi,
|
selectDeepExcavationAllMeasurePointListApi,
|
||||||
queryByIdDeepExcavationMonitorTypeApi,
|
queryByIdDeepExcavationMonitorTypeApi,
|
||||||
selectMonitorTypeListApi
|
selectMonitorTypeListApi,
|
||||||
|
getSensorListApi
|
||||||
} from "@/assets/js/api/deepFoundationPitManage.js"
|
} from "@/assets/js/api/deepFoundationPitManage.js"
|
||||||
export default {
|
export default {
|
||||||
data(){
|
data(){
|
||||||
@ -493,6 +503,7 @@ export default {
|
|||||||
id: 5,
|
id: 5,
|
||||||
}],
|
}],
|
||||||
options:[],
|
options:[],
|
||||||
|
getSensorList:[], // 传感器列表
|
||||||
checkList:"",
|
checkList:"",
|
||||||
dateTime: [],
|
dateTime: [],
|
||||||
searchDate: 1,
|
searchDate: 1,
|
||||||
@ -537,8 +548,8 @@ export default {
|
|||||||
measurePointNumber: this.checkList,
|
measurePointNumber: this.checkList,
|
||||||
relaId: this.relaId,
|
relaId: this.relaId,
|
||||||
projectSn: this.projectSn,
|
projectSn: this.projectSn,
|
||||||
// startTime: this.dateTime[0],
|
startTime: this.dateTime[0],
|
||||||
// endTime: this.dateTime[1]
|
endTime: this.dateTime[1]
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.code == 200 && res.result){
|
if(res.code == 200 && res.result){
|
||||||
@ -553,8 +564,9 @@ export default {
|
|||||||
this.echartData7.unit = '('+item.keyName.split('(')[1]
|
this.echartData7.unit = '('+item.keyName.split('(')[1]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
res.result.records.forEach(item=>{
|
res.result.data.records.forEach(item=>{
|
||||||
this.echartData7.xAxis.push(item.receiveTime.split(' ')[1])
|
// this.echartData7.xAxis.push(item.receiveTime.split(' ')[1])
|
||||||
|
this.echartData7.xAxis.push(item.receiveTime.split(' ')[0])
|
||||||
this.echartData7.data.push(item.data)
|
this.echartData7.data.push(item.data)
|
||||||
})
|
})
|
||||||
// console.log('图标的值',this.echartData7)
|
// console.log('图标的值',this.echartData7)
|
||||||
@ -568,7 +580,7 @@ export default {
|
|||||||
deepExcavationId: this.deepExcavation,
|
deepExcavationId: this.deepExcavation,
|
||||||
relaId: this.relaId
|
relaId: this.relaId
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
// console.log('列表查询测点',res)
|
console.log('列表查询测点',res)
|
||||||
if(res.code == 200 && res.result){
|
if(res.code == 200 && res.result){
|
||||||
this.options = res.result
|
this.options = res.result
|
||||||
let arr = []
|
let arr = []
|
||||||
@ -584,6 +596,14 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 查询传感器编号列表
|
||||||
|
selectDeepExcavationAllgetSensorList(){
|
||||||
|
let data = {}
|
||||||
|
getSensorListApi(data).then((res)=>{
|
||||||
|
console.log('0000000',res)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 根据id查询基坑内容详情
|
// 根据id查询基坑内容详情
|
||||||
queryByIdDeepExcavationMonitorType(val){
|
queryByIdDeepExcavationMonitorType(val){
|
||||||
console.log(val)
|
console.log(val)
|
||||||
@ -1453,8 +1473,9 @@ export default {
|
|||||||
// status: val.alarmType == 1 ? this.$t('message.deepFoundConfig.no'):this.$t('message.deepFoundConfig.yes'),
|
// status: val.alarmType == 1 ? this.$t('message.deepFoundConfig.no'):this.$t('message.deepFoundConfig.yes'),
|
||||||
// tableHeader: arr
|
// 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.queryByIdDeepExcavationMonitorType(val.id)
|
||||||
this.selectDeepExcavationAllMeasurePointList()
|
this.selectDeepExcavationAllMeasurePointList()
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
@ -1530,8 +1551,22 @@ export default {
|
|||||||
// this.createdEchart7()
|
// this.createdEchart7()
|
||||||
},
|
},
|
||||||
checkNum(val){
|
checkNum(val){
|
||||||
console.log(val)
|
console.log('当前选择',val)
|
||||||
this.selectDeepExcavationCurrentDataList()
|
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){
|
checkDateTime(val){
|
||||||
console.log(val)
|
console.log(val)
|
||||||
|
|||||||
@ -11,9 +11,18 @@
|
|||||||
<el-table class="tables" :data="tableData">
|
<el-table class="tables" :data="tableData">
|
||||||
<el-table-column prop="checkingPointName" label="名称" align="center"></el-table-column>
|
<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="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="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
|
<el-table-column
|
||||||
:label="$t('message.personnelPosition.beaconManage.table.operation')"
|
:label="$t('message.personnelPosition.beaconManage.table.operation')"
|
||||||
@ -24,7 +33,7 @@
|
|||||||
<div class="tableBtns">
|
<div class="tableBtns">
|
||||||
<div class="operationText">
|
<div class="operationText">
|
||||||
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
|
<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>
|
||||||
<div @click="toDelete(scope.row)" class="operationText">
|
<div @click="toDelete(scope.row)" class="operationText">
|
||||||
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
||||||
@ -74,6 +83,7 @@
|
|||||||
:placeholder="$t('message.personnelPosition.please_enter')"
|
:placeholder="$t('message.personnelPosition.please_enter')"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<div id="qrCode" ref="qrCodeDiv"></div>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button
|
<el-button
|
||||||
class="cancleBtn"
|
class="cancleBtn"
|
||||||
@ -84,7 +94,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-circle-check"
|
icon="el-icon-circle-check"
|
||||||
@click="addCardFn"
|
@click.once="addCardFn"
|
||||||
size="medium"
|
size="medium"
|
||||||
>生成二维码</el-button>
|
>生成二维码</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -100,6 +110,7 @@ import {
|
|||||||
addPointApi,
|
addPointApi,
|
||||||
deletePointApi
|
deletePointApi
|
||||||
} from "@/assets/js/api/insect.js";
|
} from "@/assets/js/api/insect.js";
|
||||||
|
import QRCode from "qrcodejs2";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -107,19 +118,23 @@ export default {
|
|||||||
workerName: ""
|
workerName: ""
|
||||||
},
|
},
|
||||||
cardDialogTitle: "新建巡检点",
|
cardDialogTitle: "新建巡检点",
|
||||||
tableData: [{ beaconMinor: "111" }],
|
tableData: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
cardForm: {
|
cardForm: {
|
||||||
checkingPointName:'',
|
checkingPointName: "",
|
||||||
position:"",
|
position: ""
|
||||||
},
|
},
|
||||||
|
qrCode: "",
|
||||||
cardDialog: false,
|
cardDialog: false,
|
||||||
projectSn: "",
|
projectSn: "",
|
||||||
cardFormRules: {
|
cardFormRules: {
|
||||||
cardNo: [
|
checkingPointName: [
|
||||||
{ required: true, message: "请输入巡检点名称", trigger: "blur" }
|
{ required: true, message: "请输入巡检点名称", trigger: "blur" }
|
||||||
|
],
|
||||||
|
position: [
|
||||||
|
{ required: true, message: "请输入巡检位置", trigger: "blur" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -148,11 +163,12 @@ export default {
|
|||||||
};
|
};
|
||||||
getPointListApi(data).then(res => {
|
getPointListApi(data).then(res => {
|
||||||
console.log("----巡检点列表", res);
|
console.log("----巡检点列表", res);
|
||||||
|
this.tableData = res.result.records
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 刷新
|
// 刷新
|
||||||
toRefresh() {
|
toRefresh() {
|
||||||
this.getPointList()
|
this.getPointList();
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
toAdd() {
|
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>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="less" scoped>
|
||||||
|
.download{
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user