|
|
@ -10,7 +10,7 @@ |
|
|
height="240px" |
|
|
height="240px" |
|
|
class="el-table__body-wrapper tbody" |
|
|
class="el-table__body-wrapper tbody" |
|
|
border:stripe="true" |
|
|
border:stripe="true" |
|
|
@row-click="rowick" |
|
|
|
|
|
|
|
|
@row-click="rowick" ref="info" |
|
|
highlight-current-row |
|
|
highlight-current-row |
|
|
> |
|
|
> |
|
|
<el-table-column prop="id" label="编号" width="300"> |
|
|
<el-table-column prop="id" label="编号" width="300"> |
|
|
@ -149,27 +149,27 @@ |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
:title="title == 1 ? '新增' : '修改'" |
|
|
:title="title == 1 ? '新增' : '修改'" |
|
|
:visible.sync="dialogVisible" |
|
|
:visible.sync="dialogVisible" |
|
|
width="53%" |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
|
|
|
width="520px" |
|
|
|
|
|
:close-on-click-modal="false" @close="closeDialog" |
|
|
> |
|
|
> |
|
|
<el-form ref="form" :model="form" label-width="80px" :rules="rules"> |
|
|
<el-form ref="form" :model="form" label-width="80px" :rules="rules"> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="编号"> |
|
|
<el-form-item label="编号"> |
|
|
<el-input v-model="form.id" disabled></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="form.id" disabled size="small"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="名称" prop="displayName"> |
|
|
<el-form-item label="名称" prop="displayName"> |
|
|
<el-input |
|
|
<el-input |
|
|
v-model="form.displayName" |
|
|
|
|
|
|
|
|
v-model="form.displayName" size="small" |
|
|
ref="refinput" |
|
|
ref="refinput" |
|
|
></el-input> |
|
|
></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="标本类型" prop="sampleTypeId"> |
|
|
<el-form-item label="标本类型" prop="sampleTypeId"> |
|
|
<el-select v-model="form.sampleTypeId" placeholder="请选择"> |
|
|
|
|
|
|
|
|
<el-select v-model="form.sampleTypeId" placeholder="请选择" size="small"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in sampleTypeId" |
|
|
v-for="item in sampleTypeId" |
|
|
:key="item.id" |
|
|
:key="item.id" |
|
|
@ -184,8 +184,7 @@ |
|
|
<el-form-item label="标本容器" prop="sampleContainerId"> |
|
|
<el-form-item label="标本容器" prop="sampleContainerId"> |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="form.sampleContainerId" |
|
|
v-model="form.sampleContainerId" |
|
|
placeholder="请选择" |
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
placeholder="请选择" size="small"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in sampleContainerId" |
|
|
v-for="item in sampleContainerId" |
|
|
:key="item.id" |
|
|
:key="item.id" |
|
|
@ -198,22 +197,24 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="6"> |
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
<el-form-item label="创建者"> |
|
|
<el-form-item label="创建者"> |
|
|
<el-input v-model="form.creatorName" disabled></el-input> |
|
|
<el-input v-model="form.creatorName" disabled></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="6"> |
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
<el-form-item label="创建时间"> |
|
|
<el-form-item label="创建时间"> |
|
|
<el-input :value="form.creationTime" disabled></el-input> |
|
|
<el-input :value="form.creationTime" disabled></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="6"> |
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="12"> |
|
|
<el-form-item label="修改者"> |
|
|
<el-form-item label="修改者"> |
|
|
<el-input v-model="form.lastModifierName" disabled></el-input> |
|
|
<el-input v-model="form.lastModifierName" disabled></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="6"> |
|
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
<el-form-item label="修改时间"> |
|
|
<el-form-item label="修改时间"> |
|
|
<el-input |
|
|
<el-input |
|
|
:value="form.lastModificationTime" |
|
|
:value="form.lastModificationTime" |
|
|
@ -248,7 +249,7 @@ import { |
|
|
import { specimenlist, containerlist } from "@/request/systemapi"; |
|
|
import { specimenlist, containerlist } from "@/request/systemapi"; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { mapState } from "vuex"; |
|
|
import { mapState } from "vuex"; |
|
|
import { arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy,dddw } from "../../utlis/proFunc"; |
|
|
|
|
|
|
|
|
import { arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy,dddw, objCopy } from "../../utlis/proFunc"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
@ -875,9 +876,13 @@ export default { |
|
|
sampleTypeId: this.form.sampleTypeId, |
|
|
sampleTypeId: this.form.sampleTypeId, |
|
|
sampleContainerId: this.form.sampleContainerId, |
|
|
sampleContainerId: this.form.sampleContainerId, |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
|
|
|
if(res.code != -1){ |
|
|
this.$message.success("新增成功"); |
|
|
this.$message.success("新增成功"); |
|
|
this.getlist(); |
|
|
|
|
|
|
|
|
// this.getlist(); 改为局部刷新 |
|
|
|
|
|
this.form.id = res.data.id |
|
|
|
|
|
this.tableData.push(deepCopy(res.data)) |
|
|
this.dialogVisible = false; |
|
|
this.dialogVisible = false; |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} else if (this.title == 2) { |
|
|
} else if (this.title == 2) { |
|
|
barcodeediting(this.form.id, { |
|
|
barcodeediting(this.form.id, { |
|
|
@ -885,14 +890,39 @@ export default { |
|
|
sampleTypeId: this.form.sampleTypeId, |
|
|
sampleTypeId: this.form.sampleTypeId, |
|
|
sampleContainerId: this.form.sampleContainerId, |
|
|
sampleContainerId: this.form.sampleContainerId, |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
|
|
|
if(res.code != -1){ |
|
|
this.$message.success("修改成功"); |
|
|
this.$message.success("修改成功"); |
|
|
|
|
|
// this.getlist(); 改为局部刷新 |
|
|
this.dialogVisible = false; |
|
|
this.dialogVisible = false; |
|
|
this.getlist(); |
|
|
|
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
closeDialog(){ |
|
|
|
|
|
if(!this.form.id) return |
|
|
|
|
|
|
|
|
|
|
|
let currentRow = {} |
|
|
|
|
|
let lfind = arrayExistObj(this.tableData,'id',this.form.id) |
|
|
|
|
|
if(lfind > -1){ |
|
|
|
|
|
objCopy(this.form,this.tableData[lfind]) |
|
|
|
|
|
currentRow = this.tableData[lfind] |
|
|
|
|
|
}else{ |
|
|
|
|
|
currentRow = deepCopy(this.form) |
|
|
|
|
|
lfind = this.tableData.length |
|
|
|
|
|
this.tableData.push(currentRow) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(lfind > -1){ |
|
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
|
|
this.$refs['info'].setCurrentRow(currentRow) |
|
|
|
|
|
this.rowick(currentRow) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
//新增弹框 |
|
|
//新增弹框 |
|
|
btnAdd() { |
|
|
btnAdd() { |
|
|
this.dialogVisible = true; |
|
|
this.dialogVisible = true; |
|
|
|