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

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

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

@ -1,16 +1,43 @@
<template > <template >
<div id="cakeBox"></div> <div style="height: 100%; height: 100%" v-loading="load1">
<div id="cakeBox"></div>
</div>
</template> </template>
<script> <script>
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: [],
beforeParams: {
pageSize: 10,
pageNum: 1,
},
};
}, },
mounted() { mounted() {
this.initChart(); this.$nextTick(() => {
this.getData();
});
}, },
methods: { 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() { initChart() {
var chartDom = document.getElementById("cakeBox"); var chartDom = document.getElementById("cakeBox");
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
@ -65,22 +92,22 @@ export default {
fontWeight: "bold", fontWeight: "bold",
padding: [0, 0, 0, 10], padding: [0, 0, 0, 10],
}, },
}, },
}, },
//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
}, },
series: [ series: [

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

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

Loading…
Cancel
Save