Commit c071aeeb by lichengming

修改了检测管理的数据录入

parent d7ed14b7
...@@ -182,5 +182,12 @@ export default { ...@@ -182,5 +182,12 @@ export default {
http.post('soil/v1/exp_report/page', data).then(res => res), http.post('soil/v1/exp_report/page', data).then(res => res),
deleteReport: data => deleteReport: data =>
http.delete('soil/v1/exp_report/?ids=' + data).then(res => res), http.delete('soil/v1/exp_report/?ids=' + data).then(res => res),
reportPage: data => http.post('soil/v1/report/page', data).then(res => res) reportPage: data => http.post('soil/v1/report/page', data).then(res => res),
dataGds: data => http.get('soil/v1/data_gds/' + data).then(res => res),
gdsGetMainInfo: data =>
http
.post('soil/v1/data_gds/get_main_info?sampleCode=' + data)
.then(res => res),
dataGdsDetail: data =>
http.post('soil/v1/data_gds_detail/page', data).then(res => res)
} }
<template>
<div>
<Modal v-model="showModal" :mask-closable="false" width="1200">
<p slot="header">{{modalTitle}}</p>
<Row>
<Col span="24">
<div style="overflow-y: auto">
<table class="tableClass">
<tbody>
<tr>
<th colspan="6" class="tableClass_back">GDS信息</th>
</tr>
<tr>
<th>初始高度</th>
<td>{{gdsData.initialHeight}}</td>
<th>初始直径</th>
<td>{{gdsData.initialDiameter}}</td>
<th>比重(kN/m3)</th>
<td>{{gdsData.specificGravityKn}}</td>
</tr>
<tr>
<th>工作参考</th>
<td>{{gdsData.jobReference}}</td>
<th>钻孔名称</th>
<td>{{gdsData.borehole}}</td>
<th>样品名称</th>
<td>{{gdsData.sampleName}}</td>
</tr>
<tr>
<th>深度</th>
<td>{{gdsData.depth}}</td>
<th>样品日期</th>
<td>{{gdsData.sampleDate}}</td>
<th>样品描述</th>
<td>{{gdsData.descriptionOfSample}}</td>
</tr>
<tr>
<th>初始质量</th>
<td>{{gdsData.initialMass}}</td>
<th>初始干质量</th>
<td>{{gdsData.initialDryMass}}</td>
<th>比重(ass/meas)</th>
<td>{{gdsData.specificGravityAss}}</td>
</tr>
<tr>
<th>试验条款</th>
<td>{{gdsData.testClause}}</td>
<th>测试开始日期</th>
<td>{{gdsData.dateTestStarted}}</td>
<th>测试结束日期</th>
<td>{{gdsData.dateTestFinished}}</td>
</tr>
<tr>
<th>试样类型</th>
<td>{{gdsData.specimenType}}</td>
<th>最终质量</th>
<td>{{gdsData.finalMass}}</td>
<th>最终干质量</th>
<td>{{gdsData.finalDryMass}}</td>
</tr>
<tr>
<th>设备编号</th>
<td>{{gdsData.machineNo}}</td>
<th>Cell No</th>
<td>{{gdsData.cellNo}}</td>
<th>工作地点</th>
<td>{{gdsData.jobLocation}}</td>
</tr>
<tr>
<th>重复数据开始</th>
<td>{{gdsData.startOfRepeatedData}}</td>
</tr>
</tbody>
</table>
</div>
</Col>
<Col span="24">
<Form id="task-assign-item-left" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="阶段编号:">
<Input v-model="formObj.stageNumber" @on-enter="_formSearch" placeholder="请输入阶段编号" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<Col span="24">
<div>
<PTVXETable
ref="pageTable"
:form-id="formId"
:table-height="500"
:get-page="getPage"
@on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:width="item.width"
:min-width="150"
:fixed="item.fixed?item.fixed:undefined"
sortable
>
<template slot-scope="scope">
<div v-if="item.key==='siteNo'" @click.stop="_handleRow(scope)">
<el-input v-model="scope.row.siteNo" blur placeholder="请输入现场编号"
></el-input>
</div>
<div v-else-if="item.key==='experiments'" @click.stop="_handleRow(scope)">
<span @click="_removeItem(scope.row)">{{scope.row[item.key]}}</span>
</div>
<span v-else> {{ scope.row[item.key] }}</span>
</template>
</vxe-table-column>
</PTVXETable>
</div>
</Col>
</Row>
<div slot="footer">
<modal-footer ref="footerModal" :footer="footerList" @on-result-change="_footerResult"></modal-footer>
</div>
</Modal>
</div>
</template>
<script>
/**
* 添加编辑分包商
*/
import { soilTest } from '../../../api'
export default {
components: {},
data() {
return {
formId: 'viewGdsDataId',
getPage: {},
height: 300,
gdsData: {},
edit: false,
selectData: [],
searchOpen: true,
iconMsg: [
{
type: 'md-trash',
id: '',
name: '删除'
}
],
pageColumns: [
{ title: '阶段编号', key: 'stageNumber' },
{ title: '试验开始后的时间', key: 'timeSinceStartOfTest' },
{ title: '阶段开始后的时间', key: 'timeSinceStartOfStage' },
{ title: '轴向位移(mm)', key: 'axialDisplacement' },
{ title: '轴向载荷(kN)', key: 'axialLoad' },
{ title: '水平位移(mm)', key: 'horizontalDisplacement' },
{ title: '水平荷载(kN)', key: 'horizontalLoad' },
{ title: '孔隙水压力(kPa)', key: 'poreWaterPressure' },
{ title: '背压(kPa)', key: 'backPressure' },
{ title: '回流量(mm3)', key: 'backVolume' },
{ title: '未定义传感器1', key: 'undefinedTransducerOne' },
{ title: '未定义传感器2', key: 'undefinedTransducerTwo' },
{ title: '环剪切扭矩(Nm)', key: 'ringShearTorqueNm' },
{ title: '环剪切角(degs)', key: 'ringShearTorqueDegs' },
{ title: '下腔压力(kPa)', key: 'lowerChamberPr' },
{ title: '下腔容积(mm3)', key: 'lowerChamberVol' },
{ title: '轴向位移2(mm)', key: 'axialDisplacementTwo' },
{ title: '水平位移2(mm)', key: 'horizontalDisplacementTwo' },
{ title: '环向剪切荷载1(kN)', key: 'ringShearLoadOne' },
{ title: '环向剪切荷载2(kN)', key: 'ringShearLoadTwo' },
{ title: '轴向载荷2(kN)', key: 'axialLoadTwo' },
{ title: '水平荷载2(kN)', key: 'horizontalLoadTwo' },
{ title: '水平荷载3(kN)', key: 'horizontalLoadThree' },
{ title: '轴向行程(mm)', key: 'axialStroke' },
{ title: '水平行程(mm)', key: 'horizontalStroke' },
{ title: '孔隙气压(kPa)', key: 'poreAirPressure' },
{ title: '孔隙气压2(kPa)', key: 'poreAirPressureTwo' },
{ title: '大气压力(kPa)', key: 'atmosphericPressure' },
{ title: '背压差(kPa)', key: 'backToAirDifferential' },
{ title: '围压', key: 'cellPressure' },
{ title: 'Cell Volume (mm3)', key: 'cellVolume' },
{ title: '孔隙风量(mm3)', key: 'poreAirVolume' },
{ title: '轴向应变(%)', key: 'axialStrain' },
{ title: '正应力(kPa)', key: 'normalStress' },
{ title: '环剪机水平应变(%)或水平环位移(mm)', key: 'hsohrdfrsm' },
{ title: '环剪机的水平应力(kPa)或剪切应力(kPa)', key: 'hsossfrsm' },
{ title: '水平有效应力(kPa)', key: 'horizontalEffStress' },
{ title: '有效面积(mm2)', key: 'effectiveArea' },
{ title: '法向有效应力(kPa)', key: 'normalEffectiveStress' },
{ title: '平均环向剪切荷载(kN)', key: 'averageRingShearLoad' }
],
currentIndex: -1,
id: '',
modalTitle: '',
formObj: {},
selectIds: [],
showModal: false,
footerList: [
{ id: '', name: '取消', type: '' },
{ id: '', name: '关闭', type: 'primary' }
],
aptitudeData: []
}
},
methods: {
/** *modal-footer */
_footerResult(name) {
switch (name) {
case '取消':
this._cancel()
break
case '关闭':
this._cancel()
break
}
},
_hideLoading() {
this.$refs.footerModal._hideLoading()
},
_cancel() {
this.showModal = false
this.$refs.footerModal._hideLoading()
},
_openEdit(id) {
this.edit = true
this.showBtn = false
this.showModal = true
this.getPage.records = []
this.id = ''
this.gdsData = []
this._getGdsMainInfo(id)
this.modalTitle = '查看GDS数据'
},
_getGdsInfo: async function() {
if (this.formObj.gdsId) {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await soilTest.dataGdsDetail(
this.$serializeForm(this.formObj)
)
if (result) {
this.getPage = result
this.$refs.pageTable._hideLoading()
}
} else {
this.$refs.pageTable._hideLoading()
}
},
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
this._getGdsInfo()
break
}
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
_getGdsMainInfo: async function(id) {
const result = await soilTest.gdsGetMainInfo(id)
if (result) {
this.gdsData = result
this.formObj.gdsId = this.gdsData.id
this._getGdsInfo()
}
},
_showTime(formObj) {
if (this.formObj.entrustDate === undefined) {
this.formObj.entrustDate = ''
} else {
this.formObj.entrustDate = new Date(formObj.entrustDate)
}
if (this.formObj.tabulateDate === undefined) {
this.formObj.tabulateDate = ''
} else {
this.formObj.tabulateDate = new Date(formObj.tabulateDate)
}
},
_visibleChange(data) {
this.$forceUpdate()
console.log('清空')
this.formObj.client = ''
this.formObj = {}
}
}
}
</script>
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<CreateReport ref="createModal" @on-result-change="_certificateSelectExcelBack"></CreateReport> <CreateReport ref="createModal" @on-result-change="_certificateSelectExcelBack"></CreateReport>
<Reason ref="reasonModal" @on-result-change="_reasonResult" /> <Reason ref="reasonModal" @on-result-change="_reasonResult" />
<Operation ref="Operation"></Operation> <Operation ref="Operation"></Operation>
<ViewGdsData ref="viewGds"></ViewGdsData>
</div> </div>
</template> </template>
<script> <script>
...@@ -73,6 +74,7 @@ import CollectManage from '../CollectManage' ...@@ -73,6 +74,7 @@ import CollectManage from '../CollectManage'
import CollectFileManage from '../CollectFileManage' import CollectFileManage from '../CollectFileManage'
import Reason from '../../../../components/base/Reason' import Reason from '../../../../components/base/Reason'
import Operation from '../../../../components/operation/ItemOperation' import Operation from '../../../../components/operation/ItemOperation'
import ViewGdsData from '../ViewGdsData'
import CreateReport from './CreateReport' import CreateReport from './CreateReport'
export default { export default {
components: { components: {
...@@ -86,7 +88,8 @@ export default { ...@@ -86,7 +88,8 @@ export default {
CollectFileManage, CollectFileManage,
Reason, Reason,
CreateReport, CreateReport,
Operation Operation,
ViewGdsData
}, },
data() { data() {
return { return {
...@@ -141,6 +144,7 @@ export default { ...@@ -141,6 +144,7 @@ export default {
], ],
iconMsg: [ iconMsg: [
{ type: 'ios-book', id: '', name: '查看原始记录' }, { type: 'ios-book', id: '', name: '查看原始记录' },
{ type: 'ios-list-box', id: '', name: '查看GDS数据' },
{ type: 'md-apps', id: '', name: '查看指标' }, { type: 'md-apps', id: '', name: '查看指标' },
{ type: 'ios-bookmarks', id: '', name: '查看采集数据' }, { type: 'ios-bookmarks', id: '', name: '查看采集数据' },
{ type: 'ios-browsers', id: '', name: '查看采集文件' }, { type: 'ios-browsers', id: '', name: '查看采集文件' },
...@@ -211,6 +215,9 @@ export default { ...@@ -211,6 +215,9 @@ export default {
// this.$Message.warning('未填写原始记录') // this.$Message.warning('未填写原始记录')
// } // }
break break
case '查看GDS数据':
this._viewGdsData(data.sampleCode)
break
case '查看指标': case '查看指标':
this._indexManage(data) this._indexManage(data)
break break
...@@ -232,6 +239,9 @@ export default { ...@@ -232,6 +239,9 @@ export default {
} }
}) })
}, },
_viewGdsData(id) {
this.$refs.viewGds._openEdit(id)
},
_operationRecord(id) { _operationRecord(id) {
this.$refs.Operation._open(id) this.$refs.Operation._open(id)
// 操作日志 // 操作日志
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment