Browse Source

init

newStyle
lancer 2 years ago
parent
commit
cf848a4d9e
4 changed files with 62 additions and 5 deletions
  1. +8
    -0
      src/api/modules/api.js
  2. +52
    -3
      src/page/check/chose.vue
  3. +1
    -1
      src/page/check/index.vue
  4. +1
    -1
      src/page/index/top/index.vue

+ 8
- 0
src/api/modules/api.js View File

@@ -185,3 +185,11 @@ export function zkagentPage(query) {
params: query
})
}
// 获取公司列表
export function zkorg(query) {
return request({
url: '/autoSR/zkorg/page',
method: 'get',
params: query
})
}

+ 52
- 3
src/page/check/chose.vue View File

@@ -68,7 +68,38 @@
</el-col>
</el-row>
</div> -->
<div class="content" v-if="flag == 2">这是公司</div>
<div class="content" v-if="flag == 2">
<div class="search">
<el-input
placeholder="请输入内容"
style="width: 200px; margin-left: 40px; margin-right: 30px"
v-model="companyName"
clearable
>
</el-input>
<el-button
style="height: 32px; line-height: 13px"
type="primary"
size="medium"
@click="getCompanyList"
>搜索</el-button
>
</div>
<div class="con">
<div v-for="item in list" :key="item.id" class="tab" @click="chose(item)">
<div class="text-1">{{ item.agentName }}</div>
<!-- <div class="text-2">
服务状态:
<span
style="font-size: 12px"
:style="item.residueTime > 0 ? 'color:green;' : 'color:red;'"
>{{ item.residueTime > 0 ? "服务中" : "已过期" }}</span
>
</div> -->
<div class="text-3">{{ item.address }}</div>
</div>
</div>
</div>
<div class="content" v-if="flag == 3">这是楼盘</div>
<el-pagination
style="margin: 20px auto"
@@ -78,7 +109,7 @@
:current-page="currentPage"
:page-size="10"
layout="total, sizes, prev, pager, next, jumper"
:total="40"
:total="total"
>
</el-pagination>
</div>
@@ -91,6 +122,8 @@ export default {
flag: 1,
currentPage: 1,
agentName: "", //代理商名称
companyName:'',
total:20,
list: [],
};
},
@@ -105,6 +138,7 @@ export default {
this.getAgentList();
} else if (this.flag == 2) {
// 获取公司
this.getCompanyList()
} else {
// 获取楼盘
}
@@ -115,13 +149,28 @@ export default {
getAgentList() {
this.$api.api
.zkagentPage({
pageNum: this.currentPage,
current: this.currentPage,
pageSize: 10,
agentName: this.agentName,
})
.then((res) => {
console.log(res);
this.list = res.data.records;
this.total=res.data.total
});
},
getCompanyList() {
this.$api.api
.zkorg({
current: this.currentPage,
pageSize: 10,
name: this.companyName,
orgType:localStorage.getItem('orgType')
})
.then((res) => {
console.log(res);
this.list = res.data.records;
this.total=res.data.total
});
},
chose(item) {


+ 1
- 1
src/page/check/index.vue View File

@@ -46,7 +46,7 @@ export default {
},
computed: {},
mounted() {
console.log(this.$route.query.backFlag);
// console.log(this.$route.query.backFlag);
if (this.$route.query.backFlag) {
this.backFlag = this.$route.query.backFlag;
}


+ 1
- 1
src/page/index/top/index.vue View File

@@ -12,7 +12,7 @@
<div class="top-bar__title">
<div v-if="showMenu" class="top-bar__item top-bar__item--show">
<top-menu />
<div style="margin-top: 15px; display: flex;line-height:30px;" @click="goChange">
<div style="margin-top: 15px; display: flex;line-height:30px; cursor:pointer;" @click="goChange">
<div class="daili">代理商</div>
<span style="font-size: 16px; margin-left: 20px;">{{companyName}}</span>
<span class="change">切换</span>


Loading…
Cancel
Save