fix:性能检验修正
This commit is contained in:
parent
59b35b10f3
commit
62ed6a66bb
|
@ -182,16 +182,6 @@
|
|||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :md="12" :sm="24">
|
||||
<el-form-item
|
||||
label="实验温度及保温时间"
|
||||
prop="sample_density"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.sample_number"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item
|
||||
label="样品密度"
|
||||
|
@ -246,7 +236,23 @@ export default {
|
|||
return {
|
||||
loading: false,
|
||||
form: {
|
||||
val_xj: "",
|
||||
test_date:'',
|
||||
sample_number:'',
|
||||
test_user:'',
|
||||
equip_state:null,
|
||||
val_hd:null,
|
||||
specification:null,
|
||||
val_zsl:null,
|
||||
val_tgl:null,
|
||||
val_pzxs:null,
|
||||
val_ts:null,
|
||||
val_tg:null,
|
||||
val_tf:null,
|
||||
val_xj:null,
|
||||
sample_count:null,
|
||||
sample_density:null,
|
||||
val_zgwd:null,
|
||||
note:null,
|
||||
},
|
||||
rules: {
|
||||
belong_dept: [
|
||||
|
@ -284,6 +290,13 @@ export default {
|
|||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sample_number:[
|
||||
{
|
||||
required: true,
|
||||
message: "请输入样品编号",
|
||||
trigger: "blur",
|
||||
}
|
||||
],
|
||||
is_ok: [
|
||||
{
|
||||
required: true,
|
||||
|
@ -373,23 +386,30 @@ export default {
|
|||
handleClick() {},
|
||||
//提交
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
let that = this;
|
||||
that.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
that.isSaveing = true;
|
||||
let form = {};
|
||||
for( let key in that.form){
|
||||
if(that.form[key]!=null&&that.form[key]!=''){
|
||||
form[key] = that.form[key];
|
||||
}
|
||||
}
|
||||
try {
|
||||
var res;
|
||||
if (this.mode == "add") {
|
||||
res = await this.$API.qm.ptest.create.req(this.form);
|
||||
} else if (this.mode == "edit") {
|
||||
res = await this.$API.qm.ptest.update.req(this.form.id,this.form);
|
||||
if (that.mode == "add") {
|
||||
res = await that.$API.qm.ptest.create.req(form);
|
||||
} else if (that.mode == "edit") {
|
||||
res = await that.$API.qm.ptest.update.req(that.form.id,form);
|
||||
}
|
||||
this.isSaveing = false;
|
||||
this.$emit("success");
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
that.isSaveing = false;
|
||||
that.$emit("success");
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
that.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue