|
@@ -668,6 +668,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div id="headpage" style="opacity: 0; position: fixed">
|
|
|
+ <HeadPage :patient="sheet" :dics="dics" />
|
|
|
+ </div>
|
|
|
+ <div id="tailpage" style="opacity: 0; position: fixed">
|
|
|
+ <TailPage :patient="sheet" :dics="dics" />
|
|
|
+ </div>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
|
|
@@ -764,7 +770,13 @@ import router from '@/router'
|
|
|
import { initLodop, getLodop } from '@/utils/c-lodop'
|
|
|
import { formatMonth } from '@/utils/date'
|
|
|
import { createWorkSheet, writeExcelFile } from '@/utils/excel'
|
|
|
+import HeadPage from '../../../components/inpatient/frontsheet-printpage/HeadPage.vue'
|
|
|
+import TailPage from '../../../components/inpatient/frontsheet-printpage/TailPage.vue'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ HeadPage,
|
|
|
+ TailPage,
|
|
|
+ },
|
|
|
setup() {
|
|
|
const isCollapse = computed(() => store.state.app.isCollapse)
|
|
|
const cdStyle = computed(() => {
|
|
@@ -1276,42 +1288,10 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
const execPrint = (flag) => {
|
|
|
- if (!beforePrintSet.value) {
|
|
|
- const allInput = document.body.getElementsByTagName('input')
|
|
|
- const allTextArea = document.body.getElementsByTagName('textarea')
|
|
|
- const allSelect = document.body.getElementsByTagName('select')
|
|
|
- for (let i = 0; i < allInput.length; i++) allInput[i].setAttribute('value', allInput[i].value)
|
|
|
- for (let i = 0; i < allTextArea.length; i++) allTextArea[i].innerText = allTextArea[i].value
|
|
|
- for (let i = 0; i < allSelect.length; i++) {
|
|
|
- let select = allSelect[i]
|
|
|
- if (select.value === '') {
|
|
|
- if (select.options[select.options.length - 1].value !== '') select.options[select.options.length] = new Option('', '')
|
|
|
- select.options[select.options.length - 1].setAttribute('selected', true)
|
|
|
- } else {
|
|
|
- for (let j = 0; j < select.options.length; j++) {
|
|
|
- if (select.options[j].value === select.value) {
|
|
|
- select.options[j].setAttribute('selected', true)
|
|
|
- } else {
|
|
|
- select.options[j].removeAttribute('selected')
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- beforePrintSet.value = true
|
|
|
- }
|
|
|
-
|
|
|
- const prntStyle =
|
|
|
- "<style>select,input {outline: none;border: none;height: 20px;line-height: 20px;border-radius: 0;background: transparent;border-bottom: 1px solid #333333;-webkit-appearance: none!important;-moz-appearance: none!important;appearance: none!important;} select::-ms-expand {display: none!important;}textarea {outline: none;border: none;background-color: transparent;overflow-y:hidden}input[type='number'] {-moz-appearance: textfield;}table th {border: 1px solid black;text-align: center;}table td {border: 1px solid black;}</style>"
|
|
|
- let pagePrint
|
|
|
- if (flag === 1) {
|
|
|
- const page0 = '<div>' + document.getElementById('page0').innerHTML + '</div>'
|
|
|
- const page1 = '<div>' + document.getElementById('page1').innerHTML + '</div>'
|
|
|
- pagePrint = prntStyle + '<body>' + page0 + page1 + '</body>'
|
|
|
- } else {
|
|
|
- const page2 = '<div>' + document.getElementById('page2').innerHTML + '</div>'
|
|
|
- pagePrint = prntStyle + '<body>' + page2 + '</body>'
|
|
|
- }
|
|
|
LODOP = getLodop()
|
|
|
+ const prntStyle = `<style>*{font-size:10pt} table,th,td {border: 1px solid black;border-collapse: collapse;} td,th {height: 24px;padding-left: 4px;}</style>`
|
|
|
+ const prntContent = flag === 1 ? document.getElementById('headpage').innerHTML : document.getElementById('tailpage').innerHTML
|
|
|
+ let pagePrint = prntStyle + '<body>' + prntContent + '</body>'
|
|
|
LODOP.PRINT_INIT('casefrontsheet')
|
|
|
LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '')
|
|
|
LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
|
|
@@ -1465,6 +1445,10 @@ export default {
|
|
|
onMounted(() => {
|
|
|
document.addEventListener('keydown', handleEvent)
|
|
|
getAllDictionary().then((res) => {
|
|
|
+ res.getOperations = operations
|
|
|
+ res.getYesOrNo = yesOrNo
|
|
|
+ res.getHaveOrNot = haveOrNot
|
|
|
+ res.getAutopsies = autopsies
|
|
|
dics.value = res
|
|
|
getAllWards().then((res1) => {
|
|
|
userWards.value = res1
|