fix: 修改机械设备定位和智能安全帽的接口传参

This commit is contained in:
Vce 2024-03-27 19:12:03 +08:00
parent 1fe7366c1d
commit 96195672f1
8 changed files with 82 additions and 75 deletions

View File

@ -11,7 +11,7 @@ var COMPANY = '' //通用
// COMPANY = 'hengtong'//瑞士恒通
// COMPANY = 'yunlian'//云联万物
// COMPANY = 'neimenggu'//内蒙古项目
COMPANY = 'zjsj'//中建四局
// COMPANY = 'zjsj'//中建四局
// COMPANY = 'zjwj'//中建五局
// COMPANY = 'sccr'//四川成润
// COMPANY = 'pssh'//坪山沙湖项目
@ -26,7 +26,7 @@ var PROJECT = {
online_gxlt: 'gxlt', // 广西联通
}
var PROJECT_TYPE = PROJECT.online_zjsj
var PROJECT_TYPE = PROJECT.local_test
var headerShow = true // 是否显示头部
var tabsShow = true // 是否显示tabs
if (COMPANY == 'xingxuan') {

View File

@ -88,8 +88,8 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
// axios.defaults.baseURL ='http://183.249.224.118:9000/' //嘉兴王江泾公用码头
// axios.defaults.baseURL ='http://101.43.164.214:11111/' // 百色三标段项目
axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址
axios.defaults.baseURL ='http://101.43.164.214:11111/' // 百色三标段项目
// axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址

View File

@ -91,7 +91,7 @@ export default {
getEquipmentAlarmRecordPageApi({
pageNo: this.pageInfo.pageNo,
pageSize: this.pageInfo.pageSize,
// projectSn: this.$store.state.projectSn,
projectSn: this.$store.state.projectSn,
devSn: this.searchForm.devSn,
alarmTime_begin:this.searchForm.alarmTime_begin,
alarmTime_end:this.searchForm.alarmTime_end,
@ -103,7 +103,9 @@ export default {
})
},
async getEquipmentList() {
await getEquipmentListApi().then(result => {
await getEquipmentListApi({
projectSn: this.$store.state.projectSn,
}).then(result => {
if (result.success) {
this.equipmentList = result.result
}

View File

@ -108,7 +108,7 @@ export default {
getEquipmentPayDataPageApi({
pageNo: this.pageInfo.pageNo,
pageSize: this.pageInfo.pageSize,
// projectSn: this.$store.state.projectSn,
projectSn: this.$store.state.projectSn,
equipmentName: this.searchForm.equipmentName,
devSn: this.searchForm.devSn,
uploadTime_begin: this.searchForm.uploadTime_begin,
@ -121,7 +121,9 @@ export default {
})
},
async getDevSnList() {
await getEquipmentListApi().then(result => {
await getEquipmentListApi({
projectSn: this.$store.state.projectSn,
}).then(result => {
if (result.success) {
this.equipmentList = result.result
}

View File

@ -43,9 +43,7 @@
</el-table-column>
</el-table>
</vue-scroll>
<el-pagination class="pagerBox" @size-change="SizeChange" @current-change="CurrentChange"
:current-page="pagInfo.pageNo" :page-sizes="$store.state.PAGESIZRS" :page-size="pagInfo.pageSize"
layout="total, sizes, prev, pager, next" :total="Number(pagInfo.total)" background >
<el-pagination class="pagerBox" @size-change="SizeChange" @current-change="CurrentChange" :current-page="pagInfo.pageNo" :page-sizes="$store.state.PAGESIZRS" :page-size="pagInfo.pageSize" layout="total, sizes, prev, pager, next" :total="Number(pagInfo.total)" background>
</el-pagination>
</div>
<!-- 新增-编辑-弹窗 -->
@ -59,21 +57,18 @@
<el-input v-model="addEditForm.devSn" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="司机" prop="driverId">
<el-select v-model="addEditForm.driverId" placeholder="请选择" clearable :style="{ width: '100%' }" >
<el-option v-for="(item, index) in workerList" :key="index" :label="item.workerName" :value="item.id" ></el-option>
<el-select v-model="addEditForm.driverId" placeholder="请选择" clearable :style="{ width: '100%' }">
<el-option v-for="(item, index) in workerList" :key="index" :label="item.workerName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="新增时间" prop="createTime">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="addEditForm.createTime"
type="datetime" placeholder="请选择时间" >
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="addEditForm.createTime" type="datetime" placeholder="请选择时间">
</el-date-picker>
</el-form-item>
<div class="dialog-footer">
<el-button class="cancleBtn" @click="dialogShow = false" icon="el-icon-circle-close" size="medium"
>{{ $t('message.deviceManage.cancel') }}
<el-button class="cancleBtn" @click="dialogShow = false" icon="el-icon-circle-close" size="medium">{{ $t('message.deviceManage.cancel') }}
</el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium"
>{{ $t('message.deviceManage.save') }}
<el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium">{{ $t('message.deviceManage.save') }}
</el-button>
</div>
</el-form>
@ -82,11 +77,13 @@
</div>
</template>
<script>
import { getDeviceCentraliceCentralPageApi,
import {
getDeviceCentraliceCentralPageApi,
addDeviceCentraliceCentralPageApi,
editDeviceCentraliceCentralPageApi,
deleteDeviceCentraliceCentralPageApi,
getWorkerInfoListApi } from '@/assets/js/api/devicePosition/equipmentPosition.js'
getWorkerInfoListApi,
} from '@/assets/js/api/devicePosition/equipmentPosition.js'
export default {
mounted() {},
created() {
@ -100,7 +97,7 @@ export default {
pagInfo: {
pageNo: 1, //
pageSize: 10, //
total: 0 //
total: 0, //
},
tableData: [],
addEditForm: {
@ -115,7 +112,7 @@ export default {
driverId: [{ required: true, message: '必填', trigger: 'blur' }],
},
searchForm: {},
workerList: []
workerList: [],
}
},
methods: {
@ -125,8 +122,8 @@ export default {
pageSize: this.pagInfo.pageSize,
projectSn: this.$store.state.projectSn,
devSn: this.searchForm.devSn,
}).then(result => {
projectSn: this.$store.state.projectSn,
}).then((result) => {
if (result.success) {
this.tableData = result.result.records
this.pagInfo.total = result.result.total
@ -148,17 +145,17 @@ export default {
submit() {
let params = JSON.parse(JSON.stringify(this.addEditForm))
params.projectSn = this.$store.state.projectSn
this.$refs.addEditForm.validate(valid => {
this.$refs.addEditForm.validate((valid) => {
if (valid) {
if (this.title == '新增') {
addDeviceCentraliceCentralPageApi(params).then(result => {
addDeviceCentraliceCentralPageApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getPage()
}
})
} else if (this.title == '编辑') {
editDeviceCentraliceCentralPageApi(params).then(result => {
editDeviceCentraliceCentralPageApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getPage()
@ -175,20 +172,23 @@ export default {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
type: 'warning',
})
.then(() => {
deleteDeviceCentraliceCentralPageApi({ id: obj.id }).then(res => {
deleteDeviceCentraliceCentralPageApi({
id: obj.id,
projectSn: this.$store.state.projectSn,
}).then((res) => {
if (res.success) {
this.getPage()
this.$message({
type: 'success',
message: '删除成功!'
message: '删除成功!',
})
} else {
this.$message({
type: 'error',
message: res.message
message: res.message,
})
}
})
@ -196,19 +196,19 @@ export default {
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
message: '已取消删除',
})
})
},
async getWorkerInfoList(){
async getWorkerInfoList() {
await getWorkerInfoListApi({
pageNo: this.pagInfo.pageNo,
// pageSize: this.pagInfo.pageSize,
pageSize: 100000,
projectSn: this.$store.state.projectSn,
// personType: 1,
inserviceType: 1
}).then(result => {
inserviceType: 1,
}).then((result) => {
if (result.success) {
this.workerList = result.result.records
}
@ -235,11 +235,11 @@ export default {
this.getPage()
this.getWorkerInfoList()
},
}
},
}
</script>
<style lang="less" scoped>
.tables{
.tables {
// min-height: 0;
}
.tables2 {

View File

@ -97,7 +97,7 @@ export default {
await getSafeHatAlarmRecordPageApi({
pageNo: this.pageInfo.pageNo,
pageSize: this.pageInfo.pageSize,
// projectSn: this.$store.state.projectSn,
projectSn: this.$store.state.projectSn,
devSn: this.searchForm.devSn,
workerInfoId: this.searchForm.workerInfoId,
alarmTime_begin: this.searchForm.alarmTime_begin,
@ -110,7 +110,9 @@ export default {
})
},
async getDevSnList() {
await getDevSnListApi().then(result => {
await getDevSnListApi({
projectSn: this.$store.state.projectSn,
}).then(result => {
if (result.success) {
this.devSnList = result.result
}

View File

@ -116,7 +116,7 @@ export default {
await getSafeHatPayDataPageApi({
pageNo: this.pageInfo.pageNo,
pageSize: this.pageInfo.pageSize,
// projectSn: this.$store.state.projectSn,
projectSn: this.$store.state.projectSn,
devSn: this.searchForm.devSn,
workerInfoId: this.searchForm.workerInfoId,
uploadTime_begin: this.searchForm.uploadTime_begin,
@ -129,7 +129,9 @@ export default {
});
},
async getDevSnList() {
await getDevSnListApi().then((result) => {
await getDevSnListApi({
projectSn: this.$store.state.projectSn,
}).then((result) => {
if (result.success) {
this.devSnList = result.result;
}

View File

@ -42,9 +42,7 @@
</el-table-column>
</el-table>
</vue-scroll>
<el-pagination class="pagerBox" @size-change="SizeChange" @current-change="CurrentChange"
:current-page="pagInfo.pageNo" :page-sizes="$store.state.PAGESIZRS" :page-size="pagInfo.pageSize"
layout="total, sizes, prev, pager, next" :total="Number(pagInfo.total)" background >
<el-pagination class="pagerBox" @size-change="SizeChange" @current-change="CurrentChange" :current-page="pagInfo.pageNo" :page-sizes="$store.state.PAGESIZRS" :page-size="pagInfo.pageSize" layout="total, sizes, prev, pager, next" :total="Number(pagInfo.total)" background>
</el-pagination>
</div>
<!-- 新增-编辑-弹窗 -->
@ -53,24 +51,21 @@
<el-form size="medium" ref="addEditForm" :model="addEditForm" :rules="addEditRules" label-width="120px" class="dialogFormBox">
<el-form-item label="绑定人员" prop="workerInfoId">
<!-- <el-input v-model="addEditForm.workerName" placeholder="请输入"></el-input> -->
<el-select v-model="addEditForm.workerInfoId" placeholder="请选择" clearable :style="{ width: '100%' }" >
<el-option v-for="(item, index) in workerList" :key="index" :label="item.workerName" :value="item.id" ></el-option>
<el-select v-model="addEditForm.workerInfoId" placeholder="请选择" clearable :style="{ width: '100%' }">
<el-option v-for="(item, index) in workerList" :key="index" :label="item.workerName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备序号" prop="devSn">
<el-input v-model="addEditForm.devSn" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="新增时间" prop="createTime">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="addEditForm.createTime"
type="datetime" placeholder="请选择时间" >
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="addEditForm.createTime" type="datetime" placeholder="请选择时间">
</el-date-picker>
</el-form-item>
<div class="dialog-footer">
<el-button class="cancleBtn" @click="dialogShow = false" icon="el-icon-circle-close" size="medium"
>{{ $t('message.deviceManage.cancel') }}
<el-button class="cancleBtn" @click="dialogShow = false" icon="el-icon-circle-close" size="medium">{{ $t('message.deviceManage.cancel') }}
</el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium"
>{{ $t('message.deviceManage.save') }}
<el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium">{{ $t('message.deviceManage.save') }}
</el-button>
</div>
</el-form>
@ -79,11 +74,13 @@
</div>
</template>
<script>
import { getSafeHatEquipmentCentralPageApi,
import {
getSafeHatEquipmentCentralPageApi,
addSafeHatEquipmentCentralPageApi,
editSafeHatEquipmentCentralPageApi,
deleteSafeHatEquipmentCentralPageApi,
getWorkerInfoListApi} from '@/assets/js/api/smartSafeHat/smartSafeHat.js'
getWorkerInfoListApi,
} from '@/assets/js/api/smartSafeHat/smartSafeHat.js'
export default {
mounted() {},
created() {
@ -97,7 +94,7 @@ export default {
pagInfo: {
pageNo: 1, //
pageSize: 10, //
total: 0 //
total: 0, //
},
workerList: [],
tableData: [],
@ -108,20 +105,19 @@ export default {
},
addEditRules: {
workerInfoId: [{ required: true, message: '必填', trigger: 'blur' }],
devSn: [{ required: true, message: '必填', trigger: 'blur' }]
devSn: [{ required: true, message: '必填', trigger: 'blur' }],
},
searchForm: {}
searchForm: {},
}
},
methods: {
async getPage() {
async getPage() {
await getSafeHatEquipmentCentralPageApi({
pageNo: this.pagInfo.pageNo,
pageSize: this.pagInfo.pageSize,
// projectSn: this.$store.state.projectSn,
projectSn: this.$store.state.projectSn,
devSn: this.searchForm.devSn,
}).then(result => {
}).then((result) => {
if (result.success) {
this.tableData = result.result.records
this.pagInfo.total = result.result.total
@ -143,17 +139,17 @@ export default {
submit() {
let params = JSON.parse(JSON.stringify(this.addEditForm))
params.projectSn = this.$store.state.projectSn
this.$refs.addEditForm.validate(valid => {
this.$refs.addEditForm.validate((valid) => {
if (valid) {
if (this.title == '新增') {
addSafeHatEquipmentCentralPageApi(params).then(result => {
addSafeHatEquipmentCentralPageApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getPage()
}
})
} else if (this.title == '编辑') {
editSafeHatEquipmentCentralPageApi(params).then(result => {
editSafeHatEquipmentCentralPageApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getPage()
@ -170,20 +166,23 @@ export default {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
type: 'warning',
})
.then(() => {
deleteSafeHatEquipmentCentralPageApi({ id: obj.id }).then(res => {
deleteSafeHatEquipmentCentralPageApi({
id: obj.id,
projectSn: this.$store.state.projectSn,
}).then((res) => {
if (res.success) {
this.getPage()
this.$message({
type: 'success',
message: '删除成功!'
message: '删除成功!',
})
} else {
this.$message({
type: 'error',
message: res.message
message: res.message,
})
}
})
@ -191,19 +190,19 @@ export default {
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
message: '已取消删除',
})
})
},
async getWorkerInfoList(){
async getWorkerInfoList() {
await getWorkerInfoListApi({
pageNo: this.pagInfo.pageNo,
// pageSize: this.pagInfo.pageSize,
pageSize: 100000,
projectSn: this.$store.state.projectSn,
// personType: 1
inserviceType: 1
}).then(result => {
inserviceType: 1,
}).then((result) => {
if (result.success) {
this.workerList = result.result.records
}
@ -230,11 +229,11 @@ export default {
this.getPage()
this.getWorkerInfoList()
},
}
},
}
</script>
<style lang="less" scoped>
.tables{
.tables {
// min-height: 0;
}
.tables2 {