提交merge1.3
This commit is contained in:
@@ -2,15 +2,6 @@
|
||||
<div class="hospital-record-form">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="病案首页(一)" name="first">
|
||||
<<<<<<< HEAD
|
||||
<medicalRecordFirst :formData="formData"></medicalRecordFirst>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="病案首页(二)" name="second">
|
||||
<medicalRecordSecond :formData="formData"></medicalRecordSecond>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="病案附页(一)" name="third">
|
||||
<medicalRecordThird :formData="formData"></medicalRecordThird>
|
||||
=======
|
||||
<medicalRecordFirst
|
||||
ref="firstRef"
|
||||
:formData="formData"
|
||||
@@ -28,16 +19,10 @@
|
||||
:formData="formData"
|
||||
@onCaseThird="updateCaseFirstDatas"
|
||||
></medicalRecordThird>
|
||||
>>>>>>> v1.3
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<div class="form-footer">
|
||||
<<<<<<< HEAD
|
||||
<button @click="printForm" class="print-btn">打印表单</button>
|
||||
<button @click="resetForm" class="reset-btn">重置表单</button>
|
||||
</div>
|
||||
=======
|
||||
<!-- <button @click="printForm" class="print-btn">打印表单</button> -->
|
||||
<button @click="resetForm" class="reset-btn">重置表单</button>
|
||||
</div>
|
||||
@@ -45,7 +30,6 @@
|
||||
<!-- <el-drawer v-model="drawer" size="100%">
|
||||
<medicalRecordPrint ref="recordPrintRef"></medicalRecordPrint>
|
||||
</el-drawer> -->
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -53,12 +37,8 @@
|
||||
defineOptions({
|
||||
name: 'HospitalRecordForm',
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
import { ref, reactive } from 'vue';
|
||||
=======
|
||||
import { ref, reactive, nextTick } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
>>>>>>> v1.3
|
||||
// import medicalRecordFirst from './components/medicalRecordFirst.vue';
|
||||
import medicalRecordFirst from '@/views/hospitalRecord/components/medicalRecordFirst.vue';
|
||||
import medicalRecordSecond from '@/views/hospitalRecord/components/medicalRecordSecond.vue';
|
||||
@@ -66,121 +46,6 @@ import medicalRecordThird from '@/views/hospitalRecord/components/medicalRecordT
|
||||
import medicalRecordFirstPrint from '@/views/hospitalRecord/components/medicalRecordFirstPrint.json';
|
||||
import medicalRecordSecondPrint from '@/views/hospitalRecord/components/medicalRecordSecondPrint.json';
|
||||
import medicalRecordThirdPrint from '@/views/hospitalRecord/components/medicalRecordThirdPrint.json';
|
||||
<<<<<<< HEAD
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
hospital: {
|
||||
orgCode: '41275054-7',
|
||||
paymentMethod: '城乡居民基本医疗保险'
|
||||
},
|
||||
patient: {
|
||||
healthCardNo: '',
|
||||
name: '',
|
||||
gender: '',
|
||||
birthDate: '',
|
||||
age: '',
|
||||
nationality: '中国',
|
||||
nativePlace: '',
|
||||
ethnicity: '汉族',
|
||||
idCardNo: '',
|
||||
householdAddress: '',
|
||||
workUnit: '',
|
||||
contactName: '',
|
||||
contactRelation: '',
|
||||
contactAddress: '',
|
||||
contactPhone: ''
|
||||
},
|
||||
admission: {
|
||||
times: 1,
|
||||
hospitalNo: '',
|
||||
recordNo: '',
|
||||
channel: '',
|
||||
admitTime: '',
|
||||
department: '',
|
||||
ward: '',
|
||||
confirmDate: '',
|
||||
dischargeTime: '',
|
||||
dischargeDepartment: '',
|
||||
dischargeWard: '',
|
||||
hospitalDays: ''
|
||||
},
|
||||
diagnosis: {
|
||||
mainDiagnosis: '',
|
||||
otherDiagnosis: ''
|
||||
},
|
||||
medicalInfo: {
|
||||
bloodTransfusion: '2',
|
||||
bloodType: '',
|
||||
rhType: '',
|
||||
drugAllergy: '1'
|
||||
},
|
||||
doctorInfo: {
|
||||
departmentDirector: '',
|
||||
chiefPhysician: '',
|
||||
attendingPhysician: '',
|
||||
residentPhysician: '',
|
||||
chargeNurse: '',
|
||||
chiefResident: '',
|
||||
intern: '',
|
||||
recordQuality: '1',
|
||||
coder: '',
|
||||
qualityControlDate: ''
|
||||
}
|
||||
});
|
||||
|
||||
const activeName = ref('first');
|
||||
|
||||
// 打印表单
|
||||
const printForm = () => {
|
||||
// 创建一个新的打印窗口
|
||||
const printWindow = window.open('', '_blank');
|
||||
let printContent
|
||||
// 获取模板字符串并替换转义的插值标记
|
||||
if(activeName.value == 'first') {
|
||||
printContent = medicalRecordFirstPrint.printContent;
|
||||
}else if(activeName.value == 'second') {
|
||||
printContent = medicalRecordSecondPrint.printContent;
|
||||
}else {
|
||||
printContent = medicalRecordThirdPrint.printContent;
|
||||
}
|
||||
// 这里可以进行实际的数据替换操作
|
||||
printContent = printContent.replace(/\$\{([^}]+)\}/g, (match, expr) => {
|
||||
// 简单示例:实际应根据expr内容进行数据提取
|
||||
return eval(expr); // 注意:实际使用中应避免eval,这里仅为示例
|
||||
});
|
||||
// 将内容写入打印窗口并打印
|
||||
printWindow.document.write(printContent);
|
||||
printWindow.document.close();
|
||||
}
|
||||
|
||||
function handleClick() {
|
||||
|
||||
}
|
||||
|
||||
// 重置表单
|
||||
const resetForm = () => {
|
||||
Object.keys(formData).forEach(key => {
|
||||
if (typeof formData[key] === 'object') {
|
||||
Object.keys(formData[key]).forEach(subKey => {
|
||||
formData[key][subKey] = '';
|
||||
});
|
||||
} else {
|
||||
formData[key] = '';
|
||||
}
|
||||
});
|
||||
|
||||
// 重置默认值
|
||||
formData.hospital.orgCode = '41275054-7';
|
||||
formData.hospital.paymentMethod = '城乡居民基本医疗保险';
|
||||
formData.patient.nationality = '中国';
|
||||
formData.patient.ethnicity = '汉族';
|
||||
formData.admission.times = 1;
|
||||
formData.medicalInfo.bloodTransfusion = '2';
|
||||
formData.medicalInfo.drugAllergy = '1';
|
||||
formData.doctorInfo.recordQuality = '1';
|
||||
};
|
||||
=======
|
||||
import formDataJs from '../views/doctorstation/components/store/medicalpage';
|
||||
import medicalRecordPrint from '../views/hospitalRecord/components/medicalRecordPrint.vue';
|
||||
import { previewPrint } from '../utils/printUtils';
|
||||
@@ -790,7 +655,6 @@ defineExpose({
|
||||
setFormData,
|
||||
printFun,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -860,13 +724,9 @@ label {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
input, select, textarea {
|
||||
=======
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
>>>>>>> v1.3
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
border: 1px solid #ccc;
|
||||
@@ -887,12 +747,8 @@ textarea {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
.print-btn, .reset-btn {
|
||||
=======
|
||||
.print-btn,
|
||||
.reset-btn {
|
||||
>>>>>>> v1.3
|
||||
padding: 10px 20px;
|
||||
margin: 0 10px;
|
||||
border: none;
|
||||
@@ -902,11 +758,7 @@ textarea {
|
||||
}
|
||||
|
||||
.print-btn {
|
||||
<<<<<<< HEAD
|
||||
background-color: #4CAF50;
|
||||
=======
|
||||
background-color: #4caf50;
|
||||
>>>>>>> v1.3
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -937,8 +789,4 @@ textarea {
|
||||
margin: 2cm;
|
||||
}
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
</style>
|
||||
=======
|
||||
</style>
|
||||
>>>>>>> v1.3
|
||||
|
||||
Reference in New Issue
Block a user