|
@@ -16,7 +16,11 @@
|
|
|
<div class="search">
|
|
|
<div class="box1">
|
|
|
<van-dropdown-menu>
|
|
|
- <van-dropdown-item v-model="value1" :options="option1" />
|
|
|
+ <van-dropdown-item
|
|
|
+ v-model="value1"
|
|
|
+ :options="option1"
|
|
|
+ @click="search1"
|
|
|
+ />
|
|
|
<van-dropdown-item v-model="value2" :options="option2" />
|
|
|
</van-dropdown-menu>
|
|
|
</div>
|
|
@@ -24,6 +28,7 @@
|
|
|
<van-search
|
|
|
v-model="value"
|
|
|
show-action
|
|
|
+ clearable
|
|
|
label="场所名称"
|
|
|
placeholder="请输入场所名称"
|
|
|
>
|
|
@@ -34,7 +39,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<van-pull-refresh
|
|
|
- v-if="show == false"
|
|
|
v-model="refreshing"
|
|
|
@refresh="onRefresh"
|
|
|
>
|
|
@@ -73,46 +77,6 @@
|
|
|
</van-swipe-cell>
|
|
|
</van-list>
|
|
|
</van-pull-refresh>
|
|
|
- <van-pull-refresh
|
|
|
- v-if="show == true"
|
|
|
- v-model="refreshing"
|
|
|
- @refresh="onRefresh"
|
|
|
- >
|
|
|
- <van-list
|
|
|
- v-model:loading="loading"
|
|
|
- :finished="finished"
|
|
|
- finished-text="没有更多了"
|
|
|
- @load="search"
|
|
|
- >
|
|
|
- <van-swipe-cell v-for="item in searchList" :key="item">
|
|
|
- <div class="list-item" @click="gotoplaceRegister(item.id)">
|
|
|
- <div class="item_top">
|
|
|
- <div class="item_top_left">
|
|
|
- {{ item.name }}
|
|
|
- </div>
|
|
|
- <div class="item_top_right">
|
|
|
- <span v-if="item.religiousType == 1">伊斯兰教</span>
|
|
|
- <span v-if="item.religiousType == 2">基督教</span>
|
|
|
- <span v-if="item.religiousType == 3">天主教</span>
|
|
|
- <span v-if="item.religiousType == 4">佛教</span>
|
|
|
- <span v-if="item.religiousType == 5">道教</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="item_center">
|
|
|
- {{ item.place }}
|
|
|
- </div>
|
|
|
- <div class="item_down">
|
|
|
- <div class="item_down_left">
|
|
|
- {{ item.contact }}
|
|
|
- </div>
|
|
|
- <div class="item_down_right">
|
|
|
- {{ item.contactNumber }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </van-swipe-cell>
|
|
|
- </van-list>
|
|
|
- </van-pull-refresh>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -120,9 +84,54 @@
|
|
|
import { onMounted, ref, toRefs } from "vue";
|
|
|
import { useRouter } from "vue-router";
|
|
|
import PlaceRegister from "@/api/placeRegister/placeRegister";
|
|
|
-import placeRegister from '@/api/placeRegister/placeRegister';
|
|
|
+import placeRegister from "@/api/placeRegister/placeRegister";
|
|
|
export default {
|
|
|
setup() {
|
|
|
+ const inputForm = ref({
|
|
|
+ id: "",
|
|
|
+ religiousType: "",
|
|
|
+ religiousName: "",
|
|
|
+ name: "",
|
|
|
+ tyshxydm: "",
|
|
|
+ filingNo: "",
|
|
|
+ contact: "",
|
|
|
+ contactNumber: "",
|
|
|
+ placeSelectName: "",
|
|
|
+ placeSelectId: "",
|
|
|
+ placeSelectType3: "",
|
|
|
+ placeSelectType4: "",
|
|
|
+ placeSelectType5: "",
|
|
|
+ placeSelectType6: "",
|
|
|
+ placeSelectLastId: "",
|
|
|
+ place: "",
|
|
|
+ longitude: "",
|
|
|
+ latitude: "",
|
|
|
+ siteType: "",
|
|
|
+ constructionStage: "",
|
|
|
+ nature: "",
|
|
|
+ religiousDeptManaUser: "",
|
|
|
+ securityDeptManaUser: "",
|
|
|
+ scenesImage: "",
|
|
|
+ plan: "",
|
|
|
+ etiquetteSpace: "",
|
|
|
+ mainRoads: "",
|
|
|
+ publicArea: "",
|
|
|
+ website: "",
|
|
|
+ approvalProcedures: "",
|
|
|
+ peopleThreshold: "",
|
|
|
+ state: "",
|
|
|
+ isEnable: "",
|
|
|
+ remake: "",
|
|
|
+ approvedEstablishmentTime: "",
|
|
|
+ registrationAuthority: "",
|
|
|
+ registrationDate: "",
|
|
|
+ teachingStaff: "",
|
|
|
+ approveOffice: "",
|
|
|
+ coveredArea: "",
|
|
|
+ floorSpace: "",
|
|
|
+ protectionLevel: "",
|
|
|
+ dynamicFormJson: "",
|
|
|
+ });
|
|
|
//暂时列表数据
|
|
|
const list = ref([]);
|
|
|
// 导航栏颜色
|
|
@@ -132,52 +141,29 @@ export default {
|
|
|
history.back();
|
|
|
};
|
|
|
//搜索事件
|
|
|
- const show = ref(false);
|
|
|
- const searchList = ref([]);
|
|
|
const search1 = () => {
|
|
|
- searchList.value = [];
|
|
|
- search();
|
|
|
- }
|
|
|
- const search = () => {
|
|
|
- loading.value = true;
|
|
|
- finished.value = false;
|
|
|
- if (value2.value == 0) {
|
|
|
- show.value = true;
|
|
|
- new PlaceRegister()
|
|
|
- .searchlist({
|
|
|
- current: index + 1,
|
|
|
- size: 11,
|
|
|
- name: value.value,
|
|
|
- address: value1.value,
|
|
|
- })
|
|
|
- .then(({ records, pages }) => {
|
|
|
- searchList.value = searchList.value.concat(records);
|
|
|
- // 加载状态结束
|
|
|
- loading.value = false;
|
|
|
- if (index + 1 >= pages) {
|
|
|
- finished.value = true;
|
|
|
- }
|
|
|
- index++;
|
|
|
- });
|
|
|
+ if (value.value == "") {
|
|
|
+ list.value = [];
|
|
|
+ if(value2.value==0){
|
|
|
+ inputForm.value.religiousType = '';
|
|
|
+ }else{
|
|
|
+ inputForm.value.religiousType = value2.value;
|
|
|
+ }
|
|
|
+ inputForm.value.name = '';
|
|
|
+ loading.value = true;
|
|
|
+ finished.value = false;
|
|
|
+ onLoad();
|
|
|
} else {
|
|
|
- show.value = true;
|
|
|
- new PlaceRegister()
|
|
|
- .searchlist({
|
|
|
- current: index + 1,
|
|
|
- size: 11,
|
|
|
- name: value.value,
|
|
|
- address: value1.value,
|
|
|
- religiousType: value2.value,
|
|
|
- })
|
|
|
- .then(({ records, pages }) => {
|
|
|
- searchList.value = searchList.value.concat(records);
|
|
|
- // 加载状态结束
|
|
|
- loading.value = false;
|
|
|
- if (index + 1 >= pages) {
|
|
|
- finished.value = true;
|
|
|
- }
|
|
|
- index++;
|
|
|
- });
|
|
|
+ list.value = [];
|
|
|
+ if(value2.value==0){
|
|
|
+ inputForm.value.religiousType = '';
|
|
|
+ }else{
|
|
|
+ inputForm.value.religiousType = value2.value;
|
|
|
+ }
|
|
|
+ inputForm.value.name = value.value;
|
|
|
+ loading.value = true;
|
|
|
+ finished.value = false;
|
|
|
+ onLoad();
|
|
|
}
|
|
|
};
|
|
|
const value = ref("");
|
|
@@ -196,15 +182,15 @@ export default {
|
|
|
getUser();
|
|
|
});
|
|
|
const getUser = () => {
|
|
|
- new placeRegister().address().then((res)=>{
|
|
|
- res.forEach(item => {
|
|
|
+ new placeRegister().address().then((res) => {
|
|
|
+ res.forEach((item) => {
|
|
|
option1.value.push({
|
|
|
- text:item.name,
|
|
|
- value:item.id
|
|
|
- })
|
|
|
+ text: item.name,
|
|
|
+ value: item.id,
|
|
|
+ });
|
|
|
});
|
|
|
- value1.value = option1.value[0].value
|
|
|
- })
|
|
|
+ value1.value = option1.value[0].value;
|
|
|
+ });
|
|
|
};
|
|
|
//跳转
|
|
|
let router = useRouter();
|
|
@@ -227,13 +213,13 @@ export default {
|
|
|
const onLoad = () => {
|
|
|
loading.value = true;
|
|
|
finished.value = false;
|
|
|
- let address = localStorage.getItem("address");
|
|
|
// 异步更新数据
|
|
|
new PlaceRegister()
|
|
|
.searchlist({
|
|
|
current: index + 1,
|
|
|
size: 11,
|
|
|
- address: address,
|
|
|
+ address: value1.value,
|
|
|
+ ...inputForm.value,
|
|
|
})
|
|
|
.then(({ records, pages }) => {
|
|
|
list.value = list.value.concat(records);
|
|
@@ -269,10 +255,7 @@ export default {
|
|
|
onLoad,
|
|
|
onRefresh,
|
|
|
//搜索
|
|
|
- search,
|
|
|
gotoplaceRegister,
|
|
|
- show,
|
|
|
- searchList,
|
|
|
value,
|
|
|
value1,
|
|
|
value2,
|
|
@@ -284,7 +267,7 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang='less'>
|
|
|
+<style lang='less' scoped>
|
|
|
body,
|
|
|
html {
|
|
|
margin: 0;
|