<template> <div class="evaluate"> <div class="evaluate-inputs"> 供应商编号 <el-input style="width: 200px" placeholder="请输入编号" v-model="selectInfo.supplierCode" clearable class="evaluate-input"> </el-input> 供应商名称 <el-input style="width: 200px" placeholder="请输入供应商名称" v-model="selectInfo.supplierName" clearable class="evaluate-input"> </el-input> 评价时间 <el-select v-model="selectInfo.evaluateQuarterlyName" class="evaluate-select" filterable placeholder="请选择结果" style="width: 200px"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> <div class="evaluate-btns"> <el-button type="primary" class="evaluate-button" @click="selectData">查询</el-button> <el-button type="primary" class="el-icon-refresh-right" @click="reset">重置</el-button> </div> </div> <div class="evaluate-table"> <el-table :data="tableData.rows" :row-class-name="tableRowClassName" :header-cell-style="{ 'text-align': 'center', background: '#2483b3', color: 'white', }" :row-style="{ 'text-align': 'center' }" style="width: 100%"> <el-table-column type="index" label="序号" width="180"> </el-table-column> <el-table-column prop="supplierCode" label="供应商编号" width="180"> </el-table-column> <el-table-column prop="supplierName" label="供应商名称"> </el-table-column> <el-table-column prop="supplierStatusName" label="供应商状态"> </el-table-column> <el-table-column prop="evaluateQuarterlyName" label="最新季度评价"> </el-table-column> <el-table-column prop="quarterlyEvaluateResult" label="季度评价结果"> </el-table-column> <el-table-column prop="quarterlyEvaluateDate" label="季度评价日期"> </el-table-column> <el-table-column header-align="center" align="center" fixed="right" label="操作"> <template slot-scope="scope"> <el-button type="text" size="small" @click="hitstoryDialog(scope.row)">历史评价</el-button> <el-button type="text" size="small" @click="evaluateDialogClick">季度评价</el-button> </template> </el-table-column> </el-table> <group-page :limit="limit" :total="total" :offset="offset" :count="tableData.total" @setOffset="setOffset" @setLimit="setLimit" v-model="isFristPage" /> </div> <historyEvaluateDialog v-if="isShowHistoryDialog" @close="evaluateHistoryDialogClose" :dataInfo="dataInfo"> </historyEvaluateDialog> <evaluateDialog v-if="isShowDialog" @close="evaluateDialogClose"></evaluateDialog> </div> </template> <script> import GroupPage from '../../components/mycomponent/groupPage.vue'; import evaluateDialog from '../../components/mycomponent/dialog/evaluateDialog.vue' import historyEvaluateDialog from '../../components/mycomponent/dialog/historyEvaluateDialog.vue'; import { e_list } from '../../api/supplier/supplier' import { tableRowClassName } from "../../utils/myUtils/changeTableTr"; import { listMixin } from '../../utils/myUtils/mixins/listPage' export default { mixins: [listMixin], // 加入分页逻辑 components: { historyEvaluateDialog, evaluateDialog, GroupPage }, data () { return { dataInfo: {}, isShowHistoryDialog: false, isShowDialog: false, selectInfo: { supplierCode: '', supplierName: '', evaluateQuarterlyName: '' }, options: [ { label: '2022第一季度', value: '2022第一季度' }, { label: '2021第二季度', value: '2021第二季度' } ], } }, mounted () { }, methods: { tableRowClassName: tableRowClassName, hitstoryDialog (row) { this.dataInfo = row this.isShowHistoryDialog = true }, evaluateHistoryDialogClose () { this.isShowHistoryDialog = false }, evaluateDialogClose () { this.isShowDialog = false }, evaluateDialogClick () { this.isShowDialog = true }, getListPage (limit, offset) { e_list(`limit=${limit}&offset=${offset}`, this.queryInfo).then(res => { console.log(res) this.tableData = res }) }, reset () { this.selectInfo = { // 搜索框中的数据的数据 supplierCode: '', supplierName: '', evaluateQuarterlyName: '' } } } } </script> <style lang="scss"> .evaluate { position: relative; width: 100%; min-height: 700px; height: 223px; overflow: auto; } .evaluate-inputs { position: relative; .evaluate-input { margin: 0 1rem 0 0.5rem; } .evaluate-select { margin: 0 4rem 0 0.5rem; } .evaluate-btns { position: absolute; right: 0; top: 0; .evaluate-button { margin-right: 1rem; } } } .evaluate-table { margin-top: 20px; } </style>