|
@@ -1,137 +0,0 @@
|
|
|
-<template>
|
|
|
- <!-- 静态 -->
|
|
|
- <div class="GroupRecord">
|
|
|
- <header id="header">
|
|
|
- <el-row type="flex">
|
|
|
- <el-col :span="4">
|
|
|
- <el-select v-model="value" placeholder="请选择">
|
|
|
- <el-option label="1区" value="11"></el-option>
|
|
|
- <el-option label="2区" value="22"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <el-select v-model="value" placeholder="请选择">
|
|
|
- <el-option label="1舍" value="13"></el-option>
|
|
|
- <el-option label="2舍" value="24"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <el-select v-model="value" placeholder="请选择">
|
|
|
- <el-option label="可用" value="15"></el-option>
|
|
|
- <el-option label="可用" value="26"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <el-button type="primary">查找</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </header>
|
|
|
- <section>
|
|
|
- <article class="table">
|
|
|
- <el-table :data="tableData" border style="width: 100%">
|
|
|
- <el-table-column prop="date" sortable label="日期" width="180"></el-table-column>
|
|
|
- <el-table-column prop="id" sortable label="猪编号" width="180"></el-table-column>
|
|
|
- <el-table-column prop="name" label="状态" width="180"></el-table-column>
|
|
|
- <el-table-column prop="address" label="耳标号"></el-table-column>
|
|
|
- <el-table-column label="操作" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button @click="look(scope.row)" type="text" size="small">查看</el-button>
|
|
|
- <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
|
|
|
- <el-popconfirm title="是否删除此设备的信息?" @onConfirm="del(scope.row)">
|
|
|
- <el-button slot="reference" type="text" size="small">删除</el-button>
|
|
|
- </el-popconfirm>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-row type="flex" justify="end">
|
|
|
- <el-col :span="8" class="pagination">
|
|
|
- <el-pagination
|
|
|
- @current-change="pageChange"
|
|
|
- background
|
|
|
- layout="prev, pager, next"
|
|
|
- :page-count="10"
|
|
|
- ></el-pagination>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </article>
|
|
|
- </section>
|
|
|
-
|
|
|
- <button @click="test1 = !test1">点击</button>
|
|
|
- <div :class="['test', {test1}]"></div>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- value: "",
|
|
|
- test1: false,
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- date: "2020-05-02",
|
|
|
- name: "可用",
|
|
|
- id: "825",
|
|
|
- address: "6895564457554"
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2020-05-04",
|
|
|
- name: "不可用",
|
|
|
- id: "826",
|
|
|
- address: "6895564456725"
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2020-05-03",
|
|
|
- name: "可用",
|
|
|
- id: "830",
|
|
|
- address: "6895564457594"
|
|
|
- }
|
|
|
- ]
|
|
|
- };
|
|
|
- },
|
|
|
- created() {},
|
|
|
- methods: {
|
|
|
- look(row) {
|
|
|
- console.log(row);
|
|
|
- this.$router.push({
|
|
|
- path: "UnityTrace",
|
|
|
- query: row
|
|
|
- });
|
|
|
- },
|
|
|
- edit(row) {},
|
|
|
- del(row) {},
|
|
|
- pageChange(p) {
|
|
|
- console.log(p);
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="scss" scoped>
|
|
|
-#header {
|
|
|
- margin-bottom: 15px;
|
|
|
-}
|
|
|
-.table {
|
|
|
- .pagination {
|
|
|
- margin-top: 20px;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.test {
|
|
|
- width: 400px;
|
|
|
- height: 300px;
|
|
|
- background-color: #00f;
|
|
|
- transition: 3s all;
|
|
|
-}
|
|
|
-.test1 {
|
|
|
- background-color: #ff000033;
|
|
|
-}
|
|
|
-@keyframes myfirst {
|
|
|
- from {
|
|
|
- background: red;
|
|
|
- }
|
|
|
- to {
|
|
|
- background: #00ff0000;
|
|
|
- }
|
|
|
-}
|
|
|
-</style>
|