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

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