| | |
| | | <el-button |
| | | type="success" |
| | | @click="handleProcure" |
| | | :disabled="form.recordstate === 'completed'" |
| | | :loading="confirmLoading" |
| | | > |
| | | 确认获取 |
| | |
| | | </div> |
| | | |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="120px"> |
| | | |
| | | <!-- 手术相关信息 --> |
| | | <el-divider content-position="left">手术信息</el-divider> |
| | | |
| | |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | 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="portalveincannulatime" |
| | | > |
| | | <el-form-item label="门静脉插管时间" prop="portalveincannulatime"> |
| | | <el-date-picker |
| | | 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="portalveinperfusiontime" |
| | | > |
| | | <el-form-item label="门静脉灌注时间" prop="portalveinperfusiontime"> |
| | | <el-date-picker |
| | | 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-divider content-position="left">协调员信息</el-divider> |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <!-- <el-col :span="8"> |
| | | <el-form-item label="协调员姓名" prop="coordinatorName"> |
| | | <el-input v-model="form.coordinatorName" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="8"> |
| | | <el-form-item label="进手术室时间" prop="coordinatorInOperating"> |
| | | <el-date-picker |
| | |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </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> |
| | | </el-row> |
| | | </el-form> |
| | | </el-card> |
| | | |
| | |
| | | <div slot="header" class="clearfix"> |
| | | <span class="detail-title">器官获取记录</span> |
| | | <div style="float: right;"> |
| | | <el-tag |
| | | :type=" |
| | | form.recordstate === 'completed' ? 'success' : 'warning' |
| | | " |
| | | > |
| | | {{ form.recordstate === "completed" ? "已完成" : "进行中" }} |
| | | </el-tag> |
| | | |
| | | <dict-tag |
| | | :options="dict.type.Obtain_status" |
| | | :value="form.witnessState" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | v-for="dict in dict.type.sys_Organ || []" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | :disabled="form.recordstate === 'completed'" |
| | | > |
| | | {{ dict.label }} |
| | | </el-checkbox> |
| | |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="选择获取开始时间" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | label="器官离体时间" |
| | | align="center" |
| | | width="180" |
| | | prop="organGetTime" |
| | | prop="organgettime" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="scope.row.organGetTime" |
| | | v-model="scope.row.organgettime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="选择器官离体时间" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | label="获取医院" |
| | | align="center" |
| | | width="200" |
| | | prop="gainHospitalNo" |
| | | prop="gainhospitalno" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-model="scope.row.gainHospitalNo" |
| | | v-model="scope.row.gainhospitalno" |
| | | placeholder="请选择获取医院" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | @change="handleHospitalChange(scope.row, $event)" |
| | | > |
| | | <el-option |
| | |
| | | label="获取医师" |
| | | align="center" |
| | | width="120" |
| | | prop="organGetDoctor" |
| | | prop="organgetdoct" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.organGetDoctor" |
| | | v-model="scope.row.organgetdoct" |
| | | placeholder="获取医师" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | <!-- <el-table-column |
| | | label="助手" |
| | | align="center" |
| | | width="120" |
| | |
| | | <el-input |
| | | v-model="scope.row.assistant" |
| | | placeholder="助手" |
| | | :disabled="form.recordstate === 'completed'" |
| | | |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | |
| | | <el-table-column |
| | | <!-- <el-table-column |
| | | label="获取护士" |
| | | align="center" |
| | | width="120" |
| | |
| | | <el-input |
| | | v-model="scope.row.procurementNurse" |
| | | placeholder="获取护士" |
| | | :disabled="form.recordstate === 'completed'" |
| | | |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-input |
| | | v-model="scope.row.operatingRoomNurse" |
| | | placeholder="手术室护士" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="麻醉医生" |
| | | align="center" |
| | | width="120" |
| | | prop="anesthesiologist" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.anesthesiologist" |
| | | placeholder="麻醉医生" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | |
| | | <el-table-column |
| | | label="获取状态" |
| | | align="center" |
| | | width="120" |
| | | prop="organState" |
| | | prop="organstate" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-model="scope.row.organState" |
| | | v-model="scope.row.organstate" |
| | | placeholder="请选择获取状态" |
| | | style="width: 100%" |
| | | :disabled="form.recordstate === 'completed'" |
| | | > |
| | | <el-option |
| | | v-for="dict in organStateList" |
| | | v-for="dict in dict.type.Obtain_status" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | |
| | | <el-table-column |
| | | label="说明" |
| | | align="center" |
| | | prop="notGetReason" |
| | | prop="notgetreason" |
| | | min-width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | type="textarea" |
| | | clearable |
| | | v-model="scope.row.notGetReason" |
| | | v-model="scope.row.notgetreason" |
| | | placeholder="请输入未获取说明" |
| | | :disabled="form.recordstate === 'completed'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | align="center" |
| | | width="120" |
| | | class-name="small-padding fixed-width" |
| | | v-if="form.recordstate !== 'completed'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | </el-row> |
| | | |
| | | <!-- 获取统计信息 --> |
| | | <div |
| | | <!-- <div |
| | | class="procurement-stats" |
| | | v-if="procurementData.serviceDonationwitnessorgans && procurementData.serviceDonationwitnessorgans.length > 0" |
| | | 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.serviceDonationwitnessorgans.length }} 个</span |
| | | >{{ |
| | | procurementData.serviceDonationwitnessorgans.length |
| | | }} |
| | | 个</span |
| | | > |
| | | </div> |
| | | </el-col> |
| | |
| | | <span class="stat-value"> |
| | | <el-tag |
| | | :type=" |
| | | form.recordstate === 'completed' |
| | | ? 'success' |
| | | : 'warning' |
| | | form.witnessState === 'completed' ? 'success' : 'warning' |
| | | " |
| | | > |
| | | {{ |
| | | form.recordstate === "completed" |
| | | ? "已完成" |
| | | : "进行中" |
| | | }} |
| | | {{ form.witnessState === "completed" ? "已完成" : "进行中" }} |
| | | </el-tag> |
| | | </span> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <div v-else class="empty-procurement"> |
| | | <div |
| | | v-if="!procurementData.serviceDonationwitnessorgans" |
| | | class="empty-procurement" |
| | | > |
| | | <el-empty description="暂无获取记录" :image-size="80"> |
| | | <span>请先选择要获取的器官</span> |
| | | </el-empty> |
| | | </div> |
| | | </el-form> |
| | | |
| | | <div class="dialog-footer" v-if="form.recordstate !== 'completed'"> |
| | | <el-button |
| | | type="primary" |
| | | @click="handleSaveProcurement" |
| | | :loading="saveLoading" |
| | | :disabled="!procurementData.serviceDonationwitnessorgans || procurementData.serviceDonationwitnessorgans.length === 0" |
| | | > |
| | | 保存获取记录 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | @click="handleConfirmProcurement" |
| | | :loading="confirmLoading" |
| | | :disabled="incompleteRecords > 0" |
| | | > |
| | | 确认完成获取 |
| | | </el-button> |
| | | </div> |
| | | </el-card> |
| | | |
| | | <!-- 附件管理部分优化 --> |
| | |
| | | /> |
| | | |
| | | <!-- 附件列表展示 --> |
| | | <div |
| | | class="attachment-list" |
| | | v-if="attachments && attachments.length > 0" |
| | | > |
| | | <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"> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="获取状态"> |
| | | <el-select v-model="currentRecord.organState" style="width: 100%"> |
| | | <el-select v-model="currentRecord.organstate" style="width: 100%"> |
| | | <el-option |
| | | v-for="dict in organStateList" |
| | | v-for="dict in dict.type.Obtain_status" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="获取医师"> |
| | | <el-input |
| | | v-model="currentRecord.organGetDoctor" |
| | | v-model="currentRecord.organgetdoct" |
| | | placeholder="请输入获取医师" |
| | | /> |
| | | </el-form-item> |
| | |
| | | |
| | | <el-form-item |
| | | label="未获取说明" |
| | | v-if="currentRecord.organState === '0'" |
| | | v-if="currentRecord.organstate === '0'" |
| | | > |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="currentRecord.notGetReason" |
| | | v-model="currentRecord.notgetreason" |
| | | placeholder="请输入未获取的原因说明" |
| | | /> |
| | | </el-form-item> |
| | |
| | | > |
| | | <div v-if="currentPreviewFile"> |
| | | <div v-if="currentPreviewFile.fileType === 'image'"> |
| | | <img :src="currentPreviewFile.fileUrl" style="max-width: 100%; max-height: 500px;" /> |
| | | <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> |
| | | <iframe |
| | | :src="currentPreviewFile.fileUrl" |
| | | width="100%" |
| | | height="500px" |
| | | ></iframe> |
| | | </div> |
| | | <div v-else> |
| | | <p>不支持预览此文件类型,请下载查看</p> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { witnessList, witnessadd, witnessedit, } from "@/api/businessApi"; |
| | | import { witnessList, witnessadd, witnessedit } from "@/api/businessApi"; |
| | | import UploadAttachment from "@/components/UploadAttachment"; |
| | | import CaseBasicInfo from "@/components/CaseBasicInfo"; |
| | | import dayjs from "dayjs"; |
| | |
| | | export default { |
| | | name: "OrganProcurementDetail", |
| | | components: { |
| | | UploadAttachment,CaseBasicInfo |
| | | UploadAttachment, |
| | | CaseBasicInfo |
| | | }, |
| | | dicts: ["sys_BloodType", "sys_DonationCategory", "sys_Organ"], |
| | | dicts: [ |
| | | "sys_BloodType", |
| | | "sys_DonationCategory", |
| | | "sys_Organ", |
| | | "Obtain_status" |
| | | ], |
| | | data() { |
| | | return { |
| | | caseId: null, |
| | |
| | | infoid: undefined, |
| | | name: "", |
| | | inpatientno: "", |
| | | recordstate: "pending", |
| | | witnessState: "2", |
| | | caseNo: "", |
| | | donorno: "", |
| | | treatmenthospitalname: "", |
| | |
| | | selectedOrgans: [], |
| | | // 医院列表 |
| | | hospitalList: [], |
| | | // 器官状态列表 |
| | | organStateList: [ |
| | | { value: "1", label: "已获取" }, |
| | | { value: "0", label: "未获取" }, |
| | | { value: "2", label: "部分获取" } |
| | | ], |
| | | // 获取记录数据 |
| | | procurementData: { |
| | | serviceDonationwitnessorgans: [] |
| | |
| | | attachmentFileList: [], |
| | | // 附件相关配置 |
| | | attachmentLimit: 10, |
| | | attachmentAccept: ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt", |
| | | attachmentAccept: |
| | | ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt", |
| | | // 编辑对话框 |
| | | editDialogVisible: false, |
| | | currentRecord: {}, |
| | |
| | | return this.procurementData.serviceDonationwitnessorgans.filter( |
| | | record => |
| | | !record.organStartTime || |
| | | !record.organGetTime || |
| | | !record.gainHospitalNo || |
| | | !record.organGetDoctor |
| | | !record.organgettime || |
| | | !record.gainhospitalno || |
| | | !record.organgetdoct |
| | | ).length; |
| | | }, |
| | | // 唯一医院数量 |
| | | uniqueHospitals() { |
| | | if (!this.procurementData.serviceDonationwitnessorgans) return 0; |
| | | const hospitals = this.procurementData.serviceDonationwitnessorgans |
| | | .map(record => record.gainHospitalNo) |
| | | .map(record => record.gainhospitalno) |
| | | .filter(Boolean); |
| | | return new Set(hospitals).size; |
| | | }, |
| | |
| | | } |
| | | |
| | | this.form.infoid = infoid; |
| | | this.generateDonorNo(); |
| | | // this.generateDonorNo(); |
| | | |
| | | if (infoid) { |
| | | this.getDetail(infoid); |
| | |
| | | this.getHospitalData(); |
| | | }, |
| | | // 生成捐献者编号 |
| | | generateDonorNo() { |
| | | const timestamp = Date.now().toString(); |
| | | this.form.donorno = "D" + timestamp.slice(-8); |
| | | this.form.caseNo = "CASE" + timestamp.slice(-6); |
| | | this.form.inpatientno = "IP" + timestamp.slice(-6); |
| | | }, |
| | | // generateDonorNo() { |
| | | // const timestamp = Date.now().toString(); |
| | | // this.form.donorno = "D" + timestamp.slice(-8); |
| | | // this.form.caseNo = "CASE" + timestamp.slice(-6); |
| | | // this.form.inpatientno = "IP" + timestamp.slice(-6); |
| | | // }, |
| | | // 获取详情 |
| | | async getDetail(infoid) { |
| | | this.loading = true; |
| | |
| | | response.data.length > 0 |
| | | ) { |
| | | const data = response.data[0]; |
| | | if (!data.witnessState || data.witnessState == 1) { |
| | | data.witnessState = "2"; |
| | | } |
| | | |
| | | // 填充表单数据 |
| | | Object.assign(this.form, data); |
| | | |
| | | // 初始化附件 |
| | | if (this.form.attachments) { |
| | | if (this.form.deathjudgeannex) { |
| | | this.form.attachments = JSON.parse(this.form.deathjudgeannex); |
| | | this.attachments = Array.isArray(this.form.attachments) |
| | | ? [...this.form.attachments] |
| | | : []; |
| | |
| | | ); |
| | | } |
| | | // 如果选择了"左肾"或"右肾",取消"双肾"选择 |
| | | else if (selectedValues.includes("C64L") || selectedValues.includes("C64R")) { |
| | | else if ( |
| | | selectedValues.includes("C64L") || |
| | | selectedValues.includes("C64R") |
| | | ) { |
| | | this.selectedOrgans = selectedValues.filter(item => item !== "C64"); |
| | | } |
| | | |
| | |
| | | ); |
| | | } |
| | | // 如果选择了"左肺"或"右肺",取消"全肺"选择 |
| | | else if (selectedValues.includes("C34L") || selectedValues.includes("C34R")) { |
| | | else if ( |
| | | selectedValues.includes("C34L") || |
| | | selectedValues.includes("C34R") |
| | | ) { |
| | | this.selectedOrgans = selectedValues.filter(item => item !== "C34"); |
| | | } |
| | | }, |
| | |
| | | organname: organName, |
| | | organno: organValue, |
| | | organStartTime: "", |
| | | organGetTime: "", |
| | | gainHospitalNo: "", |
| | | gainHospitalName: "", |
| | | organGetDoctor: "", |
| | | organgettime: "", |
| | | gainhospitalno: "", |
| | | gainhospitalname: "", |
| | | organgetdoct: "", |
| | | assistant: "", |
| | | procurementNurse: "", |
| | | operatingRoomNurse: "", |
| | | anesthesiologist: "", |
| | | organState: "1", |
| | | notGetReason: "" |
| | | organstate: "1", |
| | | notgetreason: "" |
| | | }); |
| | | }, |
| | | |
| | |
| | | item => item.hospitalNo === hospitalNo |
| | | ); |
| | | if (hospital) { |
| | | row.gainHospitalName = hospital.hospitalName; |
| | | row.gainhospitalname = hospital.hospitalName; |
| | | } |
| | | }, |
| | | // 编辑获取记录 |
| | |
| | | // 确认编辑 |
| | | handleEditConfirm() { |
| | | if (this.currentEditIndex !== -1) { |
| | | this.procurementData.serviceDonationwitnessorgans[this.currentEditIndex] = { |
| | | this.procurementData.serviceDonationwitnessorgans[ |
| | | this.currentEditIndex |
| | | ] = { |
| | | ...this.currentRecord |
| | | }; |
| | | this.$message.success("获取记录更新成功"); |
| | |
| | | getOrganRowClassName({ row }) { |
| | | if ( |
| | | !row.organStartTime || |
| | | !row.organGetTime || |
| | | !row.gainHospitalNo || |
| | | !row.organGetDoctor |
| | | !row.organgettime || |
| | | !row.gainhospitalno || |
| | | !row.organgetdoct |
| | | ) { |
| | | return "warning-row"; |
| | | } |
| | |
| | | try { |
| | | const saveData = { |
| | | ...this.form, |
| | | attachments: this.attachments, |
| | | deathjudgeannex: JSON.stringify(this.attachments), |
| | | organdonation: this.selectedOrgans.join(","), |
| | | serviceDonationwitnessorgans: |
| | | serviceDonationwitnessorganList: |
| | | this.procurementData.serviceDonationwitnessorgans || [] |
| | | }; |
| | | |
| | |
| | | }) |
| | | .then(async () => { |
| | | this.confirmLoading = true; |
| | | this.form.recordstate = "completed"; |
| | | this.form.operationendtime = this.form.operationendtime || new Date() |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19); |
| | | this.form.witnessState = "3"; |
| | | this.form.operationendtime = |
| | | this.form.operationendtime || |
| | | new Date() |
| | | .toISOString() |
| | | .replace("T", " ") |
| | | .substring(0, 19); |
| | | |
| | | try { |
| | | const saveData = { |
| | |
| | | this.$message.error( |
| | | "确认获取失败:" + (response.msg || "未知错误") |
| | | ); |
| | | this.form.recordstate = "pending"; |
| | | this.form.witnessState = "2"; |
| | | this.form.operationendtime = ""; |
| | | } |
| | | } catch (error) { |
| | | console.error("确认获取失败:", error); |
| | | this.$message.error("确认获取失败"); |
| | | this.form.recordstate = "pending"; |
| | | this.form.witnessState = "2"; |
| | | this.form.operationendtime = ""; |
| | | } finally { |
| | | this.confirmLoading = false; |
| | |
| | | /** 获取文件类型 */ |
| | | getFileType(fileName) { |
| | | if (!fileName) return "other"; |
| | | const extension = fileName.split(".").pop().toLowerCase(); |
| | | 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"]; |
| | |
| | | |
| | | /** 获取文件扩展名 */ |
| | | getFileExtension(filename) { |
| | | return filename.split(".").pop().toLowerCase(); |
| | | return filename |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | }, |
| | | |
| | | /** 格式化文件大小 */ |