| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¡ä¾å表å详æ
|
| | | export function allocationList(data) { |
| | | return request({ |
| | | url: '/project/donateorganBase/getDonateorganBaseInfoList', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // æ»äº¡ä¿¡æ¯ä¿®æ¹ |
| | | export function allocationadd(data) { |
| | | return request({ |
| | | url: '/project/donateorganBase/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // æ»äº¡ä¿¡æ¯ä¿®æ¹ |
| | | export function allocationedit(data) { |
| | | return request({ |
| | | url: '/project/donateorganBase/edit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // æ»äº¡ä¿¡æ¯è¯¦æ
|
| | | export function donateorganBaseinfoInfo(id) { |
| | | return request({ |
| | | url: '/project/donateorganBase/getInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¡ä¾å表å详æ
|
| | | export function reviewinitiateBaseInfoList(data) { |
| | | return request({ |
| | | url: '/project/ethicalreviewinitiate/reviewinitiateBaseInfoList', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // æ»äº¡ä¿¡æ¯ä¿®æ¹ |
| | | export function ethicalreviewadd(data) { |
| | | return request({ |
| | | url: '/project/ethicalreviewinitiate/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // æ»äº¡ä¿¡æ¯ä¿®æ¹ |
| | | export function ethicalreviewedit(data) { |
| | | return request({ |
| | | url: '/project/ethicalreviewinitiate/edit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // æ»äº¡ä¿¡æ¯è¯¦æ
|
| | | export function ethicalinfoInfo(id) { |
| | | return request({ |
| | | url: '/project/deathinfo/getInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | |
| | | import './permission' // permission control |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import { getConfigKey } from "@/api/system/config"; |
| | | import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; |
| | | import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels,donatebaseinfoEdit, handleTree } from "@/utils/ruoyi"; |
| | | import { formatTime } from "@/utils/index"; |
| | | import dataV from '@jiaminghi/data-view';//dataV |
| | | // å页ç»ä»¶ |
| | |
| | | Vue.prototype.getDicts = getDicts |
| | | Vue.prototype.getConfigKey = getConfigKey |
| | | Vue.prototype.parseTime = parseTime |
| | | Vue.prototype.donatebaseinfoEdit = donatebaseinfoEdit |
| | | Vue.prototype.formatTime = formatTime |
| | | Vue.prototype.resetForm = resetForm |
| | | Vue.prototype.addDateRange = addDateRange |
| | |
| | | import { updateDonatebaseinfo } from "@/api/project/donatebaseinfo"; |
| | | |
| | | /** |
| | | * éç¨jsæ¹æ³å°è£
å¤ç |
| | | * Copyright (c) 2019 ruoyi |
| | |
| | | // æ¥ææ ¼å¼å |
| | | export function parseTime(time, pattern) { |
| | | if (arguments.length === 0 || !time) { |
| | | return null |
| | | return null; |
| | | } |
| | | const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' |
| | | let date |
| | | if (typeof time === 'object') { |
| | | date = time |
| | | const format = pattern || "{y}-{m}-{d} {h}:{i}:{s}"; |
| | | let date; |
| | | if (typeof time === "object") { |
| | | date = time; |
| | | } else { |
| | | if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { |
| | | time = parseInt(time) |
| | | } else if (typeof time === 'string') { |
| | | time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm),''); |
| | | if (typeof time === "string" && /^[0-9]+$/.test(time)) { |
| | | time = parseInt(time); |
| | | } else if (typeof time === "string") { |
| | | time = time |
| | | .replace(new RegExp(/-/gm), "/") |
| | | .replace("T", " ") |
| | | .replace(new RegExp(/\.[\d]{3}/gm), ""); |
| | | } |
| | | if ((typeof time === 'number') && (time.toString().length === 10)) { |
| | | time = time * 1000 |
| | | if (typeof time === "number" && time.toString().length === 10) { |
| | | time = time * 1000; |
| | | } |
| | | date = new Date(time) |
| | | date = new Date(time); |
| | | } |
| | | const formatObj = { |
| | | y: date.getFullYear(), |
| | |
| | | i: date.getMinutes(), |
| | | s: date.getSeconds(), |
| | | a: date.getDay() |
| | | } |
| | | }; |
| | | const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { |
| | | let value = formatObj[key] |
| | | let value = formatObj[key]; |
| | | // Note: getDay() returns 0 on Sunday |
| | | if (key === 'a') { return ['æ¥', 'ä¸', 'äº', 'ä¸', 'å', 'äº', 'å
'][value] } |
| | | if (key === "a") { |
| | | return ["æ¥", "ä¸", "äº", "ä¸", "å", "äº", "å
"][value]; |
| | | } |
| | | if (result.length > 0 && value < 10) { |
| | | value = '0' + value |
| | | value = "0" + value; |
| | | } |
| | | return value || 0 |
| | | }) |
| | | return time_str |
| | | return value || 0; |
| | | }); |
| | | return time_str; |
| | | } |
| | | |
| | | export function donatebaseinfoEdit(data) { |
| | | updateDonatebaseinfo(data); |
| | | } |
| | | // 表åéç½® |
| | | export function resetForm(refName) { |
| | | if (this.$refs[refName]) { |
| | |
| | | // æ·»å æ¥æèå´ |
| | | export function addDateRange(params, dateRange, propName) { |
| | | let search = params; |
| | | search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {}; |
| | | search.params = |
| | | typeof search.params === "object" && |
| | | search.params !== null && |
| | | !Array.isArray(search.params) |
| | | ? search.params |
| | | : {}; |
| | | dateRange = Array.isArray(dateRange) ? dateRange : []; |
| | | if (typeof (propName) === 'undefined') { |
| | | search.params['beginTime'] = dateRange[0]; |
| | | search.params['endTime'] = dateRange[1]; |
| | | if (typeof propName === "undefined") { |
| | | search.params["beginTime"] = dateRange[0]; |
| | | search.params["endTime"] = dateRange[1]; |
| | | } else { |
| | | search.params['begin' + propName] = dateRange[0]; |
| | | search.params['end' + propName] = dateRange[1]; |
| | | search.params["begin" + propName] = dateRange[0]; |
| | | search.params["end" + propName] = dateRange[1]; |
| | | } |
| | | return search; |
| | | } |
| | |
| | | // åæ¾æ°æ®åå
¸ |
| | | export function selectDictLabel(datas, value) { |
| | | var actions = []; |
| | | Object.keys(datas).some((key) => { |
| | | if (datas[key].value == ('' + value)) { |
| | | Object.keys(datas).some(key => { |
| | | if (datas[key].value == "" + value) { |
| | | actions.push(datas[key].label); |
| | | return true; |
| | | } |
| | | }) |
| | | return actions.join(''); |
| | | }); |
| | | return actions.join(""); |
| | | } |
| | | |
| | | // åæ¾æ°æ®åå
¸ï¼å符串æ°ç»ï¼ |
| | |
| | | var actions = []; |
| | | var currentSeparator = undefined === separator ? "," : separator; |
| | | var temp = value.split(currentSeparator); |
| | | Object.keys(value.split(currentSeparator)).some((val) => { |
| | | Object.keys(datas).some((key) => { |
| | | if (datas[key].dictValue == ('' + temp[val])) { |
| | | Object.keys(value.split(currentSeparator)).some(val => { |
| | | Object.keys(datas).some(key => { |
| | | if (datas[key].dictValue == "" + temp[val]) { |
| | | actions.push(datas[key].dictLabel + currentSeparator); |
| | | } |
| | | }) |
| | | }) |
| | | return actions.join('').substring(0, actions.join('').length - 1); |
| | | }); |
| | | }); |
| | | return actions.join("").substring(0, actions.join("").length - 1); |
| | | } |
| | | |
| | | // åç¬¦ä¸²æ ¼å¼å(%s ) |
| | | export function sprintf(str) { |
| | | var args = arguments, flag = true, i = 1; |
| | | var args = arguments, |
| | | flag = true, |
| | | i = 1; |
| | | str = str.replace(/%s/g, function () { |
| | | var arg = args[i++]; |
| | | if (typeof arg === 'undefined') { |
| | | if (typeof arg === "undefined") { |
| | | flag = false; |
| | | return ''; |
| | | return ""; |
| | | } |
| | | return arg; |
| | | }); |
| | | return flag ? str : ''; |
| | | return flag ? str : ""; |
| | | } |
| | | |
| | | // 转æ¢å符串ï¼undefined,nullç转å为"" |
| | |
| | | } |
| | | } |
| | | return source; |
| | | }; |
| | | } |
| | | |
| | | /** |
| | | * æé æ åç»ææ°æ® |
| | |
| | | */ |
| | | export function handleTree(data, id, parentId, children) { |
| | | let config = { |
| | | id: id || 'id', |
| | | parentId: parentId || 'parentId', |
| | | childrenList: children || 'children' |
| | | id: id || "id", |
| | | parentId: parentId || "parentId", |
| | | childrenList: children || "children" |
| | | }; |
| | | |
| | | var childrenListMap = {}; |
| | |
| | | label="æä½" |
| | | align="center" |
| | | width="210" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="æä½" |
| | | fixed="right" |
| | | align="center" |
| | | width="210" |
| | | class-name="small-padding fixed-width" |
| | |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | this.$router.push("/case/confirmation"); |
| | | this.$router.push("/case/affirm"); |
| | | } else { |
| | | this.$message.error("ä¿å失败ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | |
| | | label="æä½" |
| | | align="center" |
| | | width="120" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | :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="caseNo"> |
| | | <el-input |
| | | v-model="queryParams.caseNo" |
| | | placeholder="请è¾å
¥æ¡ä¾ç¼å·" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | |
| | | clearable |
| | | style="width: 200px" |
| | | > |
| | | <el-option label="å·²åé
" value="allocated" /> |
| | | <el-option label="å¾
åé
" value="pending" /> |
| | | <el-option label="å
¨é¨" value="" /> |
| | | <el-option |
| | | v-for="dict in dict.type.allocation_Status" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åé
æ¶é´èå´" prop="allocationTimeRange"> |
| | | <el-date-picker |
| | | v-model="queryParams.allocationTimeRange" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 240px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleQuery" |
| | |
| | | @click="handleUpdate" |
| | | >ä¿®æ¹</el-button |
| | | > |
| | | <el-button |
| | | <!-- <el-button |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | :disabled="multiple" |
| | | :disabled="single" |
| | | @click="handleDelete" |
| | | >å é¤</el-button |
| | | > |
| | | > --> |
| | | </el-col> |
| | | <el-col :span="8" style="text-align: right"> |
| | | <el-tooltip content="å·æ°" placement="top"> |
| | |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column |
| | | label="ä½é¢å·" |
| | | label="æ¡ä¾ç¼å·" |
| | | align="center" |
| | | prop="hospitalNo" |
| | | prop="caseNo" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="æç®è
å§å" |
| | | label="æç®è
ç¼å·" |
| | | align="center" |
| | | prop="donorName" |
| | | prop="donorno" |
| | | width="120" |
| | | /> |
| | | <el-table-column label="æ§å«" align="center" prop="gender" width="80"> |
| | | <el-table-column |
| | | label="å§å" |
| | | align="center" |
| | | prop="name" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="ä½é¢å·" |
| | | align="center" |
| | | prop="inpatientno" |
| | | width="120" |
| | | /> |
| | | <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" |
| | | /> |
| | | <el-table-column |
| | | label="è¯ä»¶å·ç " |
| | | align="center" |
| | | prop="idcardno" |
| | | width="180" |
| | | /> |
| | | <el-table-column |
| | | label="ç¾ç
è¯æ" |
| | | align="center" |
| | | prop="diagnosis" |
| | | prop="diagnosisname" |
| | | min-width="180" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="å»çæºæ" |
| | | align="center" |
| | | prop="treatmenthospitalname" |
| | | min-width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | |
| | | width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="scope.row.allocationStatus === 'allocated' ? 'success' : 'warning'"> |
| | | {{ scope.row.allocationStatus === 'allocated' ? 'å·²åé
' : 'å¾
åé
' }} |
| | | </el-tag> |
| | | <dict-tag |
| | | :options="dict.type.allocation_Status" |
| | | :value="scope.row.allocationStatus" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | <el-table-column |
| | | label="ç»è®°äºº" |
| | | align="center" |
| | | prop="registrant" |
| | | prop="registrationName" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | |
| | | label="æä½" |
| | | align="center" |
| | | width="210" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | icon="el-icon-delete" |
| | | style="color: #F56C6C" |
| | | @click="handleDelete(scope.row)" |
| | | :disabled="scope.row.allocationStatus === '2'" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listOrganAllocation, delOrganAllocation } from "./organAllocation"; |
| | | import { allocationList, } from "@/api/businessApi"; |
| | | import Pagination from "@/components/Pagination"; |
| | | |
| | | export default { |
| | | name: "OrganAllocationList", |
| | | components: { Pagination }, |
| | | dicts: ["sys_user_sex"], |
| | | dicts: ["sys_user_sex", "allocation_Status"], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // é䏿°ç» |
| | | ids: [], |
| | | // éä¸çè¡æ°æ® |
| | | selectedRows: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | hospitalNo: undefined, |
| | | donorName: undefined, |
| | | allocationStatus: undefined |
| | | inpatientno: undefined, |
| | | name: undefined, |
| | | caseNo: undefined, |
| | | allocationStatus: undefined, |
| | | allocationTimeRange: [] |
| | | } |
| | | }; |
| | | }, |
| | |
| | | // æ¥è¯¢å¨å®åé
å表 |
| | | getList() { |
| | | this.loading = true; |
| | | listOrganAllocation(this.queryParams) |
| | | |
| | | // å¤çæ¥è¯¢åæ° |
| | | const params = { |
| | | ...this.queryParams |
| | | }; |
| | | |
| | | // ç§»é¤å页忰以å¤çé¢å¤åæ° |
| | | 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'; |
| | | } |
| | | |
| | | allocationList(params) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.organAllocationList = response.data.rows; |
| | | this.total = response.data.total; |
| | | this.organAllocationList = response.data || []; |
| | | this.total = response.total || 0; |
| | | } else { |
| | | this.$message.error("è·åæ°æ®å¤±è´¥"); |
| | | this.$message.error(response.msg || "è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | this.loading = false; |
| | | }) |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id); |
| | | this.ids = selection.map(item => item.infoid); |
| | | this.selectedRows = selection; |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | |
| | | handleView(row) { |
| | | this.$router.push({ |
| | | path: "/case/allocationInfo", |
| | | query: { id: row.id } |
| | | query: { id: row.infoid } |
| | | }); |
| | | }, |
| | | // æ°å¢æé®æä½ |
| | |
| | | }, |
| | | // ä¿®æ¹æé®æä½ |
| | | handleUpdate(row) { |
| | | const id = row.id || this.ids[0]; |
| | | const id = row.infoid || this.ids[0]; |
| | | this.$router.push({ |
| | | path: "/case/allocationInfo", |
| | | query: { id: id } |
| | |
| | | }, |
| | | // å é¤æé®æä½ |
| | | handleDelete(row) { |
| | | const ids = row.id ? [row.id] : this.ids; |
| | | const selectedRow = row || (this.selectedRows.length === 1 ? this.selectedRows[0] : null); |
| | | if (!selectedRow) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡è®°å½"); |
| | | return; |
| | | } |
| | | |
| | | this.$confirm("æ¯å¦ç¡®è®¤å é¤éä¸çæ°æ®é¡¹ï¼", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return delOrganAllocation(ids); |
| | | // return allocationdelete([selectedRow.infoid]); |
| | | }) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.getList(); |
| | | } else { |
| | | this.$message.error(response.msg || "å é¤å¤±è´¥"); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | width="200" |
| | | > |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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 |
| | | 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"> |
| | | å½åè§è²ï¼{{ currentDepartment }}è¯ä¼°äººå |
| | | </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="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 scope.row.assessments" |
| | | :key="`${scope.row.organno}_${index}`" |
| | | :label="`第${index + 1}次è¯ä¼°`" |
| | | :name="`assessment_${index}`" |
| | | > |
| | | <organ-assessment-form |
| | | :organ-data="scope.row" |
| | | :assessment-data="assessment" |
| | | :assessment-index="index" |
| | | :readonly="!canAssessOrgan(scope.row)" |
| | | @update-assessment="handleUpdateAssessment" |
| | | @delete-assessment="handleDeleteAssessment" |
| | | /> |
| | | </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="å¨å®ç±»å">{{ |
| | | getOrganLabel(scope.row.organno) |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è·åæºæ">{{ |
| | | scope.row.gainhospitalname |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¯ä¼°æ¬¡æ°" :span="2"> |
| | | <el-tag type="info" |
| | | >{{ scope.row.assessments.length }}次</el-tag |
| | | > |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ææ°è¯ä¼°æ¶é´" :span="2"> |
| | | {{ getLatestAssessmentTime(scope.row) || "-" }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <!-- è¯ä¼°è¯¦æ
æ±æ» --> |
| | | <el-card header="è¯ä¼°è¯¦æ
" style="margin-top: 20px;"> |
| | | <el-descriptions :column="1" border> |
| | | <el-descriptions-item label="è·ååæ´»æ£"> |
| | | <el-tag |
| | | :type=" |
| | | scope.row.isbiopsybefore === '1' |
| | | ? 'success' |
| | | : 'info' |
| | | " |
| | | > |
| | | {{ scope.row.isbiopsybefore === "1" ? "æ¯" : "å¦" }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è·ååæ´»æ£"> |
| | | <el-tag |
| | | :type=" |
| | | scope.row.isbiopsyafter === '1' |
| | | ? 'success' |
| | | : 'info' |
| | | " |
| | | > |
| | | {{ scope.row.isbiopsyafter === "1" ? "æ¯" : "å¦" }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è¾¹ç¼å¨å®"> |
| | | <el-tag |
| | | :type=" |
| | | scope.row.ismarginalorgan === '1' |
| | | ? 'warning' |
| | | : 'info' |
| | | " |
| | | > |
| | | {{ |
| | | scope.row.ismarginalorgan === "1" ? "æ¯" : "å¦" |
| | | }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ç
åè鳿§"> |
| | | <el-tag |
| | | :type=" |
| | | scope.row.ispathogenpositive === '1' |
| | | ? 'danger' |
| | | : 'info' |
| | | " |
| | | > |
| | | {{ |
| | | 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="è·åæºæ" |
| | | align="center" |
| | | prop="gainhospitalname" |
| | | show-overflow-tooltip |
| | | /> |
| | | |
| | | <!-- 卿æ¾ç¤ºè¯ä¼°ç¶æå --> |
| | | <el-table-column |
| | | v-for="(assessment, index) in getMaxAssessmentCount()" |
| | | :key="index" |
| | | :label="`第${index + 1}次è¯ä¼°`" |
| | | align="center" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag |
| | | v-if="scope.row.assessments[index]" |
| | | :type="getAssessmentTagType(scope.row.assessments[index].status)" |
| | | size="small" |
| | | > |
| | | {{ getAssessmentStatusText(scope.row.assessments[index].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="150" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="canAssessOrgan(scope.row) && isEdit" |
| | | size="mini" |
| | | type="text" |
| | | @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 |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | |
| | | <!-- æ´ä½ä¿åæé® --> |
| | | <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" |
| | | :file="currentPreviewFile" |
| | | @close="attachmentVisible = false" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | evaluateBaseInfolist, |
| | | assessedit, |
| | | assessAdd |
| | | } from "@/api/businessApi/index"; |
| | | import FilePreviewDialog from "@/components/FilePreviewDialog"; |
| | | import OrganAssessmentForm from "./components/OrganAssessmentForm.vue"; |
| | | |
| | | export default { |
| | | name: "AssessmentDetail", |
| | | components: { OrganAssessmentForm, FilePreviewDialog }, |
| | | dicts: ["sys_user_sex", "sys_Organ", "sys_0_1"], |
| | | data() { |
| | | return { |
| | | // æ¯å¦ç¼è¾æ¨¡å¼ |
| | | isEdit: false, |
| | | // å è½½ç¶æ |
| | | assessmentLoading: false, |
| | | saveLoading: false, |
| | | // æ°æ®ID |
| | | infoid: undefined, |
| | | assessmentId: undefined, |
| | | // ä¸»è¦æ°æ® |
| | | assessmentData: {}, |
| | | organAssessmentList: [], // ææå¨å®æ°æ® |
| | | // å±å¼è¡ç¸å
³ |
| | | expandedRowKeys: [], |
| | | // éä»¶ç¸å
³ |
| | | currentPreviewFile: null, |
| | | attachmentVisible: false, |
| | | // æç®å³å®ç¸å
³ |
| | | organdecisionValues: [], // åå¨åå
¸value |
| | | organdecisionOther: "", |
| | | // è®°å½æç®å³å®åååçå¼ |
| | | prevOrgandecisionValues: [], |
| | | // å¨å®ç±»åæ å°å
³ç³» |
| | | organDecisionMapping: { |
| | | // 使ç¨åå
¸valueä½ä¸ºkey |
| | | 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: "coordinator" // coordinator, doctor |
| | | }, |
| | | // è®°å½è¢«å é¤çå¨å®è¯ä¼° |
| | | deletedOrganAssessments: [], |
| | | // ç¨äºè¿½è¸ªtabæ¿æ´»ç¶æ |
| | | activeTabMap: new Map() |
| | | }; |
| | | }, |
| | | computed: { |
| | | isCoordinator() { |
| | | return this.currentUser.role === "coordinator"; |
| | | }, |
| | | currentDepartment() { |
| | | return this.currentUser.department; |
| | | }, |
| | | // æ ¹æ®æç®å³å®è¿æ»¤åçå¨å®å表 |
| | | 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 => |
| | | organ.assessments && |
| | | organ.assessments.length > 0 && |
| | | organ.assessments.every( |
| | | assessment => assessment.status === "assessed" |
| | | ) |
| | | ); |
| | | }, |
| | | // è·åå¨å®åå
¸ |
| | | organDict() { |
| | | return this.dict.type.sys_Organ || []; |
| | | }, |
| | | // 夿æ¯å¦éè¦æ¾ç¤ºå
¶ä»è¾å
¥æ¡ |
| | | showOtherInput() { |
| | | return this.organdecisionValues.includes("C01"); // åå
¸ä¸å
¶ä»çvalue |
| | | } |
| | | }, |
| | | watch: { |
| | | // ç嬿ç®å³å®ååï¼ç¨äºå¤æé»è¾å¤ç |
| | | organdecisionValues: { |
| | | handler(newVal, oldVal) { |
| | | this.handleComplexDecisionChange(newVal, oldVal); |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | created() { |
| | | this.infoid = this.$route.query.infoid; |
| | | this.assessmentId = this.$route.query.id; |
| | | this.isEdit = this.$route.query.assess === "true"; |
| | | this.getAssessmentDetail(); |
| | | }, |
| | | methods: { |
| | | // æ ¹æ®åå
¸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); |
| | | } |
| | | }, |
| | | |
| | | // å¤çè¯ä¼°æ´æ° |
| | | handleUpdateAssessment(data) { |
| | | const { organData, assessmentData, assessmentIndex } = data; |
| | | if (organData.assessments[assessmentIndex]) { |
| | | this.$set(organData.assessments, assessmentIndex, { |
| | | ...organData.assessments[assessmentIndex], |
| | | ...assessmentData |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // æ´ä½ä¿åæ¹æ³ |
| | | async handleSaveAll() { |
| | | this.saveLoading = true; |
| | | try { |
| | | // 1. åå¤ä¸»è¯ä¼°è¡¨æ°æ® |
| | | const saveData = { |
| | | // æ ¹æ® id æ¯å¦åå¨å³å®æ¯æ´æ°è¿æ¯æ°å¢ |
| | | 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), // ä¿ålabel |
| | | 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", // ä¿åå 餿 å¿ |
| | | // å° assessments æ°ç»åºååå° assesscontent åæ®µ |
| | | assesscontent: JSON.stringify(organ.assessments) |
| | | }) |
| | | ) |
| | | }; |
| | | |
| | | // 2. æ ¹æ® id 夿è°ç¨åªä¸ª API |
| | | const saveMethod = this.assessmentData.id ? assessedit : assessAdd; |
| | | const response = await saveMethod(saveData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success("è¯ä¼°è¡¨ä¿åæåï¼"); |
| | | // ä¿åæååï¼æ´æ°æ¬å°ç assessmentData.idï¼å¯¹äºæ°å¢æ
åµï¼ |
| | | if (!this.assessmentData.id && response.data && response.data.id) { |
| | | this.assessmentData.id = response.data.id; |
| | | } |
| | | } 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)); |
| | | |
| | | // 对æ°å¢å çéæ©è¿è¡ç¹æ®å¤ç |
| | | addedDecisions.forEach(decision => { |
| | | this.handleNewDecision(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)}ãæ²¡æé
ç½®å¨å®æ å°å
³ç³»` |
| | | ); |
| | | } |
| | | }, |
| | | |
| | | // å¤çç§»é¤çæç®å³å® |
| | | 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, // 使ç¨åå
¸value |
| | | organname: this.getOrganLabel(organValue), // 使ç¨åå
¸label |
| | | gainhospitalname: "å¾
åé
æºæ", |
| | | isbiopsybefore: "0", |
| | | isbiopsyafter: "0", |
| | | ismarginalorgan: "0", |
| | | ispathogenpositive: "0", |
| | | assessments: [this.getDefaultAssessment(0)], |
| | | activeTab: "assessment_0", // ç»ä¸ä½¿ç¨activeTab |
| | | 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 || "" |
| | | }; |
| | | |
| | | // å¤çæç®å³å®æ°æ® |
| | | if (detailData.organdecision) { |
| | | const decisionArray = Array.isArray(detailData.organdecision) |
| | | ? detailData.organdecision |
| | | : (detailData.organdecision || "").split(",").filter(item => item); |
| | | |
| | | this.organdecisionValues = decisionArray; |
| | | this.prevOrgandecisionValues = [...decisionArray]; // åå§åprevOrgandecisionValues |
| | | this.organdecisionOther = detailData.organdecisionOther || ""; |
| | | } |
| | | |
| | | // å¤çå¨å®è¯ä¼°æ°æ® |
| | | this.processOrganAssessmentData(detailData); |
| | | }, |
| | | |
| | | // å¤çå¨å®è¯ä¼°æ°æ® |
| | | processOrganAssessmentData(detailData) { |
| | | let organList = []; |
| | | |
| | | // 仿¥å£æ°æ®ä¸è·åå¨å®è¯ä¼°å表 |
| | | if (detailData.serviceMedicalevaluationorganList) { |
| | | if (Array.isArray(detailData.serviceMedicalevaluationorganList)) { |
| | | organList = detailData.serviceMedicalevaluationorganList; |
| | | } |
| | | } |
| | | |
| | | // 转æ¢å¨å®æ°æ®æ ¼å¼ï¼æ¯æå¤æ¬¡è¯ä¼° |
| | | this.organAssessmentList = organList.map(organ => { |
| | | let assessments = []; |
| | | |
| | | // è§£æassesscontentåæ®µä¸ç夿¬¡è¯ä¼°æ°æ® |
| | | if (organ.assesscontent) { |
| | | try { |
| | | const assessData = |
| | | typeof organ.assesscontent === "string" |
| | | ? JSON.parse(organ.assesscontent) |
| | | : organ.assesscontent; |
| | | console.log(assessData, "assessData"); |
| | | |
| | | if (Array.isArray(assessData)) { |
| | | // è¿æ»¤æå·²å é¤çè¯ä¼° |
| | | const validAssessments = assessData.filter( |
| | | item => item.delFlag !== "1" |
| | | ); |
| | | console.log(validAssessments,'validAssessments'); |
| | | |
| | | // assessments.push( |
| | | // ...validAssessments.map((item, index) => ({ |
| | | // ...item, |
| | | // index: index, |
| | | // status: item.status || "assessed", |
| | | // delFlag: item.delFlag || "0" |
| | | // })) |
| | | // ); |
| | | assessments = validAssessments; |
| | | } |
| | | } catch (error) { |
| | | console.warn("è§£æè¯ä¼°å
容失败:", error); |
| | | assessments.push(this.getDefaultAssessment(0)); |
| | | } |
| | | } else { |
| | | assessments.push(this.getDefaultAssessment(0)); |
| | | } |
| | | |
| | | const organno = organ.organno; |
| | | const activeTab = this.activeTabMap.has(organno) |
| | | ? this.activeTabMap.get(organno) |
| | | : assessments.length > 0 |
| | | ? "assessment_0" |
| | | : "summary"; |
| | | |
| | | return { |
| | | ...organ, |
| | | // ç¡®ä¿organname使ç¨åå
¸label |
| | | organname: this.getOrganLabel(organ.organno) || organ.organname, |
| | | assessments: assessments, |
| | | activeTab: activeTab, |
| | | expanded: false, |
| | | delFlag: organ.delFlag || "0" |
| | | }; |
| | | }); |
| | | console.log(this.organAssessmentList, "this.organAssessmentList"); |
| | | }, |
| | | |
| | | // è·åé»è®¤è¯ä¼°æ°æ®ç»æ |
| | | 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 => (organ.assessments ? organ.assessments.length : 0)) |
| | | ); |
| | | return Math.max(maxCount, 1); |
| | | }, |
| | | |
| | | // è·åå¨å®æ´ä½ç¶æ |
| | | getOrganOverallStatus(organ) { |
| | | if (!organ.assessments || organ.assessments.length === 0) { |
| | | return "pending"; |
| | | } |
| | | |
| | | const validAssessments = organ.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 = { |
| | | pending: "å¾
è¯ä¼°", |
| | | assessing: "è¯ä¼°ä¸", |
| | | completed: "已宿" |
| | | }; |
| | | return statusMap[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 newAssessment = { |
| | | ...this.getDefaultAssessment(organ.assessments.length), |
| | | assessor: this.currentUser.name |
| | | }; |
| | | |
| | | organ.assessments.push(newAssessment); |
| | | // 忢尿°æ·»å çè¯ä¼°tab |
| | | organ.activeTab = `assessment_${organ.assessments.length - 1}`; |
| | | this.activeTabMap.set(organ.organno, organ.activeTab); |
| | | |
| | | this.$message.success("å·²æ·»å æ°çè¯ä¼°"); |
| | | }, |
| | | |
| | | // å¤çè¯ä¼°æ´æ°äºä»¶ |
| | | handleUpdateAssessment(data) { |
| | | const { organData, assessmentData, assessmentIndex } = data; |
| | | if (organData.assessments[assessmentIndex]) { |
| | | this.$set(organData.assessments, assessmentIndex, { |
| | | ...organData.assessments[assessmentIndex], |
| | | ...assessmentData |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // å¤çå é¤è¯ä¼°äºä»¶ |
| | | handleDeleteAssessment(data) { |
| | | const { organData, assessmentIndex } = data; |
| | | this.deleteOrganAssessment(organData, assessmentIndex); |
| | | }, |
| | | |
| | | // å é¤å¨å®è¯ä¼° |
| | | async deleteOrganAssessment(organ, assessmentIndex) { |
| | | try { |
| | | await this.$confirm( |
| | | `确认å é¤ç¬¬${assessmentIndex + 1}次è¯ä¼°è®°å½åï¼`, |
| | | "确认å é¤", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | } |
| | | ); |
| | | |
| | | // æ è®°è¯ä¼°ä¸ºå é¤ |
| | | if (organ.assessments[assessmentIndex]) { |
| | | this.$set(organ.assessments[assessmentIndex], "delFlag", "1"); |
| | | |
| | | // è¿æ»¤æå·²å é¤çè¯ä¼° |
| | | organ.assessments = organ.assessments.filter( |
| | | item => item.delFlag !== "1" |
| | | ); |
| | | |
| | | // éæ°è®¡ç®è¯ä¼°ç´¢å¼ |
| | | organ.assessments.forEach((assessment, index) => { |
| | | assessment.index = index; |
| | | }); |
| | | |
| | | // 妿å é¤å没æè¯ä¼°äºï¼æ¾ç¤ºæ±æ»é¡µ |
| | | if (organ.assessments.length === 0) { |
| | | organ.activeTab = "summary"; |
| | | this.activeTabMap.set(organ.organno, "summary"); |
| | | } else if (organ.activeTab === `assessment_${assessmentIndex}`) { |
| | | // 妿å½åæ¿æ´»çå°±æ¯è¢«å é¤çtabï¼åæ¢å°åä¸ä¸ª |
| | | const newIndex = Math.max(0, assessmentIndex - 1); |
| | | organ.activeTab = `assessment_${newIndex}`; |
| | | this.activeTabMap.set(organ.organno, `assessment_${newIndex}`); |
| | | } else if (organ.activeTab === "summary") { |
| | | this.activeTabMap.set(organ.organno, "summary"); |
| | | } |
| | | |
| | | this.$message.success("è¯ä¼°è®°å½å·²å é¤"); |
| | | } |
| | | } catch (cancelError) { |
| | | // ç¨æ·åæ¶å é¤ |
| | | this.$message.info("已忶å é¤"); |
| | | } |
| | | }, |
| | | |
| | | // è·åææ°è¯ä¼°æ¶é´ |
| | | getLatestAssessmentTime(organ) { |
| | | if (!organ.assessments || organ.assessments.length === 0) return null; |
| | | |
| | | const assessed = organ.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 = { |
| | | pending: "warning", |
| | | assessing: "primary", |
| | | assessed: "success" |
| | | }; |
| | | return typeMap[status] || "info"; |
| | | }, |
| | | |
| | | // è·åè¯ä¼°ç¶æææ¬ |
| | | getAssessmentStatusText(status) { |
| | | const textMap = { |
| | | pending: "å¾
è¯ä¼°", |
| | | assessing: "è¯ä¼°ä¸", |
| | | assessed: "å·²è¯ä¼°" |
| | | }; |
| | | return textMap[status] || "æªç¥"; |
| | | }, |
| | | |
| | | // æ£æ¥è¯ä¼°æé |
| | | canAssessOrgan(organ) { |
| | | if (this.isCoordinator) return true; |
| | | if (!this.isEdit) return false; |
| | | return ( |
| | | organ.gainhospitalname && |
| | | organ.gainhospitalname.includes(this.currentDepartment) |
| | | ); |
| | | }, |
| | | |
| | | // è·åè¡ç±»å |
| | | getRowClassName({ row }) { |
| | | return this.canAssessOrgan(row) ? "assessable-row" : "non-assessable-row"; |
| | | }, |
| | | |
| | | // ç¶æè¿æ»¤å¨ |
| | | statusFilter(status) { |
| | | const statusMap = { |
| | | "1": "warning", |
| | | "2": "primary", |
| | | "3": "success" |
| | | }; |
| | | return statusMap[status] || "info"; |
| | | }, |
| | | |
| | | statusTextFilter(status) { |
| | | const statusMap = { |
| | | "1": "å¾
è¯ä¼°", |
| | | "2": "è¯ä¼°ä¸", |
| | | "3": "已宿" |
| | | }; |
| | | return statusMap[status] || "æªç¥"; |
| | | }, |
| | | |
| | | // æ¥çéä»¶ |
| | | handleAttachmentPreview() { |
| | | 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("ææ éä»¶"); |
| | | } |
| | | }, |
| | | |
| | | // 宿è¯ä¼° |
| | | 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("æä½å¤±è´¥"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .assessment-detail { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .basic-info-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .organ-assessment-card { |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | /* å±å¼è¡æ ·å¼ */ |
| | | .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: #f0f9ff; |
| | | } |
| | | |
| | | ::v-deep .non-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; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .fixed-width .el-button { |
| | | margin: 0 2px; |
| | | } |
| | | |
| | | /* æç®å³å®æ ·å¼ä¼å */ |
| | | .organ-decision-info { |
| | | margin: 10px 0; |
| | | padding: 10px; |
| | | background-color: #f8f9fa; |
| | | border-radius: 4px; |
| | | border-left: 4px solid #409eff; |
| | | } |
| | | |
| | | .decision-tag { |
| | | margin: 2px 5px; |
| | | } |
| | | </style> |
| | |
| | | <el-form> |
| | | <el-form-item label-width="100px" label="æç®å³å®"> |
| | | <el-checkbox-group |
| | | v-model="organdecision" |
| | | v-model="organdecisionValues" |
| | | @change="handleOrganDecisionChange" |
| | | :disabled="!isEdit" |
| | | > |
| | | <el-checkbox |
| | | v-for="item in organselection" |
| | | :key="item" |
| | | :label="item" |
| | | >{{ item }} |
| | | 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="organdecision.includes('å
¶ä»')" |
| | | v-if="showOtherInput" |
| | | v-model="organdecisionOther" |
| | | placeholder="请è¾å
¥å
¶ä»æç®å³å®çå
·ä½å
容" |
| | | style="margin-top: 10px; width: 300px;" |
| | |
| | | <template slot-scope="scope"> |
| | | <div class="organ-expand-content" v-if="scope.row.expanded"> |
| | | <el-tabs |
| | | v-model="scope.row.activeAssessmentTab" |
| | | 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 scope.row.assessments" |
| | | :key="index" |
| | | v-for="(assessment, index) in getOrganAssessments(scope.row)" |
| | | :key="`${scope.row.organno}_${index}`" |
| | | :label="`第${index + 1}次è¯ä¼°`" |
| | | :name="`assessment_${index}`" |
| | | :name="index" |
| | | > |
| | | <organ-assessment-form |
| | | :organ-data="scope.row" |
| | | :assessment-data="assessment" |
| | | :assessment-index="index" |
| | | :readonly="!canAssessOrgan(scope.row)" |
| | | @add-assessment="handleAddAssessment" |
| | | :current-user="currentUser" |
| | | @update-assessment="handleUpdateAssessment" |
| | | @delete-assessment="handleDeleteAssessment" |
| | | @save-assessment="handleSaveAssessment" |
| | | /> |
| | | </el-tab-pane> |
| | | |
| | |
| | | <!-- è¯ä¼°æ±æ»Tab --> |
| | | <el-tab-pane label="è¯ä¼°æ±æ»" name="summary"> |
| | | <div class="assessment-summary"> |
| | | <el-descriptions title="è¯ä¼°ç»ææ±æ»" :column="2" border> |
| | | <el-descriptions-item label="å¨å®ç±»å">{{ |
| | | scope.row.organname |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è·åæºæ">{{ |
| | | scope.row.gainhospitalname |
| | | }}</el-descriptions-item> |
| | | <!-- åºæ¬ä¿¡æ¯æ±æ» --> |
| | | <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" |
| | | >{{ scope.row.assessments.length }}次</el-tag |
| | | > |
| | | <el-tag type="info" size="medium"> |
| | | {{ getAssessmentCount(scope.row) }}次 |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ææ°è¯ä¼°æ¶é´" :span="2"> |
| | | {{ getLatestAssessmentTime(scope.row) || "-" }} |
| | | <span class="highlight-text">{{ getLatestAssessmentTime(scope.row) || "-" }}</span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <!-- è¯ä¼°è¯¦æ
æ±æ» --> |
| | | <el-card header="è¯ä¼°è¯¦æ
" style="margin-top: 20px;"> |
| | | <el-descriptions :column="1" border> |
| | | <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=" |
| | |
| | | ? 'success' |
| | | : 'info' |
| | | " |
| | | size="small" |
| | | > |
| | | {{ scope.row.isbiopsybefore === "1" ? "æ¯" : "å¦" }} |
| | | </el-tag> |
| | |
| | | ? 'success' |
| | | : 'info' |
| | | " |
| | | size="small" |
| | | > |
| | | {{ scope.row.isbiopsyafter === "1" ? "æ¯" : "å¦" }} |
| | | </el-tag> |
| | |
| | | ? 'warning' |
| | | : 'info' |
| | | " |
| | | size="small" |
| | | > |
| | | {{ |
| | | scope.row.ismarginalorgan === "1" ? "æ¯" : "å¦" |
| | |
| | | ? 'danger' |
| | | : 'info' |
| | | " |
| | | size="small" |
| | | > |
| | | {{ |
| | | scope.row.ispathogenpositive === "1" ? "æ¯" : "å¦" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="å¨å®ç±»å" align="center" prop="organname" /> |
| | | <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 |
| | | v-for="(assessment, index) in getMaxAssessmentCount()" |
| | | v-for="index in getMaxAssessmentCount()" |
| | | :key="index" |
| | | :label="`第${index + 1}次è¯ä¼°`" |
| | | :label="`第${index}次è¯ä¼°`" |
| | | align="center" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag |
| | | v-if="scope.row.assessments[index]" |
| | | :type="getAssessmentTagType(scope.row.assessments[index].status)" |
| | | v-if="getOrganAssessments(scope.row)[index - 1]" |
| | | :type=" |
| | | getAssessmentTagType( |
| | | getOrganAssessments(scope.row)[index - 1].status |
| | | ) |
| | | " |
| | | size="small" |
| | | > |
| | | {{ getAssessmentStatusText(scope.row.assessments[index].status) }} |
| | | {{ |
| | | getAssessmentStatusText( |
| | | getOrganAssessments(scope.row)[index - 1].status |
| | | ) |
| | | }} |
| | | </el-tag> |
| | | <el-tag v-else type="info" size="small">æªè¯ä¼°</el-tag> |
| | | </template> |
| | |
| | | |
| | | <!-- æ´ä½ä¿åæé® --> |
| | | <div class="footer-actions" v-if="isEdit"> |
| | | <el-button type="primary" @click="handleSaveAll" :loading="saveLoading">ä¿åè¯ä¼°è¡¨</el-button> |
| | | <el-button type="primary" @click="handleSaveAll" :loading="saveLoading" |
| | | >ä¿åè¯ä¼°è¡¨</el-button |
| | | > |
| | | <el-button @click="handleCancel">åæ¶</el-button> |
| | | </div> |
| | | |
| | |
| | | currentPreviewFile: null, |
| | | attachmentVisible: false, |
| | | // æç®å³å®ç¸å
³ |
| | | organdecision: [], |
| | | organdecisionValues: [], // åå¨åå
¸value |
| | | organdecisionOther: "", |
| | | organselection: [ |
| | | "èè", |
| | | "åè¾", |
| | | "å·¦è¾", |
| | | "å³è¾", |
| | | "å¿è", |
| | | "èºè", |
| | | "è°è
º", |
| | | "å°è ", |
| | | "åç¼ç»ç»", |
| | | "éä½", |
| | | "å
¶ä»" |
| | | ], |
| | | // è®°å½æç®å³å®åååçå¼ |
| | | 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: "doctor" // coordinator, doctor |
| | | } |
| | | role: "coordinator" |
| | | }, |
| | | // è®°å½è¢«å é¤çå¨å®è¯ä¼° |
| | | deletedOrganAssessments: [], |
| | | // ç¨äºè¿½è¸ªtabæ¿æ´»ç¶æ |
| | | activeTabMap: new Map(), |
| | | // å·æ°key |
| | | refreshKey: 0 |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | // æ ¹æ®æç®å³å®è¿æ»¤åçå¨å®å表 |
| | | filteredOrganAssessmentList() { |
| | | if (!this.organdecision || this.organdecision.length === 0) { |
| | | if (!this.organdecisionValues || this.organdecisionValues.length === 0) { |
| | | return []; |
| | | } |
| | | |
| | | // è·åææéä¸çå¨å®ç±»å |
| | | const selectedOrgans = new Set(); |
| | | this.organdecision.forEach(decision => { |
| | | this.organdecisionValues.forEach(decision => { |
| | | const organs = this.organDecisionMapping[decision] || []; |
| | | organs.forEach(organ => selectedOrgans.add(organ)); |
| | | }); |
| | | |
| | | // è¿æ»¤å¨å®è¯ä¼°å表 |
| | | return this.organAssessmentList.filter(organ => |
| | | selectedOrgans.has(organ.organname) |
| | | return this.organAssessmentList.filter( |
| | | organ => |
| | | selectedOrgans.has(organ.organno) && |
| | | organ.delFlag !== "1" && |
| | | !this.deletedOrganAssessments.includes(organ.organno) |
| | | ); |
| | | }, |
| | | // æ£æ¥ææè¿æ»¤åçå¨å®æ¯å¦é½å·²è¯ä¼° |
| | | allOrgansAssessed() { |
| | | return this.filteredOrganAssessmentList.every( |
| | | organ => |
| | | organ.assessments && |
| | | organ.assessments.length > 0 && |
| | | organ.assessments.every( |
| | | assessment => assessment.status === "assessed" |
| | | ) |
| | | 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: { |
| | | // ç嬿ç®å³å®ååï¼ç¨äºå¤æé»è¾å¤ç |
| | | organdecision: { |
| | | organdecisionValues: { |
| | | handler(newVal, oldVal) { |
| | | this.handleComplexDecisionChange(newVal, oldVal); |
| | | }, |
| | |
| | | this.getAssessmentDetail(); |
| | | }, |
| | | methods: { |
| | | // æ ¹æ®åå
¸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 { |
| | | // 1. åå¤ä¸»è¯ä¼°è¡¨æ°æ® |
| | | const saveData = { |
| | | // æ ¹æ® id æ¯å¦åå¨å³å®æ¯æ´æ°è¿æ¯æ°å¢ |
| | | id: this.assessmentData.id || undefined, |
| | | infoid: this.infoid, |
| | | caseNo: this.assessmentData.caseNo, |
| | |
| | | idcardno: this.assessmentData.idcardno, |
| | | diagnosisname: this.assessmentData.diagnosisname, |
| | | coordinatorName: this.assessmentData.coordinatorName, |
| | | assessTime: this.assessmentData.assessTime || new Date().toISOString(), |
| | | assessTime: |
| | | this.assessmentData.assessTime || new Date().toISOString(), |
| | | assessState: this.assessmentData.assessState, |
| | | assessannex: this.assessmentData.assessannex, |
| | | // æç®å³å®ä¿¡æ¯ |
| | | organdecision: this.organdecision.join(','), |
| | | organdecision: this.organdecisionValues.join(","), |
| | | organdecisionOther: this.organdecisionOther, |
| | | // å¨å®è¯ä¼°å表 |
| | | serviceMedicalevaluationorgans: this.organAssessmentList.map(organ => ({ |
| | | serviceMedicalevaluationorganList: this.organAssessmentList.map( |
| | | organ => ({ |
| | | id: organ.id, |
| | | infoid: organ.infoid, |
| | | donorno: organ.donorno, |
| | | organno: organ.organno, |
| | | organname: organ.organname, |
| | | organname: this.getOrganLabel(organ.organno), |
| | | organnumber: organ.organnumber, |
| | | gainhospitalno: organ.gainhospitalno, |
| | | gainhospitalname: organ.gainhospitalname, |
| | |
| | | ispathogenpositive: organ.ispathogenpositive, |
| | | ispnf: organ.ispnf, |
| | | isdgf: organ.isdgf, |
| | | // å° assessments æ°ç»åºååå° assesscontent åæ®µ |
| | | assesscontent: JSON.stringify(organ.assessments) |
| | | })) |
| | | delFlag: organ.delFlag || "0", |
| | | assesscontent: organ.assesscontent || "[]" |
| | | }) |
| | | ) |
| | | }; |
| | | |
| | | // 2. æ ¹æ® id 夿è°ç¨åªä¸ª API |
| | | const saveMethod = this.assessmentData.id ? assessedit : assessAdd; |
| | | const response = await saveMethod(saveData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success('è¯ä¼°è¡¨ä¿åæåï¼'); |
| | | // ä¿åæååï¼æ´æ°æ¬å°ç assessmentData.idï¼å¯¹äºæ°å¢æ
åµï¼ |
| | | this.$message.success("è¯ä¼°è¡¨ä¿åæåï¼"); |
| | | if (!this.assessmentData.id && response.data && response.data.id) { |
| | | this.assessmentData.id = response.data.id; |
| | | } |
| | | this.refreshKey += 1; // 触åéæ°æ¸²æ |
| | | } else { |
| | | this.$message.error('ä¿å失败ï¼' + (response.msg || 'æªç¥é误')); |
| | | this.$message.error("ä¿å失败ï¼" + (response.msg || "æªç¥é误")); |
| | | } |
| | | } catch (error) { |
| | | console.error('ä¿åè¯ä¼°è¡¨å¤±è´¥:', error); |
| | | this.$message.error('ä¿å失败ï¼è¯·éè¯'); |
| | | console.error("ä¿åè¯ä¼°è¡¨å¤±è´¥:", error); |
| | | this.$message.error("ä¿å失败ï¼è¯·éè¯"); |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | |
| | | }, |
| | | |
| | | // æç®å³å®åæ´å¤ç |
| | | handleOrganDecisionChange(newDecision) { |
| | | // èªå¨å¤çç¸å
³é»è¾ |
| | | 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 = []; |
| | | } |
| | |
| | | |
| | | // èªå¨å¤çå³å®åæ´é»è¾ |
| | | autoHandleDecisionChange(newDecision) { |
| | | // 妿鿩äº"åè¾"ï¼èªå¨åæ¶åç¬ç"å·¦è¾"å"å³è¾"éæ© |
| | | if (newDecision.includes("åè¾")) { |
| | | this.organdecision = newDecision.filter( |
| | | item => item !== "å·¦è¾" && item !== "å³è¾" |
| | | // 妿鿩äº"åè¾"(value: C64)ï¼èªå¨åæ¶åç¬ç"å·¦è¾"(value: C64L)å"å³è¾"(value: C64R)éæ© |
| | | if (newDecision.includes("C64")) { |
| | | this.organdecisionValues = newDecision.filter( |
| | | item => item !== "C64L" && item !== "C64R" |
| | | ); |
| | | } |
| | | // 妿鿩äº"å·¦è¾"æ"å³è¾"ï¼åæ¶"åè¾"éæ© |
| | | else if (newDecision.includes("å·¦è¾") || newDecision.includes("å³è¾")) { |
| | | this.organdecision = newDecision.filter(item => item !== "åè¾"); |
| | | 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() { |
| | | // é使ç®ä¸å
¶ä»å¨å®æç®äºæ¥ï¼æ ¹æ®ä¸å¡éæ±è°æ´ï¼ |
| | | if (this.organdecision.includes("éä½")) { |
| | | // é使ç®(value: 10)ä¸å
¶ä»å¨å®æç®äºæ¥ï¼æ ¹æ®ä¸å¡éæ±è°æ´ï¼ |
| | | if (this.organdecisionValues.includes("10")) { |
| | | // å¯ä»¥è®¾ç½®åªä¿çé使ç®ï¼æè
æ ¹æ®ä¸å¡éæ±å¤ç |
| | | } |
| | | }, |
| | |
| | | const organsToCreate = this.organDecisionMapping[decision]; |
| | | |
| | | if (organsToCreate && organsToCreate.length > 0) { |
| | | organsToCreate.forEach(organName => { |
| | | this.ensureOrganExists(organName); |
| | | organsToCreate.forEach(organValue => { |
| | | this.ensureOrganExists(organValue); |
| | | }); |
| | | |
| | | // æ¾ç¤ºå建æç¤º |
| | | if (organsToCreate.length > 0) { |
| | | this.$message.success( |
| | | `已为ã${decision}ãå建${organsToCreate.length}个è¯ä¼°é¡¹` |
| | | `已为ã${this.getOrganLabel(decision)}ãå建${ |
| | | organsToCreate.length |
| | | }个è¯ä¼°é¡¹` |
| | | ); |
| | | } |
| | | } else { |
| | | console.warn(`æç®å³å®ã${decision}ãæ²¡æé
ç½®å¨å®æ å°å
³ç³»`); |
| | | console.warn( |
| | | `æç®å³å®ã${this.getOrganLabel(decision)}ãæ²¡æé
ç½®å¨å®æ å°å
³ç³»` |
| | | ); |
| | | } |
| | | }, |
| | | |
| | | // å¤çç§»é¤çæç®å³å® |
| | | handleRemovedDecision(decision) { |
| | | // æ ¹æ®ä¸å¡éæ±æ·»å æ¸
çé»è¾ |
| | | async handleRemovedDecision(decision) { |
| | | const relatedOrgans = this.organDecisionMapping[decision] || []; |
| | | relatedOrgans.forEach(organ => { |
| | | // å¯ä»¥å¨è¿éæ·»å æ¸
çç¸å
³å¨å®è¯ä¼°çé»è¾ |
| | | }); |
| | | |
| | | 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(organName) { |
| | | // æ£æ¥æ¯å¦å·²åå¨ååå¨å®è¯ä¼°é¡¹ |
| | | // ç¡®ä¿å¨å®åå¨ |
| | | ensureOrganExists(organValue) { |
| | | const exists = this.organAssessmentList.some( |
| | | organ => organ.organname === organName |
| | | organ => organ.organno === organValue && organ.delFlag !== "1" |
| | | ); |
| | | |
| | | if (!exists) { |
| | | // å建æ°çå¨å®è¯ä¼°é¡¹ |
| | | const newOrgan = { |
| | | id: `organ_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`, |
| | | organno: `ORG${Date.now()}`, |
| | | organname: organName, |
| | | id: null, |
| | | organno: organValue, |
| | | organname: this.getOrganLabel(organValue), |
| | | gainhospitalname: "å¾
åé
æºæ", |
| | | isbiopsybefore: "0", |
| | | isbiopsyafter: "0", |
| | | ismarginalorgan: "0", |
| | | ispathogenpositive: "0", |
| | | assessments: [this.getDefaultAssessment(0)], |
| | | activeAssessmentTab: "assessment_0", |
| | | assesscontent: JSON.stringify([this.getDefaultAssessment(0)]), |
| | | activeTab: 0, |
| | | expanded: false, |
| | | createTime: new Date().toISOString() |
| | | createTime: new Date().toISOString(), |
| | | delFlag: "0" |
| | | }; |
| | | |
| | | this.organAssessmentList = [...this.organAssessmentList, newOrgan]; |
| | |
| | | handleResponseData(response) { |
| | | let detailData = null; |
| | | |
| | | // æ ¹æ®æ¥å£å®é
è¿åçæ°æ®ç»æè¿è¡è°æ´ |
| | | if (response.data) { |
| | | if (Array.isArray(response.data)) { |
| | | detailData = response.data[0] || {}; |
| | |
| | | detailData = response; |
| | | } |
| | | |
| | | // æ å°å段å°è¯ä¼°æ°æ® |
| | | this.assessmentData = { |
| | | id: detailData.id || this.assessmentId, |
| | | infoid: detailData.infoid || this.infoid, |
| | |
| | | assessannex: detailData.assessannex || "" |
| | | }; |
| | | |
| | | // å¤çæç®å³å®æ°æ® |
| | | if (detailData.organdecision) { |
| | | this.organdecision = Array.isArray(detailData.organdecision) |
| | | const decisionArray = Array.isArray(detailData.organdecision) |
| | | ? detailData.organdecision |
| | | : (detailData.organdecision || "").split(","); |
| | | : (detailData.organdecision || "").split(",").filter(item => item); |
| | | |
| | | this.organdecisionValues = decisionArray; |
| | | this.prevOrgandecisionValues = [...decisionArray]; |
| | | this.organdecisionOther = detailData.organdecisionOther || ""; |
| | | } |
| | | |
| | | // å¤çå¨å®è¯ä¼°æ°æ® |
| | | this.processOrganAssessmentData(detailData); |
| | | }, |
| | | |
| | |
| | | processOrganAssessmentData(detailData) { |
| | | let organList = []; |
| | | |
| | | // 仿¥å£æ°æ®ä¸è·åå¨å®è¯ä¼°å表 |
| | | if (detailData.serviceMedicalevaluationorgans) { |
| | | if (Array.isArray(detailData.serviceMedicalevaluationorgans)) { |
| | | organList = detailData.serviceMedicalevaluationorgans; |
| | | if (detailData.serviceMedicalevaluationorganList) { |
| | | if (Array.isArray(detailData.serviceMedicalevaluationorganList)) { |
| | | organList = detailData.serviceMedicalevaluationorganList; |
| | | } |
| | | } |
| | | |
| | | // 转æ¢å¨å®æ°æ®æ ¼å¼ï¼æ¯æå¤æ¬¡è¯ä¼° |
| | | this.organAssessmentList = organList.map(organ => { |
| | | const assessments = []; |
| | | const organno = organ.organno; |
| | | |
| | | // è§£æassesscontentåæ®µä¸ç夿¬¡è¯ä¼°æ°æ® |
| | | if (organ.assesscontent) { |
| | | // 妿 assesscontent æ¯å符串ï¼ç¡®ä¿å®æ¯ææç JSON |
| | | if (organ.assesscontent && typeof organ.assesscontent === "string") { |
| | | try { |
| | | const assessData = typeof organ.assesscontent === "string" |
| | | ? JSON.parse(organ.assesscontent) |
| | | : organ.assesscontent; |
| | | |
| | | if (Array.isArray(assessData)) { |
| | | assessments.push( |
| | | ...assessData.map((item, index) => ({ |
| | | ...item, |
| | | index: index, |
| | | status: item.status || "assessed" |
| | | })) |
| | | ); |
| | | } |
| | | JSON.parse(organ.assesscontent); |
| | | } catch (error) { |
| | | console.warn("è§£æè¯ä¼°å
容失败:", error); |
| | | assessments.push(this.getDefaultAssessment(0)); |
| | | console.warn( |
| | | "æ æç assesscontentï¼é置为空æ°ç»:", |
| | | organ.assesscontent |
| | | ); |
| | | organ.assesscontent = "[]"; |
| | | } |
| | | } else { |
| | | assessments.push(this.getDefaultAssessment(0)); |
| | | } 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, |
| | | assessments: assessments, |
| | | activeAssessmentTab: assessments.length > 0 ? "assessment_0" : "summary", |
| | | expanded: false |
| | | organname: this.getOrganLabel(organ.organno) || organ.organname, |
| | | activeTab: activeTab, |
| | | expanded: false, |
| | | delFlag: organ.delFlag || "0" |
| | | }; |
| | | }); |
| | | }, |
| | |
| | | assessmentOpinion: "", |
| | | clinicalData: {}, |
| | | labResults: {}, |
| | | createTime: new Date().toISOString() |
| | | createTime: new Date().toISOString(), |
| | | delFlag: "0" |
| | | }; |
| | | }, |
| | | |
| | | // è®¡ç®æå¤§è¯ä¼°æ¬¡æ° |
| | | getMaxAssessmentCount() { |
| | | const maxCount = Math.max( |
| | | ...this.organAssessmentList.map(organ => |
| | | organ.assessments ? organ.assessments.length : 0 |
| | | ) |
| | | ...this.organAssessmentList |
| | | .filter(organ => organ.delFlag !== "1") |
| | | .map(organ => this.getAssessmentCount(organ)) |
| | | ); |
| | | return Math.max(maxCount, 1); |
| | | }, |
| | | |
| | | // è·åå¨å®æ´ä½ç¶æ |
| | | getOrganOverallStatus(organ) { |
| | | if (!organ.assessments || organ.assessments.length === 0) { |
| | | const assessments = this.getOrganAssessments(organ); |
| | | if (assessments.length === 0) { |
| | | return "pending"; |
| | | } |
| | | |
| | | const allAssessed = organ.assessments.every( |
| | | const validAssessments = assessments.filter(a => a.delFlag !== "1"); |
| | | if (validAssessments.length === 0) { |
| | | return "pending"; |
| | | } |
| | | |
| | | const allAssessed = validAssessments.every( |
| | | assessment => assessment.status === "assessed" |
| | | ); |
| | | const someAssessed = organ.assessments.some( |
| | | const someAssessed = validAssessments.some( |
| | | assessment => assessment.status === "assessed" |
| | | ); |
| | | |
| | |
| | | |
| | | // æ·»å æ°è¯ä¼° |
| | | handleAddNewAssessment(organ) { |
| | | const assessments = this.getOrganAssessments(organ); |
| | | const newAssessment = { |
| | | ...this.getDefaultAssessment(organ.assessments.length), |
| | | ...this.getDefaultAssessment(assessments.length), |
| | | assessor: this.currentUser.name |
| | | }; |
| | | |
| | | organ.assessments.push(newAssessment); |
| | | organ.activeAssessmentTab = `assessment_${organ.assessments.length - 1}`; |
| | | 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("å·²æ·»å æ°çè¯ä¼°"); |
| | | }, |
| | | |
| | | // å¤çæ·»å è¯ä¼°äºä»¶ |
| | | handleAddAssessment(data) { |
| | | const { organData } = data; |
| | | this.handleAddNewAssessment(organData); |
| | | // å¤çå é¤è¯ä¼°äºä»¶ |
| | | 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) { |
| | | if (!organ.assessments || organ.assessments.length === 0) return null; |
| | | const assessments = this.getOrganAssessments(organ); |
| | | if (assessments.length === 0) return null; |
| | | |
| | | const assessed = organ.assessments.filter(a => a.assessmentTime); |
| | | const assessed = assessments.filter( |
| | | a => a.assessmentTime && a.delFlag !== "1" |
| | | ); |
| | | if (assessed.length === 0) return null; |
| | | |
| | | return assessed.sort( |
| | |
| | | |
| | | // æ£æ¥è¯ä¼°æé |
| | | canAssessOrgan(organ) { |
| | | console.log(organ,'organ'); |
| | | |
| | | if (this.isCoordinator) return true; |
| | | if (!this.isEdit) return false; |
| | | return ( |
| | |
| | | handleAttachmentPreview() { |
| | | if (this.assessmentData.assessannex) { |
| | | try { |
| | | const annexData = typeof this.assessmentData.assessannex === "string" |
| | | const annexData = |
| | | typeof this.assessmentData.assessannex === "string" |
| | | ? JSON.parse(this.assessmentData.assessannex) |
| | | : this.assessmentData.assessannex; |
| | | |
| | |
| | | } |
| | | ); |
| | | |
| | | // æ´æ°è¯ä¼°ç¶æä¸ºå·²å®æ |
| | | const updateData = { |
| | | ...this.assessmentData, |
| | | assessState: "3", |
| | |
| | | .fixed-width .el-button { |
| | | margin: 0 2px; |
| | | } |
| | | |
| | | /* æç®å³å®æ ·å¼ä¼å */ |
| | | .organ-decision-info { |
| | | margin: 10px 0; |
| | | /* æ±æ»é¡µé¢æ ·å¼ */ |
| | | .assessment-summary { |
| | | padding: 10px; |
| | | background-color: #f8f9fa; |
| | | border-radius: 4px; |
| | | border-left: 4px solid #409eff; |
| | | } |
| | | |
| | | .decision-tag { |
| | | margin: 2px 5px; |
| | | .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: #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> |
| | |
| | | <template> |
| | | <div class="organ-assessment-form"> |
| | | <el-form :model="assessmentData" label-width="120px"> |
| | | <el-form :model="formData" label-width="120px"> |
| | | <el-form-item label="åè½ç¶æ"> |
| | | <el-select v-model="assessmentData.functionStatus"> |
| | | <el-select v-model="formData.functionStatus"> |
| | | <el-option label="æ£å¸¸" value="1" /> |
| | | <el-option label="轻度å¼å¸¸" value="2" /> |
| | | <el-option label="é度å¼å¸¸" value="3" /> |
| | |
| | | <el-form-item label="è¯ä¼°æè§"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="assessmentData.assessmentOpinion" |
| | | v-model="formData.assessmentOpinion" |
| | | :rows="4" |
| | | placeholder="请è¾å
¥è¯ä¼°æè§" |
| | | /> |
| | |
| | | <!-- éä»¶å表 --> |
| | | <div |
| | | class="attachment-list" |
| | | v-if=" |
| | | assessmentData.attachments && |
| | | assessmentData.attachments.length > 0 |
| | | " |
| | | v-if="formData.attachments && formData.attachments.length > 0" |
| | | > |
| | | <div class="list-title"> |
| | | å·²ä¸ä¼ éä»¶ ({{ assessmentData.attachments.length }}) |
| | | å·²ä¸ä¼ éä»¶ ({{ formData.attachments.length }}) |
| | | </div> |
| | | <el-table |
| | | :data="assessmentData.attachments" |
| | | :data="formData.attachments" |
| | | style="width: 100%" |
| | | size="small" |
| | | > |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="!readonly"> |
| | | <el-button type="primary" @click="handleSave">ä¿åè¯ä¼°</el-button> |
| | | <el-button type="primary" @click="handleSave">è¯ä¼°å®æ</el-button> |
| | | <el-button @click="handleCancel">åæ¶</el-button> |
| | | <el-button |
| | | type="success" |
| | | @click="handleAddAssessment" |
| | | icon="el-icon-plus" |
| | | type="danger" |
| | | size="small" |
| | | @click="handleDelete" |
| | | icon="el-icon-delete" |
| | | > |
| | | æ°å¢è¯ä¼°è®°å½ |
| | | å 餿¤è¯ä¼° |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | type: Object, |
| | | default: () => ({}) |
| | | }, |
| | | assessmentData: { |
| | | type: Object, |
| | | default: () => ({ |
| | | functionStatus: "", |
| | | assessmentOpinion: "", |
| | | attachments: [] |
| | | }) |
| | | }, |
| | | assessmentIndex: { |
| | | type: Number, |
| | | default: 0 |
| | |
| | | readonly: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | // æ·»å ç¨æ·ä¿¡æ¯props |
| | | currentUser: { |
| | | type: Object, |
| | | default: () => ({ |
| | | name: "è¯ä¼°å" |
| | | }) |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | formData: { |
| | | functionStatus: "", |
| | | assessmentOpinion: "", |
| | | attachments: [] |
| | | }, |
| | | // é¢è§ç¸å
³ |
| | | previewVisible: false, |
| | | currentPreviewFile: null, |
| | | |
| | | // éä»¶ç¸å
³é
ç½® |
| | | attachmentLimit: 10, |
| | | attachmentAccept: |
| | | ".pdf,.jpg,.jpeg,.png,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt", |
| | | attachmentFileList: [] |
| | | attachmentFileList: [], |
| | | // åå§è¯ä¼°æ°æ® |
| | | currentAssessment: null |
| | | }; |
| | | }, |
| | | watch: { |
| | | organData: { |
| | | handler(newVal, oldVal) { |
| | | // åªæå½éä»¶æ°æ®çæ£åçååæ¶æåå§å |
| | | if ( |
| | | !oldVal || |
| | | !oldVal.attachments || |
| | | JSON.stringify(newVal.attachments) !== |
| | | JSON.stringify(oldVal.attachments) |
| | | ) { |
| | | this.initAttachmentList(); |
| | | } |
| | | handler() { |
| | | this.initData(); |
| | | }, |
| | | immediate: true, |
| | | deep: true, |
| | | immediate: true |
| | | }, |
| | | // 深度çå¬è¡¨åæ°æ®åå |
| | | formData: { |
| | | handler(newVal) { |
| | | this.$emit("update-assessment", { |
| | | organData: this.organData, |
| | | assessmentData: newVal, |
| | | assessmentIndex: this.assessmentIndex |
| | | }); |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | created() { |
| | | this.initData(); |
| | | }, |
| | | methods: { |
| | | /** åå§åéä»¶å表 */ |
| | | initAttachmentList() { |
| | | if (this.organData.attachments && this.organData.attachments.length > 0) { |
| | | this.assessmentData.attachments = [...this.organData.attachments]; |
| | | this.attachmentFileList = this.organData.attachments.map(item => ({ |
| | | // åå§åæ°æ® |
| | | initData() { |
| | | if (!this.organData || !this.organData.assesscontent) { |
| | | this.formData = { |
| | | functionStatus: "", |
| | | assessmentOpinion: "", |
| | | attachments: [] |
| | | }; |
| | | this.attachmentFileList = []; |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | const assessData = |
| | | typeof this.organData.assesscontent === "string" |
| | | ? JSON.parse(this.organData.assesscontent) |
| | | : this.organData.assesscontent; |
| | | |
| | | if ( |
| | | Array.isArray(assessData) && |
| | | assessData.length > this.assessmentIndex |
| | | ) { |
| | | this.currentAssessment = assessData[this.assessmentIndex]; |
| | | |
| | | // æ·±æ·è´æ°æ®ï¼é¿å
ä¿®æ¹åå§æ°æ® |
| | | const assessmentCopy = JSON.parse( |
| | | JSON.stringify(this.currentAssessment) |
| | | ); |
| | | |
| | | this.formData = { |
| | | functionStatus: assessmentCopy.functionStatus || "", |
| | | assessmentOpinion: assessmentCopy.assessmentOpinion || "", |
| | | attachments: Array.isArray(assessmentCopy.attachments) |
| | | ? [...assessmentCopy.attachments] |
| | | : [] |
| | | }; |
| | | |
| | | // åå§åéä»¶æä»¶å表 |
| | | this.attachmentFileList = this.formData.attachments.map(item => ({ |
| | | uid: item.id || Math.random(), |
| | | name: item.fileName, |
| | | fileSize: item.fileSize, |
| | | url: item.path || item.fileUrl, |
| | | uploadTime: item.uploadTime, |
| | | status: "success" |
| | | })); |
| | | } else { |
| | | this.assessmentData.attachments = []; |
| | | this.attachmentFileList = []; |
| | | console.log("è¯ä¼°ç´¢å¼è¶
åºèå´ææ°æ®ä¸ºç©º"); |
| | | this.resetForm(); |
| | | } |
| | | } catch (error) { |
| | | console.error("åå§åæ°æ®å¤±è´¥:", error); |
| | | this.resetForm(); |
| | | } |
| | | }, |
| | | handleSave() { |
| | | const saveData = { |
| | | organData: this.organData, |
| | | assessmentData: this.assessmentData, |
| | | assessmentIndex: this.assessmentIndex |
| | | |
| | | // é置表å |
| | | resetForm() { |
| | | this.formData = { |
| | | functionStatus: "", |
| | | assessmentOpinion: "", |
| | | attachments: [] |
| | | }; |
| | | this.$emit("save", saveData); |
| | | this.attachmentFileList = []; |
| | | }, |
| | | |
| | | // ä¿åè¯ä¼° |
| | | handleSave() { |
| | | // éªè¯å¿
è¦å段 |
| | | if (!this.formData.functionStatus) { |
| | | this.$message.warning("è¯·éæ©åè½ç¶æ"); |
| | | return; |
| | | } |
| | | |
| | | if (!this.formData.assessmentOpinion) { |
| | | this.$message.warning("请è¾å
¥è¯ä¼°æè§"); |
| | | return; |
| | | } |
| | | |
| | | // åå¤ä¿åçæ°æ® |
| | | const saveData = { |
| | | functionStatus: this.formData.functionStatus, |
| | | assessmentOpinion: this.formData.assessmentOpinion, |
| | | attachments: Array.isArray(this.formData.attachments) |
| | | ? [...this.formData.attachments] |
| | | : [] |
| | | }; |
| | | |
| | | // æ·»å è¯ä¼°è
åè¯ä¼°æ¶é´ |
| | | const assessmentData = { |
| | | ...saveData, |
| | | assessor: this.currentUser.name, |
| | | assessmentTime: new Date().toISOString() |
| | | }; |
| | | |
| | | console.log("åéä¿å请æ±:", assessmentData); |
| | | |
| | | this.$emit("save-assessment", { |
| | | organData: this.organData, |
| | | assessmentData: assessmentData, |
| | | assessmentIndex: this.assessmentIndex |
| | | }); |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.$emit("cancel"); |
| | | }, |
| | | |
| | | handleAddAssessment() { |
| | | this.$emit("add-assessment", { |
| | | handleDelete() { |
| | | this.$confirm("确认å 餿¤è¯ä¼°è®°å½åï¼", "确认å é¤", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | this.$emit("delete-assessment", { |
| | | organData: this.organData, |
| | | currentIndex: this.assessmentIndex |
| | | assessmentIndex: this.assessmentIndex |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | this.$message.info("已忶å é¤"); |
| | | }); |
| | | }, |
| | | |
| | | /** éä»¶ååå¤ç */ |
| | | handleAttachmentChange(fileList) { |
| | | this.attachmentFileList = fileList; |
| | |
| | | /** éä»¶ç§»é¤å¤ç */ |
| | | handleAttachmentRemove(file) { |
| | | if (file.url) { |
| | | const index = this.assessmentData.attachments.findIndex( |
| | | const index = this.formData.attachments.findIndex( |
| | | item => item.path === file.url || item.fileUrl === file.url |
| | | ); |
| | | if (index > -1) { |
| | | this.assessmentData.attachments.splice(index, 1); |
| | | this.formData.attachments.splice(index, 1); |
| | | this.$message.success("éä»¶å 餿å"); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | /** æå¨å é¤éä»¶ */ |
| | | handleRemoveAttachment(index) { |
| | | this.assessmentData.attachments.splice(index, 1); |
| | | this.formData.attachments.splice(index, 1); |
| | | this.attachmentFileList.splice(index, 1); |
| | | this.$message.success("éä»¶å 餿å"); |
| | | }, |
| | | |
| | | /** ä¸ä¼ æåå¤ç */ |
| | | handleUploadSuccess({ file, fileList, response }) { |
| | | console.log(response); |
| | | |
| | | if (response.code == 200) { |
| | | console.log(1); |
| | | if (response.code === 200) { |
| | | console.log(response, "ä¸ä¼ æ°æ®"); |
| | | |
| | | const attachmentObj = { |
| | | // id: |
| | | // response.data.fileId || |
| | | // Math.random() |
| | | // .toString(36) |
| | | // .substr(2), |
| | | fileName: file.name, |
| | | path: response.data.fileUrl || file.url, |
| | | fileUrl: response.data.fileUrl || file.url, |
| | | 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"), |
| | | assessmentType: this.assessmentType, |
| | | organType: this.organData.organType |
| | | uploadTime: dayjs().format("YYYY-MM-DD HH:mm:ss") |
| | | }; |
| | | console.log(2,attachmentObj); |
| | | |
| | | this.assessmentData.attachments.push(attachmentObj); |
| | | console.log("æ·»å ä¸ä¼ çéä»¶:", attachmentObj); |
| | | |
| | | // ç¡®ä¿ attachments æ¯æ°ç» |
| | | if (!Array.isArray(this.formData.attachments)) { |
| | | this.formData.attachments = []; |
| | | } |
| | | |
| | | this.formData.attachments.push(attachmentObj); |
| | | |
| | | // æ´æ°æä»¶å表 |
| | | this.attachmentFileList = fileList; |
| | | |
| | | this.$message.success("æä»¶ä¸ä¼ æå"); |
| | | } |
| | | }, |
| | |
| | | <el-card class="tool-card"> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="16"> |
| | | <el-button type="primary" icon="el-icon-plus" @click="handleCreate" |
| | | <!-- <el-button type="primary" icon="el-icon-plus" @click="handleCreate" |
| | | >æ°å¢è¯ä¼°</el-button |
| | | > |
| | | <el-button |
| | | > --> |
| | | <!-- <el-button |
| | | type="success" |
| | | icon="el-icon-edit" |
| | | :disabled="single" |
| | |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | >å é¤</el-button |
| | | > |
| | | > --> |
| | | <el-button |
| | | type="warning" |
| | | icon="el-icon-download" |
| | |
| | | label="æä½" |
| | | align="center" |
| | | width="200" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | > |
| | | <el-button |
| | | v-if=" |
| | | scope.row.assessState === '1' || |
| | | scope.row.assessState === '2' |
| | | scope.row.assessState != '3' || |
| | | scope.row.assessState != '4' |
| | | " |
| | | size="mini" |
| | | type="text" |
| | |
| | | @click.stop="handleAssess(scope.row)" |
| | | >è¯ä¼°</el-button |
| | | > |
| | | <el-button |
| | | <!-- <el-button |
| | | v-if="scope.row.assessState === '3'" |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-check" |
| | | @click.stop="handleConfirm(scope.row)" |
| | | >确认</el-button |
| | | > |
| | | > --> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <span class="detail-title">æ»äº¡å¤å®åºæ¬ä¿¡æ¯</span> |
| | | <el-button |
| | | v-if="isEdit" |
| | | type="primary" |
| | | style="float: right; padding: 3px 0" |
| | | type="success" |
| | | style="float: right" |
| | | @click="handleSave" |
| | | :loading="saveLoading" |
| | | > |
| | |
| | | <el-button |
| | | v-else |
| | | type="primary" |
| | | style="float: right; padding: 3px 0" |
| | | style="float: right" |
| | | @click="handleEdit" |
| | | > |
| | | ç¼è¾ä¿¡æ¯ |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è´è´£äºº" prop="responsibleusername"> |
| | | <el-input v-model="form.responsibleusername" :readonly="!isEdit" /> |
| | | <el-input |
| | | v-model="form.responsibleusername" |
| | | :readonly="!isEdit" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | |
| | | <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> |
| | | |
| | | <!-- éä»¶ç±»åéé¡¹å¡ --> |
| | |
| | | |
| | | <el-table-column label="æä»¶ç±»å" width="100" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-tag size="small">{{ getFileType(scope.row.fileName) }}</el-tag> |
| | | <el-tag size="small">{{ |
| | | getFileType(scope.row.fileName) |
| | | }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="æä½" |
| | | width="180" |
| | | align="center" |
| | | > |
| | | <el-table-column label="æä½" width="180" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | v-if="getAttachmentsByType(type.value).length === 0" |
| | | class="empty-attachment" |
| | | > |
| | | <el-empty description="ææ è¯ä¼°è¡¨éä»¶" :image-size="80"></el-empty> |
| | | <el-empty |
| | | description="ææ è¯ä¼°è¡¨éä»¶" |
| | | :image-size="80" |
| | | ></el-empty> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | |
| | | 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> |
| | | <div class="el-upload__text">å°è¯ä¼°è¡¨æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | <div class="el-upload__text"> |
| | | å°è¯ä¼°è¡¨æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em> |
| | | </div> |
| | | <div class="el-upload__tip" slot="tip"> |
| | | æ¯æä¸ä¼ pdfãjpgãpngãdocãdocxãxlsãxlsxæ ¼å¼æä»¶ï¼å个æä»¶ä¸è¶
è¿10MB |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import { deathinfoedit, deathinfoInfo } from "@/api/businessApi"; |
| | | import { getToken } from "@/utils/auth"; |
| | | |
| | | export default { |
| | | name: "DeathJudgmentDetail", |
| | |
| | | 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.isEdit = this.$route.query.isEdit; |
| | | if (id && !this.$route.path.includes("/add")) { |
| | | this.getDetail(id); |
| | | } else if (this.$route.path.includes('/add')) { |
| | | } else if (this.$route.path.includes("/add")) { |
| | | this.generateDonorNo(); |
| | | } |
| | | this.getAttachmentList(); |
| | |
| | | // çææç®è
ç¼å· |
| | | generateDonorNo() { |
| | | const timestamp = Date.now().toString(); |
| | | this.form.donorno = 'DONOR' + timestamp.slice(-8); |
| | | this.form.donorno = "DONOR" + timestamp.slice(-8); |
| | | }, |
| | | // è·å详æ
|
| | | async getDetail(id) { |
| | | try { |
| | | const response = await deathinfoInfo({ id }); |
| | | const response = await deathinfoInfo(id); |
| | | let realData = {}; |
| | | |
| | | if (response && response.data) { |
| | |
| | | ...this.form, |
| | | ...realData, |
| | | // ç¡®ä¿æ°å¼ç±»ååæ®µæ£ç¡®è½¬æ¢ |
| | | isspendremember: realData.isspendremember ? parseInt(realData.isspendremember) : 0, |
| | | isrestoreremains: realData.isrestoreremains ? parseInt(realData.isrestoreremains) : 0 |
| | | 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('æ°æ®å 载失败'); |
| | | console.error("è·åæ»äº¡å¤å®è¯¦æ
失败:", error); |
| | | this.$message.error("æ°æ®å 载失败"); |
| | | } |
| | | }, |
| | | // è§£æéä»¶æ°æ® |
| | |
| | | } |
| | | } |
| | | } catch (error) { |
| | | console.error('è§£æéä»¶æ°æ®å¤±è´¥:', error); |
| | | console.error("è§£æéä»¶æ°æ®å¤±è´¥:", error); |
| | | } |
| | | }, |
| | | // æå»ºéä»¶JSONæ°æ® |
| | |
| | | }, |
| | | // è·åæä»¶ç±»å |
| | | getFileType(fileName) { |
| | | const ext = fileName.split('.').pop().toLowerCase(); |
| | | const ext = fileName |
| | | .split(".") |
| | | .pop() |
| | | .toLowerCase(); |
| | | const typeMap = { |
| | | 'pdf': 'PDF', |
| | | 'doc': 'DOC', |
| | | 'docx': 'DOCX', |
| | | 'xls': 'XLS', |
| | | 'xlsx': 'XLSX', |
| | | 'jpg': 'JPG', |
| | | 'jpeg': 'JPEG', |
| | | 'png': 'PNG' |
| | | pdf: "PDF", |
| | | doc: "DOC", |
| | | docx: "DOCX", |
| | | xls: "XLS", |
| | | xlsx: "XLSX", |
| | | jpg: "JPG", |
| | | jpeg: "JPEG", |
| | | png: "PNG" |
| | | }; |
| | | return typeMap[ext] || ext.toUpperCase(); |
| | | }, |
| | |
| | | // ä¸ä¼ åæ ¡éª |
| | | beforeUpload(file) { |
| | | const allowedTypes = [ |
| | | 'application/pdf', |
| | | 'image/jpeg', |
| | | 'image/png', |
| | | 'application/msword', |
| | | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', |
| | | 'application/vnd.ms-excel', |
| | | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' |
| | | "application/pdf", |
| | | "image/jpeg", |
| | | "image/png", |
| | | "application/msword", |
| | | "application/vnd.openxmlformats-officedocument.wordprocessingml.document", |
| | | "application/vnd.ms-excel", |
| | | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" |
| | | ]; |
| | | |
| | | 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') || |
| | | file.name.endsWith('.xls') || |
| | | file.name.endsWith('.xlsx'); |
| | | 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") || |
| | | file.name.endsWith(".xls") || |
| | | file.name.endsWith(".xlsx"); |
| | | |
| | | if (!isTypeOk) { |
| | | this.$message.error('æä»¶æ ¼å¼ä¸æ¯æï¼è¯·ä¸ä¼ pdfãjpgãpngãdocãdocxãxlsæxlsxæ ¼å¼æä»¶'); |
| | | this.$message.error( |
| | | "æä»¶æ ¼å¼ä¸æ¯æï¼è¯·ä¸ä¼ pdfãjpgãpngãdocãdocxãxlsæxlsxæ ¼å¼æä»¶" |
| | | ); |
| | | return false; |
| | | } |
| | | |
| | | if (file.size > maxSize) { |
| | | this.$message.error('æä»¶å¤§å°ä¸è½è¶
è¿10MB'); |
| | | 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(), |
| | |
| | | fileName: file.name, |
| | | fileSize: file.size, |
| | | uploadTime: new Date().toISOString(), |
| | | uploader: 'å½åç¨æ·', |
| | | fileUrl: URL.createObjectURL(file.raw) |
| | | uploader: "å½åç¨æ·", |
| | | fileUrl: file.url |
| | | }; |
| | | |
| | | this.attachmentList.push(newAttachment); |
| | |
| | | // æ´æ°éä»¶JSONæ°æ®å°è¡¨å |
| | | this.form.rememberannex = this.buildAttachmentJson(); |
| | | |
| | | this.$message.success('æä»¶ä¸ä¼ æå'); |
| | | 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) { |
| | | this.$confirm('ç¡®å®è¦å é¤è¿ä¸ªè¯ä¼°è¡¨éä»¶åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const index = this.attachmentList.findIndex(item => item.id === attachment.id); |
| | | 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); |
| | | // æ´æ°éä»¶JSONæ°æ®å°è¡¨å |
| | | this.form.rememberannex = this.buildAttachmentJson(); |
| | | this.$message.success('è¯ä¼°è¡¨å 餿å'); |
| | | this.$message.success("è¯ä¼°è¡¨å 餿å"); |
| | | } |
| | | }).catch(() => {}); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | // é¢è§éä»¶ |
| | | handlePreview(attachment) { |
| | | if (attachment.fileName.endsWith('.pdf')) { |
| | | window.open(attachment.fileUrl, '_blank'); |
| | | if (attachment.fileName.endsWith(".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}">`, |
| | | 'å¾çé¢è§', { |
| | | this.$alert( |
| | | `<img src="${attachment.fileUrl}" style="max-width: 100%;" alt="${attachment.fileName}">`, |
| | | "å¾çé¢è§", |
| | | { |
| | | dangerouslyUseHTMLString: true, |
| | | customClass: 'image-preview-dialog' |
| | | }); |
| | | customClass: "image-preview-dialog" |
| | | } |
| | | ); |
| | | } else { |
| | | this.$message.info('该æä»¶ç±»åæä¸æ¯æå¨çº¿é¢è§ï¼è¯·ä¸è½½åæ¥ç'); |
| | | this.$message.info("该æä»¶ç±»åæä¸æ¯æå¨çº¿é¢è§ï¼è¯·ä¸è½½åæ¥ç"); |
| | | } |
| | | }, |
| | | // ä¸è½½éä»¶ |
| | | handleDownload(attachment) { |
| | | const link = document.createElement('a'); |
| | | const link = document.createElement("a"); |
| | | link.href = attachment.fileUrl; |
| | | link.download = attachment.fileName; |
| | | link.click(); |
| | |
| | | const response = await deathinfoedit(submitData); |
| | | |
| | | if (response.code === 200) { |
| | | this.$message.success('ä¿åæå'); |
| | | this.$message.success("ä¿åæå"); |
| | | this.isEdit = false; |
| | | |
| | | if (this.$route.path.includes('/add')) { |
| | | this.$router.push('/case/deathJudgment'); |
| | | if (this.$route.path.includes("/add")) { |
| | | this.$router.push("/case/deathJudgment"); |
| | | } |
| | | } else { |
| | | this.$message.error(response.message || 'ä¿å失败'); |
| | | this.$message.error(response.message || "ä¿å失败"); |
| | | } |
| | | } catch (error) { |
| | | console.error('ä¿å失败:', error); |
| | | this.$message.error('ä¿å失败'); |
| | | console.error("ä¿å失败:", error); |
| | | this.$message.error("ä¿å失败"); |
| | | } finally { |
| | | this.saveLoading = false; |
| | | } |
| | |
| | | }, |
| | | // æä»¶å¤§å°æ ¼å¼å |
| | | formatFileSize(size) { |
| | | if (size === 0) return '0 B'; |
| | | if (size === 0) 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 ''; |
| | | 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')}`; |
| | | 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")}`; |
| | | } |
| | | } |
| | | }; |
| | |
| | | label="æä½" |
| | | align="center" |
| | | width="180" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { queryDathInfoBaseInfo, deathinfoedit,deathinfoInfo } from "@/api/businessApi"; |
| | | import { |
| | | queryDathInfoBaseInfo, |
| | | deathinfoedit, |
| | | deathinfoInfo |
| | | } from "@/api/businessApi"; |
| | | import Pagination from "@/components/Pagination"; |
| | | |
| | | export default { |
| | |
| | | const id = row.id || this.ids[0]; |
| | | this.$router.push({ |
| | | path: "/case/DecideInfo", |
| | | query: { id: id } |
| | | query: { id: id, isEdit: true } |
| | | }); |
| | | }, |
| | | |
| | |
| | | :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="ethicsConclusion"> |
| | | <el-form-item label="æ¡ä¾ç¼å·" prop="caseNo"> |
| | | <el-input |
| | | v-model="queryParams.caseNo" |
| | | placeholder="请è¾å
¥æ¡ä¾ç¼å·" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="伦çç¶æ" prop="status"> |
| | | <el-select |
| | | v-model="queryParams.ethicsConclusion" |
| | | placeholder="è¯·éæ©ä¼¦çç»è®º" |
| | | v-model="queryParams.status" |
| | | placeholder="è¯·éæ©ä¼¦çç¶æ" |
| | | clearable |
| | | style="width: 200px" |
| | | > |
| | | <el-option label="审æ¥ä¸" value="reviewing" /> |
| | | <el-option label="åæ" value="approved" /> |
| | | <el-option label="ä¿®æ¹ååæ" value="approved_with_modifications" /> |
| | | <el-option label="ä¿®æ¹åé审" value="re-review" /> |
| | | <el-option label="ä¸åæ" value="disapproved" /> |
| | | <el-option label="ç»æ¢å®¡æ¥" value="terminated" /> |
| | | <el-option label="å
¨é¨" value="" /> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_ethical" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å®¡æ¥æ¶é´èå´" prop="reviewTimeRange"> |
| | |
| | | >ä¿®æ¹</el-button |
| | | > |
| | | <el-button |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | >å é¤</el-button |
| | | > |
| | | <el-button |
| | | type="warning" |
| | | icon="el-icon-download" |
| | | @click="handleExport" |
| | |
| | | <el-button |
| | | type="info" |
| | | icon="el-icon-check" |
| | | :disabled="multiple" |
| | | :disabled="single" |
| | | @click="handleEndReview" |
| | | >ç»æå®¡æ¥</el-button |
| | | > |
| | |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column |
| | | label="ä½é¢å·" |
| | | label="æ¡ä¾ç¼å·" |
| | | align="center" |
| | | prop="hospitalNo" |
| | | prop="caseNo" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="æç®è
å§å" |
| | | label="æç®è
ç¼å·" |
| | | align="center" |
| | | prop="donorName" |
| | | prop="donorno" |
| | | width="120" |
| | | /> |
| | | <el-table-column label="æ§å«" align="center" prop="gender" width="80"> |
| | | <el-table-column |
| | | label="å§å" |
| | | align="center" |
| | | prop="name" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="ä½é¢å·" |
| | | align="center" |
| | | prop="inpatientno" |
| | | width="120" |
| | | /> |
| | | <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" |
| | | /> |
| | | <el-table-column |
| | | label="è¯ä»¶å·ç " |
| | | align="center" |
| | | prop="idcardno" |
| | | width="180" |
| | | /> |
| | | <el-table-column |
| | | label="ç¾ç
è¯æ" |
| | | align="center" |
| | | prop="diagnosis" |
| | | prop="diagnosisname" |
| | | min-width="180" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="伦çç»è®º" |
| | | label="å»çæºæ" |
| | | align="center" |
| | | prop="ethicsConclusion" |
| | | width="120" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="conclusionFilter(scope.row.ethicsConclusion)"> |
| | | {{ conclusionTextFilter(scope.row.ethicsConclusion) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="伦çæè§" |
| | | align="center" |
| | | prop="ethicsOpinion" |
| | | min-width="200" |
| | | prop="treatmenthospitalname" |
| | | min-width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="å®¡æ¥æ¶é´" |
| | | label="伦çç¶æ" |
| | | align="center" |
| | | prop="reviewTime" |
| | | width="160" |
| | | prop="status" |
| | | width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | scope.row.reviewTime |
| | | ? parseTime(scope.row.reviewTime, "{y}-{m}-{d} {h}:{i}") |
| | | : "-" |
| | | }}</span> |
| | | <dict-tag |
| | | :options="dict.type.sys_ethical" |
| | | :value="scope.row.status" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <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="expertConclusion" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="ç»è®°äºº" |
| | | label="ä¸å®¶æè§" |
| | | align="center" |
| | | prop="registrant" |
| | | prop="expertOpinion" |
| | | min-width="150" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="ä¸å®¶å§å" |
| | | align="center" |
| | | prop="expertName" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | label="ç»è®ºæ¶é´" |
| | | align="center" |
| | | prop="expertTime" |
| | | width="160" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ |
| | | scope.row.expertTime |
| | | ? parseTime(scope.row.expertTime, "{y}-{m}-{d} {h}:{i}") |
| | | : "-" |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | width="260" |
| | | width="180" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | type="text" |
| | | icon="el-icon-check" |
| | | @click="handleEndReview(scope.row)" |
| | | :disabled="scope.row.ethicsConclusion === 'terminated'" |
| | | :disabled="scope.row.status === '2'" |
| | | >ç»æ</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> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listEthicsReview, delEthicsReview, exportEthicsReview, endEthicsReview } from "./ethicsReview"; |
| | | import { reviewinitiateBaseInfoList, ethicalreviewedit, } from "@/api/businessApi"; |
| | | import Pagination from "@/components/Pagination"; |
| | | |
| | | export default { |
| | | name: "EthicsReviewList", |
| | | components: { Pagination }, |
| | | dicts: ["sys_user_sex"], |
| | | dicts: ["sys_user_sex", "sys_ethical"], |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // é䏿°ç» |
| | | ids: [], |
| | | // éä¸çè¡æ°æ® |
| | | selectedRows: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | hospitalNo: undefined, |
| | | donorName: undefined, |
| | | ethicsConclusion: undefined, |
| | | inpatientno: undefined, |
| | | name: undefined, |
| | | caseNo: undefined, |
| | | status: undefined, |
| | | reviewTimeRange: [] |
| | | } |
| | | }; |
| | |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | // 伦çç»è®ºè¿æ»¤å¨ |
| | | conclusionFilter(conclusion) { |
| | | const conclusionMap = { |
| | | "reviewing": "warning", // 审æ¥ä¸ |
| | | "approved": "success", // åæ |
| | | "approved_with_modifications": "primary", // ä¿®æ¹ååæ |
| | | "re-review": "info", // ä¿®æ¹åé审 |
| | | "disapproved": "danger", // ä¸åæ |
| | | "terminated": "info" // ç»æ¢å®¡æ¥ |
| | | }; |
| | | return conclusionMap[conclusion] || "info"; |
| | | }, |
| | | conclusionTextFilter(conclusion) { |
| | | const conclusionMap = { |
| | | "reviewing": "审æ¥ä¸", |
| | | "approved": "åæ", |
| | | "approved_with_modifications": "ä¿®æ¹ååæ", |
| | | "re-review": "ä¿®æ¹åé审", |
| | | "disapproved": "ä¸åæ", |
| | | "terminated": "ç»æ¢å®¡æ¥" |
| | | }; |
| | | return conclusionMap[conclusion] || "æªç¥"; |
| | | }, |
| | | // æ¥è¯¢ä¼¦ç审æ¥å表 |
| | | getList() { |
| | | this.loading = true; |
| | | listEthicsReview(this.queryParams) |
| | | |
| | | // å¤çæ¥è¯¢åæ° |
| | | const params = { |
| | | ...this.queryParams |
| | | }; |
| | | |
| | | // ç§»é¤å页忰以å¤çé¢å¤åæ° |
| | | delete params.reviewTimeRange; |
| | | |
| | | // å¦æææ¶é´èå´åæ° |
| | | if (this.queryParams.reviewTimeRange && this.queryParams.reviewTimeRange.length === 2) { |
| | | params.expertTimeStart = this.queryParams.reviewTimeRange[0] + ' 00:00:00'; |
| | | params.expertTimeEnd = this.queryParams.reviewTimeRange[1] + ' 23:59:59'; |
| | | } |
| | | |
| | | reviewinitiateBaseInfoList(params) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.ethicsReviewList = response.data.rows; |
| | | this.total = response.data.total; |
| | | this.ethicsReviewList = response.data || []; |
| | | this.total = response.total || 0; |
| | | } else { |
| | | this.$message.error("è·åæ°æ®å¤±è´¥"); |
| | | this.$message.error(response.msg || "è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | this.loading = false; |
| | | }) |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id); |
| | | this.ids = selection.map(item => item.infoid); |
| | | this.selectedRows = selection; |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | |
| | | handleView(row) { |
| | | this.$router.push({ |
| | | path: "/case/ethicalReviewInfo", |
| | | query: { id: row.id } |
| | | query: { id: row.infoid } |
| | | }); |
| | | }, |
| | | // æ°å¢æé®æä½ |
| | |
| | | }, |
| | | // ä¿®æ¹æé®æä½ |
| | | handleUpdate(row) { |
| | | const id = row.id || this.ids[0]; |
| | | const id = row.infoid || this.ids[0]; |
| | | this.$router.push({ |
| | | path: "/case/ethicalReviewInfo", |
| | | query: { id: id } |
| | | }); |
| | | }, |
| | | // å é¤æé®æä½ |
| | | handleDelete(row) { |
| | | const ids = row.id ? [row.id] : this.ids; |
| | | this.$confirm("æ¯å¦ç¡®è®¤å é¤éä¸çæ°æ®é¡¹ï¼", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return delEthicsReview(ids); |
| | | }) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.getList(); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | // ç»æå®¡æ¥æä½ |
| | | handleEndReview(row) { |
| | | const ids = row.id ? [row.id] : this.ids; |
| | | const selectedRow = row || (this.selectedRows.length === 1 ? this.selectedRows[0] : null); |
| | | if (!selectedRow) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡è®°å½"); |
| | | return; |
| | | } |
| | | |
| | | this.$confirm("æ¯å¦ç¡®è®¤ç»æéä¸ç审æ¥é¡¹ç®ï¼", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return endEthicsReview(ids); |
| | | // è°ç¨ä¿®æ¹æ¥å£ï¼å°ç¶ææ¹ä¸ºç»æï¼status: '2'ï¼ |
| | | const updateData = { |
| | | infoid: selectedRow.infoid, |
| | | status: '2', |
| | | // å¯ä»¥ä¿çåææ°æ® |
| | | expertName: selectedRow.expertName, |
| | | expertConclusion: selectedRow.expertConclusion, |
| | | expertOpinion: selectedRow.expertOpinion, |
| | | expertTime: selectedRow.expertTime |
| | | }; |
| | | |
| | | return ethicalreviewedit(updateData); |
| | | }) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("审æ¥å·²ç»æ"); |
| | | this.getList(); |
| | | } else { |
| | | this.$message.error(response.msg || "æä½å¤±è´¥"); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | // å¯¼åºæé®æä½ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | const queryParams = { ...this.queryParams }; |
| | | delete queryParams.pageNum; |
| | | delete queryParams.pageSize; |
| | | |
| | | // å¤çæ¶é´èå´åæ° |
| | | if (queryParams.reviewTimeRange && queryParams.reviewTimeRange.length === 2) { |
| | | queryParams.expertTimeStart = queryParams.reviewTimeRange[0] + ' 00:00:00'; |
| | | queryParams.expertTimeEnd = queryParams.reviewTimeRange[1] + ' 23:59:59'; |
| | | } |
| | | delete queryParams.reviewTimeRange; |
| | | |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºææä¼¦çå®¡æ¥æ°æ®ï¼", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | |
| | | }) |
| | | .then(() => { |
| | | this.loading = true; |
| | | return exportEthicsReview(queryParams); |
| | | // return ethicalreviewexport(queryParams); |
| | | }) |
| | | .then(response => { |
| | | if (response.code === 200) { |
| | | this.$message.success("å¯¼åºæå"); |
| | | // å¤çå¯¼åºæä»¶ä¸è½½ |
| | | if (response.data) { |
| | | const blob = new Blob([response.data], { type: 'application/vnd.ms-excel' }); |
| | | const downloadElement = document.createElement('a'); |
| | | const href = window.URL.createObjectURL(blob); |
| | | downloadElement.href = href; |
| | | downloadElement.download = '伦ç审æ¥å表.xlsx'; |
| | | document.body.appendChild(downloadElement); |
| | | downloadElement.click(); |
| | | document.body.removeChild(downloadElement); |
| | | window.URL.revokeObjectURL(href); |
| | | } |
| | | } else { |
| | | this.$message.error(response.msg || "导åºå¤±è´¥"); |
| | | } |
| | | this.loading = false; |
| | | }) |
| | |
| | | label="æä½" |
| | | align="center" |
| | | width="120" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | liverKidneyData: {}, // ä» maintainList æ¥å£è·åçæ°æ® |
| | | bloodRoutineData: {}, // ä» maintainList æ¥å£è·åçæ°æ® |
| | | liverKidneyData: {}, // ä» maintainList æ¥å£è·åçæ°æ® |
| | | extracontentinfo: {}, |
| | | // å¹å
»ç»æç¸å
³æ°æ® |
| | | cultureList: [], |
| | | cultureLoading: false, |
| | |
| | | this.$message.error("缺å°å¿
è¦çè·¯ç±åæ°"); |
| | | return; |
| | | } |
| | | |
| | | queryParams.infoid = infoid; |
| | | const response = await maintainList(queryParams); |
| | | if (response.code === 200) { |
| | | let maintenanceData = response.data[0]; |
| | |
| | | if (Array.isArray(maintenanceData)) { |
| | | maintenanceData = maintenanceData[0] || {}; |
| | | } |
| | | if (maintenanceData.extracontent) { |
| | | this.extracontentinfo = JSON.parse(maintenanceData.extracontent); |
| | | if (this.extracontentinfo.specialMedicalHistory) { |
| | | this.form.specialMedicalHistory = |
| | | this.extracontentinfo.specialMedicalHistory; |
| | | } |
| | | } |
| | | |
| | | // è§£æitemDescåæ®µä¸çJSONæ°æ®[6,8](@ref) |
| | | if (maintenanceData.itemDesc) { |
| | | try { |
| | | const itemDescData = JSON.parse(maintenanceData.itemDesc); |
| | | const itemDescData = maintenanceData.itemDesc; |
| | | this.assessmentData = { ...this.assessmentData, ...itemDescData }; |
| | | |
| | | // å¡«å
å个模åçæ°æ® |
| | |
| | | // æå»ºä¿åæ°æ® |
| | | const saveData = { |
| | | ...this.form, |
| | | itemDesc: JSON.stringify({ |
| | | itemDesc: { |
| | | liverKidney: this.assessmentData.liverKidney, |
| | | bloodRoutine: this.assessmentData.bloodRoutine, |
| | | urineRoutine: this.assessmentData.urineRoutine, |
| | | cultureResults: this.cultureList, |
| | | nursingRecords: this.recordList |
| | | }) |
| | | } |
| | | }; |
| | | |
| | | this.extracontentinfo.specialMedicalHistory = this.form.specialMedicalHistory; |
| | | let response; |
| | | if (this.isEditMode && this.currentMaintenanceId) { |
| | | // ç¼è¾æ¨¡å¼ï¼è°ç¨maintaineditæ¥å£[1](@ref) |
| | |
| | | if (response.code === 200) { |
| | | this.$message.success("ä¿åæå"); |
| | | this.isEdit = false; |
| | | |
| | | this.donatebaseinfoEdit({ |
| | | id: this.$route.query.infoid, |
| | | extracontent: JSON.stringify(this.extracontentinfo) |
| | | }); |
| | | // å¦ææ¯æ°å¢ä¿åï¼æ´æ°å½åID |
| | | if (!this.isEditMode && response.data && response.data.id) { |
| | | this.currentMaintenanceId = response.data.id; |
| | |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | width="220" |
| | | > |
| | |
| | | this.getCode(); |
| | | this.getCookie(); |
| | | this.getAuthCode(); |
| | | this.loginForm.password=this.generatePassword(); |
| | | // this.avoidLogin(); |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // æ ¼å¼åå½åæ¥æä¸º YYYYMMDD |
| | | getCurrentDate() { |
| | | const now = new Date(); |
| | | const year = now.getFullYear(); |
| | | const month = String(now.getMonth() + 1).padStart(2, "0"); |
| | | const day = String(now.getDate()).padStart(2, "0"); |
| | | return `${year}${month}${day}`; |
| | | }, |
| | | |
| | | // èªå¨çæå¯ç 彿° |
| | | generatePassword() { |
| | | const currentDate = this.getCurrentDate(); |
| | | return `Hrs#${currentDate}*`; |
| | | }, |
| | | getAuthCode() { |
| | | this.$dingtalk.runtime.permission.requestAuthCode({ |
| | | corpId: "dingd31f00f4fbc0ff5bf5bf40eda33b7ba0", |