|  | @@ -99,11 +99,11 @@
 | 
	
		
			
				|  |  |          <el-radio value="1">小执行单</el-radio>
 | 
	
		
			
				|  |  |        </el-radio-group>
 | 
	
		
			
				|  |  |        <el-button icon="Search" type="primary" @click="queryInfo"
 | 
	
		
			
				|  |  | -        >查询</el-button
 | 
	
		
			
				|  |  | -      >
 | 
	
		
			
				|  |  | +        >查询
 | 
	
		
			
				|  |  | +      </el-button>
 | 
	
		
			
				|  |  |        <el-button icon="Printer" type="success" @click="printInfo"
 | 
	
		
			
				|  |  | -        >打印</el-button
 | 
	
		
			
				|  |  | -      >
 | 
	
		
			
				|  |  | +        >打印
 | 
	
		
			
				|  |  | +      </el-button>
 | 
	
		
			
				|  |  |      </header>
 | 
	
		
			
				|  |  |      <div class="layout_main">
 | 
	
		
			
				|  |  |        <el-scrollbar
 | 
	
	
		
			
				|  | @@ -148,6 +148,7 @@
 | 
	
		
			
				|  |  |                </tr>
 | 
	
		
			
				|  |  |                <tr>
 | 
	
		
			
				|  |  |                  <th style="width: 10%; height: 27px">医嘱名称</th>
 | 
	
		
			
				|  |  | +                <th></th>
 | 
	
		
			
				|  |  |                  <th>剂量</th>
 | 
	
		
			
				|  |  |                  <th>总量</th>
 | 
	
		
			
				|  |  |                  <th>给药方式</th>
 | 
	
	
		
			
				|  | @@ -177,6 +178,9 @@
 | 
	
		
			
				|  |  |                  <td v-if="item.showFlag == 1" style="width: 20%">
 | 
	
		
			
				|  |  |                    {{ item.orderName }}
 | 
	
		
			
				|  |  |                  </td>
 | 
	
		
			
				|  |  | +                <td v-if="item.showFlag == 1" style="width: 2%; color: red">
 | 
	
		
			
				|  |  | +                  {{ item.orderGroup }}
 | 
	
		
			
				|  |  | +                </td>
 | 
	
		
			
				|  |  |                  <td v-if="item.showFlag == 1" style="width: 8%">
 | 
	
		
			
				|  |  |                    {{ item.dose ? item.dose : "" }}
 | 
	
		
			
				|  |  |                  </td>
 | 
	
	
		
			
				|  | @@ -239,6 +243,7 @@
 | 
	
		
			
				|  |  |                  <th style="height: 27px; border-left: 1px solid black">
 | 
	
		
			
				|  |  |                    医嘱名称
 | 
	
		
			
				|  |  |                  </th>
 | 
	
		
			
				|  |  | +                <th></th>
 | 
	
		
			
				|  |  |                  <th>剂量</th>
 | 
	
		
			
				|  |  |                  <th>给药方式</th>
 | 
	
		
			
				|  |  |                  <th>频率</th>
 | 
	
	
		
			
				|  | @@ -271,6 +276,9 @@
 | 
	
		
			
				|  |  |                  >
 | 
	
		
			
				|  |  |                    {{ item.orderName }}
 | 
	
		
			
				|  |  |                  </td>
 | 
	
		
			
				|  |  | +                <td v-if="item.showFlag == 1" style="width: 2%; color: red">
 | 
	
		
			
				|  |  | +                  {{ item.orderGroup }}
 | 
	
		
			
				|  |  | +                </td>
 | 
	
		
			
				|  |  |                  <td v-if="item.showFlag == 1" style="width: 10%">
 | 
	
		
			
				|  |  |                    {{ item.dose ? item.dose : "" }}
 | 
	
		
			
				|  |  |                  </td>
 | 
	
	
		
			
				|  | @@ -343,7 +351,7 @@
 | 
	
		
			
				|  |  |    </el-dialog>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -<script setup lang="ts" name="PrintExecuteItem">
 | 
	
		
			
				|  |  | +<script setup lang="ts">
 | 
	
		
			
				|  |  |  import { computed, onMounted, ref } from "vue";
 | 
	
		
			
				|  |  |  import { getFormatDatetime, getDiffDays } from "@/utils/date";
 | 
	
		
			
				|  |  |  import { getAllWards } from "@/api/zhu-yuan-yi-sheng/resident-doctor";
 | 
	
	
		
			
				|  | @@ -352,10 +360,12 @@ import {
 | 
	
		
			
				|  |  |    queryExecuteItem,
 | 
	
		
			
				|  |  |    updateExecuteItemPrintFlag,
 | 
	
		
			
				|  |  |  } from "@/api/medical-advice/excute-item";
 | 
	
		
			
				|  |  | -import ItemClass from "@/components/medical-advice/ItemClass";
 | 
	
		
			
				|  |  | +import ItemClass from "@/components/medical-advice/ItemClass.vue";
 | 
	
		
			
				|  |  |  import { getLodop, initLodop } from "@/utils/c-lodop";
 | 
	
		
			
				|  |  |  import { getWindowSize } from "@/utils/window-size";
 | 
	
		
			
				|  |  |  import { findSelfBuysName } from "@/data/yz-selfbuy";
 | 
	
		
			
				|  |  | +import XEUtils from "xe-utils";
 | 
	
		
			
				|  |  | +import { yzDataToTree } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  const queryParam = ref({
 | 
	
		
			
				|  |  |    wardCode: "",
 | 
	
	
		
			
				|  | @@ -424,11 +434,48 @@ function reverseArray(arr) {
 | 
	
		
			
				|  |  |    return newArr;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +type PatientInfo = {
 | 
	
		
			
				|  |  | +  actOrderNo: string;
 | 
	
		
			
				|  |  | +  parentNo: string | null;
 | 
	
		
			
				|  |  | +  occTime: string;
 | 
	
		
			
				|  |  | +  inpatientNo: string;
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +function handleSort(value: PatientInfo[]) {
 | 
	
		
			
				|  |  | +  const currentPatientInfo: {
 | 
	
		
			
				|  |  | +    [key: string]: {
 | 
	
		
			
				|  |  | +      info: PatientInfo;
 | 
	
		
			
				|  |  | +      list: PatientInfo[];
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +  } = {};
 | 
	
		
			
				|  |  | +  XEUtils.arrayEach(value, (item, index) => {
 | 
	
		
			
				|  |  | +    item.inpatientNo = item.inpatientNo.trim();
 | 
	
		
			
				|  |  | +    if (item.actOrderNo == null) {
 | 
	
		
			
				|  |  | +      currentPatientInfo["zy" + item.inpatientNo] = {
 | 
	
		
			
				|  |  | +        info: item,
 | 
	
		
			
				|  |  | +        list: [],
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +    } else {
 | 
	
		
			
				|  |  | +      currentPatientInfo["zy" + item.inpatientNo].list.push(item);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  });
 | 
	
		
			
				|  |  | +  const tmp = [];
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  for (let key in currentPatientInfo) {
 | 
	
		
			
				|  |  | +    const item = currentPatientInfo[key];
 | 
	
		
			
				|  |  | +    const data = yzDataToTree(item.list, { childIcon: "┛", parentIcon: "┓" });
 | 
	
		
			
				|  |  | +    tmp.push(item.info);
 | 
	
		
			
				|  |  | +    tmp.push(...data);
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  return tmp;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  const itemClassRef = ref(null);
 | 
	
		
			
				|  |  |  const resData = ref([]);
 | 
	
		
			
				|  |  |  const queryInfo = () => {
 | 
	
		
			
				|  |  |    queryExecuteItem(queryParam.value).then((res: any) => {
 | 
	
		
			
				|  |  | -    resData.value = res;
 | 
	
		
			
				|  |  | +    resData.value = handleSort(res);
 | 
	
		
			
				|  |  | +    console.log(resData.value);
 | 
	
		
			
				|  |  |    });
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  |  
 |