Commit 2e2bc042 authored by 李志鸣's avatar 李志鸣

fea(化验室): 酸洗化验室功能联调

parent f640a56d
......@@ -13,8 +13,8 @@ module.exports = {
// 代理后端服务器
proxyTable: {
'/host': {
// target: 'http://10.100.172.150:9108', //设置你调用的接口域名和端口号 别忘了加http
target: 'http://192.168.43.244:8888',// 东伟服务器地址
target: 'http://10.100.172.150:9108', //设置你调用的接口域名和端口号 别忘了加http
// target: 'http://192.168.43.244:8888',// 东伟服务器地址
changeOrigin: true,
pathRewrite: {
'^/host': ''//这里理解成用‘/host’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可
......
<template>
<el-dialog
title="新增报告"
:visible.sync="dialogToggle"
:show-close="false"
:close-on-press-escape="false"
:close-on-click-modal="false"
width="1200px">
<div style="padding-bottom: 10px">
<el-button
size="small"
type="primary">
新增检测项
</el-button>
</div>
<!-- 点检模板表格 -->
<el-table
style="width: 80%; margin-bottom: 10px"
:data="checkTemplate"
tooltip-effect="dark"
stripe
border>
<el-table-column
label="序号"
width="60px">
<template slot-scope="scope">
{{ scope.row.id }}
</template>
</el-table-column>
<el-table-column
label="版本状态/Rev">
<template slot-scope="scope">
{{ scope.row.rev }}
</template>
</el-table-column>
<el-table-column
label="记录编号/Sheet No.">
<template slot-scope="scope">
{{ scope.row.sheetNo }}
</template>
</el-table-column>
<el-table-column
label="流水码/No.">
<template slot-scope="scope">
{{ scope.row.no }}
</template>
</el-table-column>
<el-table-column
label="化验员">
<template slot-scope="scope">
{{ scope.row.createBy }}
</template>
</el-table-column>
<el-table-column
label="检测日期"
fixed="right">
<template slot-scope="scope">
{{ formatTime(scope.row.createTime, 'YYYY-MM-DD') }}
</template>
</el-table-column>
</el-table>
<!-- 点检项表格 -->
<el-table
style="width: 100%"
:data="checkItem"
tooltip-effect="dark"
stripe
border>
<el-table-column
label="序号">
<template slot-scope="scope">
<el-input-number
style="width: 100%"
v-model="scope.row.orderNum"
controls-position="right"
size="small">
</el-input-number>
</template>
</el-table-column>
<el-table-column
label="检测项目">
<template slot-scope="scope">
{{ scope.row.name }}
</template>
</el-table-column>
<el-table-column
label="检测指标">
<template slot-scope="scope">
<el-input-number
style="width: 100%"
v-model="scope.row.checkResult"
controls-position="right"
:precision="2"
size="small">
</el-input-number>
</template>
</el-table-column>
<el-table-column
label="控制范围">
<template slot-scope="scope">
{{ scope.row.rangeAll }}
</template>
</el-table-column>
<el-table-column
label="频次">
<template slot-scope="scope">
{{ scope.row.frequency }}
</template>
</el-table-column>
<el-table-column
label="取样时间">
<template slot-scope="scope">
<el-date-picker
style="width: 100%"
v-model="scope.row.createTime"
type="date"
size="small"
placeholder="请选择取样时间">
</el-date-picker>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button :loading="loadingToggle" size="small" type="primary" icon="el-icon-check">确认</el-button>
<el-button size="small" icon="el-icon-close" @click="doCancelClick()">取消</el-button>
</span>
</el-dialog>
</template>
<script>
import Moment from 'moment'
export default {
watch: {
dialogToggle (newVal, oldVal) {
// 查询酸洗检测模板
this.getCheckByPickling()
}
},
data () {
return {
// 数据提交状态开关标识
loadingToggle: false,
// 对话框开关标识
dialogToggle: false,
// 模板数据
checkTemplate: [],
// 模板项数据
checkItem: [
{
orderNum: 1,
name: '游离碱FAL',
checkResult: '1',
rangeAll: '2-10',
frequency: '班/次',
createTime: ''
}
]
}
},
methods: {
// 时间日期格式化
formatTime (time, format) {
return Moment(time).format(format)
},
// 查询酸洗检测模板
getCheckByPickling () {
let queryParams = { type: 'PICKLING' }
this.$fetch('daily-check-controller/getCheckByType-get', queryParams).then(response => {
this.checkTemplate.push(_.cloneDeep(response.checkModel))
// this.checkItem = _.cloneDeep(response.checkItem)
})
},
// 点击取消按钮
doCancelClick () {
this.dialogToggle = false
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -48,18 +48,25 @@
</Table>
</div>
</div>
<!-- 新增报告 -->
<AddReport
ref="AddReport">
</AddReport>
</div>
</template>
<script>
import Table from '@/components/Table'
import Search from '@/components/Search'
import AddReport from './components/AddReport'
export default {
name: 'Pickling',
components: {
Table,
Search
Search,
AddReport
},
data () {
return {
......@@ -118,7 +125,9 @@
this.getCheckRecordList()
},
// 点击新增报告按钮
doAddClick () {},
doAddClick () {
this.$refs.AddReport.dialogToggle = true
},
// 获取设备点检记录列表
getCheckRecordList () {
let queryParams = {
......
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