From 8d0f7fcc4a961a6a2cd969171066f652cc8e736f Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期五, 18 四月 2025 16:56:52 +0800 Subject: [PATCH] 测试完成 --- src/views/patient/patient/profile/index.vue | 764 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 562 insertions(+), 202 deletions(-) diff --git a/src/views/patient/patient/profile/index.vue b/src/views/patient/patient/profile/index.vue index 2be9058..3e27924 100644 --- a/src/views/patient/patient/profile/index.vue +++ b/src/views/patient/patient/profile/index.vue @@ -42,25 +42,19 @@ <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 - ></el-tab-pane + ><span class="mulsz" slot="label">闂ㄨ瘖</span></el-tab-pane > <el-tab-pane name="inhospital" - ><span class="mulsz" slot="label" - >浣忛櫌({{ zynumber }}) - </span></el-tab-pane + ><span class="mulsz" slot="label">鍦ㄩ櫌 </span></el-tab-pane > <el-tab-pane name="checkout" - ><span class="mulsz" slot="label" - >浣撴({{ jynumber }}) - </span></el-tab-pane + ><span class="mulsz" slot="label">鍑洪櫌 </span></el-tab-pane > </el-tabs> </el-tab-pane> - <el-tab-pane name="monitor"> + <!-- <el-tab-pane name="monitor"> <span class="mulsz" slot="label" ><i class="el-icon-s-data"></i> 鍋ュ悍鐩戞祴</span > @@ -97,7 +91,7 @@ </span></el-tab-pane > </el-tabs></el-tab-pane - > + > --> <el-tab-pane name="serve"> <span class="mulsz" slot="label" ><i class="el-icon-s-custom"></i> 鏈嶅姟璁板綍</span @@ -113,81 +107,111 @@ <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">{{ userform.name }}</span> - </div></el-col - > - <el-col :span="12" - ><div class="grid-content bg-purple"> - 鑱旂郴鐢佃瘽锛�<span class="spanvalue">{{ userform.telcode }}</span> - </div></el-col - > - </el-row> - <el-row :gutter="20"> - <el-col :span="24" - ><div class="grid-content bg-purple"> - 鍑虹敓鍦帮細<span class="spanvalue">{{ userform.birthplace }}</span> - </div></el-col - > - </el-row> - <el-row :gutter="20"> - <el-col :span="24" - ><div class="grid-content bg-purple"> - 灞呬綇鍦帮細<span class="spanvalue">{{ - userform.placeOfResidence - }}</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 - allow-create - default-first-option - placeholder="璇烽�夋嫨" - > - <el-option - v-for="item in options" - :key="item.tagname" - :label="item.tagname" - :value="item.tagname" - > - </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-row> + <el-row :gutter="20"> + <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-col :span="12"> + <el-form-item label="浜插睘鑱旂郴鏂瑰紡" prop="name"> + <el-input + v-model="userform.telcodewx" + placeholder="璇疯緭鍏ュ鍚�" + maxlength="30" + ></el-input> </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" label-width="100px"> + <el-form :model="form" label-width="100px"> <el-row> <el-col :span="8"> <el-form-item label="杩囧線鐤剧梾" prop="name"> @@ -296,7 +320,7 @@ <!-- 鑱旂郴鐢佃瘽 --> <div class="bottom-message"> <div class="headline"> - 鍙风爜缁存姢<span style="margin-right: 60px"> </span> + 浜插睘鍙风爜缁存姢<span style="margin-right: 60px"> </span> <el-button type="primary" @click="addcompiletb">+鏂板</el-button> </div> <div class="Table-screen"> @@ -307,7 +331,7 @@ > <el-table-column prop="id" label="搴忓彿" width="180"> </el-table-column> - <el-table-column prop="contactname" label="濮撳悕" width="180"> + <el-table-column prop="contactname" label="濮撳悕" width="100"> </el-table-column> <el-table-column prop="contactway" label="鑱旂郴鏂瑰紡" width="180"> </el-table-column> @@ -346,24 +370,84 @@ <!-- 闂ㄨ瘖 --> <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="admitdate" + prop="admitdate" + width="160" + > + <template slot-scope="scope"> + <span>{{ formatTime(scope.row.admitdate) }}</span> + </template> </el-table-column> - <el-table-column prop="administrative" label="灏辫瘖绉戝" width="180"> - </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> + <el-table-column + label="闂ㄨ瘖鍙�" + align="center" + key="outhospno" + prop="outhospno" + /> + <el-table-column + label="濮撳悕" + width="100" + align="center" + key="patname" + prop="patname" + /> + + <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="leavediagname" + prop="leavediagname" + width="190" + /> + + <el-table-column + label="灏辫瘖绉戝" + align="center" + key="deptname" + prop="deptname" + width="120" + /> + <el-table-column + label="鎵�鍦ㄧ梾鍖�" + align="center" + key="leavehospitaldistrictname" + prop="leavehospitaldistrictname" + width="120" + /> + <el-table-column + label="涓绘不鍖荤敓" + align="center" + key="drname" + prop="drname" + width="120" + /> + + <el-table-column + label="璐d换鎶ゅ+" + align="center" + key="nurseName" + prop="nurseName" + width="120" + /> + </el-table> <pagination v-show="total > 0" :total="total" @@ -374,41 +458,157 @@ </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-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 :data="serviceDatary" style="width: 100%"> + <el-table-column + label="浣忛櫌鍙�" + align="center" + key="inhospno" + prop="inhospno" + width="180" + /> + <el-table-column + label="濮撳悕" + width="100" + align="center" + key="patname" + prop="patname" + /> + <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="leavediagname" + prop="leavediagname" + width="190" + /> + + <el-table-column + label="灏辫瘖绉戝" + align="center" + key="deptname" + prop="deptname" + width="120" + /> + <el-table-column + label="鎵�鍦ㄧ梾鍖�" + align="center" + key="leavehospitaldistrictname" + prop="leavehospitaldistrictname" + width="120" + /> + <el-table-column + label="涓绘不鍖荤敓" + align="center" + key="drname" + prop="drname" + width="120" + /> + + <el-table-column + label="璐d换鎶ゅ+" + align="center" + key="nurseName" + prop="nurseName" + width="120" + /> + <el-table-column + label="搴婁綅鍙�" + align="center" + key="bedNo" + prop="bedNo" + width="120" + /> </el-table> </div> - <!-- 浣撴 --> + <!-- 鍑洪櫌 --> <div v-if="sonactiveName == 'checkout'"> - <el-table :data="serviceData" style="width: 100%"> - <el-table-column prop="godaya" label="浣撴绫诲瀷"> </el-table-column> - <el-table-column prop="hospitalname" 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 :data="serviceDatacy" style="width: 100%"> + <el-table-column + label="浣忛櫌鍙�" + align="center" + key="inhospno" + prop="inhospno" + width="120" + /> + <el-table-column + label="濮撳悕" + width="100" + align="center" + key="patname" + prop="patname" + /> + <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="leavediagname" + prop="leavediagname" + width="190" + /> + + <el-table-column + label="灏辫瘖绉戝" + align="center" + key="deptname" + prop="deptname" + width="120" + /> + <el-table-column + label="鎵�鍦ㄧ梾鍖�" + align="center" + key="leavehospitaldistrictname" + prop="leavehospitaldistrictname" + width="120" + /> + <el-table-column + label="涓绘不鍖荤敓" + align="center" + key="drname" + prop="drname" + width="120" + /> + + <el-table-column + label="璐d换鎶ゅ+" + align="center" + key="nurseName" + prop="nurseName" + width="120" + /> + + <el-table-column + label="搴婁綅鍙�" + align="center" + key="bedNo" + prop="bedNo" + width="120" + /> </el-table> </div> </div> @@ -429,23 +629,38 @@ border-left: 4px solid rgb(190, 65, 134); " > - {{ item.name }} + <span v-if="item.serviceType == 2">鍑洪櫌闅忚</span> + <span v-if="item.serviceType == 1">蹇冪數闅忚</span> + <span v-if="item.serviceType == 3">褰卞儚闅忚</span> + <span v-if="item.serviceType == 4">瀹f暀鍏虫��</span> </div> <el-divider></el-divider> <div style="margin-top: 10px"> - 闅忚鐘舵�侊細宸茬粓姝�<span style="color: #2775b6" - >锛堢粓姝㈠師鍥狅細鎮h�呯棅鎰堝洖璁跨粨鏉燂紝缁堟鏃堕棿锛�2023-12-18 12:00锛�</span - > + 鏈嶅姟鍚嶇О锛�<span style="color: #2775b6">{{ + item.templatename + }}</span> </div> <div style="margin-top: 10px"> - 闅忚鍙戦�佹椂闂达細<span style="color: #2775b6">2023-11-23 12:00</span> + 鍒涘缓鏃堕棿锛�<span style="color: #2775b6">{{ item.createTime }}</span> </div> <div style="margin-top: 10px"> - 闅忚瀹屾垚鏃堕棿锛�<span style="color: #2775b6">2023-12-18 12:00</span> + 瀹屾垚鏃堕棿锛�<span style="color: #2775b6">{{ item.finishtime }}</span> </div> <div style="margin-top: 10px"> - 鐤肩棝绋嬪害锛�<span style="color: #2775b6">涓害</span> + <el-row :gutter="20"> + <el-col :span="12" + >绉戝锛� + <span style="color: #2775b6">{{ item.deptname }}</span></el-col + > + <el-col :span="12" + >鐥呭尯锛� + <span style="color: #2775b6">{{ + item.leavehospitaldistrictname + }}</span></el-col + > + </el-row> </div> + <div style=" font-size: 20px; @@ -454,34 +669,38 @@ border-left: 4px solid rgb(65, 161, 190); " > - 浜哄伐闅忚璁板綍 + 浜哄伐璁板綍 </div> <div style="margin-top: 10px"> <el-row :gutter="20"> <el-col :span="6" - >闅忚鏃ユ湡锛� - <span style="color: #2775b6">2023-11-22 11:22</span></el-col + >璐熻矗浜猴細 + <span style="color: #2775b6">{{ item.createBy }}</span></el-col > <el-col :span="6" - >闅忚浜猴細 <span style="color: #2775b6">鍚村皬榫�</span></el-col + >涓绘不鍖荤敓锛� + <span style="color: #2775b6">{{ item.drname }}</span></el-col > <el-col :span="6" - >鎮h�呴厤鍚堝害锛� <span style="color: #2775b6">楂�</span></el-col + >璐d换鎶ゅ+ + <span style="color: #2775b6">{{ item.nurseName }}</span></el-col > </el-row> </div> <div style="margin-top: 10px"> - 闅忚缁撴灉锛� <span style="color: #2775b6">鎮h�呯棅鎰堬紝韬綋鍊嶆</span> + 缁撴灉鐘舵�侊細 + <span style="color: #2775b6" v-if="item.excep == 0">鏈嶅姟姝e父</span> + <span style="color: #b55e54" v-if="item.excep == 1">寮傚父</span> </div> - <div style="margin-top: 10px"> - 闅忚澶囨敞锛� <span style="color: #2775b6">鎻愰啋娉ㄦ剰楗鍋ュ悍</span> - </div> + <!-- <div style="margin-top: 10px"> + 澶囨敞锛� + <span style="color: #2775b6">鎻愰啋娉ㄦ剰楗鍋ュ悍</span> + </div> --> </el-card> </div> </div> <!-- 鍋ュ悍鐩戞祴 --> - <div class="medical-record" v-show="activeName == 'monitor'"> - <!-- 琛�鍘嬪浘鏍� --> + <!-- <div class="medical-record" v-show="activeName == 'monitor'"> <div v-show="sontwoactiveName == 'blood'" style="display: flex"> <div id="xyeCharts" @@ -499,7 +718,6 @@ </el-card> </div> </div> - <!-- 琛�绯� --> <div v-show="sontwoactiveName == 'glucose'" style="display: flex"> <div id="xteCharts" @@ -517,7 +735,6 @@ </el-card> </div> </div> - <!-- 浣撻噸 --> <div v-show="sontwoactiveName == 'weight'" style="display: flex"> <div id="tzeCharts" @@ -535,7 +752,6 @@ </el-card> </div> </div> - <!-- 蹇冪巼 --> <div v-show="sontwoactiveName == 'heartrate'" style="display: flex"> <div id="xleCharts" @@ -553,7 +769,6 @@ </el-card> </div> </div> - <!-- 琛�姘� --> <div v-show="sontwoactiveName == 'bloodoxygen'" style="display: flex"> <div id="xueyangeCharts" @@ -571,7 +786,6 @@ </el-card> </div> </div> - <!-- 浣撴俯 --> <div v-show="sontwoactiveName == 'animalheat'" style="display: flex"> <div id="tweCharts" @@ -589,15 +803,15 @@ </el-card> </div> </div> - </div> + </div> --> <el-dialog :title="titletb" :visible.sync="AddanumberVisible"> <el-form :model="numberform" label-width="100px"> - <el-form-item label="濮撳悕"> + <el-form-item label="濮撳悕" width="100"> <el-input v-model="numberform.contactname"></el-input> </el-form-item> <el-form-item label="鑱旂郴鐢佃瘽"> - <el-input v-model="numberform.contactway"></el-input> + <el-input v-model="numberform.telcode"></el-input> </el-form-item> <el-form-item label="鍏崇郴"> <el-input v-model="numberform.relation"></el-input> @@ -629,7 +843,12 @@ delcontactinformation, listcontactinformation, alterpatient, + Patientclinic, } from "@/api/patient/homepage"; + +import { getsearchrResults, getTaskservelist } from "@/api/AiCentre/index"; +import { listPatouthosp } from "@/api/smartor/patouthosp"; +import { listpatient } from "@/api/patient/record"; export default { name: "Profile", @@ -650,20 +869,41 @@ titletb: "鏂板鑱旂郴鏂瑰紡", activeTab: "userinfo", id: "", + loading: false, activeName: "health", //涓�绫诲鑸� - sonactiveName: "outpatient", //鍋ュ悍鐩戞祴瀵艰埅 + sonactiveName: "inhospital", //鍋ュ悍鐩戞祴瀵艰埅 sontwoactiveName: "blood", //鍖荤枟妗f瀵艰埅 dynamicTags: [], record: [ { name: "瀹f暀浠诲姟", + serviceType: "4", + templatename: "绠¢ゲ瀹f暀涓�鏈�", + createTime: "2024-11-10", + finishtime: "2024-11-12", + createBy: "鐜嬫斂", + drname: "鍒樻槑", + nurseName: "寮犳窇鐞�", + excep: "0", + deptname: "鍛煎惛绉�", + leavehospitaldistrictname: "浜旂梾鍖�", }, { - name: "閫氱煡浠诲姟", + name: "闅忚浠诲姟", + serviceType: "2", + templatename: "蹇冭绠¢殢璁夸竴鏈�", + createTime: "2024-11-11", + finishtime: "2024-11-14", + createBy: "绔犵▼", + drname: "鍒樻槑", + nurseName: "鏉庝附", + excep: "0", + deptname: "鍛煎惛绉�", + leavehospitaldistrictname: "浜旂梾鍖�", }, - { - name: "闂嵎璋冩煡", - }, + // { + // name: "闂嵎璋冩煡", + // }, ], inputVisible: false, AddanumberVisible: false, @@ -701,15 +941,9 @@ address: "89", }, ], - serviceData: [ - { - daya: "2023-12-12", - hospitalname: "鍗忓拰", - result: "闊у甫鎷変激", - administrative: "楠ㄧ", - doctor: "鍚村ぇ榫�", - }, - ], + serviceData: [], + serviceDatary: [], + serviceDatacy: [], options: [ { value: "1", @@ -756,9 +990,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"); @@ -774,20 +1044,46 @@ this.xueyangechartsInit(); this.twechartsInit(); }); - this.id = this.$route.query.id; - this.getuserinfo(); - this.gettabList(); }, methods: { - // 鏌ヨ妗f鍒楄〃淇℃伅 - getList() { + // 鏌ヨ鍖荤枟妗f鍚勫垪琛ㄤ俊鎭� + getList(type) { this.loading = true; + if (type == 0) { + // 闂ㄨ瘖璁板綍 + listPatouthosp({ patid: this.id }).then((response) => { + if (response.code == 200) { + // this.serviceData = response.rows; + this.serviceData = []; + } + }); + } else if (type == 1) { + listpatient({ patid: this.id, cry: 0 }).then((response) => { + if (response.code == 200) { + this.serviceDatary = response.rows; + } + }); + } else if (type == 2) { + listpatient({ patid: this.id, cry: 1 }).then((response) => { + if (response.code == 200) { + this.serviceDatacy = response.rows; + console.log(this.serviceDatacy); + this.$forceUpdate(); + } + }); + } }, getcontactlist() { listcontactinformation({ patid: this.id }).then((response) => { this.tableData = response.rows; + if (this.tableData.length) { + this.userform.telcodewx = this.tableData[0].contactway; + } }); + }, + processElement(element) { + return { ...element, isoperation: null }; }, // 鑾峰彇鍩虹淇℃伅 getuserinfo() { @@ -799,27 +1095,36 @@ // 鎮h�呭熀纭�淇℃伅 messagelistpatient(queryParams).then((response) => { this.userform = response.rows[0]; - this.dynamicTags = response.rows[0].tagList; + // 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) => { - this.form = res.rows[0]; + if (res.code == 200 && res.rows[0]) { + this.form = res.rows[0]; + } }); // 鑱旂郴淇℃伅 this.getcontactlist(); }, // 淇濆瓨鎮h�呮。妗� savefile() { - this.userform.tagList = this.dynamicTags; - alterpatient(this.userform).then((res) => { - if (res.code == 200) { - this.$modal.msgSuccess("鍩虹淇℃伅淇濆瓨鎴愬姛"); - } else { - this.$modal.msgError("鍩虹淇℃伅淇敼澶辫触"); + 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(); } }); - // 鐥呭彶 - this.medicalhistory(); }, // 鐥呭彶 medicalhistory() { @@ -920,46 +1225,101 @@ .catch(() => {}); }, tableRowClassName({ row, rowIndex }) { - console.log(row); if (row.isdefault == "1") { return "warning-row"; } return ""; }, + // tab鍒囨崲 + handleClick(tab, event) { + if (tab.index == "1") { + this.getList(1); + } else if (tab.index == "2") { + this.handleClickfw(); + } + }, + handleClickson(tab, event) { + console.log(tab, "son"); + this.getList(tab.index); + }, + // 鏌ヨ鏈嶅姟璁板綍 + handleClickfw() { + getTaskservelist({ + patid: this.id, + }).then((res) => { + if (res.code == 200) { + this.record = res.rows[0].serviceSubtaskList; + } + }); + }, + // 鑱旂郴鏂瑰紡鏂板 + Addanumber() {}, + // 鏍囩-------------------------- /** 鏌ヨ鏍囩鍒楄〃 */ gettabList() { const tagqueryParams = { pageNum: 1, - pageSize: 1000, + pageSize: 10000, tagcategoryid: "0", }; listtag(tagqueryParams).then((response) => { this.options = response.rows; + console.log(this.options, "鏍囩"); }); }, - - // tab鍒囨崲 - handleClick(tab, event) { - console.log(tab, event); + 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); }, - // 鑱旂郴鏂瑰紡鏂板 - Addanumber() {}, 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 = ""; }, @@ -1452,7 +1812,7 @@ } .xinz-inf { font-size: 18px; - white-space: nowrap; + // white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -- Gitblit v1.9.3