<template> <div class="product_container"> <div class="productFun"> <div class="productInput"> 项目名称 <div class="inputBox" style="width: 300px"> <el-input placeholder="请输入项目名称" v-model="selectInfo.itemName" clearable class="product-input"> </el-input> </div> 项目预算 <div class="inputBox" style="width: 300px"> <el-input placeholder="请输入项目预算" v-model="selectInfo.itemBudget" clearable class="product-input"> </el-input> </div> 预计工期 <div class="inputBox" style="width: 300px"> <el-date-picker v-model="selectInfo.itemDuration" type="date" placeholder="请选择日期" class="product-input"> </el-date-picker> </div> </div> <div class="productBtn"> <el-button type="primary" icon="el-icon-search" class="btnItem" @click="selectData">查询</el-button> <el-button type="primary" icon="el-icon-refresh-right" class="btnItem" @click="reset">重置</el-button> </div> </div> <el-table :data="tableData.rows" ref="multipleTable" :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="selection" width="55"> </el-table-column> <el-table-column type="index" label="序号"> </el-table-column> <el-table-column prop="busOppoId" label="商机编号"> </el-table-column> <el-table-column prop="itemName" label="项目名称"> </el-table-column> <el-table-column prop="itemBudget" label="项目预算"> </el-table-column> <el-table-column prop="itemDuration" label="预计工期"> </el-table-column> <el-table-column prop="itemManager" label="商机负责人"> </el-table-column> <el-table-column prop="phone" label="联系方式"> </el-table-column> <el-table-column prop="status" label="商机状态"> </el-table-column> <el-table-column label="操作"> <template slot-scope="scope"> <el-button @click="handlerDetail(scope.row)" type="text" size="small">详情</el-button> </template> </el-table-column> </el-table> <!-- 分页组件 --> <group-page :limit="limit" :total="total" :offset="offset" :count="tableData.total" @setOffset="setOffset" @setLimit="setLimit" /> <!-- xiangqing弹框 --> <businessDetailDialog v-if="dialogFormVisible" @close="detailClose" :dataInfo="dataInfo" /> </div> </template> <script> //组件 import GroupPage from '../../components/mycomponent/groupPage.vue'; import businessDetailDialog from '../../components/mycomponent/dialog/business/businessDetailDialog.vue' //逻辑 import { tableRowClassName } from "../../utils/myUtils/changeTableTr"; import { listMixin } from '../../utils/myUtils/mixins/listPage' import { listPage } from '../../api/business/business' export default { mixins: [listMixin], // 加入分页逻辑 components: { GroupPage, businessDetailDialog }, data () { return { selectInfo: { itemName: '', itemBudget: '', itemDuration: '' }, dialogFormVisible: false, dataInfo: {} }; }, mounted () { }, methods: { tableRowClassName: tableRowClassName, detailClose () { this.dialogFormVisible = false }, getListPage (limit, offset) { listPage(`limit=${limit}&offset=${offset}`, this.queryInfo).then(res => { console.log(res) this.tableData = res }) }, reset () { this.selectInfo = { // 搜索框中的数据的数据 itemName: '', itemBudget: '', itemDuration: '' } }, handlerDetail (row) { console.log(row) this.dialogFormVisible = true this.dataInfo = row } } }; </script> <style lang="scss" scoped> .product_container { position: relative; width: 100%; min-height: 700px; overflow: auto; .productData { width: 100%; display: flex; justify-content: center; .middle { margin: 0 30px; } } .productFun { margin: 30px 0; display: flex; justify-content: space-between; .productInput { display: flex; align-items: center; .inputBox { margin: 0 50px 0 10px; } } .productBtn { .btnItem { margin-right: 10px; border-radius: 5px; // height: 32px; // width: 84px; font-size: 16px; } .bgred { background: red; border: red; } .bggreen { background: green; border: green; } } } .footer { display: flex; justify-content: space-between; color: #6666; margin: 30px 10px; } } .order-dialog { .dialog-tab { .dialog-title { font-size: 16px; text-align: center; padding: 20px; background-color: #28739e; color: white; } } } </style>