<!--历史商机页面--> <template> <div class="product_container"> <div class="productFun"> <div class="productInput"> 项目名称 <div class="inputBox" style="width: 300px"> <el-input v-model="selectInfo.itemName" placeholder="请输入项目名称" clearable class="product-input" /> </div> 项目预算 <div class="inputBox" style="width: 300px"> <el-input v-model="selectInfo.itemBudget" placeholder="请输入项目预算" clearable class="product-input" /> </div> 预计工期 <div class="inputBox" style="width: 300px"> <el-date-picker v-model="selectInfo.itemDuration" type="date" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择日期" class="product-input" /> </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 ref="multipleTable" :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="selection" width="55" /> <el-table-column type="index" label="序号" > <template slot-scope="scope"> {{ (offset - 1) * limit + scope.$index + 1 }} </template> </el-table-column> <el-table-column prop="busOppoId" label="商机编号" /> <el-table-column prop="itemName" label="项目名称" /> <el-table-column prop="itemBudget" label="项目预算" /> <el-table-column prop="itemDuration" label="预计工期" > <template slot-scope="{row}"> <span> {{row.itemDuration.split(' ')[0]}} </span> </template> </el-table-column> <el-table-column prop="itemManager" label="商机负责人" /> <el-table-column prop="phone" label="联系方式" /> <el-table-column prop="status" label="商机状态" /> <el-table-column label="项目地址"> <template slot-scope="{row}"> <span> {{row.itemProvince === row.itemCity ? row.itemCity + row.itemArea + row.itemAddress : row.itemProvince + row.itemCity + row.itemArea + row.itemAddress}} </span> </template> </el-table-column> <el-table-column label="操作"> <template slot-scope="scope"> <el-button type="text" size="small" @click="handlerDetail(scope.row)"> 详情 </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" :data-info="dataInfo" @close="detailClose" /> </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 { // 加入分页逻辑 components: { GroupPage, businessDetailDialog, }, mixins: [listMixin], 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) => { res.rows = res.rows.map((item) => { return { ...item, status: item.status === "0" ? "推进" : item.status === "1" ? "成交" : "丢失", }; }); this.tableData = res; } ); }, reset() { this.selectInfo = { // 搜索框中的数据的数据 itemName: "", itemBudget: "", itemDuration: "", }; listPage(`limit=${this.limit}&offset=${this.offset}`, {}).then( (res) => { res.rows = res.rows.map((item) => { return { ...item, status: item.status === "0" ? "推进" : item.status === "1" ? "成交" : "丢失", }; }); this.tableData = res; } ); }, 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: 0px 0px 30px; 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: #9f1919; border: #9f1919; } .bggreen { background: #248a53; border: #248a53; } } } .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>