|
@@ -1,227 +1,246 @@
|
|
<template>
|
|
<template>
|
|
- <div class="app-container">
|
|
|
|
- <el-row >
|
|
|
|
- <el-col :xs="24" :sm="7" :md="6" :lg="4" :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>
|
|
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <el-row type="flex" justify="space-between" style="margin-bottom:20px">
|
|
|
|
+ <div class="grid-content bg-purple">
|
|
|
|
+ <div class="grid-content bg-purple" style="margin-left: 30px;">
|
|
|
|
+ <el-input placeholder="请输入查询内容" v-model="input4" style="width: 80%;">
|
|
|
|
+ <i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
|
+ </el-input>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <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 :xs="24" :sm="11" :md="9" :lg="7" :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="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="10" :md="8" :lg="5" :xl="5">
|
|
|
|
- <div class="grid-content bg-purple">
|
|
|
|
- <div class="grid-content bg-purple" style="margin-left: 30px;">
|
|
|
|
- <el-input
|
|
|
|
- placeholder="请输入查询内容"
|
|
|
|
- v-model="input4" style="width: 80%;">
|
|
|
|
- <i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
|
- </el-input>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- <!-- <el-col :span="1">
|
|
|
|
- <div class="grid-content bg-purple"></div>
|
|
|
|
- </el-col> -->
|
|
|
|
- <el-col :xs="13" :sm="7" :md="6" :lg="8" :xl="11">
|
|
|
|
- <div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
|
|
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
|
|
|
|
+ <el-button type="primary" @click="toindex">操作日志</el-button>
|
|
|
|
+ <el-button type="primary" disabled>附件列表</el-button>
|
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- <el-button type="primary">数据备份</el-button> -->
|
|
|
|
- <el-button type="primary" @click="toindex">操作日志</el-button>
|
|
|
|
- <el-button type="primary" disabled>附件列表</el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-table v-loading="listLoading" :data="temporaryList" element-loading-text="Loading" border fit
|
|
|
|
+ highlight-current-row @select="handleSelectionChange" @select-all="handleAll">
|
|
|
|
+ <el-table-column align="center" label="" width="55" type="selection">
|
|
|
|
+
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="合同名称" width="200" prop="name">
|
|
|
|
+
|
|
|
|
+ </el-table-column>
|
|
|
|
+
|
|
|
|
+ <el-table-column label="供应商" align="center" width="340" prop="supplierName">
|
|
|
|
+
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="日期" width="200" align="center">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <i class="el-icon-time" />
|
|
|
|
+ <span>{{ scope.row.createdAt }}</span>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" label="附件图" width="800" prop="attachments">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <!-- <span>{{ scope.row.attachments }}</span> -->
|
|
|
|
+ <img width='100' height="100" v-for="item in scope.row.attachments" :src="item" >
|
|
|
|
+ </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="todetail">查看详情</el-tag>
|
|
|
|
|
|
- </el-row>
|
|
|
|
- <el-table v-loading="listLoading" :data="srcList" element-loading-text="Loading" border fit highlight-current-row>
|
|
|
|
- <el-table-column align="center" label="" width="55">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-checkbox v-model="checked"></el-checkbox>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" prop="created_at" label="合同名称" width="200">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>张俊杰</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="供应商" align="center" width="340">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- XXXXXXXXXXX
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="日期" width="200" align="center">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <i class="el-icon-time" />
|
|
|
|
- <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="todetail">查看详情</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="11" 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>
|
|
|
|
+ <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="11" 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'
|
|
|
|
|
|
+ import {
|
|
|
|
+ getList
|
|
|
|
+ } from '@/api/table'
|
|
|
|
|
|
- export default {
|
|
|
|
- filters: {
|
|
|
|
- statusFilter(status) {
|
|
|
|
- const statusMap = {
|
|
|
|
- published: 'success',
|
|
|
|
- draft: 'gray',
|
|
|
|
- deleted: 'danger'
|
|
|
|
- }
|
|
|
|
- return statusMap[status]
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- srcList:[],
|
|
|
|
- list: [],
|
|
|
|
- listLoading: false,
|
|
|
|
- status: '',
|
|
|
|
- currentPage: 1,
|
|
|
|
- pagesize: 11,
|
|
|
|
- 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()
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- handleCommand(command) {
|
|
|
|
- this.status = command
|
|
|
|
|
|
+ export default {
|
|
|
|
+ filters: {
|
|
|
|
+ statusFilter(status) {
|
|
|
|
+ const statusMap = {
|
|
|
|
+ published: 'success',
|
|
|
|
+ draft: 'gray',
|
|
|
|
+ deleted: 'danger'
|
|
|
|
+ }
|
|
|
|
+ return statusMap[status]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ temporaryList:[],
|
|
|
|
+ srcList: [],
|
|
|
|
+ list: [],
|
|
|
|
+ listLoading: false,
|
|
|
|
+ status: '',
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ pagesize: 11,
|
|
|
|
+ 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() {
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.$request({
|
|
|
|
+ url:'/api/AuditLog/attachments',
|
|
|
|
+ method:'post',
|
|
|
|
+ data:{
|
|
|
|
+ pageIndex:1,
|
|
|
|
+ pageSize:100
|
|
|
|
+ }
|
|
|
|
+ }).then((res)=>{
|
|
|
|
+ this.list=res.data.result
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.getPageData();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ handleCommand(command) {
|
|
|
|
+ this.status = command
|
|
|
|
|
|
- },
|
|
|
|
- handlehpCommand(command) {
|
|
|
|
- this.hpstatus = command
|
|
|
|
|
|
+ },
|
|
|
|
+ handlehpCommand(command) {
|
|
|
|
+ this.hpstatus = command
|
|
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- todetail(){
|
|
|
|
- this.$router.push({path:'/detail'})
|
|
|
|
- },
|
|
|
|
- toindex(){
|
|
|
|
- this.$router.push({path:'/sucuirtyaudit/index'})
|
|
|
|
- },
|
|
|
|
- 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);
|
|
|
|
- },
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ handleSelectionChange(data) {
|
|
|
|
+ this.multipleSelection = data;
|
|
|
|
+ console.log(this.multipleSelection);
|
|
|
|
+ },
|
|
|
|
+ handleAll(data) {
|
|
|
|
+ this.multipleSelection = data
|
|
|
|
+ console.log(this.multipleSelection)
|
|
|
|
+ },
|
|
|
|
+ todetail() {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: '/detail'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ toindex() {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: '/sucuirtyaudit/index'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ 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;
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+ }
|
|
</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{
|
|
|
|
- width: 100%;
|
|
|
|
- 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 {
|
|
|
|
+ width: 100%;
|
|
|
|
+ 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>
|