Search.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <div class="wrapper">
  3. <span class="sqrk" @click="showModal">申请入库(1)</span>
  4. <span>
  5. <a-select ref="select" v-model:value="value" style="width: 200px" :options="options" @focus="focus"
  6. @change="handleChange">
  7. </a-select>
  8. </span>
  9. <span>
  10. <a-input-search v-model:value="key" placeholder="请输入搜索内容" style="width: 200px" @search="onSearch" />
  11. </span>
  12. <div>
  13. <a-checkbox v-model:checked="checked1">全部</a-checkbox>
  14. <a-checkbox v-model:checked="checked2">测试数据1</a-checkbox>
  15. <a-checkbox v-model:checked="checked3">测试数据2</a-checkbox>
  16. <a-checkbox v-model:checked="checked4">测试数据3</a-checkbox>
  17. </div>
  18. <a-modal v-model:visible="visible" title="申请库" @ok="handleOk" width="1440px" height="980px">
  19. <library></library>
  20. </a-modal>
  21. </div>
  22. </template>
  23. <script lang="ts">
  24. import { defineComponent, ref, computed, unref } from 'vue';
  25. import library from "../../library/index.vue"
  26. export default defineComponent({
  27. name: 'Search',
  28. components: {library},
  29. setup() {
  30. const value = ref<string>('1');
  31. const key = ref<string>('');
  32. const checked1 = ref<boolean>(false);
  33. const checked2 = ref<boolean>(false);
  34. const checked3 = ref<boolean>(false);
  35. const checked4 = ref<boolean>(false);
  36. const options = ref<SelectTypes['options']>([
  37. {
  38. value: '1',
  39. label: '已审核',
  40. },
  41. {
  42. value: '2',
  43. label: '未审核',
  44. },
  45. {
  46. value: '3',
  47. label: '未通过',
  48. },
  49. ]);
  50. function onSearch() {
  51. }
  52. const visible = ref<boolean>(false);
  53. const showModal = () => {
  54. visible.value = true;
  55. };
  56. const handleOk = (e: MouseEvent) => {
  57. console.log(e);
  58. visible.value = false;
  59. };
  60. return {
  61. visible,
  62. showModal,
  63. handleOk,
  64. options,
  65. value,
  66. key,
  67. onSearch,
  68. checked1,
  69. checked2,
  70. checked3,
  71. checked4,
  72. };
  73. },
  74. });
  75. </script>
  76. <style scoped>
  77. .wrapper>div {
  78. float: right;
  79. height: 32px;
  80. padding: 5px 0;
  81. }
  82. .wrapper>span {
  83. display: inline-block;
  84. margin-right: 30px
  85. }
  86. .wrapper {
  87. width: 100%;
  88. height: 54px;
  89. padding: 11px;
  90. margin-bottom: 20px;
  91. border-bottom: solid 1px #DEDEDE;
  92. }
  93. .sqrk {
  94. cursor: pointer;
  95. width: 94px;
  96. height: 32px;
  97. background: #0671DD;
  98. color: #fff;
  99. line-height: 32px;
  100. display: block;
  101. text-align: center;
  102. border-radius: 4px;
  103. }
  104. </style>