bidnotice.vue 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <div class="home-content">
  3. <el-form :model="query" ref="queryForm" size="large" :inline="true" label-width="68px" style="margin-bottom: 20px">
  4. <el-form-item label="公告标题" prop="uTitle" label-width="100px">
  5. <el-input v-model.trim="query.uTitle" size="mini" placeholder="请输入公告标题" clearable
  6. @keyup.enter.native="handleQuery" />
  7. </el-form-item>
  8. <el-form-item label="公告类型" prop="fjType" label-width="100px">
  9. <el-select v-model="query.fjType" size="mini" placeholder="请选择" clearable>
  10. <el-option v-for="dict in dict.type.jc_publicity_type" :key="dict.value" :label="dict.label"
  11. :value="dict.value" />
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item>
  15. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" style="margin-left: 30px">搜索
  16. </el-button>
  17. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  18. </el-form-item>
  19. </el-form>
  20. <!--招标公示-->
  21. <el-table :data="tableData" stripe style="width: 100%">
  22. <el-table-column type="index" label="序号" align="center">
  23. <template slot-scope="scope">{{ scope.$index + 1 }}</template>
  24. </el-table-column>
  25. <el-table-column property="uTitle" label="公告标题">
  26. <template slot-scope="scope">
  27. <router-link :to="{ path: '/bidnoticedetail', query: { uid: scope.row.uid } }" style="color: #409EFF;">
  28. {{ scope.row.uTitle }}
  29. </router-link>
  30. </template>
  31. </el-table-column>
  32. <el-table-column property="uTitle" label="公告类型" :width="120">
  33. <template slot-scope="scope">
  34. <dict-tag :options="dict.type.jc_publicity_type" :value="scope.row.fjType" />
  35. </template>
  36. </el-table-column>
  37. <el-table-column align="center" prop="uUpdateTime" label="发布时间" :width="180" sortable />
  38. </el-table>
  39. <pagination :total="total" :page.sync="query.pageNum" :limit.sync="query.pageSize" @pagination="getList"
  40. style="text-align: right" />
  41. </div>
  42. </template>
  43. <script>
  44. import Pagination from "@/components/Pagination/index.vue";
  45. import { selectPurchase } from "@/api/home";
  46. export default {
  47. dicts: ['jc_publicity_type'],
  48. components: {
  49. Pagination
  50. },
  51. data () {
  52. return {
  53. query: {
  54. pageNum: 1,
  55. pageSize: 10,
  56. uTitle: null,
  57. fjType: null,
  58. },
  59. total: 0,
  60. tableData: []
  61. }
  62. },
  63. created () {
  64. this.getList()
  65. },
  66. methods: {
  67. getList () {
  68. selectPurchase(this.query).then(res => {
  69. this.tableData = res.rows
  70. this.total = res.total
  71. })
  72. },
  73. handleQuery () {
  74. this.query.pageNum = 1
  75. this.getList()
  76. },
  77. resetQuery () {
  78. this.query.uTitle = null
  79. this.query.fjType = null
  80. this.handleQuery()
  81. }
  82. }
  83. }
  84. </script>
  85. <style lang="scss" scoped></style>