Commit bb8498ab authored by 吴春's avatar 吴春

提交代码

parent 95241787
......@@ -15,8 +15,19 @@
<div class="VehicleManagement">
<div class="head-title">
载体管理
<el-button style="float:right;margin-top: -5px;" size="small" type="primary" @click="CommonJump('editVehicle')">
新增载体</el-button>
<!-- <el-button style="float:right;margin-top: -5px;" size="small" type="primary" @click="CommonJump('editVehicle')">
新增载体</el-button> -->
 <div>
<el-button
@click="dialogVisible = true"
style="float: right; margin-top: -25px"
size="small"
type="primary"
>批量导出
</el-button>
</div>
<div> <el-button type="primary" style="float: right; margin: -25px 10px 0px 0px;" class="el-button--small" @click="ommonJump('editVehicle')">新增载体</el-button></div>
</div>
<div class="content">
<div>
......@@ -102,6 +113,53 @@
:current-page.sync="msg.pageIndex" layout="total,prev, pager, next" :total="total">
</el-pagination>
</div>
<!-- 选择导出信息 -->
<el-dialog title="选择导出信息" :visible.sync="dialogVisible" width="960px">
<el-form
style="border: 1px solid #f0f2f7"
:model="addMsg"
ref="addMsg"
label-width="100px"
>
<div
style="
box-sizing: border-box;
background-color: #f3f5f6;
width: 100%;
padding-left: 20px;
height: 50px;
line-height: 50px;
"
>
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
>全选
</el-checkbox>
</div>
<div style="margin: 15px 0"></div>
<div style="padding: 10px 25px 20px">
<el-checkbox-group
v-model="checkedCities"
@change="handleCheckedCitiesChange"
>
<el-checkbox
style="margin-bottom: 10px; width: 135px"
v-for="city in cities"
:label="city.Id"
:key="city.Name"
>
{{ city.Name }}</el-checkbox
>
</el-checkbox-group>
</div>
</el-form>
<div style="text-align: right; margin-top: 20px">
<el-button size="small" type="primary" @click="Export">导出</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
......@@ -116,18 +174,27 @@
MetroNum: '', //地铁线路
Developers: '', //开发商
StartOpenTime: '', //开业开始时间
EndOpenTime: '' // 开业截止时间
EndOpenTime: '' ,// 开业截止时间
ExcelEnumIds :[],
},
addMsg: {},
dialogVisible: false,
dateStr: [], //日期
total: 0,
tableData: [], //数据列表
isShowAdd: false, //新增修改载体
ProjectTypeList: [], //项目类型
checkAll: false,
checkedCities: [],
cities: [],
cityOptions: [],
isIndeterminate: false,
};
},
created() {
this.getList();
this.getTypeEnumList();
this.getDown();
},
methods: {
getList() {
......@@ -152,6 +219,39 @@
}
})
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cities.length;
},
Export() {
      this.msg.ExcelEnumIds = this.checkedCities;
      let msg = JSON.parse(JSON.stringify(this.msg));
      if (!msg.Id || msg.Id == "") {
        msg.Id = 0;
      }
      this.GetLocalFile(
        "/api/Trade/GetCarrierListToExcel",
        msg,
        "载体信息.xls"
      );
    },
getDown() {
this.cityOptions = [];
this.apipost("/api/Trade/GetCarrierExportEnumList", {}, (res) => {
this.cities = res.data.data;
let data = res.data.data;
data.forEach((item) => {
this.cityOptions.push(item.Id);
});
});
},
//删除
delManage(obj) {
let that = this;
......
......@@ -4,7 +4,13 @@
<span>品牌列表</span>
<div style="display: flex;flex-direction: row;align-items: center">
<el-button type="primary" class="el-button--small" @click="addTopic">新增</el-button>
 <el-button size="small" type="primary" @click="Export">导出</el-button>
  <el-button
@click="dialogVisible = true"
style="float: right; margin-top: -5px"
size="small"
type="primary"
>批量导出
</el-button>
</div>
</div>
......@@ -141,6 +147,55 @@
layout="total, prev, pager, next" :current-page.sync="msg.pageIndex" :total="pageCount">
</el-pagination>
</div>
<!-- 选择导出信息 -->
<el-dialog title="选择导出信息" :visible.sync="dialogVisible" width="960px">
<el-form
style="border: 1px solid #f0f2f7"
:model="addMsg"
ref="addMsg"
label-width="100px"
>
<div
style="
box-sizing: border-box;
background-color: #f3f5f6;
width: 100%;
padding-left: 20px;
height: 50px;
line-height: 50px;
"
>
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
>全选
</el-checkbox>
</div>
<div style="margin: 15px 0"></div>
<div style="padding: 10px 25px 20px">
<el-checkbox-group
v-model="checkedCities"
@change="handleCheckedCitiesChange"
>
<el-checkbox
style="margin-bottom: 10px; width: 135px"
v-for="city in cities"
:label="city.Id"
:key="city.Name"
>
{{ city.Name }}</el-checkbox
>
</el-checkbox-group>
</div>
</el-form>
<div style="text-align: right; margin-top: 20px">
<el-button size="small" type="primary" @click="Export">导出</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
......@@ -162,8 +217,16 @@
KongTiao: -1, //空调(0-否1-有)
XinFeng: -1, //新风(0-否1-有)
BrandClassId: 0, //分类
ExcelEnumIds :[],
},
addMsg: {},
dialogVisible: false,
dataList: [],
checkAll: false,
checkedCities: [],
cities: [],
cityOptions: [],
isIndeterminate: false,
pageCount: 0,
loading: false,
BrandClassList: [], //品牌分类列表
......@@ -173,12 +236,11 @@
created() {
this.getBrandClassList();
this.getProjectType();
this.getDown();
},
mounted() {
this.getList();
},
methods: {
Export() {
      this.msg.ExcelEnumIds = this.checkedCities;
......@@ -187,11 +249,21 @@
        msg.Id = 0;
      }
      this.GetLocalFile(
        "/api/Trade/GetMemberUserListToExcel",
        "/api/Trade/GetBrandListToExcel",
        msg,
        "用户管理.xls"
        "品牌信息.xls"
      );
    },
getDown() {
this.cityOptions = [];
this.apipost("/api/Trade/GetBusinessExportEnumList", {}, (res) => {
this.cities = res.data.data;
let data = res.data.data;
data.forEach((item) => {
this.cityOptions.push(item.Id);
});
});
},
//获取商铺性质
getProjectType() {
this.apipost(
......@@ -204,6 +276,16 @@
}
},
);
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cities.length;
},
getList() {
this.apipost(
......
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