eight
2024-09-12 ef8b45aea99e31d95773d82f7508449489b6e278
放弃装机功能
已修改3个文件
54 ■■■■ 文件已修改
src/api/ecg/devrent/index.ts 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/doctor/components/DevInstallPanel.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/room/RoomLoginSelect.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ecg/devrent/index.ts
@@ -59,6 +59,12 @@
  // 拆机
  devDismantle: async (data: DevRentVO) => {
    return await request.post({ url: `/ecg/dev-rent/dev-dismantle`, data })
  }
  },
  // 放弃装机
  devCancel: async (data: DevRentVO) => {
    return await request.post({ url: `/ecg/dev-rent/dev-cancel`, data })
  },
}
src/views/ecg/doctor/components/DevInstallPanel.vue
@@ -23,13 +23,19 @@
      </el-form-item>
    </el-form>
    <el-button @click="submitForm" type="primary" :disabled="formLoading">装机完成</el-button>
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button @click="cancelInstall" type="primary" :disabled="formLoading">放弃装机</el-button>
    <el-button @click="resetForm()">重 置</el-button>
  <!-- 医生拆机列表 -->
  <ContentWrap>
    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" @current-change="onCurChange" >
      <el-table-column label="id" align="center" prop="id" />
      <el-table-column label="--" align="center" prop="cancelled" >
        <template #default="scope">
          {{scope.row.cancelled == 1 ? "放弃" : ""}}
        </template>
      </el-table-column>
<!--      <el-table-column label="作业类型" align="center" prop="jobType" />-->
<!--      <el-table-column label="医生编号" align="center" prop="docId" />-->
      <el-table-column label="医生名称" align="center" width="auto" prop="docName" />
@@ -52,6 +58,7 @@
          :formatter="dateFormatter"
      />
-->
<!--
      <el-table-column label="操作" align="center" min-width="120px">
        <template #default="scope">
          <el-button
@@ -72,6 +79,7 @@
          </el-button>
        </template>
      </el-table-column>
-->
    </el-table>
    <!-- 分页 -->
    <Pagination
@@ -113,8 +121,8 @@
const formData = ref({
  id: undefined,
  devId: undefined,
  patId: patient.value.patId,
  patName: patient.value.patName,
  patId: patient.value?.patId,
  patName: patient.value?.patName,
  rentTime: new Date().getTime(),
  returnTime: undefined,
  interference: undefined,
@@ -156,13 +164,29 @@
  }
}
const cancelInstall = async () => {
  const data = formData.value as unknown as DevRentVO
  if (formData.value.id === null || formData.value.id === undefined) {
    const result = await DevRentApi.devCancel(data)
    formData.value.id = result
    message.success(t('操作成功'))
  } else {
    await DevRentApi.devCancel(data)
    message.success(t('操作成功'))
  }
  // 发送操作成功的事件
  emit('success')
  resetForm()
  getList()
}
/** 重置表单 */
const resetForm = () => {
  formData.value = {
    id: undefined,
    devId: undefined,
    patId: patient.value.patId,
    patName: patient.value.patName,
    patId: patient.value?.patId,
    patName: patient.value?.patName,
    rentTime: new Date().getTime(),
    returnTime: undefined,
    interference: undefined,
src/views/ecg/room/RoomLoginSelect.vue
@@ -90,11 +90,11 @@
  }
  if (isStringEmpty(route.redirectedFrom?.fullPath))
    push({ path: "/"})
    push({ path: "/ecg/doctor"})
  else if(route.redirectedFrom?.fullPath === "/roomselect" )
    push({ path: "/"})
    push({ path: "/ecg/doctor"})
  else if(route.redirectedFrom?.fullPath === "/ecg/roomselect" )
    push({ path: "/"})
    push({ path: "/ecg/doctor"})
  else
    push({ path: route.redirectedFrom?.fullPath})
}
@@ -137,13 +137,13 @@
  }
  if (isStringEmpty(route.redirectedFrom?.fullPath)) {
    push({path: "/"})
    push({path: "/ecg/doctor"})
  }
  else if(route.redirectedFrom?.fullPath === "/roomselect" ) {
    push({path: "/"})
    push({path: "/ecg/doctor"})
  }
  else if(route.redirectedFrom?.fullPath === "/ecg/roomselect" ) {
    push({path: "/"})
    push({path: "/ecg/doctor"})
  }
  else {
    push({path: route.redirectedFrom?.fullPath})