|
@@ -0,0 +1,329 @@
|
|
|
|
|
+<!-- -->
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="holding">
|
|
|
|
|
+ <div class="left">
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li v-for="(item, index) in tabList" :key="index" @click="skip(index)">
|
|
|
|
|
+ <i class="el-icon-edit"></i>
|
|
|
|
|
+ {{ item }}
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="right">
|
|
|
|
|
+ <div class="top">
|
|
|
|
|
+ <el-breadcrumb separator="/">
|
|
|
|
|
+ <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
|
|
|
|
+ <el-breadcrumb-item to="">馆藏管理</el-breadcrumb-item>
|
|
|
|
|
+ <el-breadcrumb-item>藏品总帐</el-breadcrumb-item>
|
|
|
|
|
+ </el-breadcrumb>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="conten">
|
|
|
|
|
+ <div class="middle">
|
|
|
|
|
+ <div class="select">
|
|
|
|
|
+ <span>藏品类型:</span>
|
|
|
|
|
+ <el-select v-model="sourceVal" placeholder="请选择">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in source"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <span>藏品年代:</span>
|
|
|
|
|
+ <el-select v-model="age" placeholder="请选择">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in source2"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <span>藏品名称:</span>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="type"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ style="width: 217px"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ <el-button style="margin-left: 20px">查询</el-button>
|
|
|
|
|
+ <el-button>导出</el-button>
|
|
|
|
|
+ <div class="pattern">
|
|
|
|
|
+ <div :class="{ active: change === 0 }" @click="pattern(0)">
|
|
|
|
|
+ <i class="el-icon-menu"></i>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div :class="{ active: change === 1 }" @click="pattern(1)">
|
|
|
|
|
+ <i class="el-icon-s-unfold"></i>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!--表格 -->
|
|
|
|
|
+ <div class="table" v-if="change">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
|
|
|
|
|
+ :data="tableData"
|
|
|
|
|
+ border
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column label="缩略图" width="80">
|
|
|
|
|
+ <template #default>
|
|
|
|
|
+ <div class="smimg">
|
|
|
|
|
+ <img src="../../assets/img/user.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="name"
|
|
|
|
|
+ sortable
|
|
|
|
|
+ label="总登记号"
|
|
|
|
|
+ width="235"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="address" sortable label="藏品名称">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="name" sortable label="年代" width="130">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="name" sortable label="质地" width="220">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="name" label="状态" width="130">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="操作" width="130">
|
|
|
|
|
+ <template #default>
|
|
|
|
|
+ <el-button type="text">查看</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 图片显示 -->
|
|
|
|
|
+ <div class="imgInfo" v-else>
|
|
|
|
|
+ <div class="imgInfo_single" v-for="i in 28" :key="i">
|
|
|
|
|
+ <img src="../../assets/img/user.png" alt="" />
|
|
|
|
|
+ <span>文物名称</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- 分页器 -->
|
|
|
|
|
+ <div class="paging">
|
|
|
|
|
+ <el-pagination
|
|
|
|
|
+ background
|
|
|
|
|
+ layout="prev, pager, next,sizes,jumper"
|
|
|
|
|
+ :total="100"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-pagination>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: 'Holding0',
|
|
|
|
|
+ data () {
|
|
|
|
|
+ return {
|
|
|
|
|
+ // 控制显示表格还是图片
|
|
|
|
|
+ change: 0,
|
|
|
|
|
+ tabList: [
|
|
|
|
|
+ '藏品登记',
|
|
|
|
|
+ '入库管理',
|
|
|
|
|
+ '出库管理',
|
|
|
|
|
+ '藏品总账',
|
|
|
|
|
+ '藏品盘核',
|
|
|
|
|
+ '藏品注销'
|
|
|
|
|
+ ],
|
|
|
|
|
+ type: '',
|
|
|
|
|
+ sourceVal: '',
|
|
|
|
|
+ age: '',
|
|
|
|
|
+ source: [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: '选项1',
|
|
|
|
|
+ label: '黄金糕'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: '选项2',
|
|
|
|
|
+ label: '双皮奶'
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ source2: [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: '选项11',
|
|
|
|
|
+ label: '黄金糕11'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: '选项22',
|
|
|
|
|
+ label: '双皮奶22'
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ // 表格数据
|
|
|
|
|
+ tableData: [
|
|
|
|
|
+ {
|
|
|
|
|
+ date: '2016-05-03',
|
|
|
|
|
+ name: '王小虎',
|
|
|
|
|
+ address: '上海市普陀区金沙江路 1518 弄'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ date: '2016-05-02',
|
|
|
|
|
+ name: '王小虎',
|
|
|
|
|
+ address: '上海市普陀区金沙江路 1518 弄'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 监听属性 类似于data概念
|
|
|
|
|
+ computed: {},
|
|
|
|
|
+ // 监控data中的数据变化
|
|
|
|
|
+ watch: {},
|
|
|
|
|
+ // 方法集合
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ skip (index) {
|
|
|
|
|
+ this.$router.push(`/layout/holding${index}`)
|
|
|
|
|
+ },
|
|
|
|
|
+ // 控制显示表格还是图片
|
|
|
|
|
+ pattern (index) {
|
|
|
|
|
+ this.change = index
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 生命周期 - 创建完成(可以访问当前this实例)
|
|
|
|
|
+ created () {},
|
|
|
|
|
+ // 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
|
|
+ mounted () {
|
|
|
|
|
+ this.tabInd = this.INtabInd
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeCreate () {}, // 生命周期 - 创建之前
|
|
|
|
|
+ beforeMount () {}, // 生命周期 - 挂载之前
|
|
|
|
|
+ beforeUpdate () {}, // 生命周期 - 更新之前
|
|
|
|
|
+ updated () {}, // 生命周期 - 更新之后
|
|
|
|
|
+ beforeDestroy () {}, // 生命周期 - 销毁之前
|
|
|
|
|
+ destroyed () {}, // 生命周期 - 销毁完成
|
|
|
|
|
+ activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
+<style lang='less' scoped>
|
|
|
|
|
+.holding {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ .left {
|
|
|
|
|
+ width: 220px;
|
|
|
|
|
+ height: 100vh;
|
|
|
|
|
+ min-width: 130px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ box-shadow: 1px 1px 10px 1px;
|
|
|
|
|
+ ul {
|
|
|
|
|
+ li:nth-of-type(4) {
|
|
|
|
|
+ background-color: #e6f7ff;
|
|
|
|
|
+ }
|
|
|
|
|
+ li {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ color: black;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ height: 60px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ i {
|
|
|
|
|
+ margin: 0 18px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .right {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ .top {
|
|
|
|
|
+ padding-left: 35px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ box-shadow: 1px 1px 10px 1px;
|
|
|
|
|
+ margin-left: 2px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ .conten {
|
|
|
|
|
+ padding: 20px 20px 60px;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 850px;
|
|
|
|
|
+ .middle {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ .select {
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ .pattern {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ margin-left: 22px;
|
|
|
|
|
+ width: 130px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ .active {
|
|
|
|
|
+ background-color: #3aa1ed;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ div {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ width: 65px;
|
|
|
|
|
+ height: 40px;
|
|
|
|
|
+ border-radius: 12px;
|
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ i {
|
|
|
|
|
+ font-size: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ color: black;
|
|
|
|
|
+ padding: 30px 0 0 0;
|
|
|
|
|
+ & > span {
|
|
|
|
|
+ margin-left: 30px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .table {
|
|
|
|
|
+ max-height: 640px;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ padding: 24px;
|
|
|
|
|
+ .smimg {
|
|
|
|
|
+ width: 80px;
|
|
|
|
|
+ height: 60px;
|
|
|
|
|
+ img {
|
|
|
|
|
+ margin: 5px 0 0 5px;
|
|
|
|
|
+ width: 50px;
|
|
|
|
|
+ height: 50px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .imgInfo {
|
|
|
|
|
+ max-height: 635px;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ padding: 10px 75px 40px 75px;
|
|
|
|
|
+ .imgInfo_single {
|
|
|
|
|
+ margin: 30px 45px 0 45px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ width: 140px;
|
|
|
|
|
+ height: 165px;
|
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 140px;
|
|
|
|
|
+ height: 120px;
|
|
|
|
|
+ margin-bottom: 8px;
|
|
|
|
|
+ border: 5px solid #ccc;
|
|
|
|
|
+ }
|
|
|
|
|
+ span {
|
|
|
|
|
+ color: black;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .paging {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ bottom: 15px;
|
|
|
|
|
+ left: 50%;
|
|
|
|
|
+ transform: translateX(-50%);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|