lijinlong^2
杜函宇 1 year ago
parent da99fe292a
commit 4c7beab327

@ -11,7 +11,7 @@
<div class="enforce-the-law-title">
<div class="filtrate-condition">
<div class="select-input">
<div class="select-span">:</div>
<div class="select-span">:</div>
<el-date-picker
v-model="form.plannedYear"
type="month"

@ -4,24 +4,16 @@
<div class="one-line">
<div class="select-input">
<div class="select-span">行政区划:</div>
<!-- <el-cascader
v-model="subdistrict"
placeholder="请选择"
:options="xzList"
:props="props"
:disabled="isNoneDivision"
>
</el-cascader> -->
<executive @quhua="quhua" @quhuadizhi="quhuadizhi"></executive>
</div>
<div class="select-input">
<div class="select-span">经济类型:</div>
<el-select v-model="form.economicsType" placeholder="请选择">
<el-select v-model="form.ecoTypeLarge" placeholder="请选择">
<el-option
v-for="item in options.economic_categories"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
v-for="item in dict.type.economic_categories"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
@ -31,10 +23,10 @@
<div class="select-span">行业类型:</div>
<el-select v-model="form.indusTypeClass" placeholder="请选择">
<el-option
v-for="item in options.category"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
v-for="item in dict.type.category"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
@ -42,8 +34,13 @@
<div class="select-input">
<div class="select-span">是否重点:</div>
<el-select v-model="form.isPoint" placeholder="请选择">
<el-option label="是" value="1"></el-option>
<el-option label="否" value="0"></el-option>
<el-option
v-for="item in dict.type.is_point"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
</div>
@ -53,10 +50,10 @@
<div class="select-span">重大危险源等级:</div>
<el-select v-model="form.majorHazardLevel" placeholder="请选择">
<el-option
v-for="item in options.major_hazard_level"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
v-for="item in dict.type.major_hazard_level"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
@ -65,10 +62,10 @@
<div class="select-span">企业分色:</div>
<el-select v-model="form.entprColor" placeholder="请选择">
<el-option
v-for="item in options.entpr_color"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
v-for="item in dict.type.entpr_color"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
@ -128,7 +125,7 @@
<div>
{{
filterTable(
options.major_hazard_level,
dict.type.major_hazard_level,
scope.row.majorHazardLevel
)
}}
@ -145,14 +142,14 @@
<div>
{{
scope.row.indusTypeClass != "null"
? filterTable(options.category, scope.row.indusTypeClass)
? filterTable(dict.type.category, scope.row.indusTypeClass)
: ""
}}
</div>
</template>
</el-table-column>
<el-table-column
prop="enterColorChart"
prop="enterColor"
label="企业分色"
header-align="center"
>
@ -160,7 +157,7 @@
<div>
{{
scope.row.enterColorChart != "null"
? filterTable(options.entpr_color, scope.row.enterColorChart)
? filterTable(dict.entpr_color, scope.row.enterColor)
: ""
}}
</div>
@ -253,24 +250,14 @@ export default {
data() {
return {
tableData: [],
option:[],
form: {
subdistrict: [],
frimType: "",
indusTypeClass: "",
isPoint: "",
majorHazardLevel: "",
entprColor: "",
uscCode: "",
},
option: [],
form: {},
xzqh: "",
searchBefore: {
pageSize: 10,
pageNum: 1,
},
xzList: [],
options: {},
load1: true,
total: 0,
main: {
@ -589,67 +576,48 @@ export default {
details: null,
//==
subdistrict: [],
isPointOption: [
{
dictValue: 1,
dictLabel: "是",
},
{
dictValue: 0,
dictLabel: "否",
},
],
guimoOption: [
{
dictValue: 1,
dictLabel: "规模以上",
},
{
dictValue: 0,
dictLabel: "规模一下",
},
],
};
},
created() {
this.getList();
this.getDict();
},
dicts: [
"economic_categories",
"economic_subcategory",
"special_governance",
"enterprise_status",
"standardization_level",
"safety_level",
"category",
"major_hazard_level",
"entpr_color",
"is_point",
],
methods: {
//
componendDistrict(district){
let name
this.option.map((item)=>{
if(item.value == district) {
name = item.label
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
item.children.map((itemTwo) => {
if (itemTwo.value == district) {
name = item.label + "-" + itemTwo.label;
}
})
});
}
})
return name
});
return name;
},
//
quhuadizhi(district) {
this.option = district
},
getDict() {
listDist({
list: "economic_categories,category,major_hazard_level,entpr_color"
}).then((res) => {
this.options = res.data;
});
this.option = district;
},
filterTable(a, b) {
let arr = [];
if (!b) return;
arr = a.filter((value) => {
return value.dictValue == b;
});
return arr[0].dictLabel || b;
return this.selectDictLabel(a, b);
},
shutDownDetail() {
this.addShow = false;
@ -666,45 +634,77 @@ export default {
});
}
this.listDes.forEach((value1, index1) => {
if (value1.eng == "isPoint") {
//
if (value1.eng == "majorHazardLevel") {
this.listDes[index1].value = this.filterTable(
this.isPointOption,
this.dict.type.major_hazard_level,
value1.value
);
}
if (value1.eng == "majorHazardLevel") {
//
if (value1.eng == "ecoTypeLarge") {
this.listDes[index1].value = this.filterTable(
this.options.major_hazard_level,
this.dict.type.economic_categories,
value1.value
);
}
if (value1.eng == "ecoTypeLarge") {
//
if (value1.eng == "ecoTypeSmall") {
this.listDes[index1].value = this.filterTable(
this.options.economic_categories,
this.dict.type.economic_subcategory,
value1.value
);
}
if (value1.eng == "indusTypeClass") {
//
if (value1.eng == "specialGovernance") {
this.listDes[index1].value = this.filterTable(
this.dict.type.special_governance,
value1.value
);
}
//
//
if (value1.eng == "operatingStatus") {
this.listDes[index1].value = this.filterTable(
this.dict.type.enterprise_status,
value1.value
);
}
//
if (value1.eng == "standLevel") {
this.listDes[index1].value = this.filterTable(
this.dict.type.standardization_level,
value1.value
);
}
//
if (value1.eng == "safetySupervisionLevel") {
this.listDes[index1].value = this.filterTable(
this.options.category,
this.dict.type.safety_level,
value1.value
);
}
if (value1.eng == "enterColorChart") {
//
//
//
//
if (value1.eng == "entprColor") {
this.listDes[index1].value = this.filterTable(
this.options.entpr_color,
this.dict.type.entpr_color,
value1.value
);
}
if (value1.eng == "safetyDepart") {
//
if (value1.eng == "indusTypeClass") {
this.listDes[index1].value = this.filterTable(
this.isPointOption,
this.dict.type.category,
value1.value
);
}
if (value1.eng == "fullSafety") {
//
if (value1.eng == "isPoint") {
this.listDes[index1].value = this.filterTable(
this.guimoOption,
this.dict.type.is_point,
value1.value
);
}
@ -764,16 +764,16 @@ export default {
return "";
},
},
mounted() {
this.checkListTwo = this.checkList;
// this.$nextTick(()=>{
// let dom = document.getElementsByClassName('tables');
// let height = dom[0].getBoundingClientRect();
// let windowHeight = window.innerHeight;
// let relativeHeight = windowHeight - height.top
// this.main.height = relativeHeight - 50
// })
},
// mounted() {
// this.checkListTwo = this.checkList;
// // this.$nextTick(()=>{
// // let dom = document.getElementsByClassName('tables');
// // let height = dom[0].getBoundingClientRect();
// // let windowHeight = window.innerHeight;
// // let relativeHeight = windowHeight - height.top
// // this.main.height = relativeHeight - 50
// // })
// },
};
</script>
<style lang="scss" scoped>

@ -11,7 +11,7 @@
<div class="enforce-the-law-title">
<div class="filtrate-condition">
<div class="select-input">
<div class="select-span">:</div>
<div class="select-span">:</div>
<div>
<el-date-picker
v-model="queryParms.year"
@ -24,17 +24,12 @@
</div>
</div>
<div class="select-input">
<div class="select-span">区划:</div>
<!-- <el-cascader
<div class="select-span" style="width: 85px">企业名称:</div>
<el-input
v-model="queryParms.entCode"
size="small"
v-model="district"
placeholder="请选择"
:options="xzList"
:props="props"
:disabled="isNoneDivision"
>
</el-cascader> -->
<executive @quhua="quhua" @quhuadizhi="quhuadizhi"></executive>
placeholder="请输入企业名称"
></el-input>
</div>
<div class="select-input">
<el-input
@ -43,21 +38,24 @@
placeholder="请输入统一社会信用代码"
></el-input>
</div>
<div style="display: flex;">
<div class="export" @click="searchList">
<span>搜索</span>
</div>
<div
class="export"
@click="chongzhiList"
style="background-color: #fdab5b"
>
<span>重置</span>
</div>
</div>
</div>
<div style="display: flex">
<div class="export" @click="addkeys" style="background-color: #28b384">
<span>新增</span>
</div>
<div class="export" @click="searchList">
<span>搜索</span>
</div>
<div
class="export"
@click="chongzhiList"
style="background-color: #fdab5b"
>
<span>重置</span>
</div>
<div class="export" style="background: #f71052" @click="deleteItem">
<span>删除</span>
</div>
@ -109,8 +107,8 @@
header-align="center"
>
</el-table-column>
<el-table-column prop="type" label="企业类别" header-align="center">
</el-table-column>
<!-- <el-table-column prop="type" label="企业类别" header-align="center">
</el-table-column> -->
<el-table-column label="操作" header-align="center">
<template slot-scope="scope">
@ -133,7 +131,11 @@
</el-table>
</div>
<div class="pagination">
<my-pagination :total="total" @pagesChange="pagesChange" ref="mypagination"></my-pagination>
<my-pagination
:total="total"
@pagesChange="pagesChange"
ref="mypagination"
></my-pagination>
</div>
<!-- 新增修改 -->
<el-dialog
@ -161,7 +163,7 @@
>
<el-row>
<el-col :span="24">
<el-form-item label="企业名称" prop="enterpriseName">
<el-form-item label="企业名称:" prop="enterpriseName">
<el-input
v-model="form.enterpriseName"
size="small"
@ -171,7 +173,7 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="企业代码:" prop="entCode">
<el-form-item label="信用代码:" prop="entCode">
<el-input
v-model="form.entCode"
size="small"
@ -192,7 +194,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<!-- <el-row>
<el-col>
<el-form-item label="企业类别:" prop="type">
<el-input
@ -202,8 +204,8 @@
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
</el-row> -->
<!-- <el-row>
<el-col>
<el-form-item label="行政区划:" prop="type">
<el-cascader
@ -217,7 +219,7 @@
</el-cascader>
</el-form-item>
</el-col>
</el-row>
</el-row> -->
<el-row>
<el-col>
<el-form-item label="备注:" prop="remark">
@ -273,16 +275,16 @@
<el-descriptions-item label="企业名称">
{{ details.enterpriseName }}
</el-descriptions-item>
<el-descriptions-item label="企业代码">{{
<el-descriptions-item label="信用代码">{{
details.entCode
}}</el-descriptions-item>
<el-descriptions-item label="企业类别">{{
<!-- <el-descriptions-item label="企业类别">{{
details.type
}}</el-descriptions-item>
<el-descriptions-item label="行政区划">{{
}}</el-descriptions-item> -->
<!-- <el-descriptions-item label="行政区划">{{
componendDistrict(details.district)
}}</el-descriptions-item>
<el-descriptions-item label="备注">{{
}}</el-descriptions-item> -->
<el-descriptions-item label="备注">{{
details.remark
}}</el-descriptions-item>
</el-descriptions>
@ -304,9 +306,9 @@ import {
deleteEnterprise,
exportEnterprise,
getEnterprise,
xzTree,
// xzTree,
} from "@/api/yingji/keyEnterprise.js";
import { mapState } from "vuex";
// import { mapState } from "vuex";
export default {
components: { myPagination, executive },
@ -325,7 +327,8 @@ export default {
queryParms: {
year: "",
uscCode: "",
district: "",
// district: "",
//
},
queryParmsdistrict: [],
district: [],
@ -373,82 +376,83 @@ export default {
};
},
created() {
this.getTreeList();
// this.getTreeList();
this.getList();
},
computed: {
...mapState({
//dept.parentId
dept: (state) => state.user.dept,
}),
},
// computed: {
// ...mapState({
// //dept.parentId
// dept: (state) => state.user.dept,
// }),
// },
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
},
// 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) {
res1.data.forEach((value, index) => {
this.xzList.push({
value: value.county,
label: value.institutionName,
children: [],
});
if (value.children.length > 0) {
value.children.forEach((value1, index1) => {
this.xzList[index].children.push({
value: value1.subdistrict,
label: value1.institutionName,
});
});
}
});
}
});
},
// quhuadizhi(district) {
// this.options = district
// },
// getTreeList() {
// xzTree().then((res1) => {
// if (this.dept.parentId == 0) {
// res1.data.forEach((value, index) => {
// this.xzList.push({
// value: value.county,
// label: value.institutionName,
// children: [],
// });
// if (value.children.length > 0) {
// value.children.forEach((value1, index1) => {
// this.xzList[index].children.push({
// value: value1.subdistrict,
// label: value1.institutionName,
// });
// });
// }
// });
// }
// });
// },
handleRemove() {},
quhua(e) {
this.district = e;
},
// quhua(e) {
// this.district = e;
// },
searchList() {
this.searchBefore = {
pageSize: 10,
pageNum: 1,
};
this.$refs.mypagination.defaultPages();
if (this.district) {
this.queryParms.district = this.district;
}
// if (this.district) {
// this.queryParms.district = this.district;
// }
this.searchBefore = { ...this.searchBefore, ...this.queryParms };
this.getList();
},
reset() {
this.form = {
//
enterpriseName: "",
//
entCode: "",
//
remark: "",
//
type: "",
// type: "",
//
year: "",
};
@ -507,7 +511,7 @@ export default {
this.headerText = "修改";
getEnterprise(e.id).then((res) => {
this.form = res.data;
this.queryParmsdistrict = this.form.district
// this.queryParmsdistrict = this.form.district
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs.form1.clearValidate();
@ -516,18 +520,18 @@ export default {
},
//
confirm() {
if (this.queryParmsdistrict) {
if (this.queryParmsdistrict.length == 1) {
this.form.district = this.queryParmsdistrict[0];
} else if (
this.queryParmsdistrict.length == 2 &&
this.queryParmsdistrict[0] == this.queryParmsdistrict[1]
) {
this.form.district = this.queryParmsdistrict[0];
} else {
this.form.district = this.queryParmsdistrict[1];
}
}
// if (this.queryParmsdistrict) {
// if (this.queryParmsdistrict.length == 1) {
// this.form.district = this.queryParmsdistrict[0];
// } else if (
// this.queryParmsdistrict.length == 2 &&
// this.queryParmsdistrict[0] == this.queryParmsdistrict[1]
// ) {
// this.form.district = this.queryParmsdistrict[0];
// } else {
// this.form.district = this.queryParmsdistrict[1];
// }
// }
this.$refs.form1.validate((valid) => {
if (valid) {
if (this.form.id != null) {

Loading…
Cancel
Save