|
@@ -4,7 +4,12 @@
|
|
|
<th:block th:include="include :: header('档案明细')" />
|
|
|
</head>
|
|
|
<style>
|
|
|
-
|
|
|
+ .select2-dropdown {
|
|
|
+ z-index: 9999 !important;
|
|
|
+ }
|
|
|
+ .tabs-container {
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
</style>
|
|
|
<script>
|
|
|
|
|
@@ -15,8 +20,6 @@
|
|
|
<div class="col-sm-12">
|
|
|
<div class="tabs-container">
|
|
|
<ul class="nav nav-tabs" id="myTabs3">
|
|
|
- <!--<li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">基本信息(快速建档信息)</a>
|
|
|
- </li>-->
|
|
|
<li class="active"><a data-toggle="tab" href="#tab-2" aria-expanded="false">首患建档</a>
|
|
|
</li>
|
|
|
<li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false" > 用药购药</a>
|
|
@@ -27,163 +30,6 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="tab-content">
|
|
|
- <!-- 需要隐藏的div -->
|
|
|
- <!--<div id="tab-1" class="tab-pane active">
|
|
|
- <form class="customize-search-form" id="form-server-edit1" >
|
|
|
- <input type="hidden" id="id" name="id" th:value="${id}">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label class="control-label is-required">姓名:</label>
|
|
|
- <input name="name" id="name" placeholder="请输入姓名" class="styled-input edit_inputs" type="text" maxlength="30" th:value="${name}" disabled="true">
|
|
|
- <i class="fa" th:class="${realNameStatus == 1 ? 'fa fa-check' : 'fa fa-close'}" id="checkName" ></i>
|
|
|
-
|
|
|
- <input name="realNameStatus" id="realNameStatus" class="status" type="text" th:value="${realNameStatus == 1 ? '已实名' : (realNameStatus == 0 ? '未实名' : '')}" readonly>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>性别:</label>
|
|
|
- <select name="gender" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_user_sex')}" disabled="true">
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
|
|
|
- th:selected="${dict.dictValue} == ${gender}" ></option>
|
|
|
- </select>
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>出生年月:</label>
|
|
|
- <input name="dateBirth" id="dateBirth" placeholder="出生年月" class="styled-input edit_inputs" type="text" th:value="${dateBirth}" disabled="true">
|
|
|
- <span class="status" style="width: 66px">
|
|
|
- <input name="age" type="text" id="age" th:value="${age}" style="text-align: center;width: 30px;border: none;" readonly>
|
|
|
- 岁
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label class="control-label is-required">手机号:</label>
|
|
|
- <input name="phoneNumber" id="phoneNumber" placeholder="请输入手机号" class="styled-input edit_inputs" type="text" maxlength="30" th:value="${phoneNumber}" required>
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >证件号码:</label>
|
|
|
- <input name="documentType" placeholder="证件类型" class="styled-input short" type="text" th:value="${documentType}" disabled="true">
|
|
|
- <input name="documentNumber" placeholder="请输入证件号码" class="styled-input edit_inputs1" type="text" maxlength="30" th:value="${documentNumber}" disabled="true">
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit select-time">
|
|
|
- <label >首次确诊时间:</label>
|
|
|
- <input name="timeFirstDiagnosis" placeholder="首次确诊时间" class="time-input styled-input edit_inputs" type="text" th:value="${timeFirstDiagnosis}">
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">配送地址:</label>
|
|
|
- <input name="creator" placeholder="配送地址" id="creator" class="styled-input edit_inputs" type="text" th:value="${creator}">
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">联系人手机号:</label>
|
|
|
- <input name="contactPhone" placeholder="联系人手机号" id="contactPhone" class="styled-input edit_inputs" type="text" th:value="${contactPhone}">
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">联系人姓名:</label>
|
|
|
- <input name="contactName" placeholder="联系人姓名" id="contactName" class="styled-input edit_inputs" type="text" th:value="${contactName}">
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <!–<div class="customize-form-group edit">
|
|
|
- <label >社保卡号:</label>
|
|
|
- <input name="socialSecurityCard" placeholder="社保卡号" class="styled-input edit_inputs" type="text" th:value="${socialSecurityCard}">
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >身高:</label>
|
|
|
- <input name="height" id="height" placeholder="请输入身高" class="styled-input edit_inputs" type="number" th:value="${height}">
|
|
|
- <span class="status" style="width: 66px"> cm</span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >体重:</label>
|
|
|
- <input name="weight" id="weight" placeholder="请输入体重" class="styled-input edit_inputs" type="number" th:value="${weight}">
|
|
|
- <span class="status" style="width: 66px"> kg</span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >BMI:</label>
|
|
|
- <input name="BMI" id="BMI" placeholder="BMI值" class="styled-input edit_inputs" type="text" th:value="${BMI}" readonly>
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >民族:</label>
|
|
|
- <select name="nation" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_dtp_ysfw_mz')}">
|
|
|
- <option value="">请选择</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
|
|
|
- th:selected="${dict.dictLabel}==${nation}"></option>
|
|
|
- </select>
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >籍贯:</label>
|
|
|
- <select name="nativePlace" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_dtp_ysfw_jg')}" >
|
|
|
- <option value="">请选择</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
|
|
|
- th:selected="${dict.dictLabel}==${nativePlace}"></option>
|
|
|
- </select>
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >座机号码:</label>
|
|
|
- <input name="landlineNumber" placeholder="请输入座机号码" class="styled-input edit_inputs" type="text" maxlength="30" th:value="${landlineNumber}">
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label class="control-label is-required">慢病肿瘤类型:</label>
|
|
|
- <select name="chronicTumorType" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_dtp_ysfw_mbzllx')}" required>
|
|
|
- <option value="">请选择</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
|
|
|
- th:selected="${dict.dictLabel}==${chronicTumorType}"></option>
|
|
|
- </select>
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit select-time">
|
|
|
- <label >首次确诊时间:</label>
|
|
|
- <input name="timeFirstDiagnosis" placeholder="首次确诊时间" class="time-input styled-input edit_inputs" type="text" th:value="${timeFirstDiagnosis}">
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label class="control-label is-required">疾病类型:</label>
|
|
|
- <select name="diseaseType" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_dtp_ysfw_jblx')}" required>
|
|
|
- <option value="">请选择</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${diseaseType}"></option>
|
|
|
- </select>
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >治疗线收集:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_select_dtp_ysfw_zlxsj')}">
|
|
|
- <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${healingLineCollection}" name="healingLineCollection">
|
|
|
- </div>
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >保险:</label>
|
|
|
- <div class="selected-values" id="selected-values" style="display: none;"></div>
|
|
|
- <select name="insurance" id="insurance" class="noselect2 selectpicker mySelectClass" multiple data-none-selected-text="请选择" th:with="type=${@dict.getType('sys_select_dtp_ysfw_bxlx')}">
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${insurance}"></option>
|
|
|
- </select>
|
|
|
- <input type="hidden" id="insuranceValue" name="insuranceValue" value="">
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >临床诊断:</label>
|
|
|
- <input name="disease" placeholder="请输入临床诊断信息" class="styled-input edit_inputs" type="text" th:value="${disease}">
|
|
|
- <span class="span_line" readonly></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >上翻状态:</label>
|
|
|
- <input name="flipStatus" class="styled-input edit_inputs" id="flipStatus" style="border: none" type="text"
|
|
|
- th:value="${flipStatus == 1 ? '已上翻' : (flipStatus == 2 ? '未上翻' : '')}" disabled readonly>
|
|
|
- <a href="#" onclick="unbound()" style="width: 66px;" id="unboundflipStatus"> 解绑</a>
|
|
|
- </div>–>
|
|
|
- </form>
|
|
|
- </div>-->
|
|
|
<div id="tab-2" class="tab-pane active">
|
|
|
<form class="form-horizontal" id="form-server-edit">
|
|
|
<input type="hidden" id="id2" name="id" th:value="${id}">
|
|
@@ -198,14 +44,6 @@
|
|
|
</li>
|
|
|
<li class=""><a data-toggle="tab" href="#tab-23" aria-expanded="false">慢性疾病情况</a>
|
|
|
</li>
|
|
|
- <!--<li class=""><a data-toggle="tab" href="#tab-24" aria-expanded="false">患病史</a>
|
|
|
- </li>
|
|
|
- <li class=""><a data-toggle="tab" href="#tab-25" aria-expanded="false">治疗手段</a>
|
|
|
- </li>
|
|
|
- <li class=""><a data-toggle="tab" href="#tab-26" aria-expanded="false">用药情况</a>
|
|
|
- </li>
|
|
|
- <li class=""><a data-toggle="tab" href="#tab-27" aria-expanded="false">其他信息</a>-->
|
|
|
- </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div id="tab-20" class="tab-pane fade in active">
|
|
@@ -254,51 +92,58 @@
|
|
|
<span class="span_line" readonly></span>
|
|
|
</div>
|
|
|
<div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">配送地址:</label>
|
|
|
+ <label class="control-label">配送地址:</label>
|
|
|
<input name="addr" placeholder="配送地址" id="addr" class="styled-input edit_inputs" type="text" th:value="${addr}">
|
|
|
<span class="span_line" readonly></span>
|
|
|
</div>
|
|
|
<div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">联系人手机号:</label>
|
|
|
+ <label class="control-label">联系人手机号:</label>
|
|
|
<input name="contactPhone" placeholder="联系人手机号" id="contactPhone" class="styled-input edit_inputs" type="text" th:value="${contactPhone}">
|
|
|
<span class="span_line" readonly></span>
|
|
|
</div>
|
|
|
<div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">联系人姓名:</label>
|
|
|
+ <label class="control-label">联系人姓名:</label>
|
|
|
<input name="contactName" placeholder="联系人姓名" id="contactName" class="styled-input edit_inputs" type="text" th:value="${contactName}">
|
|
|
<span class="span_line" readonly></span>
|
|
|
</div>
|
|
|
- <div class="customize-form-group-container">
|
|
|
- <div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">肿瘤发病部位疾病:</label>
|
|
|
- <select id="category-select1" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">肿瘤治疗并发症与合并症:</label>
|
|
|
- <select id="category-select2" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">风湿免疫疾病名称:</label>
|
|
|
- <select id="category-select3" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">罕见病疾病:</label>
|
|
|
- <select id="category-select4" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">感染类疾病:</label>
|
|
|
- <select id="category-select5" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group">
|
|
|
- <label class="col-sm-1 control-label">临时慢病:</label>
|
|
|
- <select id="category-select6" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
- </select>
|
|
|
- </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="customize-search-form">
|
|
|
+ <div class="customize-form-group">
|
|
|
+ <label class="control-label">肿瘤发病部位疾病:</label>
|
|
|
+ <select id="category-select1" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
+ </select>
|
|
|
+ <span class="span_line" readonly></span>
|
|
|
+ </div>
|
|
|
+ <div class="customize-form-group">
|
|
|
+ <label class="control-label">肿瘤治疗并发症与合并症:</label>
|
|
|
+ <select id="category-select2" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
+ </select>
|
|
|
+ <span class="span_line" readonly></span>
|
|
|
+ </div>
|
|
|
+ <div class="customize-form-group">
|
|
|
+ <label class="control-label">风湿免疫疾病名称:</label>
|
|
|
+ <select id="category-select3" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
+ </select>
|
|
|
+ <span class="span_line" readonly></span>
|
|
|
+ </div>
|
|
|
+ <div class="customize-form-group">
|
|
|
+ <label class="control-label">罕见病疾病:</label>
|
|
|
+ <select id="category-select4" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
+ </select>
|
|
|
+ <span class="span_line" readonly></span>
|
|
|
+ </div>
|
|
|
+ <div class="customize-form-group">
|
|
|
+ <label class="control-label">感染类疾病:</label>
|
|
|
+ <select id="category-select5" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
+ </select>
|
|
|
+ <span class="span_line" readonly></span>
|
|
|
+ </div>
|
|
|
+ <div class="customize-form-group">
|
|
|
+ <label class="control-label">临时慢病:</label>
|
|
|
+ <select id="category-select6" class="styled-input edit_inputs select2-multiple" multiple placeholder="请选择或输入搜索">
|
|
|
+ </select>
|
|
|
+ <span class="span_line" readonly></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -308,7 +153,6 @@
|
|
|
<strong>一般信息、家族史和既往史</strong>
|
|
|
<div class="customize-search-form">
|
|
|
<div class="customize-form-group edit">
|
|
|
- <!--<label class="control-label">身高:</label>--><!-- 这里如果使用<label class="control-label"> 的class 会使用框架中定义的小屏幕的格式 -->
|
|
|
<label>身高:</label>
|
|
|
<input name="height" id="heighth" placeholder="请输入身高" class="styled-input edit_inputs" type="number" th:value="${height}">
|
|
|
<span class="status">
|
|
@@ -384,19 +228,6 @@
|
|
|
</select>
|
|
|
<span class="status"></span>
|
|
|
</div>
|
|
|
-
|
|
|
- <!--<div class="customize-form-group edit">
|
|
|
- <label>疾病史描述:</label>
|
|
|
- <input name="medicalHistoryDescription" placeholder="疾病史描述" class="styled-input edit_inputs" type="text" th:value="${medicalHistoryDescription}">
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>传染病史描述:</label>
|
|
|
- <input name="infectiousDiseaseHistoryDescription" placeholder="传染病史描述" class="styled-input edit_inputs" type="text" th:value="${infectiousDiseaseHistoryDescription}">
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>既往药物不良反应史:</label>
|
|
|
- <input name="pastAdverseDrugReactionHistory" placeholder="既往药物不良反应史" class="styled-input edit_inputs" type="text" th:value="${pastAdverseDrugReactionHistory}">
|
|
|
- </div>-->
|
|
|
</div>
|
|
|
<div class="customize-search-form">
|
|
|
<div class="customize-search-form">
|
|
@@ -410,146 +241,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!--<div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <div style="/*display: flex;*/">
|
|
|
- <label style="width: auto;">家族史:</label>
|
|
|
- <button type="button" data-toggle="modal" data-target="#myModal" class="btn btn-xs btn-primary">新增</button>
|
|
|
- <table id="familyHistoryTable" style="width: 340px;">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>序号</th>
|
|
|
- <th>疾病</th>
|
|
|
- <th>家庭成员</th>
|
|
|
- <th>操作</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="familyHistoryTableBody">
|
|
|
- <!– 表格行将在这里动态添加 –>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- <div class="modal inmodal" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
|
|
|
- <div class="modal-dialog">
|
|
|
- <form class="form-horizontal" id="form-jzs-add">
|
|
|
- <div class="modal-content animated bounceInRight">
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span>
|
|
|
- </button>
|
|
|
- <h4 class="modal-title">家族史</h4>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >疾病</label>
|
|
|
- <input type="text" name="disease" placeholder="请输入疾病" class="styled-input edit_inputs" style="width: 200px;" id="disease">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>家庭成员</label>
|
|
|
- <select name="member" class="styled-input edit_inputs" style="width: 200px;" th:with="type=${@dict.getType('sys_select_dtp_ysfw_lxryhzgx')}" id="member">
|
|
|
- <option value="">请选择家庭成员</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${member}"></option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
|
|
|
- <button type="button" class="btn btn-primary" onclick="saveRow(1)">保存</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>-->
|
|
|
- <!--<div class="customize-form-group edit">
|
|
|
- <label class="is-required">保险:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_select_dtp_ysfw_bxlx')}" id="targetInsuranceDiv">
|
|
|
- <input type="checkbox" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" name="insurance2">
|
|
|
- </div>
|
|
|
- <div class="error-message" id="insurance-error">请选择至少一项保险</div>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >经济状况:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_select_dtp_ysfw_mqjjzt')}">
|
|
|
- <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${currentEconomicSituation}" name="currentEconomicSituation" >
|
|
|
- </div>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label class="is-required">患者是否知情:</label>
|
|
|
- <select name="patientAwareness" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_yes_no')}" required>
|
|
|
- <option value="">请选择</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${patientAwareness}"></option>
|
|
|
- </select>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>是否反馈医生:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
|
|
|
- <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${followUpFeedbackDoctor}" name="followUpFeedbackDoctor" >
|
|
|
- </div>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>心率:</label>
|
|
|
- <select name="heartRate" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_dtp_ysfw_xl')}" placeholder="请选择心率">
|
|
|
- <option value="">请选择心率</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${heartRate}"></option>
|
|
|
- </select>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>血压:</label>
|
|
|
- <select name="bloodPressureStatus" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_dtp_ysfw_xueya')}">
|
|
|
- <option value="">请选择</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${bloodPressureStatus}"></option>
|
|
|
- </select>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>吸烟史:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_select_dtp_ysfw_xys')}">
|
|
|
- <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${smokingHistory}" name="smokingHistory" >
|
|
|
- </div>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>饮酒史:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_select_dtp_ysfw_yjs')}">
|
|
|
- <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${drinkingHistory}" name="drinkingHistory" >
|
|
|
- </div>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>运动习惯:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
|
|
|
- <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${exerciseHabit}" name="exerciseHabit" >
|
|
|
- </div>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>饮食偏好:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_select_dtp_ysfw_ysph')}" id="dietaryPreferenceDiv">
|
|
|
- <input type="checkbox" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" name="dietaryPreference">
|
|
|
- </div>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >睡眠状况:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_select_dtp_ysfw_smzk')}" id="sleepConditionDiv">
|
|
|
- <input type="checkbox" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" name="sleepCondition">
|
|
|
- </div>
|
|
|
- <span class="status"></span>
|
|
|
- </div>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -595,15 +286,6 @@
|
|
|
</select>
|
|
|
<span class="status"></span>
|
|
|
</div>
|
|
|
- <!--<div class="customize-form-group edit">
|
|
|
- <label>分子分型监测:</label>
|
|
|
- <select name="diseaseType" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_dtp_ysfw_jblx')}" required>
|
|
|
- <option value="">请选择</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${diseaseType}"></option>
|
|
|
- </select>
|
|
|
- <span class="status"></span>
|
|
|
- </div>-->
|
|
|
<div class="customize-form-group edit">
|
|
|
<label>PD-L1表达:</label>
|
|
|
<select name="pdl1" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_pdl1')}" required>
|
|
@@ -613,11 +295,6 @@
|
|
|
</select>
|
|
|
<span class="status"></span>
|
|
|
</div>
|
|
|
- <!--<div class="customize-form-group edit">
|
|
|
- <label>临床诊断:</label>
|
|
|
- <input name="disease" placeholder="请输入临床诊断" class="styled-input edit_inputs" type="text" maxlength="30" th:value="${disease}">
|
|
|
- <span class="status"></span>
|
|
|
- </div>-->
|
|
|
<div class="customize-form-group edit">
|
|
|
<label>治疗手段:</label><!-- 值配置到字典-->
|
|
|
<select name="zlsd" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_zlsd')}" required>
|
|
@@ -641,24 +318,7 @@
|
|
|
</div>
|
|
|
<span class="status"></span>
|
|
|
</div>
|
|
|
-
|
|
|
- <!--<div class="customize-form-group edit">
|
|
|
- <label class="is-required">首次确诊时间:</label>
|
|
|
- <div class="input-groups select-time">
|
|
|
- <input name="timeFirstDiagnosis" placeholder="首次确诊时间" class="time-input-new styled-input" type="text" th:value="${timeFirstDiagnosis}" required>
|
|
|
- </div>
|
|
|
- <span class="status"></span>
|
|
|
- </div>-->
|
|
|
</div>
|
|
|
- <!--<div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>伴随症状:</label>
|
|
|
- <textarea id="accompanyingSymptoms" name="accompanyingSymptoms" class="styled-input edit_inputs textareas"
|
|
|
- style="width: auto;height: 140px ;border: 1px solid ;"
|
|
|
- th:text="${accompanyingSymptoms}" placeholder="伴随症状..." rows="1.9" cols="112" ></textarea>
|
|
|
- <span class="status"></span>
|
|
|
- </div>
|
|
|
- </div>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="tab-23" class="tab-pane fade in active">
|
|
@@ -686,127 +346,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!--<div id="tab-24" class="tab-pane fade in active">
|
|
|
- <div class="panel-body">
|
|
|
- <strong>患病史</strong>
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>疾病史:</label>
|
|
|
- <select name="medicalHistory" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_dtp_ysfw_jibinshi')}">
|
|
|
- <option value="">请选择</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${medicalHistory}"></option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>疾病史描述:</label>
|
|
|
- <input name="medicalHistoryDescription" placeholder="疾病史描述" class="styled-input edit_inputs" type="text" th:value="${medicalHistoryDescription}">
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>传染病史:</label>
|
|
|
- <select name="infectiousDiseaseHistory" class="styled-input edit_inputs" th:with="type=${@dict.getType('sys_select_dtp_ysfw_crbs')}" >
|
|
|
- <option value="">请选择</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${infectiousDiseaseHistory}"></option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>传染病史描述:</label>
|
|
|
- <input name="infectiousDiseaseHistoryDescription" placeholder="传染病史描述" class="styled-input edit_inputs" type="text" th:value="${infectiousDiseaseHistoryDescription}">
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>既往药物不良反应史:</label>
|
|
|
- <input name="pastAdverseDrugReactionHistory" placeholder="既往药物不良反应史" class="styled-input edit_inputs" type="text" th:value="${pastAdverseDrugReactionHistory}">
|
|
|
- </div>
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>是否有手术外伤史:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_yes_no')}">
|
|
|
- <input type="radio" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" th:checked="${dict.dictLabel}==${hasSurgicalTraumaHistory}" name="hasSurgicalTraumaHistory" id="hasSurgicalTraumaHistory">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>过敏史:</label>
|
|
|
- <textarea id="allergyHistory" name="allergyHistory" placeholder="这里可以输入过敏史..." class="styled-input edit_inputs textareas"
|
|
|
- style="width: auto;height: 140px ;border: 1px solid ;" rows="1.9" cols="112" th:text="${allergyHistory}"></textarea>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <div style="/*display: flex;*/">
|
|
|
- <label style="width: auto;">家族史:</label>
|
|
|
- <button type="button" data-toggle="modal" data-target="#myModal" class="btn btn-xs btn-primary">新增</button>
|
|
|
- <table id="familyHistoryTable" style="width: 340px;">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>序号</th>
|
|
|
- <th>疾病</th>
|
|
|
- <th>家庭成员</th>
|
|
|
- <th>操作</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="familyHistoryTableBody">
|
|
|
- <!– 表格行将在这里动态添加 –>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- <div class="modal inmodal" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
|
|
|
- <div class="modal-dialog">
|
|
|
- <form class="form-horizontal" id="form-jzs-add">
|
|
|
- <div class="modal-content animated bounceInRight">
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span>
|
|
|
- </button>
|
|
|
- <h4 class="modal-title">家族史</h4>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label >疾病</label>
|
|
|
- <input type="text" name="disease" placeholder="请输入疾病" class="styled-input edit_inputs" style="width: 200px;" id="disease">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>家庭成员</label>
|
|
|
- <select name="member" class="styled-input edit_inputs" style="width: 200px;" th:with="type=${@dict.getType('sys_select_dtp_ysfw_lxryhzgx')}" id="member">
|
|
|
- <option value="">请选择家庭成员</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${member}"></option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
|
|
|
- <button type="button" class="btn btn-primary" onclick="saveRow(1)">保存</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>-->
|
|
|
- <!--<div id="tab-25" class="tab-pane fade in active">
|
|
|
- <div class="panel-body">
|
|
|
- <strong>治疗手段</strong>
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <div style="/*display: flex;*/">
|
|
|
- <label style="width: auto;">多个治疗方案原因描述:</label>
|
|
|
- <textarea id="multipleTreatmentReasonsDescription" class="styled-input edit_inputs textareas" style="width: auto;height: 35px ;border: 1px solid ;"
|
|
|
- name="multipleTreatmentReasonsDescription" placeholder="治疗方案原因描述"
|
|
|
- rows="5" cols="185" th:text="${multipleTreatmentReasonsDescription}"></textarea>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>-->
|
|
|
<div id="tab-26" class="tab-pane fade in active">
|
|
|
<div class="panel-body">
|
|
|
<strong>用药情况 </strong>
|
|
@@ -867,87 +406,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!--<div id="tab-27" class="tab-pane fade in active">
|
|
|
- <div class="panel-body">
|
|
|
- <strong>其他信息</strong>
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <div style="/*display: flex;*/">
|
|
|
- <label style="width: auto;">联系人:</label>
|
|
|
- <button type="button" data-toggle="modal" data-target="#myModal3" class="btn btn-xs btn-primary">新增</button>
|
|
|
- <table id="relationTable" style="width: 310px;">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>序号</th>
|
|
|
- <th>电话</th>
|
|
|
- <th>姓名</th>
|
|
|
- <th>关系</th>
|
|
|
- <th>操作</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="relationTableBody">
|
|
|
- <!– 表格行将在这里动态添加 –>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="modal inmodal" id="myModal3" tabindex="-1" role="dialog" aria-hidden="true">
|
|
|
- <div class="modal-dialog">
|
|
|
- <form class="form-horizontal" id="form-relation-add">
|
|
|
- <div class="modal-content animated bounceInRight">
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span>
|
|
|
- </button>
|
|
|
- <h4 class="modal-title">联系人</h4>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>联系人电话</label>
|
|
|
- <div class="input-group">
|
|
|
- <input type="text" placeholder="请输入当联系人电话称" class="styled-input isPhone" style="width: 200px;" id="contact_phone" name="contact_phone" maxlength="11">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>联系人姓名</label>
|
|
|
- <div class="input-group">
|
|
|
- <input type="text" placeholder="请输入联系人姓名" class="styled-input edit_inputs" style="width: 200px;" id="contact_name" name="contact_name">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>联系人关系</label>
|
|
|
- <select name="contact_relationship" class="styled-input edit_inputs" style="width: 200px;" th:with="type=${@dict.getType('sys_select_dtp_ysfw_lxryhzgx')}" id="contact_relationship">
|
|
|
- <option value="">请选择联系人关系</option>
|
|
|
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}"
|
|
|
- th:selected="${dict.dictLabel}==${contact_relationship}"></option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
|
|
|
- <button type="button" class="btn btn-primary" onclick="saveRow(3)">保存</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="customize-search-form">
|
|
|
- <div class="customize-form-group edit">
|
|
|
- <label>陪护人:</label>
|
|
|
- <div class="input-groups" th:with="type=${@dict.getType('sys_select_dtp_ysfw_phr')}" id="caregiverDiv">
|
|
|
- <input type="checkbox" class="form-check-radio" th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictLabel}" name="caregiver">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>-->
|
|
|
</form>
|
|
|
</div>
|
|
|
<div id="tab-3" class="tab-pane">
|
|
@@ -1073,8 +531,9 @@
|
|
|
<th:block th:include="include :: footer" />
|
|
|
<th:block th:include="include :: select2-css" />
|
|
|
<th:block th:include="include :: bootstrap-select-css" />
|
|
|
-</body> <th:block th:include="include :: select2-js" />
|
|
|
+ <th:block th:include="include :: select2-js" />
|
|
|
<th:block th:include="include :: bootstrap-select-js" />
|
|
|
+</body>
|
|
|
</html>
|
|
|
<script th:inline="javascript">
|
|
|
var prefix = ctx + "dtp/pmService";
|
|
@@ -1097,112 +556,50 @@
|
|
|
method: 'GET',
|
|
|
dataType: 'json',
|
|
|
success: function(data) {
|
|
|
- var options1 = $('#category-select1');
|
|
|
- var options2 = $('#category-select2');
|
|
|
- var options3 = $('#category-select3');
|
|
|
- var options4 = $('#category-select4');
|
|
|
- var options5 = $('#category-select5');
|
|
|
- var options6 = $('#category-select6');
|
|
|
-
|
|
|
+ // 获取所有的 select 元素
|
|
|
+ var selects = [
|
|
|
+ $('#category-select1'),
|
|
|
+ $('#category-select2'),
|
|
|
+ $('#category-select3'),
|
|
|
+ $('#category-select4'),
|
|
|
+ $('#category-select5'),
|
|
|
+ $('#category-select6')
|
|
|
+ ];
|
|
|
// 清空已有选项(除了第一个默认选项)
|
|
|
- options1.find('option').not(':first').remove();
|
|
|
- options2.find('option').not(':first').remove();
|
|
|
- options3.find('option').not(':first').remove();
|
|
|
- options4.find('option').not(':first').remove();
|
|
|
- options5.find('option').not(':first').remove();
|
|
|
- options6.find('option').not(':first').remove();
|
|
|
-
|
|
|
- // 添加默认选项
|
|
|
- $('<option>', {
|
|
|
- value: '',
|
|
|
- text : '请选择疾病'
|
|
|
- }).appendTo(options1);
|
|
|
- $('<option>', {
|
|
|
- value: '',
|
|
|
- text : '请选择疾病'
|
|
|
- }).appendTo(options2);
|
|
|
- $('<option>', {
|
|
|
- value: '',
|
|
|
- text : '请选择疾病'
|
|
|
- }).appendTo(options3);
|
|
|
- $('<option>', {
|
|
|
- value: '',
|
|
|
- text : '请选择疾病'
|
|
|
- }).appendTo(options4);
|
|
|
- $('<option>', {
|
|
|
- value: '',
|
|
|
- text : '请选择疾病'
|
|
|
- }).appendTo(options5);
|
|
|
- $('<option>', {
|
|
|
- value: '',
|
|
|
- text : '请选择疾病'
|
|
|
- }).appendTo(options6);
|
|
|
- // 回显数据
|
|
|
+ selects.forEach(function(select) {
|
|
|
+ select.find('option').not(':first').remove();
|
|
|
+ });
|
|
|
+ // 添加默认选项到每个下拉列表
|
|
|
+ selects.forEach(function(select) {
|
|
|
+ if (!select.find('option:first').length) { // 检查是否已经有默认选项
|
|
|
+ $('<option>', {
|
|
|
+ value: '',
|
|
|
+ text : '请选择疾病'
|
|
|
+ }).prependTo(select); // 使用 prependTo 确保它成为第一个选项
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 解析 dl 数据并获取 ID 数组
|
|
|
var dl = /*[[${dl}]]*/ '';
|
|
|
- // 直接使用 dl 数据预填充下拉列表
|
|
|
var dlParsed = JSON.parse(dl);
|
|
|
- if (Array.isArray(dlParsed)) {
|
|
|
- var dlIds = dlParsed.map(function (item) {
|
|
|
- return item.id;
|
|
|
- }); // 转换为 ID 数组
|
|
|
+ var dlIds = Array.isArray(dlParsed) ? dlParsed.map(item => item.id.toString()) : [];
|
|
|
// 遍历返回的数据并添加选项
|
|
|
- $.each(data.value, function(index, item) {
|
|
|
- if(item.dict_key == 1){
|
|
|
- $('<option>', {
|
|
|
- value: item.id,
|
|
|
- text : item.categoryName
|
|
|
- }).appendTo(options1);
|
|
|
- $(`#category-select1`).val(dlIds).trigger('change');
|
|
|
- }
|
|
|
- if(item.dict_key == 2){
|
|
|
- $('<option>', {
|
|
|
- value: item.id,
|
|
|
- text : item.categoryName
|
|
|
- }).appendTo(options2);
|
|
|
- $(`#category-select2`).val(dlIds).trigger('change');
|
|
|
- }
|
|
|
- if(item.dict_key == 3){
|
|
|
- $('<option>', {
|
|
|
- value: item.id,
|
|
|
- text : item.categoryName
|
|
|
- }).appendTo(options3);
|
|
|
- $(`#category-select3`).val(dlIds).trigger('change');
|
|
|
-
|
|
|
- }
|
|
|
- if(item.dict_key == 4){
|
|
|
- $('<option>', {
|
|
|
- value: item.id,
|
|
|
- text : item.categoryName
|
|
|
- }).appendTo(options4);
|
|
|
- $(`#category-select4`).val(dlIds).trigger('change');
|
|
|
- }
|
|
|
- if(item.dict_key == 5){
|
|
|
+ $.each(data.value || [], function(index, item) {
|
|
|
+ var selectIndex = item.dict_key-1; // 假设 dict_key 是从 1 开始的索引
|
|
|
+ if (selectIndex >= 0 && selectIndex < selects.length) {
|
|
|
$('<option>', {
|
|
|
value: item.id,
|
|
|
text : item.categoryName
|
|
|
- }).appendTo(options5);
|
|
|
- $(`#category-select5`).val(dlIds).trigger('change');
|
|
|
- }
|
|
|
- if(item.dict_key == 6){
|
|
|
- $('<option>', {
|
|
|
- value: item.id,
|
|
|
- text : item.categoryName
|
|
|
- }).appendTo(options6);
|
|
|
- $(`#category-select6`).val(dlIds).trigger('change');
|
|
|
+ }).appendTo(selects[selectIndex]);
|
|
|
+ // 设置选中的值(仅当 dlIds 包含该项 id 时)
|
|
|
+ if (dlIds.includes(item.id.toString())) {
|
|
|
+ selects[selectIndex].val(item.id).trigger('change');
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
- // 重新初始化 Select2 以反映新的选项
|
|
|
- options1.trigger('change');
|
|
|
- options2.trigger('change');
|
|
|
- options3.trigger('change');
|
|
|
- options4.trigger('change');
|
|
|
- options5.trigger('change');
|
|
|
- options6.trigger('change');
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ // 如果使用 Select2 插件,则初始化或刷新它们
|
|
|
+ selects.forEach(function(select) {
|
|
|
+ select.trigger('change');
|
|
|
+ });
|
|
|
},
|
|
|
error: function(xhr, status, error) {
|
|
|
console.error("Failed to load disease categories:", error);
|