|
|
@ -65,14 +65,18 @@ |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="厚度-筒体" prop="tongtimingyihoudu"> |
|
|
|
<el-input v-model="param.tongtimingyihoudu" :disabled="edit"> |
|
|
|
<template slot="append"> mm </template> |
|
|
|
<template slot="append"> |
|
|
|
mm |
|
|
|
</template> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="实测最小值-筒体" prop="tongtizuixiaobihou"> |
|
|
|
<el-input v-model="param.tongtizuixiaobihou" :disabled="edit"> |
|
|
|
<template slot="append"> mm </template> |
|
|
|
<template slot="append"> |
|
|
|
mm |
|
|
|
</template> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -81,14 +85,18 @@ |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="厚度-封头" prop="fengtoumingyihoudu"> |
|
|
|
<el-input v-model="param.fengtoumingyihoudu" :disabled="edit"> |
|
|
|
<template slot="append"> mm </template> |
|
|
|
<template slot="append"> |
|
|
|
mm |
|
|
|
</template> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="实测最小值-封头" prop="fengtouzuixiaobihou"> |
|
|
|
<el-input v-model="param.fengtouzuixiaobihou" :disabled="edit"> |
|
|
|
<template slot="append"> mm </template> |
|
|
|
<template slot="append"> |
|
|
|
mm |
|
|
|
</template> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -164,7 +172,9 @@ |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="实测点数" prop="shicedianshu"> |
|
|
|
<el-input v-model="param.shicedianshu" :disabled="true"> |
|
|
|
<template slot="append"> 个 </template> |
|
|
|
<template slot="append"> |
|
|
|
个 |
|
|
|
</template> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -173,7 +183,9 @@ |
|
|
|
<el-col :span="9"> |
|
|
|
<el-form-item label="实测部位" prop="shicebuwei"> |
|
|
|
<el-input v-model="param.shicebuwei" :disabled="true"> |
|
|
|
<template slot="append"> 处 </template> |
|
|
|
<template slot="append"> |
|
|
|
处 |
|
|
|
</template> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -403,10 +415,10 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import Sticky from "@/components/Sticky"; |
|
|
|
import btn from "@/views/common/FxButton"; |
|
|
|
import Sticky from '@/components/Sticky' |
|
|
|
import btn from '@/views/common/FxButton' |
|
|
|
export default { |
|
|
|
name: "RqZbgBhcd2100", |
|
|
|
name: 'RqZbgBhcd2100', |
|
|
|
components: { Sticky, btn }, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -414,89 +426,89 @@ export default { |
|
|
|
param: {}, |
|
|
|
tableData: [], |
|
|
|
delRowIndex: [], |
|
|
|
state: "", |
|
|
|
state: '', |
|
|
|
edit: false, |
|
|
|
info: { |
|
|
|
ysjlId: this.$route.query.id, |
|
|
|
jyxm: this.$route.query.jyxm, |
|
|
|
limit: 1, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getInfo(); |
|
|
|
limit: 1 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
tableData: { |
|
|
|
handler(n, o) { |
|
|
|
let arr = []; |
|
|
|
const arr = [] |
|
|
|
if (n.length > 0) { |
|
|
|
for (let i = 0; i < n.length; i++) { |
|
|
|
for (let k in n[i]) { |
|
|
|
if (n[i][k] !== " ") { |
|
|
|
arr.push(n[i][k]); |
|
|
|
for (const k in n[i]) { |
|
|
|
if (n[i][k] !== ' ') { |
|
|
|
arr.push(n[i][k]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
let arr2 = []; |
|
|
|
const arr2 = [] |
|
|
|
arr.map((item) => { |
|
|
|
if (item !== "") { |
|
|
|
arr2.push(item); |
|
|
|
if (item !== '') { |
|
|
|
arr2.push(item) |
|
|
|
} |
|
|
|
}); |
|
|
|
this.param.shicedianshu = arr2.length - n.length; |
|
|
|
}) |
|
|
|
this.param.shicedianshu = arr2.length - n.length |
|
|
|
}, |
|
|
|
deep: true, |
|
|
|
immediate: true, |
|
|
|
immediate: true |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getInfo() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getInfo() { |
|
|
|
this.api({ |
|
|
|
url: "/fx", |
|
|
|
method: "get", |
|
|
|
url: '/fx', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
ysjlId: this.$route.query.id, |
|
|
|
jyxm: this.$route.query.jyxm, |
|
|
|
}, |
|
|
|
jyxm: this.$route.query.jyxm |
|
|
|
} |
|
|
|
}).then((data) => { |
|
|
|
this.ysjl = data.ysjl; |
|
|
|
this.state = "create"; |
|
|
|
this.ysjl = data.ysjl |
|
|
|
this.state = 'create' |
|
|
|
if (data.param !== null && data.param !== undefined) { |
|
|
|
// 有无损原始记录参数 |
|
|
|
this.state = "update"; |
|
|
|
this.param = data.param; |
|
|
|
this.state = 'update' |
|
|
|
this.param = data.param |
|
|
|
this.param.celiangyiqibianhao = this.param.celiangyiqibianhao |
|
|
|
? this.param.celiangyiqibianhao |
|
|
|
: "02-06-"; |
|
|
|
: '02-06-' |
|
|
|
this.param.celiangyiqijingdu = this.param.celiangyiqijingdu |
|
|
|
? this.param.celiangyiqijingdu |
|
|
|
: "±0.1mm"; |
|
|
|
: '±0.1mm' |
|
|
|
this.tableData = |
|
|
|
JSON.parse(data.param.fubiao) === null |
|
|
|
? JSON.parse("[]") |
|
|
|
: JSON.parse(data.param.fubiao); |
|
|
|
? JSON.parse('[]') |
|
|
|
: JSON.parse(data.param.fubiao) |
|
|
|
} else { |
|
|
|
this.param = { |
|
|
|
celiangyiqibianhao: "02-06-", |
|
|
|
celiangyiqijingdu: "0.1mm", |
|
|
|
ouheji: "TM-100 型医用超声耦合剂", |
|
|
|
biaomianzhuangkuang: "金属光泽", |
|
|
|
jiancejieguo: "符合设计要求。", |
|
|
|
myhdqtone: "无此项", |
|
|
|
myhdqtzone: "无此项", |
|
|
|
zxbhqtone: "无此项", |
|
|
|
zxbhqtzone: "无此项", |
|
|
|
myhdqttwo: "无此项", |
|
|
|
myhdqtztwo: "无此项", |
|
|
|
zxbhqttwo: "无此项", |
|
|
|
zxbhqtztwo: "无此项", |
|
|
|
}; |
|
|
|
celiangyiqibianhao: '02-06-', |
|
|
|
celiangyiqijingdu: '0.1mm', |
|
|
|
ouheji: 'TM-100 型医用超声耦合剂', |
|
|
|
biaomianzhuangkuang: '金属光泽', |
|
|
|
jiancejieguo: '符合设计要求。', |
|
|
|
myhdqtone: '无此项', |
|
|
|
myhdqtzone: '无此项', |
|
|
|
zxbhqtone: '无此项', |
|
|
|
zxbhqtzone: '无此项', |
|
|
|
myhdqttwo: '无此项', |
|
|
|
myhdqtztwo: '无此项', |
|
|
|
zxbhqttwo: '无此项', |
|
|
|
zxbhqtztwo: '无此项' |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.ysjl.flowstatus === 4) { |
|
|
|
this.state = "finish"; |
|
|
|
this.edit = true; |
|
|
|
this.state = 'finish' |
|
|
|
this.edit = true |
|
|
|
} |
|
|
|
this.$refs.btn.getParentInfo( |
|
|
|
this.ysjl, |
|
|
@ -507,79 +519,79 @@ export default { |
|
|
|
this.$route.query.jyxm, |
|
|
|
true, |
|
|
|
false |
|
|
|
); |
|
|
|
}); |
|
|
|
) |
|
|
|
}) |
|
|
|
}, |
|
|
|
addChRow: function () { |
|
|
|
addChRow: function() { |
|
|
|
const d = { |
|
|
|
C1: "", |
|
|
|
C2: "", |
|
|
|
C3: "", |
|
|
|
C4: "", |
|
|
|
C5: "", |
|
|
|
C6: "", |
|
|
|
C7: "", |
|
|
|
C8: "", |
|
|
|
C9: "", |
|
|
|
C10: "", |
|
|
|
C11: "", |
|
|
|
C12: "", |
|
|
|
}; |
|
|
|
this.tableData.push(d); |
|
|
|
C1: '', |
|
|
|
C2: '', |
|
|
|
C3: '', |
|
|
|
C4: '', |
|
|
|
C5: '', |
|
|
|
C6: '', |
|
|
|
C7: '', |
|
|
|
C8: '', |
|
|
|
C9: '', |
|
|
|
C10: '', |
|
|
|
C11: '', |
|
|
|
C12: '' |
|
|
|
} |
|
|
|
this.tableData.push(d) |
|
|
|
setTimeout(() => { |
|
|
|
this.$refs.tableData.setCurrentRow(d); |
|
|
|
}, 10); // 用于延时渲染后选中这行 |
|
|
|
this.$refs.tableData.setCurrentRow(d) |
|
|
|
}, 10) // 用于延时渲染后选中这行 |
|
|
|
}, |
|
|
|
delChRow: function () { |
|
|
|
delChRow: function() { |
|
|
|
if (this.delRowIndex.length === 0) { |
|
|
|
this.$message({ |
|
|
|
type: "error", |
|
|
|
message: "请选中需要删除的数据!", |
|
|
|
}); |
|
|
|
return false; |
|
|
|
type: 'error', |
|
|
|
message: '请选中需要删除的数据!' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} else { |
|
|
|
// 对delRowIndex进行排序,因为删除一个元素后index值会变 |
|
|
|
this.delRowIndex.sort(function (x, y) { |
|
|
|
this.delRowIndex.sort(function(x, y) { |
|
|
|
if (x < y) { |
|
|
|
return 1; |
|
|
|
return 1 |
|
|
|
} |
|
|
|
if (x > y) { |
|
|
|
return -1; |
|
|
|
return -1 |
|
|
|
} |
|
|
|
return 0; |
|
|
|
}); |
|
|
|
return 0 |
|
|
|
}) |
|
|
|
for (let i = 0; i < this.delRowIndex.length; i++) { |
|
|
|
this.tableData.splice(this.delRowIndex[i], 1); |
|
|
|
this.tableData.splice(this.delRowIndex[i], 1) |
|
|
|
} |
|
|
|
this.$refs.tableData.clearSelection(); |
|
|
|
this.delRowIndex = []; |
|
|
|
this.$refs.tableData.clearSelection() |
|
|
|
this.delRowIndex = [] |
|
|
|
} |
|
|
|
}, |
|
|
|
// 表格单击选中行 |
|
|
|
onRowClick(row) { |
|
|
|
this.$refs.tableData.toggleRowSelection(row); |
|
|
|
this.$refs.tableData.toggleRowSelection(row) |
|
|
|
}, |
|
|
|
tableRowClassName({ row, rowIndex }) { |
|
|
|
row.index = rowIndex; |
|
|
|
row.index = rowIndex |
|
|
|
}, |
|
|
|
handleSelectionChange(val) { |
|
|
|
this.delRowIndex = []; |
|
|
|
this.delRowIndex = [] |
|
|
|
for (let i = 0; i < val.length; i++) { |
|
|
|
this.delRowIndex.push(val[i].index); |
|
|
|
this.delRowIndex.push(val[i].index) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 上传数据 |
|
|
|
uploadTableData(file) { |
|
|
|
this.common.uploadTableData(file, this.tableData); |
|
|
|
this.common.uploadTableData(file, this.tableData) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 数据构建 |
|
|
|
*/ |
|
|
|
beforeSaveBuildData() { |
|
|
|
// TODO |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style> |
|
|
|
#myTable .el-input__inner { |
|
|
|