|
@@ -13,18 +13,6 @@
|
|
|
</template>
|
|
|
</van-nav-bar>
|
|
|
<div class="main">
|
|
|
- <!-- <van-search
|
|
|
- v-model="searchName"
|
|
|
- shape="round"
|
|
|
- show-action
|
|
|
- input-align="center"
|
|
|
- label="场所名称"
|
|
|
- placeholder="请输入场所名称"
|
|
|
- >
|
|
|
- <template #action>
|
|
|
- <div @click="search">搜索</div>
|
|
|
- </template>
|
|
|
- </van-search> -->
|
|
|
<div class="search">
|
|
|
<div class="box1">
|
|
|
<van-dropdown-menu>
|
|
@@ -129,30 +117,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { onMounted, ref } from "vue";
|
|
|
+import { onMounted, ref, toRefs } from "vue";
|
|
|
import { useRouter } from "vue-router";
|
|
|
-import tools from "@/api/sys/tools";
|
|
|
-import placePerson from "@/api/placePerson/placePerson";
|
|
|
import PlaceRegister from "@/api/placeRegister/placeRegister";
|
|
|
import placeRegister from '@/api/placeRegister/placeRegister';
|
|
|
export default {
|
|
|
setup() {
|
|
|
//暂时列表数据
|
|
|
const list = ref([]);
|
|
|
- const searchForm = ref({
|
|
|
- religiousType: "",
|
|
|
- name: "",
|
|
|
- filingNo: "",
|
|
|
- contact: "",
|
|
|
- place: "",
|
|
|
- siteType: "",
|
|
|
- constructionStage: "",
|
|
|
- nature: "",
|
|
|
- state: "",
|
|
|
- createBy: {
|
|
|
- id: "",
|
|
|
- },
|
|
|
- });
|
|
|
// 导航栏颜色
|
|
|
const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
|
|
|
//返回取消按钮
|
|
@@ -169,7 +141,6 @@ export default {
|
|
|
const search = () => {
|
|
|
loading.value = true;
|
|
|
finished.value = false;
|
|
|
- // searchList.value = [];
|
|
|
if (value2.value == 0) {
|
|
|
show.value = true;
|
|
|
new PlaceRegister()
|
|
@@ -225,42 +196,15 @@ export default {
|
|
|
getUser();
|
|
|
});
|
|
|
const getUser = () => {
|
|
|
- let addressList = [];
|
|
|
- let user = localStorage.getItem("MZ_USER");
|
|
|
- new tools().treeData().then((res) => {
|
|
|
- addressList.push(res[0]);
|
|
|
- res[0].children.forEach((item) => {
|
|
|
- addressList.push(item);
|
|
|
- if(item.children){
|
|
|
- item.children.forEach(item2 =>{
|
|
|
- addressList.push(item2)
|
|
|
- })
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- let userArea = "";
|
|
|
- new placeRegister().list({ loginName: user }).then((res1) => {
|
|
|
- let data = res1.records[0];
|
|
|
- userArea = data.areaDTO;
|
|
|
- addressList.forEach((item) => {
|
|
|
- if (item.id == userArea.code) {
|
|
|
- value1.value = item.code;
|
|
|
- localStorage.setItem("address", item.code);
|
|
|
- option1.value.push({
|
|
|
- text: item.name,
|
|
|
- value: item.code,
|
|
|
- });
|
|
|
- if(item.children){
|
|
|
- item.children.forEach((item1) => {
|
|
|
- option1.value.push({
|
|
|
- text: item1.name,
|
|
|
- value: item1.code,
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ new placeRegister().address().then((res)=>{
|
|
|
+ res.forEach(item => {
|
|
|
+ option1.value.push({
|
|
|
+ text:item.name,
|
|
|
+ value:item.id
|
|
|
+ })
|
|
|
});
|
|
|
- });
|
|
|
+ value1.value = option1.value[0].value
|
|
|
+ })
|
|
|
};
|
|
|
//跳转
|
|
|
let router = useRouter();
|
|
@@ -318,7 +262,6 @@ export default {
|
|
|
onClickright,
|
|
|
//背景色
|
|
|
selectColor,
|
|
|
- searchForm,
|
|
|
list,
|
|
|
loading,
|
|
|
finished,
|