Merge remote-tracking branch 'origin/master'

This commit is contained in:
zer0Black
2021-03-17 10:23:22 +08:00
5 changed files with 238 additions and 219 deletions
+20 -19
View File
@@ -10,40 +10,41 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@jeecg/antd-online-mini": "2.4.22-beta",
"ant-design-vue": "^1.7.2",
"@antv/data-set": "^0.11.4",
"viser-vue": "^2.4.8",
"@jeecg/antd-online-mini": "2.4.22-beta",
"@tinymce/tinymce-vue": "^2.1.0",
"@toast-ui/editor": "^2.1.2",
"ant-design-vue": "^1.7.2",
"area-data": "^5.0.6",
"axios": "^0.18.0",
"clipboard": "^2.0.4",
"codemirror": "^5.46.0",
"dayjs": "^1.8.0",
"dom-align": "1.12.0",
"echarts": "^5.0.2",
"enquire.js": "^2.1.6",
"js-cookie": "^2.2.0",
"lodash.get": "^4.4.2",
"lodash.pick": "^4.4.0",
"md5": "^2.2.1",
"nprogress": "^0.2.0",
"tinymce": "^5.3.2",
"viser-vue": "^2.4.8",
"vue": "^2.6.10",
"vue-area-linkage": "^5.1.0",
"vue-cropper": "^0.5.4",
"vue-i18n": "^8.7.0",
"vue-loader": "^15.7.0",
"vue-ls": "^3.2.0",
"vue-router": "^3.0.1",
"vuex": "^3.1.0",
"vue-print-nb-jeecg": "^1.0.9",
"clipboard": "^2.0.4",
"vue-photo-preview": "^1.1.3",
"vue-print-nb-jeecg": "^1.0.9",
"vue-router": "^3.0.1",
"vue-splitpane": "^1.0.4",
"vuedraggable": "^2.20.0",
"codemirror": "^5.46.0",
"@tinymce/tinymce-vue": "^2.1.0",
"tinymce": "^5.3.2",
"@toast-ui/editor": "^2.1.2",
"vue-area-linkage": "^5.1.0",
"area-data": "^5.0.6",
"dom-align": "1.12.0",
"xe-utils": "2.4.8",
"vuex": "^3.1.0",
"vxe-table": "2.9.13",
"vxe-table-plugin-antd": "1.8.10"
"vxe-table-plugin-antd": "1.8.10",
"xe-utils": "2.4.8"
},
"devDependencies": {
"@babel/polyfill": "^7.2.5",
@@ -52,13 +53,13 @@
"@vue/cli-service": "^3.3.0",
"@vue/eslint-config-standard": "^4.0.0",
"babel-eslint": "7.2.3",
"compression-webpack-plugin": "^3.1.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.1.0",
"html-webpack-plugin": "^4.2.0",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"vue-template-compiler": "^2.6.10",
"html-webpack-plugin": "^4.2.0",
"compression-webpack-plugin": "^3.1.0"
"vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
"root": true,
+15 -5
View File
@@ -6,16 +6,25 @@ import App from './App.vue'
import Storage from 'vue-ls'
import router from './router'
import store from './store/'
import { VueAxios } from "@/utils/request"
import {
VueAxios
} from "@/utils/request"
require('@/components/onlineForm/onlineForm')
require('@/components/onlineForm/OnlineForm.css')
<<<<<<< HEAD
import Antd, {
version
} from 'ant-design-vue'
=======
import Antd, { version } from 'ant-design-vue'
>>>>>>> 7b6717bf9f54a33c42756caf45c0648b88365786
console.log('ant-design-vue version:', version)
import Viser from 'viser-vue'
import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less'
import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less'
import '@/permission' // permission control
import '@/utils/filter' // base filtermybatis-plus
@@ -64,11 +73,12 @@ Vue.use(VueAreaLinkage);
SSO.init(() => {
main()
})
function main() {
new Vue({
router,
store,
mounted () {
mounted() {
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout))
@@ -79,8 +89,8 @@ function main() {
store.commit('TOGGLE_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak))
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
store.commit('SET_MULTI_PAGE',Vue.ls.get(DEFAULT_MULTI_PAGE,config.multipage))
store.commit('SET_MULTI_PAGE', Vue.ls.get(DEFAULT_MULTI_PAGE, config.multipage))
},
render: h => h(App)
}).$mount('#app')
}
}
+1
View File
@@ -22,6 +22,7 @@ router.beforeEach((to, from, next) => {
} else {
if (store.getters.permissionList.length === 0) {
store.dispatch('GetPermissionList').then(res => {
// console.log(res)
const menuData = res.result.menu;
//console.log(res.message)
if (menuData === null || menuData === "" || menuData === undefined) {
+1
View File
@@ -80,6 +80,7 @@ const permission = {
return new Promise(resolve => {
//const [ roles ] = routes.constRoutes
let routelist = routes.constRoutes;
console.log(routelist)
commit('SET_ROUTERS', routelist)
resolve()
})
@@ -11,21 +11,7 @@
<a-radio-button value="cabinet">按柜号统计</a-radio-button>
</a-radio-group>
</a-col>
<a-col :span="14">
<a-form v-if="barType === 'month' && false" layout="inline" style="margin-top: -4px">
<a-form-item label="月份区间">
<a-range-picker
:placeholder="['开始月份', '结束月份']"
format="YYYY-MM"
:value="barValue"
:mode="barDate"
@panelChange="handleBarDate"/>
</a-form-item>
<a-button style="margin-top: 2px" type="primary" icon="search" @click="queryDatebar">查询</a-button>
<a-button style="margin-top: 2px;margin-left: 8px" type="primary" icon="reload" @click="searchReset">重置</a-button>
</a-form>
</a-col>
<bar class="statistic" title="档案统计" :dataSource="countSource" :height="400"/>
<div class="statistic" ref="echartBar"></div>
</a-row>
</a-tab-pane>
@@ -39,23 +25,7 @@
<a-radio-button value="cabinet">按柜号统计</a-radio-button>
</a-radio-group>
</a-col>
<a-col :span="14">
<a-form v-if="pieType === 'month' && false" layout="inline" style="margin-top: -4px">
<a-row :gutter="24">
<a-form-item label="月份区间">
<a-range-picker
:placeholder="['开始月份', '结束月份']"
format="YYYY-MM"
:value="pieValue"
:mode="pieDate"
@panelChange="handlePieDate"/>
</a-form-item>
<a-button style="margin-top: 2px" type="primary" icon="search" @click="queryDatepie">查询</a-button>
<a-button style="margin-top: 2px;margin-left: 8px" type="primary" icon="reload" @click="searchReset">重置</a-button>
</a-row>
</a-form>
</a-col>
<pie class="statistic" title="档案统计" :dataSource="countSource" :height="450"/>
<div class="statistic" ref="echartPie"></div>
</a-row>
</a-tab-pane>
</a-tabs>
@@ -63,253 +33,289 @@
</template>
<script>
import Bar from '@/components/chart/Bar'
import Pie from '@/components/chart/Pie'
import ACol from 'ant-design-vue/es/grid/Col'
import { getAction } from '@/api/manage'
import {
getAction
} from '@/api/manage'
// 引入echarts
import * as echarts from 'echarts'
export default {
name: 'ArchivesStatisticst',
components: {
ACol,
Bar,
Pie
},
data() {
return {
description: '档案统计页面',
// 查询条件
queryParam: {},
barType: 'year',
pieType: 'year',
// 数据集
countSource: [],
// 柱状图
barType: 'year',
barDate: ['month', 'month'],
barValue: [],
// 饼状图
pieType: 'year',
pieDate: ['month', 'month'],
pieValue: [],
// 统计图类型
tabStatus:"bar",
tabStatus: "bar",
url: {
getYearCountInfo: "/mock/api/report/getYearCountInfo",
getMonthCountInfo:"/mock/api/report/getMonthCountInfo",
getCntrNoCountInfo:"/mock/api/report/getCntrNoCountInfo",
getCabinetCountInfo:"/mock/api/report/getCabinetCountInfo",
getMonthCountInfo: "/mock/api/report/getMonthCountInfo",
getCntrNoCountInfo: "/mock/api/report/getCntrNoCountInfo",
getCabinetCountInfo: "/mock/api/report/getCabinetCountInfo",
},
}
},
created() {
},
mounted() {
let url = this.url.getYearCountInfo;
this.loadDate(url,'year',{});
this.loadDate(url, 'year', {});
},
methods: {
loadDate(url,type,param) {
getAction(url,param,'get').then((res) => {
loadDate(url, type, param) {
getAction(url, param, 'get').then((res) => {
// console.log(res)
if (res.success) {
this.countSource = [];
if(type === 'year'){
if (type === 'year') {
this.getYearCountSource(res.result);
}
if(type === 'month'){
if (type === 'month') {
this.getMonthCountSource(res.result);
}
if(type === 'category'){
if (type === 'category') {
this.getCategoryCountSource(res.result);
}
if(type === 'cabinet'){
if (type === 'cabinet') {
this.getCabinetCountSource(res.result);
}
}else{
var that=this;
} else {
var that = this;
that.$message.warning(res.message);
}
})
},
getYearCountSource(data){
for (let i = 0; i < data.length; i++) {
if(this.tabStatus === "bar"){
this.countSource.push({
x: `${data[i].year}年`,
y: data[i].yearcount
})
}else{
this.countSource.push({
item: `${data[i].year}年`,
count:data[i].yearcount
})
//按年统计
getYearCountSource(data) {
let yearList = []
let yearCountList = []
data.forEach((item) => {
yearList.push(item.year)
yearCountList.push(item.yearcount)
})
let pieList = []
data.forEach((item) => {
let a = {
'value': item.yearcount,
'name': item.year
}
pieList.push(a)
})
//判断类型
if (this.tabStatus === "bar") {
this.barChart(yearList, yearCountList)
} else {
this.TieChart(pieList)
}
},
getMonthCountSource(data){
for (let i = 0; i < data.length; i++) {
if(this.tabStatus === "bar"){
this.countSource.push({
x: data[i].month,
y: data[i].monthcount
})
}else{
this.countSource.push({
item: data[i].month,
count:data[i].monthcount
})
//按月统计
getMonthCountSource(data) {
let monthList = []
let monthCountList = []
data.forEach((item) => {
monthList.push(item.month)
monthCountList.push(item.monthcount)
})
let pieList = []
data.forEach((item) => {
let a = {
'value': item.monthcount,
'name': item.month
}
pieList.push(a)
})
//判断类型
if (this.tabStatus === "bar") {
this.barChart(monthList, monthCountList)
} else {
this.TieChart(pieList)
}
},
getCategoryCountSource(data){
for (let i = 0; i < data.length; i++) {
if(this.tabStatus ==="bar"){
this.countSource.push({
x: data[i].classifyname,
y: data[i].cntrnocount
})
}else{
this.countSource.push({
item: data[i].classifyname,
count:data[i].cntrnocount
})
//按类别统计
getCategoryCountSource(data) {
let cateList = []
let cateCountList = []
data.forEach((item) => {
cateList.push(item.classifyname)
cateCountList.push(item.cntrnocount)
})
let pieList = []
data.forEach((item) => {
let a = {
'value': item.cntrnocount,
'name': item.classifyname
}
pieList.push(a)
})
//判断类型
if (this.tabStatus === "bar") {
this.barChart(cateList, cateCountList)
} else {
this.TieChart(pieList)
}
},
getCabinetCountSource(data){
for (let i = 0; i < data.length; i++) {
if(this.tabStatus === "bar"){
this.countSource.push({
x: data[i].cabinetname,
y: data[i].cabinetcocunt
})
}else{
this.countSource.push({
item: data[i].cabinetname,
count:data[i].cabinetcocunt
})
//按柜号统计
getCabinetCountSource(data) {
let cabinetList = []
let cabinetCountList = []
data.forEach((item) => {
cabinetList.push(item.cabinetname)
cabinetCountList.push(item.cabinetcocunt)
})
let pieList = []
data.forEach((item) => {
let a = {
'value': item.cabinetcocunt,
'name': item.cabinetname
}
pieList.push(a)
})
//判断类型
if (this.tabStatus === "bar") {
this.barChart(cabinetList, cabinetCountList)
} else {
this.TieChart(pieList)
}
},
//柱状图方法
barChart(list, countList) {
// console.log(list,countList)
var myChart = echarts.init(this.$refs.echartBar)
// 指定图表的配置项和数据
var option = {
title: {
text: "档案统计",
},
tooltip: {},
legend: {
data: ["y"],
},
xAxis: {
data: list,
},
yAxis: {},
series: [{
name: "y",
type: "bar",
data: countList,
}, ],
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
},
//饼状图方法
TieChart(pieList) {
var myChart = echarts.init(this.$refs.echartPie)
// 指定图表的配置项和数据
var option = {
title: {
text: '档案统计',
left: 'center'
},
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
left: 'left',
},
series: [{
name: pieList.name,
type: 'pie',
radius: '50%',
data: pieList,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}]
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
},
// 选择统计图类别
callback(key) {
if(key === "1"){
if (key === "1") {
this.tabStatus = "bar";
this.queryDatebar();
}else{
} else {
this.tabStatus = "pie";
this.queryDatepie();
}
},
// 选择统计类别
statisticst(e) {
if(this.tabStatus === "pie"){
if (this.tabStatus === "pie") {
this.pieType = e.target.value;
this.queryDatepie();
}else{
} else {
this.barType = e.target.value;
this.queryDatebar();
}
},
// 按月份查询
queryDatebar(){
if(this.barValue.length>0){
this.getUrl(this.barType,{startTime:this.barValue[0]._d,endTime:this.barValue[1]._d});
}else{
this.getUrl(this.barType,{});
queryDatebar() {
if (this.barValue.length > 0) {
this.getUrl(this.barType, {
startTime: this.barValue[0]._d,
endTime: this.barValue[1]._d
});
} else {
this.getUrl(this.barType, {});
}
},
queryDatepie(){
if(this.pieValue.length>0){
this.getUrl(this.pieType,{startTime:this.pieValue[0]._d,endTime:this.pieValue[1]._d});
}else{
this.getUrl(this.pieType,{});
queryDatepie() {
if (this.pieValue.length > 0) {
this.getUrl(this.pieType, {
startTime: this.pieValue[0]._d,
endTime: this.pieValue[1]._d
});
} else {
this.getUrl(this.pieType, {});
}
},
searchReset(){
console.log(this.tabStatus);
if(this.tabStatus === "pie"){
this.pieValue = [];
}else{
this.barValue = [];
}
this.getUrl(this.barType,{});
},
// 选择请求url
getUrl(type,param){
getUrl(type, param) {
let url = "";
if(type === 'year'){
if (type === 'year') {
url = this.url.getYearCountInfo;
}
if(type === 'month'){
if (type === 'month') {
url = this.url.getMonthCountInfo;
}
if(type === 'category'){
if (type === 'category') {
url = this.url.getCntrNoCountInfo;
}
if(type === 'cabinet'){
if (type === 'cabinet') {
url = this.url.getCabinetCountInfo;
}
this.loadDate(url,type,param);
},
// 选择月份日期
handleBarDate(value, mode) {
this.barValue = value
this.barDate = [
mode[0] === 'date' ? 'month' : mode[0],
mode[1] === 'date' ? 'month' : mode[1]
]
},
handlePieDate(value, mode) {
this.pieValue = value
this.pieDate = [
mode[0] === 'date' ? 'month' : mode[0],
mode[1] === 'date' ? 'month' : mode[1]
]
this.loadDate(url, type, param);
},
}
}
</script>
<style scoped>
.ant-card-body .table-operator {
margin-bottom: 18px;
}
.ant-table-tbody .ant-table-row td {
padding-top: 15px;
padding-bottom: 15px;
}
.anty-row-operator button {
margin: 0 5px
}
.ant-btn-danger {
background-color: #ffffff
}
.ant-modal-cust-warp {
height: 100%
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden
}
.statistic {
padding: 0px !important;
margin-top: 50px;
width: 100%;
height: 600px
}
.statistic h4 {
margin-bottom: 20px;
text-align: center !important;
font-size: 24px !important;;
}
.statistic #canvas_1 {
width: 100% !important;
}
</style>
</style>