劳务管理(防疫管理):提交信息接口联调

This commit is contained in:
骆乐 2022-09-23 16:50:57 +08:00
parent c34f2d2579
commit f880d10c22

View File

@ -236,8 +236,8 @@
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="vaccineForm.remark" type="textarea" placeholder="可备注疫苗厂商"
<el-form-item label="备注" prop="remarks">
<el-input v-model="vaccineForm.remarks" type="textarea" placeholder="可备注疫苗厂商"
:autosize="{minRows: 4, maxRows: 4}" :style="{width: '100%'}"></el-input>
</el-form-item>
<el-form-item style="display: flex;justify-content: flex-end;">
@ -276,7 +276,7 @@
<span class="value">{{ vaccineStatusEnum[row.needleTimes] }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="remark" label="备注"></el-table-column>
<el-table-column align="center" prop="remarks" label="备注"></el-table-column>
</template>
</el-table>
</el-dialog>
@ -311,6 +311,7 @@ import {
export default {
components: {},
data: () => ({
workerId:'',
// 3 2 1
styleType:'',
// SN
@ -498,7 +499,7 @@ export default {
this.vaccineForm = {
inoculationTime: null,
needleTimes: undefined,
remark: undefined,
remarks: undefined,
},
this.resetForm('nucleicAcidForm');
this.resetForm('vaccineForm');
@ -541,19 +542,20 @@ export default {
/** 更新 */
handleUpdate(row, title) {
console.log('row: ', row);
this.workerId = row.id
this.title = title;
this.reset();
this.detailLoading = true;
//
if (title.includes('核酸')) {
workerNucleicAcidDetectionList({ workerId: row.id }).then(res => {
workerNucleicAcidDetectionList({ workerId: this.workerId }).then(res => {
console.log('查询人员新冠核酸检测记录: ', res);
this.detailList = res.result;
this.detailLoading = false;
this.open = true;
})
} else {
workerVaccineInoculationList({ workerId: row.id }).then(res => {
workerVaccineInoculationList({ workerId: this.workerId}).then(res => {
console.log('查询人员疫苗接种记录: ', res);
this.detailList = res.result;
this.detailLoading = false;
@ -609,10 +611,14 @@ export default {
submitNucleicAcidForm: function() {
this.$refs['nucleicAcidForm'].validate(valid => {
if (!valid) return
addWorkerNucleicAcidDetection(this.nucleicAcidForm).then(res => {
let data = this.nucleicAcidForm
data.workerId = this.workerId
addWorkerNucleicAcidDetection(data).then(res => {
if(res.code == 200 ){
this.$message.success('提交成功');
this.getList();
this.cancel()
}
})
})
},
@ -620,11 +626,14 @@ export default {
submitVaccineForm: function() {
this.$refs['vaccineForm'].validate(valid => {
if (!valid) return
console.log('this.vaccineForm: ', this.vaccineForm);
addWorkerVaccineInfo(this.vaccineForm).then(res => {
let data = this.vaccineForm
data.workerId = this.workerId
addWorkerVaccineInfo(data).then(res => {
if(res.code == 200){
this.$message.success('提交成功');
this.getList();
this.cancel()
}
})
})
},