search.vue 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <fieldset>
  3. <legend>
  4. <el-tag type="info">条件筛选</el-tag>
  5. </legend>
  6. <el-form class="lv-form-inline" ref="searchForm" :model="searchKey" label-position="right" label-width="100px">
  7. <div class="search-form">
  8. <div class="form-left">
  9. <el-row :gutter="10">
  10. <el-col :xs="12" :sm="12" :md="12" :lg="6" :xl="6">
  11. <el-input v-model="searchKey.poi_name" placeholder="请选择商家" clearbale readonly :style="{width:'100%'}" @click="selectStore">
  12. <template #append>
  13. <el-tooltip effect="dark" content="点这里,清除选择" placement="top-start">
  14. <div class="remove-a" @click="clearStore">清除</div>
  15. </el-tooltip>
  16. </template>
  17. <template #prepend>所属商家</template>
  18. </el-input>
  19. </el-col>
  20. <el-col :xs="12" :sm="12" :md="12" :lg="6" :xl="4">
  21. <el-input v-model="searchKey.name" placeholder="达人昵称" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
  22. <template #prepend>达人昵称</template>
  23. </el-input>
  24. </el-col>
  25. <el-col :xs="12" :sm="12" :md="12" :lg="6" :xl="4">
  26. <el-input v-model="searchKey.unique" placeholder="抖音号" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
  27. <template #prepend>抖音号</template>
  28. </el-input>
  29. </el-col>
  30. <el-col :xs="12" :sm="6" :md="6" :lg="6" :xl="4">
  31. <el-date-picker v-model="searchKey.create" :style="{width: '100%'}" placeholder="请选择创建时间" start-placeholder="开始时间" end-placeholder="结束时间" type="daterange" range-separator="至" @change="searchForm" />
  32. </el-col>
  33. </el-row>
  34. </div>
  35. <div class="form-line"></div>
  36. <div class="form-right">
  37. <el-button type="primary" icon="el-icon-search" @click="searchForm">搜索</el-button>
  38. </div>
  39. </div>
  40. </el-form>
  41. </fieldset>
  42. <storeData ref="storeData" :multiple="false" @success="handleStore"></storeData>
  43. </template>
  44. <script>
  45. import storeData from '@/views/manage/components/agent';
  46. export default {
  47. components: {
  48. storeData
  49. },
  50. data(){
  51. return {
  52. searchKey:{}
  53. }
  54. },
  55. methods: {
  56. selectStore(){
  57. this.$nextTick(()=>{
  58. this.$refs.storeData.open()
  59. })
  60. },
  61. handleStore(data){
  62. this.searchKey.poi_id = data.poi_id;
  63. this.searchKey.poi_name = data.poi_name;
  64. this.$emit("success",this.searchKey);
  65. },
  66. clearStore(){
  67. this.searchKey.poi_id = "";
  68. this.searchKey.poi_name = "";
  69. this.$emit("success",this.searchKey);
  70. },
  71. searchForm(){
  72. this.$emit("success",this.searchKey);
  73. }
  74. }
  75. }
  76. </script>