|
@@ -1,275 +1,307 @@
|
|
<template>
|
|
<template>
|
|
- <div class="app-container">
|
|
|
|
- <el-row style="">
|
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="3" :xl="3">
|
|
|
|
- <div class="grid-content bg-purple">
|
|
|
|
- <el-dropdown @command="handleCommand">
|
|
|
|
- <div class="pulldown">
|
|
|
|
- <span class="el-dropdown-link" v-if="!status">
|
|
|
|
- 供应商状态状态
|
|
|
|
- </span>
|
|
|
|
- <span class="el-dropdown-link" v-if="status">
|
|
|
|
- {{status}}
|
|
|
|
- </span>
|
|
|
|
- <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
- </div>
|
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
|
- <el-dropdown-item command="未通过">未通过</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="待审核">待审核</el-dropdown-item>
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
- </el-dropdown>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :xs="24" :sm="24" :md="24" :lg="3" :xl="3">
|
|
|
|
- <div class="grid-content bg-purple">
|
|
|
|
- <el-dropdown @command="handlehpCommand()">
|
|
|
|
- <div class="pulldown">
|
|
|
|
- <span class="el-dropdown-link" v-if="!hpstatus">
|
|
|
|
- 审核状态
|
|
|
|
- </span>
|
|
|
|
- <span class="el-dropdown-link" v-if="hpstatus">
|
|
|
|
- {{hpstatus}}
|
|
|
|
- </span>
|
|
|
|
- <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
- </div>
|
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
|
- <el-dropdown-item command="成功">成功</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="失败">失败</el-dropdown-item>
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
- </el-dropdown>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="5" >
|
|
|
|
- <div class="grid-content bg-purple">
|
|
|
|
- <div class="block">
|
|
|
|
- <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
|
|
|
|
- start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
|
|
|
|
- </el-date-picker>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <el-row style="">
|
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="6">
|
|
|
|
+ <div class="grid-content bg-purple" style="margin-left: 25px;">
|
|
|
|
+ <el-input placeholder="请输入供应商名称" v-model="search" @change="Search" clearable style="width: 80%;">
|
|
|
|
+ <i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
|
+ </el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :md="12" :lg="3" :xl="3">
|
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
|
+ <el-dropdown @command="PhandleCommand">
|
|
|
|
+ <div class="pulldown">
|
|
|
|
+ <span class="el-dropdown-link" v-if="!providerStatus">
|
|
|
|
+ 供应商状态
|
|
|
|
+ </span>
|
|
|
|
+ <span class="el-dropdown-link" v-if="providerStatus">
|
|
|
|
+ {{providerStatus}}
|
|
|
|
+ </span>
|
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <el-dropdown-item command="供应商状态">供应商状态</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="正常">正常</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="删除">删除</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="3" :xl="3">
|
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
|
+ <el-dropdown @command="AhandleCommand">
|
|
|
|
+ <div class="pulldown">
|
|
|
|
+ <span class="el-dropdown-link" v-if="!AuditStatus">
|
|
|
|
+ 审核状态
|
|
|
|
+ </span>
|
|
|
|
+ <span class="el-dropdown-link" v-if="AuditStatus">
|
|
|
|
+ {{AuditStatus}}
|
|
|
|
+ </span>
|
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <el-dropdown-item command="审核状态">审核状态</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="已认证">已认证</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="未认证">未认证</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="5">
|
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
|
+ <div class="block">
|
|
|
|
+ <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels
|
|
|
|
+ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
|
|
|
|
+ :picker-options="pickerOptions">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </div>
|
|
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="6">
|
|
|
|
- <div class="grid-content bg-purple" style="margin-left: 25px;">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入供应商名称"
|
|
|
|
- v-model="input4" style="width: 80%;">
|
|
|
|
- <i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
|
- </el-input>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- <!-- <el-col :span="1">
|
|
|
|
- <div class="grid-content bg-purple"></div>
|
|
|
|
- </el-col> -->
|
|
|
|
- <el-col :xs="24" :sm="24" :md="24" :lg="14" :xl="7">
|
|
|
|
- <div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
|
|
|
|
- <el-button type="primary">审核失败</el-button>
|
|
|
|
- <el-button type="primary">审核成功</el-button>
|
|
|
|
- <el-button type="primary">导出</el-button>
|
|
|
|
- <el-button type="success">复原</el-button>
|
|
|
|
- <el-button type="danger">禁用</el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
|
|
- </el-row>
|
|
|
|
- <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit highlight-current-row>
|
|
|
|
- <el-table-column align="center" label="" width="55" type="selection">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="供应商名称" align="center" prop="name">
|
|
|
|
- <!-- <template slot-scope="scope">
|
|
|
|
|
|
+
|
|
|
|
+ <el-col :xs="24" :sm="24" :md="24" :lg="14" :xl="7">
|
|
|
|
+ <div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
|
|
|
|
+ <el-button type="primary">审核失败</el-button>
|
|
|
|
+ <el-button type="primary">审核成功</el-button>
|
|
|
|
+ <el-button type="primary">导出</el-button>
|
|
|
|
+ <el-button type="success">复原</el-button>
|
|
|
|
+ <el-button type="danger">禁用</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-table v-loading="listLoading" :data="temporaryList" element-loading-text="Loading" border fit
|
|
|
|
+ highlight-current-row>
|
|
|
|
+ <el-table-column align="center" label="" width="55" type="selection">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="供应商名称" align="center" prop="name">
|
|
|
|
+ <!-- <template slot-scope="scope">
|
|
{{scope.name}}
|
|
{{scope.name}}
|
|
</template> -->
|
|
</template> -->
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="社会统一信用代码" width="240" align="center" prop="socialCode">
|
|
|
|
- <!-- <template slot-scope="scope">
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="社会统一信用代码" width="240" align="center" prop="socialCode">
|
|
|
|
+ <!-- <template slot-scope="scope">
|
|
{{scope.socialCode}}
|
|
{{scope.socialCode}}
|
|
</template> -->
|
|
</template> -->
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="账号" width="180" align="center" prop="account">
|
|
|
|
- <!-- <template slot-scope="scope">
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="账号" width="180" align="center" prop="account">
|
|
|
|
+ <!-- <template slot-scope="scope">
|
|
{{scope.account}}
|
|
{{scope.account}}
|
|
</template> -->
|
|
</template> -->
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="法人名称" width="180" align="center" prop="legalPerson">
|
|
|
|
- <!-- <template slot-scope="scope">
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="法人名称" width="180" align="center" prop="legalPerson">
|
|
|
|
+ <!-- <template slot-scope="scope">
|
|
{{scope.legalPerson}}
|
|
{{scope.legalPerson}}
|
|
</template> -->
|
|
</template> -->
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="联系人" width="180" align="center" prop="contacts">
|
|
|
|
- <!-- <template slot-scope="scope">
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="联系人" width="180" align="center" prop="contacts">
|
|
|
|
+ <!-- <template slot-scope="scope">
|
|
{{scope.contacts}}
|
|
{{scope.contacts}}
|
|
</template> -->
|
|
</template> -->
|
|
- </el-table-column>
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
|
- <el-table-column label="电话" width="180" align="center" prop="contactsMobile">
|
|
|
|
- <!-- <template slot-scope="scope">
|
|
|
|
|
|
+ <el-table-column label="电话" width="180" align="center" prop="contactsMobile">
|
|
|
|
+ <!-- <template slot-scope="scope">
|
|
{{scope.contactsMobile}}
|
|
{{scope.contactsMobile}}
|
|
</template> -->
|
|
</template> -->
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="审核状态" width="180" align="center" prop="statusText">
|
|
|
|
- <!-- <template slot-scope="scope">
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="审核状态" width="180" align="center" prop="statusText">
|
|
|
|
+ <!-- <template slot-scope="scope">
|
|
{{scope.statusText}}
|
|
{{scope.statusText}}
|
|
</template> -->
|
|
</template> -->
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" prop="created_at" label="时间" >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" prop="createdAt" label="时间">
|
|
|
|
+ <!-- <template slot-scope="scope">
|
|
<i class="el-icon-time" />
|
|
<i class="el-icon-time" />
|
|
<span>{{ scope.row.display_time }}</span>
|
|
<span>{{ scope.row.display_time }}</span>
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" prop="created_at" label="操作" width="250">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-tag type="success" style="cursor: pointer;margin-right: 15px;" @click="toedit(scope.row.id)">编辑</el-tag>
|
|
|
|
- <el-tag type="warning" style="margin-right: 15px;cursor: pointer;">复原</el-tag>
|
|
|
|
- <el-tag type="info">禁用</el-tag>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- <div class="pagesip" >
|
|
|
|
- <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页</el-button>
|
|
|
|
- <el-pagination
|
|
|
|
- background
|
|
|
|
- layout="prev, pager, next"
|
|
|
|
- :total="100"
|
|
|
|
- :size="5"
|
|
|
|
- prev-text="上一页"
|
|
|
|
- next-text="下一页"
|
|
|
|
- :hide-on-single-page="false"
|
|
|
|
- ref="pagination">
|
|
|
|
- </el-pagination>
|
|
|
|
- <el-button type="primary" size="small" style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页</el-button>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </template> -->
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" prop="created_at" label="操作" width="250">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-tag type="success" style="cursor: pointer;margin-right: 15px;" @click="toedit(scope.row.id)">编辑
|
|
|
|
+ </el-tag>
|
|
|
|
+ <el-tag type="warning" style="margin-right: 15px;cursor: pointer;">复原</el-tag>
|
|
|
|
+ <el-tag type="info">禁用</el-tag>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <div class="pagesip">
|
|
|
|
+ <el-button type="primary" size="small"
|
|
|
|
+ style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-pagination background @current-change="handleCurrentChange" layout="prev, pager, next"
|
|
|
|
+ :total="list.length" :page-size="10" prev-text="上一页" next-text="下一页" :hide-on-single-page="false"
|
|
|
|
+ ref="pagination">
|
|
|
|
+ </el-pagination>
|
|
|
|
+ <el-button type="primary" size="small"
|
|
|
|
+ style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import {
|
|
|
|
- getList
|
|
|
|
- } from '@/api/table'
|
|
|
|
-
|
|
|
|
- export default {
|
|
|
|
- filters: {
|
|
|
|
- statusFilter(status) {
|
|
|
|
- const statusMap = {
|
|
|
|
- published: 'success',
|
|
|
|
- draft: 'gray',
|
|
|
|
- deleted: 'danger'
|
|
|
|
- }
|
|
|
|
- return statusMap[status]
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- list: [],
|
|
|
|
- listLoading: false,
|
|
|
|
- status: '',
|
|
|
|
- hpstatus:'',
|
|
|
|
- input4:'',
|
|
|
|
- checked:false,
|
|
|
|
- pickerOptions: {
|
|
|
|
- shortcuts: [{
|
|
|
|
- text: '最近一周',
|
|
|
|
- onClick(picker) {
|
|
|
|
- const end = new Date();
|
|
|
|
- const start = new Date();
|
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
- picker.$emit('pick', [start, end]);
|
|
|
|
- }
|
|
|
|
- }, {
|
|
|
|
- text: '最近一个月',
|
|
|
|
- onClick(picker) {
|
|
|
|
- const end = new Date();
|
|
|
|
- const start = new Date();
|
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
|
- picker.$emit('pick', [start, end]);
|
|
|
|
- }
|
|
|
|
- }, {
|
|
|
|
- text: '最近三个月',
|
|
|
|
- onClick(picker) {
|
|
|
|
- const end = new Date();
|
|
|
|
- const start = new Date();
|
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
|
- picker.$emit('pick', [start, end]);
|
|
|
|
- }
|
|
|
|
- }]
|
|
|
|
- },
|
|
|
|
- value1: '',
|
|
|
|
- value2: ''
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- created() {
|
|
|
|
- // this.fetchData()
|
|
|
|
- },
|
|
|
|
- mounted(){
|
|
|
|
- this.$request({
|
|
|
|
- url:"/api/Supplier/search",
|
|
|
|
- method:'post',
|
|
|
|
- data:{
|
|
|
|
- pageIndex:1,
|
|
|
|
- pageSize:10,
|
|
|
|
- }
|
|
|
|
- }).then((res)=>{
|
|
|
|
- this.list=res.data.result
|
|
|
|
- console.log(this.list)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- handleCommand(command) {
|
|
|
|
- this.status = command
|
|
|
|
|
|
+ import {
|
|
|
|
+ getList
|
|
|
|
+ } from '@/api/table'
|
|
|
|
|
|
- },
|
|
|
|
- handlehpCommand(command) {
|
|
|
|
- this.hpstatus = command
|
|
|
|
|
|
+ export default {
|
|
|
|
+ filters: {
|
|
|
|
+ statusFilter(status) {
|
|
|
|
+ const statusMap = {
|
|
|
|
+ published: 'success',
|
|
|
|
+ draft: 'gray',
|
|
|
|
+ deleted: 'danger'
|
|
|
|
+ }
|
|
|
|
+ return statusMap[status]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ srcList: [],
|
|
|
|
+ list: [],
|
|
|
|
+ temporaryList: [],
|
|
|
|
+ listLoading: false,
|
|
|
|
+ providerStatus: '',
|
|
|
|
+ AuditStatus: '',
|
|
|
|
+ search: '',
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ pagesize: 9,
|
|
|
|
+ checked: false,
|
|
|
|
+ pickerOptions: {
|
|
|
|
+ shortcuts: [{
|
|
|
|
+ text: '最近一周',
|
|
|
|
+ onClick(picker) {
|
|
|
|
+ const end = new Date();
|
|
|
|
+ const start = new Date();
|
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
+ picker.$emit('pick', [start, end]);
|
|
|
|
+ }
|
|
|
|
+ }, {
|
|
|
|
+ text: '最近一个月',
|
|
|
|
+ onClick(picker) {
|
|
|
|
+ const end = new Date();
|
|
|
|
+ const start = new Date();
|
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
|
+ picker.$emit('pick', [start, end]);
|
|
|
|
+ }
|
|
|
|
+ }, {
|
|
|
|
+ text: '最近三个月',
|
|
|
|
+ onClick(picker) {
|
|
|
|
+ const end = new Date();
|
|
|
|
+ const start = new Date();
|
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
|
+ picker.$emit('pick', [start, end]);
|
|
|
|
+ }
|
|
|
|
+ }]
|
|
|
|
+ },
|
|
|
|
+ value1: '',
|
|
|
|
+ value2: ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ // this.fetchData()
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.$request({
|
|
|
|
+ url: "/api/Supplier/search",
|
|
|
|
+ method: 'post',
|
|
|
|
+ data: {
|
|
|
|
+ pageIndex: 1,
|
|
|
|
+ pageSize: 30,
|
|
|
|
+ }
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ this.list = res.data.result
|
|
|
|
+ this.getPageData();
|
|
|
|
+ console.log(this.list)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ PhandleCommand(command) {
|
|
|
|
+ this.providerStatus = command
|
|
|
|
+ if(this.providerStatus=="正常"||this.providerStatus=="删除"){
|
|
|
|
+ this.temporaryList=this.srcList.filter(item=>item.isDeletedText==this.providerStatus)
|
|
|
|
+ }else {
|
|
|
|
+ this.temporaryList=this.srcList
|
|
|
|
+ }
|
|
|
|
|
|
- },
|
|
|
|
- // fetchData() {
|
|
|
|
- // this.listLoading = true
|
|
|
|
- // getList().then(response => {
|
|
|
|
- // this.list = response.data.items
|
|
|
|
- // this.listLoading = false
|
|
|
|
- // })
|
|
|
|
- // },
|
|
|
|
- toedit(id){
|
|
|
|
- this.$router.push({path:'/edit',query:{id:id}})
|
|
|
|
- },
|
|
|
|
- jumpFirstPage () {
|
|
|
|
- this.$refs.pagination.handleCurrentChange(1);
|
|
|
|
- this.$emit('handleCurrentChange', 1);
|
|
|
|
},
|
|
},
|
|
- jumpLastPage () {
|
|
|
|
- let font = this.$refs.pagination
|
|
|
|
- let cpage = Math.ceil(font.total / font.pageSize);
|
|
|
|
- font.handleCurrentChange(cpage);
|
|
|
|
|
|
+ AhandleCommand(command) {
|
|
|
|
+ this.AuditStatus = command
|
|
|
|
+ if(this.AuditStatus=="已认证"||this.AuditStatus=="未认证"){
|
|
|
|
+ this.temporaryList=this.srcList.filter(item=>item.statusText==this.AuditStatus)
|
|
|
|
+ }else {
|
|
|
|
+ this.temporaryList=this.srcList
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ toedit(id) {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: '/edit',
|
|
|
|
+ query: {
|
|
|
|
+ id: id
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleCurrentChange(val) {
|
|
|
|
+ this.currentPage = val;
|
|
|
|
+ this.getPageData();
|
|
|
|
+ },
|
|
|
|
+ jumpFirstPage() {
|
|
|
|
+ this.$refs.pagination.handleCurrentChange(1);
|
|
|
|
+ this.$emit('handleCurrentChange', 1);
|
|
},
|
|
},
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ jumpLastPage() {
|
|
|
|
+ let font = this.$refs.pagination
|
|
|
|
+ let cpage = Math.ceil(font.total / font.pageSize);
|
|
|
|
+ font.handleCurrentChange(cpage);
|
|
|
|
+ },
|
|
|
|
+ getPageData() {
|
|
|
|
+ let start = (this.currentPage - 1) * this.pagesize;
|
|
|
|
+ let end = start + this.pagesize;
|
|
|
|
+ this.srcList = this.list.slice(start, end);
|
|
|
|
+ this.temporaryList=this.srcList
|
|
|
|
+ },
|
|
|
|
+ Search() {
|
|
|
|
+ if (this.search == "") {
|
|
|
|
+ this.temporaryList = this.srcList
|
|
|
|
+ } else {
|
|
|
|
+ this.temporaryList = this.list.filter(item => item.name == this.search)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
- .pulldown {
|
|
|
|
- width: 185px;
|
|
|
|
- height: 40px;
|
|
|
|
- border: 1px solid #E8E8E8;
|
|
|
|
- border-radius: 10px;
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: center;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- padding: 0 20px;
|
|
|
|
- color: #999999;
|
|
|
|
- }
|
|
|
|
- .pagesip{
|
|
|
|
- position: fixed;
|
|
|
|
- bottom: 16px;
|
|
|
|
- width: 88%;
|
|
|
|
- margin: 20px auto;
|
|
|
|
- display: flex;
|
|
|
|
- // align-items: center;
|
|
|
|
- justify-content: flex-end;
|
|
|
|
- }
|
|
|
|
- .el-pagination.is-background .el-pager li:not(.disabled).active{
|
|
|
|
- background-color:#D8AB5A;
|
|
|
|
- }
|
|
|
|
- .el-col{
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
- }
|
|
|
|
|
|
+ .pulldown {
|
|
|
|
+ width: 185px;
|
|
|
|
+ height: 40px;
|
|
|
|
+ border: 1px solid #E8E8E8;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ padding: 0 20px;
|
|
|
|
+ color: #999999;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .pagesip {
|
|
|
|
+ position: fixed;
|
|
|
|
+ bottom: 16px;
|
|
|
|
+ width: 88%;
|
|
|
|
+ margin: 20px auto;
|
|
|
|
+ display: flex;
|
|
|
|
+ // align-items: center;
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-pagination.is-background .el-pager li:not(.disabled).active {
|
|
|
|
+ background-color: #D8AB5A;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-col {
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|