From ccb19f88b2583c7dadb18b6b2e9571ec120c6c61 Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期三, 24 四月 2024 22:34:38 +0800 Subject: [PATCH] 1 --- src/components/advancedSearch/advancedSearch.vue | 386 +++++++++++++++++++++++++++++-------------------------- 1 files changed, 204 insertions(+), 182 deletions(-) diff --git a/src/components/advancedSearch/advancedSearch.vue b/src/components/advancedSearch/advancedSearch.vue index 047158e..666ae59 100644 --- a/src/components/advancedSearch/advancedSearch.vue +++ b/src/components/advancedSearch/advancedSearch.vue @@ -1,198 +1,220 @@ <template> - <view style="height: 100% ;"> - <view class="flex flex-center" style="margin: 20rpx 0;"> - <luanqing-search class="search_bar" @onSearch="onSearch" :buttonText="buttonText" - :isSearchTrue="isSearchTrue" :placehold="placehold"></luanqing-search> - <view class="advancedSea" v-if="isAvancedTrue" @click="isAvancedClick" - style="color:#244A7B ;font-size: .12rem;margin-left: .31rem;cursor: pointer;">楂樼骇鎼滅储 锕�</view> - </view> - <!-- 楂樼骇鎼滅储 --> - <view class="advancedSeaTrue" v-if="isAdvancedSearch" style="padding: 0 1.24rem; margin-bottom: .18rem;"> - <view style="background-color: #fff;padding: .29rem;" class=""> - <h3>楂樼骇鎼滅储</h3> - <MyForm @submit="onSubmit" :from="from" /> - </view> - </view> - </view> + <view style="height: 100%"> + <view class="flex flex-center" style="margin: 20rpx 0"> + <luanqing-search + class="search_bar" + @onSearch="onSearch" + :buttonText="buttonText" + :isSearchTrue="isSearchTrue" + :placehold="placehold" + :keyword="keyword" + ></luanqing-search> + <view + class="advancedSea" + v-if="isAvancedTrue" + @click="isAvancedClick" + style=" + color: #244a7b; + font-size: 0.12rem; + margin-left: 0.31rem; + cursor: pointer; + " + >楂樼骇鎼滅储 锕�</view + > + </view> + <!-- 楂樼骇鎼滅储 --> + <view + class="advancedSeaTrue" + v-if="isAdvancedSearch" + style="padding: 0 1.24rem; margin-bottom: 0.18rem" + > + <view style="background-color: #fff; padding: 0.29rem" class=""> + <h3>楂樼骇鎼滅储</h3> + <MyForm @submit="onSubmit" :from="from" /> + </view> + </view> + </view> </template> <script> - import MyForm from '@/components/form/form.vue' - export default { - props: { - isAvancedTrue: { - type: Boolean, - default () { - return true - } - }, - isSearchTrue: { - type: Boolean, - default () { - return true - } - }, - buttonText: { - type: String, - default () { - return '鎼滅储' - } - }, - placehold: { - type: String - }, - from: { - type: Object, - default () { - return { - from: [{ - type: 'input', - label: '濮撳悕', - name: 'name', - value: '' - }, - { - type: 'select', - label: '鎬у埆', - value: '', - name: 'sex', - options: [{ - label: '鐢�', - value: '鐢�' - }, - { - label: '濂�', - value: '濂�' - } - ] - }, - { - type: 'input', - label: '鑱旂郴', - name: 'phone', - value: '' - }, - { - type: 'input', - label: '璇佷欢', - name: 'idNumber', - value: '' - }, - { - type: 'select', - label: '鐘舵��', - name: 'state', - value: '', - options: [{ - label: '鏈敵璇�', - value: '鏈敵璇�' - }, - { - label: '宸茬敵璇�', - value: '宸茬敵璇�' - }, - { - label: '宸插垹闄�', - value: '宸插垹闄�' - } - ] - } - ] - } - } - } - }, - components: { - MyForm - }, - name: "advancedSearch", - data() { - return { - // 楂樼骇鎼滅储鏄剧ず - isAdvancedSearch: false, - // 楂樼骇鎼滅储 - +import MyForm from "@/components/form/form.vue"; +export default { + props: { + isAvancedTrue: { + type: Boolean, + default() { + return true; + } + }, + isSearchTrue: { + type: Boolean, + default() { + return true; + } + }, + buttonText: { + type: String, + default() { + return "鎼滅储"; + } + }, + placehold: { + type: String + }, + keyword: { + type: String + }, + from: { + type: Object, + default() { + return { + from: [ + { + type: "input", + label: "濮撳悕", + name: "name", + value: "" + }, + { + type: "select", + label: "鎬у埆", + value: "", + name: "sex", + options: [ + { + label: "鐢�", + value: "鐢�" + }, + { + label: "濂�", + value: "濂�" + } + ] + }, + { + type: "input", + label: "鑱旂郴", + name: "phone", + value: "" + }, + { + type: "input", + label: "璇佷欢", + name: "idNumber", + value: "" + }, + { + type: "select", + label: "鐘舵��", + name: "state", + value: "", + options: [ + { + label: "鏈敵璇�", + value: "鏈敵璇�" + }, + { + label: "宸茬敵璇�", + value: "宸茬敵璇�" + }, + { + label: "宸插垹闄�", + value: "宸插垹闄�" + } + ] + } + ] + }; + } + } + }, + components: { + MyForm + }, + name: "advancedSearch", + data() { + return { + // 楂樼骇鎼滅储鏄剧ず + isAdvancedSearch: false + // 楂樼骇鎼滅储 + }; + }, + methods: { + isAvancedClick() { + this.isAdvancedSearch = !this.isAdvancedSearch; + // this.$nextTick(() => { - }; - }, - methods: { - isAvancedClick() { - this.isAdvancedSearch = !this.isAdvancedSearch - // this.$nextTick(() => { - - // var box1Height = document.querySelector('.fbox').offsetHeight; - // // let box2Height= document.querySelector('.fbox1').style.height = box1Height + 'px'; - // let box2Height = document.querySelector('.fbox1').offsetHeight - // console.log(box1Height, box2Height); - // if (box1Height <= box2Height) { - // document.querySelector('.fbox1').style.height = box1Height + 'px'; - // } - // }) - }, - onSearch(val) { - this.$emit('onSearch', val) - // console.log(val); - }, - onSubmit(val) { - this.$emit('onSubmit', val) - // console.log(val); - }, - } - } + // var box1Height = document.querySelector('.fbox').offsetHeight; + // // let box2Height= document.querySelector('.fbox1').style.height = box1Height + 'px'; + // let box2Height = document.querySelector('.fbox1').offsetHeight + // console.log(box1Height, box2Height); + // if (box1Height <= box2Height) { + // document.querySelector('.fbox1').style.height = box1Height + 'px'; + // } + // }) + }, + onSearch(val) { + this.$emit("onSearch", val); + }, + onSubmit(val) { + this.$emit("onSubmit", val); + // console.log(val); + } + } +}; </script> <style> - .advancedSeaTrue, - .zhushuju { - padding: 0 1.24rem !important; - } +.advancedSeaTrue, +.zhushuju { + padding: 0 1.24rem !important; +} - .advancedSeaTrue1 { - padding: .08rem .19rem !important; - font-size: .14rem !important; - } +.advancedSeaTrue1 { + padding: 0.08rem 0.19rem !important; + font-size: 0.14rem !important; +} - /* Form缁勪欢閲岄潰鐨勬牱寮� */ - ::v-deep .el-row { - display: flex; - flex-wrap: wrap; - margin-top: .1rem !important; - } +/* Form缁勪欢閲岄潰鐨勬牱寮� */ +::v-deep .el-row { + display: flex; + flex-wrap: wrap; + margin-top: 0.1rem !important; +} - ::v-deep .el-form-item { - display: flex !important; - flex-wrap: wrap !important; - margin-bottom: .18rem !important; - } +::v-deep .el-form-item { + display: flex !important; + flex-wrap: wrap !important; + margin-bottom: 0.18rem !important; +} - ::v-deep .el-form-item__label { - font-size: .14rem !important; - height: .3rem !important; - display: flex !important; - align-items: center !important; - } +::v-deep .el-form-item__label { + font-size: 0.14rem !important; + height: 0.3rem !important; + display: flex !important; + align-items: center !important; +} - ::v-deep .el-input__inner { - font-size: .14rem !important; - height: .3rem !important; - } +::v-deep .el-input__inner { + font-size: 0.14rem !important; + height: 0.3rem !important; +} - ::v-deep .Formbtn { - width: 100% !important; - display: flex; - justify-content: center; - align-items: center; +::v-deep .Formbtn { + width: 100% !important; + display: flex; + justify-content: center; + align-items: center; - .el-button { - width: .7rem !important; - height: .3rem !important; - font-size: .12rem; + .el-button { + width: 0.7rem !important; + height: 0.3rem !important; + font-size: 0.12rem; + } +} - } - } - - .search_bar { - width: 5rem; - height: .36rem; - } -</style> \ No newline at end of file +.search_bar { + width: 5rem; + height: 0.36rem; +} +</style> -- Gitblit v1.9.1