style:监管
Showing
3 changed files
with
201 additions
and
2 deletions
| 1 | /* | 1 | /* |
| 2 | * @Description: 干部查询 | 2 | * @Description: 干部查询 |
| 3 | * @Autor: | 3 | * @Autor: |
| 4 | * @LastEditTime: 2023-05-12 16:20:40 | 4 | * @LastEditTime: 2023-11-03 15:00:17 |
| 5 | */ | 5 | */ |
| 6 | /* 引入axios请求文件 */ | 6 | /* 引入axios请求文件 */ |
| 7 | import request from '@/utils/request' | 7 | import request from '@/utils/request' |
| ... | @@ -47,3 +47,16 @@ export function editSearchRecord (id) { | ... | @@ -47,3 +47,16 @@ export function editSearchRecord (id) { |
| 47 | method: 'get' | 47 | method: 'get' |
| 48 | }) | 48 | }) |
| 49 | } | 49 | } |
| 50 | |||
| 51 | /** | ||
| 52 | * @description: 财产登记情况 | ||
| 53 | * @author: renchao | ||
| 54 | */ | ||
| 55 | |||
| 56 | export function djqk (data) { | ||
| 57 | return request({ | ||
| 58 | url: urlHeader + '/djqk', | ||
| 59 | method: 'post', | ||
| 60 | data | ||
| 61 | }) | ||
| 62 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
src/views/jktj/ccdjqk/index.vue
0 → 100644
| 1 | <template> | ||
| 2 | <!-- 监控日志 --> | ||
| 3 | <div class="ccdjqk from-clues"> | ||
| 4 | <!-- 头部搜索 --> | ||
| 5 | <div class="from-clues-header"> | ||
| 6 | <el-form ref="form" :model="form" label-width="100px"> | ||
| 7 | <Breadcrumb /> | ||
| 8 | <el-row class="mb-5"> | ||
| 9 | <el-col :span="4"> | ||
| 10 | <el-form-item label="开始日期" class="d-flex"> | ||
| 11 | <el-date-picker class="width100" :clearable="false" type="date" placeholder="开始日期" | ||
| 12 | :picker-options="pickerOptionsStart" v-model="form.startDate" | ||
| 13 | value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> | ||
| 14 | </el-form-item> | ||
| 15 | </el-col> | ||
| 16 | <el-col :span="4"> | ||
| 17 | <el-form-item label="结束日期" class="d-flex"> | ||
| 18 | <el-date-picker class="width100" :clearable="false" type="date" placeholder="结束日期" | ||
| 19 | :picker-options="pickerOptionsEnd" v-model="form.endDate" value-format="yyyy-MM-dd HH:mm:ss" | ||
| 20 | @change="endDateChange"></el-date-picker> | ||
| 21 | </el-form-item> | ||
| 22 | </el-col> | ||
| 23 | <!-- 操作按钮 --> | ||
| 24 | <el-col :span="16" class="btnColRight"> | ||
| 25 | <btn nativeType="cz" @click="resetForm">重置</btn> | ||
| 26 | <btn nativeType="cx" @click="getProcessCounts">查询</btn> | ||
| 27 | </el-col> | ||
| 28 | </el-row> | ||
| 29 | </el-form> | ||
| 30 | </div> | ||
| 31 | <!-- 图表 --> | ||
| 32 | <div class="from-clues-content echarts-box" v-if="chartData.length"> | ||
| 33 | <div id="myChart" class="chart" style="height:100%;width:100%;"></div> | ||
| 34 | </div> | ||
| 35 | <div class="from-clues-content echarts-box center" v-else>暂无数据</div> | ||
| 36 | </div> | ||
| 37 | </template> | ||
| 38 | <script> | ||
| 39 | import { mapGetters } from "vuex"; | ||
| 40 | import { djqk } from "@/api/searchRecord.js"; | ||
| 41 | import { getFirstDayOfSeason, timeFormat } from "@/utils/operation"; | ||
| 42 | export default { | ||
| 43 | name: "jktj", | ||
| 44 | data () { | ||
| 45 | return { | ||
| 46 | // 开始日期限制 | ||
| 47 | pickerOptionsStart: { | ||
| 48 | disabledDate: (time) => { | ||
| 49 | if (this.form.endDate) { | ||
| 50 | return time.getTime() > new Date(this.form.endDate).getTime(); | ||
| 51 | } | ||
| 52 | }, | ||
| 53 | }, | ||
| 54 | // 结束日期限制 | ||
| 55 | pickerOptionsEnd: { | ||
| 56 | disabledDate: (time) => { | ||
| 57 | if (this.form.startDate) { | ||
| 58 | return time.getTime() < new Date(this.form.startDate).getTime(); | ||
| 59 | } | ||
| 60 | }, | ||
| 61 | }, | ||
| 62 | // 搜索表单 | ||
| 63 | form: { | ||
| 64 | startDate: getFirstDayOfSeason(), | ||
| 65 | endDate: timeFormat(new Date(), true), | ||
| 66 | }, | ||
| 67 | chartData: [] | ||
| 68 | }; | ||
| 69 | }, | ||
| 70 | mounted () { | ||
| 71 | // 财产登记情况 | ||
| 72 | this.getProcessCounts(); | ||
| 73 | }, | ||
| 74 | computed: { | ||
| 75 | ...mapGetters(["dicData"]), | ||
| 76 | }, | ||
| 77 | methods: { | ||
| 78 | endDateChange (val) { | ||
| 79 | this.form.endDate = timeFormat(new Date(val), true) | ||
| 80 | }, | ||
| 81 | async getProcessCounts () { | ||
| 82 | this.chartData = []; | ||
| 83 | let { result: res } = await djqk(this.form) | ||
| 84 | //获取图表配置项需要的数据 | ||
| 85 | this.chartData = res; | ||
| 86 | this.$nextTick(() => { | ||
| 87 | // 初始化图表 | ||
| 88 | this.chartData.length && this.echartInit(this.chartData) | ||
| 89 | }); | ||
| 90 | |||
| 91 | }, | ||
| 92 | // 重置 | ||
| 93 | resetForm () { | ||
| 94 | this.form = { | ||
| 95 | startDate: getFirstDayOfSeason(), | ||
| 96 | endDate: timeFormat(new Date(), true) | ||
| 97 | }; | ||
| 98 | this.getProcessCounts(); | ||
| 99 | }, | ||
| 100 | //图表渲染 | ||
| 101 | echartInit (chartArr) { | ||
| 102 | // 基于准备好的dom,初始化echarts实例 | ||
| 103 | let myChart = this.$echarts.init(document.getElementById("myChart")); | ||
| 104 | // 绘制图表 | ||
| 105 | myChart.setOption({ | ||
| 106 | color: ["#13E5FF"], | ||
| 107 | tooltip: { | ||
| 108 | show: true, | ||
| 109 | trigger: "axis", | ||
| 110 | textStyle: { | ||
| 111 | fontSize: 16, // 字体大小 | ||
| 112 | }, | ||
| 113 | }, | ||
| 114 | grid: { | ||
| 115 | top: 120, | ||
| 116 | bottom: 100, | ||
| 117 | }, | ||
| 118 | label: { | ||
| 119 | color: 'inherit', | ||
| 120 | }, | ||
| 121 | xAxis: [ | ||
| 122 | { | ||
| 123 | type: "category", | ||
| 124 | data: chartArr.map(item => item.name), | ||
| 125 | axisLabel: { | ||
| 126 | textStyle: { | ||
| 127 | show: true, | ||
| 128 | color: this.BASE_API.echartTextColor, | ||
| 129 | fontSize: "16" | ||
| 130 | } | ||
| 131 | } | ||
| 132 | } | ||
| 133 | ], | ||
| 134 | yAxis: [ | ||
| 135 | { | ||
| 136 | type: "value", | ||
| 137 | name: "数量/个", | ||
| 138 | nameTextStyle: { | ||
| 139 | color: this.BASE_API.echartTextColor, | ||
| 140 | fontSize: "16", | ||
| 141 | }, | ||
| 142 | axisLabel: { | ||
| 143 | textStyle: { | ||
| 144 | show: true, | ||
| 145 | color: this.BASE_API.echartTextColor, | ||
| 146 | fontSize: "16", | ||
| 147 | }, | ||
| 148 | }, | ||
| 149 | }, | ||
| 150 | ], | ||
| 151 | series: [ | ||
| 152 | { | ||
| 153 | type: "bar", | ||
| 154 | //显示数值 | ||
| 155 | itemStyle: { | ||
| 156 | normal: { | ||
| 157 | label: { | ||
| 158 | show: true, //开启显示 | ||
| 159 | position: "top", //在上方显示 | ||
| 160 | }, | ||
| 161 | }, | ||
| 162 | }, | ||
| 163 | barMaxWidth: '60', | ||
| 164 | data: chartArr.map(item => item.count), | ||
| 165 | }, | ||
| 166 | ], | ||
| 167 | }); | ||
| 168 | }, | ||
| 169 | }, | ||
| 170 | }; | ||
| 171 | </script> | ||
| 172 | <style scoped lang="scss"> | ||
| 173 | .ccdjqk { | ||
| 174 | flex-direction: column; | ||
| 175 | |||
| 176 | .rows { | ||
| 177 | margin-left: 100px; | ||
| 178 | } | ||
| 179 | |||
| 180 | .center { | ||
| 181 | line-height: 50vh; | ||
| 182 | text-align: center; | ||
| 183 | color: #b6b5b5; | ||
| 184 | } | ||
| 185 | } | ||
| 186 | </style> |
-
Please register or sign in to post a comment