lijinlong^2
杜函宇 1 year ago
parent 66f68dea88
commit dd97e007e8

@ -79,10 +79,25 @@ export function listDist(query) {
}
// 行政区划树结构
export function xzTree(id) {
export function xzTree() {
return request({
url: '/pharmaceuticals/administrative/tree',
method: 'get',
})
}
//执法计划工作情况统计
export function workStatistics(data) {
return request({
url: '/pharmaceuticals/bPlanEnterprise/getZhifaCount',
method: 'get',
params:data
})
}
//各区域执法计划
export function quyuPlan(data) {
return request({
url: '/pharmaceuticals/bPlanEnterprise/getplan',
method: 'get',
params:data
})
}

@ -1,16 +1,41 @@
<template >
<div id="main1"></div>
<div style="height: 100%; width: 100%" v-loading="load1">
<div id="main1"></div>
</div>
</template>
<script>
import * as echarts from "echarts";
import { workStatistics } from "@/api/yingji/keyEnterprise.js";
export default {
data() {
return {};
return {
load1: true,
arr1: [],
arr2: [],
beforeParams: {
pageSize: 10,
pageNum: 1,
},
};
},
mounted() {
this.initChart();
this.$nextTick(() => {
this.getData();
});
},
methods: {
getData() {
this.load1 = true;
workStatistics(this.beforeParams).then((res) => {
res.data.list.forEach((value, index) => {
this.arr1.push(value.deptName);
this.arr2.push(value.keyCompleted + value.nonKeyCompleted);
});
this.initChart();
this.load1 = false;
});
},
initChart() {
var chartDom = document.getElementById("main1");
var myChart = echarts.init(chartDom);
@ -64,19 +89,20 @@ export default {
yAxis: [
{
type: "category",
data: [
"高新区",
"工业园区",
"相城区",
"姑苏区",
"吴中区",
"吴江区",
"昆山市",
"太仓市",
"常熟市",
"张家港市",
"苏州",
],
// data: [
// "",
// "",
// "",
// "",
// "",
// "",
// "",
// "",
// "",
// "",
// "",
// ],
data: this.arr1,
axisLabel: {
//
formatter: function (value) {
@ -88,10 +114,10 @@ export default {
return value;
}
},
fontSize: '13px',
fontFamily: 'Alibaba PuHuiTi',
fontSize: "13px",
fontFamily: "Alibaba PuHuiTi",
fontWeight: 500,
color: '#525966',
color: "#525966",
},
axisTick: {
show: false,
@ -102,7 +128,8 @@ export default {
},
{
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,
axisLabel: {
formatter: function (value, index) {
return `{a|${value}}{b|家}`;
@ -111,7 +138,8 @@ export default {
a: {
color: "#0084FF",
align: "right",
width: 32,
// width: 32,
// width: 20,
},
b: {
color: "#525966",
@ -135,8 +163,8 @@ export default {
label: {
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,
barWidth: 12,
itemStyle: {
color: {
@ -160,14 +188,17 @@ export default {
emphasis: {
disabled: true,
},
z:102,
z: 102,
},
{
// name: '',
type: "bar",
barWidth: 12,
barGap: "-100%",
data: [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000,1000],
// data: [
// 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000,
// ],
data: [],
itemStyle: {
normal: {
color: "#EDF0F2",

@ -1,16 +1,36 @@
<template>
<div id="mains1"></div>
<div v-loading="load1" style="height: 100%; width: 100%">
<div id="mains1"></div>
</div>
</template>
<script>
import * as echarts from "echarts";
import { quyuPlan } from "@/api/yingji/keyEnterprise.js";
export default {
data() {
return {};
return {
load1: true,
arr1: [],
arr2:[]
};
},
mounted() {
this.init();
this.$nextTick(() => {
this.getData();
});
},
methods: {
getData() {
this.load1 = true;
quyuPlan().then((res) => {
res.data.forEach((value, index) => {
this.arr1.push(value.deptName);
this.arr2.push(value.count)
});
this.init();
this.load1 = false;
});
},
init() {
var chartDom = document.getElementById("mains1");
var myChart = echarts.init(chartDom);
@ -48,19 +68,20 @@ export default {
xAxis: [
{
type: "category",
data: [
"苏州",
"张家港市",
"常熟市",
"太仓市",
"昆山市",
"吴江区",
"吴中区",
"姑苏区",
"相城区",
"工业园区",
"高新区",
],
data: this.arr1,
// data: [
// "",
// "",
// "",
// "",
// "",
// "",
// "",
// "",
// "",
// "",
// "",
// ],
axisTick: {
show: false,
},
@ -115,7 +136,8 @@ export default {
]),
},
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,
//
emphasis: {
label: {

@ -1,16 +1,43 @@
<template >
<div id="cakeBox"></div>
<div style="height: 100%; height: 100%" v-loading="load1">
<div id="cakeBox"></div>
</div>
</template>
<script>
import { workStatistics } from "@/api/yingji/keyEnterprise.js";
import * as echarts from "echarts";
export default {
data() {
return {};
return {
load1: true,
arr1: [],
beforeParams: {
pageSize: 10,
pageNum: 1,
},
};
},
mounted() {
this.initChart();
this.$nextTick(() => {
this.getData();
});
},
methods: {
getData() {
this.load1 = true;
workStatistics(this.beforeParams).then((res) => {
res.data.list.forEach((value1) => {
this.arr1.push({
value: value1.percentageCompleted + value1.percentageNonCompleted,
name: value1.deptName,
});
});
console.log(this.arr1);
this.initChart();
this.load1 = false;
});
},
initChart() {
var chartDom = document.getElementById("cakeBox");
var myChart = echarts.init(chartDom);
@ -65,22 +92,22 @@ export default {
fontWeight: "bold",
padding: [0, 0, 0, 10],
},
},
},
//waiyuan,
data: [
{ value: 15, name: "张家港市" },
{ value: 10, name: "吴中区" },
{ value: 8, name: "常熟市" },
{ value: 10, name: "姑苏区" },
{ value: 18, name: "太仓市" },
{ value: 6, name: "相城区" },
{ value: 10, name: "昆山市" },
{ value: 4, name: "工业园区" },
{ value: 10, name: "吴江区" },
{ value: 5, name: "高新区" },
],
// data: [
// { value: 15, name: "" },
// { value: 10, name: "" },
// { value: 8, name: "" },
// { value: 10, name: "" },
// { value: 18, name: "" },
// { value: 6, name: "" },
// { value: 10, name: "" },
// { value: 4, name: "" },
// { value: 10, name: "" },
// { value: 5, name: "" },
// ],
data:this.arr1
},
series: [

@ -14,26 +14,35 @@
</el-select>
</div>
<div class="left-nav" v-if="activeIndex == 0">
<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 class="navText" style="margin-left: 10px">区划:</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 class="inputs">
<div class="navText">年份:</div>
<div>
<el-date-picker
v-model="form.plannedYear"
size="mini"
type="month"
format="yyyy-MM"
:clearable="false"
value-format="yyyy-MM"
placeholder="请选择年份"
>
</el-date-picker>
</div>
</div>
<div class="inputs">
<div class="navText" style="margin-left: 10px">区划:</div>
<div>
<el-input
v-model="form.deptName"
placeholder="请输入区划"
size="mini"
>
</el-input>
</div>
</div>
<div class="export" @click="searchList">
<span>搜索</span>
</div>
</div>
<div class="rightBigNav">
<div class="right-nav">
@ -80,73 +89,76 @@
:row-class-name="tableRowClassName"
>
<el-table-column
prop="entprName"
prop="deptName"
label="行政区划"
header-align="center"
>
<template slot-scope="scope">
{{ scope.row.deptName }}
</template>
</el-table-column>
<el-table-column
prop="majorHazardLevel"
label="区县"
header-align="center"
>
<el-table-column prop="deptName" label="区县" header-align="center">
<template slot-scope="scope">
{{ scope.row.deptName.slice(scope.row.deptName.length - 1) }}
</template>
</el-table-column>
<el-table-column
prop="indusTypeClass"
prop="keyPlan"
label="省重点计划数"
header-align="center"
>
</el-table-column>
<el-table-column
prop="enterColorChart"
prop="keyCompleted"
label="省重点完成数"
header-align="center"
>
</el-table-column>
<el-table-column
prop="enterColorChart"
prop="percentageCompleted"
label="省重点完成率"
header-align="center"
>
<template slot-scope="scope">
{{ scope.row.percentageCompleted }}%
</template>
</el-table-column>
<el-table-column
prop="uscCode"
prop="nonKeyPlan"
label="非重点计划数"
header-align="center"
>
</el-table-column>
<el-table-column
prop="isPoint"
prop="nonKeyCompleted"
label="非重点完成数"
header-align="center"
>
</el-table-column>
<el-table-column
prop="isPoint"
prop="percentageNonCompleted"
label="非重点完成率"
header-align="center"
>
<template slot-scope="scope">
{{ scope.row.percentageNonCompleted }}%
</template>
</el-table-column>
<el-table-column
prop="isPoint"
prop="totalPlanCount"
label="合计计划数"
header-align="center"
>
</el-table-column>
<el-table-column
prop="isPoint"
label="合计完成数"
header-align="center"
>
<el-table-column label="合计完成数" header-align="center">
<template slot-scope="scope">
{{ scope.row.keyCompleted + scope.row.nonKeyCompleted }}
</template>
</el-table-column>
<el-table-column
prop="isPoint"
label="合计完成率"
header-align="center"
>
<el-table-column label="合计完成率" header-align="center">
<template slot-scope="scope">
{{ scope.row.percentageCompleted + scope.row.percentageNonCompleted }}%
</template>
</el-table-column>
</el-table>
</div>
@ -164,7 +176,7 @@ import completePlan from "./echarts/completePlan";
import finishRate from "./echarts/finishRate";
import executionPlan from "./echarts/executionPlan";
import myPagination from "@/views/components/myPagination/index";
import { workStatistics } from "@/api/yingji/keyEnterprise.js";
export default {
data() {
return {
@ -210,6 +222,15 @@ export default {
load1: false,
total: 0,
tableData: [],
//===
beforeParams: {
pageSize: 10,
pageNum: 1,
},
form: {
deptName: "",
plannedYear: "",
},
};
},
components: {
@ -218,9 +239,28 @@ export default {
executionPlan,
myPagination,
},
created() {
this.getHomeList();
},
mounted() {},
methods: {
pagesChange(e) {},
searchList() {
this.beforeParams = {...this.beforeParams,...this.form}
this.getHomeList()
},
getHomeList() {
this.load1 = true;
workStatistics(this.beforeParams).then((res) => {
this.load1 = false;
this.tableData = res.data.list;
this.total = res.data.total;
});
},
pagesChange(e) {
this.beforeParams.pageNum = e.pageNum
this.beforeParams.pageSize = e.pageSize
this.getHomeList()
},
active(e) {
this.activeIndex = e;
},
@ -234,6 +274,26 @@ export default {
};
</script>
<style lang="scss" scoped>
.export {
display: flex;
align-items: center;
justify-content: center;
padding: 6px 19px;
background-color: #2378ec;
margin-left: 10px;
cursor: pointer;
user-select: none;
border-radius: 2px;
span {
color: #ffffff;
font-size: 14px;
font-family: "Alibaba PuHuiTi";
font-weight: 400;
}
}
.inputs {
display: flex;
}
//===
.bgContent {
height: calc(100% - 48px);
@ -318,10 +378,12 @@ export default {
display: flex;
align-items: center;
.navText {
margin-right: 5px;
margin-right: 8px;
color: #525966;
font-family: "Alibaba PuHuiTi";
font-size: 14px;
display: flex;
align-items: center;
}
}
.rightBigNav {

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

Loading…
Cancel
Save