lijinlong^2
杜函宇 1 year ago
parent e6e17eb21c
commit e3653c13b1

@ -0,0 +1,18 @@
/*
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-11 15:38:21
* @LastEditors: JC9527
* @LastEditTime: 2023-09-28 13:22:58
*/
import request from '@/utils/request'
// 首页表格
export function indexRegionalism(params) {
return request({
url: "/pharmaceuticals/bPlanEnterprise/tree",
method: "get",
params,
});
}

@ -1,41 +1,38 @@
<template > <template >
<div style="height: 100%; width: 100%" > <div style="height: 100%; width: 100%" v-loading="loadS">
<div id="main1"></div> <div id="main1"></div>
</div> </div>
</template> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import { workStatistics } from "@/api/yingji/keyEnterprise.js"; // import { workStatistics } from "@/api/yingji/keyEnterprise.js";
export default { export default {
data() { data() {
return { return {
load1: true,
arr1: [], arr1: [],
arr2: [], arr2: [],
beforeParams: {
pageSize: 10,
pageNum: 1,
},
}; };
}, },
props: {
loadS: {
type: Boolean,
default: true,
},
},
mounted() { mounted() {
this.$nextTick(() => {
// this.getData();
this.initChart()
});
}, },
methods: { methods: {
getData() { getData(e) {
this.load1 = true; this.arr1= []
workStatistics(this.beforeParams).then((res) => { this.arr2= []
res.data.list.forEach((value, index) => { e.forEach((value) => {
this.arr1.push(value.deptName); this.arr1.push(value.institutionName);
this.arr2.push(value.keyCompleted + value.nonKeyCompleted); this.arr2.push(value.checkEnterpriseCount);
}); });
this.initChart(); this.initChart();
this.load1 = false;
});
}, },
initChart() { initChart() {
var chartDom = document.getElementById("main1"); var chartDom = document.getElementById("main1");
@ -90,20 +87,20 @@ export default {
yAxis: [ yAxis: [
{ {
type: "category", type: "category",
data: [ // data: [
"高新区", // "",
"工业园区", // "",
"相城区", // "",
"姑苏区", // "",
"吴中区", // "",
"吴江区", // "",
"昆山市", // "",
"太仓市", // "",
"常熟市", // "",
"张家港市", // "",
"苏州", // "",
], // ],
// data: this.arr1, data: this.arr1,
axisLabel: { axisLabel: {
// //
formatter: function (value) { formatter: function (value) {
@ -129,8 +126,8 @@ export default {
}, },
{ {
type: "category", type: "category",
data: [33, 63, 115, 167, 210, 225, 245, 283, 300, 321, 1000], // data: [33, 63, 115, 167, 210, 225, 245, 283, 300, 321, 1000],
// data: this.arr2, data: this.arr2,
axisLabel: { axisLabel: {
formatter: function (value, index) { formatter: function (value, index) {
return `{a|${value}}{b|家}`; return `{a|${value}}{b|家}`;
@ -164,8 +161,8 @@ export default {
label: { label: {
show: false, // show: false, //
}, },
data: [63, 115, 167, 210, 225, 245, 283, 300, 321, 678, 1000], // data: [63, 115, 167, 210, 225, 245, 283, 300, 321, 678, 1000],
// data: this.arr2, data: this.arr2,
barWidth: 12, barWidth: 12,
itemStyle: { itemStyle: {
color: { color: {

@ -1,36 +1,33 @@
<template> <template>
<div style="height: 100%; width: 100%"> <div style="height: 100%; width: 100%" v-loading="loadS">
<div id="mains1"></div> <div id="mains1"></div>
</div> </div>
</template> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import { quyuPlan } from "@/api/yingji/keyEnterprise.js";
export default { export default {
data() { data() {
return { return {
load1: true,
arr1: [], arr1: [],
arr2:[] arr2: [],
}; };
}, },
mounted() { props: {
this.$nextTick(() => { loadS: {
// this.getData(); type: Boolean,
this.init(); default: true,
}); },
}, },
mounted() {},
methods: { methods: {
getData() { getData(e) {
this.load1 = true; this.arr1 = [];
quyuPlan().then((res) => { this.arr2 = [];
res.data.forEach((value, index) => { e.forEach((value) => {
this.arr1.push(value.deptName); this.arr1.push(value.institutionName);
this.arr2.push(value.count) this.arr2.push(value.plannedEnterpriseCount);
}); });
this.init(); this.init();
this.load1 = false;
});
}, },
init() { init() {
var chartDom = document.getElementById("mains1"); var chartDom = document.getElementById("mains1");
@ -69,20 +66,20 @@ export default {
xAxis: [ xAxis: [
{ {
type: "category", type: "category",
// data: this.arr1, data: this.arr1,
data: [ // data: [
"苏州", // "",
"张家港市", // "",
"常熟市", // "",
"太仓市", // "",
"昆山市", // "",
"吴江区", // "",
"吴中区", // "",
"姑苏区", // "",
"相城区", // "",
"工业园区", // "",
"高新区", // "",
], // ],
axisTick: { axisTick: {
show: false, show: false,
}, },
@ -137,8 +134,8 @@ export default {
]), ]),
}, },
z: 100, z: 100,
data: [700, 400, 600, 300, 580, 250, 490, 200, 390, 460, 90], // data: [700, 400, 600, 300, 580, 250, 490, 200, 390, 460, 90],
// data: this.arr2, data: this.arr2,
// //
emphasis: { emphasis: {
label: { label: {

@ -1,47 +1,49 @@
<template > <template >
<div style="height: 100%; height: 100%" > <div style="height: 100%; height: 100%" v-loading="loadS">
<div id="cakeBox"></div> <div id="cakeBox"></div>
</div> </div>
</template> </template>
<script> <script>
import { workStatistics } from "@/api/yingji/keyEnterprise.js"; import { workStatistics } from "@/api/yingji/keyEnterprise.js";
import * as echarts from "echarts"; import * as echarts from "echarts";
export default { export default {
data() { data() {
return { return {
load1: true,
arr1: [], arr1: [],
beforeParams: { arr2: [],
pageSize: 10,
pageNum: 1,
},
// //
numTotal: 0, numTotal: 0,
}; };
}, },
mounted() { mounted() {
this.$nextTick(() => {
// this.getData(); },
this.initChart(); props: {
}); loadS: {
type: Boolean,
default: true,
},
}, },
methods: { methods: {
getData() { getData(e) {
this.load1 = true; this.arr1= []
workStatistics(this.beforeParams).then((res) => { this.arr2= []
console.log(res); e.forEach((value1) => {
res.data.list.forEach((value1) => { if (value1.institutionName != "苏州") {
this.arr1.push({ this.arr1.push({
value: value1.keyCompleted + value1.nonKeyCompleted, value: value1.checkEnterpriseCount,
name: value1.deptName, name: value1.institutionName,
pt: value1.pt,
}); });
this.numTotal += value1.keyCompleted + value1.nonKeyCompleted; } else {
console.log(this.arr1); this.arr2.push({
value: value1.plannedEnterpriseCount,
name: value1.institutionName,
pt: value1.pt,
}); });
this.initChart(); }
this.load1 = false;
}); });
this.initChart();
}, },
initChart() { initChart() {
var chartDom = document.getElementById("cakeBox"); var chartDom = document.getElementById("cakeBox");
@ -97,29 +99,24 @@ export default {
}, },
}, },
formatter: function (name) { formatter: function (name) {
console.log(option.legend);
let arrA = 0;
option.legend.data.forEach((value, index) => {
arrA += value.value;
});
const item = option.legend.data.find((item) => item.name === name); const item = option.legend.data.find((item) => item.name === name);
// return `{a|${name}}{b|${( item.value / arrA * 100)}%}`; // return `{a|${name}}{b|${( item.value / arrA * 100)}%}`;
return `{a|${name}}{b|15%}`; return `{a|${name}}{b|${item.pt * 100}%}`;
}, },
//waiyuan, //waiyuan,
data: [ // data: [
{ value: 15, name: "张家港市" }, // { value: 15, name: "" },
{ value: 10, name: "吴中区" }, // { value: 10, name: "" },
{ value: 8, name: "常熟市" }, // { value: 8, name: "" },
{ value: 10, name: "姑苏区" }, // { value: 10, name: "" },
{ value: 18, name: "太仓市" }, // { value: 18, name: "" },
{ value: 6, name: "相城区" }, // { value: 6, name: "" },
{ value: 10, name: "昆山市" }, // { value: 10, name: "" },
{ value: 4, name: "工业园区" }, // { value: 4, name: "" },
{ value: 10, name: "吴江区" }, // { value: 10, name: "" },
{ value: 5, name: "高新区" }, // { value: 5, name: "" },
], // ],
// data: this.arr1, data: this.arr1,
}, },
series: [ series: [
{ {
@ -144,7 +141,9 @@ export default {
position: "center", position: "center",
formatter: function (params) { formatter: function (params) {
console.log(params); console.log(params);
return `{a|${params.data.pt}%}\n{b|${params.data.name}}`; return `{a|${params.data.pt * 100}%}\n{b|${
params.data.name
}完成率}`;
}, },
rich: { rich: {
a: { a: {
@ -163,7 +162,8 @@ export default {
labelLine: { labelLine: {
show: false, show: false,
}, },
data: [{ value: 1, name: "苏州完成率", pt: 100 }], // data: [{ value: 1, name: "", pt: 100 }],
data: this.arr2,
}, },
{ {
// //
@ -185,19 +185,19 @@ export default {
labelLine: { labelLine: {
show: false, show: false,
}, },
data: [ // data: [
{ value: 15, name: "张家港市" }, // { value: 15, name: "" },
{ value: 10, name: "吴中区" }, // { value: 10, name: "" },
{ value: 8, name: "常熟市" }, // { value: 8, name: "" },
{ value: 10, name: "姑苏区" }, // { value: 10, name: "" },
{ value: 18, name: "太仓市" }, // { value: 18, name: "" },
{ value: 6, name: "相城区" }, // { value: 6, name: "" },
{ value: 10, name: "昆山市" }, // { value: 10, name: "" },
{ value: 4, name: "工业园区" }, // { value: 4, name: "" },
{ value: 10, name: "吴江区" }, // { value: 10, name: "" },
{ value: 5, name: "高新区" }, // { value: 5, name: "" },
], // ],
// data: this.arr1, data: this.arr1,
}, },
], ],
}; };

@ -110,7 +110,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
@ -193,16 +197,16 @@ export default {
label: "统一社会信用代码", label: "统一社会信用代码",
value: "", value: "",
}, },
{ // {
eng: "CREATETIME", // eng: "CREATETIME",
label: "创建时间", // label: "",
value: "", // value: "",
}, // },
{ // {
eng: "UPDATETIME", // eng: "UPDATETIME",
label: "修改时间", // label: "",
value: "", // value: "",
}, // },
{ {
eng: "enterpriseUnitVersion", eng: "enterpriseUnitVersion",
label: "钢铁三年专项时,企业设施的版本号", label: "钢铁三年专项时,企业设施的版本号",
@ -249,11 +253,11 @@ export default {
label: "执法部门代码", label: "执法部门代码",
value: "", value: "",
}, },
{ // {
eng: "executorId", // eng: "executorId",
label: "检查人员id", // label: "id",
value: "", // value: "",
}, // },
{ {
eng: "expertsInFlag", eng: "expertsInFlag",
label: "是否专家参与", label: "是否专家参与",
@ -264,11 +268,11 @@ export default {
label: "专家姓名", label: "专家姓名",
value: "", value: "",
}, },
{ // {
eng: "planExamineId", // eng: "planExamineId",
label: "检查方案id", // label: "id",
value: "", // value: "",
}, // },
{ {
eng: "sourceData", eng: "sourceData",
label: "数据来源", label: "数据来源",
@ -304,26 +308,31 @@ export default {
created() { created() {
this.getList(); this.getList();
}, },
dicts: ["inspection_method", "check_source", "document_type"],
methods: { methods: {
filterTable(a, b) {
if (!b) return;
return this.selectDictLabel(a, b);
},
// //
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;
}, },
reset() { reset() {
this.form = { this.form = {
@ -358,6 +367,35 @@ export default {
} }
}); });
} }
this.listDes.forEach((value1, index1) => {
//
if (value1.eng == "examineType") {
this.listDes[index1].value = this.filterTable(
this.dict.type.inspection_method,
value1.value
);
}
//
if (value1.eng == "examineSource") {
this.listDes[index1].value = this.filterTable(
this.dict.type.check_source,
value1.value
);
}
//
if (value1.eng == "typeCode") {
this.listDes[index1].value = this.filterTable(
this.dict.type.document_type,
value1.value
);
}
if (value1.value == "0") {
this.listDes[index1].value = '否'
}
if (value1.value == "1") {
this.listDes[index1].value = '是'
}
});
this.detailLoad = false; this.detailLoad = false;
}); });
}, },

@ -26,7 +26,7 @@
<div class="select-input"> <div class="select-input">
<div class="select-span" style="width: 85px">企业名称:</div> <div class="select-span" style="width: 85px">企业名称:</div>
<el-input <el-input
v-model="queryParms.entCode" v-model="queryParms.enterpriseName"
size="small" size="small"
placeholder="请输入企业名称" placeholder="请输入企业名称"
></el-input> ></el-input>
@ -38,7 +38,7 @@
placeholder="请输入统一社会信用代码" placeholder="请输入统一社会信用代码"
></el-input> ></el-input>
</div> </div>
<div style="display: flex;"> <div style="display: flex">
<div class="export" @click="searchList"> <div class="export" @click="searchList">
<span>搜索</span> <span>搜索</span>
</div> </div>
@ -326,9 +326,8 @@ export default {
dialogVisible: false, dialogVisible: false,
queryParms: { queryParms: {
year: "", year: "",
uscCode: "", entCode: "",
// district: "", enterpriseName: "",
//
}, },
queryParmsdistrict: [], queryParmsdistrict: [],
district: [], district: [],
@ -352,11 +351,8 @@ export default {
entCode: "", entCode: "",
// //
remark: "", remark: "",
//
type: "",
// //
year: "", year: "",
district: "",
}, },
addShow: false, addShow: false,
// //
@ -447,7 +443,7 @@ export default {
this.form = { this.form = {
// //
enterpriseName: "", enterpriseName: "",
// //
entCode: "", entCode: "",
// //
remark: "", remark: "",
@ -464,9 +460,11 @@ export default {
pageNum: 1, pageNum: 1,
}; };
this.$refs.mypagination.defaultPages(); this.$refs.mypagination.defaultPages();
this.queryParms.year = ""; this.queryParms = {
// this.district = []; year: "",
this.queryParms.uscCode = ""; entCode: "",
enterpriseName: "",
};
this.getList(); this.getList();
}, },
// //

@ -1,40 +1,16 @@
<template> <template>
<div class="mainBox"> <div class="mainBox">
<div class="select-nav"> <div class="select-nav">
<div class="left-nav" v-if="activeIndex == 1"> <div class="left-nav">
<div class="navText">年份:</div> <div class="navText">年份:</div>
<el-select v-model="ruleForm.date" placeholder="请选择年份" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="left-nav" v-if="activeIndex == 0">
<div class="inputs">
<div class="navText">年份:</div>
<div>
<el-date-picker <el-date-picker
v-model="form.plannedYear" v-model="ruleForm.plannedYear"
size="mini"
type="month" type="month"
format="yyyy-MM" size="mini"
:clearable="false"
value-format="yyyy-MM" value-format="yyyy-MM"
placeholder="请选择年份" placeholder="请选择年份"
> >
</el-date-picker> </el-date-picker>
</div>
</div>
<!-- <div class="inputs">
<div class="navText" style="margin-left: 10px">区划:</div>
<div>
<executive @quhua="quhua"></executive>
</div>
</div> -->
<div class="export" @click="searchList"> <div class="export" @click="searchList">
<span>搜索</span> <span>搜索</span>
</div> </div>
@ -61,16 +37,16 @@
<!-- 各区域执法计划 --> <!-- 各区域执法计划 -->
<div class="bodyBox boxAllStyle" v-if="activeIndex == 1"> <div class="bodyBox boxAllStyle" v-if="activeIndex == 1">
<div id="execution"> <div id="execution">
<executionPlan></executionPlan> <executionPlan ref="executionPlan" :loadS="loadS"></executionPlan>
</div> </div>
</div> </div>
<div class="bottomBox" v-if="activeIndex == 1"> <div class="bottomBox" v-if="activeIndex == 1">
<div class="boxAllStyle"> <div class="boxAllStyle">
<completePlan></completePlan> <completePlan ref="completePlan" :loadS="loadS"></completePlan>
</div> </div>
<div style="width: 15px"></div> <div style="width: 15px"></div>
<div class="boxAllStyle"> <div class="boxAllStyle">
<finishRate></finishRate> <finishRate ref="finishRate" :loadS="loadS"></finishRate>
</div> </div>
</div> </div>
<div class="bgContent" v-if="activeIndex == 0"> <div class="bgContent" v-if="activeIndex == 0">
@ -140,30 +116,19 @@
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column <el-table-column
prop="totalPlanCount" prop="plannedEnterpriseCount"
label="合计计划数" label="执法计划"
header-align="center" header-align="center"
> >
<template slot-scope="scope">
{{ scope.row.enterpriseCount + scope.row.planneKeyEnterpriseCount }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="合计完成数" header-align="center"> <el-table-column
<template slot-scope="scope"> label="完成执法"
{{ scope.row.remainingKeyEnterpriseCount + scope.row.plannedEnterpriseCount }} prop="checkEnterpriseCount"
</template> header-align="center"
>
</el-table-column> </el-table-column>
<el-table-column label="合计完成率" header-align="center"> <el-table-column label="完成率" prop="pt" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope"> {{ scope.row.pt * 100 }}% </template>
<!-- {{
scope.row.percentageCompleted +
scope.row.percentageNonCompleted
}}% -->
{{
scope.row.percentageCompleted +
scope.row.percentageNonCompleted || 0
}}%
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
@ -181,37 +146,20 @@ import completePlan from "./echarts/completePlan";
import finishRate from "./echarts/finishRate"; import finishRate from "./echarts/finishRate";
import executionPlan from "./echarts/executionPlan"; import executionPlan from "./echarts/executionPlan";
import myPagination from "@/views/components/myPagination/index"; import myPagination from "@/views/components/myPagination/index";
import { workStatistics, xzTree,planeEnTree } from "@/api/yingji/keyEnterprise.js"; // import {
// workStatistics,
// xzTree,
// planeEnTree,
// } from "@/api/yingji/keyEnterprise.js";
import { indexRegionalism } from "@/api/yingji/home.js";
import executive from "./echarts/executive"; import executive from "./echarts/executive";
export default { export default {
data() { data() {
return { return {
ruleForm: { ruleForm: {
date: "", plannedYear: "",
},
options: [
{
value: "选项5",
label: "2023",
},
{
value: "选项4",
label: "2022",
},
{
value: "选项3",
label: "2021",
},
{
value: "选项2",
label: "2020",
},
{
value: "选项1",
label: "2019",
}, },
],
options1: [ options1: [
{ {
name: "表格", name: "表格",
@ -225,31 +173,12 @@ export default {
}, },
], ],
activeIndex: 0, activeIndex: 0,
//======
load1: false, load1: false,
total: 0, total: 0,
tableData: [ tableData: [],
// { beforeParams: {},
// deptName: "", //
// keyPlan: 10, loadS: false,
// keyCompleted: 5,
// percentageCompleted: 50,
// nonKeyPlan: 10,
// nonKeyCompleted: 5,
// percentageNonCompleted: 50,
// totalPlanCount: 20,
// },
],
//===
beforeParams: {
pageSize: 10,
pageNum: 1,
},
form: {
deptName: "",
plannedYear: "",
},
deptName: '',
}; };
}, },
components: { components: {
@ -259,39 +188,42 @@ export default {
myPagination, myPagination,
executive, executive,
}, },
created() { created() {
this.getHomeList(); this.getHomeList();
}, },
mounted() {}, mounted() {},
methods: { methods: {
quhua(e) {
console.log(e);
this.deptName = e;
},
searchList() { searchList() {
if (this.deptName) { this.beforeParams = { ...this.beforeParams, ...this.ruleForm };
this.form.deptName = this.deptName; this.handoff();
}
console.log(this.form);
this.beforeParams = { ...this.beforeParams, ...this.form };
this.getHomeList();
}, },
getHomeList() { getHomeList() {
this.load1 = true; this.load1 = true;
planeEnTree(this.beforeParams).then((res) => { indexRegionalism(this.beforeParams).then((res) => {
this.tableData = res.rows;
this.load1 = false; this.load1 = false;
this.tableData = res.data;
// this.total = res.data.total;
}); });
}, },
pagesChange(e) { handoff() {
this.beforeParams.pageNum = e.pageNum; if (this.activeIndex == 0) {
this.beforeParams.pageSize = e.pageSize;
this.getHomeList(); this.getHomeList();
} else {
this.loadS = true;
indexRegionalism(this.beforeParams).then((res) => {
this.$refs.executionPlan.getData(res.rows);
this.$refs.completePlan.getData(res.rows);
this.$refs.finishRate.getData(res.rows);
this.loadS = false;
});
}
}, },
active(e) { active(e) {
this.activeIndex = e; this.activeIndex = e;
this.ruleForm = {
plannedYear: "",
};
this.beforeParams = {};
this.handoff();
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) { if (rowIndex % 2 !== 0) {

Loading…
Cancel
Save