|
@@ -32,7 +32,12 @@
|
|
|
<el-table-column fixed type="index" :index="indexGenerate" label="序号" width="60" align="center"/>
|
|
|
<el-table-column prop="gatherTime" label="采集时间" width="180" />
|
|
|
<el-table-column prop="dispDataVal" :label="paramClmLab" width="160" />
|
|
|
- <el-table-column prop="alarmDesc" label="报警" width="300" />
|
|
|
+ <el-table-column prop="alarmDesc" label="报警" width="300" />
|
|
|
+ <el-table-column prop="oper" label="操作" width="120" fixed="right" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="success" icon="edit" size="small" @click="adjustVal(scope.row)">校正数值</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</template>
|
|
|
</CrudTable>
|
|
|
</div>
|
|
@@ -68,6 +73,36 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ const adjustVal=(row)=>{
|
|
|
+ ElMessageBox.prompt('请输入校正后的数值', '校正数值', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ inputPattern:/^\d+(\.\d+)?$/,
|
|
|
+ inputErrorMessage: '校正后应为数值',
|
|
|
+ draggable:true,
|
|
|
+ closeOnClickModal:false,
|
|
|
+ inputValue:row.dispDataVal
|
|
|
+ }).then(({value} )=>{
|
|
|
+ submitAdjustVal(row,value)
|
|
|
+ }).catch(()=>{
|
|
|
+ console.log('cancel')
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const submitAdjustVal=(row,gatherVal)=>{
|
|
|
+ let {wellParam,gatherTime}=row
|
|
|
+ wellParamAPI.updateGatherVal(wellParam,gatherTime,gatherVal).then(resp=>{
|
|
|
+ if(resp.code!=0){
|
|
|
+ ElMessage.error(resp.msg || '校正数据失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ElMessage.success('操作成功')
|
|
|
+ crudTable.value.refresh()
|
|
|
+ }).catch(err=>{
|
|
|
+ ElMessage.error(err||'校正数据出错')
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
const dialogH=(document.body.clientHeight-350)+'px'
|
|
|
|
|
|
onMounted(()=>{
|