fix: BUG修改

This commit is contained in:
cjp 2024-01-19 10:36:41 +08:00
parent a8d8c0897b
commit 12a04fe3fa
8 changed files with 233 additions and 287 deletions

View File

@ -18,3 +18,6 @@ export const pressureTestMachineManagePage = data => get('xmgl/pressureTestMachi
// 查询压力试验机-试块信息
export const pressureBlockNumberList = data => get('xmgl/pressureTestMachineManageBlockNumber/list', data) //查询列表数据
export const pressureTestMachineManageEdit = data => post('xmgl/pressureTestMachineManage/edit', data) //编辑试块信息
// 查询压力试验机-试块数值曲线
export const pressureBlockDataList = data => get('xmgl/pressureTestMachineManageBlockData/list', data) //查询列表数据

View File

@ -2,48 +2,21 @@
<!-- 设备管理 -->
<div class="fullHeight">
<div class="searchBox whiteBlock">
<el-button type="warning" size="medium" plain @click="refresh">{{
$t('message.deviceManage.refresh')
}}</el-button>
<el-button type="primary" size="medium" @click="add">{{
$t('message.deviceManage.add')
}}</el-button>
<el-button type="warning" size="medium" plain @click="refresh">{{ $t('message.deviceManage.refresh') }}</el-button>
<el-button type="primary" size="medium" @click="add">{{ $t('message.deviceManage.add') }}</el-button>
<!-- <span class="downloadBtn primaryText" @click="downloadFn">
{{ $t('message.deviceManage.protocolDownload') }}
</span> -->
</div>
<div class="table_wrap whiteBlock">
<el-table class="tables" :data="List">
<el-table-column
width="200"
prop="devName"
align="center"
:label="$t('message.deviceManage.devName')"
></el-table-column>
<el-table-column
prop="devSn"
:label="$t('message.deviceManage.devSn')"
align="center"
></el-table-column>
<el-table-column
prop="isClosed"
:label="$t('message.deviceManage.isClosed')"
align="center"
>
<template slot-scope="scope">{{
scope.row.isClosed == 1 ? '在线' : '离线'
}}</template>
<el-table-column width="200" prop="devName" align="center" :label="$t('message.deviceManage.devName')"></el-table-column>
<el-table-column prop="devSn" :label="$t('message.deviceManage.devSn')" align="center"></el-table-column>
<el-table-column prop="isClosed" :label="$t('message.deviceManage.isClosed')" align="center">
<template slot-scope="scope">{{ scope.row.isClosed == 1 ? '在线' : '离线' }}</template>
</el-table-column>
<el-table-column
prop="realTime"
width="200"
:label="$t('message.deviceManage.createTime')"
align="center"
></el-table-column>
<el-table-column
:label="$t('message.deviceManage.operation')"
align="center"
>
<el-table-column prop="realTime" width="200" :label="$t('message.deviceManage.createTime')" align="center"></el-table-column>
<el-table-column :label="$t('message.deviceManage.operation')" align="center">
<template slot-scope="scope">
<div class="tableBtns">
<!--<div @click="yu(scope.row)" class="operationText"><img src="@/assets/images/yu.png" alt="">{{$t('message.alarmValueSet.yjz')}}
@ -51,19 +24,11 @@
<div @click="bao(scope.row)" class="operationText"><img src="@/assets/images/bao.png" alt="">{{$t('message.alarmValueSet.bjz')}}
</div>-->
<div @click="edit(scope.row)" class="operationText">
<img
src="@/assets/images/icon-edit.png"
width="15px"
height="15px"
/>
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
<span>{{ $t('message.deviceManage.edit') }}</span>
</div>
<div @click="deleteDev(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" />
<span>{{ $t('message.deviceManage.delete') }}</span>
</div>
</div>
@ -88,14 +53,8 @@
label-width="120px"
class="dialogFormBox"
>
<el-form-item
:label="$t('message.deviceManage.devName')"
prop="devName"
>
<el-input
v-model="addEditForm.devName"
:placeholder="$t('message.deviceManage.placeholder')"
></el-input>
<el-form-item :label="$t('message.deviceManage.devName')" prop="devName">
<el-input v-model="addEditForm.devName" :placeholder="$t('message.deviceManage.placeholder')"></el-input>
</el-form-item>
<el-form-item :label="$t('message.deviceManage.devSn')">
<el-input
@ -105,50 +64,23 @@
></el-input>
</el-form-item>
<!-- 安装位置 -->
<el-form-item
:label="$t('message.deviceManage.installPosition')"
prop="installAddrType"
>
<el-select
v-model="addEditForm.installAddrType"
:placeholder="$t('message.deviceManage.placeholder_select')"
>
<el-option
v-for="item in addressArr"
:key="item"
:label="item"
:value="item"
>
</el-option>
<el-form-item :label="$t('message.deviceManage.installPosition')" prop="installAddrType">
<el-select v-model="addEditForm.installAddrType" :placeholder="$t('message.deviceManage.placeholder_select')">
<el-option v-for="item in addressArr" :key="item" :label="item" :value="item"> </el-option>
</el-select>
</el-form-item>
<!-- 安装地址 -->
<el-form-item
:label="$t('message.deviceManage.installAddress')"
prop="installAddress"
>
<el-input
v-model="addEditForm.installAddress"
:placeholder="$t('message.deviceManage.placeholder')"
></el-input>
<el-form-item :label="$t('message.deviceManage.installAddress')" prop="installAddress">
<el-input v-model="addEditForm.installAddress" :placeholder="$t('message.deviceManage.placeholder')"></el-input>
</el-form-item>
<!-- 安装单位 -->
<el-form-item
:label="$t('message.deviceManage.installCompany')"
prop="installCompany"
>
<el-input
v-model="addEditForm.installCompany"
:placeholder="$t('message.deviceManage.placeholder')"
></el-input>
<el-form-item :label="$t('message.deviceManage.installCompany')" prop="installCompany">
<el-input v-model="addEditForm.installCompany" :placeholder="$t('message.deviceManage.placeholder')"></el-input>
</el-form-item>
<!-- 锁厂家 -->
<el-form-item :label="$t('message.deviceManage.lockManufacturer')">
<!-- 深圳施泰信息技术有限公司 -->
<el-input
:value="$t('message.deviceManage.company1')"
disabled
></el-input>
<el-input :value="$t('message.deviceManage.company1')" disabled></el-input>
</el-form-item>
<!-- 锁编号 -->
<el-form-item :label="$t('message.deviceManage.lockNumber')">
@ -165,28 +97,14 @@
filterable
:placeholder="$t('message.deviceManage.placeholder_select')"
>
<el-option
v-for="item in options"
:key="item.userId"
:label="item.workerName"
:value="item.userId"
>
</el-option>
<el-option v-for="item in options" :key="item.userId" :label="item.workerName" :value="item.userId"> </el-option>
</el-select>
</el-form-item>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@click="Popup.show = false"
icon="el-icon-circle-close"
size="medium"
<el-button class="cancleBtn" @click="Popup.show = 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"
<el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium"
>{{ $t('message.deviceManage.save') }}
</el-button>
</div>
@ -207,8 +125,8 @@ import {
export default {
mounted() {
this.getList();
this.getLaborManagementList();
this.getList()
this.getLaborManagementList()
},
data() {
return {
@ -217,13 +135,15 @@ export default {
},
addEditRules: {
devName: [
{ required: true, message: this.$t('message.deviceManage.rules.devName'), trigger: "blur" },
{ required: true, message: this.$t('message.deviceManage.rules.devName'), trigger: "change" }
], installAddrType: [
{ required: true, message: this.$t('message.deviceManage.message2'), trigger: "change" } //
], installAddress: [
{ required: true, message: this.$t('message.deviceManage.message3'), trigger: "blur" } //
]
{ required: true, message: this.$t('message.deviceManage.rules.devName'), trigger: 'blur' },
{ required: true, message: this.$t('message.deviceManage.rules.devName'), trigger: 'change' }
],
// installAddrType: [
// { required: true, message: this.$t('message.deviceManage.message2'), trigger: 'change' } //
// ],
// installAddress: [
// { required: true, message: this.$t('message.deviceManage.message3'), trigger: 'blur' } //
// ]
},
options: [
/*{realName: "", value: 1},
@ -244,7 +164,11 @@ export default {
show: false
},
// '','',''
addressArr: [this.$t('message.deviceManage.addressArr[0]'), this.$t('message.deviceManage.addressArr[1]'), this.$t('message.deviceManage.addressArr[2]')]
addressArr: [
this.$t('message.deviceManage.addressArr[0]'),
this.$t('message.deviceManage.addressArr[1]'),
this.$t('message.deviceManage.addressArr[2]')
]
}
},
methods: {
@ -252,99 +176,103 @@ export default {
//
window.open('/doc/' + this.$t('message.deviceManage.disBoxAgreement') + '.docx')
},
handle(type, show) {//
handle(type, show) {
//
this.Popup = {
type: type,
show: show
}
},
Change() {
},
Change() {},
add() {
this.close()
this.handle('add', true);
this.handle('add', true)
},
edit(obj) {
console.log('编辑', obj);
this.addEditForm = JSON.parse(JSON.stringify(obj));
console.log('编辑', obj)
this.addEditForm = JSON.parse(JSON.stringify(obj))
if (typeof obj.alarmPushWorkerId === 'string' && obj.alarmPushWorkerId != '') {
this.addEditForm.alarmPushWorkerId = obj.alarmPushWorkerId.split(',')
}
this.handle('edit', true);
this.handle('edit', true)
},
deleteDev(obj) {
console.log('删除', obj);
this.$confirm(this.$t('message.personnelPosition.beaconManage.table.confirmText') + "【" + obj.devName + "】?", this.$t('message.personnelPosition.beaconManage.table.Tips'), {
confirmButtonText: this.$t('message.personnelPosition.confirmButtonText'),
cancelButtonText: this.$t('message.personnelPosition.cancelButtonText'),
type: "warning",
}).then(() => {
electricalDevDelete({ id: obj.id }).then(result => {
if (result.success) {
this.$message.success(result.message);
this.getList();
}
console.log('删除', obj)
this.$confirm(
this.$t('message.personnelPosition.beaconManage.table.confirmText') + '【' + obj.devName + '】?',
this.$t('message.personnelPosition.beaconManage.table.Tips'),
{
confirmButtonText: this.$t('message.personnelPosition.confirmButtonText'),
cancelButtonText: this.$t('message.personnelPosition.cancelButtonText'),
type: 'warning'
}
)
.then(() => {
electricalDevDelete({ id: obj.id }).then(result => {
if (result.success) {
this.$message.success(result.message)
this.getList()
}
})
})
}).catch(() => {
});
.catch(() => {})
},
submit() {
let params = JSON.parse(JSON.stringify(this.addEditForm));
let params = JSON.parse(JSON.stringify(this.addEditForm))
if (this.addEditForm.alarmPushWorkerId) {
params.alarmPushWorkerId = this.addEditForm.alarmPushWorkerId.join(',');
params.alarmPushWorkerId = this.addEditForm.alarmPushWorkerId.join(',')
}
params.projectSn = this.$store.state.projectSn;
params.projectSn = this.$store.state.projectSn
params.lockFactory = 1
this.$refs.addEditForm.validate((valid) => {
this.$refs.addEditForm.validate(valid => {
if (valid) {
if (this.Popup.type === 'add') {
electricalDevAdd(params).then(result => {
if (result.success) {
this.$message.success(result.message);
this.getList();
this.$message.success(result.message)
this.getList()
}
})
} else if (this.Popup.type === 'edit') {
console.log('编辑信息', this.addEditForm)
electricalDevEdit(params).then(result => {
if (result.success) {
this.$message.success(result.message);
this.getList();
this.$message.success(result.message)
this.getList()
}
})
}
this.Popup.show = false;
this.Popup.show = false
} else {
return false;
return false
}
});
})
},
refresh() {
this.getList();
this.getList()
},
getList() {
electricalDevList({ projectSn: this.$store.state.projectSn }).then(result => {
if (result.success) {
this.List = result.result;
console.log('列表', result);
this.List = result.result
console.log('列表', result)
}
})
},
getLaborManagementList() {
getCrewListDataApi({ projectSn: this.$store.state.projectSn, workerName: '' }).then(result => {
if (result.success) {
console.log('劳务人员', result);
this.options = result.result;
console.log('劳务人员', result)
this.options = result.result
}
})
},
close() {
this.$nextTick(() => {
this.$refs.addEditForm.clearValidate();
this.addEditForm = {};
this.$refs.addEditForm.clearValidate()
this.addEditForm = {}
})
}
}
}

View File

@ -277,31 +277,31 @@ export default {
trigger: 'change'
}
],
location: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
// location: [
// {
// required: true,
// message: '',
// trigger: 'blur'
// },
// {
// required: true,
// message: '',
// trigger: 'change'
// }
// ],
dutyTeamInfoId: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
// dutyTeamInfoId: [
// {
// required: true,
// message: '',
// trigger: 'blur'
// },
// {
// required: true,
// message: '',
// trigger: 'change'
// }
// ],
},
options: [],

View File

@ -3,7 +3,7 @@
<div class="searchBox whiteBlock">
<!-- 工程档案 施工图 -->
<el-form :inline="true" ref="searchForm" :model="searchForm" size="medium">
<el-form-item label="图片名称">
<el-form-item label="月份">
<el-input v-model="searchForm.constructionDrawName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item>

View File

@ -199,17 +199,17 @@
</div>
</div>
<div class="detail-table" style="overflow-x:scroll;">
<div class="detail-table" style="overflow-x:scroll;" v-if="steelBeamList.length > 0">
<div class="table-list">
<div class="table-item">
<div class="table-head">试块编号</div>
<div class="table-body">荷载力值(kN/)</div>
<div class="table-head">抗折/抗压强度</div>
</div>
<div class="table-item" v-for="item in 5">
<div class="table-head">{{ 'item.tendonNumber' }}</div>
<div class="table-body">{{ 'item.groutDirection' }}</div>
<div class="table-head">{{ 'item.tendonNumber' }}</div>
<div class="table-item" v-for="item in steelBeamList" :key="item.id">
<div class="table-head">{{ item.tendonNumber }}</div>
<div class="table-body">{{ item.loadForceValue }}</div>
<div class="table-head">{{ item.flexuralAndCompressiveStrength }}</div>
</div>
</div>
</div>
@ -220,7 +220,13 @@
</div>
</template>
<script>
import { pressureTestMachineManagePage, pressureBlockNumberList, pressureTestMachineDevList, pressureTestMachineManageEdit } from '@/assets/js/api/pressureTestMachine.js'
import {
pressureTestMachineManagePage,
pressureBlockNumberList,
pressureTestMachineDevList,
pressureTestMachineManageEdit,
pressureBlockDataList
} from '@/assets/js/api/pressureTestMachine.js'
import echarts from 'echarts4'
export default {
components: {},
@ -230,7 +236,8 @@ export default {
data() {
return {
section: '', //
steelBeamList: [],
steelBeamList: [], //
steelLineList: [], // 线
detailData: {},
dialogShow: false, //
showDetailLine: false, //
@ -306,9 +313,9 @@ export default {
times: '',
fileName: '',
xData: ['0', '25', '50', '75', '100', '125', '150'],
yData1: [820, 932, 901, 934, 1290, 1330, 1320],
yData2: [820, 732, 601, 534, 1290, 330, 320],
yData3: [820, 932, 801, 734, 1290, 830, 920],
yData1: [[0,820], [2,932], [3,901], [5,934], [6,1290], [7,1330], [8,1320]],
yData2: [[2,820], [4,732], [6,601], [7,534], [9,1290], [10,330], [11,320]],
// yData3: [820, 932, 801, 734, 1290, 830, 920],
fileList: []
}
},
@ -440,7 +447,7 @@ export default {
// },
color: '#737996' //
},
data: this.xData
// data: this.xData
},
yAxis: [
{
@ -469,37 +476,37 @@ export default {
// formatter: '{value} kN' // Y
}
},
{
type: 'value',
position: 'right',
name: '进浆量/L',
nameTextStyle: {
color: '#737996',
verticalAlign: 'bottom', //
padding: [0, 0, 5, 40] //
},
splitLine: {
show: false, // 线
lineStyle: {
color: '#ddd' // 线
// type: 'dashed' // 线线线
}
},
axisLine: {
show: false // 线
},
axisTick: {
show: false // 线
},
axisLabel: {
color: '#737996'
// formatter: '{value} L' // Y
}
}
// {
// type: 'value',
// position: 'right',
// name: '/L',
// nameTextStyle: {
// color: '#737996',
// verticalAlign: 'bottom', //
// padding: [0, 0, 5, 40] //
// },
// splitLine: {
// show: false, // 线
// lineStyle: {
// color: '#ddd' // 线
// // type: 'dashed' // 线线线
// }
// },
// axisLine: {
// show: false // 线
// },
// axisTick: {
// show: false // 线
// },
// axisLabel: {
// color: '#737996'
// // formatter: '{value} L' // Y
// }
// }
],
series: [
{
yAxisIndex: 0,
// yAxisIndex: 0,
color: '#82dff3',
name: '进浆',
data: this.yData1,
@ -507,20 +514,12 @@ export default {
smooth: true
},
{
yAxisIndex: 0,
// yAxisIndex: 0,
color: '#6e90ef',
name: '出浆',
data: this.yData2,
type: 'line',
smooth: true
},
{
yAxisIndex: 1,
color: '#97bbcf',
name: '进浆量',
data: this.yData3,
type: 'line',
smooth: true
}
]
}
@ -548,8 +547,9 @@ export default {
openDetail(row) {
console.log('打开详情', row)
this.detailData = row
this.dialogShow = true
this.getDetailList(row.id)
this.getLineList(row.id)
this.dialogShow = true
},
close() {
console.log('弹窗关闭')
@ -564,7 +564,22 @@ export default {
if (res.code == 200) {
console.log('试块列表', res.result)
this.steelBeamList = res.result
this.dialogShow = true
// this.dialogShow = true
}
})
},
// 线
getLineList(detailId) {
let data = {
projectSn: this.$store.state.projectSn,
pressureTestMachineManageBlockNumberId: detailId
}
pressureBlockDataList(data).then(res => {
if (res.code == 200) {
console.log('试块曲线数据', res.result)
this.steelLineList = res.result
// this.dialogShow = true
}
})
},
@ -575,11 +590,11 @@ export default {
pageSize: this.pagInfo.pageSize,
projectSn: this.$store.state.projectSn,
devSn: this.queryInfo.deviceName,
beamNumber: this.queryInfo.beamNumber,
status: this.queryInfo.status,
beamType: this.queryInfo.beamType,
tensionGroutTime_begin: this.queryInfo.actualStartDate,
tensionGroutTime_end: this.queryInfo.actualFinishDate
// beamNumber: this.queryInfo.beamNumber,
// status: this.queryInfo.status,
// beamType: this.queryInfo.beamType,
// tensionGroutTime_begin: this.queryInfo.actualStartDate,
// tensionGroutTime_end: this.queryInfo.actualFinishDate
}
pressureTestMachineManagePage(data).then(res => {
if (res.code == 200) {
@ -653,7 +668,7 @@ export default {
downloadFn(item) {
console.log(item)
let imageUrl = JSON.parse(item.uploadAttachment)[0].url
console.log("url",imageUrl)
console.log('url', imageUrl)
let x = new XMLHttpRequest()
console.log(this.$store.state.FILEURL + imageUrl)
x.open('GET', this.$store.state.FILEURL + imageUrl, true)

View File

@ -507,10 +507,10 @@ export default {
let params = JSON.parse(JSON.stringify(this.addEditForm))
params.projectSn = this.$store.state.projectSn
params.image = JSON.stringify(this.fileUplodList)
if (this.fileUplodList.length == 0) {
this.$message.error('请上传照片')
return false
}
// if (this.fileUplodList.length == 0) {
// this.$message.error('')
// return false
// }
this.$refs.addEditForm.validate((valid) => {
if (valid) {
if (this.title == '新增') {

View File

@ -277,31 +277,31 @@ export default {
trigger: 'change'
}
],
location: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
// location: [
// {
// required: true,
// message: '',
// trigger: 'blur'
// },
// {
// required: true,
// message: '',
// trigger: 'change'
// }
// ],
dutyTeamInfoId: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
// dutyTeamInfoId: [
// {
// required: true,
// message: '',
// trigger: 'blur'
// },
// {
// required: true,
// message: '',
// trigger: 'change'
// }
// ],
},
options: [],

View File

@ -272,31 +272,31 @@ export default {
trigger: 'change'
}
],
location: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
// location: [
// {
// required: true,
// message: '',
// trigger: 'blur'
// },
// {
// required: true,
// message: '',
// trigger: 'change'
// }
// ],
dutyTeamInfoId: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
// dutyTeamInfoId: [
// {
// required: true,
// message: '',
// trigger: 'blur'
// },
// {
// required: true,
// message: '',
// trigger: 'change'
// }
// ],
},
options: [],