| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <div class="container">
- <div class="list">
- <ul>
- <li v-for="(v, i) in tableData" :key="i">
- <h4>
- <div class="title">{{ v.name }}</div>
- </h4>
- <div class="price-item">
- <span class="price">{{ v.price }}</span>
- <span>元/样</span>
- </div>
- </li>
- </ul>
- </div>
- </div>
- </template>
- <script>
- import to from "await-to-js";
- import { getSampleOption } from "@/api/instr/index";
- export default {
- name: "equipment",
- components: {},
- data() {
- return {
- tableData: [],
- searchForm: {
- id: 0,
- },
- total: 0,
- };
- },
- created() {},
- mounted() {
- this.searchForm.id = this.$route.query.id * 1;
- this.getNoticeListData();
- },
- methods: {
- async getNoticeListData() {
- const [err, res] = await to(getSampleOption(this.searchForm));
- if (err) return;
- if (res.code == 200) {
- this.tableData = res.data;
- }
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .container {
- padding: 10px 0;
- .list {
- li {
- background: #f3f6fb;
- border-radius: 6px;
- margin-bottom: 20px;
- padding: 24px 36px 24px 18px;
- display: flex;
- line-height: 42px;
- font-size: 14px;
- align-content: center;
- color: #666;
- .title {
- font-weight: 700;
- width: 285px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- padding: 0 10px 0 18px;
- position: relative;
- color: #333;
- }
- .price {
- color: #1677ff;
- }
- }
- }
- }
- .pagination {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- }
- </style>
|