seleteProject.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <div>
  3. <div>
  4. <div class="inline-16" style="margin-bottom:10px">
  5. <el-input suffix-icon="el-icon-search" size="small" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="queryEnterpriseArchives(params.content.pageNumber = 1)" @clear="queryEnterpriseArchives(params.content.pageNumber = 1)" clearable></el-input>
  6. </div>
  7. <el-table
  8. :data="ENlist"
  9. stripe
  10. style="width: 100%"
  11. height="300"
  12. border>
  13. <el-table-column
  14. prop="projectnum"
  15. label="项目编号"
  16. width="180">
  17. </el-table-column>
  18. <el-table-column
  19. prop="projectname"
  20. label="项目名称"
  21. width="180">
  22. </el-table-column>
  23. <el-table-column
  24. prop="status"
  25. label="状态">
  26. </el-table-column>
  27. <el-table-column>
  28. <template slot-scope="scope">
  29. <el-button size="mini" type="text" @click="rowClick(scope.row)">选 择</el-button>
  30. </template>
  31. </el-table-column>
  32. </el-table>
  33. <div style="display:flex;justify-content:space-between;margin-top:16px;">
  34. <div style="text-align:left">
  35. <el-pagination
  36. background
  37. small
  38. @size-change="handleSizeChange"
  39. @current-change="handleCurrentChange"
  40. :current-page="params.content.pageNumber"
  41. :page-size="params.content.pageSize"
  42. layout="total, prev, pager, next"
  43. :total="total">
  44. </el-pagination>
  45. </div>
  46. <el-button size="mini" @click="$emit('onCanel')">取消</el-button>
  47. </div>
  48. </div>
  49. <!-- <el-input :validate-event="false" slot="reference" v-model="form.enterprisename" @focus="queryEnterpriseArchives" placeholder="输入企业名称" clearable></el-input> -->
  50. </div>
  51. </template>
  52. <script>
  53. export default {
  54. data () {
  55. return {
  56. ENlist:[],
  57. total:0,
  58. currentPage:0,
  59. form:{},
  60. params:{
  61. "id": 20221020143502,
  62. "content": {
  63. "pageNumber": 1,
  64. "pageSize": 20,
  65. "type":0, // 1:我负责的;2:我参与的;3:我下属负责的;4:我下属参与的
  66. "where": {
  67. "condition": "",
  68. "startdate": "",
  69. "enddate": "",
  70. "status":"",//跟进中、已成交、已失败
  71. "projecttype":"",
  72. "stagename":"",
  73. "tag":""
  74. }
  75. },
  76. },
  77. selected:''
  78. }
  79. },
  80. methods:{
  81. async queryEnterpriseArchives () {
  82. const res = await this.$api.requested(this.params)
  83. this.ENlist = res.data
  84. this.total = res.total
  85. console.log(this.ENlist);
  86. },
  87. handleSizeChange(val) {
  88. this.params.content.pageSize = val
  89. this.queryEnterpriseArchives()
  90. },
  91. handleCurrentChange(val) {
  92. this.params.content.pageNumber = val
  93. this.queryEnterpriseArchives()
  94. },
  95. rowClick (row) {
  96. this.$emit('onSelect',row)
  97. },
  98. onCancel () {
  99. this.$emit('onCancel')
  100. }
  101. },
  102. mounted () {
  103. this.queryEnterpriseArchives()
  104. }
  105. }
  106. </script>
  107. <style>
  108. </style>