Commit 29a7b532 authored by zhengke's avatar zhengke

修改

parent 25e7af7b
<template>
<div>
<el-row>
<el-col :span="24">
<div class="searchInput" style="width: 250px; margin-bottom: 10px">
<el-input @keyup.enter.native="(msg.pageIndex = 1), getList()" @clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px" placeholder="品牌名" v-model="msg.BrandName"
size="small" clearable>
</el-input>
<span @click="(msg.pageIndex = 1), getList()" class="el-icon-search" style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"></span>
</div>
<div style="margin-bottom: 10px;width:250px;display:inline-block;">
<span style="margin-left: 10px">商铺性质</span>
<el-select class="w100" @change="(msg.pageIndex = 1), getList()" style="margin-left: 10px"
v-model="msg.ProjectType" size="small" placeholder="请选择商铺性质">
<el-option label="不限" :value="0"></el-option>
<el-option :label="x.Name" :value="x.Id" v-for="(x, y) in ProjectTypeList" :key="y"></el-option>
</el-select>
</div>
</el-col>
</el-row>
<el-table :data="dataList" ref="multipleTable" @selection-change="handleSelectionChange" tooltip-effect="dark"
height="450" style="width: 100%">
<el-table-column type="selection" width="50px">
</el-table-column>
<el-table-column prop="Id" label="ID" width="100">
<template slot-scope="scope">
<span @click="goRecruit(scope.row.ID)">{{ scope.row.ID }}</span>
</template>
</el-table-column>
<el-table-column prop="ClassName" label="分类" width="150">
</el-table-column>
<el-table-column prop="BrandName" label="品牌"> </el-table-column>
<el-table-column prop="Logo" label="Logo" width="100">
<template slot-scope="scope">
<el-image v-if="scope.row.Logo" :src="scope.row.Logo" style="width: 50px"
:preview-src-list="scope.row.LogoList">
</el-image>
</template>
</el-table-column>
<el-table-column prop="ShopNum" label="店铺数量" width="80">
</el-table-column>
<el-table-column prop="BuiltUpArea" label="建筑面积">
<template slot-scope="scope">
<span>{{ scope.row.BuiltUpArea }}
{{ scope.row.EndBuiltUpArea }}</span>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:center" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
layout="prev, pager, next" :total="total">
</el-pagination>
</div>
</template>
<script>
export default {
props: ['ckGoods', "IsGetSpec"],
data() {
return {
dataList: [],
msg: {
pageIndex: 1,
pageSize: 20,
BrandName: "", //品牌名
ProjectType: 0, //商铺性质
Plumbing: -1, //上下水(0-否1-有)
Caliber: -1, //管径(0-否1-有)
Sewage: -1, //排污(0-否1-有)
RanQi: -1, //燃气(0-否1-有)
DianLiang: "", //电量(0-否1-有)
PaiYan: -1, //排烟量(0-否1-有)
KongTiao: -1, //空调(0-否1-有)
XinFeng: -1, //新风(0-否1-有)
BrandClassId: 0, //分类
ExcelEnumIds: [],
UserId: 0, //用户认证
},
total: 0,
ProjectTypeList: [], //商铺性质列表
selectRow: []
};
},
created() {},
methods: {
//获取所有菜单
getList() {
this.apipost("/api/Trade/GetBrandPageList", this.msg, (res) => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.pageCount = res.data.data.count;
this.dataList.forEach((x) => {
x.LogoList = [];
x.LogoList.push(x.Logo);
});
} else {
this.Error(res.data.message);
}
});
},
//获取商铺性质
getProjectType() {
this.apipost("/api/Trade/GetProjectTypeEnumList", {}, (res) => {
if (res.data.resultCode == 1) {
this.ProjectTypeList = res.data.data;
} else {
this.Error(res.data.message);
}
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//父组件调用方法
getChoicedGoods() {
return this.selectRow;
},
handleSelectionChange(val) {
this.selectRow = JSON.parse(JSON.stringify(val));
},
},
mounted() {
this.getProjectType();
this.getList();
}
};
</script>
<template>
<div>
<el-row>
<el-col :span="24">
<div class="searchInput" style="width: 250px; margin-bottom: 10px">
<el-input @keyup.enter.native="(msg.pageIndex = 1), getList()" @clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px" placeholder="项目名称" v-model="msg.CarrierName"
size="small" clearable>
</el-input>
<span @click="(msg.pageIndex = 1), getList()" class="el-icon-search" style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"></span>
</div>
<div class="searchInput" style="width: 250px; margin-bottom: 10px">
<el-input @keyup.enter.native="(msg.pageIndex = 1), getList()" @clear="(msg.pageIndex = 1), getList()"
style="display: inline-block; width: 225px; height: 30px" placeholder="开发商" v-model="msg.Developers"
size="small" clearable>
</el-input>
<span @click="(msg.pageIndex = 1), getList()" class="el-icon-search" style="
color: #979dad;
font-size: 14px;
position: relative;
top: 1px;
"></span>
</div>
</el-col>
</el-row>
<el-table :data="dataList" ref="multipleTable" @selection-change="handleSelectionChange" tooltip-effect="dark" height="450" style="width: 100%">
<el-table-column type="selection" width="50px">
</el-table-column>
<el-table-column label="项目名称" prop="CarrierName"></el-table-column>
<el-table-column prop="CarrierMetroList" label="地铁信息" width="200">
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.CarrierMetroList" :key="index" class="CarrierList">
<span>{{ item.MetroNum }}号线</span><span>{{ item.MetroName }}</span><span>{{ item.Distance }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="Logo" width="100" label="logo">
<template slot-scope="scope">
<el-image :src="scope.row.Logo" style="width: 50px" :preview-src-list="scope.row.LogoList">
</el-image>
</template>
</el-table-column>
<el-table-column prop="Address" width="200" label="项目地址">
</el-table-column>
<el-table-column prop="Developers" width="200" label="开发商">
</el-table-column>
<el-table-column prop="OpenTime" width="180" label="开业时间">
</el-table-column>
</el-table>
<el-pagination style="text-align:center" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
layout="prev, pager, next" :total="total">
</el-pagination>
</div>
</template>
<script>
export default {
props: ['ckGoods', "IsGetSpec"],
data() {
return {
dataList: [],
msg: {
MetroName: "", //地铁站名称
pageIndex: 1,
pageSize: 15,
CarrierName: "", //载体名称
MetroNum: "", //地铁线路
Developers: "", //开发商
StartOpenTime: "", //开业开始时间
EndOpenTime: "", // 开业截止时间
ExcelEnumIds: [],
UserId: 0,
},
total: 0,
selectRow:[]
};
},
created() {},
methods: {
//获取所有菜单
getList() {
this.loading = true;
this.apipost("/api/Trade/GetCarrierPageList", this.msg, (res) => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let pageData = res.data.data.pageData;
this.dataList = pageData;
this.dataList.forEach((x) => {
x.LogoList = [];
x.LogoList.push(x.Logo);
});
}
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//父组件调用方法
getChoicedGoods() {
return this.selectRow;
},
handleSelectionChange(val) {
this.selectRow = JSON.parse(JSON.stringify(val));
},
//清空多选方法
toggleSelection(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
});
} else {
this.$refs.multipleTable.clearSelection();
}
}
},
mounted() {
this.getList();
}
};
</script>
......@@ -282,7 +282,7 @@
<el-radio v-model="data.addGoodsType" :label="1">手动添加</el-radio>
</el-form-item>
<el-form-item label="添加类型" v-if="data.addGoodsType==1">
<el-button size="small" @click="chooseData()">选择</el-button>
<el-button size="small" @click="chooseData()">选择</el-button>
</el-form-item>
<el-form-item label="自定义列表" v-if="data.addGoodsType==1">
<div flex="dir:top">
......@@ -381,20 +381,39 @@
<el-button size="small" type="danger" @click="getChoiceLink()">确 定</el-button>
</span>
</el-dialog>
<!-- 选择载体 -->
<el-dialog title="选择载体" :visible.sync="isShowZaiti" width="800px">
<chooseZaiti ref="chooseZaiti"></chooseZaiti>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowZaiti=false">取 消</el-button>
<el-button size="small" type="primary" @click="getZaiTi()">确 定</el-button>
</span>
</el-dialog>
<!-- 选择品牌 -->
<el-dialog title="选择品牌" :visible.sync="isShowBrand" width="800px">
<chooseBrand ref="chooseBrand"></chooseBrand>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowBrand=false">取 消</el-button>
<el-button size="small" type="primary" @click="getBrand()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import choiceGood from "../../common/choiceGood.vue";
import chooseMenu from "../../common/chooseMenu.vue";
import chooseZaiti from "../../common/chooseZaiti.vue";
import chooseBrand from "../../common/chooseBrand.vue";
export default {
props: ["cusData", "index", "dataLeng"],
components: {
ChooseImg,
choiceGood,
chooseMenu
chooseMenu,
chooseZaiti,
chooseBrand
},
data() {
return {
......@@ -409,6 +428,8 @@
comIndex: -1,
commonIndex: 0,
isShowLink: false,
isShowZaiti:false,
isShowBrand:false
};
},
created() {
......@@ -418,7 +439,11 @@
//选择数据
chooseData()
{
if(this.data.goodType==1){
this.isShowZaiti=true;
}else{
this.isShowBrand=true;
}
},
//向父组件传值 并调用排序
resetSord(IsUp) {
......@@ -520,6 +545,40 @@
this.data.list[this.commonIndex].linkUrl = obj.PageUrl;
this.isShowLink = false;
},
//确定选择载体
getZaiTi(){
var ckedArr = this.$refs.chooseZaiti.getChoicedGoods();
console.log(ckedArr,'ckedarr');
ckedArr.forEach(x=>{
let obj={
id: 0,
name: x.CarrierName, //标题
lableName: x.CarrierPlan, //副标题
picUrl: x.Logo, //商品图片
linkUrl: '' //链接
}
this.data.list.push(obj);
})
this.isShowZaiti=false;
this.$refs.chooseZaiti.toggleSelection();
},
//确定选择品牌
getBrand(){
var ckedArr = this.$refs.chooseBrand.getChoicedGoods();
console.log(ckedArr,'ckedarr');
ckedArr.forEach(x=>{
let obj={
id: 0,
name: x.BrandName, //标题
lableName: x.BrandType, //副标题
picUrl: x.Logo, //商品图片
linkUrl: '' //链接
}
this.data.list.push(obj);
})
this.isShowBrand=false;
this.$refs.chooseBrand.toggleSelection();
},
},
computed: {
cMainFlex() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment