pengjun 2 years ago
parent
commit
3b7473a581
  1. 30
      src/components/sumDoctorCheck/CheckDetails.vue
  2. 13
      src/utlis/proFunc.js

30
src/components/sumDoctorCheck/CheckDetails.vue

@ -10,12 +10,14 @@
cellspacing="0" bordercolor="#909399" style="border-collapse:collapse;"> cellspacing="0" bordercolor="#909399" style="border-collapse:collapse;">
<tr height="24"> <tr height="24">
<td width="200">{{ item2.asbitemName }}</td> <td width="200">{{ item2.asbitemName }}</td>
<td width="604" colspan="5">{{ '检查日期:' + item2.checkDate + ' 检查医生:' + item2.checkDoctorName }}</td>
<td width="604" colspan="7">{{ '检查日期:' + item2.checkDate + ' 检查医生:' + item2.checkDoctorName }}</td>
</tr> </tr>
<tr style="text-align: center;" height="24"> <tr style="text-align: center;" height="24">
<td width="200">项目</td> <td width="200">项目</td>
<td width="270">结果</td> <td width="270">结果</td>
<td width="270">上次结果</td>
<td width="270">上上次结果</td>
<td width="100">参考值</td> <td width="100">参考值</td>
<td width="100">警告参考值</td> <td width="100">警告参考值</td>
<td width="80">单位</td> <td width="80">单位</td>
@ -24,15 +26,17 @@
<tr height="24" v-for="(item3, index3) in item2.items" :key="index + '-' + index2 + '-' + index3"> <tr height="24" v-for="(item3, index3) in item2.items" :key="index + '-' + index2 + '-' + index3">
<td>{{ item3.itemName }}</td> <td>{{ item3.itemName }}</td>
<td>{{ item3.itemResult }}</td>
<td>{{ item3.referenceRangeValue }}</td>
<td>{{ item3.criticalRangeValue }}</td>
<td>{{ item3.unit }}</td>
<td>{{ item3.resultStatusName }}</td>
<td :style="`background-color: ${getColorStr(item3.reportBackgroundColor)};color: ${getColorStr(item3.reportFontColor)};`">{{ item3.itemResult }}</td>
<td :style="`background-color: ${getColorStr(item3.previousReportBackgroundColor)};color: ${getColorStr(item3.previousReportFontColor)};`">{{ item3.previousItemResult }}</td>
<td :style="`background-color: ${getColorStr(item3.previousTwoReportBackgroundColor)};color: ${getColorStr(item3.previousTwoReportFontColor)};`">{{ item3.previousTwoItemResult }}</td>
<td align="center">{{ item3.referenceRangeValue }}</td>
<td align="center">{{ item3.criticalRangeValue }}</td>
<td align="center">{{ item3.unit }}</td>
<td align="center">{{ item3.resultStatusName }}</td>
</tr> </tr>
<tr height="24"> <tr height="24">
<td colspan="6">小结{{ mergeSummarys(item2.summarys, 'summary') }}</td>
<td colspan="8" v-html="`小结:${mergeSummarys(item2.summarys, 'summary')}`"></td>
</tr> </tr>
</table> </table>
</tr> </tr>
@ -44,7 +48,7 @@
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import Sortable from "sortablejs"; import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj } from '@/utlis/proFunc';
import { arrayExistObj,getColorStr } from '@/utlis/proFunc';
export default { export default {
components: {}, components: {},
props: ["patientRegisterId"], props: ["patientRegisterId"],
@ -71,6 +75,7 @@ export default {
}, },
methods: { methods: {
getColorStr,
// //
CheckDetails(patientRegisterId) { CheckDetails(patientRegisterId) {
if (!patientRegisterId) { if (!patientRegisterId) {
@ -92,12 +97,15 @@ export default {
}, },
mergeSummarys(array, itemKey) { mergeSummarys(array, itemKey) {
let ret = '' let ret = ''
array.forEach(e => {
return ret += ';' + e[itemKey]
array.forEach((e,i) => {
let splitStr = "<br>"
if(i == 0) splitStr = ""
return ret += splitStr + e[itemKey]
}) })
return ret.substring(1, ret.length)
return ret
} }
}, },

13
src/utlis/proFunc.js

@ -312,6 +312,19 @@ const setData = (obj, item, v) => {
exports.setData = setData; exports.setData = setData;
function getColorStr(intColor) {
let color = '000000'
try {
color += Number(intColor).toString(16)
color = color.substring(color.length - 6)
} catch (error) {
console.log('getColorStr',error)
}
return '#' + color
}
exports.getColorStr = getColorStr;

Loading…
Cancel
Save