solution.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <div>
  3. <!-- 头部操作模块 start -->
  4. <div>
  5. <div style="width:200px;margin:0 15px;float:left;">
  6. <el-input v-model="solutionTitle" placeholder="搜索标题" @keyup.enter.native="searchList"></el-input>
  7. </div>
  8. <div style="width:200px;margin:0 15px;float:left;">
  9. <el-select v-model="is_choice" clearable placeholder="是否优选">
  10. <el-option
  11. v-for="item in choice"
  12. :key="item.id"
  13. :label="item.name"
  14. :value="item.id">
  15. </el-option>
  16. </el-select>
  17. </div>
  18. <div style="width:200px;margin:0 15px;float:left;">
  19. <el-select v-model="solutionStatus" clearable placeholder="状态">
  20. <el-option
  21. v-for="item in statusData"
  22. :key="item.id"
  23. :label="item.name"
  24. :value="item.id">
  25. </el-option>
  26. </el-select>
  27. </div>
  28. <div style="width:100px;margin:0 15px;float:left;">
  29. <el-button type="primary" @click="searchList">搜索</el-button>
  30. </div>
  31. <div style="clear: both;"></div>
  32. </div>
  33. <!-- 头部操作模块 end -->
  34. <div class="count-list" v-if="record">
  35. <div class="count-item">总数:{{record.sum}}</div>
  36. <div class="count-item">待审核:{{record.wait_check}}</div>
  37. <div class="count-item">已通过:{{record.approve}}</div>
  38. <div class="count-item">拒绝:{{record.deny}}</div>
  39. <router-link to='/main/kaifawu_contact'><el-button type="primary" size="mini">解决方案需求</el-button></router-link>
  40. </div>
  41. <div class="content" v-if="solutionData">
  42. <el-table :data="solutionData" border style="width: 100%">
  43. <el-table-column prop="title" label="方案名称"></el-table-column>
  44. <el-table-column prop="login_mobile" label="联系方式"></el-table-column>
  45. <el-table-column prop="updated_at" label="入驻时间"></el-table-column>
  46. <el-table-column prop="checked_at" label="操作时间"></el-table-column>
  47. <el-table-column prop="nickname" label="客户经理"></el-table-column>
  48. <el-table-column prop="status" label="当前状态"></el-table-column>
  49. <el-table-column label="是否优选">
  50. <template slot-scope="scope">
  51. <p v-if="scope.row['is_choice'] == 1">是</p>
  52. <p v-else>否</p>
  53. </template>
  54. </el-table-column>
  55. <el-table-column label="操作">
  56. <template slot-scope="scope">
  57. <el-checkbox label="1" @change="contact(scope.row.id)" name="type">联系他</el-checkbox>
  58. <el-button type="text" @click="detail(scope.row.id)">查看详情</el-button>
  59. </template>
  60. </el-table-column>
  61. </el-table>
  62. </div>
  63. <el-pagination
  64. class="order-footer"
  65. background
  66. layout="prev, pager, next"
  67. :page-size="20"
  68. :total="Number(record.sum)"
  69. @current-change="handleCurrentChange"
  70. />
  71. </div>
  72. </template>
  73. <script>
  74. export default {
  75. data() {
  76. return {
  77. page: 1,
  78. solutionData: [],
  79. form: {
  80. reason: ""
  81. },
  82. record: [],
  83. isDialogShow: false,
  84. solutionTitle:'',
  85. is_choice:'',
  86. choice:[
  87. {'id':'1',name:'是'},
  88. {'id':'0',name:'否'},
  89. ],
  90. solutionStatus:'',
  91. statusData:[
  92. {'id':'0',name:'草稿'},
  93. {'id':'1',name:'审核'},
  94. {'id':'2',name:'通过'},
  95. {'id':'3',name:'拒绝'},
  96. ]
  97. };
  98. },
  99. mounted() {
  100. this.getList();
  101. },
  102. methods: {
  103. handleCurrentChange(val) {
  104. this.page = val;
  105. this.getList();
  106. },
  107. async searchList(){
  108. let data = {
  109. page:1,
  110. size:20,
  111. title:'',
  112. is_choice :'',
  113. status:'',
  114. }
  115. if(this.solutionTitle){
  116. data.title = this.solutionTitle;
  117. }
  118. if(this.is_choice){
  119. data.is_choice = this.is_choice;
  120. }
  121. console.log(this.solutionStatus);
  122. if(this.solutionStatus){
  123. data.status = this.solutionStatus;
  124. }
  125. let res = await this.$post("/api/admin/kaifawu/getProviders", data);
  126. this.solutionData = res.data.list;
  127. this.record = res.data.record;
  128. },
  129. async detail(id) {
  130. window.open(`/main/solution_detail?id=${id}`, "_self");
  131. },
  132. async getList() {
  133. const page = this.page;
  134. const size = 20;
  135. const data = {
  136. page,
  137. size
  138. };
  139. let res = await this.$post("/api/admin/kaifawu/getProviders", data);
  140. this.solutionData = res.data.list;
  141. this.record = res.data.record;
  142. },
  143. async contact(id) {
  144. const data = {
  145. id
  146. };
  147. let res = await this.$post("/api/admin/kaifawu/contact", data);
  148. this.$message({
  149. message: res.info,
  150. type: "success"
  151. });
  152. }
  153. }
  154. };
  155. </script>
  156. <style lang="scss" scoped>
  157. .count-list {
  158. padding-bottom: 10px;
  159. display: flex;
  160. align-items: center;
  161. }
  162. .count-item {
  163. margin-right: 20px;
  164. font-size: 16px;
  165. }
  166. .content {
  167. white-space: nowrap;
  168. overflow-x: scroll;
  169. height: calc(100vh - 150px);
  170. }
  171. .btn {
  172. width: 80px;
  173. }
  174. .order-footer {
  175. margin-top: 10px;
  176. }
  177. </style>