Browse Source

楼盘

develop
caoyizhong 3 years ago
parent
commit
733aeaaf42
  1. 11
      src/views/city/cityInterest/api/Interest.js
  2. 164
      src/views/city/cityInterest/index.vue
  3. 3
      src/views/sale/index.vue

11
src/views/city/cityInterest/api/Interest.js

@ -43,6 +43,15 @@ export function delInterest(ids) {
})
}
//删除指定城市周边数据
export function delInterestRim(data) {
return request({
url: "/api/facilities/deleteRim",
method: "delete",
data:data
})
}
//添加数据
export function addInterest(data) {
@ -55,7 +64,7 @@ export function addInterest(data) {
//查询周边类型
//查询城市
export function selectInterestType() {
return request({
url: "/api/facilities/selectTypeList",

164
src/views/city/cityInterest/index.vue

@ -21,12 +21,12 @@
</el-select>
</el-form-item>
<el-form-item label="地区:">
<el-select v-model="searchForm.type" placeholder="请选择地区">
<el-select v-model="searchForm.urban" placeholder="请选择地区">
<el-option
v-for="(item,index) in statusCdList"
:key="item.id"
:label="item.label"
:value="item.value"
v-for="(item,index) in interestType"
:key="index"
:label="item.city"
:value="item.city"
>
</el-option>
</el-select>
@ -76,7 +76,7 @@
</el-button>
</div>
<div>
<el-button @click="circumDelete"
<el-button @click="circumDelete('1')"
><img
style="margin-right: 5px"
src="@public/img/land/u1340.png"
@ -105,6 +105,53 @@
</div>
<!-- 删除周边弹框-->
<el-dialog :title="title" :visible.sync="aroundTown" width="65%">
<div class="page_content_head">
<div style="display: flex; justify-content: space-between">
<div class="page_content_head_left">
<!-- <div>城市周边列表</div>-->
<!-- <div style="margin-left: 10px">-->
<!-- <img src="@public/img/land/u1343.png" />-->
<!-- </div>-->
<!-- <div style="margin-left: 10px">-->
<!-- <span>已选择{{ selectedData.length }}</span>-->
<!-- </div>-->
<!-- <div style="margin-left: 10px">-->
<!-- <el-button type="text" @click="clearSelection">清空</el-button>-->
<!-- </div>-->
</div>
<div class="page_content_head_right">
<!-- <div>-->
<!-- <el-button @click="multiDelete" v-show="hasSelectData"-->
<!-- ><img-->
<!-- style="margin-right: 5px"-->
<!-- src="@public/img/land/u1340.png"-->
<!-- />-->
<!-- </el-button>-->
<!-- </div>-->
<!-- <div>-->
<!-- <el-button @click="circumDelete"-->
<!-- ><img-->
<!-- style="margin-right: 5px"-->
<!-- src="@public/img/land/u1340.png"-->
<!-- />-->
<!-- </el-button>-->
<!-- </div>-->
<div>
<el-button @click="circumDelete('2')" type="primary"
>选择市
</el-button>
</div>
<!-- <div style="margin-right: 30px">-->
<!-- <el-button @click="showGroup" type="primary">轮播分组</el-button>-->
<!-- </div>-->
<div style="margin-right: 30px">
<el-button @click="circumDelete('1')" type="primary"
>选择区/
</el-button>
</div>
</div>
</div>
</div>
<el-table
:data="aroundTownRim"
border
@ -113,7 +160,7 @@
ref="multipleTable"
v-loading="loading"
>
<el-table-column fixed type="selection" width="55"></el-table-column>
<!-- <el-table-column fixed type="selection" width="55"></el-table-column>-->
<el-table-column label="序号" type="index" width="50"> </el-table-column>
<el-table-column
v-for="(item, index) in rim"
@ -135,7 +182,7 @@
</template>
</el-table-column>
</el-table>
<div class="page_page">
<div class="page_page" v-if="!showPages">
<el-pagination
@size-change="handleSizeChangeRim"
@current-change="handleCurrentChangeRim"
@ -147,6 +194,18 @@
>
</el-pagination>
</div>
<div class="page_page" v-if="showPages">
<el-pagination
@size-change="handleSizeChangeRim"
@current-change="handleCurrentChangeRim"
:current-page="groupShowPage.currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="groupShowPage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="groupShowPage.total"
>
</el-pagination>
</div>
@ -379,7 +438,7 @@ import {
updateGroupData,
delGroupData,
} from "@/views/banner/api/api";
import { getInterest,addInterest, delInterest ,updateInterest ,selectInterestType ,importFile ,getInterestRim } from "@/views/city/cityInterest/api/Interest";
import { getInterest,addInterest, delInterest ,updateInterest ,selectInterestType ,importFile ,getInterestRim ,delInterestRim } from "@/views/city/cityInterest/api/Interest";
export default {
name: "interest",
@ -430,8 +489,8 @@ export default {
prop: "type",
},
{
label: "备注",
prop: "remark",
label: "所属地区",
prop: "city",
},
{
label: "地址",
@ -453,7 +512,7 @@ export default {
// prop: "gid",
// },
{
label: "省",
label: "省/直辖市",
prop: "site",
},
{
@ -461,7 +520,7 @@ export default {
prop: "city",
},
{
label: "区",
label: "区/县",
prop: "county",
}
],
@ -493,6 +552,13 @@ export default {
currentPage: 1, //
pageSize: 10, //
},
//
showPages: false,
groupShowPage: {
total: 0, //
currentPage: 1, //
pageSize: 10, //
},
//
hiedType:true,
//
@ -519,7 +585,7 @@ export default {
groupTitle: "新增轮播分组",
groupDialogVisible: false,
editGroupForm: {},
//
//
interestType:[],
rules: {
name: [
@ -555,25 +621,60 @@ export default {
},
methods: {
//
circumDelete(){
let param = Object.assign(
{
current: this.groupPage.currentPage,
size: this.groupPage.pageSize,
},
);
this.aroundTown=true;
circumDelete(row){
let param = {};
if(row === '1' ){
//
param = Object.assign(
{
current: this.groupPage.currentPage,
size: this.groupPage.pageSize,
},{
marking:1
},
);
this.showPages = false;
this.aroundTown=true;
}else if('2'){
//
param = Object.assign(
{
current: this.groupShowPage.currentPage,
size: this.groupShowPage.pageSize,
},{
marking:2
},
);
this.showPages = true;
}
console.log(param);
this.title = "删除城市数据";
getInterestRim(param).then(rest => {
//console.log(rest.data);
this.aroundTownRim = rest.data.data.records;
//console.log(this.aroundTownRim);
this.groupPage.total = rest.data.data.total;
if(row === '1'){
this.groupPage.total = rest.data.data.total;
}else{
this.groupShowPage.total = rest.data.data.total;
}
})
},
//
delItemRim(row){
console.log(row);
let pasm = row ;
delInterestRim(pasm).then(rest => {
console.log("成功")
this.$message.success("删除成功");
})
},
//
multiLead(e){
@ -650,14 +751,14 @@ export default {
},
this.searchForm
);
// console.log(this.searchForm);
console.log(param);
getInterest(param).then((response) => {
//console.log(response.data);
this.tableData = response.data.data.records;
this.page.total = response.data.data.total;
this.loading = false;
});
// this.selectTypeLists();
this.selectTypeLists();
},
//
onReset() {
@ -676,11 +777,20 @@ export default {
},
handleSizeChangeRim(val) {
this.groupPage.pageSize = val;
this.circumDelete();
this.circumDelete('1');
},
handleCurrentChangeRim(val) {
this.groupPage.currentPage = val;
this.circumDelete();
this.circumDelete('1');
},
handleSizeChangeRimShow(val) {
this.groupShowPage.pageSize = val;
this.circumDelete('2');
},
handleCurrentChangeShow(val) {
this.groupShowPage.currentPage = val;
this.circumDelete('2');
},
// handleGroupSizeChange(val) {
// this.groupPage.pageSize = val;

3
src/views/sale/index.vue

@ -15,7 +15,7 @@
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="日期:" prop="annoDate">
<el-form-item label="抓取日期:" prop="annoDate">
<el-date-picker
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
@ -551,6 +551,7 @@ export default {
);
api.getSaleList(param).then((response) => {
this.tableData = [];
// this.tableData = response.data.data.records;
for (let i = 0; i < response.data.data.records.length; i++) {
if (response.data.data.records[i].statusCd == "0") {

Loading…
Cancel
Save