Ejemplo n.º 1
0
</script>
<span class='db fb'><?php 
    echo $vessel->returnPropertys(vesselModelNodeDefine::NAME_CNAME);
    ?>
    [<a class="blue" onclick="if(confirm('确定删除?')==false)return false;" href="/patientcasehistory/emptydata?id=<?php 
    echo $vessel->id;
    ?>
&operationId=<?php 
    echo $operation->id;
    ?>
">清空数据</a>]
</span>
<?php 
    echo $vessel->displayTree(NodeObj::DEPTH_3);
    $i = 1;
    foreach (vesselNodeDefine::returnTypeRef() as $key => $item) {
        if (false == in_array($item, $fildVesselNodes)) {
            echo '<span class="plateNodeDefine">斑块部位:<span>' . $item . '</span><span class="pl5">' . '<input onBlur="autoSubmit();" type="text" name=nodeInfo[add][' . $vessel->id . '][plate][' . $i . '][persent] value="" class="w60 keyboard_3">%' . '<input class="ml5" type="checkbox" onclick=checkBox("' . $i . '_isptca"); > 是否PTCA ' . '<input class="ml5" type="checkbox" onclick=checkBox("' . $i . '_issupport"); > 是否支架 ' . '</span>' . '添加支架' . '</span>' . '<input type=hidden name=nodeInfo[add][' . $vessel->id . '][plate][' . $i . '][station] value="' . $item . '">' . '<input type=hidden id="' . $i . '_isptca" name=nodeInfo[add][' . $vessel->id . '][plate][' . $i . '][isptca] value="0">' . '<input type=hidden id="' . $i . '_issupport" name=nodeInfo[add][' . $vessel->id . '][plate][' . $i . '][issupport] value="0">';
            $i++;
        }
    }
    echo '<span></span><hr class="mt10">';
}
?>
<p class="addBlood">
<input type="submit" value="提交" class="blueBtn">
<button class="blue f12" onclick='window.open("/patientcasehistory/displayvessel","_blank", "width=500, height=400,left=500,top=200, toolbar=0, scrollbar=0, resize=0");' target='_blank'>添加血管</button>
<button class="blue f12" onclick='window.open("/patientcasehistory/showaddsupportbrand","_blank", "width=500, height=400,left=500,top=200, toolbar=0, scrollbar=0, resize=0");' target='_blank'>添加支架</button>
<?php 
if ($vessel instanceof NodeObj) {
}
 public function displayTree($request, $response)
 {
     /*{{{*/
     $response->operation = DAL::get()->find('NodeObj', $request->operationId, true);
     $response->customer = $response->operation->parentNode;
     $response->vessel = '';
     $vesselEnameList = array();
     $allValidVessels = $response->operation->childNodes;
     foreach ($allValidVessels as $validVessel) {
         $vesselEnameList[] = $validVessel->returnPropertys('ename');
     }
     $response->vesselEnameList = $vesselEnameList;
     $response->operationDesc = NodeClient::getInstance()->descOperation($response->operation->id);
     $fildVesselNodes = array();
     if ($request->ename) {
         $vessels = $response->operation->childNodes;
         foreach ($vessels as $vessel) {
             $nodepropertys = $vessel->nodepropertys;
             foreach ($nodepropertys as $nodeproperty) {
                 if ($nodeproperty->value == $request->ename) {
                     $response->vessel = $vessel;
                 }
             }
         }
         if (false == $response->vessel) {
             $vesselId = NodeClient::getInstance()->addNodes(NodeObj::NODE_DEFINE_VESSEL, NodeObj::SOURCE_NFS, array('ename' => $request->ename, 'cname' => $request->cname, 'goodness' => 'unkonw', 'other' => ''), $response->operation->id);
             $response->vessel = DAL::get()->find('NodeObj', $vesselId);
         }
         foreach ($response->vessel->childNodes as $vesselNode) {
             if (in_array($vesselNode->returnPropertys('station'), vesselNodeDefine::returnTypeRef())) {
                 $fildVesselNodes[] = $vesselNode->returnPropertys('station');
             }
         }
     }
     $response->fildVesselNodes = $fildVesselNodes;
     $response->vesselModelRoot = DAL::get()->find_by_nodeName('NodeObj', NodeObj::NODE_DEFINE_VESSELMODELROOT);
 }