|
@@ -27,10 +27,19 @@
|
|
|
<el-tag effect="dark" size="small" type="error">急诊:{{ jiZhenJiShu }}条</el-tag>
|
|
|
<el-tag effect="dark" size="small" type="success">普通:{{ shouShuData.length - jiZhenJiShu }}条</el-tag>
|
|
|
<el-table :data="shouShuData.slice((currentPage - 1) * pageSize,currentPage * pageSize)"
|
|
|
- :height="window.h - 120"
|
|
|
- :row-class-name="rowStyle"
|
|
|
- >
|
|
|
- <el-table-column label="手术编号" prop="recordId"></el-table-column>
|
|
|
+ :height="window.h - 120">
|
|
|
+ <el-table-column label="手术编号" prop="recordId">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag :type="scope.row.urgentClinicFlag === '1' ? 'error':'success'" effect="dark"
|
|
|
+ @click="clickToModifyTime(scope.row)">
|
|
|
+ {{ scope.row.recordId }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="手术开始时间" prop="opStartDate"></el-table-column>
|
|
|
+ <el-table-column label="手术结束时间" prop="opEndDate"></el-table-column>
|
|
|
+ <el-table-column label="麻醉开始时间" prop="anstStartDate"></el-table-column>
|
|
|
+ <el-table-column label="麻醉结束时间" prop="anstEndDate"></el-table-column>
|
|
|
<el-table-column label="日期" prop="opDatetime"></el-table-column>
|
|
|
<el-table-column label="送出时间" prop="applyDate"></el-table-column>
|
|
|
<el-table-column label="手术间" prop="roomName"></el-table-column>
|
|
@@ -82,13 +91,49 @@
|
|
|
></el-pagination>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
+ <el-dialog v-model="modifySurgeryTime.dialog" :close-on-click-modal="false" title="编辑手术时间">
|
|
|
+ 手术时间:
|
|
|
+ <el-date-picker
|
|
|
+ v-model="opDate"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ placeholder="选择日期"
|
|
|
+ range-separator="至"
|
|
|
+ size="mini"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ style="width: 400px"
|
|
|
+ type="datetimerange"
|
|
|
+ ></el-date-picker>
|
|
|
+ <br>
|
|
|
+ <br>
|
|
|
+ 麻醉时间:
|
|
|
+ <el-date-picker
|
|
|
+ v-model="anstDate"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ placeholder="选择日期"
|
|
|
+ range-separator="至"
|
|
|
+ size="mini"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ style="width: 400px"
|
|
|
+ type="datetimerange"
|
|
|
+ ></el-date-picker>
|
|
|
+ <template #footer>
|
|
|
+ <el-button icon="el-icon-refresh-left" type="info" @click="modifySurgeryTime.dialog = false">取消</el-button>
|
|
|
+ <el-button icon="el-icon-check" type="primary" @click="confirmDialog">确定</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script name="SurgeryArrangement" setup>
|
|
|
-import {getASurgicalWard, huoQuShouShuAnPaiXinXi} from "@/api/surgical-management/surgery-arrangement";
|
|
|
+import {
|
|
|
+ getASurgicalWard,
|
|
|
+ huoQuShouShuAnPaiXinXi,
|
|
|
+ modifySurgeryTimeApi
|
|
|
+} from "@/api/surgical-management/surgery-arrangement";
|
|
|
import {shortcuts} from '@/data/shortcuts.js'
|
|
|
-import {getDateRangeFormatDate} from "@/utils/date";
|
|
|
-import {listIsBlank, stringNotBlank} from "@/utils/blank-utils";
|
|
|
+import {getDateRangeFormatDate, getDateRangeFormatDateTime} from "@/utils/date";
|
|
|
+import {listIsBlank, stringIsBlank, stringNotBlank} from "@/utils/blank-utils";
|
|
|
import store from '@/store'
|
|
|
import {ElMessage} from "element-plus";
|
|
|
|
|
@@ -129,7 +174,6 @@ const clickQuery = () => {
|
|
|
queryParam.startTime = dateS.startTime
|
|
|
queryParam.endTime = dateS.endTime
|
|
|
huoQuShouShuAnPaiXinXi(queryParam).then((res) => {
|
|
|
- console.log(res)
|
|
|
shouShuData = res
|
|
|
jiZhenJiShu = 0
|
|
|
shouShuData.forEach(item => {
|
|
@@ -142,20 +186,50 @@ const clickQuery = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-const rowStyle = ({row, rowIndex}) => {
|
|
|
- if (stringNotBlank(row.urgentClinicFlag)) {
|
|
|
- if (row.urgentClinicFlag === '1') {
|
|
|
- return 'error'
|
|
|
- } else if (row.urgentClinicFlag === '0') {
|
|
|
- return 'success'
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
const handleCurrentChange = (val) => {
|
|
|
currentPage = val
|
|
|
}
|
|
|
|
|
|
+let modifySurgeryTime = $ref({
|
|
|
+ dialog: false,
|
|
|
+ opStartDate: '',
|
|
|
+ opEndDate: '',
|
|
|
+ anstStartDate: '',
|
|
|
+ anstEndDate: '',
|
|
|
+ recordId: '',
|
|
|
+ inpatientNo: ''
|
|
|
+})
|
|
|
+
|
|
|
+let opDate = $ref([])
|
|
|
+let anstDate = $ref([])
|
|
|
+
|
|
|
+const clickToModifyTime = ({recordId, inpatientNo, opStartDate, opEndDate, anstStartDate, anstEndDate}) => {
|
|
|
+ opDate = [opStartDate, opEndDate]
|
|
|
+ anstDate = [anstStartDate, anstEndDate]
|
|
|
+ modifySurgeryTime.dialog = true
|
|
|
+ modifySurgeryTime.inpatientNo = inpatientNo
|
|
|
+ modifySurgeryTime.recordId = recordId
|
|
|
+}
|
|
|
+
|
|
|
+const confirmDialog = () => {
|
|
|
+ let opdateS = getDateRangeFormatDateTime(opDate)
|
|
|
+ modifySurgeryTime.opStartDate = opdateS.startTime
|
|
|
+ modifySurgeryTime.opEndDate = opdateS.endTime
|
|
|
+ if (stringIsBlank(modifySurgeryTime.opStartDate)) {
|
|
|
+ return ElMessage.error('请先填写手术时间.')
|
|
|
+ }
|
|
|
+
|
|
|
+ let anstDateS = getDateRangeFormatDateTime(anstDate)
|
|
|
+ modifySurgeryTime.anstStartDate = anstDateS.startTime
|
|
|
+ modifySurgeryTime.anstEndDate = anstDateS.endTime
|
|
|
+
|
|
|
+
|
|
|
+ modifySurgeryTimeApi(modifySurgeryTime).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
getASurgicalWard().then((res) => {
|
|
|
wardList = res
|