|
@@ -28,7 +28,7 @@
|
|
</ul>
|
|
</ul>
|
|
<div class="tab-content">
|
|
<div class="tab-content">
|
|
<!-- 需要隐藏的div -->
|
|
<!-- 需要隐藏的div -->
|
|
- <div id="tab-1" class="tab-pane active">
|
|
|
|
|
|
+ <div id="tab-1" class="tab-pane active">
|
|
<form class="form-horizontal" id="form-server-edit1" >
|
|
<form class="form-horizontal" id="form-server-edit1" >
|
|
<input type="hidden" id="id" name="id" th:value="${id}">
|
|
<input type="hidden" id="id" name="id" th:value="${id}">
|
|
<div class="row">
|
|
<div class="row">
|
|
@@ -257,11 +257,11 @@
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
- <div id="tab-2" class="tab-pane">
|
|
|
|
- <form class="form-horizontal" id="form-server-edit">
|
|
|
|
- <input type="hidden" id="id2" name="id" th:value="${id}">
|
|
|
|
|
|
+ <div id="tab-2" class="tab-pane">
|
|
|
|
+ <form class="form-horizontal" id="form-server-edit">
|
|
|
|
+ <input type="hidden" id="id2" name="id" th:value="${id}">
|
|
<input type="hidden" id="basicInformation" name="basicInformation" value="true">
|
|
<input type="hidden" id="basicInformation" name="basicInformation" value="true">
|
|
- <div class="panel-body">
|
|
|
|
|
|
+ <div class="panel-body">
|
|
<ul class="nav nav-tabs" id="myTabs">
|
|
<ul class="nav nav-tabs" id="myTabs">
|
|
<li class="active"><a data-toggle="tab" href="#tab-21" aria-expanded="true"> 基础信息</a>
|
|
<li class="active"><a data-toggle="tab" href="#tab-21" aria-expanded="true"> 基础信息</a>
|
|
</li>
|
|
</li>
|
|
@@ -278,7 +278,7 @@
|
|
<li class=""><a data-toggle="tab" href="#tab-27" aria-expanded="false">其他信息</a>
|
|
<li class=""><a data-toggle="tab" href="#tab-27" aria-expanded="false">其他信息</a>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
<div id="tab-21" class="tab-pane fade in active">
|
|
<div id="tab-21" class="tab-pane fade in active">
|
|
<div class="panel-body">
|
|
<div class="panel-body">
|
|
<strong>基础信息</strong>
|
|
<strong>基础信息</strong>
|
|
@@ -311,12 +311,12 @@
|
|
<label class="col-sm-1 control-label is-required">保险:</label>
|
|
<label class="col-sm-1 control-label is-required">保险:</label>
|
|
<div class="col-sm-9" >
|
|
<div class="col-sm-9" >
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
- <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_bxlx')}">
|
|
|
|
|
|
+ <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_bxlx')}" id="targetInsuranceDiv">
|
|
|
|
|
|
<label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
<label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
<input type="checkbox" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" name="insurance2" id="insurance2">
|
|
<input type="checkbox" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" name="insurance2" id="insurance2">
|
|
</label>
|
|
</label>
|
|
- <input type="hidden" id="insuranceValue2" name="insuranceValue">
|
|
|
|
|
|
+ <input type="hidden" id="insuranceValue2" name="insuranceValue" value="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="error-message" id="insurance-error">请选择至少一项保险</div>
|
|
<div class="error-message" id="insurance-error">请选择至少一项保险</div>
|
|
@@ -361,8 +361,8 @@
|
|
<label class="col-sm-1 control-label">心率:</label>
|
|
<label class="col-sm-1 control-label">心率:</label>
|
|
<div class="col-sm-3" >
|
|
<div class="col-sm-3" >
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
- <select name="heartRate" class="styled-input" th:with="type=${@dict.getType('sys_yes_no')}" style="width: 300px;">
|
|
|
|
- <option value="">请选择</option>
|
|
|
|
|
|
+ <select name="heartRate" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_ysfw_xl')}" style="width: 300px;" placeholder="请选择心率">
|
|
|
|
+ <option value="">请选择心率</option>
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
th:selected="${dict.dictLabel}==${heartRate}"></option>
|
|
th:selected="${dict.dictLabel}==${heartRate}"></option>
|
|
</select>
|
|
</select>
|
|
@@ -371,7 +371,7 @@
|
|
<label class="col-sm-1 control-label">血压:</label>
|
|
<label class="col-sm-1 control-label">血压:</label>
|
|
<div class="col-sm-3" >
|
|
<div class="col-sm-3" >
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
- <select name="bloodPressureStatus" class="styled-input" th:with="type=${@dict.getType('sys_yes_no')}" style="width: 300px;">
|
|
|
|
|
|
+ <select name="bloodPressureStatus" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_ysfw_xueya')}" style="width: 300px;">
|
|
<option value="">请选择</option>
|
|
<option value="">请选择</option>
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
th:selected="${dict.dictLabel}==${bloodPressureStatus}"></option>
|
|
th:selected="${dict.dictLabel}==${bloodPressureStatus}"></option>
|
|
@@ -384,23 +384,27 @@
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-12">
|
|
<div class="col-sm-12">
|
|
<label class="col-sm-1 control-label">吸烟史:</label>
|
|
<label class="col-sm-1 control-label">吸烟史:</label>
|
|
- <div class="col-sm-3" >
|
|
|
|
|
|
+ <div class="col-sm-5" >
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
- <div class="input-group" th:with="type=${@dict.getType('sys_yes_no')}">
|
|
|
|
|
|
+ <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_xys')}">
|
|
<label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
<label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
<input type="radio" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${smokingHistory}" name="smokingHistory" ></label>
|
|
<input type="radio" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${smokingHistory}" name="smokingHistory" ></label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<label class="col-sm-1 control-label">饮酒史:</label>
|
|
<label class="col-sm-1 control-label">饮酒史:</label>
|
|
- <div class="col-sm-3" >
|
|
|
|
|
|
+ <div class="col-sm-5" >
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
- <div class="input-group" th:with="type=${@dict.getType('sys_yes_no')}">
|
|
|
|
|
|
+ <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_yjs')}">
|
|
<label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
<label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
<input type="radio" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${drinkingHistory}" name="drinkingHistory" ></label>
|
|
<input type="radio" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${drinkingHistory}" name="drinkingHistory" ></label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ <div class="col-sm-12">
|
|
|
|
+
|
|
<label class="col-sm-1 control-label">运动习惯:</label>
|
|
<label class="col-sm-1 control-label">运动习惯:</label>
|
|
<div class="col-sm-3" >
|
|
<div class="col-sm-3" >
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
@@ -410,7 +414,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
<div class="col-sm-12">
|
|
<div class="col-sm-12">
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -420,18 +424,21 @@
|
|
<div class="col-sm-12">
|
|
<div class="col-sm-12">
|
|
<label class="col-sm-1 control-label">饮食偏好:</label>
|
|
<label class="col-sm-1 control-label">饮食偏好:</label>
|
|
<div class="col-sm-4" >
|
|
<div class="col-sm-4" >
|
|
- <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_bxlx')}">
|
|
|
|
|
|
+ <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_ysph')}" id="dietaryPreferenceDiv">
|
|
<label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
<label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
- <input type="checkbox" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:checked="${dict.dictLabel}==${dietaryPreference}" name="dietaryPreference" ></label>
|
|
|
|
|
|
+ <input type="checkbox" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${dietaryPreference}" name="dietaryPreference" id="dietaryPreference"></label>
|
|
</div>
|
|
</div>
|
|
|
|
+ <input type="hidden" id="dietaryPreference2" name="dietaryPreferenceValue" value="">
|
|
</div>
|
|
</div>
|
|
<label class="col-sm-1 control-label">睡眠状况:</label>
|
|
<label class="col-sm-1 control-label">睡眠状况:</label>
|
|
<div class="col-sm-5" >
|
|
<div class="col-sm-5" >
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
- <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_bxlx')}">
|
|
|
|
|
|
+ <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_smzk')}" id="sleepConditionDiv">
|
|
<label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
<label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
- <input type="checkbox" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:checked="${dict.dictLabel}==${sleepCondition}" name="sleepCondition" ></label>
|
|
|
|
|
|
+ <input type="checkbox" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${sleepCondition}" name="sleepCondition" id="sleepCondition">
|
|
|
|
+ </label>
|
|
</div>
|
|
</div>
|
|
|
|
+ <input type="hidden" id="sleepCondition2" name="sleepConditionValue" value="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -477,7 +484,7 @@
|
|
<label class="col-sm-1 control-label is-required">病理分期:</label>
|
|
<label class="col-sm-1 control-label is-required">病理分期:</label>
|
|
<div class="col-sm-3" >
|
|
<div class="col-sm-3" >
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
- <select name="pathologicalStage" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_ysfw_mbzllx')}" style="width: 300px;" required>
|
|
|
|
|
|
+ <select name="pathologicalStage" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_ysfw_blfq')}" style="width: 300px;" required>
|
|
<option value="">请选择</option>
|
|
<option value="">请选择</option>
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
th:selected="${dict.dictLabel}==${pathologicalStage}"></option>
|
|
th:selected="${dict.dictLabel}==${pathologicalStage}"></option>
|
|
@@ -487,11 +494,11 @@
|
|
<label class="col-sm-1 control-label is-required">治疗分期:</label>
|
|
<label class="col-sm-1 control-label is-required">治疗分期:</label>
|
|
<div class="col-sm-3" >
|
|
<div class="col-sm-3" >
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
- <select name="treatmentStage" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_ysfw_mbzllx')}" style="width: 300px;" required>
|
|
|
|
- <option value="">请选择</option>
|
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
|
- th:selected="${dict.dictLabel}==${treatmentStage}"></option>
|
|
|
|
- </select>
|
|
|
|
|
|
+ <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_zlfq')}">
|
|
|
|
+ <label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
|
|
+ <input type="radio" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${treatmentStage}" name="treatmentStage" required></label>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -564,7 +571,7 @@
|
|
<label class="col-sm-1 control-label">疾病史:</label>
|
|
<label class="col-sm-1 control-label">疾病史:</label>
|
|
<div class="col-sm-3" >
|
|
<div class="col-sm-3" >
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
- <select name="medicalHistory" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_ysfw_bxlx')}" style="width: 300px;">
|
|
|
|
|
|
+ <select name="medicalHistory" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_ysfw_jibinshi')}" style="width: 300px;">
|
|
<option value="">请选择</option>
|
|
<option value="">请选择</option>
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
th:selected="${dict.dictLabel}==${medicalHistory}"></option>
|
|
th:selected="${dict.dictLabel}==${medicalHistory}"></option>
|
|
@@ -581,7 +588,7 @@
|
|
<label class="col-sm-1 control-label">传染病史:</label>
|
|
<label class="col-sm-1 control-label">传染病史:</label>
|
|
<div class="col-sm-3" >
|
|
<div class="col-sm-3" >
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
- <select name="infectiousDiseaseHistory" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_ysfw_bxlx')}" style="width: 300px;">
|
|
|
|
|
|
+ <select name="infectiousDiseaseHistory" class="styled-input" th:with="type=${@dict.getType('sys_select_dtp_ysfw_crbs')}" style="width: 300px;">
|
|
<option value="">请选择</option>
|
|
<option value="">请选择</option>
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
th:selected="${dict.dictLabel}==${infectiousDiseaseHistory}"></option>
|
|
th:selected="${dict.dictLabel}==${infectiousDiseaseHistory}"></option>
|
|
@@ -695,16 +702,18 @@
|
|
<div id="tab-25" class="tab-pane fade in active">
|
|
<div id="tab-25" class="tab-pane fade in active">
|
|
<div class="panel-body">
|
|
<div class="panel-body">
|
|
<strong>治疗手段</strong>
|
|
<strong>治疗手段</strong>
|
|
|
|
+ <div class="form-group">
|
|
<div class="row">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="col-sm-12">
|
|
<label class="col-sm-1 control-label">多个治疗方案原因描述:</label>
|
|
<label class="col-sm-1 control-label">多个治疗方案原因描述:</label>
|
|
- <div class="col-sm-11" >
|
|
|
|
|
|
+ <div class="col-sm-11">
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
<textarea id="multipleTreatmentReasonsDescription" name="multipleTreatmentReasonsDescription" placeholder="治疗方案原因描述" rows="5" cols="185" th:text="${multipleTreatmentReasonsDescription}"></textarea>
|
|
<textarea id="multipleTreatmentReasonsDescription" name="multipleTreatmentReasonsDescription" placeholder="治疗方案原因描述" rows="5" cols="185" th:text="${multipleTreatmentReasonsDescription}"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="tab-26" class="tab-pane fade in active">
|
|
<div id="tab-26" class="tab-pane fade in active">
|
|
@@ -781,8 +790,8 @@
|
|
</div>
|
|
</div>
|
|
<div id="tab-27" class="tab-pane fade in active">
|
|
<div id="tab-27" class="tab-pane fade in active">
|
|
<div class="panel-body">
|
|
<div class="panel-body">
|
|
- <strong>其他信息</strong>
|
|
|
|
- <div class="row">
|
|
|
|
|
|
+ <strong>其他信息</strong>
|
|
|
|
+ <div class="form-group">
|
|
<div class="col-sm-12">
|
|
<div class="col-sm-12">
|
|
<label class="col-sm-1 control-label">联系人:</label>
|
|
<label class="col-sm-1 control-label">联系人:</label>
|
|
<div class="col-sm-11" >
|
|
<div class="col-sm-11" >
|
|
@@ -863,27 +872,25 @@
|
|
<button type="button" data-toggle="modal" data-target="#myModal3">新增</button>
|
|
<button type="button" data-toggle="modal" data-target="#myModal3">新增</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="row">
|
|
|
|
- <div class="col-sm-12">
|
|
|
|
- <label class="col-sm-1 control-label">陪护人:</label>
|
|
|
|
- <div class="col-sm-11" >
|
|
|
|
- <div class="input-group">
|
|
|
|
- <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_phr')}">
|
|
|
|
- <label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
|
|
- <input type="checkbox" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${caregiver}" name="caregiver" id="caregiver"></label>
|
|
|
|
|
|
+ <div class="col-sm-12">
|
|
|
|
+ <label class="col-sm-1 control-label">陪护人:</label>
|
|
|
|
+ <div class="col-sm-11" >
|
|
|
|
+ <div class="form-group">
|
|
|
|
+ <div class="input-group" th:with="type=${@dict.getType('sys_select_dtp_ysfw_phr')}" id="caregiverDiv">
|
|
|
|
+ <label class="checkbox-inline check-box" th:each="dict : ${type}" >
|
|
|
|
+ <input type="checkbox" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${caregiver}" name="caregiver" id="caregiver">
|
|
|
|
+ </label>
|
|
|
|
+ </div>
|
|
|
|
+ <input type="hidden" id="caregiver2" name="caregiverValue" value="">
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- </form>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
<div id="tab-3" class="tab-pane">
|
|
<div id="tab-3" class="tab-pane">
|
|
<div class="panel-body">
|
|
<div class="panel-body">
|
|
<strong>用药购药</strong>
|
|
<strong>用药购药</strong>
|
|
@@ -1108,12 +1115,57 @@
|
|
inputsToDisable.forEach(function(input) {
|
|
inputsToDisable.forEach(function(input) {
|
|
formData.delete(input.name);
|
|
formData.delete(input.name);
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ // 获取指定的 div
|
|
|
|
+ var targetInsuranceDiv = document.getElementById('targetInsuranceDiv');//基础表单 保险
|
|
|
|
+ var sleepConditionDiv = document.getElementById('sleepConditionDiv');//基础表单 睡眠状况
|
|
|
|
+ var dietaryPreferenceDiv = document.getElementById('dietaryPreferenceDiv');//基础表单 饮食偏好
|
|
|
|
+ var caregiverDiv = document.getElementById('caregiverDiv');//基础表单 陪护人
|
|
|
|
+
|
|
// 获取所有 class 为 icheckbox-blue 并且包含 checked 类的 div
|
|
// 获取所有 class 为 icheckbox-blue 并且包含 checked 类的 div
|
|
- var divs = document.querySelectorAll('.icheckbox-blue.checked');
|
|
|
|
|
|
+ var InsuranceDivs = targetInsuranceDiv.querySelectorAll('.icheckbox-blue.checked');
|
|
|
|
+ var sleepConditionDivs = sleepConditionDiv.querySelectorAll('.icheckbox-blue.checked');
|
|
|
|
+ var dietaryPreferenceDivs = dietaryPreferenceDiv.querySelectorAll('.icheckbox-blue.checked');
|
|
|
|
+ var caregiverDivs = caregiverDiv.querySelectorAll('.icheckbox-blue.checked');
|
|
var checkedValues = [];
|
|
var checkedValues = [];
|
|
-
|
|
|
|
|
|
+ var sleepConditionCheckedValues = [];
|
|
|
|
+ var dietaryPreferenceCheckedValues = [];
|
|
|
|
+ var caregiverCheckedValues = [];
|
|
|
|
+ if (sleepConditionDivs.length > 0) {
|
|
|
|
+ // 遍历所有符合条件的 div
|
|
|
|
+ sleepConditionDivs.forEach(function(div) {
|
|
|
|
+ // 获取 div 内部的复选框
|
|
|
|
+ var checkbox = div.querySelector('input[type="checkbox"]');
|
|
|
|
+ if (checkbox) {
|
|
|
|
+ // 如果复选框被选中,将其值添加到数组中
|
|
|
|
+ sleepConditionCheckedValues.push(checkbox.value);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ if (dietaryPreferenceDivs.length > 0) {
|
|
|
|
+ // 遍历所有符合条件的 div
|
|
|
|
+ dietaryPreferenceDivs.forEach(function(div) {
|
|
|
|
+ // 获取 div 内部的复选框
|
|
|
|
+ var checkbox = div.querySelector('input[type="checkbox"]');
|
|
|
|
+ if (checkbox) {
|
|
|
|
+ // 如果复选框被选中,将其值添加到数组中
|
|
|
|
+ dietaryPreferenceCheckedValues.push(checkbox.value);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ if (caregiverDivs.length > 0) {
|
|
|
|
+ // 遍历所有符合条件的 div
|
|
|
|
+ caregiverDivs.forEach(function(div) {
|
|
|
|
+ // 获取 div 内部的复选框
|
|
|
|
+ var checkbox = div.querySelector('input[type="checkbox"]');
|
|
|
|
+ if (checkbox) {
|
|
|
|
+ // 如果复选框被选中,将其值添加到数组中
|
|
|
|
+ caregiverCheckedValues.push(checkbox.value);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
// 遍历所有符合条件的 div
|
|
// 遍历所有符合条件的 div
|
|
- divs.forEach(function(div) {
|
|
|
|
|
|
+ InsuranceDivs.forEach(function(div) {
|
|
// 获取 div 内部的复选框
|
|
// 获取 div 内部的复选框
|
|
var checkbox = div.querySelector('input[type="checkbox"]');
|
|
var checkbox = div.querySelector('input[type="checkbox"]');
|
|
if (checkbox) {
|
|
if (checkbox) {
|
|
@@ -1121,13 +1173,12 @@
|
|
checkedValues.push(checkbox.value);
|
|
checkedValues.push(checkbox.value);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- if (divs.length === 0) {
|
|
|
|
|
|
+ if (InsuranceDivs.length === 0) {
|
|
$('#insurance-error').show();
|
|
$('#insurance-error').show();
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
$('#insurance-error').hide();
|
|
$('#insurance-error').hide();
|
|
}
|
|
}
|
|
-
|
|
|
|
if (checkedValues) {
|
|
if (checkedValues) {
|
|
// 将选中的值合并成一个字符串
|
|
// 将选中的值合并成一个字符串
|
|
var combinedValue = checkedValues.join(',');
|
|
var combinedValue = checkedValues.join(',');
|
|
@@ -1137,19 +1188,44 @@
|
|
// 如果没有选中任何值,设置为空字符串
|
|
// 如果没有选中任何值,设置为空字符串
|
|
$('#insuranceValue2').val('');
|
|
$('#insuranceValue2').val('');
|
|
}
|
|
}
|
|
- // var combinedValue = checkedValues.join(',');
|
|
|
|
- // $('#insuranceValue2').val(combinedValue);
|
|
|
|
-
|
|
|
|
- var valuexx= $('#insuranceValue2').val();
|
|
|
|
- console.log(valuexx)
|
|
|
|
|
|
+ if (sleepConditionCheckedValues) {
|
|
|
|
+ // 将选中的值合并成一个字符串
|
|
|
|
+ var sleepCondition = sleepConditionCheckedValues.join(',');
|
|
|
|
+ // 设置隐藏字段的值
|
|
|
|
+ $('#sleepCondition2').val(sleepCondition);
|
|
|
|
+ } else {
|
|
|
|
+ // 如果没有选中任何值,设置为空字符串
|
|
|
|
+ $('#sleepCondition2').val('');
|
|
|
|
+ }
|
|
|
|
+ if (dietaryPreferenceCheckedValues) {
|
|
|
|
+ // 将选中的值合并成一个字符串
|
|
|
|
+ var dietaryPreference = dietaryPreferenceCheckedValues.join(',');
|
|
|
|
+ // 设置隐藏字段的值
|
|
|
|
+ $('#dietaryPreference2').val(dietaryPreference);
|
|
|
|
+ } else {
|
|
|
|
+ // 如果没有选中任何值,设置为空字符串
|
|
|
|
+ $('#dietaryPreference2').val('');
|
|
|
|
+ }
|
|
|
|
+ if (caregiverCheckedValues) {
|
|
|
|
+ // 将选中的值合并成一个字符串
|
|
|
|
+ var caregiver = caregiverCheckedValues.join(',');
|
|
|
|
+ // 设置隐藏字段的值
|
|
|
|
+ $('#caregiver2').val(caregiver);
|
|
|
|
+ } else {
|
|
|
|
+ // 如果没有选中任何值,设置为空字符串
|
|
|
|
+ $('#caregiver2').val('');
|
|
|
|
+ }
|
|
if ($.validate.form("form-server-edit")) {
|
|
if ($.validate.form("form-server-edit")) {
|
|
var data = $("#form-server-edit").serializeArray();
|
|
var data = $("#form-server-edit").serializeArray();
|
|
// 获取 textarea 的值
|
|
// 获取 textarea 的值
|
|
var textareaValue = document.getElementById('multipleTreatmentReasonsDescription').value;
|
|
var textareaValue = document.getElementById('multipleTreatmentReasonsDescription').value;
|
|
data.push({name:"multipleTreatmentReasonsDescription",value:textareaValue})
|
|
data.push({name:"multipleTreatmentReasonsDescription",value:textareaValue})
|
|
|
|
+ // 获取 caregiver2 的值
|
|
|
|
+ var caregiver2 = document.getElementById('caregiver2').value;
|
|
|
|
+ data.push({name:"caregiverValue",value:caregiver2})
|
|
|
|
+
|
|
// 遍历 data 数组,查找 realNameStatus flipStatus 字段
|
|
// 遍历 data 数组,查找 realNameStatus flipStatus 字段
|
|
var realNameStatus = null;
|
|
var realNameStatus = null;
|
|
- var flipStatus = null;
|
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
for (var i = 0; i < data.length; i++) {
|
|
if (data[i].name === 'realNameStatus') {
|
|
if (data[i].name === 'realNameStatus') {
|
|
realNameStatus = data[i].value;
|
|
realNameStatus = data[i].value;
|
|
@@ -1165,7 +1241,7 @@
|
|
const rowshbs = [];//患病史table
|
|
const rowshbs = [];//患病史table
|
|
$('#familyHistoryTableBody tr').each(function () {
|
|
$('#familyHistoryTableBody tr').each(function () {
|
|
const row = {
|
|
const row = {
|
|
- patient_archive_id: $("#id").val(),
|
|
|
|
|
|
+ archiveId: $("#id").val(),
|
|
disease: $(this).find('td:eq(1)').text(),
|
|
disease: $(this).find('td:eq(1)').text(),
|
|
member: $(this).find('td:eq(2)').text(),
|
|
member: $(this).find('td:eq(2)').text(),
|
|
};
|
|
};
|
|
@@ -1177,9 +1253,9 @@
|
|
const rowsRcords = [];//用药情况table
|
|
const rowsRcords = [];//用药情况table
|
|
$('#yyqkTableBody tr').each(function () {
|
|
$('#yyqkTableBody tr').each(function () {
|
|
const row = {
|
|
const row = {
|
|
- patient_archive_id: $("#id").val(),
|
|
|
|
- medication_description: $(this).find('td:eq(1)').text(),
|
|
|
|
- medication_type: $(this).find('td:eq(2)').text(),
|
|
|
|
|
|
+ archiveId: $("#id").val(),
|
|
|
|
+ medicationDescription: $(this).find('td:eq(1)').text(),
|
|
|
|
+ medicationType: $(this).find('td:eq(2)').text(),
|
|
};
|
|
};
|
|
rowsRcords.push(row);
|
|
rowsRcords.push(row);
|
|
});
|
|
});
|
|
@@ -1189,7 +1265,7 @@
|
|
const rowslxr = [];//联系人table
|
|
const rowslxr = [];//联系人table
|
|
$('#relationTableBody tr').each(function () {
|
|
$('#relationTableBody tr').each(function () {
|
|
const row = {
|
|
const row = {
|
|
- patient_archive_id: $("#id").val(),
|
|
|
|
|
|
+ archiveId: $("#id").val(),
|
|
contactPhone: $(this).find('td:eq(1)').text(),
|
|
contactPhone: $(this).find('td:eq(1)').text(),
|
|
contactName: $(this).find('td:eq(2)').text(),
|
|
contactName: $(this).find('td:eq(2)').text(),
|
|
contactRelationship: $(this).find('td:eq(3)').text()
|
|
contactRelationship: $(this).find('td:eq(3)').text()
|
|
@@ -1243,7 +1319,6 @@
|
|
// 获取当前点击的选项卡链接
|
|
// 获取当前点击的选项卡链接
|
|
var $this = $(this);
|
|
var $this = $(this);
|
|
var x = document.getElementById("content-main");
|
|
var x = document.getElementById("content-main");
|
|
- var hiddenDiv = document.getElementById("hiddenDiv");
|
|
|
|
if($this.attr('href') === '#tab-1'){
|
|
if($this.attr('href') === '#tab-1'){
|
|
formSubmitted=true;
|
|
formSubmitted=true;
|
|
}
|
|
}
|
|
@@ -1262,7 +1337,7 @@
|
|
} else {
|
|
} else {
|
|
x.style.display = "block";
|
|
x.style.display = "block";
|
|
}
|
|
}
|
|
- // 初始化时回显已选中的值
|
|
|
|
|
|
+ // 初始化时回显保险已选中的值
|
|
function check(insuranceList) {
|
|
function check(insuranceList) {
|
|
var insurances = insuranceList.split(',');
|
|
var insurances = insuranceList.split(',');
|
|
$.each(insurances, function(index, value) {
|
|
$.each(insurances, function(index, value) {
|
|
@@ -1277,6 +1352,51 @@
|
|
if(insuranceList){
|
|
if(insuranceList){
|
|
check(insuranceList);
|
|
check(insuranceList);
|
|
}
|
|
}
|
|
|
|
+ // 初始化时回显陪护人已选中的值
|
|
|
|
+ function checkCaregiver(caregiverList) {
|
|
|
|
+ var caregiver = caregiverList.split(',');
|
|
|
|
+ $.each(caregiver, function(index, value) {
|
|
|
|
+ var checkbox = $('input[name="caregiver"][value="'+value.trim()+'"]');
|
|
|
|
+ checkbox.append('div class="icheckbox-blue"');
|
|
|
|
+ checkbox.closest('.icheckbox-blue').addClass('checked');
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ /*<![CDATA[*/
|
|
|
|
+ var caregiverList = /*[[${caregiver}]]*/ '';
|
|
|
|
+ /*]]>*/
|
|
|
|
+ if(caregiverList){
|
|
|
|
+ checkCaregiver(caregiverList);
|
|
|
|
+ }
|
|
|
|
+ // 初始化时回显睡眠状况已选中的值
|
|
|
|
+ function checkSleepCondition(sleepConditionList) {
|
|
|
|
+ var sleepCondition = sleepConditionList.split(',');
|
|
|
|
+ $.each(sleepCondition, function(index, value) {
|
|
|
|
+ var checkbox = $('input[name="sleepCondition"][value="'+value.trim()+'"]');
|
|
|
|
+ checkbox.append('div class="icheckbox-blue"');
|
|
|
|
+ checkbox.closest('.icheckbox-blue').addClass('checked');
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ /*<![CDATA[*/
|
|
|
|
+ var sleepConditionList = /*[[${sleepCondition}]]*/ '';
|
|
|
|
+ /*]]>*/
|
|
|
|
+ if(sleepConditionList){
|
|
|
|
+ checkSleepCondition(sleepConditionList);
|
|
|
|
+ }
|
|
|
|
+ // 初始化时回显饮食偏好已选中的值
|
|
|
|
+ function checkDietaryPreference(dietaryPreferenceList) {
|
|
|
|
+ var dietaryPreference = dietaryPreferenceList.split(',');
|
|
|
|
+ $.each(dietaryPreference, function(index, value) {
|
|
|
|
+ var checkbox = $('input[name="dietaryPreference"][value="'+value.trim()+'"]');
|
|
|
|
+ checkbox.append('div class="icheckbox-blue"');
|
|
|
|
+ checkbox.closest('.icheckbox-blue').addClass('checked');
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ /*<![CDATA[*/
|
|
|
|
+ var dietaryPreferenceList = /*[[${dietaryPreference}]]*/ '';
|
|
|
|
+ /*]]>*/
|
|
|
|
+ if(dietaryPreferenceList){
|
|
|
|
+ checkDietaryPreference(dietaryPreferenceList);
|
|
|
|
+ }
|
|
|
|
|
|
});
|
|
});
|
|
});
|
|
});
|
|
@@ -1556,7 +1676,6 @@
|
|
// editButton.textContent = '修改';
|
|
// editButton.textContent = '修改';
|
|
// editButton.onclick = function() { editRow(this);/* 复制逻辑 */ };
|
|
// editButton.onclick = function() { editRow(this);/* 复制逻辑 */ };
|
|
// actionCell.appendChild(editButton);
|
|
// actionCell.appendChild(editButton);
|
|
- //
|
|
|
|
// var copyButton = document.createElement('button');
|
|
// var copyButton = document.createElement('button');
|
|
// copyButton.textContent = '复制';
|
|
// copyButton.textContent = '复制';
|
|
// copyButton.onclick = function() { /* 复制逻辑 */ };
|
|
// copyButton.onclick = function() { /* 复制逻辑 */ };
|