Browse Source

Merge remote-tracking branch 'origin/master'

master
李磊 3 years ago
parent
commit
00ab450a2b
  1. 2
      src/views/task/list.vue
  2. 465
      src/views/ysjl/2000/2100/fenxiang/bhcd.vue

2
src/views/task/list.vue

@ -264,13 +264,13 @@ export default {
created() {
this.getList()
this.getSbList(undefined, undefined, 1)
this.jylbList = this.$store.getters.allCategory
},
mounted() {
const that = this
this.common.$on('task-list', function() {
that.handleFilter()
})
this.jylbList = this.$store.getters.allCategory
},
methods: {
getList() {

465
src/views/ysjl/2000/2100/fenxiang/bhcd.vue

@ -1,10 +1,16 @@
<!--壁厚测定-->
<template>
<div class="app-container">
<sticky style="margin-bottom: 10px;">
<sticky style="margin-bottom: 10px">
<btn ref="btn" />
</sticky>
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<el-form
ref="ysjl"
:model="ysjl"
class="el-form"
label-position="right"
label-width="130px"
>
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="20">
@ -28,15 +34,29 @@
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="测量仪器精度" label-width="135px" prop="celiangyiqijingdu">
<el-form-item
label="测量仪器精度"
label-width="135px"
prop="celiangyiqijingdu"
>
<el-input v-model="param.celiangyiqijingdu" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="耦合剂" prop="ouheji">
<el-select v-model="param.ouheji" :disabled="edit" style="width: 100%;" filterable allow-create default-first-option>
<el-select
v-model="param.ouheji"
:disabled="edit"
style="width: 100%"
filterable
allow-create
default-first-option
>
<el-option label="机油" value="机油" />
<el-option label="TM-100 型医用超声耦合剂" value="TM-100 型医用超声耦合剂" />
<el-option
label="TM-100 型医用超声耦合剂"
value="TM-100 型医用超声耦合剂"
/>
</el-select>
</el-form-item>
</el-col>
@ -45,18 +65,14 @@
<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>
@ -65,46 +81,81 @@
<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>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-input v-model="param.myhdqtone" :disabled="edit" style="width: 130px;" />
<el-input v-model="param.myhdqtzone" :disabled="edit" style="width: 225px;" />
<el-input
v-model="param.myhdqtone"
:disabled="edit"
style="width: 130px"
/>
<el-input
v-model="param.myhdqtzone"
:disabled="edit"
style="width: 225px"
/>
</el-col>
<el-col :span="9">
<el-input v-model="param.zxbhqtone" :disabled="edit" style="width: 130px;" />
<el-input v-model="param.zxbhqtzone" :disabled="edit" style="width: 225px;" />
<el-input
v-model="param.zxbhqtone"
:disabled="edit"
style="width: 130px"
/>
<el-input
v-model="param.zxbhqtzone"
:disabled="edit"
style="width: 225px"
/>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-input v-model="param.myhdqttwo" :disabled="edit" style="width: 130px;" />
<el-input v-model="param.myhdqtztwo" :disabled="edit" style="width: 225px;" />
<el-input
v-model="param.myhdqttwo"
:disabled="edit"
style="width: 130px"
/>
<el-input
v-model="param.myhdqtztwo"
:disabled="edit"
style="width: 225px"
/>
</el-col>
<el-col :span="9">
<el-input v-model="param.zxbhqttwo" :disabled="edit" style="width: 130px;" />
<el-input v-model="param.zxbhqtztwo" :disabled="edit" style="width: 225px;" />
<el-input
v-model="param.zxbhqttwo"
:disabled="edit"
style="width: 130px"
/>
<el-input
v-model="param.zxbhqtztwo"
:disabled="edit"
style="width: 225px"
/>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="表面状况" prop="biaomianzhuangkuang">
<el-select v-model="param.biaomianzhuangkuang" :disabled="edit" filterable allow-create default-first-option style="width: 100%;">
<el-select
v-model="param.biaomianzhuangkuang"
:disabled="edit"
filterable
allow-create
default-first-option
style="width: 100%"
>
<el-option label="金属光泽" value="金属光泽" />
<el-option label="原始表面" value="原始表面" />
</el-select>
@ -113,9 +164,7 @@
<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>
@ -124,9 +173,7 @@
<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>
@ -134,84 +181,186 @@
</fieldset>
<fieldset>
<legend>测厚记录</legend>
<el-button type="success" icon="el-icon-download" size="mini" style="margin-right: 10px;" @click="common.downloadTemplate('压力容器定期检验壁厚测定记录表.xlsx')">
<el-button
type="success"
icon="el-icon-download"
size="mini"
style="margin-right: 10px"
@click="
common.downloadTemplate('压力容器定期检验壁厚测定记录表.xlsx')
"
>
下载导入模板
</el-button>
<el-upload
:show-file-list="false"
:before-upload="uploadTableData"
style="float: left; margin-right: 10px;"
style="float: left; margin-right: 10px"
action="123"
>
<el-button type="primary" size="mini" icon="el-icon-upload" :disabled="edit">
<el-button
type="primary"
size="mini"
icon="el-icon-upload"
:disabled="edit"
>
导入数据
</el-button>
</el-upload>
<el-button v-if="state !== 'bgView'" type="success" size="mini" icon="el-icon-circle-plus-outline" :disabled="edit" @click="addChRow()">
<el-button
v-if="state !== 'bgView'"
type="success"
size="mini"
icon="el-icon-circle-plus-outline"
:disabled="edit"
@click="addChRow()"
>
添加
</el-button>
<el-button v-if="state !== 'bgView'" type="danger" size="mini" icon="el-icon-remove-outline" :disabled="edit" @click="delChRow()">
<el-button
v-if="state !== 'bgView'"
type="danger"
size="mini"
icon="el-icon-remove-outline"
:disabled="edit"
@click="delChRow()"
>
删除
</el-button>
<el-table id="myTable" ref="tableData" :data="tableData" :row-class-name="tableRowClassName" border stripe style="width:100%;margin-top: 5px;" @row-click="onRowClick" @selection-change="handleSelectionChange">
<el-table
id="myTable"
ref="tableData"
:data="tableData"
:row-class-name="tableRowClassName"
border
stripe
style="width: 100%; margin-top: 5px"
@row-click="onRowClick"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="40" />
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column align="center" prop="C1" width="80px" label="编号">
<el-table-column
type="index"
width="50"
label="序号"
align="center"
/>
<el-table-column
align="center"
prop="C1"
width="80px"
label="测点编号"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C1" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C2" width="80px" label="1">
<el-table-column
align="center"
prop="C2"
width="80px"
label="测点厚度"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C2" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C3" width="80px" label="2">
<el-table-column
align="center"
prop="C3"
width="80px"
label="测点编号"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C3" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C4" width="80px" label="3">
<el-table-column
align="center"
prop="C4"
width="80px"
label="测点厚度"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C4" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C5" width="80px" label="4">
<el-table-column
align="center"
prop="C5"
width="80px"
label="测点编号"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C5" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C6" width="80px" label="5">
<el-table-column
align="center"
prop="C6"
width="80px"
label="测点厚度"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C6" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C7" width="80px" label="编号">
<el-table-column
align="center"
prop="C7"
width="80px"
label="测点编号"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C7" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C8" width="80px" label="1">
<el-table-column
align="center"
prop="C8"
width="80px"
label="测点厚度"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C8" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C9" width="80px" label="2">
<el-table-column
align="center"
prop="C9"
width="80px"
label="测点编号"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C9" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C10" width="80px" label="3">
<el-table-column
align="center"
prop="C10"
width="80px"
label="测点厚度"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C10" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C11" width="80px" label="4">
<el-table-column
align="center"
prop="C11"
width="80px"
label="测点编号"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C11" :disabled="edit" size="mini" />
</template>
</el-table-column>
<el-table-column align="center" prop="C12" width="80px" label="5">
<el-table-column
align="center"
prop="C12"
width="80px"
label="测点厚度"
>
<template slot-scope="scope">
<el-input v-model="scope.row.C12" :disabled="edit" size="mini" />
</template>
@ -222,15 +371,31 @@
<legend>检验信息</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验日期" label-width="135px" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" :disabled="edit" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" />
<el-form-item
label="检验日期"
label-width="135px"
prop="jianyanjieshuriqi"
>
<el-date-picker
v-model="ysjl.jianyanjieshuriqi"
:disabled="edit"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="测定结果" prop="jiancejieguo">
<el-input v-model="param.jiancejieguo" :disabled="edit" type="textarea" rows="4" style="width: 800px;" />
<el-input
v-model="param.jiancejieguo"
:disabled="edit"
type="textarea"
rows="4"
style="width: 800px"
/>
</el-form-item>
<el-form-item label="" prop="jianyanrenyuan" style="display: none;">
<el-form-item label="" prop="jianyanrenyuan" style="display: none">
<el-input v-model="ysjl.jianyanrenyuan" type="text" />
</el-form-item>
</fieldset>
@ -238,10 +403,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 {
@ -249,122 +414,176 @@ export default {
param: {},
tableData: [],
delRowIndex: [],
state: '',
state: "",
edit: false,
info: {
ysjlId: this.$route.query.id,
jyxm: this.$route.query.jyxm,
limit: 1
}
}
limit: 1,
},
};
},
created() {
this.getInfo()
this.getInfo();
},
watch: {
tableData: {
handler(n, o) {
let 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]);
}
}
}
}
let arr2 = [];
arr.map((item) => {
if (item !== "") {
arr2.push(item);
}
});
this.param.shicedianshu = arr2.length - n.length;
},
deep: true,
immediate: true,
},
},
methods: {
getInfo() {
this.api({
url: '/fx',
method: 'get',
url: "/fx",
method: "get",
params: {
ysjlId: this.$route.query.id,
jyxm: this.$route.query.jyxm
}
}).then(data => {
this.ysjl = data.ysjl
this.state = 'create'
jyxm: this.$route.query.jyxm,
},
}).then((data) => {
this.ysjl = data.ysjl;
this.state = "create";
if (data.param !== null && data.param !== undefined) {
//
this.state = 'update'
this.param = data.param
this.param.celiangyiqibianhao = this.param.celiangyiqibianhao ? this.param.celiangyiqibianhao : '02-06-'
this.param.celiangyiqijingdu = this.param.celiangyiqijingdu ? this.param.celiangyiqijingdu : '±0.1mm'
this.tableData = JSON.parse(data.param.fubiao) === null ? JSON.parse('[]') : JSON.parse(data.param.fubiao)
this.state = "update";
this.param = data.param;
this.param.celiangyiqibianhao = this.param.celiangyiqibianhao
? this.param.celiangyiqibianhao
: "02-06-";
this.param.celiangyiqijingdu = this.param.celiangyiqijingdu
? this.param.celiangyiqijingdu
: "±0.1mm";
this.tableData =
JSON.parse(data.param.fubiao) === null
? 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, this.param, null, this.tableData, this.state, this.$route.query.jyxm, true, false)
})
this.$refs.btn.getParentInfo(
this.ysjl,
this.param,
null,
this.tableData,
this.state,
this.$route.query.jyxm,
true,
false
);
});
},
addChRow: function() {
const d = { C1: '', C2: '', C3: '', C4: '', C5: '', C6: '', C7: '', C8: '', C9: '', C10: '', C11: '', C12: '' }
this.tableData.push(d)
addChRow: function () {
const 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 {
// delRowIndexindex
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{
padding: 0px 5px;
text-align: center;
}
#myTable .el-input__inner {
padding: 0px 5px;
text-align: center;
}
</style>

Loading…
Cancel
Save