From b5a56d53e44c426fa188ba3e4e1db3eb779e2fd9 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期三, 11 九月 2024 21:49:21 +0800 Subject: [PATCH] 测试完成 --- src/views/patient/patient/profile/index.vue | 895 +++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 649 insertions(+), 246 deletions(-) diff --git a/src/views/patient/patient/profile/index.vue b/src/views/patient/patient/profile/index.vue index cb19817..e917a31 100644 --- a/src/views/patient/patient/profile/index.vue +++ b/src/views/patient/patient/profile/index.vue @@ -6,14 +6,27 @@ <el-col :span="18"> <div class="headportrait"> <div class="text-center"> - <img v-imgError="require('@/assets/common/head.jpg')" src="" /> + <img + v-imgError="require('@/assets/images/shoushuzhudaoyisheng.png')" + src="" + /> </div> - <div style="margin-left: 10px">鍚村ぇ榫�</div> - <div style="margin-left: 10px" class="text-title">鐢�</div> - <div style="margin-left: 10px" class="text-title">66宀�</div> - <div style="margin-left: 10px" class="text-title">1999.12.18</div> - <div style="margin-left: 10px" class="text-title">姹夋棌</div> - <div style="margin-left: 10px" class="text-title">娌冲崡淇¢槼</div> + <div style="margin-left: 10px">{{ userform.name }}</div> + <div style="margin-left: 10px" class="text-title"> + {{ userform.sex == 1 ? "鐢�" : "濂�" }} + </div> + <div style="margin-left: 10px" class="text-title"> + {{ userform.age }}宀� + </div> + <div style="margin-left: 10px" class="text-title"> + {{ userform.birthdate }} + </div> + <div style="margin-left: 10px" class="text-title"> + {{ userform.nation }} + </div> + <div style="margin-left: 10px" class="text-title"> + {{ userform.birthplace }} + </div> </div></el-col > </el-row> @@ -29,7 +42,7 @@ <span class="mulsz" slot="label" ><i class="el-icon-s-management"></i> 鍖荤枟妗f</span > - <el-tabs v-model="sonactiveName" @tab-click="handleClick"> + <el-tabs v-model="sonactiveName" @tab-click="handleClickson"> <el-tab-pane name="outpatient" ><span class="mulsz" slot="label" >闂ㄨ瘖({{ mznumber }})</span @@ -37,12 +50,12 @@ > <el-tab-pane name="inhospital" ><span class="mulsz" slot="label" - >浣忛櫌({{ zynumber }}) + >鍦ㄩ櫌({{ zynumber }}) </span></el-tab-pane > <el-tab-pane name="checkout" ><span class="mulsz" slot="label" - >浣撴({{ jynumber }}) + >鍑洪櫌({{ jynumber }}) </span></el-tab-pane > </el-tabs> @@ -95,89 +108,111 @@ <!-- 鍋ュ悍妗f妯″潡 --> <div class="information-content" v-if="activeName == 'health'"> <div class="top-message"> - <div class="headline">鍩虹淇℃伅</div> + <div class="headlines"> + <div>鍩虹淇℃伅</div> + <el-button type="primary" @click="savefile">淇濆瓨鎮h�呮。妗�</el-button> + </div> <div class="detailed"> - <el-row :gutter="20"> - <el-col :span="12" - ><div class="grid-content bg-purple"> - 鎮h�呭鍚嶏細<span class="spanvalue">鐜嬪ぇ缇�</span> - </div></el-col - > - <el-col :span="12" - ><div class="grid-content bg-purple"> - 鑱旂郴鐢佃瘽锛�<span class="spanvalue">13803963330</span> - </div></el-col - > - </el-row> - <el-row :gutter="20"> - <el-col :span="24" - ><div class="grid-content bg-purple"> - 鍑虹敓鍦帮細<span class="spanvalue" - >娴欐睙鐪佹澀宸炲競浣欐澀鍖轰綑鏉閬�</span - > - </div></el-col - > - </el-row> - <el-row :gutter="20"> - <el-col :span="24" - ><div class="grid-content bg-purple"> - 灞呬綇鍦帮細<span class="spanvalue" - >娴欐睙鐪佹澀宸炲競浣欐澀鍖轰綑鏉閬�</span - > - </div></el-col - > - </el-row> - <el-row :gutter="20"> - <el-col :span="24" - ><div class="xinz-inf"> - <el-tag - :key="tag" - type="success" - v-for="tag in dynamicTags" - closable - :disable-transitions="false" - @close="handleClose(tag)" - > - {{ tag }} - </el-tag> - <el-select - v-model="inputValue" - v-if="inputVisible" - @change="handleInputConfirm" - filterable - placeholder="璇烽�夋嫨" - > - <el-option - v-for="item in options" - :key="item.label" - :label="item.label" - :value="item.label" - > - </el-option> - </el-select> + <el-form + ref="userform" + :model="userform" + :rules="rules" + label-width="100px" + > + <el-row :gutter="20"> + <el-col :span="12"> + <el-form-item label="鎮h�呭鍚�" prop="name"> + <el-input + v-model="userform.name" + placeholder="璇疯緭鍏ュ鍚�" + maxlength="30" + ></el-input> </el-form-item + ></el-col> + <el-col :span="12" + ><el-form-item label="鑱旂郴鏂瑰紡" prop="telcode"> + <el-input + v-model="userform.telcode" + placeholder="璇疯緭鍏ヨ仈绯绘柟寮�" + maxlength="30" + /> </el-form-item + ></el-col> + </el-row> + <el-row :gutter="20"> + <el-col :span="24"> + <el-form-item label="鍑虹敓鍦�" prop="birthplace"> + <el-input + v-model="userform.birthplace" + placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑璇︾粏淇℃伅" + maxlength="50" + /> </el-form-item + ></el-col> + </el-row> + <el-row :gutter="20"> + <el-col :span="24" + ><el-form-item label="灞呬綇鍦�" prop="placeOfResidence"> + <el-input + v-model="userform.placeOfResidence" + placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑璇︾粏淇℃伅" + maxlength="50" + /> </el-form-item + ></el-col> + </el-row> + <el-row :gutter="20"> + <el-col :span="24"> + <el-form-item label="鏍囩" prop="desc"> + <div class="xinz-inf"> + <el-tag + :key="tag.tagname" + type="success" + v-for="tag in dynamicTags" + v-if="tag.isoperation != 3" + closable + :disable-transitions="false" + @close="handleClose(tag)" + > + {{ tag.tagname }} + </el-tag> + <el-select + v-if="inputVisible" + v-model="inputValue" + @change="handleInputConfirm" + filterable + allow-create + default-first-option + placeholder="璇烽�夋嫨/鏌ヨ" + > + <el-option + v-for="item in options" + :key="item.tagid" + :label="item.tagname" + :value="item.tagname" + > + </el-option> + </el-select> - - <el-button - v-else - class="button-new-tag" - size="small" - @click="showInput" - >+ 鏂板鏍囩</el-button - > - </div></el-col - > - </el-row> + <el-button + v-else + class="button-new-tag" + size="small" + @click="showInput" + >+ 鏂板鏍囩</el-button + > + </div> + </el-form-item> + </el-col> + </el-row> + </el-form> </div> </div> <div class="top-message"> <div class="headline">鐥呭彶</div> <div class="detailed"> - <el-form ref="form" :model="form" :rules="rules" label-width="100px"> + <el-form :model="form" label-width="100px"> <el-row> <el-col :span="8"> <el-form-item label="杩囧線鐤剧梾" prop="name"> <el-input - v-model="form.name" + v-model="form.pastIllnesses" placeholder="璇疯緭鍏�" maxlength="30" /> @@ -186,7 +221,7 @@ <el-col :span="8"> <el-form-item label="鑽墿杩囨晱" prop="sex"> <el-input - v-model="form.name" + v-model="form.drugAllergy" placeholder="璇疯緭鍏ュ叿浣撹嵂鐗�/鏃�" maxlength="30" /> @@ -195,7 +230,7 @@ <el-col :span="8"> <el-form-item label="瀹舵棌鐥呭彶" prop="age"> <el-input - v-model="form.age" + v-model="form.familyHistory" placeholder="璇疯緭鍏ュ叿浣撶柧鐥�/鏃�" maxlength="30" /> @@ -206,7 +241,7 @@ <el-col :span="8"> <el-form-item label="鎵嬫湳鍙�" prop="name"> <el-input - v-model="form.name" + v-model="form.surgicalHistory" placeholder="璇疯緭鍏ユ墜鏈�/鏃�" maxlength="30" /> @@ -215,62 +250,62 @@ <el-col :span="8"> <el-form-item label="鐢熻偛鍙�" prop="age"> <el-input - v-model="form.age" + v-model="form.reproductiveHistory" placeholder="璇疯緭鍏ヨ儙鏁�/鏃�" maxlength="30" /> </el-form-item> </el-col> <el-col :span="8"> - <el-form-item label="鏈堢粡鍙�" prop="telcode"> - <el-radio-group v-model="form.radio"> - <el-radio :label="1">鏈�</el-radio> - <el-radio :label="2">鏃�</el-radio> + <el-form-item label="鏈堢粡鍙�" prop="menstrualHistory"> + <el-radio-group v-model="form.menstrualHistory"> + <el-radio label="1">鏈�</el-radio> + <el-radio label="2">鏃�</el-radio> </el-radio-group> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="8"> - <el-form-item label="鍚哥儫鎯呭喌" prop="iccardtype"> - <el-radio-group v-model="form.radio"> - <el-radio :label="1">鏈�</el-radio> - <el-radio :label="2">鏃�</el-radio> + <el-form-item label="鍚哥儫鎯呭喌" prop="smoking"> + <el-radio-group v-model="form.smoking"> + <el-radio label="1">鏈�</el-radio> + <el-radio label="2">鏃�</el-radio> </el-radio-group> </el-form-item> </el-col> <el-col :span="8"> - <el-form-item label="楗厭鎯呭喌" prop="iccardno"> - <el-radio-group v-model="form.radios"> - <el-radio :label="1">鏈�</el-radio> - <el-radio :label="2">鏃�</el-radio> + <el-form-item label="楗厭鎯呭喌" prop="drink"> + <el-radio-group v-model="form.drink"> + <el-radio label="1">鏈�</el-radio> + <el-radio label="2">鏃�</el-radio> </el-radio-group> </el-form-item> </el-col> <el-col :span="8"> - <el-form-item label="杩愬姩鎯呭喌" prop="iccardno"> - <el-radio-group v-model="form.radiosa"> - <el-radio :label="1">鏈�</el-radio> - <el-radio :label="2">鏃�</el-radio> + <el-form-item label="杩愬姩鎯呭喌" prop="motion"> + <el-radio-group v-model="form.motion"> + <el-radio label="1">鏈�</el-radio> + <el-radio label="2">鏃�</el-radio> </el-radio-group> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="12"> - <el-form-item label="楗鎯呭喌" prop="iccardno"> - <el-radio-group v-model="form.radiosa"> - <el-radio :label="1">澶氬害楗</el-radio> - <el-radio :label="2">姝e父楗</el-radio> - <el-radio :label="2">椋熸涓嶆尟</el-radio> + <el-form-item label="楗鎯呭喌" prop="diet"> + <el-radio-group v-model="form.diet"> + <el-radio label="1">杩囧害楗</el-radio> + <el-radio label="2">姝e父楗</el-radio> + <el-radio label="3">椋熸涓嶆尟</el-radio> </el-radio-group> </el-form-item> </el-col ><el-col :span="12"> - <el-form-item label="蹇冪悊鎯呭喌" prop="iccardno"> - <el-radio-group v-model="form.radiosa"> - <el-radio :label="1">蹇冩儏鎰夋偊</el-radio> - <el-radio :label="2">杞诲井鐒﹁檻</el-radio> - <el-radio :label="2">鎶戦儊</el-radio> + <el-form-item label="蹇冪悊鎯呭喌" prop="psychology"> + <el-radio-group v-model="form.psychology"> + <el-radio label="1">蹇冩儏鎰夋偊</el-radio> + <el-radio label="2">杞诲井鐒﹁檻</el-radio> + <el-radio label="3">鎶戦儊</el-radio> </el-radio-group> </el-form-item> </el-col> @@ -281,20 +316,22 @@ <!-- 鑱旂郴鐢佃瘽 --> <div class="bottom-message"> <div class="headline"> - 鍙风爜缁存姢 - <el-button type="primary" @click="AddanumberVisible = true" - >+鏂板</el-button - > + 浜插睘鍙风爜缁存姢<span style="margin-right: 60px"> </span> + <el-button type="primary" @click="addcompiletb">+鏂板</el-button> </div> <div class="Table-screen"> - <el-table :data="tableData" style="width: 100%"> + <el-table + :data="tableData" + style="width: 100%" + :row-class-name="tableRowClassName" + > <el-table-column prop="id" label="搴忓彿" width="180"> </el-table-column> - <el-table-column prop="name" label="濮撳悕" width="180"> + <el-table-column prop="contactname" label="濮撳悕" width="180"> </el-table-column> - <el-table-column prop="phonenumber" label="鑱旂郴鏂瑰紡" width="180"> + <el-table-column prop="contactway" label="鑱旂郴鏂瑰紡" width="180"> </el-table-column> - <el-table-column prop="concern" label="鍏崇郴"> </el-table-column> + <el-table-column prop="relation" label="鍏崇郴"> </el-table-column> <el-table-column label-class-name="columcz" fixed="right" @@ -302,11 +339,22 @@ width="300" > <template slot-scope="scope"> - <el-button type="success" size="small" + <el-button + type="success" + size="small" + @click="defaulttb(scope.row)" >璁句负榛樿鑱旂郴鏂瑰紡</el-button > - <el-button type="warning" size="small">缂栬緫</el-button> - <el-button type="danger" size="small">鍒犻櫎</el-button> + <el-button + @click="compiletb(scope.row)" + type="warning" + size="small" + >缂栬緫</el-button + > + + <el-button @click="deltb(scope.row)" type="danger" size="small" + >鍒犻櫎</el-button + > </template> </el-table-column> </el-table> @@ -318,22 +366,71 @@ <!-- 闂ㄨ瘖 --> <div v-if="sonactiveName == 'outpatient'"> <el-table :data="serviceData" style="width: 100%"> - <el-table-column prop="daya" label="灏辫瘖鏃ユ湡" width="180"> + <el-table-column + label="灏辫瘖鏃堕棿" + align="center" + key="createTime" + prop="createTime" + width="160" + > + <template slot-scope="scope"> + <span>{{ formatTime(scope.row.createTime) }}</span> + </template> </el-table-column> - <el-table-column prop="administrative" label="灏辫瘖绉戝" width="180"> + + <el-table-column + label="闂ㄨ瘖鍙�" + align="center" + key="patid" + prop="patid" + /> + <el-table-column + label="濮撳悕" + align="center" + key="patname" + prop="patname" + /> + <el-table-column label="鎬у埆" align="center" key="sex" prop="sex"> + <template slot-scope="scope"> + <span>{{ scope.row.sex == 1 ? "鐢�" : "濂�" }}</span> + </template> </el-table-column> - <el-table-column prop="doctor" label="鍖荤敓"> </el-table-column> - <el-table-column prop="result" label="鐤剧梾璇婃柇"> </el-table-column> - <el-table-column prop="administrative" label="妫�楠�"> - </el-table-column> - <el-table-column prop="administrative" label="妫�鏌�"> - </el-table-column> - <el-table-column prop="administrative" label="鎵嬫湳"> - </el-table-column> - <el-table-column prop="administrative" label="鐢ㄨ嵂"> - </el-table-column> - <el-table-column prop="columcz" label="鍖诲槺" width="200"> - </el-table-column> + <el-table-column + label="骞撮緞" + align="center" + key="age" + prop="age" + width="120" + /> + <el-table-column + label="鑱旂郴鐢佃瘽" + align="center" + key="telcode" + prop="telcode" + width="120" + /> + <el-table-column + label="璇婃柇" + align="center" + key="diagname" + prop="diagname" + width="190" + /> + + <el-table-column + label="灏辫瘖绉戝" + align="center" + key="deptname" + prop="deptname" + width="120" + /> + <el-table-column + label="鎺ヨ瘖鍖荤敓" + align="center" + key="drname" + prop="drname" + width="120" + /> </el-table> <pagination @@ -346,30 +443,80 @@ </div> <!-- 浣忛櫌 --> <div v-if="sonactiveName == 'inhospital'"> - <el-table :data="serviceData" style="width: 100%"> - <el-table-column prop="godaya" label="鍏ラ櫌鏃ユ湡"> </el-table-column> - <el-table-column prop="hospitalname" label="鍑洪櫌鏃堕棿"> + <el-table :data="serviceDatary" style="width: 100%"> + <el-table-column + label="浣忛櫌鍙�" + align="center" + key="patid" + prop="patid" + /> + <el-table-column + label="濮撳悕" + align="center" + key="patname" + prop="patname" + /> + <el-table-column label="鎬у埆" align="center" key="sex" prop="sex"> + <template slot-scope="scope"> + <span>{{ scope.row.sex == 1 ? "鐢�" : "濂�" }}</span> + </template> </el-table-column> - <el-table-column prop="administrative" label="鐥呭尯"> - </el-table-column> - <el-table-column prop="result" label="涓绘不鍖诲笀"> </el-table-column> - <el-table-column prop="bed" label="绠″簥鎶ゅ+"> </el-table-column> - <el-table-column prop="doctor" label="鍑洪櫌鐤剧梾璇婃柇"> - </el-table-column> - <el-table-column prop="today" label="妫�楠�"> </el-table-column> - <el-table-column prop="administrative" label="妫�鏌�"> - </el-table-column> - <el-table-column prop="administrative" label="鎵嬫湳"> - </el-table-column> - <el-table-column prop="administrative" label="鐢ㄨ嵂"> - </el-table-column> - <el-table-column prop="columcz" label="鍑洪櫌灏忕粨" width="200"> - </el-table-column> + <el-table-column + label="骞撮緞" + align="center" + key="age" + prop="age" + width="120" + /> + <el-table-column + label="鑱旂郴鐢佃瘽" + align="center" + key="telephone" + prop="telephone" + width="120" + /> + + <el-table-column + label="鍏ラ櫌璇婃柇" + align="center" + key="diagname" + prop="diagname" + width="190" + /> + + <el-table-column + label="鐥呭尯" + align="center" + key="deptname" + prop="deptname" + width="120" + /> + <el-table-column + label="搴婁綅鍙�" + align="center" + key="bedNo" + prop="bedNo" + width="120" + /> + <el-table-column + label="涓绘不鍖荤敓" + align="center" + key="drname" + prop="drname" + width="120" + /> + <el-table-column + label="璐d换鎶ゅ+" + align="center" + key="Sister" + prop="Sister" + width="120" + /> </el-table> </div> - <!-- 浣撴 --> + <!-- 鍑洪櫌 --> <div v-if="sonactiveName == 'checkout'"> - <el-table :data="serviceData" style="width: 100%"> + <el-table :data="serviceDatacy" style="width: 100%"> <el-table-column prop="godaya" label="浣撴绫诲瀷"> </el-table-column> <el-table-column prop="hospitalname" label="浣撴濂楅鍚嶇О"> </el-table-column> @@ -405,15 +552,19 @@ </div> <el-divider></el-divider> <div style="margin-top: 10px"> - 闅忚鐘舵�侊細宸茬粓姝�<span style="color: #2775b6" + {{ item.name }}鐘舵�侊細宸茬粓姝�<span style="color: #2775b6" >锛堢粓姝㈠師鍥狅細鎮h�呯棅鎰堝洖璁跨粨鏉燂紝缁堟鏃堕棿锛�2023-12-18 12:00锛�</span > </div> <div style="margin-top: 10px"> - 闅忚鍙戦�佹椂闂达細<span style="color: #2775b6">2023-11-23 12:00</span> + {{ item.name }}鍙戦�佹椂闂达細<span style="color: #2775b6" + >2023-11-23 12:00</span + > </div> <div style="margin-top: 10px"> - 闅忚瀹屾垚鏃堕棿锛�<span style="color: #2775b6">2023-12-18 12:00</span> + {{ item.name }}瀹屾垚鏃堕棿锛�<span style="color: #2775b6" + >2023-12-18 12:00</span + > </div> <div style="margin-top: 10px"> 鐤肩棝绋嬪害锛�<span style="color: #2775b6">涓害</span> @@ -426,16 +577,17 @@ border-left: 4px solid rgb(65, 161, 190); " > - 浜哄伐闅忚璁板綍 + 浜哄伐{{ item.name }}璁板綍 </div> <div style="margin-top: 10px"> <el-row :gutter="20"> <el-col :span="6" - >闅忚鏃ユ湡锛� + >{{ item.name }}鏃ユ湡锛� <span style="color: #2775b6">2023-11-22 11:22</span></el-col > <el-col :span="6" - >闅忚浜猴細 <span style="color: #2775b6">鍚村皬榫�</span></el-col + >{{ item.name }}浜猴細 + <span style="color: #2775b6">鍚村皬榫�</span></el-col > <el-col :span="6" >鎮h�呴厤鍚堝害锛� <span style="color: #2775b6">楂�</span></el-col @@ -443,10 +595,12 @@ </el-row> </div> <div style="margin-top: 10px"> - 闅忚缁撴灉锛� <span style="color: #2775b6">鎮h�呯棅鎰堬紝韬綋鍊嶆</span> + {{ item.name }}缁撴灉锛� + <span style="color: #2775b6">鎮h�呯棅鎰堬紝韬綋鍊嶆</span> </div> <div style="margin-top: 10px"> - 闅忚澶囨敞锛� <span style="color: #2775b6">鎻愰啋娉ㄦ剰楗鍋ュ悍</span> + {{ item.name }}澶囨敞锛� + <span style="color: #2775b6">鎻愰啋娉ㄦ剰楗鍋ュ悍</span> </div> </el-card> </div> @@ -563,21 +717,21 @@ </div> </div> - <el-dialog title="鏂板鑱旂郴鏂瑰紡" :visible.sync="AddanumberVisible"> + <el-dialog :title="titletb" :visible.sync="AddanumberVisible"> <el-form :model="numberform" label-width="100px"> <el-form-item label="濮撳悕"> - <el-input v-model="numberform.name"></el-input> + <el-input v-model="numberform.contactname"></el-input> </el-form-item> <el-form-item label="鑱旂郴鐢佃瘽"> - <el-input v-model="numberform.name"></el-input> + <el-input v-model="numberform.telcode"></el-input> </el-form-item> <el-form-item label="鍏崇郴"> - <el-input v-model="numberform.name"></el-input> + <el-input v-model="numberform.relation"></el-input> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button @click="AddanumberVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="Addanumber">纭� 瀹�</el-button> + <el-button type="primary" @click="archivecontact">纭� 瀹�</el-button> </div> </el-dialog> </div> @@ -589,16 +743,29 @@ import resetPwd from "./resetPwd"; import * as echarts from "echarts"; import SFtable from "@/components/SFtable"; //琛ㄦ牸缁勪欢 - -import { getUserProfile } from "@/api/system/user"; -import { listJob } from "@/api/monitor/job"; //鑾峰彇鍒楄〃鎺ュ彛寰呭畾 +import { listtag } from "@/api/system/label"; +import { + messagelistpatient, + addmedicalhistory, + getmedicalhistory, + editmedicalhistory, + addcontactinformation, + editcontactinformation, + getcontactinformation, + delcontactinformation, + listcontactinformation, + alterpatient, + Patientclinic, +} from "@/api/patient/homepage"; +import { listPatouthosp } from "@/api/smartor/patouthosp"; +import { listpatient } from "@/api/patient/record"; export default { name: "Profile", components: { userAvatar, userInfo, resetPwd, SFtable }, data() { return { - user: {}, + userform: {}, roleGroup: {}, postGroup: {}, form: {}, @@ -609,11 +776,14 @@ tjnumber: 12, yynumber: 12, total: 0, // 鎬绘潯鏁� + titletb: "鏂板鑱旂郴鏂瑰紡", activeTab: "userinfo", + id: "", + loading: false, activeName: "health", //涓�绫诲鑸� sonactiveName: "outpatient", //鍋ュ悍鐩戞祴瀵艰埅 sontwoactiveName: "blood", //鍖荤枟妗f瀵艰埅 - dynamicTags: ["鏍囩涓�", "鏍囩浜�", "鏍囩涓�"], + dynamicTags: [], record: [ { name: "瀹f暀浠诲姟", @@ -640,28 +810,7 @@ echartdom: {}, xtechartdom: {}, tzechartdom: {}, - tableData: [ - { - date: "2016-05-02", - name: "鐜嬪皬铏�", - address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�", - }, - { - date: "2016-05-04", - name: "鐜嬪皬铏�", - address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1517 寮�", - }, - { - date: "2016-05-01", - name: "鐜嬪皬铏�", - address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1519 寮�", - }, - { - date: "2016-05-03", - name: "鐜嬪皬铏�", - address: "涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�", - }, - ], + tableData: [], tableDatalist: [ { id: 12, @@ -682,15 +831,9 @@ address: "89", }, ], - serviceData: [ - { - daya: "2023-12-12", - hospitalname: "鍗忓拰", - result: "闊у甫鎷変激", - administrative: "楠ㄧ", - doctor: "鍚村ぇ榫�", - }, - ], + serviceData: [], + serviceDatary: [], + serviceDatacy: [], options: [ { value: "1", @@ -737,9 +880,45 @@ { label: "娴嬮噺鏃堕棿", width: "", prop: "name" }, { label: "浣撴俯", width: "", prop: "sex" }, ], + // 琛ㄥ崟鏍¢獙 + rules: { + name: [ + { required: true, message: "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }, + { + min: 2, + max: 20, + message: "鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿", + trigger: "blur", + }, + ], + + sex: [{ required: true, message: "鎬у埆涓嶈兘涓虹┖", trigger: "blur" }], + age: [{ required: true, message: "骞撮緞涓嶈兘涓虹┖", trigger: "blur" }], + nation: [{ required: true, message: "姘戞棌涓嶈兘涓虹┖", trigger: "blur" }], + telcode: [ + { required: true, message: "鑱旂郴鏂瑰紡涓嶈兘涓虹┖", trigger: "blur" }, + { + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, + message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜", + trigger: "blur", + }, + ], + idcardtype: [ + { required: true, message: "璇佷欢绫诲瀷涓嶈兘涓虹┖", trigger: "blur" }, + ], + idcardno: [ + { required: true, message: "璇佷欢鍙疯兘涓虹┖", trigger: "blur" }, + ], + placeOfResidence: [ + { required: true, message: "灞呬綇鍦颁笉鑳戒负绌�", trigger: "blur" }, + ], + }, }; }, created() { + this.id = this.$route.query.id; + this.getuserinfo(); + this.gettabList(); this.$nextTick(function () { this.echartdom = document.getElementById("xyeCharts"); this.xtechartdom = document.getElementById("xteCharts"); @@ -755,41 +934,264 @@ this.xueyangechartsInit(); this.twechartsInit(); }); - this.getList(); }, - methods() {}, methods: { - // 鏌ヨ鍒楄〃 - getList() { + // 鏌ヨ鍖荤枟妗f鍚勫垪琛ㄤ俊鎭� + getList(type) { this.loading = true; - listJob(this.queryParams).then((response) => { - this.jobList = 1; - this.total = 1; - this.loading = false; + if (type == 0) { + // 闂ㄨ瘖璁板綍 + listPatouthosp({ patid: this.id }).then((response) => { + if (response.code == 200) { + this.serviceData = response.rows; + } + }); + } else if (type == 1) { + listpatient({ patid: this.id }).then((response) => { + if (response.code == 200) { + this.serviceDatary = response.rows; + } + }); + } else if (type == 2) { + listpatient({ patid: this.id }).then((response) => { + if (response.code == 200) { + this.serviceDatacy = response.rows; + } + }); + } + }, + getcontactlist() { + listcontactinformation({ patid: this.id }).then((response) => { + this.tableData = response.rows; }); }, + processElement(element) { + return { ...element, isoperation: null }; + }, + // 鑾峰彇鍩虹淇℃伅 + getuserinfo() { + const queryParams = { + pid: Number(this.id), + allhosp: "0", + pageNum: 1, + }; + // 鎮h�呭熀纭�淇℃伅 + messagelistpatient(queryParams).then((response) => { + this.userform = response.rows[0]; + // this.dynamicTags = response.rows[0].tagList; + this.dynamicTags = response.rows[0].tagList.map(this.processElement); + console.log(this.dynamicTags); + }); + // 鐥呭彶淇℃伅 + getmedicalhistory({ pid: this.id }).then((res) => { + if (res.code == 200 && res.rows[0]) { + this.form = res.rows[0]; + } + }); + // 鑱旂郴淇℃伅 + this.getcontactlist(); + }, + // 淇濆瓨鎮h�呮。妗� + savefile() { + this.$refs["userform"].validate((valid) => { + if (valid) { + this.userform.isoperation = 2; + this.userform.tagList = this.dynamicTags; + alterpatient(this.userform).then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("鍩虹淇℃伅淇濆瓨鎴愬姛"); + } else { + this.$modal.msgError("鍩虹淇℃伅淇敼澶辫触"); + } + }); + // 鐥呭彶 + this.medicalhistory(); + } + }); + }, + // 鐥呭彶 + medicalhistory() { + if (this.form.id) { + editmedicalhistory(this.form).then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("鐥呭彶淇濆瓨鎴愬姛"); + } else { + this.$modal.msgError("鐥呭彶淇敼澶辫触"); + } + }); + } else { + this.form.pid = this.id; + addmedicalhistory(this.form).then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("鐥呭彶淇濆瓨鎴愬姛"); + } else { + this.$modal.msgError("鐥呭彶淇敼澶辫触"); + } + }); + } + }, + // 鑱旂郴鏂瑰紡--------------- + archivecontact() { + if (this.numberform.id) { + editcontactinformation(this.numberform).then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("鑱旂郴鏂瑰紡淇敼鎴愬姛"); + this.getcontactlist(); + this.AddanumberVisible = false; + } else { + this.$modal.msgError("鑱旂郴鏂瑰紡淇敼澶辫触"); + } + }); + } else { + this.numberform.patid = this.id; + addcontactinformation(this.numberform).then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("鑱旂郴鏂瑰紡鏂板鎴愬姛"); + this.getcontactlist(); + this.AddanumberVisible = false; + } else { + this.$modal.msgError("鑱旂郴鏂瑰紡鏂板澶辫触"); + } + }); + } + this.numberform = {}; + }, + deltb(row) { + this.$modal + .confirm("鏄惁纭鍒犻櫎璇ユ暟鎹」锛�") + .then(() => { + if (row.id) { + delcontactinformation(row.id).then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("鑱旂郴鏂瑰紡鍒犻櫎鎴愬姛"); + this.getcontactlist(); + } else { + this.$modal.msgError("鑱旂郴鏂瑰紡鍒犻櫎澶辫触"); + } + }); + } else { + let index = this.tableData.indexOf(obj); + this.tableData.splice(index, 1); + } + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }) + .catch(() => {}); + }, + addcompiletb() { + this.titletb = "鏂板鑱旂郴鏂瑰紡"; + this.AddanumberVisible = true; + }, + compiletb(row) { + this.numberform = row; + this.titletb = "淇敼鑱旂郴鏂瑰紡"; + this.AddanumberVisible = true; + }, + defaulttb(row) { + this.$modal + .confirm("鏄惁纭璁剧疆璇ユ暟鎹」涓洪粯璁よ仈绯讳汉锛�") + .then(() => { + this.tableData.forEach((obj, index) => { + if (obj === row) { + obj.isdefault = 1; + this.numberform = obj; + this.archivecontact(); + } else if (obj.isdefault == 1) { + obj.isdefault = 0; + this.numberform = obj; + this.archivecontact(); + } else { + obj.isdefault = 0; + } + }); + this.$modal.msgSuccess("璁剧疆鎴愬姛"); + }) + .catch(() => {}); + }, + tableRowClassName({ row, rowIndex }) { + if (row.isdefault == "1") { + return "warning-row"; + } + return ""; + }, + // tab鍒囨崲 handleClick(tab, event) { - console.log(tab, event); + if (tab.index == "1") { + this.getList(0); + } + }, + handleClickson(tab, event) { + console.log(tab.index, "son"); + this.getList(tab.index); }, // 鑱旂郴鏂瑰紡鏂板 Addanumber() {}, + // 鏍囩-------------------------- + /** 鏌ヨ鏍囩鍒楄〃 */ + gettabList() { + const tagqueryParams = { + pageNum: 1, + pageSize: 10000, + tagcategoryid: "0", + }; + listtag(tagqueryParams).then((response) => { + this.options = response.rows; + console.log(this.options, "鏍囩"); + }); + }, + remoteMethod(value) { + const illnessqueryParams = { + pageNum: 1, + pageSize: 100, + tagname: value, + tagcategoryid: "0", + }; + this.loading = true; + setTimeout(() => { + this.loading = false; + listtag(illnessqueryParams).then((response) => { + this.options = response.rows; + }); + }, 200); + }, handleClose(tag) { - this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1); + const lindex = this.dynamicTags.indexOf(tag); + // this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1); + this.dynamicTags[lindex].isoperation = 3; }, showInput() { this.inputVisible = true; - this.$nextTick((_) => { - this.$refs.saveTagInput.$refs.input.focus(); - }); + console.log("灞曠ず"); }, handleInputConfirm() { - let inputValue = this.inputValue; - if (inputValue) { - this.dynamicTags.push(inputValue); + let tagvalue = {}; + let tagname = this.inputValue; + if (tagname) { + listtag({ + pageNum: 1, + pageSize: 1000, + tagcategoryid: "0", + tagname: tagname, + }).then((res) => { + if (res.rows[0]) { + tagvalue = res.rows[0]; + tagvalue.isoperation = 1; + } else { + tagvalue = { + tagname: tagname, + isoperation: 1, + }; + } + console.log(tagvalue); + // this.userform.tagList.push(tagvalue); + this.dynamicTags.push(tagvalue); + console.log(this.userform.tagList); + console.log(this.dynamicTags); + }); } + console.log("鍏充簡"); this.inputVisible = false; this.inputValue = ""; }, @@ -870,10 +1272,8 @@ // 琛�绯栧浘琛� xtechartsInit() { // 鍩轰簬鍑嗗濂界殑dom锛屽垵濮嬪寲echarts瀹炰緥 - // console.log(echarts); - console.log(this.xtechartdom); + var myxyChart = echarts.init(this.xtechartdom); - console.log(myxyChart); const data = [ ["2000-06-05", 116], ["2000-06-06", 129], @@ -964,15 +1364,13 @@ }, ], }; - console.log("ss"); // 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁鏄剧ず鍥捐〃銆� myxyChart.setOption(option); }, // 浣撻噸鍥捐〃 tzechartsInit() { // 鍩轰簬鍑嗗濂界殑dom锛屽垵濮嬪寲echarts瀹炰緥 - console.log(echarts); - console.log(this.tzechartdom); + var myxyChart = echarts.init(this.tzechartdom); var option = { title: { @@ -1031,7 +1429,6 @@ // 蹇冪巼 xlechartsInit() { var myxyChart = echarts.init(this.xlechartdom); - console.log(myxyChart); const data = [ ["2000-06-05", 116], ["2000-06-06", 129], @@ -1104,7 +1501,6 @@ }, ], }; - console.log("ss"); // 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁鏄剧ず鍥捐〃銆� myxyChart.setOption(option); }, @@ -1176,14 +1572,13 @@ }, { offset: 1, - color: "#c4d7d6" + color: "#c4d7d6", }, ]), }, }, ], }; - console.log("ss"); // 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁鏄剧ず鍥捐〃銆� myxyChart.setOption(option); }, @@ -1195,12 +1590,12 @@ ["2000-06-05", 36.8], ["2000-06-06", 36.2], ["2000-06-07", 37.8], - ["2000-06-08",37.8], - ["2000-06-09",37.2], - ["2000-06-10",36.2], - ["2000-06-11",37.8], - ["2000-06-12",36.9], - ["2000-06-13",36.8], + ["2000-06-08", 37.8], + ["2000-06-09", 37.2], + ["2000-06-10", 36.2], + ["2000-06-11", 37.8], + ["2000-06-12", 36.9], + ["2000-06-13", 36.8], ["2000-06-14", 36.4], ["2000-06-15", 37.1], ["2000-06-16", 36.9], @@ -1210,7 +1605,7 @@ ["2000-06-20", 36.6], ["2000-06-21", 36.8], ["2000-06-22", 36.2], - ["2000-06-23",37.8], + ["2000-06-23", 37.8], ]; const dateList = data.map(function (item) { return item[0]; @@ -1231,7 +1626,7 @@ max: 400, }, ], - + tooltip: { trigger: "axis", }, @@ -1249,7 +1644,6 @@ }, ], }; - console.log("ss"); // 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁鏄剧ず鍥捐〃銆� myxyChart.setOption(option); }, @@ -1261,7 +1655,7 @@ .personages { height: 88px; width: 100%; - background-color: #2486b9; + background-color: #5e86f9; border-radius: 5px; padding: 20px; margin-bottom: 10px; @@ -1290,7 +1684,7 @@ } .xinz-inf { font-size: 18px; - white-space: nowrap; + // white-space: nowrap; overflow: hidden; text-overflow: ellipsis; @@ -1351,6 +1745,15 @@ margin-bottom: 10px; border-left: 8px solid rgb(65, 161, 190); } + .headlines { + font-size: 25px; + display: flex; + width: 88%; + justify-content: space-between; + padding-left: 5px; + margin-bottom: 10px; + border-left: 8px solid rgb(65, 161, 190); + } .bottom-message { margin-bottom: 25px; margin-left: 100px; @@ -1376,7 +1779,7 @@ .sontwoactiveName { margin: 0 auto; } -// .columcz { -// align-items: center!important; -// } +::v-deep.el-table .warning-row { + background: oldlace; +} </style> -- Gitblit v1.9.3