| | |
| | | |
| | | |
| | | |
| | | // ------------------------------------------------ |
| | | // 会议统计 |
| | | // 查询所有会议 |
| | | export function listMeeting3(query) { |
| | | return request({ |
| | | url: '/zMeetingStatistic/all', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // 图形统计信息 |
| | | export function listGraph(query) { |
| | | return request({ |
| | | url: '/zMeetingStatistic/one', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | height: 35px; |
| | | border-radius: 16px 16px 16px 16px; |
| | | opacity: 0.5;" |
| | | value-format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | |
| | | height: 35px; |
| | | border-radius: 16px 16px 16px 16px; |
| | | opacity: 0.5;" |
| | | value-format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | |
| | | |
| | | <hr /> |
| | | |
| | | <el-table :data="tableData" border :header-cell-style="{ background: 'pink', fontSize: '13px', color: 'black' }" |
| | | <el-table :data="meetingList" border :header-cell-style="{ background: 'pink', fontSize: '13px', color: 'black' }" |
| | | :row-class-name="tableRowClassName" :row-key="getRowId"> |
| | | <el-table-column label="家庭号" prop="familyId" sortable align="center"> |
| | | <template slot-scope="scope">{{ scope.row.familyId |
| | |
| | | </el-table-column> |
| | | |
| | | </el-table> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | style="background: #FEF7FC;" |
| | | /> |
| | | |
| | | <!-- 图表统计 --> |
| | | <el-dialog :title="title2" :visible.sync="open2" width="1500px" @open="open1()" append-to-body> |
| | | <el-dialog :title="title2" :visible.sync="open2" width="1500px" @open="openGraph()" append-to-body> |
| | | <!-- class="p1" --> |
| | | <div class="p1" id="main1"> |
| | | <!-- <h1 style="font-size:21px">每月会议次数统计</h1> --> |
| | |
| | | |
| | | <script> |
| | | import * as echarts from 'echarts'; |
| | | import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"; |
| | | import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; |
| | | |
| | | |
| | | import { Notification, MessageBox, Message, Loading } from 'element-ui' |
| | | |
| | | //在system/note/index.js中导入接口函数 --接好了 |
| | | import {listMeeting3,listGraph} from "@/api/meeting/index"; |
| | | export default { |
| | | created() {}, |
| | | created() { |
| | | this.getList(); |
| | | this.graphData(); |
| | | }, |
| | | data() { |
| | | return { |
| | | // 显示搜索条件 |
| | |
| | | open: false, |
| | | open2: false, |
| | | title: "", |
| | | tableData: [{ |
| | | id: 1, |
| | | familyId: '1', |
| | | title: '1', |
| | | name: 'asasd', |
| | | conferenceRoom: 'asdadsdasd', |
| | | status: '结案' |
| | | }, |
| | | { |
| | | id: 2, |
| | | familyId: '2', |
| | | title: '2', |
| | | name: 'qweqwqwe', |
| | | conferenceRoom: 'qweqweqwe', |
| | | status: '未结案' |
| | | |
| | | } |
| | | ], |
| | | meetingList: [], |
| | | dataList:[], |
| | | graphID: [], |
| | | graphDate: [], |
| | | formDat:{ |
| | | id: undefined, |
| | | happenTime: undefined, |
| | | endTime: undefined, |
| | | meetingTitle: undefined, |
| | | conferenceRoom: undefined, |
| | | ratifyPerson: undefined, |
| | | applyPerson: undefined, |
| | | url: "", |
| | | status: undefined, |
| | | familyId: undefined |
| | | "title":undefined, |
| | | "familyId":undefined, |
| | | "conferenceRoom":undefined, |
| | | "applyPerson":undefined, |
| | | "ratifyPerson":undefined, |
| | | "status":undefined, |
| | | "useTime":undefined |
| | | }, |
| | | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | conferenceRoom:undefined, |
| | | applyOrganization:undefined, |
| | | applyPerson:undefined, |
| | | happenTime:undefined |
| | | |
| | | }, |
| | | dateRange: [], |
| | | // 表单校验 |
| | | rules: { |
| | | name: [{ |
| | | required: true, |
| | | message: '请输入设备名称', |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | // rules: { |
| | | // name: [{ |
| | | // required: true, |
| | | // message: '请输入设备名称', |
| | | // trigger: 'blur' |
| | | // }], |
| | | // }, |
| | | typeOptions: [ |
| | | { |
| | | value: '1', |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | open1(){ |
| | | graphData(){ |
| | | this.loading = true; |
| | | listGraph().then(response => { |
| | | this.dataList = response.data |
| | | // console.log(this.graphList,'11111111111') |
| | | let a = {} |
| | | this.dataList.forEach(element=>{ |
| | | if(a[element['familyId']]){ |
| | | a[element['familyId']] += 1 |
| | | }else{ |
| | | a[element['familyId']] = 1 |
| | | } |
| | | }) |
| | | for(let i in a){ |
| | | this.graphID.push({'name': i , 'value': a[i]}) |
| | | } |
| | | // console.log(this.graphID,'graphIDgraphIDgraphID') |
| | | |
| | | |
| | | this.loading = false; |
| | | } |
| | | ); |
| | | }, |
| | | getList() { |
| | | this.loading = true; |
| | | // console.log(this.queryParams) |
| | | // listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0] |
| | | this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1] |
| | | listMeeting3(this.queryParams).then(response => { |
| | | // alert(123) |
| | | // console.log(response.data.data,'22222222222') |
| | | this.meetingList = response.data.data; |
| | | |
| | | this.total = response.data.total; |
| | | this.loading = false; |
| | | } |
| | | |
| | | ); |
| | | }, |
| | | |
| | | openGraph(){ |
| | | this.$nextTick(() => { |
| | | // 执行echarts方法 |
| | | this.initEcharts() |
| | | }) |
| | | }, |
| | | initEcharts() { |
| | | var echarts = require('echarts'); |
| | | |
| | | const myChart1 = this.$echarts.init(document.getElementById('main1')); |
| | | const myChart1 = echarts.init(document.getElementById('main1')) |
| | | const option1 = { |
| | | title: { |
| | | text: 'ECharts 入门示例' |
| | | text: '每月会议次数统计', |
| | | left:'center' |
| | | }, |
| | | tooltip: {}, |
| | | xAxis: { |
| | | data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子'] |
| | | }, |
| | | yAxis: {}, |
| | | legend:{}, |
| | | series: [{ |
| | | name: '销量', |
| | | type: 'bar', |
| | | data: [5, 20, 36, 10, 10, 20] |
| | | }] |
| | | }; |
| | | myChart1.setOption(option1) |
| | | |
| | | const myChart2 = this.$echarts.init(document.getElementById('main2')); |
| | | const myChart2 = echarts.init(document.getElementById('main2')) |
| | | const option2 = { |
| | | title: { |
| | | text: 'ECharts 入门示例' |
| | | text: '会议家庭占比统计', |
| | | left:'center', |
| | | textStyle:{ |
| | | fontSize:20 |
| | | } |
| | | }, |
| | | tooltip: {}, |
| | | xAxis: { |
| | | data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子'] |
| | | legend:{ |
| | | orient: 'vertical', |
| | | left: 'left', |
| | | textStyle:{ |
| | | fontSize:15 |
| | | } |
| | | }, |
| | | yAxis: {}, |
| | | |
| | | series: [{ |
| | | name: '销量', |
| | | type: 'bar', |
| | | data: [5, 20, 36, 10, 10, 20] |
| | | name: '家庭号', |
| | | type: 'pie', |
| | | data: this.graphID, |
| | | label: { |
| | | show: true, // 是否显示标签 |
| | | position: 'top', // 标签位置,可选值为:top、bottom、center、inside(柱状图内部)、outside(柱状图外部) |
| | | textStyle: { |
| | | color: '#333', // 标签字体颜色 |
| | | fontSize: 25, // 标签字体大小 |
| | | fontWeight: 'bold', // 标签字体加粗 |
| | | fontStyle: 'italic', // 标签字体斜体 |
| | | fontFamily: 'Arial' // 标签字体 |
| | | } |
| | | }, |
| | | }] |
| | | }; |
| | | |
| | | myChart1.setOption(option1) |
| | | myChart2.setOption(option2) |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | |
| | | // this.reset(); |
| | | }, |
| | | submitDataScope() { |
| | | console.log(666) |
| | | // console.log(666) |
| | | }, |
| | | |
| | | tableRowClassName({ |
| | |
| | | width: 700px; |
| | | height: 700px; |
| | | display: inline-block; |
| | | /* background-color: aqua; */ |
| | | margin-right: 30px; |
| | | /* background-color: aqua; */ |
| | | } |
| | | </style> |