匹配行政区划及分页功能

lijinlong^2
吕天方 1 year ago
parent 1ff9d3ddb7
commit 8d25586c86

@ -154,13 +154,25 @@
width="150"
header-align="center"
>
<template slot-scope="scope">
<span>{{ componendDistrict("0" + scope.row.subdistrict) }}</span>
</template>
</el-table-column>
<el-table-column
prop="ecoTypeLarge"
label="经济类型"
prop="indusTypeClass"
label="行业类型"
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<div>
{{
scope.row.indusTypeClass != "null"
? filterTable(optionstwo.category, scope.row.indusTypeClass)
: ""
}}
</div>
</template>
</el-table-column>
<!-- <el-table-column
prop="indusTypeClass"
@ -175,23 +187,32 @@
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<div>
{{
filterTable(
optionstwo.major_hazard_level,
scope.row.majorHazardLevel
)
}}
</div>
</template>
<template slot-scope="scope">
<div>
{{
filterTable(
optionstwo.major_hazard_level,
scope.row.majorHazardLevel
)
}}
</div>
</template>
</el-table-column>
<el-table-column
prop="entprColor"
prop="enterColorChart"
label="企业分色"
show-overflow-tooltip
header-align="center"
>
<template slot-scope="scope">
<div>
{{
scope.row.enterColorChart != "null"
? filterTable(optionstwo.entpr_color, scope.row.enterColorChart)
: ""
}}
</div>
</template>
</el-table-column>
<el-table-column
prop="uscCode"
@ -219,7 +240,7 @@
</el-table>
</div>
<div class="pagination">
<my-pagination :total="total" @pagesChange="pagesChange">
<my-pagination :total="total" @pagesChange="pagesChange" ref="mypagination">
<!-- <div>重点企业数
<span :class=" count == unCount ? 'selectedNumber' : 'unselectedNumber'">{{ unCount }}</span>/
<span class="sum">{{ count }}</span>
@ -372,6 +393,23 @@ export default {
}
},
methods: {
//
componendDistrict(district){
let name
this.listOne.map((item)=>{
if(item.subdistrict == district) {
name = item.institutionName
} else {
item.children.map((itemTwo)=>{
if(itemTwo.subdistrict == district) {
name = item.institutionName + '-' + itemTwo.institutionName
}
})
}
})
return name
},
//
filterTable(a, b) {
let arr = [];
if (!b) return;
@ -390,6 +428,9 @@ export default {
// if (this.form.subdistrict) {
// this.subdistrict = this.trimTrailingZeros(this.form.subdistrict);
// }
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
let obj
// console.log(this.form.subdistrict)
//
@ -443,7 +484,9 @@ export default {
},
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.getTable(this.pages);
this.$refs.mypagination.defaultPages();
let obj = {...this.pages,...this.form}
this.getTable(obj);
},
// checkBox
checkSelectable(row) {
@ -515,6 +558,7 @@ export default {
// this.unCount = 0;
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
this.selected = 0;
// this.unselected = 0;
// this.count = 0;

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 13:11:33
* @LastEditors: JC9527
* @LastEditTime: 2023-09-20 09:31:57
* @LastEditTime: 2023-09-27 16:36:54
-->
<template>
<div class="pagination">
@ -59,6 +59,11 @@ export default {
this.pageNum = 1;
this.$emit('pagesChange',{pageSize:e,pageNum:this.pageNum})
},
//
defaultPages(){
this.pageSize = 10;
this.pageNum = 1;
},
//
numberMap() {
// if (this.total == this.tableData.length) {

@ -1,3 +1,11 @@
<!--
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-27 14:01:34
* @LastEditors: JC9527
* @LastEditTime: 2023-09-27 15:59:28
-->
<template>
<div >
<el-cascader
@ -59,6 +67,7 @@ export default {
}
});
}
this.$emit("quhuadizhi", this.compartment)
});
},
getData(e) {

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-27 13:51:27
* @LastEditTime: 2023-09-27 16:47:17
-->
<template>
<div class="container-main" ref="main">
@ -24,7 +24,7 @@
<div class="select-input">
<div class="select-span">区划:</div>
<executive @quhua="quhua"></executive>
<executive @quhua="quhua" @quhuadizhi="quhuadizhi"></executive>
</div>
<div class="my-checkbox">
<el-checkbox-group v-model="checkList" @change="setmealSelect">
@ -74,6 +74,9 @@
width="180"
header-align="center"
>
<template slot-scope="scope">
<span>{{ componendDistrict(scope.row.district) }}</span>
</template>
</el-table-column>
<el-table-column
prop="entprName"
@ -107,7 +110,7 @@
</el-table>
</div>
<div class="pagination">
<my-pagination :total="total" @pagesChange="pagesChange"></my-pagination>
<my-pagination :total="total" @pagesChange="pagesChange" ref="mypagination"></my-pagination>
</div>
<!-- 查看 -->
<el-dialog
@ -166,6 +169,7 @@ export default {
data() {
return {
tableData: [],
option:[],
loads: true,
total: 0,
//
@ -301,6 +305,26 @@ export default {
this.getList();
},
methods: {
//
componendDistrict(district){
let name
this.option.map((item)=>{
if(item.value == district) {
name = item.label
} else {
item.children.map((itemTwo)=>{
if(itemTwo.value == district) {
name = item.label + '-' + itemTwo.label
}
})
}
})
return name
},
//
quhuadizhi(district) {
this.option = district
},
reset() {
this.form = {
district: "",
@ -312,6 +336,7 @@ export default {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
},
//
chongzhiList() {
@ -343,6 +368,11 @@ export default {
if (this.district) {
this.form.district = this.district;
}
this.searchBefore = {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
this.searchBefore = { ...this.searchBefore, ...this.form };
this.getList();
},

@ -12,7 +12,7 @@
:disabled="isNoneDivision"
>
</el-cascader> -->
<executive @quhua="quhua"></executive>
<executive @quhua="quhua" @quhuadizhi="quhuadizhi"></executive>
</div>
<div class="select-input">
<div class="select-span">经济类型:</div>
@ -98,14 +98,26 @@
style="width: 100%"
:height="497"
:border="false"
tooltip-effect="light"
:row-class-name="tableRowClassName"
>
<el-table-column
prop="entprName"
label="企业名称"
show-overflow-tooltip
header-align="center"
>
</el-table-column>
<el-table-column
prop="majorHazardLevel"
label="行政区划"
width="180"
header-align="center"
>
<template slot-scope="scope">
<span>{{ componendDistrict("0" + scope.row.subdistrict) }}</span>
</template>
</el-table-column>
<el-table-column
prop="majorHazardLevel"
label="重大危险源等级"
@ -241,6 +253,7 @@ export default {
data() {
return {
tableData: [],
option:[],
form: {
subdistrict: [],
frimType: "",
@ -603,6 +616,27 @@ export default {
this.getDict();
},
methods: {
//
componendDistrict(district){
let name
console.log(this.option,'this.option')
this.option.map((item)=>{
if(item.value == district) {
name = item.label
} else {
item.children.map((itemTwo)=>{
if(itemTwo.value == district) {
name = item.label + '-' + itemTwo.label
}
})
}
})
return name
},
//
quhuadizhi(district) {
this.option = district
},
getDict() {
listDist({
list: "economic_categories,category,major_hazard_level,entpr_color",
@ -681,6 +715,11 @@ export default {
this.subdistrict = e;
},
searchList() {
this.searchBefore = {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
if (this.subdistrict) {
this.form.subdistrict = this.subdistrict;
}
@ -702,6 +741,7 @@ export default {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
this.getList();
},
//

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-27 13:52:16
* @LastEditTime: 2023-09-27 17:06:02
-->
<template>
<div class="container-main" ref="main">
@ -34,7 +34,7 @@
:disabled="isNoneDivision"
>
</el-cascader> -->
<executive @quhua="quhua"></executive>
<executive @quhua="quhua" @quhuadizhi="quhuadizhi"></executive>
</div>
<div class="select-input">
<el-input
@ -87,6 +87,7 @@
:border="false"
:row-class-name="tableRowClassName"
:cell-style="columnStyle"
tooltip-effect="light"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
@ -98,6 +99,7 @@
<el-table-column
prop="enterpriseName"
label="企业名称"
show-overflow-tooltip
header-align="center"
>
</el-table-column>
@ -131,7 +133,7 @@
</el-table>
</div>
<div class="pagination">
<my-pagination :total="total" @pagesChange="pagesChange"></my-pagination>
<my-pagination :total="total" @pagesChange="pagesChange" ref="mypagination"></my-pagination>
</div>
<!-- 新增修改 -->
<el-dialog
@ -278,7 +280,7 @@
details.type
}}</el-descriptions-item>
<el-descriptions-item label="行政区划">{{
details.district
componendDistrict(details.district)
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{
details.remark
@ -381,6 +383,26 @@ export default {
}),
},
methods: {
//
componendDistrict(district){
let name
this.options.map((item)=>{
if(item.value == district) {
name = item.label
} else {
item.children.map((itemTwo)=>{
if(itemTwo.value == district) {
name = item.label + '-' + itemTwo.label
}
})
}
})
return name
},
//
quhuadizhi(district) {
this.options = district
},
getTreeList() {
xzTree().then((res1) => {
if (this.dept.parentId == 0) {
@ -407,6 +429,11 @@ export default {
this.district = e;
},
searchList() {
this.searchBefore = {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
if (this.district) {
this.queryParms.district = this.district;
}
@ -432,6 +459,7 @@ export default {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
this.queryParms.year = "";
// this.district = [];
this.queryParms.uscCode = "";
@ -588,6 +616,7 @@ export default {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
this.getList();
this.$refs.uploadOver.clearFiles();
})

@ -2,8 +2,8 @@
<div class="mainBox">
<div class="select-nav">
<div class="left-nav" v-if="activeIndex == 1">
<div class="navText">:</div>
<el-select v-model="ruleForm.date" placeholder="请选择年" size="mini">
<div class="navText">:</div>
<el-select v-model="ruleForm.date" placeholder="请选择年" size="mini">
<el-option
v-for="item in options"
:key="item.value"
@ -242,8 +242,8 @@ export default {
],
//===
beforeParams: {
// pageSize: 10,
// pageNum: 1,
pageSize: 10,
pageNum: 1,
},
form: {
deptName: "",

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-27 14:00:22
* @LastEditTime: 2023-09-27 16:45:07
-->
<template>
<div class="plan-management">
@ -77,7 +77,10 @@
show-overflow-tooltip
width="180"
header-align="center"
>
>
<template slot-scope="scope">
<span>{{ componendDistrict(scope.row.district) }}</span>
</template>
</el-table-column>
<el-table-column
prop="entprName"
@ -160,7 +163,7 @@
</el-table> -->
</div>
<div class="pagination">
<my-pagination :total="total" @pagesChange="pagesChange"></my-pagination>
<my-pagination :total="total" @pagesChange="pagesChange" ref="mypagination"></my-pagination>
</div>
</div>
<my-dialog ref="myDialog" v-on:close="padlock"></my-dialog>
@ -258,6 +261,9 @@
// districtTwo = district.split(1,11)
// obj = { ...this.pages, ...newForm,district:districtTwo };
// }
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
let obj = obj = { ...this.pages, ...newForm };
// district = district[1]
this.getList(obj)
@ -266,6 +272,22 @@
}
},
methods:{
//
componendDistrict(district){
let name
this.options.map((item)=>{
if(item.subdistrict == district) {
name = item.institutionName
} else {
item.children.map((itemTwo)=>{
if(itemTwo.subdistrict == district) {
name = item.institutionName + '-' + itemTwo.institutionName
}
})
}
})
return name
},
//
pagesChange(pages){
this.getList(pages)
@ -299,6 +321,9 @@
},
//
reset(){
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
let obj
if(this.dept.parentId !== 0) {
let { district} = this.form;
@ -316,6 +341,9 @@
// dialog
padlock(){
let { district} = this.form;
this.pages.pageNum = 1;
this.pages.pageSize = 10;
this.$refs.mypagination.defaultPages();
let obj = {...this.pages,district}
this.getList(obj);
},

@ -49,8 +49,8 @@ module.exports = {
// },
// },
'/api': {
// target: `http://39.101.188.84:9033`,
target: `http://192.168.0.119:9033`,
target: `http://39.101.188.84:9033`,
// target: `http://192.168.0.119:9033`,
changeOrigin: true,
pathRewrite: {
'^/api': ''

Loading…
Cancel
Save