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

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

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

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

Loading…
Cancel
Save