已删除1个文件
已重命名5个文件
已修改17个文件
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¡ä¾å表å详æ
|
| | | export function witnessList(data) { |
| | | return request({ |
| | | url: '/project/donationwitness/getDonationwitnessBaseInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // è·åè§è¯ä¿®æ¹ |
| | | export function witnessadd(data) { |
| | | return request({ |
| | | url: '/project/donationwitness/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // è·åè§è¯ä¿®æ¹ |
| | | export function witnessedit(data) { |
| | | return request({ |
| | | url: '/project/donationwitness/edit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¡ä¾å表å详æ
|
| | | export function completionList(data) { |
| | | return request({ |
| | | url: '/project/donatecompletioninfo/getDonationCompletionBaseInfo', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // è·åè§è¯ä¿®æ¹ |
| | | export function completionadd(data) { |
| | | return request({ |
| | | url: '/project/donatecompletioninfo/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // è·åè§è¯ä¿®æ¹ |
| | | export function completionedit(data) { |
| | | return request({ |
| | | url: '/project/donatecompletioninfo/edit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | <el-button |
| | | type="success" |
| | | @click="handleProcure" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | :loading="confirmLoading" |
| | | > |
| | | 确认è·å |
| | | </el-button> |
| | |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="120px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä½é¢å·" prop="hospitalNo"> |
| | | <el-input v-model="form.hospitalNo" readonly /> |
| | | <el-form-item label="ä½é¢å·" prop="inpatientno"> |
| | | <el-input v-model="form.inpatientno" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä½é¢å·" prop="caseNo"> |
| | | <el-input v-model="form.caseNo" readonly /> |
| | | <el-form-item label="æ¡ä¾ç¼å·" prop="caseNo"> |
| | | <el-input v-model="form.caseNo" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æç®è
å§å" prop="donorName"> |
| | | <el-input v-model="form.donorName" /> |
| | | <el-form-item label="æç®è
å§å" prop="name"> |
| | | <el-input v-model="form.name" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ§å«" prop="gender"> |
| | | <el-select v-model="form.gender" style="width: 100%"> |
| | | <el-form-item label="æ§å«" prop="sex"> |
| | | <el-select v-model="form.sex" style="width: 100%"> |
| | | <el-option label="ç·" value="0" /> |
| | | <el-option label="女" value="1" /> |
| | | </el-select> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åºçæ¥æ" prop="birthDate"> |
| | | <el-date-picker |
| | | v-model="form.birthDate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | /> |
| | | <el-form-item label="æç®ç±»å«" prop="donationcategory"> |
| | | <el-select v-model="form.donationcategory" style="width: 100%"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_DonationCategory || []" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¡å" prop="bloodtype"> |
| | | <el-select v-model="form.bloodtype" style="width: 100%"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_BloodType || []" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶å·ç " prop="idcardno"> |
| | | <el-input v-model="form.idcardno" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è®°å½ç¶æ" prop="recordstate"> |
| | | <el-input v-model="form.recordstate" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¾ç
è¯æ" prop="diagnosis"> |
| | | <el-form-item label="ç¾ç
è¯æ" prop="diagnosisname"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="2" |
| | | v-model="form.diagnosis" |
| | | v-model="form.diagnosisname" |
| | | placeholder="请è¾å
¥ç¾ç
è¯æä¿¡æ¯" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è·åæ¶é´" prop="procurementTime"> |
| | | <el-form-item label="æ»äº¡æ¶é´" prop="deathtime"> |
| | | <el-date-picker |
| | | v-model="form.procurementTime" |
| | | v-model="form.deathtime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.procurementStatus !== 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- ææ¯ç¸å
³ä¿¡æ¯ --> |
| | | <el-divider content-position="left">ææ¯ä¿¡æ¯</el-divider> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ææ¯å»ç" prop="operationdoctor"> |
| | | <el-input v-model="form.operationdoctor" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ææ¯å¼å§æ¶é´" prop="operationbegtime"> |
| | | <el-date-picker |
| | | v-model="form.operationbegtime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ææ¯ç»ææ¶é´" prop="operationendtime"> |
| | | <el-date-picker |
| | | v-model="form.operationendtime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ææ¯åç§°" prop="surgeryName"> |
| | | <el-input v-model="form.surgeryName" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ææ¯å¼å§æ¶é´" prop="surgeryStartTime"> |
| | | <el-form-item |
| | | label="è
¹ä¸»å¨èæç®¡æ¶é´" |
| | | prop="abdominalaortacannulatime" |
| | | > |
| | | <el-date-picker |
| | | v-model="form.surgeryStartTime" |
| | | v-model="form.abdominalaortacannulatime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¾ä½æ»äº¡æ¶é´" prop="donorDeathTime"> |
| | | <el-form-item |
| | | label="è
¹ä¸»å¨èçæ³¨æ¶é´" |
| | | prop="abdominalaortaperfusiontime" |
| | | > |
| | | <el-date-picker |
| | | v-model="form.donorDeathTime" |
| | | v-model="form.abdominalaortaperfusiontime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è
¹ä¸»å¨èæç®¡æ¶é´" prop="abdominalAortaCannulationTime"> |
| | | <el-form-item |
| | | label="é¨éèæç®¡æ¶é´" |
| | | prop="portalveincannulatime" |
| | | > |
| | | <el-date-picker |
| | | v-model="form.abdominalAortaCannulationTime" |
| | | v-model="form.portalveincannulatime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¸è
éèæç®¡æ¶é´" prop="inferiorVenaCavaCannulationTime"> |
| | | <el-form-item |
| | | label="é¨éèçæ³¨æ¶é´" |
| | | prop="portalveinperfusiontime" |
| | | > |
| | | <el-date-picker |
| | | v-model="form.inferiorVenaCavaCannulationTime" |
| | | v-model="form.portalveinperfusiontime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- åè°åä¿¡æ¯ --> |
| | | <el-divider content-position="left">åè°åä¿¡æ¯</el-divider> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åè°åå§å" prop="coordinatorName"> |
| | | <el-input v-model="form.coordinatorName" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¿ææ¯å®¤æ¶é´" prop="coordinatorInOperating"> |
| | | <el-date-picker |
| | | v-model="form.coordinatorInOperating" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è ç³»èä¸éèæç®¡æ¶é´" prop="superiorMesentericVeinCannulationTime"> |
| | | <el-form-item label="åºææ¯å®¤æ¶é´" prop="coordinatorOutOperating"> |
| | | <el-date-picker |
| | | v-model="form.superiorMesentericVeinCannulationTime" |
| | | v-model="form.coordinatorOutOperating" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»è®°äºº" prop="registrant"> |
| | | <el-input v-model="form.registrant" /> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åè°åç¾å" prop="coordinatorSign"> |
| | | <el-input v-model="form.coordinatorSign" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»è®°æ¶é´" prop="registrationTime"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç¾åæ¶é´" prop="coordinatorSignTime"> |
| | | <el-date-picker |
| | | v-model="form.registrationTime" |
| | | v-model="form.coordinatorSignTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | readonly |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- è´è´£äººä¿¡æ¯ --> |
| | | <el-divider content-position="left">è´è´£äººä¿¡æ¯</el-divider> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è´è´£äººå§å" prop="responsibleusername"> |
| | | <el-input v-model="form.responsibleusername" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="èç»äººä¸" prop="coordinatedusernameo"> |
| | | <el-input v-model="form.coordinatedusernameo" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="èç»äººäº" prop="coordinatedusernamet"> |
| | | <el-input v-model="form.coordinatedusernamet" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- è·åæºæä¿¡æ¯ --> |
| | | <el-divider content-position="left">è·åæºæä¿¡æ¯</el-divider> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è·åæºæåç§°" prop="gainhospitalname"> |
| | | <el-input |
| | | v-model="form.gainhospitalname" |
| | | placeholder="请è¾å
¥è·åæºæåç§°" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è·åæºæç¼ç " prop="gainhospitalno"> |
| | | <el-input |
| | | v-model="form.gainhospitalno" |
| | | placeholder="请è¾å
¥è·åæºæç¼ç " |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- è®°å½ä¿¡æ¯ --> |
| | | <el-divider content-position="left">è®°å½ä¿¡æ¯</el-divider> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä½é¢å·" prop="donorno"> |
| | | <el-input v-model="form.donorno" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æå¨å»çæºæ" prop="treatmenthospitalname"> |
| | | <el-input |
| | | v-model="form.treatmenthospitalname" |
| | | placeholder="请è¾å
¥å»çæºæåç§°" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å»çæºæç¼ç " prop="treatmenthospitalno"> |
| | | <el-input |
| | | v-model="form.treatmenthospitalno" |
| | | placeholder="请è¾å
¥å»çæºæç¼ç " |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">å¨å®è·åè®°å½</span> |
| | | <div style="float: right;"> |
| | | <el-tag :type="form.procurementStatus === 'procured' ? 'success' : 'warning'"> |
| | | {{ form.procurementStatus === 'procured' ? 'å·²è·å' : 'å¾
è·å' }} |
| | | <el-tag |
| | | :type=" |
| | | form.recordstate === 'completed' ? 'success' : 'warning' |
| | | " |
| | | > |
| | | {{ form.recordstate === "completed" ? "已宿" : "è¿è¡ä¸" }} |
| | | </el-tag> |
| | | </div> |
| | | </div> |
| | |
| | | > |
| | | <el-row> |
| | | <el-col> |
| | | <el-form-item label-width="100px" label="è·åå¨å®"> |
| | | <el-checkbox-group v-model="selectedOrgans" @change="handleOrganSelectionChange"> |
| | | <el-form-item label-width="100px" label="æç®å¨å®"> |
| | | <el-checkbox-group |
| | | v-model="selectedOrgans" |
| | | @change="handleOrganSelectionChange" |
| | | > |
| | | <el-checkbox |
| | | v-for="dict in dict.type.sys_Organ || []" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | > |
| | | {{ dict.label }} |
| | | </el-checkbox> |
| | |
| | | <el-col> |
| | | <el-form-item> |
| | | <el-table |
| | | :data="procurementData.records" |
| | | :data="procurementData.serviceDonationwitnessorgans" |
| | | v-loading="loading" |
| | | border |
| | | style="width: 100%" |
| | |
| | | label="å¨å®åç§°" |
| | | align="center" |
| | | width="120" |
| | | prop="organName" |
| | | prop="organname" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.organName" |
| | | v-model="scope.row.organname" |
| | | placeholder="å¨å®åç§°" |
| | | :disabled="true" |
| | | /> |
| | |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="éæ©è·åå¼å§æ¶é´" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="éæ©å¨å®ç¦»ä½æ¶é´" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | v-model="scope.row.gainHospitalNo" |
| | | placeholder="è¯·éæ©è·åå»é¢" |
| | | style="width: 100%" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | @change="handleHospitalChange(scope.row, $event)" |
| | | > |
| | | <el-option |
| | |
| | | <el-input |
| | | v-model="scope.row.organGetDoctor" |
| | | placeholder="è·åå»å¸" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-input |
| | | v-model="scope.row.assistant" |
| | | placeholder="婿" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-input |
| | | v-model="scope.row.procurementNurse" |
| | | placeholder="è·åæ¤å£«" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-input |
| | | v-model="scope.row.operatingRoomNurse" |
| | | placeholder="ææ¯å®¤æ¤å£«" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-input |
| | | v-model="scope.row.anesthesiologist" |
| | | placeholder="麻éå»ç" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | v-model="scope.row.organState" |
| | | placeholder="è¯·éæ©è·åç¶æ" |
| | | style="width: 100%" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | > |
| | | <el-option |
| | | v-for="dict in organStateList" |
| | |
| | | clearable |
| | | v-model="scope.row.notGetReason" |
| | | placeholder="请è¾å
¥æªè·å说æ" |
| | | :disabled="form.procurementStatus === 'procured'" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | align="center" |
| | | width="120" |
| | | class-name="small-padding fixed-width" |
| | | v-if="form.procurementStatus !== 'procured'" |
| | | v-if="form.recordstate !== 'completed'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | </el-row> |
| | | |
| | | <!-- è·åç»è®¡ä¿¡æ¯ --> |
| | | <div class="procurement-stats" v-if="procurementData.records.length > 0"> |
| | | <div |
| | | class="procurement-stats" |
| | | v-if="procurementData.serviceDonationwitnessorgans && procurementData.serviceDonationwitnessorgans.length > 0" |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <div class="stat-item"> |
| | | <span class="stat-label">å·²è·åå¨å®:</span> |
| | | <span class="stat-value">{{ procurementData.records.length }} 个</span> |
| | | <span class="stat-value" |
| | | >{{ procurementData.serviceDonationwitnessorgans.length }} 个</span |
| | | > |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | |
| | | <div class="stat-item"> |
| | | <span class="stat-label">è·åç¶æ:</span> |
| | | <span class="stat-value"> |
| | | <el-tag :type="form.procurementStatus === 'procured' ? 'success' : 'warning'"> |
| | | {{ form.procurementStatus === 'procured' ? '已宿' : 'è¿è¡ä¸' }} |
| | | <el-tag |
| | | :type=" |
| | | form.recordstate === 'completed' |
| | | ? 'success' |
| | | : 'warning' |
| | | " |
| | | > |
| | | {{ |
| | | form.recordstate === "completed" |
| | | ? "已宿" |
| | | : "è¿è¡ä¸" |
| | | }} |
| | | </el-tag> |
| | | </span> |
| | | </div> |
| | |
| | | </div> |
| | | </el-form> |
| | | |
| | | <div class="dialog-footer" v-if="form.procurementStatus !== 'procured'"> |
| | | <div class="dialog-footer" v-if="form.recordstate !== 'completed'"> |
| | | <el-button |
| | | type="primary" |
| | | @click="handleSaveProcurement" |
| | | :loading="saveLoading" |
| | | :disabled="procurementData.records.length === 0" |
| | | :disabled="!procurementData.serviceDonationwitnessorgans || procurementData.serviceDonationwitnessorgans.length === 0" |
| | | > |
| | | ä¿åè·åè®°å½ |
| | | </el-button> |
| | |
| | | </div> |
| | | </el-card> |
| | | |
| | | <!-- é件管çé¨å --> |
| | | <!-- é件管çé¨åä¼å --> |
| | | <el-card class="attachment-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">ç¸å
³éä»¶</span> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | icon="el-icon-upload" |
| | | @click="handleUploadAttachment" |
| | | <div class="attachment-header"> |
| | | <i class="el-icon-paperclip"></i> |
| | | <span class="attachment-title">ç¸å
³éä»¶</span> |
| | | <span class="attachment-tip" |
| | | >æ¯æä¸ä¼ å¨å®è·åç¸å
³æä»¶ (æå¤{{ attachmentLimit }}个)</span |
| | | > |
| | | ä¸ä¼ éä»¶ |
| | | </el-button> |
| | | </div> |
| | | |
| | | <div class="attachment-list"> |
| | | <el-table :data="attachments" style="width: 100%"> |
| | | <el-table-column label="æä»¶åç§°" min-width="200"> |
| | | <!-- ä½¿ç¨ UploadAttachment ç»ä»¶ --> |
| | | <UploadAttachment |
| | | ref="uploadAttachment" |
| | | :file-list="attachmentFileList" |
| | | :limit="attachmentLimit" |
| | | :accept="attachmentAccept" |
| | | :multiple="true" |
| | | @change="handleAttachmentChange" |
| | | @upload-success="handleUploadSuccess" |
| | | @upload-error="handleUploadError" |
| | | @remove="handleAttachmentRemove" |
| | | /> |
| | | |
| | | <!-- éä»¶å表å±ç¤º --> |
| | | <div |
| | | class="attachment-list" |
| | | v-if="attachments && attachments.length > 0" |
| | | > |
| | | <div class="list-title">å·²ä¸ä¼ éä»¶ ({{ attachments.length }})</div> |
| | | <el-table :data="attachments" style="width: 100%" size="small"> |
| | | <el-table-column label="æä»¶å" min-width="200"> |
| | | <template slot-scope="scope"> |
| | | <div class="file-info"> |
| | | <i :class="getFileIcon(scope.row.fileName)" style="margin-right: 8px; color: #409EFF;"></i> |
| | | <span>{{ scope.row.fileName }}</span> |
| | | </div> |
| | | <i |
| | | class="el-icon-document" |
| | | :style="{ color: getFileIconColor(scope.row.fileName) }" |
| | | ></i> |
| | | <span class="file-name">{{ scope.row.fileName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æä»¶ç±»å" width="100" align="center"> |
| | | <el-table-column label="æä»¶ç±»å" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag size="small">{{ getFileType(scope.row.fileName) }}</el-tag> |
| | | <el-tag :type="getFileTagType(scope.row.fileName)" size="small"> |
| | | {{ getFileTypeText(scope.row.fileName) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æä»¶å¤§å°" width="100" align="center"> |
| | | <el-table-column label="ä¸ä¼ æ¶é´" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatDateTime(scope.row.uploadTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä»¶å¤§å°" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatFileSize(scope.row.fileSize) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="ä¸ä¼ æ¶é´" width="160" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.uploadTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æä½" width="150" align="center"> |
| | | <el-table-column label="æä½" width="200" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handlePreviewAttachment(scope.row)" |
| | | >é¢è§</el-button> |
| | | type="primary" |
| | | @click="handlePreview(scope.row)" |
| | | :disabled="!isPreviewable(scope.row.fileName)" |
| | | > |
| | | é¢è§ |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-download" |
| | | @click="handleDownloadAttachment(scope.row)" |
| | | >ä¸è½½</el-button> |
| | | type="success" |
| | | @click="handleDownload(scope.row)" |
| | | > |
| | | ä¸è½½ |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | style="color: #F56C6C;" |
| | | @click="handleRemoveAttachment(scope.row)" |
| | | >å é¤</el-button> |
| | | type="danger" |
| | | @click="handleRemoveAttachment(scope.$index)" |
| | | > |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¨å®åç§°"> |
| | | <el-input v-model="currentRecord.organName" readonly /> |
| | | <el-input v-model="currentRecord.organname" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è·åå»å¸"> |
| | | <el-input v-model="currentRecord.organGetDoctor" placeholder="请è¾å
¥è·åå»å¸" /> |
| | | <el-input |
| | | v-model="currentRecord.organGetDoctor" |
| | | placeholder="请è¾å
¥è·åå»å¸" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="婿"> |
| | | <el-input v-model="currentRecord.assistant" placeholder="请è¾å
¥å©æå§å" /> |
| | | <el-input |
| | | v-model="currentRecord.assistant" |
| | | placeholder="请è¾å
¥å©æå§å" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è·åæ¤å£«"> |
| | | <el-input v-model="currentRecord.procurementNurse" placeholder="请è¾å
¥è·åæ¤å£«" /> |
| | | <el-input |
| | | v-model="currentRecord.procurementNurse" |
| | | placeholder="请è¾å
¥è·åæ¤å£«" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ææ¯å®¤æ¤å£«"> |
| | | <el-input v-model="currentRecord.operatingRoomNurse" placeholder="请è¾å
¥ææ¯å®¤æ¤å£«" /> |
| | | <el-input |
| | | v-model="currentRecord.operatingRoomNurse" |
| | | placeholder="请è¾å
¥ææ¯å®¤æ¤å£«" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="麻éå»ç"> |
| | | <el-input v-model="currentRecord.anesthesiologist" placeholder="请è¾å
¥éº»éå»ç" /> |
| | | <el-input |
| | | v-model="currentRecord.anesthesiologist" |
| | | placeholder="请è¾å
¥éº»éå»ç" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="æªè·å说æ" v-if="currentRecord.organState === '0'"> |
| | | <el-form-item |
| | | label="æªè·å说æ" |
| | | v-if="currentRecord.organState === '0'" |
| | | > |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | |
| | | <el-button type="primary" @click="handleEditConfirm">确认</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- æä»¶é¢è§å¼¹çª --> |
| | | <el-dialog |
| | | :title="filePreviewTitle" |
| | | :visible.sync="filePreviewVisible" |
| | | width="800px" |
| | | @close="filePreviewVisible = false" |
| | | > |
| | | <div v-if="currentPreviewFile"> |
| | | <div v-if="currentPreviewFile.fileType === 'image'"> |
| | | <img :src="currentPreviewFile.fileUrl" style="max-width: 100%; max-height: 500px;" /> |
| | | </div> |
| | | <div v-else-if="currentPreviewFile.fileType === 'pdf'"> |
| | | <iframe :src="currentPreviewFile.fileUrl" width="100%" height="500px"></iframe> |
| | | </div> |
| | | <div v-else> |
| | | <p>䏿¯æé¢è§æ¤æä»¶ç±»åï¼è¯·ä¸è½½æ¥ç</p> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getOrganProcurementDetail, |
| | | updateOrganProcurement, |
| | | saveProcurementRecords, |
| | | getHospitalList, |
| | | getCoordinatorList |
| | | } from "./organProcurement"; |
| | | import { witnessList, witnessadd, witnessedit } from "@/api/businessApi"; |
| | | import UploadAttachment from "@/components/UploadAttachment"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | export default { |
| | | name: "OrganProcurementDetail", |
| | | dicts: ["sys_user_sex", "sys_Organ", "sys_0_1", "sys_DonationCategory"], |
| | | components: { |
| | | UploadAttachment |
| | | }, |
| | | dicts: ["sys_BloodType", "sys_DonationCategory", "sys_Organ"], |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: undefined, |
| | | hospitalNo: "", |
| | | infoid: undefined, |
| | | name: "", |
| | | inpatientno: "", |
| | | recordstate: "pending", |
| | | caseNo: "", |
| | | donorName: "", |
| | | gender: "", |
| | | donorno: "", |
| | | treatmenthospitalname: "", |
| | | treatmenthospitalno: "", |
| | | sex: "", |
| | | age: "", |
| | | birthDate: "", |
| | | diagnosis: "", |
| | | procurementStatus: "pending", |
| | | procurementTime: "", |
| | | registrant: "", |
| | | registrationTime: "", |
| | | surgeryName: "", |
| | | surgeryStartTime: "", |
| | | donorDeathTime: "", |
| | | abdominalAortaCannulationTime: "", |
| | | inferiorVenaCavaCannulationTime: "", |
| | | superiorMesentericVeinCannulationTime: "", |
| | | donationCategory: "1", |
| | | deathJudgeDoctor1: "", |
| | | deathJudgeDoctor2: "", |
| | | deathReason: "", |
| | | operationEndTime: "", |
| | | bloodtype: "", |
| | | idcardno: "", |
| | | diagnosisname: "", |
| | | coordinatorName: "", |
| | | gainhospitalno: "", |
| | | gainhospitalname: "", |
| | | deathtime: "", |
| | | deathreason: "", |
| | | deathjudgedocto: "", |
| | | deathjudgedoctt: "", |
| | | deathjudgeannex: "", |
| | | operationbegtime: "", |
| | | operationendtime: "", |
| | | operationdoctor: "", |
| | | isspendremember: 1, |
| | | isrestoreremains: 1, |
| | | rememberannex: "", |
| | | responsibleuserid: "", |
| | | responsibleusername: "", |
| | | coordinateduserido: "", |
| | | coordinatedusernameo: "", |
| | | coordinateduseridt: "", |
| | | coordinatedusernamet: "", |
| | | abdominalaortacannulatime: "", |
| | | abdominalaortaperfusiontime: "", |
| | | portalveincannulatime: "", |
| | | portalveinperfusiontime: "", |
| | | pulmonaryarterycannulatime: "", |
| | | pulmonaryarteryperfusiontime: "", |
| | | aortacannulatime: "", |
| | | aortaperfusiontime: "", |
| | | organdonation: "", |
| | | organdonationOther: "", |
| | | donationcategory: "", |
| | | coordinatorInOperating: "", |
| | | coordinatorOutOperating: "", |
| | | coordinatorSign: "", |
| | | coordinatorSignTime: "", |
| | | responsibleUserName: "", |
| | | coordinatedUserId1: "", |
| | | coordinatedUserId2: "", |
| | | isSpendRemember: 1, |
| | | isRestoreRemains: 1 |
| | | attachments: [] |
| | | }, |
| | | // 表åéªè¯è§å |
| | | rules: { |
| | | donorName: [ |
| | | name: [ |
| | | { required: true, message: "æç®è
å§åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | diagnosis: [ |
| | | diagnosisname: [ |
| | | { required: true, message: "ç¾ç
è¯æä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | surgeryName: [ |
| | | { required: true, message: "ææ¯åç§°ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | donationcategory: [ |
| | | { required: true, message: "æç®ç±»å«ä¸è½ä¸ºç©º", trigger: "change" } |
| | | ], |
| | | operationdoctor: [ |
| | | { required: true, message: "ææ¯å»çä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ] |
| | | }, |
| | | // è·åè®°å½éªè¯è§å |
| | |
| | | selectedOrgans: [], |
| | | // å»é¢å表 |
| | | hospitalList: [], |
| | | // åè°åå表 |
| | | coordinatorList: [], |
| | | // å¨å®ç¶æå表 |
| | | organStateList: [ |
| | | { value: "1", label: "å·²è·å" }, |
| | |
| | | ], |
| | | // è·åè®°å½æ°æ® |
| | | procurementData: { |
| | | records: [] |
| | | serviceDonationwitnessorgans: [] |
| | | }, |
| | | // éä»¶æ°æ® |
| | | attachments: [], |
| | | attachmentFileList: [], |
| | | // éä»¶ç¸å
³é
ç½® |
| | | attachmentLimit: 10, |
| | | attachmentAccept: ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt", |
| | | // ç¼è¾å¯¹è¯æ¡ |
| | | editDialogVisible: false, |
| | | currentRecord: {}, |
| | | currentEditIndex: -1 |
| | | currentEditIndex: -1, |
| | | // æä»¶é¢è§ç¸å
³ |
| | | filePreviewVisible: false, |
| | | currentPreviewFile: null, |
| | | filePreviewTitle: "" |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | // ä¸å®æ´çè®°å½æ°é |
| | | incompleteRecords() { |
| | | return this.procurementData.records.filter( |
| | | if (!this.procurementData.serviceDonationwitnessorgans) return 0; |
| | | return this.procurementData.serviceDonationwitnessorgans.filter( |
| | | record => |
| | | !record.organStartTime || |
| | | !record.organGetTime || |
| | |
| | | }, |
| | | // å¯ä¸å»é¢æ°é |
| | | uniqueHospitals() { |
| | | const hospitals = this.procurementData.records |
| | | if (!this.procurementData.serviceDonationwitnessorgans) return 0; |
| | | const hospitals = this.procurementData.serviceDonationwitnessorgans |
| | | .map(record => record.gainHospitalNo) |
| | | .filter(Boolean); |
| | | return new Set(hospitals).size; |
| | | }, |
| | | // è·åå¨å®åå
¸ |
| | | organDict() { |
| | | return this.dict.type.sys_Organ || []; |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬éä»¶æ°æ®åå |
| | | attachments: { |
| | | handler(newAttachments) { |
| | | this.attachmentFileList = newAttachments.map(item => ({ |
| | | uid: item.id || Math.random(), |
| | | name: item.fileName, |
| | | fileSize: item.fileSize, |
| | | url: item.path || item.fileUrl, |
| | | uploadTime: item.uploadTime, |
| | | status: "success" |
| | | })); |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | created() { |
| | | const id = this.$route.query.id; |
| | | if (id) { |
| | | this.getDetail(id); |
| | | } else { |
| | | this.generateCaseNo(); |
| | | this.form.registrant = this.currentUser.username || "å½åç¨æ·"; |
| | | this.form.registrationTime = new Date() |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19); |
| | | } |
| | | this.getHospitalData(); |
| | | this.getCoordinatorData(); |
| | | this.initData(); |
| | | }, |
| | | methods: { |
| | | // çæä½é¢å· |
| | | generateCaseNo() { |
| | | // æ ¹æ®åå
¸valueè·ålabel |
| | | getOrganLabel(organValue) { |
| | | const dictItem = this.organDict.find(item => item.value === organValue); |
| | | return dictItem ? dictItem.label : organValue; |
| | | }, |
| | | |
| | | // åå§åæ°æ® |
| | | initData() { |
| | | const { id, infoid } = this.$route.query; |
| | | |
| | | if (!infoid) { |
| | | this.$message.error("缺å°å¿
è¦çè·¯ç±åæ° infoid"); |
| | | this.$router.back(); |
| | | return; |
| | | } |
| | | |
| | | this.form.infoid = infoid; |
| | | this.generateDonorNo(); |
| | | |
| | | if (infoid) { |
| | | this.getDetail(infoid); |
| | | } |
| | | |
| | | this.getHospitalData(); |
| | | }, |
| | | // çææç®è
ç¼å· |
| | | generateDonorNo() { |
| | | const timestamp = Date.now().toString(); |
| | | this.form.hospitalNo = "D" + timestamp.slice(-6); |
| | | this.form.caseNo = "C" + timestamp.slice(-6); |
| | | this.form.donorno = "D" + timestamp.slice(-8); |
| | | this.form.caseNo = "CASE" + timestamp.slice(-6); |
| | | this.form.inpatientno = "IP" + timestamp.slice(-6); |
| | | }, |
| | | // è·å详æ
|
| | | getDetail(id) { |
| | | async getDetail(infoid) { |
| | | this.loading = true; |
| | | getOrganProcurementDetail(id) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.form = response.data; |
| | | if (response.data.procurementRecords) { |
| | | this.procurementData.records = response.data.procurementRecords; |
| | | this.selectedOrgans = response.data.procurementRecords.map( |
| | | item => item.organNo |
| | | ); |
| | | } |
| | | try { |
| | | const response = await witnessList({ infoid }); |
| | | if ( |
| | | response.code === 200 && |
| | | response.data && |
| | | response.data.length > 0 |
| | | ) { |
| | | const data = response.data[0]; |
| | | |
| | | // å¡«å
è¡¨åæ°æ® |
| | | Object.assign(this.form, data); |
| | | |
| | | // åå§åéä»¶ |
| | | if (this.form.attachments) { |
| | | this.attachments = Array.isArray(this.form.attachments) |
| | | ? [...this.form.attachments] |
| | | : []; |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | .catch(error => { |
| | | console.error("è·åå¨å®è·å详æ
失败:", error); |
| | | this.loading = false; |
| | | this.$message.error("è·å详æ
失败"); |
| | | }); |
| | | |
| | | // å¤çæç®å¨å®å段 |
| | | if (data.organdonation) { |
| | | const organArray = Array.isArray(data.organdonation) |
| | | ? data.organdonation |
| | | : (data.organdonation || "").split(",").filter(item => item); |
| | | this.selectedOrgans = organArray; |
| | | this.form.organdonationOther = data.organdonationOther || ""; |
| | | } |
| | | |
| | | // å¤çå¨å®è·åè®°å½ |
| | | if (data.serviceDonationwitnessorgans) { |
| | | this.procurementData.serviceDonationwitnessorgans = Array.isArray( |
| | | data.serviceDonationwitnessorgans |
| | | ) |
| | | ? data.serviceDonationwitnessorgans |
| | | : []; |
| | | } |
| | | |
| | | this.$message.success("æ°æ®å è½½æå"); |
| | | } else { |
| | | this.$message.warning("æªæ¾å°å¯¹åºçå¨å®è·åæ°æ®"); |
| | | } |
| | | } catch (error) { |
| | | console.error("è·åå¨å®è·å详æ
失败:", error); |
| | | this.$message.error("è·å详æ
失败"); |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | | }, |
| | | // è·åå»é¢æ°æ® |
| | | getHospitalData() { |
| | | getHospitalList().then(response => { |
| | | if (response.code === 200) { |
| | | this.hospitalList = response.data; |
| | | } |
| | | }); |
| | | }, |
| | | // è·ååè°åæ°æ® |
| | | getCoordinatorData() { |
| | | getCoordinatorList().then(response => { |
| | | if (response.code === 200) { |
| | | this.coordinatorList = response.data; |
| | | } |
| | | }); |
| | | async getHospitalData() { |
| | | try { |
| | | // TODO: æ¿æ¢ä¸ºå®é
çå»é¢å表æ¥å£ |
| | | // ææ¶ä½¿ç¨æ¨¡ææ°æ® |
| | | this.hospitalList = [ |
| | | { hospitalNo: "H001", hospitalName: "å京ååå»é¢" }, |
| | | { hospitalNo: "H002", hospitalName: "䏿µ·åå±±å»é¢" }, |
| | | { hospitalNo: "H003", hospitalName: "广å·ä¸å±±å»é¢" }, |
| | | { hospitalNo: "H004", hospitalName: "æ¦æ±åæµå»é¢" }, |
| | | { hospitalNo: "H005", hospitalName: "æé½å西å»é¢" } |
| | | ]; |
| | | } catch (error) { |
| | | console.error("è·åå»é¢æ°æ®å¤±è´¥:", error); |
| | | this.$message.error("è·åå»é¢æ°æ®å¤±è´¥"); |
| | | } |
| | | }, |
| | | // å¨å®éæ©ç¶æåå |
| | | handleOrganSelectionChange(selectedValues) { |
| | | const currentOrganNos = this.procurementData.records.map( |
| | | item => item.organNo |
| | | if (!this.procurementData.serviceDonationwitnessorgans) { |
| | | this.procurementData.serviceDonationwitnessorgans = []; |
| | | } |
| | | |
| | | const currentOrganValues = this.procurementData.serviceDonationwitnessorgans.map( |
| | | item => item.organno |
| | | ); |
| | | |
| | | // å¤çäºæ¥é»è¾ |
| | | this.handleExclusiveSelections(selectedValues); |
| | | |
| | | // æ´æ°æç®å¨å®å段 |
| | | this.form.organdonation = selectedValues.join(","); |
| | | |
| | | // æ°å¢éæ©çå¨å® |
| | | selectedValues.forEach(organValue => { |
| | | if (!currentOrganNos.includes(organValue)) { |
| | | const organInfo = this.dict.type.sys_Organ.find( |
| | | item => item.value === organValue |
| | | ); |
| | | if (organInfo) { |
| | | this.procurementData.records.push({ |
| | | organName: organInfo.label, |
| | | organNo: organValue, |
| | | id: null, |
| | | procurementId: this.form.id, |
| | | organStartTime: "", |
| | | organGetTime: "", |
| | | gainHospitalNo: "", |
| | | gainHospitalName: "", |
| | | organGetDoctor: "", |
| | | assistant: "", |
| | | procurementNurse: "", |
| | | operatingRoomNurse: "", |
| | | anesthesiologist: "", |
| | | organState: "1", |
| | | notGetReason: "" |
| | | }); |
| | | } |
| | | if (!currentOrganValues.includes(organValue)) { |
| | | this.createOrganRecord(organValue); |
| | | } |
| | | }); |
| | | |
| | | // ç§»é¤åæ¶éæ©çå¨å® |
| | | this.procurementData.records = this.procurementData.records.filter( |
| | | this.procurementData.serviceDonationwitnessorgans = this.procurementData.serviceDonationwitnessorgans.filter( |
| | | record => { |
| | | if (selectedValues.includes(record.organNo)) { |
| | | if (selectedValues.includes(record.organno)) { |
| | | return true; |
| | | } else { |
| | | if (record.id) { |
| | |
| | | } |
| | | ) |
| | | .then(() => { |
| | | this.procurementData.records = this.procurementData.records.filter( |
| | | r => r.organNo !== record.organNo |
| | | this.procurementData.serviceDonationwitnessorgans = this.procurementData.serviceDonationwitnessorgans.filter( |
| | | r => r.organno !== record.organno |
| | | ); |
| | | this.$message.success("å 餿å"); |
| | | }) |
| | | .catch(() => { |
| | | this.selectedOrgans.push(record.organNo); |
| | | this.selectedOrgans.push(record.organno); |
| | | }); |
| | | return true; |
| | | } else { |
| | |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // å¤çäºæ¥éæ© |
| | | handleExclusiveSelections(selectedValues) { |
| | | // 妿鿩äº"åè¾"(å设åå
¸å¼ä¸ºC64)ï¼èªå¨åæ¶åç¬ç"å·¦è¾"(C64L)å"å³è¾"(C64R)éæ© |
| | | if (selectedValues.includes("C64")) { |
| | | this.selectedOrgans = selectedValues.filter( |
| | | item => item !== "C64L" && item !== "C64R" |
| | | ); |
| | | } |
| | | // 妿鿩äº"å·¦è¾"æ"å³è¾"ï¼åæ¶"åè¾"éæ© |
| | | else if (selectedValues.includes("C64L") || selectedValues.includes("C64R")) { |
| | | this.selectedOrgans = selectedValues.filter(item => item !== "C64"); |
| | | } |
| | | |
| | | // 妿鿩äº"å
¨èº"(å设åå
¸å¼ä¸ºC34)ï¼èªå¨åæ¶åç¬ç"å·¦èº"(C34L)å"å³èº"(C34R)éæ© |
| | | if (selectedValues.includes("C34")) { |
| | | this.selectedOrgans = selectedValues.filter( |
| | | item => item !== "C34L" && item !== "C34R" |
| | | ); |
| | | } |
| | | // 妿鿩äº"å·¦èº"æ"å³èº"ï¼åæ¶"å
¨èº"éæ© |
| | | else if (selectedValues.includes("C34L") || selectedValues.includes("C34R")) { |
| | | this.selectedOrgans = selectedValues.filter(item => item !== "C34"); |
| | | } |
| | | }, |
| | | |
| | | // å建å¨å®è®°å½ |
| | | createOrganRecord(organValue) { |
| | | const organName = this.getOrganLabel(organValue); |
| | | |
| | | this.procurementData.serviceDonationwitnessorgans.push({ |
| | | id: null, |
| | | organname: organName, |
| | | organno: organValue, |
| | | organStartTime: "", |
| | | organGetTime: "", |
| | | gainHospitalNo: "", |
| | | gainHospitalName: "", |
| | | organGetDoctor: "", |
| | | assistant: "", |
| | | procurementNurse: "", |
| | | operatingRoomNurse: "", |
| | | anesthesiologist: "", |
| | | organState: "1", |
| | | notGetReason: "" |
| | | }); |
| | | }, |
| | | |
| | | // å»é¢éæ©åå |
| | | handleHospitalChange(row, hospitalNo) { |
| | | const hospital = this.hospitalList.find( |
| | |
| | | }, |
| | | // ç¼è¾è·åè®°å½ |
| | | handleEditProcurement(row) { |
| | | const index = this.procurementData.records.findIndex( |
| | | item => item.organNo === row.organNo |
| | | const index = this.procurementData.serviceDonationwitnessorgans.findIndex( |
| | | item => item.organno === row.organno |
| | | ); |
| | | if (index !== -1) { |
| | | this.currentRecord = { ...row }; |
| | |
| | | // 确认ç¼è¾ |
| | | handleEditConfirm() { |
| | | if (this.currentEditIndex !== -1) { |
| | | this.procurementData.records[this.currentEditIndex] = { |
| | | this.procurementData.serviceDonationwitnessorgans[this.currentEditIndex] = { |
| | | ...this.currentRecord |
| | | }; |
| | | this.$message.success("è·åè®°å½æ´æ°æå"); |
| | |
| | | return ""; |
| | | }, |
| | | // ä¿ååºæ¬ä¿¡æ¯ |
| | | handleSave() { |
| | | this.$refs.form.validate(valid => { |
| | | async handleSave() { |
| | | this.$refs.form.validate(async valid => { |
| | | if (valid) { |
| | | this.saveLoading = true; |
| | | const apiMethod = this.form.id |
| | | ? updateOrganProcurement |
| | | : addOrganProcurement; |
| | | try { |
| | | const saveData = { |
| | | ...this.form, |
| | | attachments: this.attachments, |
| | | organdonation: this.selectedOrgans.join(","), |
| | | serviceDonationwitnessorgans: |
| | | this.procurementData.serviceDonationwitnessorgans || [] |
| | | }; |
| | | |
| | | apiMethod(this.form) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | if (!this.form.id) { |
| | | this.form.id = response.data.id; |
| | | this.$router.replace({ |
| | | query: { ...this.$route.query, id: this.form.id } |
| | | }); |
| | | } |
| | | const apiMethod = this.form.id ? witnessedit : witnessadd; |
| | | const response = await apiMethod(saveData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | if (!this.form.id && response.data && response.data.id) { |
| | | this.form.id = response.data.id; |
| | | this.$router.replace({ |
| | | query: { ...this.$route.query, id: this.form.id } |
| | | }); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("ä¿å失败:", error); |
| | | this.$message.error("ä¿å失败"); |
| | | }) |
| | | .finally(() => { |
| | | this.saveLoading = false; |
| | | }); |
| | | } else { |
| | | this.$message.error("ä¿å失败ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | | } catch (error) { |
| | | console.error("ä¿å失败:", error); |
| | | this.$message.error("ä¿å失败"); |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // ä¿åè·åè®°å½ |
| | | handleSaveProcurement() { |
| | | async handleSaveProcurement() { |
| | | if (!this.form.id) { |
| | | this.$message.warning("请å
ä¿ååºæ¬ä¿¡æ¯"); |
| | | return; |
| | | } |
| | | |
| | | this.saveLoading = true; |
| | | saveProcurementRecords(this.form.id, this.procurementData.records) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("è·åè®°å½ä¿åæå"); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("ä¿åè·åè®°å½å¤±è´¥:", error); |
| | | this.$message.error("ä¿åè·åè®°å½å¤±è´¥"); |
| | | }) |
| | | .finally(() => { |
| | | this.saveLoading = false; |
| | | }); |
| | | try { |
| | | const saveData = { |
| | | ...this.form, |
| | | attachments: this.attachments, |
| | | organdonation: this.selectedOrgans.join(","), |
| | | serviceDonationwitnessorgans: |
| | | this.procurementData.serviceDonationwitnessorgans || [] |
| | | }; |
| | | |
| | | const response = await witnessedit(saveData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("è·åè®°å½ä¿åæå"); |
| | | } else { |
| | | this.$message.error( |
| | | "ä¿åè·åè®°å½å¤±è´¥ï¼" + (response.msg || "æªç¥é误") |
| | | ); |
| | | } |
| | | } catch (error) { |
| | | console.error("ä¿åè·åè®°å½å¤±è´¥:", error); |
| | | this.$message.error("ä¿åè·åè®°å½å¤±è´¥"); |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | | }, |
| | | // ç¡®è®¤å®æè·å |
| | | handleConfirmProcurement() { |
| | | async handleConfirmProcurement() { |
| | | if (this.incompleteRecords > 0) { |
| | | this.$message.warning("请å
å®åææè·åè®°å½çä¿¡æ¯"); |
| | | return; |
| | |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | .then(async () => { |
| | | this.confirmLoading = true; |
| | | this.form.procurementStatus = "procured"; |
| | | this.form.procurementTime = new Date() |
| | | this.form.recordstate = "completed"; |
| | | this.form.operationendtime = this.form.operationendtime || new Date() |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19); |
| | | |
| | | updateOrganProcurement(this.form) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("å¨å®è·å已宿"); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("确认è·å失败:", error); |
| | | this.$message.error("确认è·å失败"); |
| | | }) |
| | | .finally(() => { |
| | | this.confirmLoading = false; |
| | | }); |
| | | try { |
| | | const saveData = { |
| | | ...this.form, |
| | | attachments: this.attachments, |
| | | organdonation: this.selectedOrgans.join(","), |
| | | serviceDonationwitnessorgans: |
| | | this.procurementData.serviceDonationwitnessorgans || [] |
| | | }; |
| | | |
| | | const response = await witnessedit(saveData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("å¨å®è·å已宿"); |
| | | } else { |
| | | this.$message.error( |
| | | "确认è·å失败ï¼" + (response.msg || "æªç¥é误") |
| | | ); |
| | | this.form.recordstate = "pending"; |
| | | this.form.operationendtime = ""; |
| | | } |
| | | } catch (error) { |
| | | console.error("确认è·å失败:", error); |
| | | this.$message.error("确认è·å失败"); |
| | | this.form.recordstate = "pending"; |
| | | this.form.operationendtime = ""; |
| | | } finally { |
| | | this.confirmLoading = false; |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | // ä¸ä¼ éä»¶ |
| | | handleUploadAttachment() { |
| | | this.$message.info("éä»¶ä¸ä¼ åè½"); |
| | | // 确认è·åæé®å«å |
| | | handleProcure() { |
| | | this.handleConfirmProcurement(); |
| | | }, |
| | | // é¢è§éä»¶ |
| | | handlePreviewAttachment(attachment) { |
| | | this.$message.info("éä»¶é¢è§åè½"); |
| | | |
| | | // éä»¶ç¸å
³æ¹æ³ |
| | | /** éä»¶ååå¤ç */ |
| | | handleAttachmentChange(fileList) { |
| | | this.attachmentFileList = fileList; |
| | | }, |
| | | // ä¸è½½éä»¶ |
| | | handleDownloadAttachment(attachment) { |
| | | this.$message.info("éä»¶ä¸è½½åè½"); |
| | | }, |
| | | // å é¤éä»¶ |
| | | handleRemoveAttachment(attachment) { |
| | | this.$confirm("ç¡®å®è¦å é¤è¿ä¸ªéä»¶åï¼", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | |
| | | /** éä»¶ç§»é¤å¤ç */ |
| | | handleAttachmentRemove(file) { |
| | | if (file.url) { |
| | | const index = this.attachments.findIndex( |
| | | item => item.path === file.url || item.fileUrl === file.url |
| | | ); |
| | | if (index > -1) { |
| | | this.attachments.splice(index, 1); |
| | | this.$message.success("éä»¶å 餿å"); |
| | | }) |
| | | .catch(() => {}); |
| | | } |
| | | } |
| | | }, |
| | | // è·åæä»¶å¾æ |
| | | getFileIcon(fileName) { |
| | | const ext = fileName |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | const iconMap = { |
| | | pdf: "el-icon-document", |
| | | doc: "el-icon-document", |
| | | docx: "el-icon-document", |
| | | xls: "el-icon-document", |
| | | xlsx: "el-icon-document", |
| | | jpg: "el-icon-picture", |
| | | jpeg: "el-icon-picture", |
| | | png: "el-icon-picture" |
| | | |
| | | /** ä¸ä¼ æåå¤ç */ |
| | | handleUploadSuccess({ file, fileList, response }) { |
| | | if (response.code === 200) { |
| | | const attachmentObj = { |
| | | fileName: file.name, |
| | | path: response.fileUrl || file.url, |
| | | fileUrl: response.fileUrl || file.url, |
| | | fileType: this.getFileExtension(file.name), |
| | | fileSize: file.size, |
| | | uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss") |
| | | }; |
| | | |
| | | if (!Array.isArray(this.attachments)) { |
| | | this.attachments = []; |
| | | } |
| | | |
| | | this.attachments.push(attachmentObj); |
| | | this.attachmentFileList = fileList; |
| | | this.$message.success("æä»¶ä¸ä¼ æå"); |
| | | } |
| | | }, |
| | | |
| | | /** ä¸ä¼ é误å¤ç */ |
| | | handleUploadError({ file, fileList, error }) { |
| | | console.error("éä»¶ä¸ä¼ 失败:", error); |
| | | this.$message.error("æä»¶ä¸ä¼ 失败ï¼è¯·éè¯"); |
| | | }, |
| | | |
| | | /** æå¨å é¤éä»¶ */ |
| | | handleRemoveAttachment(index) { |
| | | this.attachments.splice(index, 1); |
| | | this.attachmentFileList.splice(index, 1); |
| | | this.$message.success("éä»¶å 餿å"); |
| | | }, |
| | | |
| | | /** æä»¶é¢è§ */ |
| | | handlePreview(file) { |
| | | this.currentPreviewFile = { |
| | | fileName: file.fileName, |
| | | fileUrl: file.path || file.fileUrl, |
| | | fileType: this.getFileType(file.fileName) |
| | | }; |
| | | return iconMap[ext] || "el-icon-document"; |
| | | this.filePreviewTitle = file.fileName; |
| | | this.filePreviewVisible = true; |
| | | }, |
| | | // è·åæä»¶ç±»å |
| | | |
| | | /** æä»¶ä¸è½½ */ |
| | | handleDownload(file) { |
| | | const fileUrl = file.path || file.fileUrl; |
| | | const fileName = file.fileName; |
| | | |
| | | if (fileUrl) { |
| | | const link = document.createElement("a"); |
| | | link.href = fileUrl; |
| | | link.download = fileName; |
| | | link.style.display = "none"; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | this.$message.success("å¼å§ä¸è½½æä»¶"); |
| | | } else { |
| | | this.$message.warning("æä»¶è·¯å¾ä¸åå¨ï¼æ æ³ä¸è½½"); |
| | | } |
| | | }, |
| | | |
| | | /** è·åæä»¶ç±»å */ |
| | | getFileType(fileName) { |
| | | const ext = fileName |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | const typeMap = { |
| | | pdf: "PDF", |
| | | doc: "DOC", |
| | | docx: "DOCX", |
| | | xls: "XLS", |
| | | xlsx: "XLSX", |
| | | jpg: "JPG", |
| | | jpeg: "JPEG", |
| | | png: "PNG" |
| | | }; |
| | | return typeMap[ext] || ext.toUpperCase(); |
| | | if (!fileName) return "other"; |
| | | const extension = fileName.split(".").pop().toLowerCase(); |
| | | const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"]; |
| | | const pdfTypes = ["pdf"]; |
| | | const officeTypes = ["doc", "docx", "xls", "xlsx", "ppt", "pptx"]; |
| | | if (imageTypes.includes(extension)) return "image"; |
| | | if (pdfTypes.includes(extension)) return "pdf"; |
| | | if (officeTypes.includes(extension)) return "office"; |
| | | return "other"; |
| | | }, |
| | | // æä»¶å¤§å°æ ¼å¼å |
| | | formatFileSize(size) { |
| | | if (size === 0) return "0 B"; |
| | | |
| | | /** è·åæä»¶å¾æ é¢è² */ |
| | | getFileIconColor(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | const colorMap = { |
| | | image: "#67C23A", |
| | | pdf: "#F56C6C", |
| | | office: "#409EFF", |
| | | other: "#909399" |
| | | }; |
| | | return colorMap[type] || "#909399"; |
| | | }, |
| | | |
| | | /** è·åæä»¶æ ç¾ç±»å */ |
| | | getFileTagType(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | const typeMap = { |
| | | image: "success", |
| | | pdf: "danger", |
| | | office: "primary", |
| | | other: "info" |
| | | }; |
| | | return typeMap[type] || "info"; |
| | | }, |
| | | |
| | | /** è·åæä»¶ç±»åææ¬ */ |
| | | getFileTypeText(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | const textMap = { |
| | | image: "å¾ç", |
| | | pdf: "PDF", |
| | | office: "ææ¡£", |
| | | other: "å
¶ä»" |
| | | }; |
| | | return textMap[type] || "æªç¥"; |
| | | }, |
| | | |
| | | /** æ£æ¥æ¯å¦å¯é¢è§ */ |
| | | isPreviewable(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | return ["image", "pdf"].includes(type); |
| | | }, |
| | | |
| | | /** è·åæä»¶æ©å±å */ |
| | | getFileExtension(filename) { |
| | | return filename.split(".").pop().toLowerCase(); |
| | | }, |
| | | |
| | | /** æ ¼å¼åæä»¶å¤§å° */ |
| | | formatFileSize(bytes) { |
| | | if (!bytes || bytes === 0) return "0 B"; |
| | | const k = 1024; |
| | | const sizes = ["B", "KB", "MB", "GB"]; |
| | | const i = Math.floor(Math.log(size) / Math.log(k)); |
| | | return parseFloat((size / Math.pow(k, i)).toFixed(2)) + " " + sizes[i]; |
| | | const i = Math.floor(Math.log(bytes) / Math.log(k)); |
| | | return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i]; |
| | | }, |
| | | // æ¶é´æ ¼å¼å |
| | | parseTime(time) { |
| | | if (!time) return ""; |
| | | const date = new Date(time); |
| | | return `${date.getFullYear()}-${(date.getMonth() + 1) |
| | | .toString() |
| | | .padStart(2, "0")}-${date |
| | | .getDate() |
| | | .toString() |
| | | .padStart(2, "0")} ${date |
| | | .getHours() |
| | | .toString() |
| | | .padStart(2, "0")}:${date |
| | | .getMinutes() |
| | | .toString() |
| | | .padStart(2, "0")}`; |
| | | |
| | | /** æ¥ææ¶é´æ ¼å¼å */ |
| | | formatDateTime(dateTime) { |
| | | if (!dateTime) return ""; |
| | | try { |
| | | const date = new Date(dateTime); |
| | | if (isNaN(date.getTime())) return dateTime; |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(date.getDate()).padStart(2, "0"); |
| | | const hours = String(date.getHours()).padStart(2, "0"); |
| | | const minutes = String(date.getMinutes()).padStart(2, "0"); |
| | | return `${year}-${month}-${day} ${hours}:${minutes}`; |
| | | } catch (error) { |
| | | return dateTime; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .organ-procurement-detail { |
| | | padding: 20px; |
| | |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | border: 1px solid #e4e7ed; |
| | | padding: 20px; |
| | | background: #fafafa; |
| | | } |
| | | |
| | | .attachment-header { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | margin-bottom: 16px; |
| | | padding-bottom: 8px; |
| | | border-bottom: 1px solid #ebeef5; |
| | | } |
| | | |
| | | .attachment-title { |
| | | font-weight: 600; |
| | | color: #303133; |
| | | } |
| | | |
| | | .attachment-tip { |
| | | font-size: 12px; |
| | | color: #909399; |
| | | margin-left: auto; |
| | | } |
| | | |
| | | .attachment-list { |
| | | margin-top: 16px; |
| | | } |
| | | |
| | | .list-title { |
| | | font-weight: bold; |
| | | margin-bottom: 12px; |
| | | color: #303133; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .file-name { |
| | | font-size: 13px; |
| | | margin-left: 8px; |
| | | } |
| | | |
| | | .detail-title { |
| | |
| | | background-color: #ffecc2 !important; |
| | | } |
| | | |
| | | :deep(.el-table .cell) { |
| | | padding: 8px 12px; |
| | | line-height: 1.5; |
| | | } |
| | | |
| | | :deep(.el-table th) { |
| | | background-color: #f5f7fa; |
| | | color: #606266; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | :deep(.el-table--border) { |
| | | border: 1px solid #e4e7ed; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | :deep(.el-table--border th) { |
| | | border-right: 1px solid #e4e7ed; |
| | | } |
| | | |
| | | :deep(.el-table--border td) { |
| | | border-right: 1px solid #e4e7ed; |
| | | } |
| | | |
| | | /* è¡¨åæ ·å¼ä¼å */ |
| | | :deep(.el-form-item__label) { |
| | | font-weight: 500; |
| | | color: #606266; |
| | | } |
| | | |
| | | :deep(.el-input__inner) { |
| | | border-radius: 4px; |
| | | border: 1px solid #dcdfe6; |
| | | transition: border-color 0.3s ease; |
| | | } |
| | | |
| | | :deep(.el-input__inner:focus) { |
| | | border-color: #409EFF; |
| | | box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2); |
| | | } |
| | | |
| | | :deep(.el-textarea__inner) { |
| | | border-radius: 4px; |
| | | resize: vertical; |
| | | min-height: 60px; |
| | | } |
| | | |
| | | :deep(.el-select) { |
| | | width: 100%; |
| | | } |
| | | |
| | | /* æé®æ ·å¼ä¼å */ |
| | | :deep(.el-button--primary) { |
| | | background: linear-gradient(135deg, #409EFF 0%, #3375e0 100%); |
| | | border: none; |
| | | border-radius: 4px; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | :deep(.el-button--primary:hover) { |
| | | transform: translateY(-1px); |
| | | box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4); |
| | | } |
| | | |
| | | :deep(.el-button--success) { |
| | | background: linear-gradient(135deg, #67C23A 0%, #529b2f 100%); |
| | | border: none; |
| | | border-radius: 4px; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | :deep(.el-button--success:hover) { |
| | | transform: translateY(-1px); |
| | | box-shadow: 0 4px 12px rgba(103, 194, 58, 0.4); |
| | | } |
| | | |
| | | :deep(.el-button--warning) { |
| | | background: linear-gradient(135deg, #E6A23C 0%, #d18c2a 100%); |
| | | border: none; |
| | | border-radius: 4px; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | :deep(.el-button--warning:hover) { |
| | | transform: translateY(-1px); |
| | | box-shadow: 0 4px 12px rgba(230, 162, 60, 0.4); |
| | | } |
| | | |
| | | :deep(.el-button--danger) { |
| | | background: linear-gradient(135deg, #F56C6C 0%, #e05b5b 100%); |
| | | border: none; |
| | | border-radius: 4px; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | :deep(.el-button--danger:hover) { |
| | | transform: translateY(-1px); |
| | | box-shadow: 0 4px 12px rgba(245, 108, 108, 0.4); |
| | | } |
| | | |
| | | /* æ ç¾æ ·å¼ */ |
| | | :deep(.el-tag) { |
| | | border-radius: 12px; |
| | | border: none; |
| | | font-weight: 500; |
| | | padding: 4px 12px; |
| | | } |
| | | |
| | | :deep(.el-tag--success) { |
| | | background: linear-gradient(135deg, #67C23A 0%, #529b2f 100%); |
| | | color: white; |
| | | } |
| | | |
| | | :deep(.el-tag--warning) { |
| | | background: linear-gradient(135deg, #E6A23C 0%, #d18c2a 100%); |
| | | color: white; |
| | | } |
| | | |
| | | /* å¤éæ¡ç»æ ·å¼ */ |
| | | :deep(.el-checkbox-group) { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 15px; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | :deep(.el-checkbox) { |
| | | margin-right: 0; |
| | | } |
| | | |
| | | :deep(.el-checkbox__input.is-checked .el-checkbox__inner) { |
| | | background: linear-gradient(135deg, #409EFF 0%, #3375e0 100%); |
| | | border-color: #409EFF; |
| | | } |
| | | |
| | | :deep(.el-checkbox__input.is-checked + .el-checkbox__label) { |
| | | color: #409EFF; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | /* æ¥æéæ©å¨æ ·å¼ */ |
| | | :deep(.el-date-editor) { |
| | | width: 100%; |
| | | } |
| | | |
| | | :deep(.el-picker-panel) { |
| | | border-radius: 8px; |
| | | box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); |
| | | } |
| | | |
| | | /* å è½½ç¶æ */ |
| | | :deep(.el-loading-mask) { |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | /* å¡ç头鍿 ·å¼ä¼å */ |
| | | :deep(.el-card__header) { |
| | | background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ed 100%); |
| | | border-bottom: 1px solid #e4e7ed; |
| | | padding: 15px 20px; |
| | | } |
| | | |
| | | /* ååºå¼è®¾è®¡ */ |
| | | @media (max-width: 1200px) { |
| | | .organ-procurement-detail { |
| | | padding: 15px; |
| | | } |
| | | |
| | | :deep(.el-col) { |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | |
| | | @media (max-width: 768px) { |
| | | .organ-procurement-detail { |
| | | padding: 10px; |
| | | } |
| | | |
| | | .detail-title { |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .stat-item { |
| | | padding: 5px; |
| | | } |
| | | |
| | | .stat-label { |
| | | font-size: 10px; |
| | | } |
| | | |
| | | .stat-value { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | :deep(.el-table .cell) { |
| | | padding: 4px 8px; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | :deep(.el-checkbox-group) { |
| | | gap: 8px; |
| | | } |
| | | |
| | | .dialog-footer .el-button { |
| | | margin: 5px; |
| | | min-width: 100px; |
| | | } |
| | | } |
| | | |
| | | @media (max-width: 480px) { |
| | | .organ-procurement-detail { |
| | | padding: 5px; |
| | | } |
| | | |
| | | :deep(.el-card__header) { |
| | | padding: 10px 15px; |
| | | } |
| | | |
| | | :deep(.el-form-item__label) { |
| | | font-size: 12px; |
| | | } |
| | | |
| | | :deep(.el-table) { |
| | | font-size: 11px; |
| | | } |
| | | } |
| | | |
| | | /* å¨ç»ææ */ |
| | | .fade-enter-active, .fade-leave-active { |
| | | transition: opacity 0.3s ease; |
| | | } |
| | | |
| | | .fade-enter, .fade-leave-to { |
| | | opacity: 0; |
| | | } |
| | | |
| | | /* èªå®ä¹æ»å¨æ¡ */ |
| | | :deep(::-webkit-scrollbar) { |
| | | width: 6px; |
| | | height: 6px; |
| | | } |
| | | |
| | | :deep(::-webkit-scrollbar-track) { |
| | | background: #f1f1f1; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | :deep(::-webkit-scrollbar-thumb) { |
| | | background: #c1c1c1; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | :deep(::-webkit-scrollbar-thumb:hover) { |
| | | background: #a8a8a8; |
| | | } |
| | | |
| | | /* æä»¶ä¿¡æ¯æ ·å¼ */ |
| | | .file-info { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 5px 0; |
| | | } |
| | | |
| | | .file-info i { |
| | | font-size: 18px; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | /* æä½æé®ç»æ ·å¼ */ |
| | | :deep(.small-padding .el-button) { |
| | | margin: 0 2px; |
| | | padding: 4px 8px; |
| | | } |
| | | |
| | | /* 表åè¡é´è·ä¼å */ |
| | | :deep(.el-form-item) { |
| | | margin-bottom: 18px; |
| | | } |
| | | |
| | | :deep(.el-row) { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /* å¯¹è¯æ¡æ ·å¼ä¼å */ |
| | | :deep(.el-dialog) { |
| | | border-radius: 8px; |
| | | box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); |
| | | } |
| | | |
| | | :deep(.el-dialog__header) { |
| | | background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ed 100%); |
| | | border-bottom: 1px solid #e4e7ed; |
| | | padding: 15px 20px; |
| | | border-radius: 8px 8px 0 0; |
| | | } |
| | | |
| | | :deep(.el-dialog__title) { |
| | | font-weight: 600; |
| | | color: #303133; |
| | | } |
| | | |
| | | :deep(.el-dialog__body) { |
| | | padding: 20px; |
| | | } |
| | | |
| | | :deep(.el-dialog__footer) { |
| | | padding: 15px 20px; |
| | | border-top: 1px solid #e4e7ed; |
| | | } |
| | | |
| | | /* ç¹æ®ç¶ææç¤º */ |
| | | .procurement-warning { |
| | | background-color: #fff7e6; |
| | | border: 1px solid #ffecc2; |
| | | border-radius: 4px; |
| | | padding: 10px 15px; |
| | | margin: 10px 0; |
| | | color: #e6a23c; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .procurement-success { |
| | | background-color: #f0f9ff; |
| | | border: 1px solid #b3e0ff; |
| | | border-radius: 4px; |
| | | padding: 10px 15px; |
| | | margin: 10px 0; |
| | | color: #409EFF; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | /* æ¶é´çº¿æ ·å¼ï¼ç¨äºææ¯æ¶é´å±ç¤ºï¼ */ |
| | | .procurement-timeline { |
| | | margin: 20px 0; |
| | | padding: 15px; |
| | | background: #f8f9fa; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .timeline-item { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 10px; |
| | | padding: 8px 12px; |
| | | background: white; |
| | | border-radius: 4px; |
| | | border-left: 4px solid #409EFF; |
| | | } |
| | | |
| | | .timeline-label { |
| | | font-weight: 500; |
| | | min-width: 120px; |
| | | color: #606266; |
| | | } |
| | | |
| | | .timeline-value { |
| | | color: #303133; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | /* æå°æ ·å¼ */ |
| | | @media print { |
| | | .organ-procurement-detail { |
| | | padding: 0; |
| | | background: white; |
| | | } |
| | | |
| | | .detail-card, |
| | | .procurement-card, |
| | | .attachment-card { |
| | | box-shadow: none; |
| | | border: 1px solid #ddd; |
| | | margin-bottom: 15px; |
| | | page-break-inside: avoid; |
| | | } |
| | | |
| | | .dialog-footer, |
| | | .el-button { |
| | | display: none; |
| | | .procurement-stats .el-col { |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | :inline="true" |
| | | label-width="100px" |
| | | > |
| | | <el-form-item label="ä½é¢å·" prop="hospitalNo"> |
| | | <el-form-item label="ä½é¢å·" prop="inpatientno"> |
| | | <el-input |
| | | v-model="queryParams.hospitalNo" |
| | | v-model="queryParams.inpatientno" |
| | | placeholder="请è¾å
¥ä½é¢å·" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æç®è
å§å" prop="donorName"> |
| | | <el-form-item label="æç®è
å§å" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.donorName" |
| | | v-model="queryParams.name" |
| | | placeholder="请è¾å
¥æç®è
å§å" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="è·åç¶æ" prop="procurementStatus"> |
| | | <el-form-item label="è·åç¶æ" prop="recordstate"> |
| | | <el-select |
| | | v-model="queryParams.procurementStatus" |
| | | v-model="queryParams.recordstate" |
| | | placeholder="è¯·éæ©è·åç¶æ" |
| | | clearable |
| | | style="width: 200px" |
| | | > |
| | | <el-option label="å·²è·å" value="procured" /> |
| | | <el-option label="å¾
è·å" value="pending" /> |
| | | <el-option label="å·²è·å" value="1" /> |
| | | <el-option label="å¾
è·å" value="0" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | @click="handleUpdate" |
| | | >ä¿®æ¹</el-button |
| | | > |
| | | <el-button |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | >å é¤</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="8" style="text-align: right"> |
| | | <el-tooltip content="å·æ°" placement="top"> |
| | |
| | | <el-table-column |
| | | label="ä½é¢å·" |
| | | align="center" |
| | | prop="hospitalNo" |
| | | prop="inpatientno" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="æç®è
å§å" |
| | | align="center" |
| | | prop="donorName" |
| | | prop="name" |
| | | width="120" |
| | | /> |
| | | <el-table-column label="æ§å«" align="center" prop="gender" width="80"> |
| | | <el-table-column label="æ§å«" align="center" prop="sex" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag |
| | | :options="dict.type.sys_user_sex" |
| | | :value="parseInt(scope.row.gender)" |
| | | :value="scope.row.sex" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column |
| | | label="ç¾ç
è¯æ" |
| | | align="center" |
| | | prop="diagnosis" |
| | | prop="diagnosisname" |
| | | min-width="180" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="è·åç¶æ" |
| | | align="center" |
| | | prop="procurementStatus" |
| | | prop="recordstate" |
| | | width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="scope.row.procurementStatus === 'procured' ? 'success' : 'warning'"> |
| | | {{ scope.row.procurementStatus === 'procured' ? 'å·²è·å' : 'å¾
è·å' }} |
| | | <el-tag |
| | | :type="scope.row.recordstate === '1' ? 'success' : 'warning'" |
| | | > |
| | | {{ scope.row.recordstate === "1" ? "å·²è·å" : "å¾
è·å" }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="è·åæ¶é´" |
| | | label="è·åææ¯æ¶é´" |
| | | align="center" |
| | | prop="procurementTime" |
| | | prop="operationendtime" |
| | | width="160" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | scope.row.procurementTime |
| | | ? parseTime(scope.row.procurementTime, "{y}-{m}-{d} {h}:{i}") |
| | | scope.row.operationendtime |
| | | ? parseTime(scope.row.operationendtime, "{y}-{m}-{d} {h}:{i}") |
| | | : "-" |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="ç»è®°äºº" |
| | | label="ææ¯å»ç" |
| | | align="center" |
| | | prop="registrant" |
| | | prop="operationdoctor" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="ç»è®°æ¶é´" |
| | | label="è´è´£äºº" |
| | | align="center" |
| | | prop="registrationTime" |
| | | width="160" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | scope.row.registrationTime |
| | | ? parseTime(scope.row.registrationTime, "{y}-{m}-{d} {h}:{i}") |
| | | : "-" |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | prop="responsibleusername" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | |
| | | @click="handleUpdate(scope.row)" |
| | | >ä¿®æ¹</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | style="color: #F56C6C" |
| | | @click="handleDelete(scope.row)" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listOrganProcurement, delOrganProcurement } from "./organProcurement"; |
| | | // import { witnessList, delWitness } from "@/api/case/witness"; |
| | | import { witnessList } from "@/api/businessApi"; |
| | | import Pagination from "@/components/Pagination"; |
| | | |
| | | export default { |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | hospitalNo: undefined, |
| | | donorName: undefined, |
| | | procurementStatus: undefined |
| | | inpatientno: undefined, |
| | | name: undefined, |
| | | recordstate: undefined |
| | | } |
| | | }; |
| | | }, |
| | |
| | | // æ¥è¯¢å¨å®è·åå表 |
| | | getList() { |
| | | this.loading = true; |
| | | listOrganProcurement(this.queryParams) |
| | | witnessList(this.queryParams) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.organProcurementList = response.data.rows; |
| | | this.total = response.data.total; |
| | | this.organProcurementList = response.data; |
| | | this.total = response.total; |
| | | } else { |
| | | this.$message.error("è·åæ°æ®å¤±è´¥"); |
| | | this.$message.error(response.msg || "è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | this.loading = false; |
| | | }) |
| | |
| | | handleView(row) { |
| | | this.$router.push({ |
| | | path: "/case/GetWitnessInfo", |
| | | query: { id: row.id } |
| | | query: { id: row.id, infoid: row.infoid } |
| | | }); |
| | | }, |
| | | // æ°å¢æé®æä½ |
| | |
| | | }, |
| | | // ä¿®æ¹æé®æä½ |
| | | handleUpdate(row) { |
| | | const id = row.id || this.ids[0]; |
| | | this.$router.push({ |
| | | path: "/case/GetWitnessInfo", |
| | | query: { id: id } |
| | | query: { id: row.id, infoid: row.infoid } |
| | | }); |
| | | }, |
| | | // å é¤æé®æä½ |
| | | handleDelete(row) { |
| | | const ids = row.id ? [row.id] : this.ids; |
| | | this.$confirm("æ¯å¦ç¡®è®¤å é¤éä¸çæ°æ®é¡¹ï¼", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return delOrganProcurement(ids); |
| | | }) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.getList(); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | // æ¶é´æ ¼å¼å |
| | | parseTime(time, pattern) { |
| | |
| | | :inline="true" |
| | | label-width="100px" |
| | | > |
| | | <el-form-item label="ä½é¢å·" prop="hospitalNo"> |
| | | <el-form-item label="ä½é¢å·" prop="inpatientno"> |
| | | <el-input |
| | | v-model="queryParams.hospitalNo" |
| | | v-model="queryParams.inpatientno" |
| | | placeholder="请è¾å
¥ä½é¢å·" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æç®è
å§å" prop="donorName"> |
| | | <el-form-item label="æç®è
å§å" prop="name"> |
| | | <el-input |
| | | v-model="queryParams.donorName" |
| | | v-model="queryParams.name" |
| | | placeholder="请è¾å
¥æç®è
å§å" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å©ç¨ç¶æ" prop="utilizationStatus"> |
| | | <el-form-item label="è®°å½ç¶æ" prop="recordstate"> |
| | | <el-select |
| | | v-model="queryParams.utilizationStatus" |
| | | placeholder="è¯·éæ©å©ç¨ç¶æ" |
| | | v-model="queryParams.recordstate" |
| | | placeholder="è¯·éæ©è®°å½ç¶æ" |
| | | clearable |
| | | style="width: 200px" |
| | | > |
| | | <el-option label="已宿" value="completed" /> |
| | | <el-option label="è¿è¡ä¸" value="in_progress" /> |
| | | <el-option label="è¿è¡ä¸" value="processing" /> |
| | | <el-option label="å¾
å¤ç" value="pending" /> |
| | | <el-option label="å·²å
³é" value="closed" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | <el-table-column |
| | | label="ä½é¢å·" |
| | | align="center" |
| | | prop="hospitalNo" |
| | | prop="inpatientno" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="æ¡ä¾ç¼å·" |
| | | align="center" |
| | | prop="caseNo" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="æç®è
å§å" |
| | | align="center" |
| | | prop="donorName" |
| | | prop="name" |
| | | width="120" |
| | | /> |
| | | <el-table-column label="æ§å«" align="center" prop="gender" width="80"> |
| | | <el-table-column label="æ§å«" align="center" prop="sex" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag |
| | | :options="dict.type.sys_user_sex" |
| | | :value="parseInt(scope.row.gender)" |
| | | :value="scope.row.sex" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¹´é¾" align="center" prop="age" width="80" /> |
| | | <el-table-column label="è¡å" align="center" prop="bloodtype" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag |
| | | v-if="scope.row.bloodtype" |
| | | :options="dict.type.sys_BloodType" |
| | | :value="scope.row.bloodtype" |
| | | /> |
| | | <span v-else>-</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="ç¾ç
è¯æ" |
| | | align="center" |
| | | prop="diagnosis" |
| | | prop="diagnosisname" |
| | | min-width="180" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="å©ç¨ç¶æ" |
| | | label="宿æ¶é´" |
| | | align="center" |
| | | prop="utilizationStatus" |
| | | width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="getStatusTagType(scope.row.utilizationStatus)"> |
| | | {{ getStatusText(scope.row.utilizationStatus) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="ç»è®°äºº" |
| | | align="center" |
| | | prop="registrant" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="ç»è®°æ¶é´" |
| | | align="center" |
| | | prop="registrationTime" |
| | | prop="completetime" |
| | | width="160" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | scope.row.registrationTime |
| | | ? parseTime(scope.row.registrationTime, "{y}-{m}-{d} {h}:{i}") |
| | | scope.row.completetime |
| | | ? parseTime(scope.row.completetime, "{y}-{m}-{d} {h}:{i}") |
| | | : "-" |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="è´è´£äºº" |
| | | align="center" |
| | | prop="responsibleusername" |
| | | width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.responsibleusername || "-" }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="è®°å½ç¶æ" |
| | | align="center" |
| | | prop="recordstate" |
| | | width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="getStatusTagType(scope.row.recordstate)"> |
| | | {{ getStatusText(scope.row.recordstate) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listOrganUtilization, delOrganUtilization } from "./organUtilization"; |
| | | import { completionList, completionadd, completionedit } from "@/api/businessApi"; |
| | | import Pagination from "@/components/Pagination"; |
| | | |
| | | export default { |
| | | name: "OrganUtilizationList", |
| | | components: { Pagination }, |
| | | dicts: ["sys_user_sex"], |
| | | dicts: ["sys_user_sex", "sys_BloodType"], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | hospitalNo: undefined, |
| | | donorName: undefined, |
| | | utilizationStatus: undefined |
| | | inpatientno: undefined, |
| | | name: undefined, |
| | | recordstate: undefined, |
| | | caseNo: undefined, |
| | | donorno: undefined |
| | | } |
| | | }; |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | // æ¥è¯¢å¨å®å©ç¨å表 |
| | | getList() { |
| | | async getList() { |
| | | this.loading = true; |
| | | listOrganUtilization(this.queryParams) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.organUtilizationList = response.data.rows; |
| | | this.total = response.data.total; |
| | | try { |
| | | const response = await completionList(this.queryParams); |
| | | |
| | | if (response.code === 200) { |
| | | // å¤çä¸åæ ¼å¼çååºæ°æ® |
| | | let data = response.data; |
| | | if (Array.isArray(data)) { |
| | | this.organUtilizationList = data; |
| | | this.total = data.length; |
| | | } else if (data && data.rows) { |
| | | this.organUtilizationList = data.rows; |
| | | this.total = data.total || data.rows.length; |
| | | } else if (data && data.list) { |
| | | this.organUtilizationList = data.list; |
| | | this.total = data.total || data.list.length; |
| | | } else { |
| | | this.$message.error("è·åæ°æ®å¤±è´¥"); |
| | | this.organUtilizationList = []; |
| | | this.total = 0; |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | .catch(error => { |
| | | console.error("è·åå¨å®å©ç¨å表失败:", error); |
| | | this.loading = false; |
| | | this.$message.error("è·åæ°æ®å¤±è´¥"); |
| | | }); |
| | | } else { |
| | | this.$message.error("è·åæ°æ®å¤±è´¥ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | | } catch (error) { |
| | | console.error("è·åå¨å®å©ç¨å表失败:", error); |
| | | this.$message.error("è·åæ°æ®å¤±è´¥"); |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | | }, |
| | | // è·åç¶ææ ç¾ç±»å |
| | | getStatusTagType(status) { |
| | | const typeMap = { |
| | | completed: "success", |
| | | in_progress: "warning", |
| | | pending: "info" |
| | | processing: "warning", |
| | | pending: "info", |
| | | closed: "danger" |
| | | }; |
| | | return typeMap[status] || "info"; |
| | | }, |
| | |
| | | getStatusText(status) { |
| | | const textMap = { |
| | | completed: "已宿", |
| | | in_progress: "è¿è¡ä¸", |
| | | pending: "å¾
å¤ç" |
| | | processing: "è¿è¡ä¸", |
| | | pending: "å¾
å¤ç", |
| | | closed: "å·²å
³é" |
| | | }; |
| | | return textMap[status] || "æªç¥"; |
| | | }, |
| | |
| | | handleView(row) { |
| | | this.$router.push({ |
| | | path: "/case/organUtilizationInfo", |
| | | query: { id: row.id } |
| | | query: { |
| | | id: row.id, |
| | | infoid: row.infoid |
| | | } |
| | | }); |
| | | }, |
| | | // æ°å¢æé®æä½ |
| | |
| | | // ä¿®æ¹æé®æä½ |
| | | handleUpdate(row) { |
| | | const id = row.id || this.ids[0]; |
| | | const infoid = row.infoid; |
| | | this.$router.push({ |
| | | path: "/case/organUtilizationInfo", |
| | | query: { id: id } |
| | | query: { |
| | | id: id, |
| | | infoid: infoid |
| | | } |
| | | }); |
| | | }, |
| | | // å é¤æé®æä½ |
| | |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return delOrganUtilization(ids); |
| | | }) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.getList(); |
| | | } |
| | | .then(async () => { |
| | | // TODO: è¿ééè¦è°ç¨å 餿¥å£ï¼ä½ç®åAPI䏿²¡ææä¾å 餿¥å£ |
| | | // 妿éè¦å é¤åè½ï¼éè¦å
确认å端æ¯å¦æå¯¹åºçå 餿¥å£ |
| | | this.$message.warning("å é¤åè½ææªå®ç°ï¼è¯·ç¡®è®¤å端æ¥å£"); |
| | | |
| | | // ä¸´æ¶æ¨¡æå 餿å |
| | | // const response = await completiondelete(ids); |
| | | // if (response.code === 200) { |
| | | // this.$message.success("å 餿å"); |
| | | // this.getList(); |
| | | // } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | @click="handleAllocate" |
| | | :disabled="form.allocationStatus === 'allocated'" |
| | | @click="handleConfirmAllocation" |
| | | :disabled="form.allocationStatus === '1'" |
| | | :loading="confirmLoading" |
| | | > |
| | | 确认åé
|
| | | </el-button> |
| | |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="120px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä½é¢å·" prop="hospitalNo"> |
| | | <el-input v-model="form.hospitalNo" readonly /> |
| | | <el-form-item label="ä½é¢å·" prop="donorno"> |
| | | <el-input v-model="form.donorno" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä½é¢å·" prop="caseNo"> |
| | | <el-input v-model="form.caseNo" readonly /> |
| | | <el-form-item label="æ¡ä¾ç¼å·" prop="caseNo"> |
| | | <el-input v-model="form.caseNo" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æç®è
å§å" prop="donorName"> |
| | | <el-input v-model="form.donorName" /> |
| | | <el-form-item label="æç®è
å§å" prop="name"> |
| | | <el-input v-model="form.name" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ§å«" prop="gender"> |
| | | <el-select v-model="form.gender" style="width: 100%"> |
| | | <el-form-item label="æ§å«" prop="sex"> |
| | | <el-select v-model="form.sex" style="width: 100%"> |
| | | <el-option label="ç·" value="0" /> |
| | | <el-option label="女" value="1" /> |
| | | </el-select> |
| | |
| | | <el-input v-model="form.age" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="8"> |
| | | <el-form-item label="æç®ç±»å«" prop="donationcategory"> |
| | | <el-select v-model="form.donationcategory" style="width: 100%"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_DonationCategory || []" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> --> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åºçæ¥æ" prop="birthDate"> |
| | | <el-date-picker |
| | | v-model="form.birthDate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | /> |
| | | <el-form-item label="è¡å" prop="bloodtype"> |
| | | <el-select v-model="form.bloodtype" style="width: 100%"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_BloodType || []" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶å·ç " prop="idcardno"> |
| | | <el-input v-model="form.idcardno" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è®°å½ç¶æ" prop="recordstate"> |
| | | <el-input v-model="form.recordstate" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¾ç
è¯æ" prop="diagnosis"> |
| | | <el-form-item label="ç¾ç
è¯æ" prop="diagnosisname"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="2" |
| | | v-model="form.diagnosis" |
| | | v-model="form.diagnosisname" |
| | | placeholder="请è¾å
¥ç¾ç
è¯æä¿¡æ¯" |
| | | /> |
| | | </el-form-item> |
| | |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.allocationStatus !== 'allocated'" |
| | | :disabled="form.allocationStatus === '1'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»è®°äºº" prop="registrant"> |
| | | <el-input v-model="form.registrant" /> |
| | | <el-form-item label="æå¨å»çæºæ" prop="treatmenthospitalname"> |
| | | <el-input |
| | | v-model="form.treatmenthospitalname" |
| | | placeholder="请è¾å
¥å»çæºæåç§°" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å»çæºæç¼ç " prop="treatmenthospitalno"> |
| | | <el-input |
| | | v-model="form.treatmenthospitalno" |
| | | placeholder="请è¾å
¥å»çæºæç¼ç " |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»è®°äºº" prop="registrationName"> |
| | | <el-input v-model="form.registrationName" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | <div style="float: right;"> |
| | | <el-tag |
| | | :type=" |
| | | form.allocationStatus === 'allocated' ? 'success' : 'warning' |
| | | form.allocationStatus === '1' |
| | | ? 'success' |
| | | : form.allocationStatus === '2' |
| | | ? 'danger' |
| | | : 'warning' |
| | | " |
| | | > |
| | | {{ form.allocationStatus === "allocated" ? "å·²åé
" : "å¾
åé
" }} |
| | | {{ |
| | | form.allocationStatus === "1" |
| | | ? "å·²åé
" |
| | | : form.allocationStatus === "2" |
| | | ? "ä½åº" |
| | | : "æªåé
" |
| | | }} |
| | | </el-tag> |
| | | </div> |
| | | </div> |
| | |
| | | @change="handleOrganSelectionChange" |
| | | > |
| | | <el-checkbox |
| | | v-for="organ in organDict" |
| | | :key="organ.value" |
| | | :label="organ.value" |
| | | :disabled="form.allocationStatus === 'allocated'" |
| | | v-for="dict in dict.type.sys_Organ || []" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | :disabled="form.allocationStatus === '1'" |
| | | > |
| | | {{ organ.label }} |
| | | {{ dict.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | <el-input |
| | | v-if="showOtherInput" |
| | | v-model="otherOrganInput" |
| | | placeholder="请è¾å
¥å
¶ä»å¨å®åç§°" |
| | | style="margin-top: 10px; width: 300px;" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-col> |
| | | <el-form-item> |
| | | <el-table |
| | | :data="allocationData.records" |
| | | :data="allocationData.serviceDonateorganList" |
| | | v-loading="loading" |
| | | border |
| | | style="width: 100%" |
| | |
| | | label="å¨å®åç§°" |
| | | align="center" |
| | | width="120" |
| | | prop="organName" |
| | | prop="organname" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.organName" |
| | | v-model="scope.row.organname" |
| | | placeholder="å¨å®åç§°" |
| | | :disabled="true" |
| | | /> |
| | |
| | | label="åé
ç³»ç»ç¼å·" |
| | | align="center" |
| | | width="150" |
| | | prop="systemNo" |
| | | prop="caseno" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.systemNo" |
| | | v-model="scope.row.caseno" |
| | | placeholder="åé
ç³»ç»ç¼å·" |
| | | :disabled="form.allocationStatus === 'allocated'" |
| | | :disabled="form.allocationStatus === '1'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | label="åé
æ¥æ¶æ¶é´" |
| | | align="center" |
| | | width="180" |
| | | prop="applicantTime" |
| | | prop="applicanttime" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="scope.row.applicantTime" |
| | | v-model="scope.row.applicanttime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="éæ©åé
æ¥æ¶æ¶é´" |
| | | :disabled="form.allocationStatus === 'allocated'" |
| | | :disabled="form.allocationStatus === '1'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | label="åä½å§æ°" |
| | | align="center" |
| | | width="120" |
| | | prop="recipientName" |
| | | prop="name" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.recipientName" |
| | | v-model="scope.row.name" |
| | | placeholder="åä½å§æ°" |
| | | :disabled="form.allocationStatus === 'allocated'" |
| | | :disabled="form.allocationStatus === '1'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | label="ç§»æ¤å»é¢" |
| | | align="center" |
| | | width="200" |
| | | prop="transplantHospitalNo" |
| | | prop="transplanthospitalno" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-model="scope.row.transplantHospitalNo" |
| | | placeholder="è¯·éæ©ç§»æ¤å»é¢" |
| | | style="width: 100%" |
| | | :disabled="form.allocationStatus === 'allocated'" |
| | | @change="handleHospitalChange(scope.row, $event)" |
| | | > |
| | | <el-option |
| | | v-for="hospital in hospitalList" |
| | | :key="hospital.hospitalNo" |
| | | :label="hospital.hospitalName" |
| | | :value="hospital.hospitalNo" |
| | | <div> |
| | | <org-selecter |
| | | ref="tranHosSelect" |
| | | :org-type="'4'" |
| | | :dataList="dataList" |
| | | v-model="scope.row.transplanthospitalno" |
| | | style="width: 100%" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="说æ" |
| | | align="center" |
| | | prop="reallocationReason" |
| | | prop="reallocationreason" |
| | | min-width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | type="textarea" |
| | | clearable |
| | | v-model="scope.row.reallocationReason" |
| | | v-model="scope.row.reallocationreason" |
| | | placeholder="请è¾å
¥è¯´æ" |
| | | :disabled="form.allocationStatus === 'allocated'" |
| | | :disabled="form.allocationStatus === '1'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | align="center" |
| | | width="120" |
| | | class-name="small-padding fixed-width" |
| | | v-if="form.allocationStatus !== 'allocated'" |
| | | v-if="form.allocationStatus !== '1'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | type="text" |
| | | icon="el-icon-copy-document" |
| | | @click="handleRedistribution(scope.row)" |
| | | :disabled="!scope.row.systemNo" |
| | | :disabled="!scope.row.caseno" |
| | | > |
| | | éåé
|
| | | </el-button> |
| | |
| | | </el-row> |
| | | |
| | | <!-- åé
ç»è®¡ä¿¡æ¯ --> |
| | | <div class="allocation-stats" v-if="allocationData.records.length > 0"> |
| | | <div |
| | | class="allocation-stats" |
| | | v-if=" |
| | | allocationData.serviceDonateorganList && |
| | | allocationData.serviceDonateorganList.length > 0 |
| | | " |
| | | > |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <div class="stat-item"> |
| | | <span class="stat-label">å·²åé
å¨å®:</span> |
| | | <span class="stat-value" |
| | | >{{ allocationData.records.length }} 个</span |
| | | >{{ allocationData.serviceDonateorganList.length }} 个</span |
| | | > |
| | | </div> |
| | | </el-col> |
| | |
| | | <span class="stat-value"> |
| | | <el-tag |
| | | :type=" |
| | | form.allocationStatus === 'allocated' |
| | | form.allocationStatus === '1' |
| | | ? 'success' |
| | | : form.allocationStatus === '2' |
| | | ? 'danger' |
| | | : 'warning' |
| | | " |
| | | > |
| | | {{ |
| | | form.allocationStatus === "allocated" |
| | | ? "已宿" |
| | | : "è¿è¡ä¸" |
| | | form.allocationStatus === "1" |
| | | ? "å·²åé
" |
| | | : form.allocationStatus === "2" |
| | | ? "ä½åº" |
| | | : "æªåé
" |
| | | }} |
| | | </el-tag> |
| | | </span> |
| | |
| | | </div> |
| | | </el-form> |
| | | |
| | | <div class="dialog-footer" v-if="form.allocationStatus !== 'allocated'"> |
| | | <div class="dialog-footer" v-if="form.allocationStatus !== '1'"> |
| | | <el-button |
| | | type="primary" |
| | | @click="handleSaveAllocation" |
| | | :loading="saveLoading" |
| | | :disabled="allocationData.records.length === 0" |
| | | :disabled=" |
| | | !allocationData.serviceDonateorganList || |
| | | allocationData.serviceDonateorganList.length === 0 |
| | | " |
| | | > |
| | | ä¿ååé
è®°å½ |
| | | </el-button> |
| | |
| | | </div> |
| | | </el-card> |
| | | |
| | | <!-- é件管çé¨å --> |
| | | <!-- é件管çé¨åä¼å --> |
| | | <el-card class="attachment-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">ç¸å
³éä»¶</span> |
| | | <upload-attachment |
| | | :file-list="attachments" |
| | | @change="handleAttachmentChange" |
| | | :limit="10" |
| | | :accept="'.pdf,.jpg,.jpeg,.png,.doc,.docx'" |
| | | /> |
| | | <div class="attachment-header"> |
| | | <i class="el-icon-paperclip"></i> |
| | | <span class="attachment-title">ç¸å
³éä»¶</span> |
| | | <span class="attachment-tip" |
| | | >æ¯æä¸ä¼ å¨å®åé
ç¸å
³æä»¶ (æå¤{{ attachmentLimit }}个)</span |
| | | > |
| | | </div> |
| | | |
| | | <div class="attachment-list"> |
| | | <el-table :data="attachments" style="width: 100%"> |
| | | <el-table-column label="æä»¶åç§°" min-width="200"> |
| | | <!-- ä½¿ç¨ UploadAttachment ç»ä»¶ --> |
| | | <UploadAttachment |
| | | ref="uploadAttachment" |
| | | :file-list="attachmentFileList" |
| | | :limit="attachmentLimit" |
| | | :accept="attachmentAccept" |
| | | :multiple="true" |
| | | @change="handleAttachmentChange" |
| | | @upload-success="handleUploadSuccess" |
| | | @upload-error="handleUploadError" |
| | | @remove="handleAttachmentRemove" |
| | | /> |
| | | |
| | | <!-- éä»¶å表å±ç¤º --> |
| | | <div class="attachment-list" v-if="attachments && attachments.length > 0"> |
| | | <div class="list-title">å·²ä¸ä¼ éä»¶ ({{ attachments.length }})</div> |
| | | <el-table :data="attachments" style="width: 100%" size="small"> |
| | | <el-table-column label="æä»¶å" min-width="200"> |
| | | <template slot-scope="scope"> |
| | | <div class="file-info"> |
| | | <i |
| | | :class="getFileIcon(scope.row.fileName)" |
| | | style="margin-right: 8px; color: #409EFF;" |
| | | ></i> |
| | | <span>{{ scope.row.fileName }}</span> |
| | | </div> |
| | | <i |
| | | class="el-icon-document" |
| | | :style="{ color: getFileIconColor(scope.row.fileName) }" |
| | | ></i> |
| | | <span class="file-name">{{ scope.row.fileName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æä»¶ç±»å" width="100" align="center"> |
| | | <el-table-column label="æä»¶ç±»å" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag size="small">{{ |
| | | getFileType(scope.row.fileName) |
| | | }}</el-tag> |
| | | <el-tag :type="getFileTagType(scope.row.fileName)" size="small"> |
| | | {{ getFileTypeText(scope.row.fileName) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æä»¶å¤§å°" width="100" align="center"> |
| | | <el-table-column label="ä¸ä¼ æ¶é´" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatDateTime(scope.row.uploadTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä»¶å¤§å°" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatFileSize(scope.row.fileSize) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="ä¸ä¼ æ¶é´" width="160" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.uploadTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æä½" width="150" align="center"> |
| | | <el-table-column label="æä½" width="200" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handlePreviewAttachment(scope.row)" |
| | | >é¢è§</el-button |
| | | type="primary" |
| | | @click="handlePreview(scope.row)" |
| | | :disabled="!isPreviewable(scope.row.fileName)" |
| | | > |
| | | é¢è§ |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-download" |
| | | type="success" |
| | | @click="handleDownloadAttachment(scope.row)" |
| | | >ä¸è½½</el-button |
| | | > |
| | | ä¸è½½ |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | style="color: #F56C6C;" |
| | | @click="handleRemoveAttachment(scope.row)" |
| | | >å é¤</el-button |
| | | type="danger" |
| | | @click="handleRemoveAttachment(scope.$index)" |
| | | > |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | <!-- éä»¶é¢è§å¯¹è¯æ¡ --> |
| | | <attachment-preview |
| | | :visible="attachmentPreviewVisible" |
| | | :file-list="currentAttachmentList" |
| | | :title="attachmentPreviewTitle" |
| | | @close="attachmentPreviewVisible = false" |
| | | /> |
| | | |
| | | <!-- éåé
å¯¹è¯æ¡ --> |
| | | <el-dialog |
| | | title="å¨å®éåé
" |
| | |
| | | > |
| | | <el-form :model="redistributionForm" label-width="100px"> |
| | | <el-form-item label="åå¨å®ä¿¡æ¯"> |
| | | <el-input v-model="redistributionForm.organName" readonly /> |
| | | <el-input v-model="redistributionForm.organname" readonly /> |
| | | </el-form-item> |
| | | <el-form-item label="éåé
åå " prop="reason"> |
| | | <el-input |
| | |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | <!-- éä»¶é¢è§å¯¹è¯æ¡ --> |
| | | <FilePreviewDialog |
| | | :visible="filePreviewVisible" |
| | | :file="currentPreviewFile" |
| | | @close="filePreviewVisible = false" |
| | | @download="handleDownloadAttachment" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getOrganAllocationDetail, |
| | | updateOrganAllocation, |
| | | saveAllocationRecords, |
| | | getHospitalList, |
| | | getOrganDict |
| | | } from "./organAllocation"; |
| | | allocationList, |
| | | allocationadd, |
| | | allocationedit |
| | | } from "@/api/businessApi"; |
| | | import UploadAttachment from "@/components/UploadAttachment"; |
| | | import AttachmentPreview from "@/components/AttachmentPreview"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | import OrgSelecter from "@/views/project/components/orgselect"; |
| | | |
| | | import dayjs from "dayjs"; |
| | | |
| | | export default { |
| | | name: "OrganAllocationDetail", |
| | | components: { |
| | | UploadAttachment, |
| | | AttachmentPreview, |
| | | OrgSelecter, |
| | | FilePreviewDialog |
| | | }, |
| | | dicts: [ |
| | | "sys_BloodType", |
| | | "sys_DonationCategory", |
| | | "sys_RecordState", |
| | | "sys_Organ" |
| | | ], |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: undefined, |
| | | hospitalNo: "", |
| | | infoid: undefined, |
| | | donationcategory: "", |
| | | recordstate: "", |
| | | caseNo: "", |
| | | donorName: "", |
| | | gender: "", |
| | | donorno: "", |
| | | treatmenthospitalname: "", |
| | | treatmenthospitalno: "", |
| | | sex: "", |
| | | name: "", |
| | | age: "", |
| | | birthDate: "", |
| | | diagnosis: "", |
| | | allocationStatus: "pending", |
| | | bloodtype: "", |
| | | idcardno: "", |
| | | diagnosisname: "", |
| | | allocationStatus: "0", // 0:æªåé
ï¼1ï¼å·²åé
ï¼2ä½åº |
| | | allocationTime: "", |
| | | registrant: "", |
| | | registrationTime: "" |
| | | registrationCode: "", |
| | | registrationName: "", |
| | | registrationTime: "", |
| | | attachments: [] // æ·»å éä»¶åæ®µ |
| | | }, |
| | | // éä»¶é¢è§ç¸å
³ |
| | | attachmentPreviewVisible: false, |
| | | currentAttachmentList: [], |
| | | attachmentPreviewTitle: "", |
| | | dataList: [], |
| | | // 表åéªè¯è§å |
| | | rules: { |
| | | donorName: [ |
| | | name: [ |
| | | { required: true, message: "æç®è
å§åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | diagnosis: [ |
| | | diagnosisname: [ |
| | | { required: true, message: "ç¾ç
è¯æä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | recordstate: [ |
| | | { required: true, message: "è®°å½ç¶æä¸è½ä¸ºç©º", trigger: "change" } |
| | | ] |
| | | }, |
| | | // åé
è®°å½éªè¯è§å |
| | |
| | | confirmLoading: false, |
| | | // å è½½ç¶æ |
| | | loading: false, |
| | | // éä¸çå¨å® |
| | | // éä¸çå¨å®ï¼åå¨åå
¸valueï¼ |
| | | selectedOrgans: [], |
| | | // å¨å®åå
¸ |
| | | organDict: [], |
| | | // å
¶ä»å¨å®è¾å
¥ |
| | | otherOrganInput: "", |
| | | // å»é¢å表 |
| | | hospitalList: [], |
| | | // åé
è®°å½æ°æ® |
| | | allocationData: { |
| | | records: [] |
| | | serviceDonateorganList: [] |
| | | }, |
| | | // éä»¶æ°æ® |
| | | attachments: [], |
| | | attachmentFileList: [], |
| | | // éä»¶ç¸å
³é
ç½® |
| | | attachmentLimit: 10, |
| | | attachmentAccept: |
| | | ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt", |
| | | // éåé
å¯¹è¯æ¡ |
| | | redistributionDialogVisible: false, |
| | | redistributionForm: { |
| | | organName: "", |
| | | organname: "", |
| | | reason: "" |
| | | }, |
| | | currentRedistributeRecord: null |
| | | currentRedistributeRecord: null, |
| | | // æä»¶é¢è§ç¸å
³ |
| | | filePreviewVisible: false, |
| | | currentPreviewFile: null, |
| | | filePreviewTitle: "" |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | // ä¸å®æ´çè®°å½æ°é |
| | | incompleteRecords() { |
| | | return this.allocationData.records.filter( |
| | | if (!this.allocationData.serviceDonateorganList) return 0; |
| | | return this.allocationData.serviceDonateorganList.filter( |
| | | record => |
| | | !record.systemNo || |
| | | !record.applicantTime || |
| | | !record.recipientName || |
| | | !record.transplantHospitalNo |
| | | !record.caseno || |
| | | !record.applicanttime || |
| | | !record.name || |
| | | !record.transplanthospitalno |
| | | ).length; |
| | | }, |
| | | // å¯ä¸å»é¢æ°é |
| | | uniqueHospitals() { |
| | | const hospitals = this.allocationData.records |
| | | .map(record => record.transplantHospitalNo) |
| | | if (!this.allocationData.serviceDonateorganList) return 0; |
| | | const hospitals = this.allocationData.serviceDonateorganList |
| | | .map(record => record.transplanthospitalno) |
| | | .filter(Boolean); |
| | | return new Set(hospitals).size; |
| | | }, |
| | | // è·åå¨å®åå
¸ |
| | | organDict() { |
| | | return this.dict.type.sys_Organ || []; |
| | | }, |
| | | // 夿æ¯å¦éè¦æ¾ç¤ºå
¶ä»è¾å
¥æ¡ |
| | | showOtherInput() { |
| | | return this.selectedOrgans.includes("C01"); // å设"å
¶ä»"çåå
¸å¼æ¯C01 |
| | | } |
| | | }, |
| | | watch: { |
| | | // çå¬éä»¶æ°æ®åå |
| | | attachments: { |
| | | handler(newAttachments) { |
| | | this.attachmentFileList = newAttachments.map(item => ({ |
| | | uid: item.id || Math.random(), |
| | | name: item.fileName, |
| | | fileSize: item.fileSize, |
| | | url: item.path || item.fileUrl, |
| | | uploadTime: item.uploadTime, |
| | | status: "success" |
| | | })); |
| | | }, |
| | | deep: true |
| | | }, |
| | | // çå¬å
¶ä»å¨å®è¾å
¥åå |
| | | otherOrganInput(newValue) { |
| | | if (newValue && this.selectedOrgans.includes("C01")) { |
| | | // æ´æ°å¨å®åå
¸ä¸ç"å
¶ä»"æ ç¾æ¾ç¤º |
| | | const otherRecord = this.allocationData.serviceDonateorganList.find( |
| | | item => item.organname && item.organname.includes("å
¶ä»") |
| | | ); |
| | | if (otherRecord) { |
| | | otherRecord.organname = `å
¶ä»(${newValue})`; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | const id = this.$route.query.id; |
| | | if (id) { |
| | | this.getDetail(id); |
| | | } else { |
| | | this.generateCaseNo(); |
| | | this.form.registrant = this.currentUser.username || "å½åç¨æ·"; |
| | | this.initData(); |
| | | }, |
| | | methods: { |
| | | // æ ¹æ®åå
¸valueè·ålabel |
| | | getOrganLabel(organValue) { |
| | | const dictItem = this.organDict.find(item => item.value === organValue); |
| | | return dictItem ? dictItem.label : organValue; |
| | | }, |
| | | |
| | | // åå§åæ°æ® |
| | | initData() { |
| | | const { id, infoid } = this.$route.query; |
| | | |
| | | if (!infoid) { |
| | | this.$message.error("缺å°å¿
è¦çè·¯ç±åæ° infoid"); |
| | | this.$router.back(); |
| | | return; |
| | | } |
| | | |
| | | this.form.infoid = infoid; |
| | | this.form.registrationName = |
| | | this.currentUser.nickName || this.currentUser.username || "å½åç¨æ·"; |
| | | this.form.registrationTime = new Date() |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19); |
| | | } |
| | | this.getOrganDictionary(); |
| | | this.getHospitalData(); |
| | | }, |
| | | methods: { |
| | | // çæä½é¢å· |
| | | generateCaseNo() { |
| | | |
| | | if (infoid) { |
| | | this.getDetail(infoid); |
| | | } else { |
| | | this.generateDonorNo(); |
| | | } |
| | | |
| | | this.getHospitalData(); |
| | | }, |
| | | // çææç®è
ç¼å· |
| | | generateDonorNo() { |
| | | const timestamp = Date.now().toString(); |
| | | this.form.hospitalNo = "D" + timestamp.slice(-6); |
| | | this.form.caseNo = "C" + timestamp.slice(-6); |
| | | this.form.donorno = "D" + timestamp.slice(-8); |
| | | this.form.caseNo = "CASE" + timestamp.slice(-6); |
| | | }, |
| | | // è·å详æ
|
| | | getDetail(id) { |
| | | async getDetail(infoid) { |
| | | this.loading = true; |
| | | getOrganAllocationDetail(id) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.form = response.data; |
| | | if (response.data.allocationRecords) { |
| | | this.allocationData.records = response.data.allocationRecords; |
| | | this.selectedOrgans = response.data.allocationRecords.map( |
| | | item => item.organNo |
| | | ); |
| | | try { |
| | | const response = await allocationList({ infoid }); |
| | | if ( |
| | | response.code === 200 && |
| | | response.data && |
| | | response.data.length > 0 |
| | | ) { |
| | | const data = response.data[0]; |
| | | |
| | | // å¡«å
è¡¨åæ°æ® |
| | | Object.assign(this.form, data); |
| | | |
| | | // åå§åéä»¶ |
| | | if (this.form.attachments) { |
| | | this.attachments = Array.isArray(this.form.attachments) |
| | | ? [...this.form.attachments] |
| | | : []; |
| | | } |
| | | |
| | | // å¤çåé
è®°å½ |
| | | if (data.serviceDonateorganList) { |
| | | this.allocationData.serviceDonateorganList = Array.isArray( |
| | | data.serviceDonateorganList |
| | | ) |
| | | ? data.serviceDonateorganList |
| | | : []; |
| | | |
| | | // æ´æ°éä¸çå¨å® |
| | | this.selectedOrgans = this.allocationData.serviceDonateorganList |
| | | .map(item => { |
| | | // ä»åç«¯æ°æ®ä¸è·åå¨å®çvalue |
| | | if (item.organno) { |
| | | return item.organno; |
| | | } |
| | | |
| | | // 妿åç«¯åªæå¨å®åç§°ï¼å°è¯ä»åå
¸ä¸å¹é
|
| | | if (item.organname) { |
| | | const dictItem = this.organDict.find( |
| | | org => |
| | | org.label === item.organname || |
| | | (item.organname && item.organname.includes(org.label)) |
| | | ); |
| | | return dictItem ? dictItem.value : null; |
| | | } |
| | | |
| | | return null; |
| | | }) |
| | | .filter(Boolean); |
| | | |
| | | // å¤ç"å
¶ä»"å¨å® |
| | | const otherRecord = this.allocationData.serviceDonateorganList.find( |
| | | item => item.organname && item.organname.includes("å
¶ä»(") |
| | | ); |
| | | if (otherRecord) { |
| | | const match = otherRecord.organname.match(/å
¶ä»\((.*?)\)/); |
| | | if (match) { |
| | | this.otherOrganInput = match[1]; |
| | | } |
| | | } |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | .catch(error => { |
| | | console.error("è·åå¨å®åé
详æ
失败:", error); |
| | | this.loading = false; |
| | | this.$message.error("è·å详æ
失败"); |
| | | }); |
| | | }, |
| | | // è·åå¨å®åå
¸ |
| | | getOrganDictionary() { |
| | | getOrganDict().then(response => { |
| | | if (response.code === 200) { |
| | | this.organDict = response.data; |
| | | |
| | | this.$message.success("æ°æ®å è½½æå"); |
| | | } else { |
| | | this.$message.warning("æªæ¾å°å¯¹åºçå¨å®åé
æ°æ®"); |
| | | } |
| | | }); |
| | | } catch (error) { |
| | | console.error("è·åå¨å®åé
详æ
失败:", error); |
| | | this.$message.error("è·å详æ
失败"); |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | | }, |
| | | // è·åå»é¢æ°æ® |
| | | getHospitalData() { |
| | | getHospitalList().then(response => { |
| | | if (response.code === 200) { |
| | | this.hospitalList = response.data; |
| | | } |
| | | }); |
| | | }, |
| | | handleAttachmentChange(fileList) { |
| | | console.log(fileList,'æµè¯'); |
| | | |
| | | async getHospitalData() { |
| | | try { |
| | | // TODO: æ¿æ¢ä¸ºå®é
çå»é¢å表æ¥å£ |
| | | // ææ¶ä½¿ç¨æ¨¡ææ°æ® |
| | | this.hospitalList = [ |
| | | { hospitalNo: "H001", hospitalName: "å京ååå»é¢" }, |
| | | { hospitalNo: "H002", hospitalName: "䏿µ·åå±±å»é¢" }, |
| | | { hospitalNo: "H003", hospitalName: "广å·ä¸å±±å»é¢" }, |
| | | { hospitalNo: "H004", hospitalName: "æ¦æ±åæµå»é¢" }, |
| | | { hospitalNo: "H005", hospitalName: "æé½å西å»é¢" } |
| | | ]; |
| | | } catch (error) { |
| | | console.error("è·åå»é¢æ°æ®å¤±è´¥:", error); |
| | | this.$message.error("è·åå»é¢æ°æ®å¤±è´¥"); |
| | | } |
| | | }, |
| | | // å¨å®éæ©ç¶æåå |
| | | handleOrganSelectionChange(selectedValues) { |
| | | const currentOrganNos = this.allocationData.records.map( |
| | | item => item.organNo |
| | | if (!this.allocationData.serviceDonateorganList) { |
| | | this.allocationData.serviceDonateorganList = []; |
| | | } |
| | | |
| | | const currentOrganValues = this.allocationData.serviceDonateorganList.map( |
| | | item => item.organno |
| | | ); |
| | | |
| | | // å¤çäºæ¥é»è¾ï¼åèæç®å³å®é¡µé¢ï¼ |
| | | this.handleExclusiveSelections(selectedValues); |
| | | |
| | | // æ°å¢éæ©çå¨å® |
| | | selectedValues.forEach(organValue => { |
| | | if (!currentOrganNos.includes(organValue)) { |
| | | const organInfo = this.organDict.find( |
| | | item => item.value === organValue |
| | | ); |
| | | if (organInfo) { |
| | | this.allocationData.records.push({ |
| | | organName: organInfo.label, |
| | | organNo: organValue, |
| | | id: null, |
| | | allocationId: this.form.id, |
| | | systemNo: "", |
| | | applicantTime: "", |
| | | recipientName: "", |
| | | transplantHospitalNo: "", |
| | | transplantHospitalName: "", |
| | | reallocationReason: "", |
| | | organState: 1 |
| | | }); |
| | | } |
| | | if (!currentOrganValues.includes(organValue)) { |
| | | this.createOrganRecord(organValue); |
| | | } |
| | | }); |
| | | |
| | | // ç§»é¤åæ¶éæ©çå¨å® |
| | | this.allocationData.records = this.allocationData.records.filter( |
| | | this.allocationData.serviceDonateorganList = this.allocationData.serviceDonateorganList.filter( |
| | | record => { |
| | | if (selectedValues.includes(record.organNo)) { |
| | | if (selectedValues.includes(record.organno)) { |
| | | return true; |
| | | } else { |
| | | if (record.id) { |
| | |
| | | } |
| | | ) |
| | | .then(() => { |
| | | // å®é
项ç®ä¸è¿éåºè¯¥è°ç¨å é¤API |
| | | this.allocationData.records = this.allocationData.records.filter( |
| | | r => r.organNo !== record.organNo |
| | | this.allocationData.serviceDonateorganList = this.allocationData.serviceDonateorganList.filter( |
| | | r => r.organno !== record.organno |
| | | ); |
| | | this.$message.success("å 餿å"); |
| | | }) |
| | | .catch(() => { |
| | | this.selectedOrgans.push(record.organNo); |
| | | this.selectedOrgans.push(record.organno); |
| | | }); |
| | | return true; // çå¾
ç¨æ·ç¡®è®¤ |
| | | } else { |
| | |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // å¤çäºæ¥éæ©ï¼åèæç®å³å®é¡µé¢ï¼ |
| | | handleExclusiveSelections(selectedValues) { |
| | | // 妿鿩äº"åè¾"(å设åå
¸å¼ä¸ºC64)ï¼èªå¨åæ¶åç¬ç"å·¦è¾"(C64L)å"å³è¾"(C64R)éæ© |
| | | if (selectedValues.includes("C64")) { |
| | | this.selectedOrgans = selectedValues.filter( |
| | | item => item !== "C64L" && item !== "C64R" |
| | | ); |
| | | } |
| | | // 妿鿩äº"å·¦è¾"æ"å³è¾"ï¼åæ¶"åè¾"éæ© |
| | | else if ( |
| | | selectedValues.includes("C64L") || |
| | | selectedValues.includes("C64R") |
| | | ) { |
| | | this.selectedOrgans = selectedValues.filter(item => item !== "C64"); |
| | | } |
| | | |
| | | // 妿鿩äº"å
¨èº"(å设åå
¸å¼ä¸ºC34)ï¼èªå¨åæ¶åç¬ç"å·¦èº"(C34L)å"å³èº"(C34R)éæ© |
| | | if (selectedValues.includes("C34")) { |
| | | this.selectedOrgans = selectedValues.filter( |
| | | item => item !== "C34L" && item !== "C34R" |
| | | ); |
| | | } |
| | | // 妿鿩äº"å·¦èº"æ"å³èº"ï¼åæ¶"å
¨èº"éæ© |
| | | else if ( |
| | | selectedValues.includes("C34L") || |
| | | selectedValues.includes("C34R") |
| | | ) { |
| | | this.selectedOrgans = selectedValues.filter(item => item !== "C34"); |
| | | } |
| | | }, |
| | | |
| | | // å建å¨å®è®°å½ |
| | | createOrganRecord(organValue) { |
| | | let organName = this.getOrganLabel(organValue); |
| | | |
| | | // 妿æ¯"å
¶ä»"å¨å®ä¸æè¾å
¥å¼ |
| | | if (organValue === "C01" && this.otherOrganInput) { |
| | | organName = `å
¶ä»(${this.otherOrganInput})`; |
| | | } |
| | | |
| | | this.allocationData.serviceDonateorganList.push({ |
| | | id: null, |
| | | organname: organName, |
| | | organno: organValue, |
| | | caseno: "", |
| | | applicanttime: "", |
| | | name: "", |
| | | transplanthospitalno: "", |
| | | transplantHospitalName: "", |
| | | reallocationreason: "", |
| | | organState: 1 |
| | | }); |
| | | }, |
| | | |
| | | // å»é¢éæ©åå |
| | | handleHospitalChange(row, hospitalNo) { |
| | | const hospital = this.hospitalList.find( |
| | |
| | | // éåé
æä½ |
| | | handleRedistribution(row) { |
| | | this.currentRedistributeRecord = row; |
| | | this.redistributionForm.organName = row.organName; |
| | | this.redistributionForm.reason = row.reallocationReason || ""; |
| | | this.redistributionForm.organname = row.organname; |
| | | this.redistributionForm.reason = row.reallocationreason || ""; |
| | | this.redistributionDialogVisible = true; |
| | | }, |
| | | // 确认éåé
|
| | |
| | | } |
| | | |
| | | if (this.currentRedistributeRecord) { |
| | | this.currentRedistributeRecord.reallocationReason = this.redistributionForm.reason; |
| | | this.currentRedistributeRecord.reallocationreason = this.redistributionForm.reason; |
| | | this.$message.success("éåé
åå å·²æ´æ°"); |
| | | this.redistributionDialogVisible = false; |
| | | } |
| | |
| | | // å¨å®è¡æ ·å¼ |
| | | getOrganRowClassName({ row }) { |
| | | if ( |
| | | !row.systemNo || |
| | | !row.applicantTime || |
| | | !row.recipientName || |
| | | !row.transplantHospitalNo |
| | | !row.caseno || |
| | | !row.applicanttime || |
| | | !row.name || |
| | | !row.transplanthospitalno |
| | | ) { |
| | | return "warning-row"; |
| | | } |
| | | return ""; |
| | | }, |
| | | // ä¿ååºæ¬ä¿¡æ¯ |
| | | handleSave() { |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | this.saveLoading = true; |
| | | const apiMethod = this.form.id |
| | | ? updateOrganAllocation |
| | | : addOrganAllocation; |
| | | async handleSave() { |
| | | this.$refs.form.validate(async valid => { |
| | | if (!valid) { |
| | | this.$message.warning("请å®å表åä¿¡æ¯"); |
| | | return; |
| | | } |
| | | |
| | | apiMethod(this.form) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | if (!this.form.id) { |
| | | this.form.id = response.data.id; |
| | | this.$router.replace({ |
| | | query: { ...this.$route.query, id: this.form.id } |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("ä¿å失败:", error); |
| | | this.$message.error("ä¿å失败"); |
| | | }) |
| | | .finally(() => { |
| | | this.saveLoading = false; |
| | | }); |
| | | this.saveLoading = true; |
| | | try { |
| | | const saveData = { |
| | | ...this.form, |
| | | attachments: this.attachments, |
| | | serviceDonateorganList: |
| | | this.allocationData.serviceDonateorganList || [] |
| | | }; |
| | | console.log(this.form.recordstate); |
| | | this.form.recordstate = 1; |
| | | const apiMethod = this.form.id ? allocationedit : allocationadd; |
| | | const response = await apiMethod(saveData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | if (!this.form.id && response.data && response.data.id) { |
| | | this.form.id = response.data.id; |
| | | this.$router.replace({ |
| | | query: { ...this.$route.query, id: this.form.id } |
| | | }); |
| | | } |
| | | } else { |
| | | this.$message.error("ä¿å失败ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | | } catch (error) { |
| | | console.error("ä¿å失败:", error); |
| | | this.$message.error("ä¿å失败"); |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | | }); |
| | | }, |
| | | // ä¿ååé
è®°å½ |
| | | handleSaveAllocation() { |
| | | async handleSaveAllocation() { |
| | | if (!this.form.id) { |
| | | this.$message.warning("请å
ä¿ååºæ¬ä¿¡æ¯"); |
| | | return; |
| | | } |
| | | |
| | | this.saveLoading = true; |
| | | saveAllocationRecords(this.form.id, this.allocationData.records) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("åé
è®°å½ä¿åæå"); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("ä¿ååé
è®°å½å¤±è´¥:", error); |
| | | this.$message.error("ä¿ååé
è®°å½å¤±è´¥"); |
| | | }) |
| | | .finally(() => { |
| | | this.saveLoading = false; |
| | | }); |
| | | try { |
| | | const saveData = { |
| | | ...this.form, |
| | | attachments: this.attachments, |
| | | serviceDonateorganList: |
| | | this.allocationData.serviceDonateorganList || [] |
| | | }; |
| | | |
| | | const response = await allocationedit(saveData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("åé
è®°å½ä¿åæå"); |
| | | } else { |
| | | this.$message.error( |
| | | "ä¿ååé
è®°å½å¤±è´¥ï¼" + (response.msg || "æªç¥é误") |
| | | ); |
| | | } |
| | | } catch (error) { |
| | | console.error("ä¿ååé
è®°å½å¤±è´¥:", error); |
| | | this.$message.error("ä¿ååé
è®°å½å¤±è´¥"); |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | | }, |
| | | // ç¡®è®¤å®æåé
|
| | | handleConfirmAllocation() { |
| | | async handleConfirmAllocation() { |
| | | if (this.incompleteRecords > 0) { |
| | | this.$message.warning("请å
å®åææåé
è®°å½çä¿¡æ¯"); |
| | | return; |
| | |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | .then(async () => { |
| | | this.confirmLoading = true; |
| | | this.form.allocationStatus = "allocated"; |
| | | this.form.allocationStatus = "1"; |
| | | this.form.allocationTime = new Date() |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19); |
| | | |
| | | updateOrganAllocation(this.form) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("å¨å®åé
已宿"); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("确认åé
失败:", error); |
| | | this.$message.error("确认åé
失败"); |
| | | }) |
| | | .finally(() => { |
| | | this.confirmLoading = false; |
| | | }); |
| | | try { |
| | | const saveData = { |
| | | ...this.form, |
| | | attachments: this.attachments, |
| | | serviceDonateorganList: |
| | | this.allocationData.serviceDonateorganList || [] |
| | | }; |
| | | |
| | | const response = await allocationedit(saveData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("å¨å®åé
已宿"); |
| | | } else { |
| | | this.$message.error( |
| | | "确认åé
失败ï¼" + (response.msg || "æªç¥é误") |
| | | ); |
| | | this.form.allocationStatus = "0"; |
| | | this.form.allocationTime = ""; |
| | | } |
| | | } catch (error) { |
| | | console.error("确认åé
失败:", error); |
| | | this.$message.error("确认åé
失败"); |
| | | this.form.allocationStatus = "0"; |
| | | this.form.allocationTime = ""; |
| | | } finally { |
| | | this.confirmLoading = false; |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | // ä¸ä¼ éä»¶ |
| | | handleUploadAttachment() { |
| | | // éä»¶ä¸ä¼ é»è¾ |
| | | this.$message.info("éä»¶ä¸ä¼ åè½"); |
| | | |
| | | // éä»¶ç¸å
³æ¹æ³ |
| | | /** éä»¶ååå¤ç */ |
| | | handleAttachmentChange(fileList) { |
| | | this.attachmentFileList = fileList; |
| | | }, |
| | | // é¢è§éä»¶ |
| | | handlePreviewAttachment(attachment) { |
| | | // éä»¶é¢è§é»è¾ |
| | | this.$message.info("éä»¶é¢è§åè½"); |
| | | }, |
| | | // ä¸è½½éä»¶ |
| | | handleDownloadAttachment(attachment) { |
| | | // éä»¶ä¸è½½é»è¾ |
| | | this.$message.info("éä»¶ä¸è½½åè½"); |
| | | }, |
| | | // å é¤éä»¶ |
| | | handleRemoveAttachment(attachment) { |
| | | this.$confirm("ç¡®å®è¦å é¤è¿ä¸ªéä»¶åï¼", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | |
| | | /** éä»¶ç§»é¤å¤ç */ |
| | | handleAttachmentRemove(file) { |
| | | if (file.url) { |
| | | const index = this.attachments.findIndex( |
| | | item => item.path === file.url || item.fileUrl === file.url |
| | | ); |
| | | if (index > -1) { |
| | | this.attachments.splice(index, 1); |
| | | this.$message.success("éä»¶å 餿å"); |
| | | }) |
| | | .catch(() => {}); |
| | | } |
| | | } |
| | | }, |
| | | // è·åæä»¶å¾æ |
| | | getFileIcon(fileName) { |
| | | const ext = fileName |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | const iconMap = { |
| | | pdf: "el-icon-document", |
| | | doc: "el-icon-document", |
| | | docx: "el-icon-document", |
| | | xls: "el-icon-document", |
| | | xlsx: "el-icon-document", |
| | | jpg: "el-icon-picture", |
| | | jpeg: "el-icon-picture", |
| | | png: "el-icon-picture" |
| | | |
| | | /** ä¸ä¼ æåå¤ç */ |
| | | handleUploadSuccess({ file, fileList, response }) { |
| | | if (response.code === 200) { |
| | | const attachmentObj = { |
| | | fileName: file.name, |
| | | path: response.fileUrl || file.url, |
| | | fileUrl: response.fileUrl || file.url, |
| | | fileType: this.getFileExtension(file.name), |
| | | fileSize: file.size, |
| | | uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss") |
| | | }; |
| | | |
| | | if (!Array.isArray(this.attachments)) { |
| | | this.attachments = []; |
| | | } |
| | | |
| | | this.attachments.push(attachmentObj); |
| | | this.attachmentFileList = fileList; |
| | | this.$message.success("æä»¶ä¸ä¼ æå"); |
| | | } |
| | | }, |
| | | |
| | | /** ä¸ä¼ é误å¤ç */ |
| | | handleUploadError({ file, fileList, error }) { |
| | | console.error("éä»¶ä¸ä¼ 失败:", error); |
| | | this.$message.error("æä»¶ä¸ä¼ 失败ï¼è¯·éè¯"); |
| | | }, |
| | | |
| | | /** æå¨å é¤éä»¶ */ |
| | | handleRemoveAttachment(index) { |
| | | this.attachments.splice(index, 1); |
| | | this.attachmentFileList.splice(index, 1); |
| | | this.$message.success("éä»¶å 餿å"); |
| | | }, |
| | | |
| | | /** æä»¶é¢è§ */ |
| | | handlePreview(file) { |
| | | this.currentPreviewFile = { |
| | | fileName: file.fileName, |
| | | fileUrl: file.path || file.fileUrl, |
| | | fileType: this.getFileType(file.fileName) |
| | | }; |
| | | return iconMap[ext] || "el-icon-document"; |
| | | // this.filePreviewTitle = file.fileName; |
| | | this.filePreviewVisible = true; |
| | | }, |
| | | // è·åæä»¶ç±»å |
| | | handleDownloadAttachment(file) { |
| | | const fileUrl = file.path || file.fileUrl; |
| | | const fileName = file.fileName; |
| | | |
| | | if (fileUrl) { |
| | | const link = document.createElement("a"); |
| | | link.href = fileUrl; |
| | | link.download = fileName; |
| | | link.style.display = "none"; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | this.$message.success("å¼å§ä¸è½½æä»¶"); |
| | | } else { |
| | | this.$message.warning("æä»¶è·¯å¾ä¸åå¨ï¼æ æ³ä¸è½½"); |
| | | } |
| | | }, |
| | | |
| | | /** è·åæä»¶ç±»å */ |
| | | getFileType(fileName) { |
| | | const ext = fileName |
| | | if (!fileName) return "other"; |
| | | const extension = fileName |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | const typeMap = { |
| | | pdf: "PDF", |
| | | doc: "DOC", |
| | | docx: "DOCX", |
| | | xls: "XLS", |
| | | xlsx: "XLSX", |
| | | jpg: "JPG", |
| | | jpeg: "JPEG", |
| | | png: "PNG" |
| | | }; |
| | | return typeMap[ext] || ext.toUpperCase(); |
| | | const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"]; |
| | | const pdfTypes = ["pdf"]; |
| | | const officeTypes = ["doc", "docx", "xls", "xlsx", "ppt", "pptx"]; |
| | | if (imageTypes.includes(extension)) return "image"; |
| | | if (pdfTypes.includes(extension)) return "pdf"; |
| | | if (officeTypes.includes(extension)) return "office"; |
| | | return "other"; |
| | | }, |
| | | // æä»¶å¤§å°æ ¼å¼å |
| | | formatFileSize(size) { |
| | | if (size === 0) return "0 B"; |
| | | |
| | | /** è·åæä»¶å¾æ é¢è² */ |
| | | getFileIconColor(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | const colorMap = { |
| | | image: "#67C23A", |
| | | pdf: "#F56C6C", |
| | | office: "#409EFF", |
| | | other: "#909399" |
| | | }; |
| | | return colorMap[type] || "#909399"; |
| | | }, |
| | | |
| | | /** è·åæä»¶æ ç¾ç±»å */ |
| | | getFileTagType(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | const typeMap = { |
| | | image: "success", |
| | | pdf: "danger", |
| | | office: "primary", |
| | | other: "info" |
| | | }; |
| | | return typeMap[type] || "info"; |
| | | }, |
| | | |
| | | /** è·åæä»¶ç±»åææ¬ */ |
| | | getFileTypeText(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | const textMap = { |
| | | image: "å¾ç", |
| | | pdf: "PDF", |
| | | office: "ææ¡£", |
| | | other: "å
¶ä»" |
| | | }; |
| | | return textMap[type] || "æªç¥"; |
| | | }, |
| | | |
| | | /** æ£æ¥æ¯å¦å¯é¢è§ */ |
| | | isPreviewable(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | return ["image", "pdf"].includes(type); |
| | | }, |
| | | |
| | | /** è·åæä»¶æ©å±å */ |
| | | getFileExtension(filename) { |
| | | return filename |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | }, |
| | | |
| | | /** æ ¼å¼åæä»¶å¤§å° */ |
| | | formatFileSize(bytes) { |
| | | if (!bytes || bytes === 0) return "0 B"; |
| | | const k = 1024; |
| | | const sizes = ["B", "KB", "MB", "GB"]; |
| | | const i = Math.floor(Math.log(size) / Math.log(k)); |
| | | return parseFloat((size / Math.pow(k, i)).toFixed(2)) + " " + sizes[i]; |
| | | const i = Math.floor(Math.log(bytes) / Math.log(k)); |
| | | return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i]; |
| | | }, |
| | | // æ¶é´æ ¼å¼å |
| | | parseTime(time) { |
| | | if (!time) return ""; |
| | | const date = new Date(time); |
| | | return `${date.getFullYear()}-${(date.getMonth() + 1) |
| | | .toString() |
| | | .padStart(2, "0")}-${date |
| | | .getDate() |
| | | .toString() |
| | | .padStart(2, "0")} ${date |
| | | .getHours() |
| | | .toString() |
| | | .padStart(2, "0")}:${date |
| | | .getMinutes() |
| | | .toString() |
| | | .padStart(2, "0")}`; |
| | | |
| | | /** æ¥ææ¶é´æ ¼å¼å */ |
| | | formatDateTime(dateTime) { |
| | | if (!dateTime) return ""; |
| | | try { |
| | | const date = new Date(dateTime); |
| | | if (isNaN(date.getTime())) return dateTime; |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(date.getDate()).padStart(2, "0"); |
| | | const hours = String(date.getHours()).padStart(2, "0"); |
| | | const minutes = String(date.getMinutes()).padStart(2, "0"); |
| | | return `${year}-${month}-${day} ${hours}:${minutes}`; |
| | | } catch (error) { |
| | | return dateTime; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | |
| | | margin-bottom: 20px; |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | padding: 20px; |
| | | background: #fafafa; |
| | | } |
| | | |
| | | .attachment-header { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | margin-bottom: 16px; |
| | | padding-bottom: 8px; |
| | | border-bottom: 1px solid #ebeef5; |
| | | } |
| | | |
| | | .attachment-title { |
| | | font-weight: 600; |
| | | color: #303133; |
| | | } |
| | | |
| | | .attachment-tip { |
| | | font-size: 12px; |
| | | color: #909399; |
| | | margin-left: auto; |
| | | } |
| | | |
| | | .attachment-list { |
| | | margin-top: 16px; |
| | | } |
| | | |
| | | .list-title { |
| | | font-weight: bold; |
| | | margin-bottom: 12px; |
| | | color: #303133; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .file-name { |
| | | font-size: 13px; |
| | | margin-left: 8px; |
| | | } |
| | | |
| | | .detail-title { |
| | |
| | | } |
| | | |
| | | .stat-label { |
| | | /* font-size: 12px; */ |
| | | opacity: 0.9; |
| | | |
| | | /* color: #606266; */ |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | | .stat-value { |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | /* color: #303133; */ |
| | | } |
| | | |
| | | /* ç©ºç¶ææ ·å¼ */ |
| | |
| | | prop="donorno" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="å§å" |
| | | align="center" |
| | | prop="name" |
| | | width="100" |
| | | /> |
| | | <el-table-column label="å§å" align="center" prop="name" width="100" /> |
| | | <el-table-column |
| | | label="ä½é¢å·" |
| | | align="center" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { allocationList, } from "@/api/businessApi"; |
| | | import { allocationList } from "@/api/businessApi"; |
| | | import Pagination from "@/components/Pagination"; |
| | | |
| | | export default { |
| | |
| | | delete params.allocationTimeRange; |
| | | |
| | | // å¦æææ¶é´èå´åæ° |
| | | if (this.queryParams.allocationTimeRange && this.queryParams.allocationTimeRange.length === 2) { |
| | | params.allocationTimeStart = this.queryParams.allocationTimeRange[0] + ' 00:00:00'; |
| | | params.allocationTimeEnd = this.queryParams.allocationTimeRange[1] + ' 23:59:59'; |
| | | if ( |
| | | this.queryParams.allocationTimeRange && |
| | | this.queryParams.allocationTimeRange.length === 2 |
| | | ) { |
| | | params.allocationTimeStart = |
| | | this.queryParams.allocationTimeRange[0] + " 00:00:00"; |
| | | params.allocationTimeEnd = |
| | | this.queryParams.allocationTimeRange[1] + " 23:59:59"; |
| | | } |
| | | |
| | | allocationList(params) |
| | |
| | | handleView(row) { |
| | | this.$router.push({ |
| | | path: "/case/allocationInfo", |
| | | query: { id: row.infoid } |
| | | query: { id: row.id, infoid: row.infoid } |
| | | }); |
| | | }, |
| | | // æ°å¢æé®æä½ |
| | |
| | | }, |
| | | // ä¿®æ¹æé®æä½ |
| | | handleUpdate(row) { |
| | | const id = row.infoid || this.ids[0]; |
| | | this.$router.push({ |
| | | path: "/case/allocationInfo", |
| | | query: { id: id } |
| | | query: { id: row.id, infoid: row.infoid } |
| | | }); |
| | | }, |
| | | // å é¤æé®æä½ |
| | | handleDelete(row) { |
| | | const selectedRow = row || (this.selectedRows.length === 1 ? this.selectedRows[0] : null); |
| | | const selectedRow = |
| | | row || (this.selectedRows.length === 1 ? this.selectedRows[0] : null); |
| | | if (!selectedRow) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡è®°å½"); |
| | | return; |
| | |
| | | assessAdd |
| | | } from "@/api/businessApi/index"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | import OrganAssessmentForm from "./components/OrganAssessmentForm.vue"; |
| | | import OrganAssessmentForm from "@/components/assessInfoComponents/OrganAssessmentForm.vue"; |
| | | |
| | | export default { |
| | | name: "AssessmentDetail", |
| | |
| | | <!-- åºç¡ä¿¡æ¯ --> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">æ»äº¡å¤å®åºæ¬ä¿¡æ¯</span> |
| | | <el-button |
| | | v-if="isEdit" |
| | | type="success" |
| | | style="float: right" |
| | | @click="handleSave" |
| | | :loading="saveLoading" |
| | | > |
| | | ä¿åä¿¡æ¯ |
| | | </el-button> |
| | | <el-button |
| | | v-else |
| | | type="primary" |
| | | style="float: right" |
| | | @click="handleEdit" |
| | | > |
| | | ç¼è¾ä¿¡æ¯ |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="120px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ»äº¡åå " prop="deathReason"> |
| | | <el-form-item label="æç®è
ç¼å·" prop="donorno"> |
| | | <el-input |
| | | v-model="form.donorno" |
| | | :readonly="!isEdit" |
| | | placeholder="èªå¨çææç®è
ç¼å·" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æç®è
å§å" prop="name"> |
| | | <el-input v-model="form.name" :readonly="!isEdit" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ§å«" prop="sex"> |
| | | <el-select |
| | | v-model="form.deathReason" |
| | | v-model="form.sex" |
| | | :disabled="!isEdit" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="ç·" value="1" /> |
| | | <el-option label="女" value="2" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å¹´é¾" prop="age"> |
| | | <el-input v-model="form.age" :readonly="!isEdit" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç¾ç
è¯æ" prop="diagnosisname"> |
| | | <el-input v-model="form.diagnosisname" :readonly="!isEdit" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ»äº¡åå " prop="deathreason"> |
| | | <el-select |
| | | v-model="form.deathreason" |
| | | :disabled="!isEdit" |
| | | style="width: 100%" |
| | | > |
| | |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ»äº¡æ¶é´" prop="deathTime"> |
| | | <el-form-item label="æ»äº¡æ¶é´" prop="deathtime"> |
| | | <el-date-picker |
| | | v-model="form.deathTime" |
| | | v-model="form.deathtime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å¤å®å»çä¸" prop="judgmentDoctor"> |
| | | <el-input v-model="form.judgmentDoctorone" :readonly="!isEdit" /> |
| | | <el-form-item label="å¤å®å»çä¸" prop="deathjudgedocto"> |
| | | <el-input v-model="form.deathjudgedocto" :readonly="!isEdit" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å¤å®å»çäº" prop="judgmentDoctor"> |
| | | <el-input v-model="form.judgmentDoctortwo" :readonly="!isEdit" /> |
| | | <el-form-item label="å¤å®å»çäº" prop="deathjudgedoctt"> |
| | | <el-input v-model="form.deathjudgedoctt" :readonly="!isEdit" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç»è®°äºº" prop="registrant"> |
| | | <el-input v-model="form.registrant" :readonly="!isEdit" /> |
| | | <el-form-item label="å¨å®è·åæºæ" prop="gainhospitalname"> |
| | | <el-input v-model="form.gainhospitalname" :readonly="!isEdit" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯å¦é»åç¼
æ" prop="isspendremember"> |
| | | <el-select |
| | | v-model="form.isspendremember" |
| | | :disabled="!isEdit" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="æ¯" :value="1" /> |
| | | <el-option label="å¦" :value="0" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ¯å¦æ¢å¤éä½ä»ªå®¹" prop="isrestoreremains"> |
| | | <el-select |
| | | v-model="form.isrestoreremains" |
| | | :disabled="!isEdit" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="æ¯" :value="1" /> |
| | | <el-option label="å¦" :value="0" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è´è´£äºº" prop="responsibleusername"> |
| | | <el-input |
| | | v-model="form.responsibleusername" |
| | | :readonly="!isEdit" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è®°å½ç¶æ" prop="recordstate"> |
| | | <el-tag :type="getStatusTag(form.recordstate)"> |
| | | {{ getStatusText(form.recordstate) }} |
| | | </el-tag> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-card class="attachment-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">æ»äº¡å¤å®è¯ä¼°è¡¨éä»¶</span> |
| | | <el-button |
| | | <!-- <el-button |
| | | v-if="isEdit" |
| | | type="primary" |
| | | size="mini" |
| | |
| | | :loading="uploadLoading" |
| | | > |
| | | ä¸ä¼ éä»¶ |
| | | </el-button> |
| | | </el-button> --> |
| | | </div> |
| | | |
| | | <!-- éä»¶ç±»åéé¡¹å¡ --> |
| | |
| | | ref="uploadRef" |
| | | class="upload-demo" |
| | | drag |
| | | action="#" |
| | | :action="uploadAction" |
| | | :headers="headers" |
| | | multiple |
| | | :file-list="tempFileList" |
| | | :before-upload="beforeUpload" |
| | | :on-change="handleFileChange" |
| | | :on-remove="handleTempRemove" |
| | | :on-success="handleUploadSuccess" |
| | | :auto-upload="false" |
| | | > |
| | | <i class="el-icon-upload"></i> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getDeathJudgmentDetail, |
| | | updateDeathJudgment |
| | | } from "./api/mockDeathJudgmentApi"; |
| | | import { deathinfoedit, queryDathInfoBaseInfo } from "@/api/businessApi"; |
| | | import { getToken } from "@/utils/auth"; |
| | | |
| | | export default { |
| | | name: "DeathJudgmentDetail", |
| | | props: { |
| | | infoid: { |
| | | type: String, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // æ¯å¦ç¼è¾æ¨¡å¼ |
| | |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: undefined, |
| | | hospitalNo: "", |
| | | donorName: "", |
| | | gender: "", |
| | | infoid: undefined, |
| | | donorno: "", |
| | | name: "", |
| | | sex: "", |
| | | age: "", |
| | | diagnosis: "", |
| | | deathReason: "", |
| | | deathTime: "", |
| | | judgmentDoctor: "", |
| | | judgmentDescription: "", |
| | | registrant: "", |
| | | registrationTime: "" |
| | | diagnosisname: "", |
| | | deathreason: "", |
| | | deathtime: "", |
| | | deathjudgedocto: "", |
| | | deathjudgedoctt: "", |
| | | gainhospitalno: "", |
| | | gainhospitalname: "", |
| | | isspendremember: 0, |
| | | isrestoreremains: 0, |
| | | rememberannex: "", |
| | | responsibleuserid: "", |
| | | responsibleusername: "", |
| | | recordstate: "0", |
| | | judgmentDescription: "" |
| | | }, |
| | | // 表åéªè¯è§å |
| | | rules: { |
| | | donorName: [ |
| | | name: [ |
| | | { required: true, message: "æç®è
å§åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | deathReason: [ |
| | | deathreason: [ |
| | | { required: true, message: "æ»äº¡åå ä¸è½ä¸ºç©º", trigger: "change" } |
| | | ], |
| | | deathTime: [ |
| | | deathtime: [ |
| | | { required: true, message: "æ»äº¡æ¶é´ä¸è½ä¸ºç©º", trigger: "change" } |
| | | ], |
| | | judgmentDoctor: [ |
| | | { required: true, message: "å¤å®å»çä¸è½ä¸ºç©º", trigger: "blur" } |
| | | deathjudgedocto: [ |
| | | { required: true, message: "å¤å®å»çä¸ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ] |
| | | }, |
| | | // éä»¶ç¸å
³æ°æ® |
| | |
| | | uploadLoading: false, |
| | | tempFileList: [], |
| | | currentUploadType: "", |
| | | |
| | | uploadAction: process.env.VUE_APP_BASE_API + "/common/upload", |
| | | headers: { |
| | | Authorization: "Bearer " + getToken() |
| | | }, |
| | | // è¯ä¼°è¡¨ç±»åå®ä¹ |
| | | attachmentTypes: [ |
| | | { value: "1", label: "èæ»äº¡å¤å®è¡¨" }, |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | const id = this.$route.query.id; |
| | | this.isEdit = |
| | | this.$route.path.includes("/edit") || this.$route.path.includes("/add"); |
| | | if (id && !this.$route.path.includes("/add")) { |
| | | this.getDetail(id); |
| | | } else if (this.$route.path.includes("/add")) { |
| | | this.generateHospitalNo(); |
| | | } |
| | | this.getDetail(this.infoid); |
| | | this.getAttachmentList(); |
| | | }, |
| | | methods: { |
| | | // çæä½é¢å· |
| | | generateHospitalNo() { |
| | | // 模æçæä½é¢å·ï¼D + æ¶é´æ³å6ä½ |
| | | // çææç®è
ç¼å· |
| | | generateDonorNo() { |
| | | const timestamp = Date.now().toString(); |
| | | this.form.hospitalNo = "D" + timestamp.slice(-6); |
| | | this.form.donorno = "DONOR" + timestamp.slice(-8); |
| | | }, |
| | | // è·å详æ
|
| | | getDetail(id) { |
| | | getDeathJudgmentDetail(id).then(response => { |
| | | if (response.code === 200) { |
| | | this.form = response.data; |
| | | async getDetail(id) { |
| | | try { |
| | | const response = await queryDathInfoBaseInfo({ infoid: id }); |
| | | let realData = {}; |
| | | |
| | | if (response && response.data) { |
| | | realData = response.data[0]; |
| | | } else if (response) { |
| | | realData = response; |
| | | } |
| | | }); |
| | | |
| | | // æ å°å段å°è¡¨å |
| | | this.form = { |
| | | ...this.form, |
| | | ...realData, |
| | | // ç¡®ä¿æ°å¼ç±»ååæ®µæ£ç¡®è½¬æ¢ |
| | | isspendremember: realData.isspendremember |
| | | ? parseInt(realData.isspendremember) |
| | | : 0, |
| | | isrestoreremains: realData.isrestoreremains |
| | | ? parseInt(realData.isrestoreremains) |
| | | : 0 |
| | | }; |
| | | |
| | | // è§£æéä»¶ä¿¡æ¯ |
| | | if (realData.rememberannex) { |
| | | this.parseAttachmentData(realData.rememberannex); |
| | | } |
| | | } catch (error) { |
| | | console.error("è·åæ»äº¡å¤å®è¯¦æ
失败:", error); |
| | | this.$message.error("æ°æ®å 载失败"); |
| | | } |
| | | }, |
| | | // è§£æéä»¶æ°æ® |
| | | parseAttachmentData(attachmentJson) { |
| | | try { |
| | | if (attachmentJson) { |
| | | const attachments = JSON.parse(attachmentJson); |
| | | if (Array.isArray(attachments)) { |
| | | this.attachmentList = attachments; |
| | | } |
| | | } |
| | | } catch (error) { |
| | | console.error("è§£æéä»¶æ°æ®å¤±è´¥:", error); |
| | | } |
| | | }, |
| | | // æå»ºéä»¶JSONæ°æ® |
| | | buildAttachmentJson() { |
| | | return JSON.stringify(this.attachmentList); |
| | | }, |
| | | // è·åç¶ææ ç¾æ ·å¼ |
| | | getStatusTag(status) { |
| | | const statusMap = { |
| | | "0": "warning", // ç»´æ¤ä¸ |
| | | "1": "success", // 已宿 |
| | | "99": "danger" // å·²ç»æ¢ |
| | | }; |
| | | return statusMap[status] || "info"; |
| | | }, |
| | | // è·åç¶æææ¬ |
| | | getStatusText(status) { |
| | | const textMap = { |
| | | "0": "ç»´æ¤ä¸", |
| | | "1": "已宿", |
| | | "99": "å·²ç»æ¢" |
| | | }; |
| | | return textMap[status] || "æªç¥ç¶æ"; |
| | | }, |
| | | // è·åéä»¶å表 |
| | | getAttachmentList() { |
| | | this.attachmentLoading = true; |
| | | // 模æéä»¶æ°æ® - å®é
项ç®ä¸ä»æ¥å£è·å |
| | | // å®é
项ç®ä¸ä»æ¥å£è·åéä»¶æ°æ® |
| | | setTimeout(() => { |
| | | this.attachmentList = [ |
| | | { |
| | | id: 1, |
| | | type: "1", |
| | | typeName: "èæ»äº¡å¤å®è¡¨", |
| | | fileName: "èæ»äº¡å¤å®è¡¨_202512001.pdf", |
| | | fileSize: 2548321, |
| | | uploadTime: "2025-12-01 10:30:00", |
| | | uploader: "å¼ å»ç", |
| | | fileUrl: "/attachments/brain_death_1.pdf" |
| | | }, |
| | | { |
| | | id: 2, |
| | | type: "2", |
| | | typeName: "èçµå¾è¯ä¼°è¡¨", |
| | | fileName: "èçµå¾è¯ä¼°è¡¨_202512001.docx", |
| | | fileSize: 512345, |
| | | uploadTime: "2025-12-01 14:20:00", |
| | | uploader: "æå»ç", |
| | | fileUrl: "/attachments/eeg_1.docx" |
| | | } |
| | | ]; |
| | | this.attachmentLoading = false; |
| | | }, 500); |
| | | }, |
| | |
| | | |
| | | const maxSize = 10 * 1024 * 1024; // 10MB |
| | | |
| | | // æ ¡éªæä»¶ç±»å |
| | | const isTypeOk = |
| | | allowedTypes.includes(file.type) || |
| | | file.name.endsWith(".pdf") || |
| | |
| | | return false; |
| | | } |
| | | |
| | | // æ ¡éªæä»¶å¤§å° |
| | | if (file.size > maxSize) { |
| | | this.$message.error("æä»¶å¤§å°ä¸è½è¶
è¿10MB"); |
| | | return false; |
| | |
| | | handleTempRemove(file, fileList) { |
| | | this.tempFileList = fileList; |
| | | }, |
| | | // æäº¤ä¸ä¼ |
| | | async submitUpload() { |
| | | if (this.tempFileList.length === 0) { |
| | | this.$message.warning("请å
éæ©è¦ä¸ä¼ çæä»¶"); |
| | | return; |
| | | } |
| | | |
| | | this.uploadLoading = true; |
| | | |
| | | try { |
| | | // 模æä¸ä¼ è¿ç¨ - å®é
项ç®ä¸è°ç¨ä¸ä¼ æ¥å£ |
| | | /** ä¸ä¼ æåå¤ç */ |
| | | handleUploadSuccess(response, file, fileList) { |
| | | if (response.code === 200) { |
| | | file.url = response.data || response.url; |
| | | this.$message.success("æä»¶ä¸ä¼ æå"); |
| | | for (const file of this.tempFileList) { |
| | | const newAttachment = { |
| | | id: Date.now() + Math.random(), |
| | |
| | | fileSize: file.size, |
| | | uploadTime: new Date().toISOString(), |
| | | uploader: "å½åç¨æ·", |
| | | fileUrl: URL.createObjectURL(file.raw) |
| | | fileUrl: file.url |
| | | }; |
| | | |
| | | this.attachmentList.push(newAttachment); |
| | | } |
| | | |
| | | // æ´æ°éä»¶JSONæ°æ®å°è¡¨å |
| | | this.form.rememberannex = this.buildAttachmentJson(); |
| | | |
| | | this.$message.success("æä»¶ä¸ä¼ æå"); |
| | | this.uploadDialogVisible = false; |
| | | this.tempFileList = []; |
| | | } catch (error) { |
| | | this.$message.error("æä»¶ä¸ä¼ 失败"); |
| | | console.error("ä¸ä¼ 失败:", error); |
| | | } finally { |
| | | this.uploadLoading = false; |
| | | this.tempFileList = []; |
| | | } else { |
| | | this.$message.error(response.msg || "æä»¶ä¸ä¼ 失败"); |
| | | } |
| | | }, |
| | | // æäº¤ä¸ä¼ |
| | | async submitUpload() { |
| | | if (this.tempFileList.length === 0) { |
| | | this.$message.warning("请å
éæ©è¦ä¸ä¼ çæä»¶"); |
| | | return; |
| | | } |
| | | this.$refs.uploadRef.submit(); |
| | | this.uploadLoading = true; |
| | | |
| | | // try { |
| | | // for (const file of this.tempFileList) { |
| | | // const newAttachment = { |
| | | // id: Date.now() + Math.random(), |
| | | // type: this.currentUploadType, |
| | | // typeName: this.getCurrentTypeLabel, |
| | | // fileName: file.name, |
| | | // fileSize: file.size, |
| | | // uploadTime: new Date().toISOString(), |
| | | // uploader: "å½åç¨æ·", |
| | | // fileUrl: URL.createObjectURL(file.raw) |
| | | // }; |
| | | |
| | | // this.attachmentList.push(newAttachment); |
| | | // } |
| | | |
| | | // // æ´æ°éä»¶JSONæ°æ®å°è¡¨å |
| | | // this.form.rememberannex = this.buildAttachmentJson(); |
| | | |
| | | // this.$message.success("æä»¶ä¸ä¼ æå"); |
| | | // this.uploadDialogVisible = false; |
| | | // this.tempFileList = []; |
| | | // } catch (error) { |
| | | // this.$message.error("æä»¶ä¸ä¼ 失败"); |
| | | // console.error("ä¸ä¼ 失败:", error); |
| | | // } finally { |
| | | // this.uploadLoading = false; |
| | | // } |
| | | }, |
| | | // å é¤éä»¶ |
| | | handleRemoveAttachment(attachment) { |
| | |
| | | ); |
| | | if (index !== -1) { |
| | | this.attachmentList.splice(index, 1); |
| | | // æ´æ°éä»¶JSONæ°æ®å°è¡¨å |
| | | this.form.rememberannex = this.buildAttachmentJson(); |
| | | this.$message.success("è¯ä¼°è¡¨å 餿å"); |
| | | } |
| | | }) |
| | |
| | | }, |
| | | // ä¸è½½éä»¶ |
| | | handleDownload(attachment) { |
| | | // å®é
项ç®ä¸è°ç¨ä¸è½½æ¥å£ |
| | | const link = document.createElement("a"); |
| | | link.href = attachment.fileUrl; |
| | | link.download = attachment.fileName; |
| | | link.click(); |
| | | this.$message.success(`å¼å§ä¸è½½: ${attachment.fileName}`); |
| | | }, |
| | | // ç¼è¾ä¿¡æ¯ |
| | | handleEdit() { |
| | | this.isEdit = true; |
| | | }, |
| | | // ä¿åä¿¡æ¯ |
| | | handleSave() { |
| | | this.$refs.form.validate(valid => { |
| | | async handleSave() { |
| | | this.$refs.form.validate(async valid => { |
| | | if (valid) { |
| | | this.saveLoading = true; |
| | | |
| | | // 模æä¿åè¿ç¨ |
| | | updateDeathJudgment(this.form) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | if (this.$route.path.includes("/add")) { |
| | | this.$router.push("/case/deathJudgment"); |
| | | } else { |
| | | this.isEdit = false; |
| | | } |
| | | try { |
| | | // æå»ºæäº¤æ°æ® |
| | | const submitData = { |
| | | ...this.form, |
| | | // ç¡®ä¿éä»¶æ°æ®ææ° |
| | | rememberannex: this.buildAttachmentJson() |
| | | }; |
| | | |
| | | const response = await deathinfoedit(submitData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | this.isEdit = false; |
| | | |
| | | if (this.$route.path.includes("/add")) { |
| | | this.$router.push("/case/deathJudgment"); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("ä¿å失败:", error); |
| | | this.$message.error("ä¿å失败"); |
| | | }) |
| | | .finally(() => { |
| | | this.saveLoading = false; |
| | | }); |
| | | } else { |
| | | this.$message.error(response.message || "ä¿å失败"); |
| | | } |
| | | } catch (error) { |
| | | console.error("ä¿å失败:", error); |
| | | this.$message.error("ä¿å失败"); |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">æç®ç¡®è®¤åºæ¬ä¿¡æ¯</span> |
| | | <el-button |
| | | v-if="$route.query.confirm" |
| | | type="primary" |
| | | style="float: right; padding: 3px 0" |
| | | type="success" |
| | | style="float: right;" |
| | | @click="handleSave" |
| | | :loading="saveLoading" |
| | | > |
| | | ä¿åç¡®è®¤ä¿¡æ¯ |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-form :model="form" ref="form" label-width="120px"> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åè°å1" prop="coordinator1"> |
| | | <el-input v-model="form.coordinator1" :readonly="!isEdit" /> |
| | | <el-form-item label="ä½é¢å·" prop="caseNo"> |
| | | <el-input v-model="form.caseNo" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åè°å2" prop="coordinator2"> |
| | | <el-input v-model="form.coordinator2" :readonly="!isEdit" /> |
| | | <el-form-item label="æç®è
å§å" prop="name"> |
| | | <el-input v-model="form.name" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¸å¡äººå" prop="assignee"> |
| | | <el-input v-model="form.assignee" :readonly="!isEdit" /> |
| | | <el-form-item label="æ§å«" prop="sex"> |
| | | <el-select v-model="form.sex" style="width: 100%"> |
| | | <el-option label="ç·" value="1" /> |
| | | <el-option label="女" value="2" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç¡®è®¤ç¶æ" prop="confirmationStatus"> |
| | | <el-form-item label="å¹´é¾" prop="age"> |
| | | <el-input v-model="form.age" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç¾ç
è¯æ" prop="diagnosisname"> |
| | | <el-input v-model="form.diagnosisname" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æå¨å»çæºæ" prop="treatmenthospitalname"> |
| | | <el-input v-model="form.treatmenthospitalname" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åè°å1" prop="coordinatedusernameo"> |
| | | <el-input v-model="form.coordinatedusernameo" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åè°å2" prop="coordinatedusernamet"> |
| | | <el-input v-model="form.coordinatedusernamet" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä¸å¡äººå" prop="responsibleusername"> |
| | | <el-input v-model="form.responsibleusername" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <!-- <el-col :span="8"> |
| | | <el-form-item label="ç¡®è®¤ç¶æ" prop="relativeconfirmationsign"> |
| | | <el-select |
| | | v-model="form.confirmationStatus" |
| | | :disabled="!isEdit" |
| | | v-model="form.relativeconfirmationsign" |
| | | style="width: 100%" |
| | | |
| | | > |
| | | <el-option label="æªç¡®è®¤" value="0" /> |
| | | <el-option label="å®¶å±ç¡®è®¤" value="1" /> |
| | | <el-option label="ä¸åææç®" value="2" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="8"> |
| | | <el-form-item label="确认æ¶é´" prop="confirmationTime"> |
| | | <el-form-item label="ç¾åæ¶é´" prop="signdate"> |
| | | <el-date-picker |
| | | v-model="form.confirmationTime" |
| | | v-model="form.signdate" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 100%" |
| | | :disabled="!isEdit" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="8"> |
| | | <el-form-item label="è¡å" prop="bloodtype"> |
| | | <el-input v-model="form.bloodtype" /> |
| | | </el-form-item> |
| | | </el-col> --> |
| | | </el-row> |
| | | |
| | | <!-- <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¯ä»¶å·ç " prop="idcardno"> |
| | | <el-input v-model="form.idcardno" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> --> |
| | | |
| | | <!-- 亲å±ä¿¡æ¯ --> |
| | | <!-- 亲å±ä¿¡æ¯ --> |
| | | <el-divider content-position="left">亲å±ç¡®è®¤ä¿¡æ¯</el-divider> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="亲å±å§å" prop="relativeconfirmationsignname"> |
| | | <el-input |
| | | v-model="form.relativeconfirmationsignname" |
| | | placeholder="请è¾å
¥äº²å±å§å" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="ä¸æèµ è
å
³ç³»" prop="signfamilyrelations"> |
| | | <el-select |
| | | v-model="form.signfamilyrelations" |
| | | placeholder="è¯·éæ©ä¸æèµ è
å
³ç³»" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.sys_FamilyRelation || []" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="亲å±èº«ä»½è¯" prop="relativeidcardno"> |
| | | <el-input |
| | | v-model="form.relativeidcardno" |
| | | placeholder="请è¾å
¥äº²å±è¯ä»¶å·ç " |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="亲å±çµè¯" prop="relativephone"> |
| | | <el-input |
| | | v-model="form.relativephone" |
| | | placeholder="请è¾å
¥äº²å±èç³»çµè¯" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="家屿è§å¤æ³¨" prop="familyRemark"> |
| | | <el-row> |
| | | <el-form-item label-width="100px" label="æç®å³å®"> |
| | | <el-checkbox-group v-model="organdecision"> |
| | | <el-checkbox |
| | | v-for="item in organselection" |
| | | :key="item" |
| | | :label="item" |
| | | >{{ item }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | <el-input |
| | | v-if="organdecision.includes('å
¶ä»')" |
| | | v-model="organdecisionOther" |
| | | placeholder="请è¾å
¥å
¶ä»æç®å³å®çå
·ä½å
容" |
| | | style="margin-top: 10px; width: 300px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-row> |
| | | |
| | | <el-form-item label="家屿è§å¤æ³¨" prop="relativeRemark"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.familyRemark" |
| | | :readonly="!isEdit" |
| | | v-model="form.relativeRemark" |
| | | placeholder="è®°å½å®¶å±çæè§åæ²éæ
åµ" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <!-- éä»¶å表 --> |
| | | <!-- éä»¶ä¿¡æ¯ - æç±»ååç±» --> |
| | | <el-card class="attachment-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">ç¸å
³éä»¶ä¸ä¼ </span> |
| | | <el-button |
| | | v-if="isEdit" |
| | | type="primary" |
| | | size="mini" |
| | | @click="handleSaveAll" |
| | | :loading="saveLoading" |
| | | > |
| | | ä¿åææéä»¶ |
| | | </el-button> |
| | | </div> |
| | | |
| | | <!-- éä»¶ç±»åéé¡¹å¡ --> |
| | |
| | | :label="type.label" |
| | | :name="type.value" |
| | | > |
| | | <div class="attachment-upload-section"> |
| | | <div class="upload-header"> |
| | | <div class="attachment-section"> |
| | | <div class="attachment-header"> |
| | | <span class="upload-title">{{ type.label }}</span> |
| | | <el-tooltip content="ç¹å»ä¸ä¼ 该类åéä»¶" placement="top"> |
| | | <el-button |
| | |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | @click="openUploadDialog(type.value)" |
| | | :disabled="!isEdit" |
| | | > |
| | | æ·»å éä»¶ |
| | | </el-button> |
| | | </el-tooltip> |
| | | </div> |
| | | |
| | | <!-- éä»¶å表 --> |
| | | <el-table |
| | | :data="getAttachmentsByType(type.value)" |
| | | v-loading="attachmentLoading" |
| | | style="width: 100%; margin-top: 15px;" |
| | | > |
| | | <el-table-column label="æä»¶åç§°" min-width="200"> |
| | | <template slot-scope="scope"> |
| | | <div class="file-info"> |
| | | <!-- å½åç±»åçéä»¶å表 --> |
| | | <div class="attachment-list"> |
| | | <el-table |
| | | :data="getAttachmentsByType(type.value)" |
| | | size="small" |
| | | v-loading="attachmentLoading" |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column label="æä»¶å" min-width="200"> |
| | | <template slot-scope="scope"> |
| | | <i |
| | | class="el-icon-document" |
| | | style="margin-right: 8px; color: #409EFF;" |
| | | style="color: #409EFF; margin-right: 8px;" |
| | | ></i> |
| | | <span>{{ scope.row.fileName }}</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <span class="file-name">{{ scope.row.fileName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æä»¶å¤§å°" width="100" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatFileSize(scope.row.fileSize) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä»¶ç±»å" width="100" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-tag size="small">{{ |
| | | getFileType(scope.row.fileName) |
| | | }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="ä¸ä¼ æ¶é´" width="160" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.uploadTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä»¶å¤§å°" width="100" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatFileSize(scope.row.fileSize) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="ä¸ä¼ 人" width="100" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.uploader }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ä¸ä¼ æ¶é´" width="160" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatDateTime(scope.row.uploadTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="æä½" |
| | | width="120" |
| | | align="center" |
| | | v-if="isEdit" |
| | | <el-table-column label="æä½" width="150" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | @click="handlePreview(scope.row)" |
| | | > |
| | | é¢è§ |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="danger" |
| | | @click="handleRemoveAttachment(type.value, scope.$index)" |
| | | > |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!-- ç©ºç¶ææç¤º --> |
| | | <div |
| | | v-if="getAttachmentsByType(type.value).length === 0" |
| | | class="empty-attachment" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handlePreview(scope.row)" |
| | | >é¢è§</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | style="color: #F56C6C;" |
| | | @click="handleRemoveAttachment(scope.row, type.value)" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æä½" width="80" align="center" v-else> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handlePreview(scope.row)" |
| | | >é¢è§</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div |
| | | v-if="getAttachmentsByType(type.value).length === 0" |
| | | class="empty-attachment" |
| | | > |
| | | <el-empty description="ææ éä»¶" :image-size="80"></el-empty> |
| | | <el-empty |
| | | :description="`ææ ${type.label}éä»¶`" |
| | | :image-size="80" |
| | | ></el-empty> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-card> |
| | | |
| | | <!-- ä¸ä¼ å¯¹è¯æ¡ --> |
| | | <el-dialog |
| | | :title="`ä¸ä¼ ${getCurrentTypeLabel}éä»¶`" |
| | | :visible.sync="uploadDialogVisible" |
| | |
| | | </el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- æä»¶é¢è§å¼¹çª --> |
| | | <FilePreviewDialog |
| | | :visible="previewVisible" |
| | | :file="currentPreviewFile" |
| | | @close="previewVisible = false" |
| | | @download="handleDownload" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getConfirmationDetail, |
| | | updateConfirmation |
| | | } from "./api/mockConfirmationApi"; |
| | | import { relativesList, relativesEdit } from "@/api/businessApi"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | |
| | | export default { |
| | | name: "ConfirmationDetail", |
| | | components: { |
| | | FilePreviewDialog |
| | | }, |
| | | props: { |
| | | infoid: { |
| | | type: String, |
| | | default: true |
| | | } |
| | | }, |
| | | dicts: ["sys_FamilyRelation"], |
| | | data() { |
| | | return { |
| | | // æ¯å¦ç¼è¾æ¨¡å¼ |
| | |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: undefined, |
| | | infoid: undefined, |
| | | caseNo: "", |
| | | donorName: "", |
| | | gender: "", |
| | | name: "", |
| | | sex: "", |
| | | age: "", |
| | | diagnosis: "", |
| | | hospitalName: "", |
| | | coordinator1: "", |
| | | coordinator2: "", |
| | | assignee: "", |
| | | confirmationStatus: "0", |
| | | confirmationTime: "", |
| | | familyRemark: "" |
| | | diagnosisname: "", |
| | | treatmenthospitalname: "", |
| | | coordinatedusernameo: "", |
| | | coordinatedusernamet: "", |
| | | responsibleusername: "", |
| | | relativeconfirmationsign: "0", |
| | | signdate: "", |
| | | relativeconfirmationsignname: "", |
| | | signfamilyrelations: "", |
| | | relativeidcardno: "", |
| | | relativephone: "", |
| | | relativeRemark: "", |
| | | assessannex: "" // JSONå符串å卿æéä»¶ |
| | | }, |
| | | // éä»¶å表 |
| | | organdecision: [], |
| | | organdecisionOther: "", |
| | | organselection: [ |
| | | "èè", |
| | | "åè¾", |
| | | "å·¦è¾", |
| | | "å³è¾", |
| | | "å¿è", |
| | | "èºè", |
| | | "è°è
º", |
| | | "å°è ", |
| | | "åç¼ç»ç»", |
| | | "éä½", |
| | | "å
¶ä»" |
| | | ], |
| | | // å è½½ç¶æ |
| | | loading: false, |
| | | saveLoading: false, |
| | | // éä»¶ç¸å
³æ°æ® |
| | | activeAttachmentType: "1", |
| | | attachmentLoading: false, |
| | | uploadDialogVisible: false, |
| | | uploadLoading: false, |
| | | saveLoading: false, |
| | | tempFileList: [], |
| | | currentUploadType: "", |
| | | // é¢è§ç¸å
³ |
| | | previewVisible: false, |
| | | currentPreviewFile: null, |
| | | |
| | | // éä»¶ç±»åå®ä¹ |
| | | attachmentTypes: [ |
| | |
| | | { value: "6", label: "å¿æ»äº¡å¤å®ç¥æ
åæä¹¦" } |
| | | ], |
| | | |
| | | // éä»¶åè¡¨æ°æ® |
| | | attachmentList: [ |
| | | // æ¨¡ææ°æ® - å®é
项ç®ä¸ä»æ¥å£è·å |
| | | { |
| | | id: 1, |
| | | type: "1", |
| | | typeName: "人ä½å¨å®æ½å¨æç®è
ç»è®°è¡¨", |
| | | fileName: "æ½å¨æç®è
ç»è®°è¡¨_202512001.pdf", |
| | | fileSize: 2548321, |
| | | uploadTime: "2025-12-01 10:30:00", |
| | | uploader: "å¼ ä¸", |
| | | fileUrl: "/attachments/1.pdf" |
| | | }, |
| | | { |
| | | id: 2, |
| | | type: "1", |
| | | typeName: "人ä½å¨å®æ½å¨æç®è
ç»è®°è¡¨", |
| | | fileName: "è¡¥å
说æ.docx", |
| | | fileSize: 512345, |
| | | uploadTime: "2025-12-01 14:20:00", |
| | | uploader: "æå", |
| | | fileUrl: "/attachments/2.docx" |
| | | } |
| | | ] |
| | | // éä»¶æ°æ®ç»æ - æç±»ååå¼åå¨ |
| | | attachmentData: { |
| | | "1": [], // ç±»å1çéä»¶å表 |
| | | "2": [], |
| | | "3": [], |
| | | "4": [], |
| | | "5": [], |
| | | "6": [] |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | isEdit() { |
| | | return this.$route.query.confirm === "true"; |
| | | }, |
| | | getCurrentTypeLabel() { |
| | | const type = this.attachmentTypes.find( |
| | | t => t.value === this.currentUploadType |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | const id = this.$route.query.id; |
| | | this.isEdit = this.$route.query.confirm === "true"; |
| | | if (id) { |
| | | this.getDetail(id); |
| | | console.log(this.infoid, "this.infoid"); |
| | | |
| | | if (this.infoid) { |
| | | console.log(1); |
| | | |
| | | this.getDetail(this.infoid); |
| | | } |
| | | this.getAttachmentList(); |
| | | }, |
| | | methods: { |
| | | // è·å详æ
|
| | | getDetail(id) { |
| | | getConfirmationDetail(id).then(response => { |
| | | async getDetail(infoid) { |
| | | this.loading = true; |
| | | try { |
| | | const response = await relativesList({ infoid }); |
| | | console.log(2); |
| | | |
| | | if (response.code === 200) { |
| | | this.form = response.data; |
| | | console.log(3); |
| | | this.handleDetailData(response); |
| | | } else { |
| | | this.$message.error("è·å详æ
失败ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | | }); |
| | | } catch (error) { |
| | | console.error("è·åæç®ç¡®è®¤è¯¦æ
失败:", error); |
| | | this.$message.error("è·å详æ
失败"); |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | | }, |
| | | // è·åéä»¶å表 |
| | | getAttachmentList() { |
| | | this.attachmentLoading = true; |
| | | // 模æéä»¶æ°æ® |
| | | this.attachmentList = [ |
| | | { |
| | | id: 1, |
| | | type: "1", |
| | | typeName: "人ä½å¨å®æ½å¨æç®è
ç»è®°è¡¨", |
| | | fileName: "æ½å¨æç®è
ç»è®°è¡¨_202512001.pdf", |
| | | uploadTime: "2025-12-01 10:30:00", |
| | | uploader: "å¼ ä¸", |
| | | fileSize: "2.5MB", |
| | | fileUrl: "/attachments/1.pdf" |
| | | }, |
| | | { |
| | | id: 2, |
| | | type: "2", |
| | | typeName: "人ä½å¨å®æç®äº²å±ç¡®è®¤ç»è®°è¡¨", |
| | | fileName: "亲å±ç¡®è®¤ç»è®°è¡¨_202512001.pdf", |
| | | uploadTime: "2025-12-01 14:20:00", |
| | | uploader: "æå", |
| | | fileSize: "1.8MB", |
| | | fileUrl: "/attachments/2.pdf" |
| | | }, |
| | | { |
| | | id: 3, |
| | | type: "3", |
| | | typeName: "æç®è
åç´ç³»äº²å±èº«ä»½è¯ãæ·å£ç°¿ç¸å
³è¯æ", |
| | | fileName: "èº«ä»½è¯æ_202512001.zip", |
| | | uploadTime: "2025-12-01 16:45:00", |
| | | uploader: "çäº", |
| | | fileSize: "5.2MB", |
| | | fileUrl: "/attachments/3.zip" |
| | | }, |
| | | { |
| | | id: 4, |
| | | type: "4", |
| | | typeName: "å
¬æ°èº«æ
å人ä½å¨å®ï¼è§èï¼é使ç®åç¥ä¹¦", |
| | | fileName: "æç®åç¥ä¹¦_202512001.pdf", |
| | | uploadTime: "2025-12-02 09:15:00", |
| | | uploader: "å¼ ä¸", |
| | | fileSize: "1.2MB", |
| | | fileUrl: "/attachments/4.pdf" |
| | | }, |
| | | { |
| | | id: 5, |
| | | type: "5", |
| | | typeName: "èæ»äº¡å¤å®ç¥æ
åæä¹¦", |
| | | fileName: "èæ»äº¡å¤å®åæä¹¦_202512001.pdf", |
| | | uploadTime: "2025-12-02 11:30:00", |
| | | uploader: "æå", |
| | | fileSize: "0.8MB", |
| | | fileUrl: "/attachments/5.pdf" |
| | | }, |
| | | { |
| | | id: 6, |
| | | type: "6", |
| | | typeName: "å¿æ»äº¡å¤å®ç¥æ
åæä¹¦", |
| | | fileName: "å¿æ»äº¡å¤å®åæä¹¦_202512001.pdf", |
| | | uploadTime: "2025-12-02 13:20:00", |
| | | uploader: "çäº", |
| | | fileSize: "0.9MB", |
| | | fileUrl: "/attachments/6.pdf" |
| | | |
| | | // å¤ç详æ
æ°æ® |
| | | handleDetailData(response) { |
| | | let detailData = null; |
| | | |
| | | // æ ¹æ®æ¥å£å®é
è¿åçæ°æ®ç»æè¿è¡è°æ´ |
| | | if (response.data) { |
| | | if (Array.isArray(response.data)) { |
| | | detailData = response.data[0] || {}; |
| | | } else if (response.data.rows && Array.isArray(response.data.rows)) { |
| | | detailData = response.data.rows[0] || {}; |
| | | } else if (Array.isArray(response.data.list)) { |
| | | detailData = response.data.list[0] || {}; |
| | | } else { |
| | | detailData = response.data; |
| | | } |
| | | ]; |
| | | this.attachmentLoading = false; |
| | | } else { |
| | | detailData = response; |
| | | } |
| | | |
| | | // æ å°å段å°è¡¨å |
| | | this.form = { |
| | | ...this.form, |
| | | id: detailData.id || this.$route.query.id, |
| | | infoid: detailData.infoid || this.infoid, |
| | | caseNo: detailData.caseNo || "", |
| | | name: detailData.name || "", |
| | | sex: detailData.sex || "", |
| | | age: detailData.age || "", |
| | | diagnosisname: detailData.diagnosisname || "", |
| | | treatmenthospitalname: detailData.treatmenthospitalname || "", |
| | | coordinatedusernameo: detailData.coordinatedusernameo || "", |
| | | coordinatedusernamet: detailData.coordinatedusernamet || "", |
| | | responsibleusername: detailData.responsibleusername || "", |
| | | relativeconfirmationsign: detailData.relativeconfirmationsign || "0", |
| | | signdate: detailData.signdate, |
| | | relativeconfirmationsignname: |
| | | detailData.relativeconfirmationsignname || "", |
| | | signfamilyrelations: detailData.signfamilyrelations || "", |
| | | relativeidcardno: detailData.relativeidcardno || "", |
| | | relativephone: detailData.relativephone || "", |
| | | relativeRemark: detailData.relativeRemark || "", |
| | | assessannex: detailData.assessannex || "" |
| | | }; |
| | | |
| | | // å¤çæç®å³å®æ°æ® |
| | | if (detailData.organdecision) { |
| | | this.organdecision = Array.isArray(detailData.organdecision) |
| | | ? detailData.organdecision |
| | | : detailData.organdecision.split(","); |
| | | } |
| | | console.log(this.organdecision, "this.organdecision"); |
| | | |
| | | // å¤çéä»¶æ°æ® - ä»assessannexåæ®µè§£æJSONå¹¶æç±»ååç±» |
| | | this.processAssessannexData(); |
| | | }, |
| | | // ä¸è½½éä»¶ |
| | | handleDownload(row) { |
| | | // å®é
项ç®ä¸è¿éè°ç¨æä»¶ä¸è½½æ¥å£ |
| | | this.$message.success(`ä¸è½½æä»¶: ${row.fileName}`); |
| | | console.log("ä¸è½½æä»¶:", row.fileUrl); |
| | | }, |
| | | // ä¿åç¡®è®¤ä¿¡æ¯ |
| | | handleSave() { |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | updateConfirmation(this.form).then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | this.isEdit = false; |
| | | this.$router.push("/case/confirmation"); |
| | | } |
| | | |
| | | // å¤çassessannexåæ®µæ°æ®å¹¶æç±»ååç±» |
| | | processAssessannexData() { |
| | | if (this.form.assessannex) { |
| | | try { |
| | | const annexData = |
| | | typeof this.form.assessannex === "string" |
| | | ? JSON.parse(this.form.assessannex) |
| | | : this.form.assessannex; |
| | | |
| | | // æ¸
ç©ºç°ææ°æ® |
| | | Object.keys(this.attachmentData).forEach(key => { |
| | | this.attachmentData[key] = []; |
| | | }); |
| | | |
| | | // æç±»ååç±»åå¨ |
| | | if (Array.isArray(annexData)) { |
| | | annexData.forEach(attachment => { |
| | | const type = attachment.type || "1"; // é»è®¤å°ç¬¬ä¸ç§ç±»å |
| | | if (this.attachmentData[type]) { |
| | | this.attachmentData[type].push(attachment); |
| | | } |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | console.warn("assessannexæ°æ®è§£æå¤±è´¥:", error); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | // æ ¹æ®ç±»åè·åéä»¶ |
| | | |
| | | // æ ¹æ®ç±»åè·åéä»¶å表 |
| | | getAttachmentsByType(type) { |
| | | return this.attachmentList.filter(item => item.type === type); |
| | | return this.attachmentData[type] || []; |
| | | }, |
| | | |
| | | // æå¼ä¸ä¼ å¯¹è¯æ¡ |
| | |
| | | }); |
| | | }, |
| | | |
| | | // ä¸ä¼ åæ ¡éª |
| | | // ä¸ä¼ åæ ¡éª[7](@ref) |
| | | beforeUpload(file) { |
| | | const allowedTypes = [ |
| | | 'application/pdf', |
| | | 'image/jpeg', |
| | | 'image/png', |
| | | 'application/msword', |
| | | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' |
| | | "application/pdf", |
| | | "image/jpeg", |
| | | "image/png", |
| | | "application/msword", |
| | | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" |
| | | ]; |
| | | |
| | | const maxSize = 10 * 1024 * 1024; // 10MB |
| | | |
| | | // æ ¡éªæä»¶ç±»å |
| | | const isTypeOk = allowedTypes.includes(file.type) || |
| | | file.name.endsWith('.pdf') || |
| | | file.name.endsWith('.jpg') || |
| | | file.name.endsWith('.jpeg') || |
| | | file.name.endsWith('.png') || |
| | | file.name.endsWith('.doc') || |
| | | file.name.endsWith('.docx'); |
| | | const isTypeOk = |
| | | allowedTypes.includes(file.type) || |
| | | file.name.endsWith(".pdf") || |
| | | file.name.endsWith(".jpg") || |
| | | file.name.endsWith(".jpeg") || |
| | | file.name.endsWith(".png") || |
| | | file.name.endsWith(".doc") || |
| | | file.name.endsWith(".docx"); |
| | | |
| | | if (!isTypeOk) { |
| | | this.$message.error('æä»¶æ ¼å¼ä¸æ¯æï¼è¯·ä¸ä¼ pdfãjpgãpngãdocædocxæ ¼å¼æä»¶'); |
| | | this.$message.error( |
| | | "æä»¶æ ¼å¼ä¸æ¯æï¼è¯·ä¸ä¼ pdfãjpgãpngãdocædocxæ ¼å¼æä»¶" |
| | | ); |
| | | return false; |
| | | } |
| | | |
| | | // æ ¡éªæä»¶å¤§å° |
| | | if (file.size > maxSize) { |
| | | this.$message.error('æä»¶å¤§å°ä¸è½è¶
è¿10MB'); |
| | | this.$message.error("æä»¶å¤§å°ä¸è½è¶
è¿10MB"); |
| | | return false; |
| | | } |
| | | |
| | |
| | | |
| | | // èªå®ä¹ä¸ä¼ è¯·æ± |
| | | handleHttpRequest(options) { |
| | | // 模æä¸ä¼ è¿ç¨ |
| | | return new Promise((resolve, reject) => { |
| | | this.uploadLoading = true; |
| | | |
| | | // 模æä¸ä¼ å»¶è¿ |
| | | // 模æä¸ä¼ è¿ç¨ |
| | | setTimeout(() => { |
| | | const newAttachment = { |
| | | id: Date.now(), |
| | | type: this.currentUploadType, |
| | | typeName: this.getCurrentTypeLabel, |
| | | fileName: options.file.name, |
| | | fileUrl: URL.createObjectURL(options.file), |
| | | fileSize: options.file.size, |
| | | fileType: this.getFileExtension(options.file.name), |
| | | type: this.currentUploadType, // è®°å½éä»¶ç±»å |
| | | uploadTime: new Date().toISOString(), |
| | | uploader: 'å½åç¨æ·', // å®é
项ç®ä¸ä»ç¨æ·ä¿¡æ¯è·å |
| | | fileUrl: URL.createObjectURL(options.file) // 临æ¶URLï¼å®é
项ç®ä¸ä¸ºæå¡å¨è¿åçURL |
| | | uploader: "å½åç¨æ·" |
| | | }; |
| | | |
| | | this.attachmentList.push(newAttachment); |
| | | // æ·»å å°å¯¹åºç±»åçéä»¶å表 |
| | | if (this.attachmentData[this.currentUploadType]) { |
| | | this.attachmentData[this.currentUploadType].push(newAttachment); |
| | | } |
| | | |
| | | this.uploadLoading = false; |
| | | this.updateAssessannexField(); // æ´æ°åå¨å段 |
| | | resolve({ code: 200, data: newAttachment }); |
| | | }, 1500); |
| | | }); |
| | |
| | | // æäº¤ä¸ä¼ |
| | | async submitUpload() { |
| | | if (this.tempFileList.length === 0) { |
| | | this.$message.warning('请å
éæ©è¦ä¸ä¼ çæä»¶'); |
| | | this.$message.warning("请å
éæ©è¦ä¸ä¼ çæä»¶"); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | // 便¬¡ä¸ä¼ æææä»¶ |
| | | for (const file of this.tempFileList) { |
| | | await this.$refs.uploadRef.submit(); |
| | | } |
| | | |
| | | this.$message.success('æä»¶ä¸ä¼ æå'); |
| | | this.$message.success("æä»¶ä¸ä¼ æå"); |
| | | this.uploadDialogVisible = false; |
| | | this.tempFileList = []; |
| | | } catch (error) { |
| | | this.$message.error('æä»¶ä¸ä¼ 失败'); |
| | | console.error('ä¸ä¼ 失败:', error); |
| | | this.$message.error("æä»¶ä¸ä¼ 失败"); |
| | | console.error("ä¸ä¼ 失败:", error); |
| | | } |
| | | }, |
| | | |
| | | // å é¤éä»¶ |
| | | handleRemoveAttachment(attachment, type) { |
| | | this.$confirm('ç¡®å®è¦å é¤è¿ä¸ªéä»¶åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const index = this.attachmentList.findIndex(item => item.id === attachment.id); |
| | | if (index !== -1) { |
| | | this.attachmentList.splice(index, 1); |
| | | this.$message.success('éä»¶å 餿å'); |
| | | |
| | | // å®é
项ç®ä¸è°ç¨å 餿¥å£ |
| | | // this.deleteAttachment(attachment.id); |
| | | } |
| | | }).catch(() => {}); |
| | | handleRemoveAttachment(type, index) { |
| | | this.$confirm("ç¡®å®è¦å é¤è¿ä¸ªéä»¶åï¼", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | if (this.attachmentData[type] && this.attachmentData[type][index]) { |
| | | this.attachmentData[type].splice(index, 1); |
| | | this.$message.success("éä»¶å 餿å"); |
| | | this.updateAssessannexField(); // æ´æ°åå¨å段 |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | |
| | | // é¢è§éä»¶ |
| | | handlePreview(attachment) { |
| | | // å®é
项ç®ä¸æ ¹æ®æä»¶ç±»åè°ç¨ä¸åçé¢è§æ¹å¼ |
| | | if (attachment.fileName.endsWith('.pdf')) { |
| | | // PDFé¢è§ |
| | | window.open(attachment.fileUrl, '_blank'); |
| | | } else if (attachment.fileName.match(/\.(jpg|jpeg|png)$/i)) { |
| | | // å¾çé¢è§ |
| | | this.$alert(`<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`, |
| | | 'å¾çé¢è§', { |
| | | dangerouslyUseHTMLString: true, |
| | | customClass: 'image-preview-dialog' |
| | | }); |
| | | // æ´æ°assessannexåå¨å段 |
| | | updateAssessannexField() { |
| | | // å°ææç±»åçéä»¶å并为ä¸ä¸ªæ°ç» |
| | | const allAttachments = []; |
| | | Object.values(this.attachmentData).forEach(attachments => { |
| | | allAttachments.push(...attachments); |
| | | }); |
| | | |
| | | // æ´æ°å°è¡¨ååæ®µ |
| | | this.form.assessannex = JSON.stringify(allAttachments); |
| | | }, |
| | | |
| | | // æä»¶é¢è§ |
| | | handlePreview(file) { |
| | | this.currentPreviewFile = { |
| | | fileName: file.fileName, |
| | | fileUrl: file.fileUrl, |
| | | fileType: this.getFileType(file.fileName) |
| | | }; |
| | | this.previewVisible = true; |
| | | }, |
| | | |
| | | // æä»¶ä¸è½½ |
| | | handleDownload(file) { |
| | | const fileUrl = file.fileUrl; |
| | | const fileName = file.fileName; |
| | | |
| | | if (fileUrl) { |
| | | const link = document.createElement("a"); |
| | | link.href = fileUrl; |
| | | link.download = fileName; |
| | | link.style.display = "none"; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | this.$message.success("å¼å§ä¸è½½æä»¶"); |
| | | } else { |
| | | // å
¶ä»æä»¶ç±»åæç¤ºä¸è½½ |
| | | this.$message.info('该æä»¶ç±»åæä¸æ¯æå¨çº¿é¢è§ï¼è¯·ä¸è½½åæ¥ç'); |
| | | this.$message.warning("æä»¶è·¯å¾ä¸åå¨ï¼æ æ³ä¸è½½"); |
| | | } |
| | | }, |
| | | |
| | | // ä¿åææéä»¶ä¿¡æ¯ |
| | | handleSaveAll() { |
| | | this.saveLoading = true; |
| | | // è·åæä»¶ç±»å |
| | | getFileType(fileName) { |
| | | if (!fileName) return "other"; |
| | | const extension = this.getFileExtension(fileName); |
| | | const imageTypes = ["jpg", "jpeg", "png"]; |
| | | const pdfTypes = ["pdf"]; |
| | | const officeTypes = ["doc", "docx"]; |
| | | |
| | | // 模æä¿åè¿ç¨ |
| | | setTimeout(() => { |
| | | this.$message.success('éä»¶ä¿¡æ¯ä¿åæå'); |
| | | this.saveLoading = false; |
| | | if (imageTypes.includes(extension)) return "image"; |
| | | if (pdfTypes.includes(extension)) return "pdf"; |
| | | if (officeTypes.includes(extension)) return "office"; |
| | | return "other"; |
| | | }, |
| | | |
| | | // å®é
项ç®ä¸è°ç¨ä¿åæ¥å£ |
| | | // this.saveAttachments(); |
| | | }, 1000); |
| | | // è·åæä»¶æ©å±å |
| | | getFileExtension(filename) { |
| | | return filename |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | }, |
| | | |
| | | // æä»¶å¤§å°æ ¼å¼å |
| | | formatFileSize(size) { |
| | | if (size === 0) return '0 B'; |
| | | if (!size) return "0 B"; |
| | | const k = 1024; |
| | | const sizes = ['B', 'KB', 'MB', 'GB']; |
| | | const sizes = ["B", "KB", "MB", "GB"]; |
| | | const i = Math.floor(Math.log(size) / Math.log(k)); |
| | | return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i]; |
| | | return parseFloat((size / Math.pow(k, i)).toFixed(2)) + " " + sizes[i]; |
| | | }, |
| | | |
| | | // æ¶é´æ ¼å¼å |
| | | parseTime(time) { |
| | | if (!time) return ''; |
| | | const date = new Date(time); |
| | | return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`; |
| | | // æ¥ææ¶é´æ ¼å¼å |
| | | formatDateTime(dateTime) { |
| | | if (!dateTime) return ""; |
| | | try { |
| | | const date = new Date(dateTime); |
| | | if (isNaN(date.getTime())) return dateTime; |
| | | |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(date.getDate()).padStart(2, "0"); |
| | | const hours = String(date.getHours()).padStart(2, "0"); |
| | | const minutes = String(date.getMinutes()).padStart(2, "0"); |
| | | |
| | | return `${year}-${month}-${day} ${hours}:${minutes}`; |
| | | } catch (error) { |
| | | return dateTime; |
| | | } |
| | | }, |
| | | |
| | | // è·åå½åæ¶é´ |
| | | getCurrentTime() { |
| | | const now = new Date(); |
| | | return `${now.getFullYear()}-${(now.getMonth() + 1) |
| | | .toString() |
| | | .padStart(2, "0")}-${now |
| | | .getDate() |
| | | .toString() |
| | | .padStart(2, "0")} ${now |
| | | .getHours() |
| | | .toString() |
| | | .padStart(2, "0")}:${now |
| | | .getMinutes() |
| | | .toString() |
| | | .padStart(2, "0")}:${now |
| | | .getSeconds() |
| | | .toString() |
| | | .padStart(2, "0")}`; |
| | | }, |
| | | |
| | | // ä¿åç¡®è®¤ä¿¡æ¯ |
| | | async handleSave() { |
| | | try { |
| | | await this.$refs.form.validate(); |
| | | this.saveLoading = true; |
| | | |
| | | // ç¡®ä¿éä»¶æ°æ®æ¯ææ°ç |
| | | this.updateAssessannexField(); |
| | | |
| | | const saveData = { |
| | | ...this.form, |
| | | organdecision: this.organdecision.join(","), |
| | | organdecisionOther: this.organdecisionOther |
| | | // assessannexåæ®µå·²å¨updateAssessannexField䏿´æ° |
| | | }; |
| | | |
| | | const response = await relativesEdit(saveData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | this.$router.push("/case/affirm"); |
| | | } else { |
| | | this.$message.error("ä¿å失败ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | | } catch (error) { |
| | | if (error !== "cancel") { |
| | | console.error("ä¿å失败:", error); |
| | | this.$message.error("ä¿å失败"); |
| | | } |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | |
| | | .detail-title { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .fixed-width .el-button { |
| | | margin: 0 5px; |
| | | } |
| | | .confirmation-detail { |
| | | padding: 20px; |
| | | .attachment-section { |
| | | padding: 15px; |
| | | } |
| | | |
| | | .detail-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .attachment-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .detail-title { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .attachment-upload-section { |
| | | padding: 10px; |
| | | } |
| | | |
| | | .upload-header { |
| | | .attachment-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 15px; |
| | | padding-bottom: 10px; |
| | | border-bottom: 1px solid #ebeef5; |
| | | } |
| | | |
| | | .upload-title { |
| | |
| | | color: #303133; |
| | | } |
| | | |
| | | .file-info { |
| | | display: flex; |
| | | align-items: center; |
| | | .attachment-list { |
| | | margin-top: 15px; |
| | | } |
| | | |
| | | .empty-attachment { |
| | |
| | | color: #909399; |
| | | } |
| | | |
| | | /* å¾çé¢è§å¯¹è¯æ¡æ ·å¼ */ |
| | | :deep(.image-preview-dialog) { |
| | | width: auto; |
| | | max-width: 90vw; |
| | | } |
| | | |
| | | :deep(.image-preview-dialog .el-message-box__content) { |
| | | text-align: center; |
| | | .file-name { |
| | | font-size: 13px; |
| | | color: #606266; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="maintenance-detail"> |
| | | <!-- åºç¡ä¿¡æ¯ --> |
| | | <el-card class="detail-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">ä¾è
åºæ¬ä¿¡æ¯</span> |
| | | </div> |
| | | |
| | | <el-form :model="form" ref="form" label-width="120px"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ä½é¢å·" prop="caseNo"> |
| | | <el-input v-model="form.caseNo" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æç®è
å§å" prop="name"> |
| | | <el-input v-model="form.name" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ§å«" prop="gender"> |
| | | <el-select v-model="form.sex" style="width: 100%"> |
| | | <el-option label="ç·" value="0" /> |
| | | <el-option label="女" value="1" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å¹´é¾" prop="age"> |
| | | <el-input v-model="form.age" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç¾ç
è¯æ" prop="diagnosisname"> |
| | | <el-input v-model="form.diagnosisname" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="é¦è¯å»çæºæ" prop="treatmenthospitalname"> |
| | | <el-input v-model="form.treatmenthospitalname" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ£è
ç¶æ" prop="recordstate"> |
| | | <el-select v-model="form.recordstate" style="width: 100%"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_DonationCategory || []" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item |
| | | label="æªå®æåå " |
| | | prop="incompleteReason" |
| | | v-if="form.recordstate === '5'" |
| | | > |
| | | <el-input |
| | | v-model="form.incompleteReason" |
| | | placeholder="请è¾å
¥æªå®ææç®çåå " |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="䏿¥æ¶é´" prop="reporttime"> |
| | | <el-date-picker |
| | | v-model="form.reporttime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ»äº¡æ¶é´" prop="deathTime"> |
| | | <el-date-picker |
| | | v-model="form.deathTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="åè°å" prop="coordinatorName"> |
| | | <el-input v-model="form.coordinatorName" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è¡å" prop="bloodtype"> |
| | | <el-select v-model="form.bloodtype" style="width: 100%"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_BloodType" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="Rh(D)" prop="rhYin"> |
| | | <el-radio-group v-model="form.rhYin"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_bloodtype_rhd || []" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{ dict.label }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-form-item label="ç¹æ®ç
å²" prop="specialMedicalHistory"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.specialMedicalHistory" |
| | | placeholder="è®°å½ç¹æ®ç
å²ä¿¡æ¯" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | | <el-card class="assessment-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">ä¾è
è¯ä¼°å项记å½</span> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | @click="toggleEditMode" |
| | | style="float: right;" |
| | | > |
| | | {{ isEdit ? "宿ç¼è¾" : "å¼å§ç¼è¾" }} |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-tabs v-model="activeTab" type="card" @tab-click="handleTabClick"> |
| | | <!-- å¹å
»ç»æè®°å½ --> |
| | |
| | | <el-card class="culture-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">å¹å
»ç»æè®°å½</span> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | icon="el-icon-plus" |
| | | @click="handleAddCulture" |
| | | > |
| | | æ°å¢å¹å
»è®°å½ |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-table :data="cultureList" v-loading="cultureLoading"> |
| | |
| | | label="å¹å
»ç±»å" |
| | | align="center" |
| | | prop="cultureType" |
| | | > |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag |
| | | :options="cultureTypeOptions" |
| | | :value="scope.row.cultureType" |
| | | /> |
| | | </template> --> |
| | | </el-table-column> |
| | | /> |
| | | <el-table-column |
| | | label="éæ ·æ¶é´" |
| | | align="center" |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- éä»¶å --> |
| | | <el-table-column label="éä»¶" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | <span v-else>æ éä»¶</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | width="200" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleEditCulture(scope.row)" |
| | | >ç¼è¾</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | style="color: #F56C6C;" |
| | | @click="handleDeleteCulture(scope.row)" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="cultureTotal > 0" |
| | | :total="cultureTotal" |
| | | :page.sync="cultureQueryParams.pageNum" |
| | | :limit.sync="cultureQueryParams.pageSize" |
| | | @pagination="getCultureList" |
| | | /> |
| | | </el-card> |
| | | </el-tab-pane> |
| | | |
| | |
| | | <el-tab-pane label="èåè½è¾åè½" name="liverKidney"> |
| | | <liver-kidney-panel |
| | | ref="liverKidney" |
| | | :initial-data="assessmentData.liverKidney" |
| | | :is-editing="isEdit && activeTab === 'liverKidney'" |
| | | @data-change="handleLiverKidneyDataChange" |
| | | /> |
| | |
| | | <el-tab-pane label="è¡å¸¸è§" name="bloodRoutine"> |
| | | <blood-routine-panel |
| | | ref="bloodRoutine" |
| | | :initial-data="assessmentData.bloodRoutine" |
| | | :is-editing="isEdit && activeTab === 'bloodRoutine'" |
| | | @data-change="handleBloodRoutineDataChange" |
| | | /> |
| | |
| | | <el-tab-pane label="尿常è§" name="urineRoutine"> |
| | | <urine-routine-panel |
| | | ref="urineRoutine" |
| | | :initial-data="assessmentData.urineRoutine" |
| | | :is-editing="isEdit && activeTab === 'urineRoutine'" |
| | | @data-change="handleUrineRoutineDataChange" |
| | | /> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-card> |
| | | <!-- å¹å
»ç»æè®°å½ --> |
| | | |
| | | <!-- ç®ååçæ¤çæ ¸æ¥è®°å½ --> |
| | | <!-- æ¤çæ ¸æ¥è®°å½ --> |
| | | <el-card class="record-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">æ¤çæ ¸æ¥è®°å½</span> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | icon="el-icon-plus" |
| | | @click="handleAddRecord" |
| | | > |
| | | æ°å¢æ ¸æ¥è®°å½ |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-table :data="recordList" v-loading="recordLoading"> |
| | |
| | | min-width="200" |
| | | show-overflow-tooltip |
| | | /> |
| | | <!-- éä»¶å --> |
| | | <el-table-column label="éä»¶" align="center" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | <span v-else>æ éä»¶</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | width="180" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleEditRecord(scope.row)" |
| | | >ç¼è¾</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | style="color: #F56C6C;" |
| | | @click="handleDeleteRecord(scope.row)" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="recordTotal > 0" |
| | | :total="recordTotal" |
| | | :page.sync="recordQueryParams.pageNum" |
| | | :limit.sync="recordQueryParams.pageSize" |
| | | @pagination="getRecordList" |
| | | /> |
| | | </el-card> |
| | | |
| | | <!-- å¹å
»è®°å½ç¼è¾å¯¹è¯æ¡ --> |
| | | <el-dialog |
| | | :title="cultureDialogTitle" |
| | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- éä»¶ä¸ä¼ --> |
| | | <el-form-item label="éä»¶"> |
| | | <upload-attachment |
| | | :file-list="cultureForm.attachments" |
| | | <UploadAttachment |
| | | ref="cultureUploadAttachment" |
| | | :file-list="cultureFileList" |
| | | :limit="10" |
| | | :accept="attachmentAccept" |
| | | :multiple="true" |
| | | @change="handleCultureAttachmentChange" |
| | | @upload-success="handleCultureUploadSuccess" |
| | | @upload-error="handleCultureUploadError" |
| | | @remove="handleCultureAttachmentRemove" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <!-- éä»¶ä¸ä¼ --> |
| | | <el-form-item label="éä»¶"> |
| | | <upload-attachment |
| | | :file-list="recordForm.attachments" |
| | | <UploadAttachment |
| | | ref="recordUploadAttachment" |
| | | :file-list="recordFileList" |
| | | :limit="10" |
| | | :accept="attachmentAccept" |
| | | :multiple="true" |
| | | @change="handleRecordAttachmentChange" |
| | | @upload-success="handleRecordUploadSuccess" |
| | | @upload-error="handleRecordUploadError" |
| | | @remove="handleRecordAttachmentRemove" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="recordDialogVisible = false">åæ¶</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="handleSaveRecord" |
| | | :loading="recordSaveLoading" |
| | | >ä¿å</el-button |
| | | > |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- éä»¶é¢è§å¯¹è¯æ¡ --> |
| | | <attachment-preview |
| | | :visible="attachmentPreviewVisible" |
| | | :file-list="currentAttachmentList" |
| | | <el-dialog |
| | | :title="attachmentPreviewTitle" |
| | | @close="attachmentPreviewVisible = false" |
| | | :visible.sync="attachmentPreviewVisible" |
| | | width="900px" |
| | | @close="handleAttachmentPreviewClose" |
| | | > |
| | | <el-table :data="currentAttachmentList" style="width: 100%" size="small"> |
| | | <el-table-column label="æä»¶å" min-width="200"> |
| | | <template slot-scope="scope"> |
| | | <i |
| | | class="el-icon-document" |
| | | :style="{ color: getFileIconColor(scope.row.fileName) }" |
| | | ></i> |
| | | <span class="file-name">{{ scope.row.fileName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä»¶ç±»å" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="getFileTagType(scope.row.fileName)" size="small"> |
| | | {{ getFileTypeText(scope.row.fileName) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ä¸ä¼ æ¶é´" width="160"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatDateTime(scope.row.uploadTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä»¶å¤§å°" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatFileSize(scope.row.fileSize) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="150" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | @click="handlePreviewAttachment(scope.row)" |
| | | :disabled="!isPreviewable(scope.row.fileName)" |
| | | > |
| | | é¢è§ |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="success" |
| | | @click="handleDownloadAttachment(scope.row)" |
| | | > |
| | | ä¸è½½ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | <!-- æä»¶é¢è§å¼¹çª --> |
| | | <FilePreviewDialog |
| | | :visible="filePreviewVisible" |
| | | :file="currentPreviewFile" |
| | | @close="filePreviewVisible = false" |
| | | @download="handleDownloadAttachment" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getMaintenanceDetail, updateMaintenance } from "./api//mockMaintenanceApi"; |
| | | import { |
| | | listCultureResults, |
| | | addCultureResult, |
| | | updateCultureResult, |
| | | deleteCultureResult |
| | | } from "./api/mockMaintenanceApi"; |
| | | import { |
| | | listNursingRecords, |
| | | addNursingRecord, |
| | | updateNursingRecord, |
| | | deleteNursingRecord |
| | | } from "./api//mockMaintenanceApi"; |
| | | import { maintainList, maintainedit, maintainAdd } from "@/api/businessApi"; |
| | | import Pagination from "@/components/Pagination"; |
| | | import UploadAttachment from "@/components/UploadAttachment"; |
| | | import AttachmentPreview from "@/components/AttachmentPreview"; |
| | | import LiverKidneyPanel from "./components/LiverKidneyPanel.vue"; |
| | | import BloodRoutinePanel from "./components/BloodRoutinePanel.vue"; |
| | | import UrineRoutinePanel from "./components/UrineRoutinePanel.vue"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | import LiverKidneyPanel from "@/components/MaintainComponents/LiverKidneyPanel.vue"; |
| | | import BloodRoutinePanel from "@/components/MaintainComponents/BloodRoutinePanel.vue"; |
| | | import UrineRoutinePanel from "@/components/MaintainComponents/UrineRoutinePanel.vue"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | export default { |
| | | name: "MaintenanceDetail", |
| | | components: { |
| | | Pagination, |
| | | UploadAttachment, |
| | | AttachmentPreview, |
| | | FilePreviewDialog, |
| | | LiverKidneyPanel, |
| | | BloodRoutinePanel, |
| | | UrineRoutinePanel |
| | | }, |
| | | dicts: [ |
| | | "sys_donornode", |
| | | "sys_BloodType", |
| | | "sys_EthicalReview", |
| | | "sys_BaseAssessConclusion", |
| | | "sys_bloodtype_rhd", |
| | | "sys_DonationCategory" |
| | | ], |
| | | props: { |
| | | infoid: { |
| | | type: String, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | isEdit: true, |
| | | isEdit: false, |
| | | currentMaintenanceId: null, |
| | | isEditMode: false, |
| | | form: { |
| | | id: undefined, |
| | | caseNo: "", |
| | | donorName: "", |
| | | name: "", |
| | | gender: "", |
| | | age: "", |
| | | diagnosis: "", |
| | | hospitalName: "", |
| | | patientStatus: "1", |
| | | admissionTime: "", |
| | | dischargeTime: "", |
| | | coordinator: "", |
| | | bloodType: "", |
| | | diagnosisname: "", |
| | | treatmenthospitalname: "", |
| | | recordstate: "1", |
| | | reporttime: "", |
| | | deathTime: "", |
| | | coordinatorName: "", |
| | | bloodtype: "", |
| | | rhFactor: "", |
| | | specialMedicalHistory: "", |
| | | incompleteReason: "" |
| | | }, |
| | | activeTab: "culture", |
| | | // å¹å
»ç»æç¸å
³æ°æ® |
| | | // å¹å
»ç»æç¸å
³æ°æ® |
| | | cultureList: [ |
| | | { |
| | | id: 1, |
| | | cultureType: "è¡å¹å
»", |
| | | sampleTime: "2024-12-19 10:30:00", |
| | | result: "é´æ§", |
| | | bacteria: "", |
| | | drugSensitivity: "", |
| | | testingInstitution: "éå²å¤§å¦éå±å»é¢", |
| | | specimenType: "è¡æ¶²", |
| | | remarks: "å¸¸è§æ£æµ", |
| | | attachments: [ |
| | | { |
| | | id: 1, |
| | | fileName: "è¡å¹å
»æ¥å.pdf", |
| | | fileUrl: |
| | | "http://localhost:8080/profile/upload/2025/12/27/1.COPOä¾ä½è¯ä¼°è¡¨.pdf", |
| | | fileSize: 1024000, |
| | | uploadTime: "2024-12-19 11:00:00" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | id: 3, |
| | | cultureType: "è¡å¹å
»", |
| | | sampleTime: "2024-12-20 09:15:00", |
| | | result: "é´æ§", |
| | | bacteria: "", |
| | | drugSensitivity: "", |
| | | testingInstitution: "å¹¿å·æ£æµä¸å¿", |
| | | specimenType: "å°¿æ¶²", |
| | | remarks: "æ¸
æ´ä¸æ®µå°¿æ æ¬", |
| | | attachments: [] |
| | | }, |
| | | { |
| | | id: 2, |
| | | cultureType: "ç°å¹å
ȍȾ", |
| | | sampleTime: "2024-12-19 14:20:00", |
| | | result: "鳿§", |
| | | bacteria: "éé»è²è¡èçè", |
| | | drugSensitivity: "对ééç´ ææï¼å¯¹å¤´å¢ç±»ä¸ä»", |
| | | testingInstitution: "䏿µ·å»å¦æ£éªæ", |
| | | specimenType: "ç°æ¶²", |
| | | remarks: "è¯æè¯éªå®æ", |
| | | attachments: [ |
| | | { |
| | | id: 2, |
| | | fileName: "ç°å¹å
ȍȾ.jpg", |
| | | fileUrl: |
| | | "https://img95.699pic.com/photo/40142/8262.jpg_wh860.jpg", |
| | | fileSize: 512000, |
| | | uploadTime: "2024-12-19 15:30:00" |
| | | }, |
| | | { |
| | | id: 3, |
| | | fileName: "è¯ææ¥å.pdf", |
| | | fileUrl: |
| | | "http://localhost:8080/profile/upload/2025/12/27/(å´é¾8.7)æ¯æ¥å·¥ä½æ»ç».pdf", |
| | | fileSize: 768000, |
| | | uploadTime: "2024-12-19 16:00:00" |
| | | } |
| | | ] |
| | | }, |
| | | extracontentinfo: {}, |
| | | |
| | | { |
| | | id: 4, |
| | | cultureType: "çèå¹å
»", |
| | | sampleTime: "2024-12-20 11:45:00", |
| | | result: "鳿§", |
| | | bacteria: "å¤§è æè", |
| | | drugSensitivity: "å¯¹å·¦æ°§æ°æ²æææ", |
| | | testingInstitution: "æ·±å³äººæ°å»é¢", |
| | | specimenType: "伤å£åæ³ç©", |
| | | remarks: "æ¯å伤壿æçæµ", |
| | | attachments: [ |
| | | { |
| | | id: 4, |
| | | fileName: "çèå¹å
».pdf", |
| | | fileUrl: "/reports/culture4.pdf", |
| | | fileSize: 890000, |
| | | uploadTime: "2024-12-20 13:20:00" |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | // å¹å
»ç»æç¸å
³æ°æ® |
| | | cultureList: [], |
| | | cultureLoading: false, |
| | | cultureTotal: 5, |
| | | cultureQueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10 |
| | | }, |
| | | cultureDialogVisible: false, |
| | | cultureDialogTitle: "", |
| | | cultureSaveLoading: false, |
| | |
| | | cultureType: "", |
| | | sampleTime: "", |
| | | result: "é´æ§", |
| | | attachments: [] // æ°å¢éä»¶åæ®µ |
| | | attachments: [] |
| | | }, |
| | | cultureFileList: [], |
| | | cultureRules: { |
| | | cultureType: [ |
| | | { required: true, message: "è¯·éæ©å¹å
»ç±»å", trigger: "change" } |
| | |
| | | ], |
| | | |
| | | // æ¤çæ ¸æ¥è®°å½ç¸å
³æ°æ® |
| | | recordList: [ |
| | | { |
| | | id: 1, |
| | | recordTime: "2024-12-19 08:30:00", |
| | | recorder: "å¼ æ¤å£«", |
| | | temperature: 36.8, |
| | | heartRate: 78, |
| | | bloodPressure: "120/80", |
| | | respirationRate: 18, |
| | | oxygenSaturation: 98, |
| | | urineOutput: 60, |
| | | cvp: 8, |
| | | checkRecord: "æ£è
çå½ä½å¾å¹³ç¨³ï¼æè¯æ¸
æ¥ï¼é
åæ²»ç", |
| | | remarks: "å¤é´ç¡ç è¯å¥½", |
| | | attachments: [ |
| | | { |
| | | id: 1, |
| | | fileName: "æ©çæ¤çè®°å½.jpg", |
| | | fileUrl: "/records/nursing1.jpg", |
| | | fileSize: 1024000, |
| | | uploadTime: "2024-12-19 09:00:00" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | id: 2, |
| | | recordTime: "2024-12-19 14:30:00", |
| | | recorder: "ææ¤å£«", |
| | | temperature: 37.2, |
| | | heartRate: 82, |
| | | bloodPressure: "118/76", |
| | | respirationRate: 16, |
| | | oxygenSaturation: 97, |
| | | urineOutput: 45, |
| | | cvp: 7.5, |
| | | checkRecord: "æ£è
åå使¸©ç¥æåé«ï¼è§å¯ä¸", |
| | | remarks: "建议å¢å æ°´åæå
¥", |
| | | attachments: [] |
| | | }, |
| | | { |
| | | id: 3, |
| | | recordTime: "2024-12-19 20:30:00", |
| | | recorder: "çæ¤å£«", |
| | | temperature: 36.9, |
| | | heartRate: 75, |
| | | bloodPressure: "122/78", |
| | | respirationRate: 17, |
| | | oxygenSaturation: 98, |
| | | urineOutput: 55, |
| | | cvp: 8.2, |
| | | checkRecord: "æé´çå½ä½å¾ç¨³å®ï¼æ£è
伿¯è¯å¥½", |
| | | remarks: "å¤é´çæµæ å¼å¸¸", |
| | | attachments: [ |
| | | { |
| | | id: 2, |
| | | fileName: "æçæ¤çè®°å½.pdf", |
| | | fileUrl: "/records/nursing3.pdf", |
| | | fileSize: 890000, |
| | | uploadTime: "2024-12-19 21:00:00" |
| | | }, |
| | | { |
| | | id: 3, |
| | | fileName: "ä½å¾çæµè¡¨.xlsx", |
| | | fileUrl: "/records/monitoring3.xlsx", |
| | | fileSize: 256000, |
| | | uploadTime: "2024-12-19 21:15:00" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | id: 4, |
| | | recordTime: "2024-12-20 08:30:00", |
| | | recorder: "èµµæ¤å£«", |
| | | temperature: 36.7, |
| | | heartRate: 80, |
| | | bloodPressure: "119/77", |
| | | respirationRate: 18, |
| | | oxygenSaturation: 99, |
| | | urineOutput: 65, |
| | | cvp: 7.8, |
| | | checkRecord: "æ¨é´çå½ä½å¾æ£å¸¸ï¼æ£è
ç²¾ç¥ç¶æè¯å¥½", |
| | | remarks: "åå¤ä»æ¥æ£æ¥", |
| | | attachments: [] |
| | | }, |
| | | { |
| | | id: 5, |
| | | recordTime: "2024-12-20 12:30:00", |
| | | recorder: "忤士", |
| | | temperature: 37.1, |
| | | heartRate: 85, |
| | | bloodPressure: "121/79", |
| | | respirationRate: 19, |
| | | oxygenSaturation: 96, |
| | | urineOutput: 40, |
| | | cvp: 8.5, |
| | | checkRecord: "åé´ä½æ¸©ç¥ææ³¢å¨ï¼ç»§ç»è§å¯", |
| | | remarks: "å·²éç¥å»ç", |
| | | attachments: [ |
| | | { |
| | | id: 4, |
| | | fileName: "åé´æ¤çè®°å½.jpg", |
| | | fileUrl: "/records/nursing5.jpg", |
| | | fileSize: 765000, |
| | | uploadTime: "2024-12-20 13:00:00" |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | recordList: [], |
| | | recordLoading: false, |
| | | recordTotal: 4, |
| | | recordQueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10 |
| | | }, |
| | | recordDialogVisible: false, |
| | | recordDialogTitle: "", |
| | | recordSaveLoading: false, |
| | |
| | | id: undefined, |
| | | recordTime: "", |
| | | recorder: "", |
| | | checkRecord: "", // æ¹ä¸ºååæ®µè®°å½ |
| | | attachments: [] // æ°å¢éä»¶åæ®µ |
| | | checkRecord: "", |
| | | attachments: [] |
| | | }, |
| | | recordFileList: [], |
| | | recordRules: { |
| | | recordTime: [ |
| | | { required: true, message: "è¯·éæ©æ ¸æ¥æ¶é´", trigger: "change" } |
| | |
| | | // éä»¶é¢è§ç¸å
³ |
| | | attachmentPreviewVisible: false, |
| | | currentAttachmentList: [], |
| | | attachmentPreviewTitle: "" |
| | | attachmentPreviewTitle: "", |
| | | |
| | | // æä»¶é¢è§ç¸å
³ |
| | | filePreviewVisible: false, |
| | | currentPreviewFile: null, |
| | | |
| | | // éä»¶ç¸å
³é
ç½® |
| | | attachmentLimit: 10, |
| | | attachmentAccept: |
| | | ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt", |
| | | |
| | | // è¯ä¼°æ°æ®åå¨ |
| | | assessmentData: { |
| | | liverKidney: {}, |
| | | bloodRoutine: {}, |
| | | urineRoutine: {}, |
| | | cultureResults: [], |
| | | nursingRecords: [] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | const id = this.$route.query.id; |
| | | // this.isEdit = this.$route.query.edit === "true"; |
| | | if (id) { |
| | | this.getDetail(id); |
| | | this.getCultureList(); |
| | | this.getRecordList(); |
| | | this.loadMaintenanceData(); |
| | | }, |
| | | watch: { |
| | | $route(to, from) { |
| | | this.loadMaintenanceData(); |
| | | } |
| | | }, |
| | | methods: { |
| | | // è·å详æ
|
| | | getDetail(id) { |
| | | getMaintenanceDetail(id).then(response => { |
| | | // å è½½ç»´æ¤æ°æ® |
| | | async loadMaintenanceData() { |
| | | try { |
| | | this.cultureLoading = true; |
| | | this.recordLoading = true; |
| | | |
| | | const queryParams = {}; |
| | | console.log(this.infoid, "this.infoid"); |
| | | |
| | | if (this.infoid) { |
| | | queryParams.infoid = this.infoid; |
| | | } else { |
| | | this.$message.error("缺å°å¿
è¦çè·¯ç±åæ°"); |
| | | return; |
| | | } |
| | | const response = await maintainList(queryParams); |
| | | if (response.code === 200) { |
| | | this.form = response.data; |
| | | } |
| | | }); |
| | | }, |
| | | // å¹å
»è®°å½éä»¶åæ´ |
| | | handleCultureAttachmentChange(fileList) { |
| | | this.cultureForm.attachments = fileList; |
| | | }, |
| | | let maintenanceData = response.data[0]; |
| | | |
| | | // æ¤çè®°å½éä»¶åæ´ |
| | | handleRecordAttachmentChange(fileList) { |
| | | this.recordForm.attachments = fileList; |
| | | }, |
| | | |
| | | // æ¥çå¹å
»è®°å½éä»¶ |
| | | handleViewCultureAttachments(row) { |
| | | console.log(22, row.attachments); |
| | | |
| | | this.currentAttachmentList = row.attachments || []; |
| | | this.attachmentPreviewTitle = `å¹å
»è®°å½éä»¶ - ${row.cultureType}`; |
| | | this.attachmentPreviewVisible = true; |
| | | }, |
| | | handleTabClick(tab) { |
| | | this.$nextTick(() => { |
| | | console.log(tab.name, 88); |
| | | const tableRef=null; |
| | | if (tab.name == "liverKidney") { |
| | | tableRef = this.$refs.liverKidney; // è¯·æ¿æ¢ä¸ºæ¨çè¡¨æ ¼ ref |
| | | } else if (tab.name == "bloodRoutine") { |
| | | tableRef = this.$refs.bloodRoutine; // è¯·æ¿æ¢ä¸ºæ¨çè¡¨æ ¼ ref |
| | | } else if (tab.name == "bloodRoutine") { |
| | | tableRef = this.$refs.bloodRoutine; // è¯·æ¿æ¢ä¸ºæ¨çè¡¨æ ¼ ref |
| | | } |
| | | // å¦ææ¯ el-tableï¼å°è¯è°ç¨å
¶ doLayout æ¹æ³ |
| | | if (tableRef && tableRef.doLayout) { |
| | | tableRef.doLayout(); |
| | | } |
| | | |
| | | // æè
ï¼æ´éç¨ç强å¶éæ°æ¸²ææ¹å¼ |
| | | this.$forceUpdate(); // æ
ç¨ï¼å¯è½å¼åå
¶ä»é®é¢[1](@ref) |
| | | }); |
| | | }, |
| | | // æ¥çæ¤çè®°å½éä»¶ |
| | | handleViewRecordAttachments(row) { |
| | | this.currentAttachmentList = row.attachments || []; |
| | | this.attachmentPreviewTitle = `æ¤çæ ¸æ¥è®°å½éä»¶ - ${row.recorder}`; |
| | | this.attachmentPreviewVisible = true; |
| | | }, |
| | | // å¹å
»è®°å½ç¸å
³æ¹æ³ |
| | | getCultureList() { |
| | | this.cultureLoading = true; |
| | | listCultureResults(this.form.id, this.cultureQueryParams) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | // this.cultureList = response.data.rows; |
| | | // this.cultureTotal = response.data.total; |
| | | if (Array.isArray(maintenanceData)) { |
| | | maintenanceData = maintenanceData[0] || {}; |
| | | } |
| | | this.cultureLoading = false; |
| | | }) |
| | | .catch(() => { |
| | | this.cultureLoading = false; |
| | | }); |
| | | if (maintenanceData.extracontent) { |
| | | this.extracontentinfo = JSON.parse(maintenanceData.extracontent); |
| | | if (this.extracontentinfo.specialMedicalHistory) { |
| | | this.form.specialMedicalHistory = this.extracontentinfo.specialMedicalHistory; |
| | | } |
| | | } |
| | | |
| | | if (maintenanceData.itemDesc) { |
| | | try { |
| | | const itemDescData = maintenanceData.itemDesc; |
| | | this.assessmentData = { ...this.assessmentData, ...itemDescData }; |
| | | |
| | | if (itemDescData.cultureResults) { |
| | | this.cultureList = itemDescData.cultureResults; |
| | | } |
| | | if (itemDescData.nursingRecords) { |
| | | this.recordList = itemDescData.nursingRecords; |
| | | } |
| | | if (itemDescData.liverKidney) { |
| | | this.assessmentData.liverKidney = itemDescData.liverKidney; |
| | | } |
| | | if (itemDescData.bloodRoutine) { |
| | | this.assessmentData.bloodRoutine = itemDescData.bloodRoutine; |
| | | } |
| | | if (itemDescData.urineRoutine) { |
| | | this.assessmentData.urineRoutine = itemDescData.urineRoutine; |
| | | } |
| | | } catch (error) { |
| | | console.error("è§£æitemDesc JSON失败:", error); |
| | | } |
| | | } |
| | | |
| | | this.form = { ...this.form, ...maintenanceData }; |
| | | this.$message.success("æ°æ®å è½½æå"); |
| | | } else { |
| | | this.$message.error("æ°æ®å 载失败ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | | } catch (error) { |
| | | console.error("å è½½ç»´æ¤æ°æ®å¤±è´¥:", error); |
| | | this.$message.error("æ°æ®å 载失败"); |
| | | } finally { |
| | | this.cultureLoading = false; |
| | | this.recordLoading = false; |
| | | } |
| | | }, |
| | | |
| | | // 忢ç¼è¾æ¨¡å¼ |
| | | toggleEditMode() { |
| | | this.isEdit = !this.isEdit; |
| | | if (!this.isEdit) { |
| | | } |
| | | }, |
| | | |
| | | // å¹å
»è®°å½ç¸å
³æ¹æ³ |
| | | handleAddCulture() { |
| | | this.cultureDialogTitle = "æ°å¢å¹å
»è®°å½"; |
| | | this.cultureForm = { |
| | |
| | | cultureType: "", |
| | | sampleTime: "", |
| | | result: "é´æ§", |
| | | bacteria: "", |
| | | drugSensitivity: "", |
| | | testingInstitution: "", |
| | | specimenType: "", |
| | | remarks: "" |
| | | attachments: [] |
| | | }; |
| | | this.cultureFileList = []; |
| | | this.cultureDialogVisible = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.cultureForm && this.$refs.cultureForm.clearValidate(); |
| | |
| | | handleEditCulture(row) { |
| | | this.cultureDialogTitle = "ç¼è¾å¹å
»è®°å½"; |
| | | this.cultureForm = { ...row }; |
| | | this.cultureFileList = row.attachments |
| | | ? row.attachments.map(item => ({ |
| | | uid: item.id || Math.random(), |
| | | name: item.fileName, |
| | | fileSize: item.fileSize, |
| | | url: item.path || item.fileUrl, |
| | | uploadTime: item.uploadTime, |
| | | status: "success" |
| | | })) |
| | | : []; |
| | | this.cultureDialogVisible = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.cultureForm && this.$refs.cultureForm.clearValidate(); |
| | | }); |
| | | }, |
| | | |
| | | handleViewCulture(row) { |
| | | this.$alert( |
| | | ` |
| | | <div> |
| | | <p><strong>å¹å
»ç±»åï¼</strong>${this.getCultureTypeLabel( |
| | | row.cultureType |
| | | )}</p> |
| | | <p><strong>éæ ·æ¶é´ï¼</strong>${row.sampleTime}</p> |
| | | <p><strong>å¹å
»ç»æï¼</strong>${row.result}</p> |
| | | <p><strong>æ£æµæºæï¼</strong>${row.testingInstitution}</p> |
| | | </div> |
| | | `, |
| | | "å¹å
»è®°å½è¯¦æ
", |
| | | { |
| | | dangerouslyUseHTMLString: true, |
| | | customClass: "detail-dialog" |
| | | } |
| | | ); |
| | | }, |
| | | toggleEditMode() { |
| | | this.isEdit = !this.isEdit; |
| | | // if (!this.isEdit) { |
| | | // this.saveAllData(); |
| | | // } |
| | | }, |
| | | handleLiverKidneyDataChange(data) { |
| | | console.log("èåè½è¾åè½æ°æ®åæ´:", data); |
| | | // å¤çæ°æ®ä¿åæä¸´æ¶åå¨ |
| | | }, |
| | | handleBloodRoutineDataChange(data) { |
| | | console.log("è¡å¸¸è§åè½æ°æ®åæ´:", data); |
| | | // å¤çæ°æ®ä¿åæä¸´æ¶åå¨ |
| | | }, |
| | | handleUrineRoutineDataChange(data) { |
| | | console.log("尿常è§åè½æ°æ®åæ´:", data); |
| | | // å¤çæ°æ®ä¿åæä¸´æ¶åå¨ |
| | | }, |
| | | // ä¿åå¹å
»è®°å½ |
| | | handleSaveCulture() { |
| | | this.$refs.cultureForm.validate(valid => { |
| | | if (valid) { |
| | | this.cultureSaveLoading = true; |
| | | const api = this.cultureForm.id |
| | | ? updateCultureResult |
| | | : addCultureResult; |
| | | const requestData = { |
| | | ...this.cultureForm, |
| | | maintenanceId: this.form.id |
| | | }; |
| | | |
| | | api(requestData) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success( |
| | | this.cultureForm.id ? "ä¿®æ¹æå" : "æ°å¢æå" |
| | | ); |
| | | this.cultureDialogVisible = false; |
| | | this.getCultureList(); |
| | | } |
| | | this.cultureSaveLoading = false; |
| | | }) |
| | | .catch(() => { |
| | | this.cultureSaveLoading = false; |
| | | }); |
| | | if (this.cultureForm.id) { |
| | | const index = this.cultureList.findIndex( |
| | | item => item.id === this.cultureForm.id |
| | | ); |
| | | if (index !== -1) { |
| | | this.cultureList.splice(index, 1, { ...this.cultureForm }); |
| | | } |
| | | } else { |
| | | this.cultureForm.id = Date.now(); |
| | | this.cultureList.push({ ...this.cultureForm }); |
| | | } |
| | | |
| | | this.$message.success(this.cultureForm.id ? "ä¿®æ¹æå" : "æ°å¢æå"); |
| | | this.cultureDialogVisible = false; |
| | | this.cultureSaveLoading = false; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | deleteCultureResult(row.id).then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.getCultureList(); |
| | | } |
| | | }); |
| | | this.cultureList = this.cultureList.filter( |
| | | item => item.id !== row.id |
| | | ); |
| | | this.$message.success("å 餿å"); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | |
| | | getCultureTypeLabel(value) { |
| | | const type = this.cultureTypeOptions.find(item => item.value === value); |
| | | return type ? type.label : "æªç¥"; |
| | | }, |
| | | |
| | | // æ¤çæ ¸æ¥è®°å½ç¸å
³æ¹æ³ |
| | | getRecordList() { |
| | | this.recordLoading = true; |
| | | listNursingRecords(this.form.id, this.recordQueryParams) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | // this.recordList = response.data.rows; |
| | | // this.recordTotal = response.data.total; |
| | | } |
| | | this.recordLoading = false; |
| | | }) |
| | | .catch(() => { |
| | | this.recordLoading = false; |
| | | }); |
| | | }, |
| | | |
| | | // æ¤çè®°å½ç¸å
³æ¹æ³ |
| | | handleAddRecord() { |
| | | this.recordDialogTitle = "æ°å¢æ¤çæ ¸æ¥è®°å½"; |
| | | this.recordForm = { |
| | |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19), |
| | | recorder: "å½åç¨æ·", // å®é
项ç®ä¸ä»ç¨æ·ä¿¡æ¯è·å |
| | | temperature: 36.5, |
| | | heartRate: 80, |
| | | bloodPressure: "120/80", |
| | | respirationRate: 18, |
| | | oxygenSaturation: 98, |
| | | urineOutput: 50, |
| | | cvp: 8, |
| | | remarks: "" |
| | | recorder: "å½åç¨æ·", |
| | | checkRecord: "", |
| | | attachments: [] |
| | | }; |
| | | this.recordFileList = []; |
| | | this.recordDialogVisible = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.recordForm && this.$refs.recordForm.clearValidate(); |
| | |
| | | handleEditRecord(row) { |
| | | this.recordDialogTitle = "ç¼è¾æ¤çæ ¸æ¥è®°å½"; |
| | | this.recordForm = { ...row }; |
| | | this.recordFileList = row.attachments |
| | | ? row.attachments.map(item => ({ |
| | | uid: item.id || Math.random(), |
| | | name: item.fileName, |
| | | fileSize: item.fileSize, |
| | | url: item.path || item.fileUrl, |
| | | uploadTime: item.uploadTime, |
| | | status: "success" |
| | | })) |
| | | : []; |
| | | this.recordDialogVisible = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.recordForm && this.$refs.recordForm.clearValidate(); |
| | | }); |
| | | }, |
| | | |
| | | handleViewRecord(row) { |
| | | this.$alert( |
| | | ` |
| | | <div> |
| | | <p><strong>æ ¸æ¥æ¶é´ï¼</strong>${row.recordTime}</p> |
| | | <p><strong>æ ¸æ¥äººï¼</strong>${row.recorder}</p> |
| | | <p><strong>çå½ä½å¾ï¼</strong></p> |
| | | <ul> |
| | | <li>使¸©ï¼${row.temperature}â</li> |
| | | <li>å¿çï¼${row.heartRate}次/å</li> |
| | | <li>è¡åï¼${row.bloodPressure}mmHg</li> |
| | | <li>å¼å¸ï¼${row.respirationRate}次/å</li> |
| | | <li>è¡æ°§é¥±å度ï¼${row.oxygenSaturation}%</li> |
| | | <li>å°¿éï¼${row.urineOutput}ml/h</li> |
| | | </ul> |
| | | <p><strong>夿³¨ï¼</strong>${row.remarks || "æ "}</p> |
| | | </div> |
| | | `, |
| | | "æ¤çæ ¸æ¥è®°å½è¯¦æ
", |
| | | { |
| | | dangerouslyUseHTMLString: true, |
| | | customClass: "detail-dialog" |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | handleSaveRecord() { |
| | | this.$refs.recordForm.validate(valid => { |
| | | if (valid) { |
| | | this.recordSaveLoading = true; |
| | | const api = this.recordForm.id |
| | | ? updateNursingRecord |
| | | : addNursingRecord; |
| | | const requestData = { |
| | | ...this.recordForm, |
| | | maintenanceId: this.form.id |
| | | }; |
| | | |
| | | api(requestData) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success( |
| | | this.recordForm.id ? "ä¿®æ¹æå" : "æ°å¢æå" |
| | | ); |
| | | this.recordDialogVisible = false; |
| | | this.getRecordList(); |
| | | } |
| | | this.recordSaveLoading = false; |
| | | }) |
| | | .catch(() => { |
| | | this.recordSaveLoading = false; |
| | | }); |
| | | if (this.recordForm.id) { |
| | | const index = this.recordList.findIndex( |
| | | item => item.id === this.recordForm.id |
| | | ); |
| | | if (index !== -1) { |
| | | this.recordList.splice(index, 1, { ...this.recordForm }); |
| | | } |
| | | } else { |
| | | this.recordForm.id = Date.now(); |
| | | this.recordList.push({ ...this.recordForm }); |
| | | } |
| | | |
| | | this.$message.success(this.recordForm.id ? "ä¿®æ¹æå" : "æ°å¢æå"); |
| | | this.recordDialogVisible = false; |
| | | this.recordSaveLoading = false; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | deleteNursingRecord(row.id).then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.getRecordList(); |
| | | } |
| | | }); |
| | | this.recordList = this.recordList.filter(item => item.id !== row.id); |
| | | this.$message.success("å 餿å"); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | |
| | | // ä¿ååºæ¬ä¿¡æ¯ |
| | | handleSave() { |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | updateMaintenance(this.form).then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | this.isEdit = false; |
| | | } |
| | | }); |
| | | // å¹å
»è®°å½éä»¶ç¸å
³æ¹æ³ |
| | | handleCultureAttachmentChange(fileList) { |
| | | this.cultureFileList = fileList; |
| | | }, |
| | | |
| | | handleCultureUploadSuccess({ file, fileList, response }) { |
| | | if (response.code === 200) { |
| | | const attachmentObj = { |
| | | fileName: file.name, |
| | | path: response.fileUrl || file.url, |
| | | fileUrl: response.fileUrl || file.url, |
| | | fileType: this.getFileExtension(file.name), |
| | | fileSize: file.size, |
| | | uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss") |
| | | }; |
| | | |
| | | if (!Array.isArray(this.cultureForm.attachments)) { |
| | | this.cultureForm.attachments = []; |
| | | } |
| | | |
| | | this.cultureForm.attachments.push(attachmentObj); |
| | | this.cultureFileList = fileList; |
| | | this.$message.success("æä»¶ä¸ä¼ æå"); |
| | | } |
| | | }, |
| | | |
| | | handleCultureUploadError({ file, fileList, error }) { |
| | | console.error("å¹å
»è®°å½éä»¶ä¸ä¼ 失败:", error); |
| | | this.$message.error("æä»¶ä¸ä¼ 失败ï¼è¯·éè¯"); |
| | | }, |
| | | |
| | | handleCultureAttachmentRemove(file) { |
| | | if (file.url) { |
| | | const index = this.cultureForm.attachments.findIndex( |
| | | item => item.path === file.url || item.fileUrl === file.url |
| | | ); |
| | | if (index > -1) { |
| | | this.cultureForm.attachments.splice(index, 1); |
| | | this.$message.success("éä»¶å 餿å"); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // æ¤çè®°å½éä»¶ç¸å
³æ¹æ³ |
| | | handleRecordAttachmentChange(fileList) { |
| | | this.recordFileList = fileList; |
| | | }, |
| | | |
| | | handleRecordUploadSuccess({ file, fileList, response }) { |
| | | if (response.code === 200) { |
| | | const attachmentObj = { |
| | | fileName: file.name, |
| | | path: response.fileUrl || file.url, |
| | | fileUrl: response.fileUrl || file.url, |
| | | fileType: this.getFileExtension(file.name), |
| | | fileSize: file.size, |
| | | uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss") |
| | | }; |
| | | |
| | | if (!Array.isArray(this.recordForm.attachments)) { |
| | | this.recordForm.attachments = []; |
| | | } |
| | | |
| | | this.recordForm.attachments.push(attachmentObj); |
| | | this.recordFileList = fileList; |
| | | this.$message.success("æä»¶ä¸ä¼ æå"); |
| | | } |
| | | }, |
| | | |
| | | handleRecordUploadError({ file, fileList, error }) { |
| | | console.error("æ¤çè®°å½éä»¶ä¸ä¼ 失败:", error); |
| | | this.$message.error("æä»¶ä¸ä¼ 失败ï¼è¯·éè¯"); |
| | | }, |
| | | |
| | | handleRecordAttachmentRemove(file) { |
| | | if (file.url) { |
| | | const index = this.recordForm.attachments.findIndex( |
| | | item => item.path === file.url || item.fileUrl === file.url |
| | | ); |
| | | if (index > -1) { |
| | | this.recordForm.attachments.splice(index, 1); |
| | | this.$message.success("éä»¶å 餿å"); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | handleViewCultureAttachments(row) { |
| | | this.currentAttachmentList = row.attachments || []; |
| | | this.attachmentPreviewTitle = `å¹å
»è®°å½éä»¶ - ${row.cultureType}`; |
| | | this.attachmentPreviewVisible = true; |
| | | }, |
| | | |
| | | handleViewRecordAttachments(row) { |
| | | this.currentAttachmentList = row.attachments || []; |
| | | this.attachmentPreviewTitle = `æ¤çæ ¸æ¥è®°å½éä»¶ - ${row.recorder}`; |
| | | this.attachmentPreviewVisible = true; |
| | | }, |
| | | |
| | | handleAttachmentPreviewClose() { |
| | | this.currentAttachmentList = []; |
| | | this.attachmentPreviewTitle = ""; |
| | | }, |
| | | |
| | | handlePreviewAttachment(file) { |
| | | this.currentPreviewFile = { |
| | | fileName: file.fileName, |
| | | fileUrl: file.path || file.fileUrl, |
| | | fileType: this.getFileType(file.fileName) |
| | | }; |
| | | this.filePreviewVisible = true; |
| | | }, |
| | | |
| | | handleDownloadAttachment(file) { |
| | | const fileUrl = file.path || file.fileUrl; |
| | | const fileName = file.fileName; |
| | | |
| | | if (fileUrl) { |
| | | const link = document.createElement("a"); |
| | | link.href = fileUrl; |
| | | link.download = fileName; |
| | | link.style.display = "none"; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | this.$message.success("å¼å§ä¸è½½æä»¶"); |
| | | } else { |
| | | this.$message.warning("æä»¶è·¯å¾ä¸åå¨ï¼æ æ³ä¸è½½"); |
| | | } |
| | | }, |
| | | |
| | | /** è·åæä»¶ç±»å */ |
| | | getFileType(fileName) { |
| | | if (!fileName) return "other"; |
| | | const extension = fileName |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | const imageTypes = ["jpg", "jpeg", "png", "gif", "bmp", "webp"]; |
| | | const pdfTypes = ["pdf"]; |
| | | const officeTypes = ["doc", "docx", "xls", "xlsx", "ppt", "pptx"]; |
| | | if (imageTypes.includes(extension)) return "image"; |
| | | if (pdfTypes.includes(extension)) return "pdf"; |
| | | if (officeTypes.includes(extension)) return "office"; |
| | | return "other"; |
| | | }, |
| | | |
| | | /** è·åæä»¶å¾æ é¢è² */ |
| | | getFileIconColor(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | const colorMap = { |
| | | image: "#67C23A", |
| | | pdf: "#F56C6C", |
| | | office: "#409EFF", |
| | | other: "#909399" |
| | | }; |
| | | return colorMap[type] || "#909399"; |
| | | }, |
| | | |
| | | /** è·åæä»¶æ ç¾ç±»å */ |
| | | getFileTagType(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | const typeMap = { |
| | | image: "success", |
| | | pdf: "danger", |
| | | office: "primary", |
| | | other: "info" |
| | | }; |
| | | return typeMap[type] || "info"; |
| | | }, |
| | | |
| | | /** è·åæä»¶ç±»åææ¬ */ |
| | | getFileTypeText(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | const textMap = { |
| | | image: "å¾ç", |
| | | pdf: "PDF", |
| | | office: "ææ¡£", |
| | | other: "å
¶ä»" |
| | | }; |
| | | return textMap[type] || "æªç¥"; |
| | | }, |
| | | |
| | | /** æ£æ¥æ¯å¦å¯é¢è§ */ |
| | | isPreviewable(fileName) { |
| | | const type = this.getFileType(fileName); |
| | | return ["image", "pdf"].includes(type); |
| | | }, |
| | | |
| | | /** è·åæä»¶æ©å±å */ |
| | | getFileExtension(filename) { |
| | | return filename |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | }, |
| | | |
| | | /** æ ¼å¼åæä»¶å¤§å° */ |
| | | formatFileSize(bytes) { |
| | | if (!bytes || bytes === 0) return "0 B"; |
| | | const k = 1024; |
| | | const sizes = ["B", "KB", "MB", "GB"]; |
| | | const i = Math.floor(Math.log(bytes) / Math.log(k)); |
| | | return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i]; |
| | | }, |
| | | |
| | | /** æ¥ææ¶é´æ ¼å¼å */ |
| | | formatDateTime(dateTime) { |
| | | if (!dateTime) return ""; |
| | | try { |
| | | const date = new Date(dateTime); |
| | | if (isNaN(date.getTime())) return dateTime; |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(date.getDate()).padStart(2, "0"); |
| | | const hours = String(date.getHours()).padStart(2, "0"); |
| | | const minutes = String(date.getMinutes()).padStart(2, "0"); |
| | | return `${year}-${month}-${day} ${hours}:${minutes}`; |
| | | } catch (error) { |
| | | return dateTime; |
| | | } |
| | | }, |
| | | |
| | | // è¯ä¼°æ°æ®åæ´å¤ç |
| | | handleLiverKidneyDataChange(data) { |
| | | this.assessmentData.liverKidney = data; |
| | | }, |
| | | |
| | | handleBloodRoutineDataChange(data) { |
| | | this.assessmentData.bloodRoutine = data; |
| | | }, |
| | | |
| | | handleUrineRoutineDataChange(data) { |
| | | this.assessmentData.urineRoutine = data; |
| | | }, |
| | | |
| | | handleTabClick(tab) { |
| | | this.$nextTick(() => { |
| | | let tableRef = null; |
| | | if (tab.name === "liverKidney") { |
| | | tableRef = this.$refs.liverKidney; |
| | | } else if (tab.name === "bloodRoutine") { |
| | | tableRef = this.$refs.bloodRoutine; |
| | | } else if (tab.name === "urineRoutine") { |
| | | tableRef = this.$refs.urineRoutine; |
| | | } |
| | | |
| | | if (tableRef && tableRef.doLayout) { |
| | | tableRef.doLayout(); |
| | | } |
| | | }); |
| | | } |
| | |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .culture-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .record-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .detail-title { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | .maintenance-detail { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .detail-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .culture-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .record-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .detail-title { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | .medical-panel { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .attachment-section { |
| | | margin-top: 20px; |
| | | padding: 15px; |
| | | border: 1px solid #ebeef5; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .attachment-title { |
| | | font-weight: bold; |
| | | margin-bottom: 10px; |
| | | color: #409eff; |
| | | } |
| | | |
| | | .required-item::before { |
| | | content: "*"; |
| | | color: #f56c6c; |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .assessment-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .medical-table { |
| | | width: 100%; |
| | | .record-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .dynamic-column { |
| | | min-width: 120px; |
| | | .detail-title { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .culture-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .fixed-width .el-button { |
| | | margin: 0 2px; |
| | | } |
| | | |
| | | /* 详æ
å¯¹è¯æ¡æ ·å¼ */ |
| | | :deep(.detail-dialog) { |
| | | width: 500px; |
| | | } |
| | | |
| | | :deep(.detail-dialog .el-message-box__content) { |
| | | line-height: 1.8; |
| | | } |
| | | |
| | | :deep(.detail-dialog ul) { |
| | | margin: 10px 0; |
| | | padding-left: 20px; |
| | | } |
| | | |
| | | :deep(.detail-dialog li) { |
| | | margin-bottom: 5px; |
| | | .file-name { |
| | | font-size: 13px; |
| | | margin-left: 8px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="assessment-detail"> |
| | | <el-card class="basic-info-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>æ¡ä¾åºæ¬ä¿¡æ¯</span> |
| | | <el-button |
| | | style="float: right; padding: 3px 0" |
| | | type="text" |
| | | @click="handleAttachmentPreview" |
| | | > |
| | | <i class="el-icon-folder-opened"></i> æ¥çéä»¶ |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="ä½é¢å·">{{ |
| | | assessmentData.caseNo |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ½å¨æç®è
å§å">{{ |
| | | assessmentData.name || assessmentData.donorName |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ§å«"> |
| | | <dict-tag |
| | | :options="dict.type.sys_user_sex" |
| | | :value="assessmentData.sex" |
| | | /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="å¹´é¾" |
| | | >{{ assessmentData.age }}å²</el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="è¡å"> |
| | | {{ assessmentData.bloodtype }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è¯ä»¶å·ç ">{{ |
| | | assessmentData.idcardno |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="ç¾ç
è¯æ">{{ |
| | | assessmentData.diagnosisname |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="æå¨å»çæºæ">{{ |
| | | assessmentData.treatmenthospitalname |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="åè°å">{{ |
| | | assessmentData.coordinatorName |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¯ä¼°æ¶é´">{{ |
| | | assessmentData.assessTime |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¯ä¼°ç¶æ"> |
| | | <el-tag :type="statusFilter(assessmentData.assessState)"> |
| | | {{ statusTextFilter(assessmentData.assessState) }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-card> |
| | | |
| | | <el-card class="organ-assessment-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>å¨å®è¯ä¼°è¡¨</span> |
| | | <!-- <el-button |
| | | <el-button |
| | | v-if="isCoordinator && allOrgansAssessed" |
| | | style="float: right; margin-left: 10px" |
| | | type="primary" |
| | | size="mini" |
| | | @click="handleCompleteAssessment" |
| | | :loading="saveLoading" |
| | | > |
| | | ç¡®è®¤å®æè¯ä¼° |
| | | </el-button> --> |
| | | <!-- <span v-if="!isCoordinator" class="jstitle"> |
| | | </el-button> |
| | | <span v-if="!isCoordinator" class="jstitle"> |
| | | å½åè§è²ï¼{{ currentDepartment }}è¯ä¼°äººå |
| | | </span> --> |
| | | </span> |
| | | </div> |
| | | |
| | | <!-- æç®å³å®è¡¨å --> |
| | | <el-form> |
| | | <el-form-item label-width="100px" label="æç®å³å®"> |
| | | <el-checkbox-group |
| | | v-model="organdecisionValues" |
| | | @change="handleOrganDecisionChange" |
| | | :disabled="!isEdit" |
| | | > |
| | | <el-checkbox |
| | | v-for="dict in dict.type.sys_Organ" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{ dict.label }} |
| | | </el-checkbox> |
| | | </el-checkbox-group> |
| | | <el-input |
| | | v-if="showOtherInput" |
| | | v-model="organdecisionOther" |
| | | placeholder="请è¾å
¥å
¶ä»æç®å³å®çå
·ä½å
容" |
| | | style="margin-top: 10px; width: 300px;" |
| | | :readonly="!isEdit" |
| | | @input="handleOtherDecisionInput" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <!-- å¨å®è¯ä¼°è¡¨æ ¼ --> |
| | | <el-table |
| | | :data="organAssessmentList" |
| | | :data="filteredOrganAssessmentList" |
| | | v-loading="assessmentLoading" |
| | | style="width: 100%" |
| | | :row-class-name="getRowClassName" |
| | | :expand-row-keys="expandedRowKeys" |
| | | @expand-change="handleExpandChange" |
| | | row-key="organno" |
| | | empty-text="å½åæç®å³å®ä¸ææ éè¦è¯ä¼°çå¨å®" |
| | | > |
| | | <el-table-column type="expand"> |
| | | <template slot-scope="scope"> |
| | | <div class="organ-expand-content" v-if="scope.row.expanded"> |
| | | <el-tabs |
| | | v-model="scope.row.activeTab" |
| | | type="card" |
| | | class="organ-detail-tabs" |
| | | @tab-click="handleTabClick(scope.row, $event)" |
| | | > |
| | | <!-- 卿çæè¯ä¼°Tab --> |
| | | <el-tab-pane |
| | | v-for="(assessment, index) in getOrganAssessments(scope.row)" |
| | | :key="`${scope.row.organno}_${index}`" |
| | | :label="`第${index + 1}次è¯ä¼°`" |
| | | :name="index" |
| | | > |
| | | <organ-assessment-form |
| | | :organ-data="scope.row" |
| | | :assessment-index="index" |
| | | :readonly="!canAssessOrgan(scope.row)" |
| | | :current-user="currentUser" |
| | | @update-assessment="handleUpdateAssessment" |
| | | @delete-assessment="handleDeleteAssessment" |
| | | @save-assessment="handleSaveAssessment" |
| | | /> |
| | | </el-tab-pane> |
| | | |
| | | <!-- æ·»å è¯ä¼°æé® --> |
| | | <el-tab-pane |
| | | name="add" |
| | | v-if="canAssessOrgan(scope.row) && isEdit" |
| | | > |
| | | <template slot="label"> |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-plus" |
| | | @click.stop="handleAddNewAssessment(scope.row)" |
| | | size="mini" |
| | | > |
| | | æ°å¢è¯ä¼° |
| | | </el-button> |
| | | </template> |
| | | <div class="add-assessment-prompt"> |
| | | <el-empty description="ç¹å»ä¸æ¹æé®æ·»å æ°çè¯ä¼°"></el-empty> |
| | | </div> |
| | | </el-tab-pane> |
| | | |
| | | <!-- è¯ä¼°æ±æ»Tab --> |
| | | <el-tab-pane label="è¯ä¼°æ±æ»" name="summary"> |
| | | <div class="assessment-summary"> |
| | | <!-- åºæ¬ä¿¡æ¯æ±æ» --> |
| | | <el-descriptions title="åºæ¬ä¿¡æ¯æ±æ»" :column="2" border> |
| | | <el-descriptions-item label="å¨å®ç±»å"> |
| | | <span class="summary-item">{{ getOrganLabel(scope.row.organno) }}</span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è·åæºæ"> |
| | | <span class="summary-item">{{ scope.row.gainhospitalname }}</span> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è¯ä¼°æ¬¡æ°" :span="2"> |
| | | <el-tag type="info" size="medium"> |
| | | {{ getAssessmentCount(scope.row) }}次 |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ææ°è¯ä¼°æ¶é´" :span="2"> |
| | | <span class="highlight-text">{{ getLatestAssessmentTime(scope.row) || "-" }}</span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <!-- è¯ä¼°è¯¦æ
æ±æ» --> |
| | | <el-card header="è¯ä¼°è¯¦æ
å表" style="margin-top: 20px;" class="assessment-detail-card"> |
| | | <div v-if="getOrganAssessments(scope.row).length === 0" class="no-assessment"> |
| | | <el-empty description="ææ è¯ä¼°è®°å½"></el-empty> |
| | | </div> |
| | | |
| | | <div v-else> |
| | | <!-- æ¯æ¬¡è¯ä¼°è¯¦æ
--> |
| | | <div v-for="(assessment, index) in getOrganAssessments(scope.row)" |
| | | :key="index" |
| | | class="assessment-item"> |
| | | <el-card shadow="hover" class="assessment-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span class="assessment-title">第{{ index + 1 }}次è¯ä¼°</span> |
| | | <el-tag |
| | | :type="getAssessmentTagType(assessment.status)" |
| | | size="small" |
| | | class="status-tag" |
| | | > |
| | | {{ getAssessmentStatusText(assessment.status) }} |
| | | </el-tag> |
| | | </div> |
| | | |
| | | <el-descriptions :column="2" border class="detail-descriptions"> |
| | | <el-descriptions-item label="è¯ä¼°æ¶é´" :span="2"> |
| | | <span class="time-text">{{ assessment.assessmentTime || "-" }}</span> |
| | | </el-descriptions-item> |
| | | |
| | | <el-descriptions-item label="è¯ä¼°äºº"> |
| | | <el-tag type="info" size="small"> |
| | | {{ assessment.assessor || "æªå¡«å" }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | |
| | | <el-descriptions-item label="åè½ç¶æ"> |
| | | <el-tag |
| | | :type="getFunctionStatusTagType(assessment.functionStatus)" |
| | | size="small" |
| | | > |
| | | {{ getFunctionStatusText(assessment.functionStatus) }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | |
| | | <el-descriptions-item label="è¯ä¼°æè§" :span="2"> |
| | | <div class="opinion-content"> |
| | | {{ assessment.assessmentOpinion || "ææ è¯ä¼°æè§" }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | |
| | | <el-descriptions-item label="éä»¶æ°é" :span="2" v-if="assessment.attachments && assessment.attachments.length > 0"> |
| | | <el-tag type="success" size="small"> |
| | | {{ assessment.attachments.length }}个 |
| | | </el-tag> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | @click="showAttachmentList(assessment.attachments, index + 1)" |
| | | style="margin-left: 10px;" |
| | | > |
| | | æ¥çéä»¶å表 |
| | | </el-button> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | |
| | | <!-- å¨å®åºæ¬ä¿¡æ¯å¡ç --> |
| | | <el-card header="å¨å®ä¿¡æ¯" style="margin-top: 20px;" class="organ-info-card"> |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="è·ååæ´»æ£"> |
| | | <el-tag |
| | | :type=" |
| | | scope.row.isbiopsybefore === '1' |
| | | ? 'success' |
| | | : 'info' |
| | | " |
| | | size="small" |
| | | > |
| | | {{ scope.row.isbiopsybefore === "1" ? "æ¯" : "å¦" }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è·ååæ´»æ£"> |
| | | <el-tag |
| | | :type=" |
| | | scope.row.isbiopsyafter === '1' |
| | | ? 'success' |
| | | : 'info' |
| | | " |
| | | size="small" |
| | | > |
| | | {{ scope.row.isbiopsyafter === "1" ? "æ¯" : "å¦" }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è¾¹ç¼å¨å®"> |
| | | <el-tag |
| | | :type=" |
| | | scope.row.ismarginalorgan === '1' |
| | | ? 'warning' |
| | | : 'info' |
| | | " |
| | | size="small" |
| | | > |
| | | {{ |
| | | scope.row.ismarginalorgan === "1" ? "æ¯" : "å¦" |
| | | }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ç
åè鳿§"> |
| | | <el-tag |
| | | :type=" |
| | | scope.row.ispathogenpositive === '1' |
| | | ? 'danger' |
| | | : 'info' |
| | | " |
| | | size="small" |
| | | > |
| | | {{ |
| | | scope.row.ispathogenpositive === "1" ? "æ¯" : "å¦" |
| | | }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-card> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="å¨å®ç±»å" align="center" prop="organname"> |
| | | <template slot-scope="scope"> |
| | | {{ getOrganLabel(scope.row.organno) }} |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="å¨å®ç¼å·" align="center" prop="organnumber" /> |
| | | |
| | | <el-table-column |
| | | label="å¨å®ç±»å" |
| | | label="è·åæºæ" |
| | | align="center" |
| | | prop="organType" |
| | | prop="gainhospitalname" |
| | | show-overflow-tooltip |
| | | /> |
| | | |
| | | <!-- 卿æ¾ç¤ºè¯ä¼°ç¶æå --> |
| | | <el-table-column |
| | | v-for="index in getMaxAssessmentCount()" |
| | | :key="index" |
| | | :label="`第${index}次è¯ä¼°`" |
| | | align="center" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <dict-tag |
| | | :options="organTypeOptions" |
| | | :value="scope.row.organType" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="è¯ä¼°ç§å®¤" |
| | | align="center" |
| | | prop="department" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="è¯ä¼°äººå" |
| | | align="center" |
| | | prop="assessor" |
| | | width="100" |
| | | /> |
| | | <el-table-column label="è¯ä¼°ç¶æ" align="center" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag |
| | | :type="scope.row.assessmentStatus === '1' ? 'success' : 'warning'" |
| | | v-if="getOrganAssessments(scope.row)[index - 1]" |
| | | :type=" |
| | | getAssessmentTagType( |
| | | getOrganAssessments(scope.row)[index - 1].status |
| | | ) |
| | | " |
| | | size="small" |
| | | > |
| | | {{ scope.row.assessmentStatus === "1" ? "å·²è¯ä¼°" : "å¾
è¯ä¼°" }} |
| | | {{ |
| | | getAssessmentStatusText( |
| | | getOrganAssessments(scope.row)[index - 1].status |
| | | ) |
| | | }} |
| | | </el-tag> |
| | | <el-tag v-else type="info" size="small">æªè¯ä¼°</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="æ´ä½ç¶æ" align="center" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag |
| | | :type=" |
| | | getOrganOverallStatus(scope.row) === 'completed' |
| | | ? 'success' |
| | | : getOrganOverallStatus(scope.row) === 'assessing' |
| | | ? 'primary' |
| | | : 'warning' |
| | | " |
| | | size="small" |
| | | > |
| | | {{ getOrganOverallStatusText(scope.row) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åè½ç¶æ" align="center" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag |
| | | :type="getFunctionStatusType(scope.row.functionStatus)" |
| | | size="small" |
| | | > |
| | | {{ getFunctionStatusText(scope.row.functionStatus) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="è¯ä¼°æè§" |
| | | align="center" |
| | | prop="assessmentOpinion" |
| | | min-width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column label="è¯ä¼°æ¶é´" align="center" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.assessmentTime || "-" }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="canAssessOrgan(scope.row)" |
| | | v-if="canAssessOrgan(scope.row) && isEdit" |
| | | size="mini" |
| | | type="text" |
| | | @click="handleOrganAssess(scope.row)" |
| | | >{{ |
| | | scope.row.assessmentStatus === "1" ? "æ¥ç/ä¿®æ¹" : "è¯ä¼°" |
| | | }}</el-button |
| | | @click="handleToggleExpand(scope.row)" |
| | | > |
| | | {{ |
| | | expandedRowKeys.includes(scope.row.organno) ? "æ¶èµ·" : "详æ
" |
| | | }} |
| | | </el-button> |
| | | <el-button |
| | | v-else-if="!isEdit" |
| | | size="mini" |
| | | type="text" |
| | | @click="handleToggleExpand(scope.row)" |
| | | > |
| | | {{ |
| | | expandedRowKeys.includes(scope.row.organno) ? "æ¶èµ·" : "æ¥ç" |
| | | }} |
| | | </el-button> |
| | | <el-button v-else size="mini" type="text" disabled |
| | | >æ æé</el-button |
| | | > |
| | | <el-button |
| | | v-if="isCoordinator" |
| | | size="mini" |
| | | type="text" |
| | | @click="handleViewOrganDetail(scope.row)" |
| | | >详æ
</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!-- å¨å®è¯ä¼°è¯¦æ
--> |
| | | <el-collapse |
| | | v-model="activeOrgans" |
| | | accordion |
| | | class="organ-detail-collapse" |
| | | > |
| | | <el-collapse-item |
| | | v-for="organ in organAssessmentList" |
| | | :key="organ.organType" |
| | | :name="organ.organType" |
| | | :title="getOrganTitle(organ)" |
| | | > |
| | | <organ-assessment-form |
| | | :organ-data="organ" |
| | | :readonly="!canAssessOrgan(organ)" |
| | | @save="handleSaveOrganAssessment" |
| | | /> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </el-card> |
| | | |
| | | <!-- éä»¶é¢è§å¼¹çª --> |
| | | <attachment-preview |
| | | <!-- æ´ä½ä¿åæé® --> |
| | | <div class="footer-actions" v-if="isEdit"> |
| | | <el-button type="primary" @click="handleSaveAll" :loading="saveLoading" |
| | | >ä¿åè¯ä¼°è¡¨</el-button |
| | | > |
| | | <el-button @click="handleCancel">åæ¶</el-button> |
| | | </div> |
| | | |
| | | <!-- æä»¶é¢è§å¼¹çª --> |
| | | <FilePreviewDialog |
| | | :visible="attachmentVisible" |
| | | :attachment-list="attachmentList" |
| | | :file="currentPreviewFile" |
| | | @close="attachmentVisible = false" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { getAssessment, updateOrganAssessment, completeAssessment } from "@/api/case/assessment"; |
| | | import { |
| | | getAssessment, |
| | | updateOrganAssessment, |
| | | completeAssessment |
| | | } from "./api/mockAssessmentApi"; |
| | | |
| | | import OrganAssessmentForm from "./components/OrganAssessmentForm.vue"; |
| | | import AttachmentPreview from "./components/AttachmentPreview.vue"; |
| | | evaluateBaseInfolist, |
| | | assessedit, |
| | | assessAdd |
| | | } from "@/api/businessApi/index"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | import OrganAssessmentForm from "@/components/assessInfoComponents/OrganAssessmentForm.vue"; |
| | | |
| | | export default { |
| | | name: "AssessmentDetail", |
| | | components: { OrganAssessmentForm, AttachmentPreview }, |
| | | components: { OrganAssessmentForm, FilePreviewDialog }, |
| | | dicts: ["sys_user_sex", "sys_Organ", "sys_0_1"], |
| | | props: { |
| | | infoid: { |
| | | type: String, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // è¯ä¼°ID |
| | | assessmentId: undefined, |
| | | // è¯ä¼°æ°æ® |
| | | assessmentData: {}, |
| | | // å¨å®è¯ä¼°å表 |
| | | organAssessmentList: [], |
| | | // éä»¶å表 |
| | | attachmentList: [], |
| | | // æ¯å¦ç¼è¾æ¨¡å¼ |
| | | isEdit: false, |
| | | // å è½½ç¶æ |
| | | assessmentLoading: false, |
| | | // å½åç¨æ·ä¿¡æ¯ |
| | | saveLoading: false, |
| | | // æ°æ®ID |
| | | |
| | | assessmentId: undefined, |
| | | // ä¸»è¦æ°æ® |
| | | assessmentData: {}, |
| | | organAssessmentList: [], // ææå¨å®æ°æ® |
| | | // å±å¼è¡ç¸å
³ |
| | | expandedRowKeys: [], |
| | | // éä»¶ç¸å
³ |
| | | currentPreviewFile: null, |
| | | attachmentVisible: false, |
| | | // æç®å³å®ç¸å
³ |
| | | organdecisionValues: [], // åå¨åå
¸value |
| | | organdecisionOther: "", |
| | | // è®°å½æç®å³å®åååçå¼ |
| | | prevOrgandecisionValues: [], |
| | | // å¨å®ç±»åæ å°å
³ç³» |
| | | organDecisionMapping: { |
| | | C38: ["C38"], // å¿è -> å¿è |
| | | C22: ["C22"], // å
¨è -> å
¨è |
| | | C22L: ["C22L"], // å·¦åè -> å·¦åè |
| | | C22L0: ["C22L0"], // å·¦å¤å¶ -> å·¦å¤å¶ |
| | | C22R: ["C22R"], // å³åè -> å³åè |
| | | C22R0: ["C22R0"], // å³ä¸å¶ -> å³ä¸å¶ |
| | | C64: ["C64L", "C64R"], // åè¾ -> å·¦è¾, å³è¾ |
| | | C64L: ["C64L"], // å·¦è¾ -> å·¦è¾ |
| | | C64R: ["C64R"], // å³è¾ -> å³è¾ |
| | | C34: ["C34L", "C34R"], // å
¨èº -> å·¦èº, å³èº |
| | | C34L: ["C34L"], // å·¦èº -> å·¦èº |
| | | C34R: ["C34R"], // å³èº -> å³èº |
| | | C17: ["C17"], // å°è -> å°è |
| | | C25: ["C25"], // è°è
º -> è°è
º |
| | | C00: [], // éä½ -> 䏿 å°å
·ä½å¨å®ï¼é使¯æ´ä½ï¼ |
| | | C69L: ["C69L"], // å·¦ç¼è§è -> å·¦ç¼è§è |
| | | C69R: ["C69R"], // å³ç¼è§è -> å³ç¼è§è |
| | | C01: [] // å
¶ä» -> 䏿 å°å
·ä½å¨å® |
| | | }, |
| | | // ç¨æ·ä¿¡æ¯ |
| | | currentUser: { |
| | | id: "001", |
| | | name: "å¼ å»ç", |
| | | department: "å¿èå¤ç§", |
| | | role: "department" // coordinator: åè°å, department: ç§å®¤äººå |
| | | department: "å¿èç§", |
| | | role: "coordinator" |
| | | }, |
| | | // å±å¼çå¨å® |
| | | activeOrgans: [], |
| | | // éä»¶é¢è§å¯è§æ§ |
| | | attachmentVisible: false, |
| | | // åå
¸é项 |
| | | genderOptions: [ |
| | | { value: "0", label: "ç·" }, |
| | | { value: "1", label: "女" } |
| | | ], |
| | | bloodTypeOptions: [ |
| | | { value: "A", label: "Aå" }, |
| | | { value: "B", label: "Bå" }, |
| | | { value: "O", label: "Oå" }, |
| | | { value: "AB", label: "ABå" } |
| | | ], |
| | | assessmentTypeOptions: [ |
| | | { value: "1", label: "忬¡è¯ä¼°" }, |
| | | { value: "2", label: "æç»è¯ä¼°" } |
| | | ], |
| | | organTypeOptions: [ |
| | | { value: "heart", label: "å¿è" }, |
| | | { value: "liver", label: "èè" }, |
| | | { value: "kidney", label: "è¾è" }, |
| | | { value: "lung", label: "èºè" }, |
| | | { value: "pancreas", label: "è°è
º" }, |
| | | { value: "intestine", label: "è é" }, |
| | | { value: "cornea", label: "è§è" }, |
| | | { value: "skin", label: "ç®è¤" } |
| | | ] |
| | | // è®°å½è¢«å é¤çå¨å®è¯ä¼° |
| | | deletedOrganAssessments: [], |
| | | // ç¨äºè¿½è¸ªtabæ¿æ´»ç¶æ |
| | | activeTabMap: new Map(), |
| | | // å·æ°key |
| | | refreshKey: 0 |
| | | }; |
| | | }, |
| | | computed: { |
| | | // æ¯å¦æ¯åè°å |
| | | isCoordinator() { |
| | | return this.currentUser.role === "coordinator"; |
| | | }, |
| | | // å½åç§å®¤ |
| | | currentDepartment() { |
| | | return this.currentUser.department; |
| | | }, |
| | | // ææå¨å®æ¯å¦é½å·²è¯ä¼° |
| | | allOrgansAssessed() { |
| | | return this.organAssessmentList.every( |
| | | organ => organ.assessmentStatus === "1" |
| | | // æ ¹æ®æç®å³å®è¿æ»¤åçå¨å®å表 |
| | | filteredOrganAssessmentList() { |
| | | if (!this.organdecisionValues || this.organdecisionValues.length === 0) { |
| | | return []; |
| | | } |
| | | |
| | | const selectedOrgans = new Set(); |
| | | this.organdecisionValues.forEach(decision => { |
| | | const organs = this.organDecisionMapping[decision] || []; |
| | | organs.forEach(organ => selectedOrgans.add(organ)); |
| | | }); |
| | | |
| | | return this.organAssessmentList.filter( |
| | | organ => |
| | | selectedOrgans.has(organ.organno) && |
| | | organ.delFlag !== "1" && |
| | | !this.deletedOrganAssessments.includes(organ.organno) |
| | | ); |
| | | }, |
| | | // æ£æ¥ææè¿æ»¤åçå¨å®æ¯å¦é½å·²è¯ä¼° |
| | | allOrgansAssessed() { |
| | | return this.filteredOrganAssessmentList.every(organ => { |
| | | const assessments = this.getOrganAssessments(organ); |
| | | return ( |
| | | assessments && |
| | | assessments.length > 0 && |
| | | assessments.every(assessment => assessment.status === "assessed") |
| | | ); |
| | | }); |
| | | }, |
| | | // è·åå¨å®åå
¸ |
| | | organDict() { |
| | | return this.dict.type.sys_Organ || []; |
| | | }, |
| | | // 夿æ¯å¦éè¦æ¾ç¤ºå
¶ä»è¾å
¥æ¡ |
| | | showOtherInput() { |
| | | return this.organdecisionValues.includes("C01"); |
| | | } |
| | | }, |
| | | watch: { |
| | | // ç嬿ç®å³å®ååï¼ç¨äºå¤æé»è¾å¤ç |
| | | organdecisionValues: { |
| | | handler(newVal, oldVal) { |
| | | this.handleComplexDecisionChange(newVal, oldVal); |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | created() { |
| | | this.assessmentId = this.$route.query.id; |
| | | this.isEdit = this.$route.query.assess === "true"; |
| | | this.getAssessmentDetail(); |
| | | }, |
| | | methods: { |
| | | // è·åè¯ä¼°è¯¦æ
- 使ç¨Mockæ°æ® |
| | | getAssessmentDetail() { |
| | | this.assessmentLoading = true; |
| | | getAssessment(this.assessmentId) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.assessmentData = response.data.caseInfo; |
| | | this.organAssessmentList = response.data.organAssessments || []; |
| | | this.attachmentList = response.data.attachments || []; |
| | | } else { |
| | | this.$message.error("è·åè¯ä¼°è¯¦æ
失败"); |
| | | // æ ¹æ®åå
¸valueè·ålabel |
| | | getOrganLabel(organValue) { |
| | | const dictItem = this.organDict.find(item => item.value === organValue); |
| | | return dictItem ? dictItem.label : organValue; |
| | | }, |
| | | |
| | | // Tabç¹å»äºä»¶ |
| | | handleTabClick(organ, tab) { |
| | | if (tab.name !== "add") { |
| | | this.activeTabMap.set(organ.organno, tab.name); |
| | | } |
| | | }, |
| | | // è·ååè½ç¶ææ ç¾ç±»å |
| | | getFunctionStatusTagType(status) { |
| | | const typeMap = { |
| | | "1": "success", // æ£å¸¸ |
| | | "2": "warning", // 轻度å¼å¸¸ |
| | | "3": "danger", // é度å¼å¸¸ |
| | | "4": "info" // æ æ³è¯ä¼° |
| | | }; |
| | | return typeMap[status] || "info"; |
| | | }, |
| | | |
| | | // è·ååè½ç¶æææ¬ |
| | | getFunctionStatusText(status) { |
| | | const textMap = { |
| | | "1": "æ£å¸¸", |
| | | "2": "轻度å¼å¸¸", |
| | | "3": "é度å¼å¸¸", |
| | | "4": "æ æ³è¯ä¼°" |
| | | }; |
| | | return textMap[status] || "æªè¯ä¼°"; |
| | | }, |
| | | |
| | | // æ¾ç¤ºéä»¶å表 |
| | | showAttachmentList(attachments, assessmentNumber) { |
| | | if (!attachments || attachments.length === 0) { |
| | | this.$message.info(`第${assessmentNumber}次è¯ä¼°ææ éä»¶`); |
| | | return; |
| | | } |
| | | |
| | | this.$alert( |
| | | `<div> |
| | | <h4>第${assessmentNumber}次è¯ä¼°éä»¶å表</h4> |
| | | <ul style="list-style: none; padding-left: 0;"> |
| | | ${attachments.map((item, index) => ` |
| | | <li style="margin: 5px 0; padding: 5px; background: #f5f7fa; border-radius: 4px;"> |
| | | <i class="el-icon-document"></i> |
| | | <span style="margin-left: 8px;">${item.fileName}</span> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | onclick="window.open('${item.path || item.fileUrl}')" |
| | | style="margin-left: 10px;" |
| | | > |
| | | ä¸è½½ |
| | | </el-button> |
| | | </li> |
| | | `).join('')} |
| | | </ul> |
| | | </div>`, |
| | | 'éä»¶å表', |
| | | { |
| | | dangerouslyUseHTMLString: true, |
| | | showConfirmButton: false, |
| | | showCancelButton: true, |
| | | cancelButtonText: 'å
³é' |
| | | } |
| | | ); |
| | | }, |
| | | // è·åå¨å®çè¯ä¼°å表 |
| | | getOrganAssessments(organ) { |
| | | if (!organ.assesscontent) return []; |
| | | try { |
| | | const assessData = |
| | | typeof organ.assesscontent === "string" |
| | | ? JSON.parse(organ.assesscontent) |
| | | : organ.assesscontent; |
| | | |
| | | if (Array.isArray(assessData)) { |
| | | return assessData.filter(item => item.delFlag !== "1"); |
| | | } |
| | | return []; |
| | | } catch (error) { |
| | | console.warn("è§£æè¯ä¼°å
容失败:", error); |
| | | return []; |
| | | } |
| | | }, |
| | | |
| | | // è·åè¯ä¼°æ°é |
| | | getAssessmentCount(organ) { |
| | | return this.getOrganAssessments(organ).length; |
| | | }, |
| | | |
| | | // å¤çè¯ä¼°æ´æ° |
| | | handleUpdateAssessment(data) { |
| | | const { organData, assessmentData, assessmentIndex } = data; |
| | | const assessments = this.getOrganAssessments(organData); |
| | | |
| | | if (assessments[assessmentIndex]) { |
| | | // å建æ°çè¯ä¼°æ°ç» |
| | | const newAssessments = [...assessments]; |
| | | newAssessments[assessmentIndex] = { |
| | | ...assessments[assessmentIndex], |
| | | ...assessmentData |
| | | }; |
| | | |
| | | // æ´æ° assesscontent |
| | | this.$set(organData, "assesscontent", JSON.stringify(newAssessments)); |
| | | this.$forceUpdate(); |
| | | } |
| | | }, |
| | | |
| | | // æ´ä½ä¿åæ¹æ³ |
| | | async handleSaveAll() { |
| | | this.saveLoading = true; |
| | | try { |
| | | const saveData = { |
| | | id: this.assessmentData.id || undefined, |
| | | infoid: this.infoid, |
| | | caseNo: this.assessmentData.caseNo, |
| | | donorno: this.assessmentData.donorno, |
| | | treatmenthospitalname: this.assessmentData.treatmenthospitalname, |
| | | treatmenthospitalno: this.assessmentData.treatmenthospitalno, |
| | | sex: this.assessmentData.sex, |
| | | age: this.assessmentData.age, |
| | | bloodtype: this.assessmentData.bloodtype, |
| | | idcardno: this.assessmentData.idcardno, |
| | | diagnosisname: this.assessmentData.diagnosisname, |
| | | coordinatorName: this.assessmentData.coordinatorName, |
| | | assessTime: |
| | | this.assessmentData.assessTime || new Date().toISOString(), |
| | | assessState: this.assessmentData.assessState, |
| | | assessannex: this.assessmentData.assessannex, |
| | | organdecision: this.organdecisionValues.join(","), |
| | | organdecisionOther: this.organdecisionOther, |
| | | serviceMedicalevaluationorganList: this.organAssessmentList.map( |
| | | organ => ({ |
| | | id: organ.id, |
| | | infoid: organ.infoid, |
| | | donorno: organ.donorno, |
| | | organno: organ.organno, |
| | | organname: this.getOrganLabel(organ.organno), |
| | | organnumber: organ.organnumber, |
| | | gainhospitalno: organ.gainhospitalno, |
| | | gainhospitalname: organ.gainhospitalname, |
| | | isbiopsybefore: organ.isbiopsybefore, |
| | | isbiopsyafter: organ.isbiopsyafter, |
| | | ismarginalorgan: organ.ismarginalorgan, |
| | | ispathogenpositive: organ.ispathogenpositive, |
| | | ispnf: organ.ispnf, |
| | | isdgf: organ.isdgf, |
| | | delFlag: organ.delFlag || "0", |
| | | assesscontent: organ.assesscontent || "[]" |
| | | }) |
| | | ) |
| | | }; |
| | | |
| | | const saveMethod = this.assessmentData.id ? assessedit : assessAdd; |
| | | const response = await saveMethod(saveData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("è¯ä¼°è¡¨ä¿åæåï¼"); |
| | | if (!this.assessmentData.id && response.data && response.data.id) { |
| | | this.assessmentData.id = response.data.id; |
| | | } |
| | | this.assessmentLoading = false; |
| | | }) |
| | | .catch(error => { |
| | | console.error("è·åè¯ä¼°è¯¦æ
失败:", error); |
| | | this.assessmentLoading = false; |
| | | this.$message.error("è·åè¯ä¼°è¯¦æ
失败"); |
| | | this.refreshKey += 1; // 触åéæ°æ¸²æ |
| | | } else { |
| | | this.$message.error("ä¿å失败ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | | } catch (error) { |
| | | console.error("ä¿åè¯ä¼°è¡¨å¤±è´¥:", error); |
| | | this.$message.error("ä¿å失败ï¼è¯·éè¯"); |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | | }, |
| | | |
| | | // åæ¶æé®äºä»¶ |
| | | handleCancel() { |
| | | this.$router.go(-1); |
| | | }, |
| | | |
| | | // æç®å³å®åæ´å¤ç |
| | | async handleOrganDecisionChange(newDecision) { |
| | | const oldDecision = [...this.prevOrgandecisionValues]; |
| | | this.autoHandleDecisionChange(newDecision); |
| | | |
| | | const removedDecisions = oldDecision.filter( |
| | | item => !newDecision.includes(item) |
| | | ); |
| | | |
| | | for (const decision of removedDecisions) { |
| | | await this.handleRemovedDecision(decision); |
| | | } |
| | | |
| | | this.prevOrgandecisionValues = [...newDecision]; |
| | | this.$forceUpdate(); |
| | | |
| | | if (newDecision.length === 0) { |
| | | this.expandedRowKeys = []; |
| | | } |
| | | }, |
| | | |
| | | // å
¶ä»æç®å³å®è¾å
¥å¤ç |
| | | handleOtherDecisionInput(value) { |
| | | // è¾å
¥æ¶ä¸ååç¬ä¿åï¼çå¾
æ´ä½ä¿å |
| | | }, |
| | | |
| | | // èªå¨å¤çå³å®åæ´é»è¾ |
| | | autoHandleDecisionChange(newDecision) { |
| | | // 妿鿩äº"åè¾"(value: C64)ï¼èªå¨åæ¶åç¬ç"å·¦è¾"(value: C64L)å"å³è¾"(value: C64R)éæ© |
| | | if (newDecision.includes("C64")) { |
| | | this.organdecisionValues = newDecision.filter( |
| | | item => item !== "C64L" && item !== "C64R" |
| | | ); |
| | | } |
| | | // 妿鿩äº"å·¦è¾"æ"å³è¾"ï¼åæ¶"åè¾"éæ© |
| | | else if (newDecision.includes("C64L") || newDecision.includes("C64R")) { |
| | | this.organdecisionValues = newDecision.filter(item => item !== "C64"); |
| | | } |
| | | |
| | | // 妿鿩äº"å
¨èº"(value: C34)ï¼èªå¨åæ¶åç¬ç"å·¦èº"(value: C34L)å"å³èº"(value: C34R)éæ© |
| | | if (newDecision.includes("C34")) { |
| | | this.organdecisionValues = newDecision.filter( |
| | | item => item !== "C34L" && item !== "C34R" |
| | | ); |
| | | } |
| | | // 妿鿩äº"å·¦èº"æ"å³èº"ï¼åæ¶"å
¨èº"éæ© |
| | | else if (newDecision.includes("C34L") || newDecision.includes("C34R")) { |
| | | this.organdecisionValues = newDecision.filter(item => item !== "C34"); |
| | | } |
| | | |
| | | // å¤çå
¶ä»äºæ¥é»è¾ |
| | | this.handleExclusiveDecisions(); |
| | | }, |
| | | |
| | | // å¤çäºæ¥çæç®å³å® |
| | | handleExclusiveDecisions() { |
| | | // é使ç®(value: 10)ä¸å
¶ä»å¨å®æç®äºæ¥ï¼æ ¹æ®ä¸å¡éæ±è°æ´ï¼ |
| | | if (this.organdecisionValues.includes("10")) { |
| | | // å¯ä»¥è®¾ç½®åªä¿çé使ç®ï¼æè
æ ¹æ®ä¸å¡éæ±å¤ç |
| | | } |
| | | }, |
| | | |
| | | // 夿å³çååå¤ç |
| | | handleComplexDecisionChange(newVal, oldVal) { |
| | | // å¤çæ°å¢çéæ© |
| | | const addedDecisions = newVal.filter(item => !oldVal.includes(item)); |
| | | const removedDecisions = oldVal.filter(item => !newVal.includes(item)); |
| | | |
| | | // 对æ°å¢å çéæ©è¿è¡ç¹æ®å¤ç |
| | | addedDecisions.forEach(decision => { |
| | | this.handleNewDecision(decision); |
| | | }); |
| | | |
| | | // 对移é¤çéæ©è¿è¡æ¸
ç |
| | | removedDecisions.forEach(decision => { |
| | | this.handleRemovedDecision(decision); |
| | | }); |
| | | }, |
| | | |
| | | // å¤çæ°å¢çæç®å³å® |
| | | handleNewDecision(decision) { |
| | | // æ ¹æ®æ å°å
³ç³»èªå¨å建对åºçå¨å®è¯ä¼°é¡¹ |
| | | this.autoCreateOrganAssessments(decision); |
| | | }, |
| | | |
| | | // èªå¨å建å¨å®è¯ä¼°é¡¹ |
| | | autoCreateOrganAssessments(decision) { |
| | | const organsToCreate = this.organDecisionMapping[decision]; |
| | | |
| | | if (organsToCreate && organsToCreate.length > 0) { |
| | | organsToCreate.forEach(organValue => { |
| | | this.ensureOrganExists(organValue); |
| | | }); |
| | | |
| | | // æ¾ç¤ºå建æç¤º |
| | | if (organsToCreate.length > 0) { |
| | | this.$message.success( |
| | | `已为ã${this.getOrganLabel(decision)}ãå建${ |
| | | organsToCreate.length |
| | | }个è¯ä¼°é¡¹` |
| | | ); |
| | | } |
| | | } else { |
| | | console.warn( |
| | | `æç®å³å®ã${this.getOrganLabel(decision)}ãæ²¡æé
ç½®å¨å®æ å°å
³ç³»` |
| | | ); |
| | | } |
| | | }, |
| | | // ç¶æè¿æ»¤å¨ |
| | | statusFilter(status) { |
| | | const statusMap = { |
| | | "0": "warning", |
| | | "1": "primary", |
| | | "2": "success", |
| | | "3": "danger" |
| | | |
| | | // å¤çç§»é¤çæç®å³å® |
| | | async handleRemovedDecision(decision) { |
| | | const relatedOrgans = this.organDecisionMapping[decision] || []; |
| | | |
| | | for (const organValue of relatedOrgans) { |
| | | const organIndex = this.organAssessmentList.findIndex( |
| | | organ => organ.organno === organValue && organ.delFlag !== "1" |
| | | ); |
| | | |
| | | if (organIndex !== -1) { |
| | | const organ = this.organAssessmentList[organIndex]; |
| | | const organLabel = this.getOrganLabel(organValue); |
| | | |
| | | try { |
| | | await this.$confirm( |
| | | `æç®å³å®"${this.getOrganLabel( |
| | | decision |
| | | )}"å·²åæ¶ï¼æ¯å¦å é¤å¯¹åºç${organLabel}è¯ä¼°è®°å½ï¼`, |
| | | "确认å é¤", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | } |
| | | ); |
| | | |
| | | this.$set(this.organAssessmentList[organIndex], "delFlag", "1"); |
| | | this.deletedOrganAssessments.push(organValue); |
| | | |
| | | const keyIndex = this.expandedRowKeys.indexOf(organValue); |
| | | if (keyIndex > -1) { |
| | | this.expandedRowKeys.splice(keyIndex, 1); |
| | | } |
| | | |
| | | this.$message.success(`${organLabel}è¯ä¼°è®°å½å·²æ è®°å é¤`); |
| | | } catch (cancelError) { |
| | | if (!this.organdecisionValues.includes(decision)) { |
| | | this.organdecisionValues.push(decision); |
| | | } |
| | | this.$message.info(`已忶å é¤${organLabel}è¯ä¼°è®°å½`); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // ç¡®ä¿å¨å®åå¨ |
| | | ensureOrganExists(organValue) { |
| | | const exists = this.organAssessmentList.some( |
| | | organ => organ.organno === organValue && organ.delFlag !== "1" |
| | | ); |
| | | |
| | | if (!exists) { |
| | | const newOrgan = { |
| | | id: null, |
| | | organno: organValue, |
| | | organname: this.getOrganLabel(organValue), |
| | | gainhospitalname: "å¾
åé
æºæ", |
| | | isbiopsybefore: "0", |
| | | isbiopsyafter: "0", |
| | | ismarginalorgan: "0", |
| | | ispathogenpositive: "0", |
| | | assesscontent: JSON.stringify([this.getDefaultAssessment(0)]), |
| | | activeTab: 0, |
| | | expanded: false, |
| | | createTime: new Date().toISOString(), |
| | | delFlag: "0" |
| | | }; |
| | | |
| | | this.organAssessmentList = [...this.organAssessmentList, newOrgan]; |
| | | return true; |
| | | } |
| | | return false; |
| | | }, |
| | | |
| | | // è·åè¯ä¼°è¯¦æ
|
| | | async getAssessmentDetail() { |
| | | this.assessmentLoading = true; |
| | | try { |
| | | const response = await evaluateBaseInfolist({ infoid: this.infoid }); |
| | | |
| | | if (response.code === 200) { |
| | | this.handleResponseData(response); |
| | | } else { |
| | | this.$message.error("è·å详æ
失败ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | | } catch (error) { |
| | | console.error("è·åè¯ä¼°è¯¦æ
失败:", error); |
| | | this.$message.error("è·å详æ
失败"); |
| | | } finally { |
| | | this.assessmentLoading = false; |
| | | } |
| | | }, |
| | | |
| | | // å¤çæ¥å£ååºæ°æ® |
| | | handleResponseData(response) { |
| | | let detailData = null; |
| | | |
| | | if (response.data) { |
| | | if (Array.isArray(response.data)) { |
| | | detailData = response.data[0] || {}; |
| | | } else if (response.data.rows && Array.isArray(response.data.rows)) { |
| | | detailData = response.data.rows[0] || {}; |
| | | } else if (Array.isArray(response.data.list)) { |
| | | detailData = response.data.list[0] || {}; |
| | | } else { |
| | | detailData = response.data; |
| | | } |
| | | } else { |
| | | detailData = response; |
| | | } |
| | | |
| | | this.assessmentData = { |
| | | id: detailData.id || this.assessmentId, |
| | | infoid: detailData.infoid || this.infoid, |
| | | caseNo: detailData.caseNo || "", |
| | | name: detailData.name || detailData.donorName || "", |
| | | sex: detailData.sex || "", |
| | | age: detailData.age || "", |
| | | bloodtype: detailData.bloodtype || "", |
| | | idcardno: detailData.idcardno || "", |
| | | diagnosisname: detailData.diagnosisname || "", |
| | | treatmenthospitalname: detailData.treatmenthospitalname || "", |
| | | coordinatorName: detailData.coordinatorName || "", |
| | | assessTime: detailData.assessTime || "", |
| | | assessState: detailData.assessState || "1", |
| | | assessannex: detailData.assessannex || "" |
| | | }; |
| | | return statusMap[status] || "info"; |
| | | |
| | | if (detailData.organdecision) { |
| | | const decisionArray = Array.isArray(detailData.organdecision) |
| | | ? detailData.organdecision |
| | | : (detailData.organdecision || "").split(",").filter(item => item); |
| | | |
| | | this.organdecisionValues = decisionArray; |
| | | this.prevOrgandecisionValues = [...decisionArray]; |
| | | this.organdecisionOther = detailData.organdecisionOther || ""; |
| | | } |
| | | |
| | | this.processOrganAssessmentData(detailData); |
| | | }, |
| | | statusTextFilter(status) { |
| | | |
| | | // å¤çå¨å®è¯ä¼°æ°æ® |
| | | processOrganAssessmentData(detailData) { |
| | | let organList = []; |
| | | |
| | | if (detailData.serviceMedicalevaluationorganList) { |
| | | if (Array.isArray(detailData.serviceMedicalevaluationorganList)) { |
| | | organList = detailData.serviceMedicalevaluationorganList; |
| | | } |
| | | } |
| | | |
| | | this.organAssessmentList = organList.map(organ => { |
| | | const organno = organ.organno; |
| | | |
| | | // 妿 assesscontent æ¯å符串ï¼ç¡®ä¿å®æ¯ææç JSON |
| | | if (organ.assesscontent && typeof organ.assesscontent === "string") { |
| | | try { |
| | | JSON.parse(organ.assesscontent); |
| | | } catch (error) { |
| | | console.warn( |
| | | "æ æç assesscontentï¼é置为空æ°ç»:", |
| | | organ.assesscontent |
| | | ); |
| | | organ.assesscontent = "[]"; |
| | | } |
| | | } else if (!organ.assesscontent) { |
| | | organ.assesscontent = "[]"; |
| | | } |
| | | |
| | | const assessments = this.getOrganAssessments(organ); |
| | | const activeTab = this.activeTabMap.has(organno) |
| | | ? this.activeTabMap.get(organno) |
| | | : assessments.length > 0 |
| | | ? 0 |
| | | : "summary"; |
| | | |
| | | return { |
| | | ...organ, |
| | | organname: this.getOrganLabel(organ.organno) || organ.organname, |
| | | activeTab: activeTab, |
| | | expanded: false, |
| | | delFlag: organ.delFlag || "0" |
| | | }; |
| | | }); |
| | | }, |
| | | |
| | | // è·åé»è®¤è¯ä¼°æ°æ®ç»æ |
| | | getDefaultAssessment(index) { |
| | | return { |
| | | index: index, |
| | | status: "pending", |
| | | assessmentTime: "", |
| | | assessor: "", |
| | | functionStatus: "", |
| | | assessmentOpinion: "", |
| | | clinicalData: {}, |
| | | labResults: {}, |
| | | createTime: new Date().toISOString(), |
| | | delFlag: "0" |
| | | }; |
| | | }, |
| | | |
| | | // è®¡ç®æå¤§è¯ä¼°æ¬¡æ° |
| | | getMaxAssessmentCount() { |
| | | const maxCount = Math.max( |
| | | ...this.organAssessmentList |
| | | .filter(organ => organ.delFlag !== "1") |
| | | .map(organ => this.getAssessmentCount(organ)) |
| | | ); |
| | | return Math.max(maxCount, 1); |
| | | }, |
| | | |
| | | // è·åå¨å®æ´ä½ç¶æ |
| | | getOrganOverallStatus(organ) { |
| | | const assessments = this.getOrganAssessments(organ); |
| | | if (assessments.length === 0) { |
| | | return "pending"; |
| | | } |
| | | |
| | | const validAssessments = assessments.filter(a => a.delFlag !== "1"); |
| | | if (validAssessments.length === 0) { |
| | | return "pending"; |
| | | } |
| | | |
| | | const allAssessed = validAssessments.every( |
| | | assessment => assessment.status === "assessed" |
| | | ); |
| | | const someAssessed = validAssessments.some( |
| | | assessment => assessment.status === "assessed" |
| | | ); |
| | | |
| | | if (allAssessed) return "completed"; |
| | | if (someAssessed) return "assessing"; |
| | | return "pending"; |
| | | }, |
| | | |
| | | getOrganOverallStatusText(organ) { |
| | | const status = this.getOrganOverallStatus(organ); |
| | | const statusMap = { |
| | | "0": "å¾
è¯ä¼°", |
| | | "1": "è¯ä¼°ä¸", |
| | | "2": "已宿", |
| | | "3": "å·²å
³é" |
| | | pending: "å¾
è¯ä¼°", |
| | | assessing: "è¯ä¼°ä¸", |
| | | completed: "已宿" |
| | | }; |
| | | return statusMap[status] || "æªç¥"; |
| | | }, |
| | | // è·ååè½ç¶æç±»å |
| | | getFunctionStatusType(status) { |
| | | |
| | | // 忢å±å¼è¡ |
| | | handleToggleExpand(row) { |
| | | const key = row.organno; |
| | | const index = this.expandedRowKeys.indexOf(key); |
| | | |
| | | if (index > -1) { |
| | | this.expandedRowKeys.splice(index, 1); |
| | | row.expanded = false; |
| | | } else { |
| | | this.expandedRowKeys = [key]; |
| | | this.organAssessmentList.forEach(item => { |
| | | item.expanded = item.organno === key; |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // å±å¼è¡åå |
| | | handleExpandChange(row, expandedRows) { |
| | | this.expandedRowKeys = expandedRows.map(item => item.organno); |
| | | this.organAssessmentList.forEach(item => { |
| | | item.expanded = this.expandedRowKeys.includes(item.organno); |
| | | }); |
| | | }, |
| | | |
| | | // æ·»å æ°è¯ä¼° |
| | | handleAddNewAssessment(organ) { |
| | | const assessments = this.getOrganAssessments(organ); |
| | | const newAssessment = { |
| | | ...this.getDefaultAssessment(assessments.length), |
| | | assessor: this.currentUser.name |
| | | }; |
| | | |
| | | const newAssessments = [...assessments, newAssessment]; |
| | | this.$set(organ, "assesscontent", JSON.stringify(newAssessments)); |
| | | |
| | | organ.activeTab = assessments.length; |
| | | this.activeTabMap.set(organ.organno, assessments.length); |
| | | |
| | | this.$message.success("å·²æ·»å æ°çè¯ä¼°"); |
| | | }, |
| | | |
| | | // å¤çå é¤è¯ä¼°äºä»¶ |
| | | handleDeleteAssessment(data) { |
| | | const { organData, assessmentIndex } = data; |
| | | this.deleteOrganAssessment(organData, assessmentIndex); |
| | | }, |
| | | // å¤çè¯ä¼°ä¿å |
| | | handleSaveAssessment(data) { |
| | | const { organData, assessmentData, assessmentIndex } = data; |
| | | const assessments = this.getOrganAssessments(organData); |
| | | |
| | | console.log("ä¿åè¯ä¼°æ°æ®:", data); |
| | | |
| | | if (assessments[assessmentIndex]) { |
| | | // å建æ°çè¯ä¼°æ°ç» |
| | | const newAssessments = [...assessments]; |
| | | newAssessments[assessmentIndex] = { |
| | | ...assessments[assessmentIndex], |
| | | ...assessmentData, |
| | | status: "assessed", // æ 记为已è¯ä¼° |
| | | assessmentTime: new Date().toISOString(), // 设置è¯ä¼°æ¶é´ |
| | | delFlag: "0" // ç¡®ä¿å 餿 å¿ |
| | | }; |
| | | |
| | | // æ´æ° assesscontent |
| | | this.$set(organData, "assesscontent", JSON.stringify(newAssessments)); |
| | | |
| | | // 强å¶éæ°æ¸²æ |
| | | this.$forceUpdate(); |
| | | |
| | | this.$message.success("è¯ä¼°ä¿åæå"); |
| | | |
| | | // æ£æ¥æ¯å¦éè¦èªå¨åæ¢å°ä¸ä¸ä¸ªè¯ä¼° |
| | | this.checkAndSwitchTab(organData, assessmentIndex); |
| | | } |
| | | }, |
| | | |
| | | // æ£æ¥å¹¶èªå¨åæ¢tab |
| | | checkAndSwitchTab(organData, currentIndex) { |
| | | const assessments = this.getOrganAssessments(organData); |
| | | if (currentIndex < assessments.length - 1) { |
| | | // å¦æè¿æä¸ä¸ä¸ªè¯ä¼°ï¼èªå¨åæ¢å°ä¸ä¸ä¸ª |
| | | organData.activeTab = currentIndex + 1; |
| | | this.activeTabMap.set(organData.organno, currentIndex + 1); |
| | | } else { |
| | | // å¦ææ²¡æä¸ä¸ä¸ªè¯ä¼°ï¼åæ¢å°æ±æ»é¡µ |
| | | organData.activeTab = "summary"; |
| | | this.activeTabMap.set(organData.organno, "summary"); |
| | | } |
| | | }, |
| | | |
| | | // å é¤å¨å®è¯ä¼° |
| | | async deleteOrganAssessment(organ, assessmentIndex) { |
| | | try { |
| | | await this.$confirm( |
| | | `确认å é¤ç¬¬${assessmentIndex + 1}次è¯ä¼°è®°å½åï¼`, |
| | | "确认å é¤", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | } |
| | | ); |
| | | |
| | | const assessments = this.getOrganAssessments(organ); |
| | | if (assessments[assessmentIndex]) { |
| | | // æ 记为å é¤ |
| | | assessments[assessmentIndex].delFlag = "1"; |
| | | |
| | | // è¿æ»¤æå·²å é¤çè¯ä¼° |
| | | const newAssessments = assessments.filter( |
| | | item => item.delFlag !== "1" |
| | | ); |
| | | |
| | | // éæ°è®¡ç®è¯ä¼°ç´¢å¼ |
| | | newAssessments.forEach((assessment, index) => { |
| | | assessment.index = index; |
| | | }); |
| | | |
| | | // æ´æ° assesscontent |
| | | this.$set(organ, "assesscontent", JSON.stringify(newAssessments)); |
| | | |
| | | // å¤çtab忢 |
| | | if (newAssessments.length === 0) { |
| | | organ.activeTab = "summary"; |
| | | this.activeTabMap.set(organ.organno, "summary"); |
| | | } else if (organ.activeTab === assessmentIndex) { |
| | | const newIndex = Math.max(0, assessmentIndex - 1); |
| | | organ.activeTab = newIndex; |
| | | this.activeTabMap.set(organ.organno, newIndex); |
| | | } else if (organ.activeTab === "summary") { |
| | | this.activeTabMap.set(organ.organno, "summary"); |
| | | } |
| | | |
| | | this.$message.success("è¯ä¼°è®°å½å·²å é¤"); |
| | | this.$forceUpdate(); |
| | | } |
| | | } catch (cancelError) { |
| | | this.$message.info("已忶å é¤"); |
| | | } |
| | | }, |
| | | |
| | | // è·åææ°è¯ä¼°æ¶é´ |
| | | getLatestAssessmentTime(organ) { |
| | | const assessments = this.getOrganAssessments(organ); |
| | | if (assessments.length === 0) return null; |
| | | |
| | | const assessed = assessments.filter( |
| | | a => a.assessmentTime && a.delFlag !== "1" |
| | | ); |
| | | if (assessed.length === 0) return null; |
| | | |
| | | return assessed.sort( |
| | | (a, b) => new Date(b.assessmentTime) - new Date(a.assessmentTime) |
| | | )[0].assessmentTime; |
| | | }, |
| | | |
| | | // è·åè¯ä¼°ç¶ææ ç¾ç±»å |
| | | getAssessmentTagType(status) { |
| | | const typeMap = { |
| | | "1": "success", // æ£å¸¸ |
| | | "2": "warning", // 轻度å¼å¸¸ |
| | | "3": "danger", // é度å¼å¸¸ |
| | | "4": "info" // æ æ³è¯ä¼° |
| | | pending: "warning", |
| | | assessing: "primary", |
| | | assessed: "success" |
| | | }; |
| | | return typeMap[status] || "info"; |
| | | }, |
| | | // è·ååè½ç¶æææ¬ |
| | | getFunctionStatusText(status) { |
| | | |
| | | // è·åè¯ä¼°ç¶æææ¬ |
| | | getAssessmentStatusText(status) { |
| | | const textMap = { |
| | | "1": "æ£å¸¸", |
| | | "2": "轻度å¼å¸¸", |
| | | "3": "é度å¼å¸¸", |
| | | "4": "æ æ³è¯ä¼°" |
| | | pending: "å¾
è¯ä¼°", |
| | | assessing: "è¯ä¼°ä¸", |
| | | assessed: "å·²è¯ä¼°" |
| | | }; |
| | | return textMap[status] || "æªç¥"; |
| | | }, |
| | | // æ£æ¥æ¯å¦ææéè¯ä¼°è¯¥å¨å® |
| | | |
| | | // æ£æ¥è¯ä¼°æé |
| | | canAssessOrgan(organ) { |
| | | if (this.isCoordinator) return true; |
| | | return organ.department === this.currentDepartment; |
| | | if (!this.isEdit) return false; |
| | | return ( |
| | | organ.gainhospitalname && |
| | | organ.gainhospitalname.includes(this.currentDepartment) |
| | | ); |
| | | }, |
| | | |
| | | // è·åè¡ç±»å |
| | | getRowClassName({ row }) { |
| | | return this.canAssessOrgan(row) ? "assessable-row" : "non-assessable-row"; |
| | | }, |
| | | // è·åå¨å®æ é¢ |
| | | getOrganTitle(organ) { |
| | | const organName = |
| | | this.organTypeOptions.find(opt => opt.value === organ.organType) |
| | | ?.label || organ.organType; |
| | | return `${organName}è¯ä¼°è¯¦æ
ï¼${organ.department}ï¼`; |
| | | |
| | | // ç¶æè¿æ»¤å¨ |
| | | statusFilter(status) { |
| | | const statusMap = { |
| | | "1": "warning", |
| | | "2": "primary", |
| | | "3": "success" |
| | | }; |
| | | return statusMap[status] || "info"; |
| | | }, |
| | | // å¨å®è¯ä¼° |
| | | handleOrganAssess(organ) { |
| | | this.activeOrgans = [organ.organType]; |
| | | |
| | | statusTextFilter(status) { |
| | | const statusMap = { |
| | | "1": "å¾
è¯ä¼°", |
| | | "2": "è¯ä¼°ä¸", |
| | | "3": "已宿" |
| | | }; |
| | | return statusMap[status] || "æªç¥"; |
| | | }, |
| | | // æ¥çå¨å®è¯¦æ
|
| | | handleViewOrganDetail(organ) { |
| | | this.activeOrgans = [organ.organType]; |
| | | }, |
| | | // ä¿åå¨å®è¯ä¼° - 使ç¨Mock API |
| | | handleSaveOrganAssessment(organData) { |
| | | updateOrganAssessment(organData) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("è¯ä¼°ä¿åæå"); |
| | | // å·æ°æ°æ® |
| | | this.getAssessmentDetail(); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("ä¿åè¯ä¼°å¤±è´¥:", error); |
| | | this.$message.error("ä¿å失败"); |
| | | }); |
| | | }, |
| | | // æ¥çéä»¶é¢è§ |
| | | |
| | | // æ¥çéä»¶ |
| | | handleAttachmentPreview() { |
| | | this.attachmentVisible = true; |
| | | if (this.assessmentData.assessannex) { |
| | | try { |
| | | const annexData = |
| | | typeof this.assessmentData.assessannex === "string" |
| | | ? JSON.parse(this.assessmentData.assessannex) |
| | | : this.assessmentData.assessannex; |
| | | |
| | | if (Array.isArray(annexData) && annexData.length > 0) { |
| | | this.currentPreviewFile = annexData[0]; |
| | | this.attachmentVisible = true; |
| | | } else { |
| | | this.$message.info("ææ éä»¶å¯é¢è§"); |
| | | } |
| | | } catch (error) { |
| | | this.$message.info("éä»¶æ°æ®æ ¼å¼é误"); |
| | | } |
| | | } else { |
| | | this.$message.info("ææ éä»¶"); |
| | | } |
| | | }, |
| | | // 宿è¯ä¼° - 使ç¨Mock API |
| | | handleCompleteAssessment() { |
| | | this.$confirm("ç¡®è®¤å®æææå¨å®è¯ä¼°åï¼å®æåå°æ æ³ä¿®æ¹", "确认æä½", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | completeAssessment(this.assessmentId) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("è¯ä¼°å®æç¡®è®¤æå"); |
| | | this.getAssessmentDetail(); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | console.error("宿è¯ä¼°å¤±è´¥:", error); |
| | | this.$message.error("æä½å¤±è´¥"); |
| | | }); |
| | | }); |
| | | |
| | | // 宿è¯ä¼° |
| | | async handleCompleteAssessment() { |
| | | try { |
| | | await this.$confirm( |
| | | "ç¡®è®¤å®æææå¨å®è¯ä¼°åï¼å®æåå°æ æ³ä¿®æ¹", |
| | | "确认æä½", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | } |
| | | ); |
| | | |
| | | const updateData = { |
| | | ...this.assessmentData, |
| | | assessState: "3", |
| | | assessTime: new Date().toISOString() |
| | | }; |
| | | |
| | | const response = await assessedit(updateData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("è¯ä¼°å®æç¡®è®¤æå"); |
| | | this.assessmentData.assessState = "3"; |
| | | this.isEdit = false; |
| | | } else { |
| | | this.$message.error("æä½å¤±è´¥ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | | } catch (error) { |
| | | if (error !== "cancel") { |
| | | console.error("宿è¯ä¼°å¤±è´¥:", error); |
| | | this.$message.error("æä½å¤±è´¥"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .organ-detail-collapse { |
| | | /* å±å¼è¡æ ·å¼ */ |
| | | .organ-expand-content { |
| | | padding: 20px; |
| | | background: #fafafa; |
| | | border-radius: 4px; |
| | | margin: 10px 0; |
| | | } |
| | | |
| | | .organ-detail-tabs { |
| | | background: white; |
| | | border-radius: 4px; |
| | | padding: 20px; |
| | | } |
| | | |
| | | .add-assessment-prompt { |
| | | text-align: center; |
| | | padding: 40px 0; |
| | | } |
| | | |
| | | .assessment-summary { |
| | | padding: 10px; |
| | | } |
| | | |
| | | /* åºé¨ä¿åæé®æ ·å¼ */ |
| | | .footer-actions { |
| | | margin-top: 20px; |
| | | text-align: center; |
| | | padding: 20px; |
| | | border-top: 1px solid #eaeaea; |
| | | } |
| | | |
| | | /* ååºå¼è®¾è®¡ */ |
| | | @media (max-width: 768px) { |
| | | .assessment-detail { |
| | | padding: 10px; |
| | | } |
| | | |
| | | .organ-expand-content { |
| | | padding: 10px; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .assessable-row { |
| | |
| | | background-color: #fafafa; |
| | | } |
| | | |
| | | .jstitle { |
| | | float: right; |
| | | font-size: 18px !important; |
| | | font-weight: 600; |
| | | color: #2645f7; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | /* è¡¨æ ¼å±å¼å¾æ æ ·å¼ */ |
| | | ::v-deep .el-table__expand-icon { |
| | | cursor: pointer; |
| | | } |
| | | |
| | | ::v-deep .el-table__expanded-cell { |
| | | padding: 0 !important; |
| | | } |
| | | |
| | | /* ç¡®ä¿æè¿°å表æ ç¾å®½åº¦ä¸è´ */ |
| | | ::v-deep .el-descriptions__label { |
| | | width: 120px; |
| | | background-color: #f5f7fa; |
| | |
| | | .fixed-width .el-button { |
| | | margin: 0 2px; |
| | | } |
| | | .jstitle { |
| | | float: right; |
| | | font-size: 18px !important; |
| | | /* æ±æ»é¡µé¢æ ·å¼ */ |
| | | .assessment-summary { |
| | | padding: 10px; |
| | | } |
| | | |
| | | .summary-item { |
| | | font-weight: 500; |
| | | color: #303133; |
| | | } |
| | | |
| | | .highlight-text { |
| | | color: #409EFF; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .assessment-detail-card { |
| | | border: 1px solid #e6ebf5; |
| | | } |
| | | |
| | | .organ-info-card { |
| | | border: 1px solid #e6ebf5; |
| | | background-color: #fafafa; |
| | | } |
| | | |
| | | .no-assessment { |
| | | text-align: center; |
| | | padding: 40px 0; |
| | | color: #909399; |
| | | } |
| | | |
| | | .assessment-item { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .assessment-item:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .assessment-card { |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 8px; |
| | | transition: all 0.3s; |
| | | } |
| | | |
| | | .assessment-card:hover { |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | border-color: #409EFF; |
| | | } |
| | | |
| | | .assessment-title { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | color: #2645f7; |
| | | color: #303133; |
| | | } |
| | | |
| | | .status-tag { |
| | | float: right; |
| | | margin-right: 0; |
| | | } |
| | | |
| | | .time-text { |
| | | color: #67C23A; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .opinion-content { |
| | | padding: 8px 12px; |
| | | background: #f5f7fa; |
| | | border-radius: 4px; |
| | | line-height: 1.5; |
| | | color: #606266; |
| | | white-space: pre-wrap; |
| | | word-break: break-word; |
| | | } |
| | | |
| | | .detail-descriptions { |
| | | background: #fff; |
| | | } |
| | | |
| | | /* ä¼åè¡¨æ ¼æ ·å¼ */ |
| | | ::v-deep .el-table { |
| | | color: #303133; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | ::v-deep .el-table th { |
| | | background-color: #f5f7fa; |
| | | color: #303133; |
| | | font-weight: 600; |
| | | padding: 12px 0; |
| | | } |
| | | |
| | | ::v-deep .el-table tr { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | ::v-deep .el-table tr:hover { |
| | | background-color: #f5f7fa; |
| | | } |
| | | |
| | | ::v-deep .el-table .cell { |
| | | padding: 12px 10px; |
| | | line-height: 1.5; |
| | | } |
| | | |
| | | ::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td { |
| | | background-color: #fafafa; |
| | | } |
| | | |
| | | ::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td { |
| | | background-color: #ecf5ff; |
| | | } |
| | | |
| | | /* å¯è¯ä¼°è¡æ ·å¼ */ |
| | | ::v-deep .assessable-row { |
| | | background-color: #f0f9ff !important; |
| | | } |
| | | |
| | | ::v-deep .assessable-row:hover { |
| | | background-color: #d9ecff !important; |
| | | } |
| | | |
| | | ::v-deep .non-assessable-row { |
| | | background-color: #fafafa !important; |
| | | } |
| | | |
| | | /* æè¿°åè¡¨æ ·å¼ä¼å */ |
| | | ::v-deep .el-descriptions__label { |
| | | width: 120px; |
| | | background-color: #f5f7fa; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | } |
| | | |
| | | ::v-deep .el-descriptions__content { |
| | | background-color: #fff; |
| | | color: #606266; |
| | | } |
| | | |
| | | ::v-deep .el-descriptions__body { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | /* å¡çæ ·å¼ä¼å */ |
| | | ::v-deep .el-card__header { |
| | | background-color: #f5f7fa; |
| | | border-bottom: 1px solid #e6ebf5; |
| | | padding: 12px 20px; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | } |
| | | |
| | | ::v-deep .el-card__body { |
| | | padding: 20px; |
| | | } |
| | | |
| | | /* æ ç¾æ ·å¼ä¼å */ |
| | | ::v-deep .el-tag { |
| | | font-weight: 500; |
| | | border-radius: 12px; |
| | | padding: 0 10px; |
| | | height: 24px; |
| | | line-height: 22px; |
| | | } |
| | | |
| | | /* æé®æ ·å¼ä¼å */ |
| | | ::v-deep .el-button--mini { |
| | | padding: 7px 12px; |
| | | font-size: 12px; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | /* Tabæ ·å¼ä¼å */ |
| | | ::v-deep .el-tabs__item { |
| | | font-weight: 500; |
| | | color: #606266; |
| | | } |
| | | |
| | | ::v-deep .el-tabs__item.is-active { |
| | | color: #409EFF; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | ::v-deep .el-tabs__nav-wrap::after { |
| | | background-color: #e4e7ed; |
| | | } |
| | | |
| | | ::v-deep .el-tabs--card>.el-tabs__header .el-tabs__item.is-active { |
| | | background-color: #fff; |
| | | border-bottom-color: #fff; |
| | | } |
| | | |
| | | /* ååºå¼è®¾è®¡ */ |
| | | @media (max-width: 768px) { |
| | | .assessment-summary { |
| | | padding: 5px; |
| | | } |
| | | |
| | | ::v-deep .el-table .cell { |
| | | padding: 8px 5px; |
| | | } |
| | | |
| | | .assessment-card { |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | // 模ææç®è¿ç¨æ°æ® |
| | | const mockDonationProcessData = { |
| | | caseInfo: { |
| | | id: '202512001', |
| | | caseNo: 'C202512001', |
| | | hospitalNo: 'D202512001', |
| | | donorName: 'å¼ ä¸', |
| | | gender: '0', |
| | | id: "202512001", |
| | | caseNo: "C202512001", |
| | | hospitalNo: "D202512001", |
| | | donorName: "å¼ ä¸", |
| | | gender: "0", |
| | | age: 45, |
| | | bloodType: 'A', |
| | | diagnosis: 'èå¤ä¼¤', |
| | | status: 'in_progress', |
| | | createTime: '2025-12-01 08:00:00', |
| | | registrant: 'æåè°å', |
| | | currentStage: 'organ_allocation', |
| | | bloodType: "A", |
| | | diagnosis: "èå¤ä¼¤", |
| | | status: "in_progress", |
| | | createTime: "2025-12-01 08:00:00", |
| | | registrant: "æåè°å", |
| | | currentStage: "organ_allocation", |
| | | // æ°å¢åºæ¬ä¿¡æ¯ |
| | | height: 175, |
| | | weight: 70, |
| | | bloodPressure: '120/80', |
| | | contactPerson: 'å¼ ç¶', |
| | | contactPhone: '13800138000', |
| | | hospital: 'éå²å¤§å¦éå±å»é¢', |
| | | department: 'ç¥ç»å¤ç§', |
| | | attendingDoctor: 'ç主任' |
| | | bloodPressure: "120/80", |
| | | contactPerson: "å¼ ç¶", |
| | | contactPhone: "13800138000", |
| | | hospital: "éå²å¤§å¦éå±å»é¢", |
| | | department: "ç¥ç»å¤ç§", |
| | | attendingDoctor: "ç主任" |
| | | }, |
| | | processStages: [ |
| | | { |
| | | key: 'donor_maintenance', |
| | | name: 'ä¾è
ç»´æ¤', |
| | | status: 'completed', |
| | | completeTime: '2025-12-01 10:00:00', |
| | | updateTime: '2025-12-01 10:00:00', |
| | | operator: 'å¼ å»ç', |
| | | key: "donor_maintenance", |
| | | name: "ä¾è
ç»´æ¤", |
| | | status: "completed", |
| | | completeTime: "2025-12-01 10:00:00", |
| | | updateTime: "2025-12-01 10:00:00", |
| | | operator: "å¼ å»ç", |
| | | details: { |
| | | maintenanceRecords: 5, |
| | | lastCheckup: '2025-12-01 09:30:00', |
| | | lastCheckup: "2025-12-01 09:30:00", |
| | | vitalSigns: { |
| | | heartRate: 75, |
| | | bloodPressure: '118/76', |
| | | bloodPressure: "118/76", |
| | | temperature: 36.5, |
| | | oxygenSaturation: 98 |
| | | }, |
| | | medications: [ |
| | | { name: 'å¤å·´èº', dosage: '5μg/kg/min', time: '2025-12-01 08:00:00' }, |
| | | { name: 'çé²é', dosage: '125ml', time: '2025-12-01 09:00:00' } |
| | | { name: "å¤å·´èº", dosage: "5μg/kg/min", time: "2025-12-01 08:00:00" }, |
| | | { name: "çé²é", dosage: "125ml", time: "2025-12-01 09:00:00" } |
| | | ], |
| | | labResults: { |
| | | wbc: 8.5, |
| | |
| | | } |
| | | }, |
| | | { |
| | | key: 'medical_assessment', |
| | | name: 'å»å¦è¯ä¼°', |
| | | status: 'completed', |
| | | completeTime: '2025-12-02 14:30:00', |
| | | updateTime: '2025-12-02 14:30:00', |
| | | operator: 'æä¸»ä»»', |
| | | details: { |
| | | assessmentItems: [ |
| | | { name: 'ç¥ç»ç³»ç»è¯ä¼°', result: 'èæ»äº¡ç¡®è®¤', status: 'completed' }, |
| | | { name: 'å¿è¡ç®¡ç³»ç»è¯ä¼°', result: 'åè½æ£å¸¸', status: 'completed' }, |
| | | { name: 'å¼å¸ç³»ç»è¯ä¼°', result: 'å¼å¸æºç»´æ', status: 'completed' }, |
| | | { name: 'èè¾åè½è¯ä¼°', result: 'åè½è¯å¥½', status: 'completed' }, |
| | | { name: 'æææ§ç¾ç
çæ¥', result: 'é´æ§', status: 'completed' } |
| | | ], |
| | | imagingResults: { |
| | | ctBrain: 'èæ°´è¿ï¼èå¹²åå°æ¶å¤±', |
| | | chestXRay: 'åèºæ¸
æ°', |
| | | abdominalUS: 'èèè°è¾æªè§å¼å¸¸' |
| | | }, |
| | | conclusion: '符åå¨å®æç®å»å¦æ å', |
| | | contraindications: 'æ ç»å¯¹ç¦å¿ç' |
| | | } |
| | | }, |
| | | { |
| | | key: 'death_judgment', |
| | | name: 'æ»äº¡å¤å®', |
| | | status: 'completed', |
| | | completeTime: '2025-12-03 09:15:00', |
| | | updateTime: '2025-12-03 09:15:00', |
| | | operator: 'çå»ç', |
| | | details: { |
| | | judgmentType: 'èæ»äº¡å¤å®', |
| | | judgmentTime: '2025-12-03 09:00:00', |
| | | doctors: ['å¼ ä¸»ä»»', 'çå»ç'], |
| | | testResults: [ |
| | | { test: 'èªä¸»å¼å¸æµè¯', result: 'æ èªä¸»å¼å¸', time: '2025-12-03 08:30:00' }, |
| | | { test: 'ç³å对å
åå°', result: 'åå°æ¶å¤±', time: '2025-12-03 08:45:00' }, |
| | | { test: 'èå¹²å¬è§è¯±åçµä½', result: 'èå¹²åè½ä¸§å¤±', time: '2025-12-03 09:00:00' } |
| | | ], |
| | | certificateNo: 'SW20251203001', |
| | | legalDocuments: ['æ»äº¡è¯æä¹¦', 'èæ»äº¡å¤å®ä¹¦'] |
| | | } |
| | | }, |
| | | { |
| | | key: 'donation_confirm', |
| | | name: 'æç®ç¡®è®¤', |
| | | status: 'completed', |
| | | completeTime: '2025-12-03 11:00:00', |
| | | updateTime: '2025-12-03 11:00:00', |
| | | operator: 'èµµåè°å', |
| | | key: "donation_confirm", |
| | | name: "æç®ææ¿", |
| | | status: "completed", |
| | | completeTime: "2025-12-03 11:00:00", |
| | | updateTime: "2025-12-03 11:00:00", |
| | | operator: "èµµåè°å", |
| | | details: { |
| | | familyConsent: { |
| | | mainRelative: 'å¼ ç¶', |
| | | relationship: 'ç¶å', |
| | | consentTime: '2025-12-03 10:45:00', |
| | | consentForm: 'å·²ç¾ç½²', |
| | | witness: 'ææ¤å£«' |
| | | mainRelative: "å¼ ç¶", |
| | | relationship: "ç¶å", |
| | | consentTime: "2025-12-03 10:45:00", |
| | | consentForm: "å·²ç¾ç½²", |
| | | witness: "ææ¤å£«" |
| | | }, |
| | | donationType: 'å¤å¨å®æç®', |
| | | organs: ['èè', 'è¾è', 'å¿è', 'è§è'], |
| | | legalDocuments: [ |
| | | 'å¨å®æç®åæä¹¦', |
| | | 'å®¶å±å
³ç³»è¯æ', |
| | | 'å»çå
责声æ' |
| | | ], |
| | | coordinator: 'èµµåè°å', |
| | | confirmationTime: '2025-12-03 11:00:00' |
| | | donationType: "å¤å¨å®æç®", |
| | | organs: ["èè", "è¾è", "å¿è", "è§è"], |
| | | legalDocuments: ["å¨å®æç®åæä¹¦", "å®¶å±å
³ç³»è¯æ", "å»çå
责声æ"], |
| | | coordinator: "èµµåè°å", |
| | | confirmationTime: "2025-12-03 11:00:00" |
| | | } |
| | | }, |
| | | { |
| | | key: 'ethical_review', |
| | | name: '伦ç审æ¥', |
| | | status: 'in_progress', |
| | | completeTime: '2025-12-03 15:20:00', |
| | | updateTime: '2025-12-03 15:20:00', |
| | | operator: '伦çå§åä¼', |
| | | key: "medical_assessment", |
| | | name: "å»å¦è¯ä¼°", |
| | | status: "completed", |
| | | completeTime: "2025-12-02 14:30:00", |
| | | updateTime: "2025-12-02 14:30:00", |
| | | operator: "æä¸»ä»»", |
| | | details: { |
| | | committee: 'å»é¢ä¼¦ç审æ¥å§åä¼', |
| | | meetingTime: '2025-12-03 14:00:00', |
| | | members: ['å¼ ææ', 'æä¸»ä»»', 'çå»ç', 'èµµå§å', 'é±ä¸å®¶'], |
| | | assessmentItems: [ |
| | | { name: "ç¥ç»ç³»ç»è¯ä¼°", result: "èæ»äº¡ç¡®è®¤", status: "completed" }, |
| | | { name: "å¿è¡ç®¡ç³»ç»è¯ä¼°", result: "åè½æ£å¸¸", status: "completed" }, |
| | | { name: "å¼å¸ç³»ç»è¯ä¼°", result: "å¼å¸æºç»´æ", status: "completed" }, |
| | | { name: "èè¾åè½è¯ä¼°", result: "åè½è¯å¥½", status: "completed" }, |
| | | { name: "æææ§ç¾ç
çæ¥", result: "é´æ§", status: "completed" } |
| | | ], |
| | | imagingResults: { |
| | | ctBrain: "èæ°´è¿ï¼èå¹²åå°æ¶å¤±", |
| | | chestXRay: "åèºæ¸
æ°", |
| | | abdominalUS: "èèè°è¾æªè§å¼å¸¸" |
| | | }, |
| | | conclusion: "符åå¨å®æç®å»å¦æ å", |
| | | contraindications: "æ ç»å¯¹ç¦å¿ç" |
| | | } |
| | | }, |
| | | |
| | | { |
| | | key: "death_judgment", |
| | | name: "æ»äº¡å¤å®", |
| | | status: "completed", |
| | | completeTime: "2025-12-03 09:15:00", |
| | | updateTime: "2025-12-03 09:15:00", |
| | | operator: "çå»ç", |
| | | details: { |
| | | judgmentType: "èæ»äº¡å¤å®", |
| | | judgmentTime: "2025-12-03 09:00:00", |
| | | doctors: ["å¼ ä¸»ä»»", "çå»ç"], |
| | | testResults: [ |
| | | { |
| | | test: "èªä¸»å¼å¸æµè¯", |
| | | result: "æ èªä¸»å¼å¸", |
| | | time: "2025-12-03 08:30:00" |
| | | }, |
| | | { |
| | | test: "ç³å对å
åå°", |
| | | result: "åå°æ¶å¤±", |
| | | time: "2025-12-03 08:45:00" |
| | | }, |
| | | { |
| | | test: "èå¹²å¬è§è¯±åçµä½", |
| | | result: "èå¹²åè½ä¸§å¤±", |
| | | time: "2025-12-03 09:00:00" |
| | | } |
| | | ], |
| | | certificateNo: "SW20251203001", |
| | | legalDocuments: ["æ»äº¡è¯æä¹¦", "èæ»äº¡å¤å®ä¹¦"] |
| | | } |
| | | }, |
| | | { |
| | | key: "ethical_review", |
| | | name: "伦ç审æ¥", |
| | | status: "in_progress", |
| | | completeTime: "2025-12-03 15:20:00", |
| | | updateTime: "2025-12-03 15:20:00", |
| | | operator: "伦çå§åä¼", |
| | | details: { |
| | | committee: "å»é¢ä¼¦ç审æ¥å§åä¼", |
| | | meetingTime: "2025-12-03 14:00:00", |
| | | members: ["å¼ ææ", "æä¸»ä»»", "çå»ç", "èµµå§å", "é±ä¸å®¶"], |
| | | reviewItems: [ |
| | | { item: 'æç®ææ¿ç宿§', result: '确认çå®', vote: 'å
¨ç¥¨éè¿' }, |
| | | { item: 'å»å¦è¯ä¼°åç¡®æ§', result: '确认åç¡®', vote: 'å
¨ç¥¨éè¿' }, |
| | | { item: 'æ³å¾æä»¶å®æ´æ§', result: 'ç¡®è®¤å®æ´', vote: 'å
¨ç¥¨éè¿' } |
| | | { item: "æç®ææ¿ç宿§", result: "确认çå®", vote: "å
¨ç¥¨éè¿" }, |
| | | { item: "å»å¦è¯ä¼°åç¡®æ§", result: "确认åç¡®", vote: "å
¨ç¥¨éè¿" }, |
| | | { item: "æ³å¾æä»¶å®æ´æ§", result: "ç¡®è®¤å®æ´", vote: "å
¨ç¥¨éè¿" } |
| | | ], |
| | | conclusion: '符å伦çè¦æ±ï¼åæè¿è¡å¨å®æç®', |
| | | resolutionNo: 'LL20251203001' |
| | | conclusion: "符å伦çè¦æ±ï¼åæè¿è¡å¨å®æç®", |
| | | resolutionNo: "LL20251203001" |
| | | } |
| | | }, |
| | | { |
| | | key: 'organ_allocation', |
| | | name: 'å¨å®åé
', |
| | | status: 'pending', |
| | | updateTime: '2025-12-04 10:00:00', |
| | | operator: 'åé
ç³»ç»', |
| | | key: "organ_allocation", |
| | | name: "å¨å®åé
", |
| | | status: "pending", |
| | | updateTime: "2025-12-04 10:00:00", |
| | | operator: "åé
ç³»ç»", |
| | | details: { |
| | | allocationStartTime: '2025-12-04 09:00:00', |
| | | allocationSystem: 'ä¸å½äººä½å¨å®åé
ä¸å
±äº«è®¡ç®æºç³»ç»', |
| | | allocationStartTime: "2025-12-04 09:00:00", |
| | | allocationSystem: "ä¸å½äººä½å¨å®åé
ä¸å
±äº«è®¡ç®æºç³»ç»", |
| | | organs: [ |
| | | { |
| | | organ: 'èè', |
| | | status: 'åé
ä¸', |
| | | organ: "èè", |
| | | status: "åé
ä¸", |
| | | matchScore: 95, |
| | | recommendedRecipient: 'çå
ç', |
| | | recommendedRecipient: "çå
ç", |
| | | recipientAge: 45, |
| | | recipientBloodType: 'A', |
| | | hospital: 'éå²å¤§å¦éå±å»é¢', |
| | | urgency: 'ç´§æ¥' |
| | | recipientBloodType: "A", |
| | | hospital: "éå²å¤§å¦éå±å»é¢", |
| | | urgency: "ç´§æ¥" |
| | | }, |
| | | { |
| | | organ: 'è¾è', |
| | | status: 'å¹é
宿', |
| | | organ: "è¾è", |
| | | status: "å¹é
宿", |
| | | matchScore: 92, |
| | | recommendedRecipient: 'æå¥³å£«', |
| | | recommendedRecipient: "æå¥³å£«", |
| | | recipientAge: 38, |
| | | recipientBloodType: 'A', |
| | | hospital: 'éå²å¸å¸ç«å»é¢', |
| | | urgency: 'é«' |
| | | recipientBloodType: "A", |
| | | hospital: "éå²å¸å¸ç«å»é¢", |
| | | urgency: "é«" |
| | | }, |
| | | { |
| | | organ: 'å¿è', |
| | | status: 'å¾
åé
', |
| | | organ: "å¿è", |
| | | status: "å¾
åé
", |
| | | matchScore: 88, |
| | | recommendedRecipient: 'éå
ç', |
| | | recommendedRecipient: "éå
ç", |
| | | recipientAge: 52, |
| | | recipientBloodType: 'O', |
| | | hospital: 'å±±ä¸å¤§å¦é½é²å»é¢', |
| | | urgency: 'ç´§æ¥' |
| | | recipientBloodType: "O", |
| | | hospital: "å±±ä¸å¤§å¦é½é²å»é¢", |
| | | urgency: "ç´§æ¥" |
| | | } |
| | | ], |
| | | allocationFactors: [ |
| | | { factor: 'ç
æ
å±éç¨åº¦', weight: 35 }, |
| | | { factor: 'ç»ç»é
åå¹é
', weight: 25 }, |
| | | { factor: 'çå¾
æ¶é´', weight: 15 }, |
| | | { factor: 'å°çå ç´ ', weight: 10 }, |
| | | { factor: 'å¹´é¾å ç´ ', weight: 15 } |
| | | { factor: "ç
æ
å±éç¨åº¦", weight: 35 }, |
| | | { factor: "ç»ç»é
åå¹é
", weight: 25 }, |
| | | { factor: "çå¾
æ¶é´", weight: 15 }, |
| | | { factor: "å°çå ç´ ", weight: 10 }, |
| | | { factor: "å¹´é¾å ç´ ", weight: 15 } |
| | | ] |
| | | } |
| | | }, |
| | | { |
| | | key: 'organ_procurement', |
| | | name: 'å¨å®è·å', |
| | | status: 'pending', |
| | | updateTime: '2025-12-03 16:00:00', |
| | | operator: 'å¾
åé
', |
| | | key: "organ_procurement", |
| | | name: "å¨å®è·å", |
| | | status: "pending", |
| | | updateTime: "2025-12-03 16:00:00", |
| | | operator: "å¾
åé
", |
| | | details: { |
| | | scheduledTime: '2025-12-04 14:00:00', |
| | | operationRoom: 'ææ¯å®¤ä¸å·', |
| | | scheduledTime: "2025-12-04 14:00:00", |
| | | operationRoom: "ææ¯å®¤ä¸å·", |
| | | surgicalTeam: { |
| | | surgeon: 'å¾
åé
', |
| | | assistant: 'å¾
åé
', |
| | | anesthesiologist: 'å¾
åé
', |
| | | nurse: 'å¾
åé
' |
| | | surgeon: "å¾
åé
", |
| | | assistant: "å¾
åé
", |
| | | anesthesiologist: "å¾
åé
", |
| | | nurse: "å¾
åé
" |
| | | }, |
| | | preservationPlan: { |
| | | method: '使¸©æºæ¢°ç注', |
| | | solution: 'UWä¿åæ¶²', |
| | | temperature: '4°C' |
| | | method: "使¸©æºæ¢°ç注", |
| | | solution: "UWä¿åæ¶²", |
| | | temperature: "4°C" |
| | | }, |
| | | organs: [ |
| | | { |
| | | organ: 'èè', |
| | | organ: "èè", |
| | | planned: true, |
| | | preservation: 'å¾
åå¤', |
| | | estimatedTime: '4å°æ¶' |
| | | preservation: "å¾
åå¤", |
| | | estimatedTime: "4å°æ¶" |
| | | }, |
| | | { |
| | | organ: 'è¾è', |
| | | organ: "è¾è", |
| | | planned: true, |
| | | preservation: 'å¾
åå¤', |
| | | estimatedTime: '3å°æ¶' |
| | | preservation: "å¾
åå¤", |
| | | estimatedTime: "3å°æ¶" |
| | | }, |
| | | { |
| | | organ: 'å¿è', |
| | | organ: "å¿è", |
| | | planned: true, |
| | | preservation: 'å¾
åå¤', |
| | | estimatedTime: '5å°æ¶' |
| | | preservation: "å¾
åå¤", |
| | | estimatedTime: "5å°æ¶" |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | { |
| | | key: 'organ_utilization', |
| | | name: 'å¨å®å©ç¨', |
| | | status: 'pending', |
| | | updateTime: '2025-12-03 16:00:00', |
| | | operator: 'å¾
åé
', |
| | | key: "organ_utilization", |
| | | name: "å¨å®å©ç¨", |
| | | status: "pending", |
| | | updateTime: "2025-12-03 16:00:00", |
| | | operator: "å¾
åé
", |
| | | details: { |
| | | transplantCenters: [ |
| | | { |
| | | hospital: 'éå²å¤§å¦éå±å»é¢', |
| | | organ: 'èè', |
| | | recipient: 'çå
ç', |
| | | scheduledTime: '2025-12-04 18:00:00', |
| | | surgicalTeam: 'å¾
确认' |
| | | hospital: "éå²å¤§å¦éå±å»é¢", |
| | | organ: "èè", |
| | | recipient: "çå
ç", |
| | | scheduledTime: "2025-12-04 18:00:00", |
| | | surgicalTeam: "å¾
确认" |
| | | }, |
| | | { |
| | | hospital: 'éå²å¸å¸ç«å»é¢', |
| | | organ: 'è¾è', |
| | | recipient: 'æå¥³å£«', |
| | | scheduledTime: '2025-12-04 19:00:00', |
| | | surgicalTeam: 'å¾
确认' |
| | | hospital: "éå²å¸å¸ç«å»é¢", |
| | | organ: "è¾è", |
| | | recipient: "æå¥³å£«", |
| | | scheduledTime: "2025-12-04 19:00:00", |
| | | surgicalTeam: "å¾
确认" |
| | | } |
| | | ], |
| | | followupPlan: { |
| | | frequency: 'æ¯å1个æã3个æã6个æã1å¹´', |
| | | items: ['èåè½æ£æ¥', 'å
ç«æå¶åæµåº¦', 'å½±å妿£æ¥'], |
| | | coordinator: 'å¾
åé
' |
| | | frequency: "æ¯å1个æã3个æã6个æã1å¹´", |
| | | items: ["èåè½æ£æ¥", "å
ç«æå¶åæµåº¦", "å½±å妿£æ¥"], |
| | | coordinator: "å¾
åé
" |
| | | }, |
| | | qualityMetrics: { |
| | | expectedSurvivalRate: 92, |
| | | complicationRisk: 'ä¸ç', |
| | | complicationRisk: "ä¸ç", |
| | | successRate: 95 |
| | | } |
| | | } |
| | |
| | | // æ°å¢æ¶é´çº¿äºä»¶ |
| | | timelineEvents: [ |
| | | { |
| | | time: '2025-12-01 08:00:00', |
| | | event: 'æ¡ä¾ç»è®°', |
| | | operator: 'æåè°å', |
| | | description: 'æç®æ¡ä¾æ£å¼ç»è®°å¯å¨' |
| | | time: "2025-12-01 08:00:00", |
| | | event: "æ¡ä¾ç»è®°", |
| | | operator: "æåè°å", |
| | | description: "æç®æ¡ä¾æ£å¼ç»è®°å¯å¨" |
| | | }, |
| | | { |
| | | time: '2025-12-01 10:00:00', |
| | | event: 'ä¾è
ç»´æ¤å®æ', |
| | | operator: 'å¼ å»ç', |
| | | description: '宿ä¾è
çå½ä½å¾ç»´æ¤åå»ç管ç' |
| | | time: "2025-12-01 10:00:00", |
| | | event: "ä¾è
ç»´æ¤å®æ", |
| | | operator: "å¼ å»ç", |
| | | description: "宿ä¾è
çå½ä½å¾ç»´æ¤åå»ç管ç" |
| | | }, |
| | | { |
| | | time: '2025-12-02 14:30:00', |
| | | event: 'å»å¦è¯ä¼°å®æ', |
| | | operator: 'æä¸»ä»»', |
| | | description: 'å
¨é¢å»å¦è¯ä¼°ç¡®è®¤ç¬¦åæç®æ å' |
| | | time: "2025-12-02 14:30:00", |
| | | event: "å»å¦è¯ä¼°å®æ", |
| | | operator: "æä¸»ä»»", |
| | | description: "å
¨é¢å»å¦è¯ä¼°ç¡®è®¤ç¬¦åæç®æ å" |
| | | }, |
| | | { |
| | | time: '2025-12-03 09:15:00', |
| | | event: 'æ»äº¡å¤å®å®æ', |
| | | operator: 'çå»ç', |
| | | description: 'èæ»äº¡å¤å®ç¨åºå®æ' |
| | | time: "2025-12-03 09:15:00", |
| | | event: "æ»äº¡å¤å®å®æ", |
| | | operator: "çå»ç", |
| | | description: "èæ»äº¡å¤å®ç¨åºå®æ" |
| | | }, |
| | | { |
| | | time: '2025-12-03 11:00:00', |
| | | event: 'æç®ç¡®è®¤å®æ', |
| | | operator: 'èµµåè°å', |
| | | description: 'å®¶å±ç¾ç½²æç®åæä¹¦' |
| | | time: "2025-12-03 11:00:00", |
| | | event: "æç®ç¡®è®¤å®æ", |
| | | operator: "èµµåè°å", |
| | | description: "å®¶å±ç¾ç½²æç®åæä¹¦" |
| | | }, |
| | | { |
| | | time: '2025-12-03 15:20:00', |
| | | event: '伦ç审æ¥éè¿', |
| | | operator: '伦çå§åä¼', |
| | | description: '伦ç审æ¥å§åä¼å
¨ç¥¨éè¿' |
| | | time: "2025-12-03 15:20:00", |
| | | event: "伦ç审æ¥éè¿", |
| | | operator: "伦çå§åä¼", |
| | | description: "伦ç审æ¥å§åä¼å
¨ç¥¨éè¿" |
| | | } |
| | | ], |
| | | // æ°å¢ç»è®¡ä¿¡æ¯ |
| | |
| | | totalStages: 8, |
| | | completedStages: 5, |
| | | completionRate: 62.5, |
| | | timeElapsed: '2天6å°æ¶', |
| | | estimatedCompletion: '2025-12-04 20:00:00', |
| | | timeElapsed: "2天6å°æ¶", |
| | | estimatedCompletion: "2025-12-04 20:00:00", |
| | | organsToDonate: 4, |
| | | potentialRecipients: 3 |
| | | } |
| | | }; |
| | | |
| | | // è·åæç®è¿ç¨è¯¦æ
|
| | | export const getDonationProcessDetail = async (caseId) => { |
| | | export const getDonationProcessDetail = async caseId => { |
| | | await new Promise(resolve => setTimeout(resolve, 500)); |
| | | |
| | | // æ¨¡ææ ¹æ®caseIdè¿åä¸åæ°æ® |
| | |
| | | |
| | | return { |
| | | code: 200, |
| | | message: 'success', |
| | | message: "success", |
| | | data: data |
| | | }; |
| | | }; |
| | |
| | | await new Promise(resolve => setTimeout(resolve, 300)); |
| | | |
| | | // æ¨¡ææ´æ°é»è¾ |
| | | const stage = mockDonationProcessData.processStages.find(s => s.key === stageKey); |
| | | const stage = mockDonationProcessData.processStages.find( |
| | | s => s.key === stageKey |
| | | ); |
| | | if (stage) { |
| | | stage.status = status; |
| | | stage.updateTime = new Date().toISOString().replace('T', ' ').substring(0, 19); |
| | | stage.updateTime = new Date() |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19); |
| | | |
| | | if (status === 'completed') { |
| | | if (status === "completed") { |
| | | stage.completeTime = stage.updateTime; |
| | | } |
| | | } |
| | | |
| | | return { |
| | | code: 200, |
| | | message: 'é¶æ®µç¶ææ´æ°æå', |
| | | message: "é¶æ®µç¶ææ´æ°æå", |
| | | data: { |
| | | caseId, |
| | | stageKey, |
| | |
| | | export const getStageDetail = async (caseId, stageKey) => { |
| | | await new Promise(resolve => setTimeout(resolve, 200)); |
| | | |
| | | const stage = mockDonationProcessData.processStages.find(s => s.key === stageKey); |
| | | const stage = mockDonationProcessData.processStages.find( |
| | | s => s.key === stageKey |
| | | ); |
| | | if (!stage) { |
| | | return { |
| | | code: 404, |
| | | message: 'é¶æ®µä¸åå¨', |
| | | message: "é¶æ®µä¸åå¨", |
| | | data: null |
| | | }; |
| | | } |
| | | |
| | | return { |
| | | code: 200, |
| | | message: 'success', |
| | | message: "success", |
| | | data: stage |
| | | }; |
| | | }; |
| | | |
| | | // è·åæ¶é´çº¿äºä»¶ |
| | | export const getTimelineEvents = async (caseId) => { |
| | | export const getTimelineEvents = async caseId => { |
| | | await new Promise(resolve => setTimeout(resolve, 150)); |
| | | |
| | | return { |
| | | code: 200, |
| | | message: 'success', |
| | | message: "success", |
| | | data: mockDonationProcessData.timelineEvents |
| | | }; |
| | | }; |
| | | |
| | | // è·åæ¡ä¾ç»è®¡ä¿¡æ¯ |
| | | export const getCaseStatistics = async (caseId) => { |
| | | export const getCaseStatistics = async caseId => { |
| | | await new Promise(resolve => setTimeout(resolve, 100)); |
| | | |
| | | return { |
| | | code: 200, |
| | | message: 'success', |
| | | message: "success", |
| | | data: mockDonationProcessData.statistics |
| | | }; |
| | | }; |
| | |
| | | |
| | | return { |
| | | code: 200, |
| | | message: 'å®¡æ ¸æäº¤æå', |
| | | message: "å®¡æ ¸æäº¤æå", |
| | | data: { |
| | | caseId, |
| | | stageKey, |
| | | reviewId: `REV${Date.now()}`, |
| | | submitTime: new Date().toISOString().replace('T', ' ').substring(0, 19), |
| | | submitTime: new Date() |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19), |
| | | ...reviewData |
| | | } |
| | | }; |
| | |
| | | |
| | | return { |
| | | code: 200, |
| | | message: 'æä»¶ä¸ä¼ æå', |
| | | message: "æä»¶ä¸ä¼ æå", |
| | | data: { |
| | | caseId, |
| | | stageKey, |
| | | fileId: `FILE${Date.now()}`, |
| | | fileName: fileInfo.name, |
| | | fileSize: fileInfo.size, |
| | | uploadTime: new Date().toISOString().replace('T', ' ').substring(0, 19), |
| | | uploadTime: new Date() |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19), |
| | | url: `/files/${caseId}/${stageKey}/${fileInfo.name}` |
| | | } |
| | | }; |
| | |
| | | <div class="donation-process-detail"> |
| | | <el-card class="process-card"> |
| | | <div class="process-container"> |
| | | <!-- 左侧æ¶é´çº¿ --> |
| | | <!-- 左侧æ¶é´çº¿ - ç¬ç«åºå®ï¼å
é¨å¯æ»å¨ --> |
| | | <div class="timeline-section"> |
| | | <div class="section-header"> |
| | | <h3>æç®è¿ç¨æ¶é´çº¿</h3> |
| | |
| | | </el-tag> |
| | | </div> |
| | | |
| | | <div class="timeline-container"> |
| | | <div |
| | | v-for="stage in processStages" |
| | | :key="stage.key" |
| | | class="timeline-item" |
| | | :class="{ |
| | | 'active': activeStage === stage.key, |
| | | 'completed': stage.status === 'completed', |
| | | 'in-progress': stage.status === 'in_progress', |
| | | 'pending': stage.status === 'pending' |
| | | }" |
| | | @click="handleStageClick(stage)" |
| | | > |
| | | <div class="timeline-marker"> |
| | | <i v-if="stage.status === 'completed'" class="el-icon-check"></i> |
| | | <i v-else-if="stage.status === 'in_progress'" class="el-icon-loading"></i> |
| | | <i v-else class="el-icon-time"></i> |
| | | </div> |
| | | |
| | | <div class="timeline-content"> |
| | | <div class="stage-header"> |
| | | <span class="stage-name">{{ stage.name }}</span> |
| | | <el-tag |
| | | size="small" |
| | | :type="getStageStatusTag(stage.status)" |
| | | > |
| | | {{ getStageStatusText(stage.status) }} |
| | | </el-tag> |
| | | <div class="timeline-scroll-container"> |
| | | <div class="timeline-container"> |
| | | <div |
| | | v-for="stage in processStages" |
| | | :key="stage.key" |
| | | class="timeline-item" |
| | | :class="{ |
| | | active: activeStage === stage.key, |
| | | completed: stage.status === 'completed', |
| | | 'in-progress': stage.status === 'in_progress', |
| | | pending: stage.status === 'pending' |
| | | }" |
| | | @click="handleStageClick(stage)" |
| | | > |
| | | <div class="timeline-marker"> |
| | | <i |
| | | v-if="stage.status === 'completed'" |
| | | class="el-icon-check" |
| | | ></i> |
| | | <i |
| | | v-else-if="stage.status === 'in_progress'" |
| | | class="el-icon-loading" |
| | | ></i> |
| | | <i v-else class="el-icon-time"></i> |
| | | </div> |
| | | |
| | | <div class="stage-info"> |
| | | <div v-if="stage.completeTime" class="time-info"> |
| | | <span>宿æ¶é´: {{ formatTime(stage.completeTime) }}</span> |
| | | <div class="timeline-content"> |
| | | <div class="stage-header"> |
| | | <span class="stage-name">{{ stage.name }}</span> |
| | | <el-tag |
| | | size="small" |
| | | :type="getStageStatusTag(stage.status)" |
| | | > |
| | | {{ getStageStatusText(stage.status) }} |
| | | </el-tag> |
| | | </div> |
| | | <div v-if="stage.updateTime" class="time-info"> |
| | | <span>æè¿æ´æ°: {{ formatTime(stage.updateTime) }}</span> |
| | | </div> |
| | | <div v-if="stage.operator" class="operator-info"> |
| | | <span>è´è´£äºº: {{ stage.operator }}</span> |
| | | |
| | | <div class="stage-info"> |
| | | <div v-if="stage.completeTime" class="time-info"> |
| | | <span |
| | | >宿æ¶é´: {{ formatTime(stage.completeTime) }}</span |
| | | > |
| | | </div> |
| | | <div v-if="stage.updateTime" class="time-info"> |
| | | <span>æè¿æ´æ°: {{ formatTime(stage.updateTime) }}</span> |
| | | </div> |
| | | <div v-if="stage.operator" class="operator-info"> |
| | | <span>è´è´£äºº: {{ stage.operator }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- å³ä¾§å
容åºå --> |
| | | <!-- å³ä¾§å
容åºå - ç¬ç«æ»å¨ --> |
| | | <div class="content-section"> |
| | | <!-- æ¡ä¾åºæ¬ä¿¡æ¯ --> |
| | | <!-- æ¡ä¾åºæ¬ä¿¡æ¯ - åºå®é«åº¦ï¼å¯æ»å¨ --> |
| | | <div class="basic-info-section"> |
| | | <div class="section-header"> |
| | | <h3>æ¡ä¾åºæ¬ä¿¡æ¯</h3> |
| | |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="ä½é¢å·"> |
| | | {{ caseInfo.caseNo }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ä½é¢å·"> |
| | | {{ caseInfo.hospitalNo }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="æç®è
å§å"> |
| | | {{ caseInfo.donorName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="æ§å«"> |
| | | <dict-tag |
| | | :options="dict.type.sys_user_sex" |
| | | :value="parseInt(caseInfo.gender)" |
| | | /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="å¹´é¾"> |
| | | {{ caseInfo.age }} å² |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è¡å"> |
| | | <dict-tag |
| | | :options="dict.type.sys_BloodType" |
| | | :value="caseInfo.bloodType" |
| | | /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ç¾ç
è¯æ"> |
| | | {{ caseInfo.diagnosis }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="æ¡ä¾ç¶æ"> |
| | | <el-tag :type="getOverallStatusTag(caseInfo.status)"> |
| | | {{ getStatusText(caseInfo.status) }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="å建æ¶é´"> |
| | | {{ formatTime(caseInfo.createTime) }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ç»è®°äºº"> |
| | | {{ caseInfo.registrant }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="å½åé¶æ®µ"> |
| | | {{ getCurrentStageName() }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <div class="basic-info-content"> |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="ä½é¢å·"> |
| | | {{ caseInfo.caseNo }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ä½é¢å·"> |
| | | {{ caseInfo.hospitalNo }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="æç®è
å§å"> |
| | | {{ caseInfo.donorName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="æ§å«"> |
| | | <dict-tag |
| | | :options="dict.type.sys_user_sex" |
| | | :value="parseInt(caseInfo.gender)" |
| | | /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="å¹´é¾"> |
| | | {{ caseInfo.age }} å² |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è¡å"> |
| | | <dict-tag |
| | | :options="dict.type.sys_BloodType" |
| | | :value="caseInfo.bloodType" |
| | | /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ç¾ç
è¯æ"> |
| | | {{ caseInfo.diagnosis }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="æ¡ä¾ç¶æ"> |
| | | <el-tag :type="getOverallStatusTag(caseInfo.status)"> |
| | | {{ getStatusText(caseInfo.status) }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="å建æ¶é´"> |
| | | {{ formatTime(caseInfo.createTime) }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ç»è®°äºº"> |
| | | {{ caseInfo.registrant }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="å½åé¶æ®µ"> |
| | | {{ getCurrentStageName() }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- é¶æ®µè¯¦æ
å
容 --> |
| | | <!-- é¶æ®µè¯¦æ
å
容 - èªéåºé«åº¦ï¼å¯æ»å¨ --> |
| | | <div class="stage-detail-section"> |
| | | <div class="section-header"> |
| | | <h3>{{ activeStageName }} - é¶æ®µè¯¦æ
</h3> |
| | | <div class="stage-actions"> |
| | | <!-- <el-button |
| | | v-if="activeStageData.status !== 'completed'" |
| | | type="success" |
| | | size="small" |
| | | @click="handleCompleteStage" |
| | | > |
| | | 宿鶿®µ |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | @click="handleViewDetail" |
| | | > |
| | | æ¥ç详æ
|
| | | </el-button> |
| | | <el-button |
| | | v-if="activeStageData.status === 'completed'" |
| | | type="warning" |
| | | size="small" |
| | | @click="handleModifyStage" |
| | | > |
| | | ä¿®æ¹ä¿¡æ¯ |
| | | </el-button> --> |
| | | </div> |
| | | <div class="stage-actions"></div> |
| | | </div> |
| | | |
| | | <!-- 卿鶿®µå
容 --> |
| | | <div class="stage-content"> |
| | | <div class="stage-content-wrapper"> |
| | | <component |
| | | :is="getStageComponent()" |
| | | :stageData="activeStageData" |
| | | :caseInfo="caseInfo" |
| | | :infoid="caseId" |
| | | /> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getDonationProcessDetail } from './donationProcess'; |
| | | import DonorMaintenanceStage from './components/DonorMaintenanceStage'; |
| | | import MedicalAssessmentStage from './components/MedicalAssessmentStage'; |
| | | import DeathJudgmentStage from './components/DeathJudgmentStage'; |
| | | import DonationConfirmStage from './components/DonationConfirmStage'; |
| | | import EthicalReviewStage from './components/EthicalReviewStage'; |
| | | import OrganAllocationStage from './components/OrganAllocationStage'; |
| | | import OrganProcurementStage from './components/OrganProcurementStage'; |
| | | import OrganUtilizationStage from './components/OrganUtilizationStage'; |
| | | import { getDonationProcessDetail } from "./donationProcess"; |
| | | import DonorMaintenanceStage from "./components/DonorMaintenanceStage"; |
| | | import MedicalAssessmentStage from "./components/MedicalAssessmentStage"; |
| | | import DeathJudgmentStage from "./components/DeathJudgmentStage"; |
| | | import DonationConfirmStage from "./components/DonationConfirmStage"; |
| | | import EthicalReviewStage from "./components/EthicalReviewStage"; |
| | | import OrganAllocationStage from "./components/OrganAllocationStage"; |
| | | import OrganProcurementStage from "./components/OrganProcurementStage"; |
| | | import OrganUtilizationStage from "./components/OrganUtilizationStage"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | export default { |
| | | name: 'DonationProcessDetail', |
| | | name: "DonationProcessDetail", |
| | | components: { |
| | | DonorMaintenanceStage, |
| | | MedicalAssessmentStage, |
| | |
| | | OrganProcurementStage, |
| | | OrganUtilizationStage |
| | | }, |
| | | dicts: ['sys_user_sex', 'sys_BloodType', 'sys_0_1'], |
| | | dicts: ["sys_user_sex", "sys_BloodType", "sys_0_1"], |
| | | data() { |
| | | return { |
| | | caseId: null, |
| | | caseInfo: { |
| | | id: '', |
| | | caseNo: '', |
| | | hospitalNo: '', |
| | | donorName: '', |
| | | gender: '', |
| | | age: '', |
| | | bloodType: '', |
| | | diagnosis: '', |
| | | status: 'in_progress', |
| | | createTime: '', |
| | | registrant: '', |
| | | currentStage: 'donor_maintenance' |
| | | id: "", |
| | | caseNo: "", |
| | | hospitalNo: "", |
| | | donorName: "", |
| | | gender: "", |
| | | age: "", |
| | | bloodType: "", |
| | | diagnosis: "", |
| | | status: "in_progress", |
| | | createTime: "", |
| | | registrant: "", |
| | | currentStage: "donor_maintenance" |
| | | }, |
| | | processStages: [ |
| | | { |
| | | key: 'donor_maintenance', |
| | | name: 'ä¾è
ç»´æ¤', |
| | | status: 'completed', |
| | | completeTime: '2025-12-01 10:00:00', |
| | | updateTime: '2025-12-01 10:00:00', |
| | | operator: 'å¼ å»ç' |
| | | key: "donor_maintenance", |
| | | name: "ä¾è
ç»´æ¤", |
| | | status: "completed", |
| | | completeTime: "2025-12-01 10:00:00", |
| | | updateTime: "2025-12-01 10:00:00", |
| | | operator: "å¼ å»ç" |
| | | }, |
| | | { |
| | | key: 'medical_assessment', |
| | | name: 'å»å¦è¯ä¼°', |
| | | status: 'completed', |
| | | completeTime: '2025-12-02 14:30:00', |
| | | updateTime: '2025-12-02 14:30:00', |
| | | operator: 'æä¸»ä»»' |
| | | key: "death_judgment", |
| | | name: "æ»äº¡å¤å®", |
| | | status: "completed", |
| | | completeTime: "2025-12-02 14:30:00", |
| | | updateTime: "2025-12-02 14:30:00", |
| | | operator: "çå»ç" |
| | | }, |
| | | { |
| | | key: 'death_judgment', |
| | | name: 'æ»äº¡å¤å®', |
| | | status: 'completed', |
| | | completeTime: '2025-12-03 09:15:00', |
| | | updateTime: '2025-12-03 09:15:00', |
| | | operator: 'çå»ç' |
| | | key: "medical_assessment", |
| | | name: "å»å¦è¯ä¼°", |
| | | status: "completed", |
| | | |
| | | completeTime: "2025-12-03 09:15:00", |
| | | updateTime: "2025-12-03 09:15:00", |
| | | operator: "æä¸»ä»»" |
| | | }, |
| | | { |
| | | key: 'donation_confirm', |
| | | name: 'æç®ç¡®è®¤', |
| | | status: 'completed', |
| | | completeTime: '2025-12-03 11:00:00', |
| | | updateTime: '2025-12-03 11:00:00', |
| | | operator: 'èµµåè°å' |
| | | key: "donation_confirm", |
| | | name: "æç®ç¡®è®¤", |
| | | status: "completed", |
| | | completeTime: "2025-12-03 11:00:00", |
| | | updateTime: "2025-12-03 11:00:00", |
| | | operator: "èµµåè°å" |
| | | }, |
| | | { |
| | | key: 'ethical_review', |
| | | name: '伦ç审æ¥', |
| | | status: 'completed', |
| | | completeTime: '2025-12-03 15:20:00', |
| | | updateTime: '2025-12-03 15:20:00', |
| | | operator: '伦çå§åä¼' |
| | | key: "ethical_review", |
| | | name: "伦ç审æ¥", |
| | | status: "completed", |
| | | completeTime: "2025-12-03 15:20:00", |
| | | updateTime: "2025-12-03 15:20:00", |
| | | operator: "伦çå§åä¼" |
| | | }, |
| | | { |
| | | key: 'organ_allocation', |
| | | name: 'å¨å®åé
', |
| | | status: 'in_progress', |
| | | updateTime: '2025-12-04 10:00:00', |
| | | operator: 'åé
ç³»ç»' |
| | | key: "organ_allocation", |
| | | name: "å¨å®åé
", |
| | | status: "in_progress", |
| | | updateTime: "2025-12-04 10:00:00", |
| | | operator: "åé
ç³»ç»" |
| | | }, |
| | | { |
| | | key: 'organ_procurement', |
| | | name: 'å¨å®è·å', |
| | | status: 'pending', |
| | | operator: 'å¾
åé
' |
| | | key: "organ_procurement", |
| | | name: "å¨å®è·å", |
| | | status: "pending", |
| | | operator: "å¾
åé
" |
| | | }, |
| | | { |
| | | key: 'organ_utilization', |
| | | name: 'å¨å®å©ç¨', |
| | | status: 'pending', |
| | | operator: 'å¾
åé
' |
| | | key: "organ_utilization", |
| | | name: "å¨å®å©ç¨", |
| | | status: "pending", |
| | | operator: "å¾
åé
" |
| | | } |
| | | ], |
| | | activeStage: 'organ_allocation', |
| | | activeStageName: 'å¨å®åé
', |
| | | activeStage: "organ_allocation", |
| | | activeStageName: "å¨å®åé
", |
| | | activeStageData: {}, |
| | | loading: false |
| | | }; |
| | | }, |
| | | computed: { |
| | | |
| | | }, |
| | | computed: {}, |
| | | created() { |
| | | this.caseId = this.$route.query.id; |
| | | console.log(this.caseId, "this.caseId"); |
| | | |
| | | if (this.caseId) { |
| | | this.getDetail(); |
| | | } else { |
| | |
| | | this.setActiveStage(this.activeStage); |
| | | }, |
| | | methods: { |
| | | getStageComponent() { |
| | | getStageComponent() { |
| | | const componentMap = { |
| | | 'donor_maintenance': 'DonorMaintenanceStage', |
| | | 'medical_assessment': 'MedicalAssessmentStage', |
| | | 'death_judgment': 'DeathJudgmentStage', |
| | | 'donation_confirm': 'DonationConfirmStage', |
| | | 'ethical_review': 'EthicalReviewStage', |
| | | 'organ_allocation': 'OrganAllocationStage', |
| | | 'organ_procurement': 'OrganProcurementStage', |
| | | 'organ_utilization': 'OrganUtilizationStage' |
| | | donor_maintenance: "DonorMaintenanceStage", |
| | | death_judgment: "DeathJudgmentStage", |
| | | medical_assessment: "MedicalAssessmentStage", |
| | | donation_confirm: "DonationConfirmStage", |
| | | ethical_review: "EthicalReviewStage", |
| | | organ_allocation: "OrganAllocationStage", |
| | | organ_procurement: "OrganProcurementStage", |
| | | organ_utilization: "OrganUtilizationStage" |
| | | }; |
| | | return componentMap[this.activeStage]; |
| | | }, |
| | |
| | | this.setActiveStage(response.data.currentStage); |
| | | } |
| | | } catch (error) { |
| | | console.error('è·åæç®è¿ç¨è¯¦æ
失败:', error); |
| | | this.$message.error('è·å详æ
失败'); |
| | | console.error("è·åæç®è¿ç¨è¯¦æ
失败:", error); |
| | | this.$message.error("è·å详æ
失败"); |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | |
| | | // çææ¨¡ææ°æ® |
| | | generateMockData() { |
| | | this.caseInfo = { |
| | | id: '202512001', |
| | | caseNo: 'C202512001', |
| | | hospitalNo: 'D202512001', |
| | | donorName: 'å¼ ä¸', |
| | | gender: '0', |
| | | id: "202512001", |
| | | caseNo: "C202512001", |
| | | hospitalNo: "D202512001", |
| | | donorName: "å¼ ä¸", |
| | | gender: "0", |
| | | age: 45, |
| | | bloodType: 'A', |
| | | diagnosis: 'èå¤ä¼¤', |
| | | status: 'in_progress', |
| | | createTime: '2025-12-01 08:00:00', |
| | | registrant: 'æåè°å', |
| | | currentStage: 'organ_allocation' |
| | | bloodType: "A", |
| | | diagnosis: "èå¤ä¼¤", |
| | | status: "in_progress", |
| | | createTime: "2025-12-01 08:00:00", |
| | | registrant: "æåè°å", |
| | | currentStage: "organ_allocation" |
| | | }; |
| | | }, |
| | | // 设置å½åæ¿æ´»é¶æ®µ |
| | |
| | | if (stage) { |
| | | this.activeStageName = stage.name; |
| | | this.activeStageData = stage; |
| | | console.log(this.activeStageData, "this.activeStageData"); |
| | | } |
| | | }, |
| | | // å¤çé¶æ®µç¹å» |
| | | handleStageClick(stage) { |
| | | if (stage.status !== 'pending') { |
| | | if (stage.status !== "pending") { |
| | | this.setActiveStage(stage.key); |
| | | } else { |
| | | this.$message.warning('è¯¥é¶æ®µå°æªå¼å§ï¼æ æ³æ¥ç详æ
'); |
| | | this.$message.warning("è¯¥é¶æ®µå°æªå¼å§ï¼æ æ³æ¥ç详æ
"); |
| | | } |
| | | }, |
| | | // è·åé¶æ®µç¶ææ ç¾ç±»å |
| | | getStageStatusTag(status) { |
| | | const map = { |
| | | 'completed': 'success', |
| | | 'in_progress': 'warning', |
| | | 'pending': 'info' |
| | | completed: "success", |
| | | in_progress: "warning", |
| | | pending: "info" |
| | | }; |
| | | return map[status] || 'info'; |
| | | return map[status] || "info"; |
| | | }, |
| | | // è·åé¶æ®µç¶æææ¬ |
| | | getStageStatusText(status) { |
| | | const map = { |
| | | 'completed': '已宿', |
| | | 'in_progress': 'è¿è¡ä¸', |
| | | 'pending': 'æªå¼å§' |
| | | completed: "已宿", |
| | | in_progress: "è¿è¡ä¸", |
| | | pending: "æªå¼å§" |
| | | }; |
| | | return map[status] || 'æªç¥'; |
| | | return map[status] || "æªç¥"; |
| | | }, |
| | | // è·åæ´ä½ç¶ææ ç¾ç±»å |
| | | getOverallStatusTag(status) { |
| | | const map = { |
| | | 'completed': 'success', |
| | | 'in_progress': 'warning', |
| | | 'pending': 'info', |
| | | 'terminated': 'danger' |
| | | completed: "success", |
| | | in_progress: "warning", |
| | | pending: "info", |
| | | terminated: "danger" |
| | | }; |
| | | return map[status] || 'info'; |
| | | return map[status] || "info"; |
| | | }, |
| | | // è·åæ´ä½ç¶æææ¬ |
| | | getStatusText(status) { |
| | | const map = { |
| | | 'completed': '已宿', |
| | | 'in_progress': 'è¿è¡ä¸', |
| | | 'pending': 'æªå¼å§', |
| | | 'terminated': 'å·²ç»æ¢' |
| | | completed: "已宿", |
| | | in_progress: "è¿è¡ä¸", |
| | | pending: "æªå¼å§", |
| | | terminated: "å·²ç»æ¢" |
| | | }; |
| | | return map[status] || 'æªç¥'; |
| | | return map[status] || "æªç¥"; |
| | | }, |
| | | // æ¶é´æ ¼å¼å |
| | | formatTime(time) { |
| | | if (!time) return '-'; |
| | | return dayjs(time).format('YYYY-MM-DD HH:mm'); |
| | | if (!time) return "-"; |
| | | return dayjs(time).format("YYYY-MM-DD HH:mm"); |
| | | }, |
| | | |
| | | // è·åå½åé¶æ®µåç§° |
| | | getCurrentStageName() { |
| | | const currentStage = this.processStages.find( |
| | | stage => stage.status === 'in_progress' |
| | | stage => stage.status === "in_progress" |
| | | ); |
| | | return currentStage ? currentStage.name : '已宿'; |
| | | return currentStage ? currentStage.name : "已宿"; |
| | | }, |
| | | // ç¼è¾åºæ¬ä¿¡æ¯ |
| | | handleEditBasicInfo() { |
| | | this.$message.info('ç¼è¾åºæ¬ä¿¡æ¯åè½'); |
| | | this.$message.info("ç¼è¾åºæ¬ä¿¡æ¯åè½"); |
| | | }, |
| | | // 宿鶿®µ |
| | | handleCompleteStage() { |
| | | this.$confirm(`ç¡®å®è¦å®æã${this.activeStageName}ãé¶æ®µåï¼`, 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | this.$confirm(`ç¡®å®è¦å®æã${this.activeStageName}ãé¶æ®µåï¼`, "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | // æ´æ°å½åé¶æ®µç¶æ |
| | | const currentIndex = this.processStages.findIndex( |
| | |
| | | ); |
| | | |
| | | if (currentIndex !== -1) { |
| | | this.processStages[currentIndex].status = 'completed'; |
| | | this.processStages[currentIndex].completeTime = new Date().toISOString(); |
| | | this.processStages[currentIndex].status = "completed"; |
| | | this.processStages[ |
| | | currentIndex |
| | | ].completeTime = new Date().toISOString(); |
| | | |
| | | // æ¿æ´»ä¸ä¸ä¸ªé¶æ®µ |
| | | if (currentIndex < this.processStages.length - 1) { |
| | | this.processStages[currentIndex + 1].status = 'in_progress'; |
| | | this.processStages[currentIndex + 1].status = "in_progress"; |
| | | this.setActiveStage(this.processStages[currentIndex + 1].key); |
| | | } else { |
| | | this.caseInfo.status = 'completed'; |
| | | this.caseInfo.status = "completed"; |
| | | } |
| | | |
| | | this.$message.success('é¶æ®µå·²å®æ'); |
| | | this.$message.success("é¶æ®µå·²å®æ"); |
| | | } |
| | | }); |
| | | }, |
| | | // æ¥ç详æ
|
| | | handleViewDetail() { |
| | | const routeMap = { |
| | | 'donor_maintenance': '/case/donorMaintenance/detail', |
| | | 'medical_assessment': '/case/medicalAssessment/detail', |
| | | 'death_judgment': '/case/deathJudgment/detail', |
| | | 'donation_confirm': '/case/donationConfirm/detail', |
| | | 'ethical_review': '/case/ethicalReview/detail', |
| | | 'organ_allocation': '/case/organAllocation/detail', |
| | | 'organ_procurement': '/case/organProcurement/detail', |
| | | 'organ_utilization': '/case/organUtilization/detail' |
| | | donor_maintenance: "/case/donorMaintenance/detail", |
| | | death_judgment: "/case/deathJudgment/detail", |
| | | medical_assessment: "/case/medicalAssessment/detail", |
| | | donation_confirm: "/case/donationConfirm/detail", |
| | | ethical_review: "/case/ethicalReview/detail", |
| | | organ_allocation: "/case/organAllocation/detail", |
| | | organ_procurement: "/case/organProcurement/detail", |
| | | organ_utilization: "/case/organUtilization/detail" |
| | | }; |
| | | |
| | | const route = routeMap[this.activeStage]; |
| | |
| | | padding: 20px; |
| | | background-color: #f5f7fa; |
| | | min-height: 100vh; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .process-card { |
| | | border-radius: 8px; |
| | | box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .process-container { |
| | | display: flex; |
| | | min-height: 800px; |
| | | min-height: 600px; /* 设置ä¸ä¸ªæå°é«åº¦ */ |
| | | gap: 20px; |
| | | align-items: flex-start; /* é¡¶é¨å¯¹é½ */ |
| | | } |
| | | |
| | | /* 左侧æ¶é´çº¿æ ·å¼ */ |
| | | /* 左侧æ¶é´çº¿æ ·å¼ - åºå®é«åº¦ï¼å
鍿»å¨ */ |
| | | .timeline-section { |
| | | flex: 0 0 300px; |
| | | flex: 0 0 320px; /* åºå®å®½åº¦ */ |
| | | display: flex; |
| | | flex-direction: column; |
| | | background: white; |
| | | border-radius: 6px; |
| | | padding: 20px; |
| | | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); |
| | | height: calc(120vh - 120px); /* æ ¹æ®è§å£é«åº¦èªéåº */ |
| | | max-height: 1200px; /* 设置æå¤§é«åº¦ */ |
| | | position: sticky; /* ä½¿ç¨ sticky å®ä½ */ |
| | | top: 20px; /* è·ç¦»é¡¶é¨ 20px */ |
| | | } |
| | | |
| | | .section-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | padding-bottom: 15px; |
| | | border-bottom: 1px solid #e4e7ed; |
| | | .timeline-scroll-container { |
| | | flex: 1; |
| | | overflow-y: auto; /* å
é¨å¯æ»å¨ */ |
| | | margin-top: 20px; |
| | | padding-right: 8px; /* 为æ»å¨æ¡çåºç©ºé´ */ |
| | | } |
| | | |
| | | .section-header h3 { |
| | | margin: 0; |
| | | color: #303133; |
| | | font-size: 16px; |
| | | .timeline-scroll-container::-webkit-scrollbar { |
| | | width: 6px; |
| | | } |
| | | |
| | | .timeline-scroll-container::-webkit-scrollbar-track { |
| | | background: #f1f1f1; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .timeline-scroll-container::-webkit-scrollbar-thumb { |
| | | background: #c1c1c1; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .timeline-scroll-container::-webkit-scrollbar-thumb:hover { |
| | | background: #a8a8a8; |
| | | } |
| | | |
| | | .timeline-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 15px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | /* å³ä¾§å
容åºåæ ·å¼ - èªéåºé«åº¦ */ |
| | | .content-section { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20px; |
| | | min-height: 0; /* éè¦ï¼å
许flexå项å缩 */ |
| | | } |
| | | |
| | | .basic-info-section { |
| | | background: white; |
| | | border-radius: 6px; |
| | | padding: 20px; |
| | | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); |
| | | display: flex; |
| | | flex-direction: column; |
| | | min-height: 0; /* éè¦ */ |
| | | } |
| | | |
| | | .basic-info-content { |
| | | flex: 1; |
| | | max-height: 300px; /* åºæ¬ä¿¡æ¯åºåæå¤§é«åº¦ */ |
| | | overflow-y: auto; /* åºæ¬ä¿¡æ¯å
é¨å¯æ»å¨ */ |
| | | margin-top: 20px; |
| | | padding-right: 8px; |
| | | } |
| | | |
| | | .basic-info-content::-webkit-scrollbar { |
| | | width: 6px; |
| | | } |
| | | |
| | | .basic-info-content::-webkit-scrollbar-track { |
| | | background: #f1f1f1; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .basic-info-content::-webkit-scrollbar-thumb { |
| | | background: #c1c1c1; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .basic-info-content::-webkit-scrollbar-thumb:hover { |
| | | background: #a8a8a8; |
| | | } |
| | | |
| | | .basic-info-content .el-descriptions { |
| | | width: 100%; |
| | | } |
| | | |
| | | .stage-detail-section { |
| | | flex: 1; /* å æ®å©ä½ç©ºé´ */ |
| | | background: white; |
| | | border-radius: 6px; |
| | | padding: 20px; |
| | | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); |
| | | display: flex; |
| | | flex-direction: column; |
| | | min-height: 400px; /* æå°é«åº¦ */ |
| | | max-height: 800px; /* æå¤§é«åº¦ï¼å¯æ ¹æ®éè¦è°æ´ */ |
| | | overflow: hidden; /* éèå¤å±æº¢åº */ |
| | | } |
| | | |
| | | .stage-content-wrapper { |
| | | flex: 1; |
| | | overflow-y: auto; /* é¶æ®µè¯¦æ
å
é¨å¯æ»å¨ */ |
| | | margin-top: 20px; |
| | | padding-right: 8px; |
| | | min-height: 0; /* éè¦ */ |
| | | } |
| | | |
| | | .stage-content-wrapper::-webkit-scrollbar { |
| | | width: 6px; |
| | | } |
| | | |
| | | .stage-content-wrapper::-webkit-scrollbar-track { |
| | | background: #f1f1f1; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .stage-content-wrapper::-webkit-scrollbar-thumb { |
| | | background: #c1c1c1; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .stage-content-wrapper::-webkit-scrollbar-thumb:hover { |
| | | background: #a8a8a8; |
| | | } |
| | | |
| | | /* åææ ·å¼ä¿æä¸å */ |
| | | .section-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | flex-shrink: 0; /* 鲿¢è¢«å缩 */ |
| | | } |
| | | |
| | | .section-header h3 { |
| | | margin: 0; |
| | | color: #303133; |
| | | font-size: 16px; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .timeline-item { |
| | |
| | | cursor: pointer; |
| | | transition: all 0.3s ease; |
| | | border: 1px solid #e4e7ed; |
| | | flex-shrink: 0; /* 鲿¢è¢«å缩 */ |
| | | } |
| | | |
| | | .timeline-item:hover { |
| | |
| | | } |
| | | |
| | | .timeline-item.active { |
| | | border-color: #409EFF; |
| | | border-color: #409eff; |
| | | background-color: #f0f9ff; |
| | | } |
| | | |
| | | .timeline-item.completed { |
| | | border-color: #67C23A; |
| | | border-color: #67c23a; |
| | | background-color: #f0f9e8; |
| | | } |
| | | |
| | | .timeline-item.in-progress { |
| | | border-color: #E6A23C; |
| | | border-color: #e6a23c; |
| | | background-color: #fdf6ec; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .timeline-item.completed .timeline-marker { |
| | | background-color: #67C23A; |
| | | background-color: #67c23a; |
| | | } |
| | | |
| | | .timeline-item.in-progress .timeline-marker { |
| | | background-color: #E6A23C; |
| | | background-color: #e6a23c; |
| | | } |
| | | |
| | | .timeline-item.pending .timeline-marker { |
| | |
| | | font-weight: 600; |
| | | color: #303133; |
| | | font-size: 14px; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | max-width: 150px; |
| | | } |
| | | |
| | | .stage-info { |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | .time-info, .operator-info { |
| | | .time-info, |
| | | .operator-info { |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | /* å³ä¾§å
容åºåæ ·å¼ */ |
| | | .content-section { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20px; |
| | | } |
| | | |
| | | .basic-info-section, |
| | | .stage-detail-section { |
| | | background: white; |
| | | border-radius: 6px; |
| | | padding: 20px; |
| | | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .stage-actions { |
| | | display: flex; |
| | | gap: 10px; |
| | | } |
| | | |
| | | .stage-content { |
| | | margin-top: 20px; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | /* ååºå¼è®¾è®¡ */ |
| | |
| | | |
| | | .timeline-section { |
| | | flex: none; |
| | | margin-bottom: 20px; |
| | | width: 100%; |
| | | height: auto; |
| | | max-height: 300px; |
| | | position: static; /* å°å±å¹åæ¶ sticky */ |
| | | } |
| | | |
| | | .timeline-scroll-container { |
| | | max-height: 250px; |
| | | } |
| | | |
| | | .stage-detail-section { |
| | | max-height: 500px; |
| | | } |
| | | } |
| | | |
| | |
| | | gap: 10px; |
| | | } |
| | | |
| | | .stage-actions { |
| | | flex-wrap: wrap; |
| | | .stage-name { |
| | | max-width: 120px; |
| | | } |
| | | } |
| | | |
| | | /* å¨ç»ææ */ |
| | | .timeline-item { |
| | | transition: all 0.3s ease; |
| | | } |
| | | .basic-info-content { |
| | | max-height: 250px; |
| | | } |
| | | |
| | | .timeline-item:hover { |
| | | transform: translateY(-2px); |
| | | } |
| | | |
| | | /* è¿åº¦æ¡æ ·å¼ä¼å */ |
| | | :deep(.el-progress-bar) { |
| | | padding-right: 0; |
| | | } |
| | | |
| | | :deep(.el-progress__text) { |
| | | font-size: 12px; |
| | | .stage-detail-section { |
| | | min-height: 300px; |
| | | max-height: 400px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | import Pagination from "@/components/Pagination"; |
| | | import UploadAttachment from "@/components/UploadAttachment"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | import LiverKidneyPanel from "./components/LiverKidneyPanel.vue"; |
| | | import BloodRoutinePanel from "./components/BloodRoutinePanel.vue"; |
| | | import UrineRoutinePanel from "./components/UrineRoutinePanel.vue"; |
| | | import LiverKidneyPanel from "@/components/MaintainComponents/LiverKidneyPanel.vue"; |
| | | import BloodRoutinePanel from "@/components/MaintainComponents/BloodRoutinePanel.vue"; |
| | | import UrineRoutinePanel from "@/components/MaintainComponents/UrineRoutinePanel.vue"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | export default { |
| | |
| | | console.error("'lazy-load'å¿
é¡»å'filterable'åæ¶ä½¿ç¨ï¼"); |
| | | return false; |
| | | } |
| | | console.log(456789); |
| | | |
| | | if (this.lazyLoad) { |
| | | this.focusEvents.func = () => { |
| | |
| | | }; |
| | | this.dataList.unshift(all); |
| | | } |
| | | console.log(this.dataList,'this.dataList'); |
| | | |
| | | this.tempList = this.dataList.map(item => item); |
| | | this.focusEvents.loaded = true; |
| | | this.isLoading = false; |
| | |
| | | proxy: { |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | // target:`http://localhost:8080`, |
| | | target:`http://192.168.100.10:8080`, |
| | | target:`http://localhost:8080`, |
| | | // target:`http://192.168.100.10:8080`, |
| | | // target:`http://192.168.100.137:8080`, |
| | | // target: `https://slb.hospitalstar.com:9093`, |
| | | changeOrigin: true, |