|
|
@@ -0,0 +1,327 @@
|
|
|
+<template>
|
|
|
+ <div class="details-container">
|
|
|
+ <section class="section-container">
|
|
|
+ <div class="detail-intro">
|
|
|
+ <div class="img-wrap">
|
|
|
+ <img :src="instrDetails.instPicture" alt="" style="width: 100%" />
|
|
|
+ </div>
|
|
|
+ <div class="detail-info">
|
|
|
+ <h3 class="instr-name">{{ instrDetails.instName }}</h3>
|
|
|
+ <div class="info-wrap">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <div class="msg">
|
|
|
+ <span class="num">
|
|
|
+ {{ instrDetails.focusPeopleNum }}
|
|
|
+ </span>
|
|
|
+ 次
|
|
|
+ </div>
|
|
|
+ <em>预约次数</em>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <div class="msg">
|
|
|
+ <span class="num">
|
|
|
+ {{ instrDetails.usePeopleNum }}
|
|
|
+ </span>
|
|
|
+ h
|
|
|
+ </div>
|
|
|
+ <em>预约时长</em>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <div class="msg">
|
|
|
+ <span class="num">
|
|
|
+ {{ instrDetails.useTimesNum }}
|
|
|
+ </span>
|
|
|
+ 人
|
|
|
+ </div>
|
|
|
+ <em>当前预约</em>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <div class="msg">
|
|
|
+ <span class="num">
|
|
|
+ {{ instrDetails.useDuration }}
|
|
|
+ </span>
|
|
|
+ 人
|
|
|
+ </div>
|
|
|
+ <em>可用预约</em>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="text-item">
|
|
|
+ <div class="info-item">
|
|
|
+ <div class="title">平台状态</div>
|
|
|
+ <div class="txt">
|
|
|
+ <el-tag type="primary" size="normal">可预约</el-tag>
|
|
|
+ <!-- <el-tag type="danger" size="normal">已约满</el-tag> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="info-item">
|
|
|
+ <div class="title">平台状态</div>
|
|
|
+ <div class="txt">
|
|
|
+ <div class="sf-box">
|
|
|
+ <div class="d1">机时</div>
|
|
|
+ <div class="d2">
|
|
|
+ {{ chargeConfig.appointTimePrice }}元/{{
|
|
|
+ chargeConfig.appointTimePriceMinute
|
|
|
+ }}分钟
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="info-item">
|
|
|
+ <div class="title">放置地点</div>
|
|
|
+ <div class="txt">
|
|
|
+ <span :title="instrDetails.placeAddress">
|
|
|
+ {{ instrDetails.placeAddress || "-" }}
|
|
|
+ <span v-if="instrDetails.laboratoryName">
|
|
|
+ ({{ instrDetails.laboratoryName }})
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="info-item">
|
|
|
+ <div class="title">预约类型</div>
|
|
|
+ <div class="txt">
|
|
|
+ <el-radio-group v-model="radio1">
|
|
|
+ <el-radio-button class="mr10" label="10天"></el-radio-button>
|
|
|
+ <el-radio-button class="mr10" label="15天"></el-radio-button>
|
|
|
+ <el-radio-button class="mr10" label="30天"></el-radio-button>
|
|
|
+ <el-radio-button class="mr10" label="60天"></el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="appoint-btn-wrap">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="default"
|
|
|
+ v-if="
|
|
|
+ instrDetails.instStatus == '10' &&
|
|
|
+ instrDetails.isAppointment == '10'
|
|
|
+ "
|
|
|
+ @click="handleAppoint"
|
|
|
+ >
|
|
|
+ 使用预约
|
|
|
+ </el-button>
|
|
|
+ <!-- <el-button
|
|
|
+ type="success"
|
|
|
+ size="default"
|
|
|
+ v-if="
|
|
|
+ instrDetails.instStatus == '10' &&
|
|
|
+ instrDetails.isSampleDelivery == '10'
|
|
|
+ "
|
|
|
+ @click=""
|
|
|
+ >
|
|
|
+ 送样预约
|
|
|
+ </el-button> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tab-container def-tabs-wrap mb20">
|
|
|
+ <el-tabs class="mb10" v-model="activeName" type="card">
|
|
|
+ <el-tab-pane label="基本介绍" name="info"></el-tab-pane>
|
|
|
+ <el-tab-pane label="仪器列表" name="appoint"></el-tab-pane>
|
|
|
+ <el-tab-pane label="检测项目" name="file"></el-tab-pane>
|
|
|
+ <el-tab-pane label="附件下载" name="notice"></el-tab-pane>
|
|
|
+ <el-tab-pane label="使用说明" name="notice"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import to from "await-to-js";
|
|
|
+ import { getToken } from "@/utils/auth";
|
|
|
+ import { getInstrDetails, getChargeCfg } from "@/api/instr/index";
|
|
|
+ export default {
|
|
|
+ name: "equipmentDetails",
|
|
|
+ components: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ radio1: "",
|
|
|
+ activeName: "info",
|
|
|
+ instrDetails: {},
|
|
|
+ chargeConfig: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+
|
|
|
+ mounted() {
|
|
|
+ this.getInstrDetails();
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ handleAppoint() {
|
|
|
+ const token = getToken();
|
|
|
+ if (!token) {
|
|
|
+ return this.$router.push(
|
|
|
+ "/login?redirect=/appointment/equipment-details?id=" +
|
|
|
+ this.instrDetails.id
|
|
|
+ );
|
|
|
+ }
|
|
|
+ this.$refs.appointRef.openDialog(this.instrDetails);
|
|
|
+ },
|
|
|
+ async getInstrDetails() {
|
|
|
+ const id = this.$route.query.id * 1;
|
|
|
+ if (!id)
|
|
|
+ return this.$message({
|
|
|
+ message: "缺少必要查询参数",
|
|
|
+ type: "warning",
|
|
|
+ });
|
|
|
+ const [err, res] = await to(getInstrDetails({ id }));
|
|
|
+ if (err) return;
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.instrDetails = res.data;
|
|
|
+ this.getChargeCfg(id);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async getChargeCfg(id) {
|
|
|
+ const [err, res] = await to(getChargeCfg({ id }));
|
|
|
+ if (err) return;
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.chargeConfig = res.data;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .details-container {
|
|
|
+ background: #f8f9fd;
|
|
|
+ padding: 40px 0 20px;
|
|
|
+ }
|
|
|
+ .section-container {
|
|
|
+ width: 1200px;
|
|
|
+ margin: 0 auto;
|
|
|
+ .detail-intro {
|
|
|
+ background: #fff;
|
|
|
+ display: flex;
|
|
|
+ padding: 16px;
|
|
|
+ .img-wrap {
|
|
|
+ width: 420px;
|
|
|
+ height: 420px;
|
|
|
+ background: #f3f6fb;
|
|
|
+ border: 1px solid #e1e4ee;
|
|
|
+ -webkit-box-sizing: border-box;
|
|
|
+ box-sizing: border-box;
|
|
|
+ float: left;
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+ .detail-info {
|
|
|
+ margin-left: 28px;
|
|
|
+ .instr-name {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 700;
|
|
|
+ line-height: 26px;
|
|
|
+ padding: 10px 0 16px;
|
|
|
+ }
|
|
|
+ .info-wrap {
|
|
|
+ width: 483px;
|
|
|
+ height: 72px;
|
|
|
+ background: #f8f9fb;
|
|
|
+ border: 1px solid #e8ecf2;
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-bottom: 16px;
|
|
|
+ color: #666;
|
|
|
+ li {
|
|
|
+ position: relative;
|
|
|
+ float: left;
|
|
|
+ width: 25%;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 16px;
|
|
|
+ position: relative;
|
|
|
+ .msg {
|
|
|
+ line-height: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 16px 0 5px;
|
|
|
+ .num {
|
|
|
+ font-size: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &:nth-of-type(2)::before,
|
|
|
+ &:nth-of-type(3)::before,
|
|
|
+ &:nth-of-type(4)::before {
|
|
|
+ display: block;
|
|
|
+ content: "";
|
|
|
+ position: absolute;
|
|
|
+ top: 19px;
|
|
|
+ left: 0;
|
|
|
+ width: 1px;
|
|
|
+ height: 36px;
|
|
|
+ background: #e4e9f2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .text-item {
|
|
|
+ min-height: 218px;
|
|
|
+ height: auto;
|
|
|
+ box-sizing: border-box;
|
|
|
+ // padding-bottom: 47px;
|
|
|
+ .info-item {
|
|
|
+ width: 100%;
|
|
|
+ min-height: 28px;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 28px;
|
|
|
+ margin-bottom: 16px;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ width: 74px;
|
|
|
+ float: left;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ .txt {
|
|
|
+ margin-left: 74px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ // max-width: 410px;
|
|
|
+ padding-right: 40px;
|
|
|
+ .sf-box {
|
|
|
+ display: inline-block;
|
|
|
+ border: 1px solid blue;
|
|
|
+ width: 150px;
|
|
|
+ .d1 {
|
|
|
+ display: inline-block;
|
|
|
+ background-color: dodgerblue;
|
|
|
+ padding: 0 8px 0 8px;
|
|
|
+ color: white;
|
|
|
+ border-right: 1px solid blue;
|
|
|
+ }
|
|
|
+ .d2 {
|
|
|
+ display: inline-block;
|
|
|
+ color: blue;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ vertical-align: bottom;
|
|
|
+ width: 100px;
|
|
|
+ padding-left: 6px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tab-container {
|
|
|
+ margin-top: 40px;
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ div {
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ :deep(.el-tabs__content) {
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+ :deep(.el-radio-button__inner) {
|
|
|
+ padding: 12px 40px;
|
|
|
+ border-radius: 0 !important;
|
|
|
+ border-left: 1px solid #dcdfe6;
|
|
|
+ }
|
|
|
+</style>
|