mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 20:42:55 +08:00
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
f1c6de498a
@ -69,10 +69,10 @@ public class ExcelReaderUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
/* public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
String file ="修改日期为mm-dd-yyyy.xlsx";
|
String file ="修改日期为mm-dd-yyyy.xlsx";
|
||||||
ExcelReaderUtil.readExcel(file, new FileInputStream("/Users/taojinlong/Desktop/" + file));
|
ExcelReaderUtil.readExcel(file, new FileInputStream("/Users/taojinlong/Desktop/" + file));
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ import org.springframework.cache.annotation.Cacheable;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -30,6 +31,8 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class SysMsgService {
|
public class SysMsgService {
|
||||||
|
|
||||||
|
private static final long overDays = 30;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SysMsgMapper sysMsgMapper;
|
private SysMsgMapper sysMsgMapper;
|
||||||
|
|
||||||
@ -67,6 +70,8 @@ public class SysMsgService {
|
|||||||
criteria.andStatusEqualTo(msgRequest.getStatus());
|
criteria.andStatusEqualTo(msgRequest.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
criteria.andCreateTimeGreaterThanOrEqualTo(overTime());
|
||||||
|
|
||||||
example.setOrderByClause(orderClause);
|
example.setOrderByClause(orderClause);
|
||||||
List<SysMsg> sysMsgs = sysMsgMapper.selectByExample(example);
|
List<SysMsg> sysMsgs = sysMsgMapper.selectByExample(example);
|
||||||
return sysMsgs;
|
return sysMsgs;
|
||||||
@ -100,6 +105,8 @@ public class SysMsgService {
|
|||||||
criteria.andStatusEqualTo(msgRequest.getStatus());
|
criteria.andStatusEqualTo(msgRequest.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
criteria.andCreateTimeGreaterThanOrEqualTo(overTime());
|
||||||
|
|
||||||
example.setOrderByClause(orderClause);
|
example.setOrderByClause(orderClause);
|
||||||
List<MsgGridDto> msgGridDtos = extSysMsgMapper.queryGrid(example);
|
List<MsgGridDto> msgGridDtos = extSysMsgMapper.queryGrid(example);
|
||||||
return msgGridDtos;
|
return msgGridDtos;
|
||||||
@ -109,6 +116,7 @@ public class SysMsgService {
|
|||||||
SysMsgExample example = new SysMsgExample();
|
SysMsgExample example = new SysMsgExample();
|
||||||
SysMsgExample.Criteria criteria = example.createCriteria();
|
SysMsgExample.Criteria criteria = example.createCriteria();
|
||||||
criteria.andUserIdEqualTo(userId).andStatusEqualTo(false);
|
criteria.andUserIdEqualTo(userId).andStatusEqualTo(false);
|
||||||
|
criteria.andCreateTimeGreaterThanOrEqualTo(overTime());
|
||||||
return sysMsgMapper.countByExample(example);
|
return sysMsgMapper.countByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,4 +328,23 @@ public class SysMsgService {
|
|||||||
sysMsgMapper.updateByExampleSelective(record, example);
|
sysMsgMapper.updateByExampleSelective(record, example);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Long overTime() {
|
||||||
|
Long currentTime = System.currentTimeMillis();
|
||||||
|
|
||||||
|
long oneDayTime = 24 * 60 * 60 * 1000;
|
||||||
|
|
||||||
|
long temp = overDays * oneDayTime;
|
||||||
|
|
||||||
|
return currentTime - (currentTime + 8 * 60 * 60 * 1000) % oneDayTime - temp;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* public static void main(String[] args) {
|
||||||
|
|
||||||
|
Long overTime = overTime();
|
||||||
|
System.out.println(overTime);
|
||||||
|
|
||||||
|
} */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -49,15 +49,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="reference">
|
<div slot="reference">
|
||||||
<div>
|
<el-badge :value="count || paginationConfig.total" :hidden="!count && !paginationConfig.total" :max="99" class="item">
|
||||||
|
<svg-icon class-name="notification" icon-class="notification" />
|
||||||
|
</el-badge>
|
||||||
|
<!-- <div>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
class-name="notification"
|
class-name="notification"
|
||||||
icon-class="notification"
|
icon-class="notification"
|
||||||
/>
|
/>
|
||||||
<span v-if="count || paginationConfig.total" class="msg-number">{{ count || paginationConfig.total }}</span>
|
<span v-if="count || paginationConfig.total" class="msg-number">{{ count || paginationConfig.total }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</el-popover>
|
</div></el-popover>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -275,4 +278,9 @@ export default {
|
|||||||
background-color: #171422;
|
background-color: #171422;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
margin-top: 0px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<el-tooltip :content="$t('panel.fontSize')">
|
<el-tooltip :content="$t('panel.fontSize')">
|
||||||
|
|
||||||
<i style="float: left;margin-top: 3px;margin-left: 2px;" class="iconfont icon-font_size" />
|
<i style="float: left;margin-top: 3px;margin-left: 2px;" class="iconfont icon-font_size" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
@ -123,6 +122,17 @@ export default {
|
|||||||
tooltip: this.$t('panel.text_align_right'),
|
tooltip: this.$t('panel.text_align_right'),
|
||||||
label: 'right'
|
label: 'right'
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
'v-text': [
|
||||||
|
'textAlign',
|
||||||
|
'fontSize',
|
||||||
|
'fontWeight',
|
||||||
|
'letterSpacing',
|
||||||
|
'opacity',
|
||||||
|
'borderRadius',
|
||||||
|
'color',
|
||||||
|
'backgroundColor',
|
||||||
|
'hyperlinks'
|
||||||
] }
|
] }
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -140,6 +150,9 @@ export default {
|
|||||||
// console.log('mainWidthOffset:' + this.mainWidthOffset)
|
// console.log('mainWidthOffset:' + this.mainWidthOffset)
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
attrShow(attr) {
|
||||||
|
return style
|
||||||
|
},
|
||||||
letterDivColor() {
|
letterDivColor() {
|
||||||
const style = {
|
const style = {
|
||||||
height: '2px',
|
height: '2px',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<de-container>
|
<de-container>
|
||||||
<de-aside-container v-if="!chart.type.includes('table')">
|
<de-aside-container v-if="!chart.type.includes('table')" :style="customStyle">
|
||||||
<chart-component v-if="!chart.type.includes('text')" class="chart-class" :chart="chart" />
|
<chart-component v-if="!chart.type.includes('text')" class="chart-class" :chart="chart" />
|
||||||
<label-normal v-if="chart.type.includes('text')" :chart="chart" class="table-class" />
|
<label-normal v-if="chart.type.includes('text')" :chart="chart" class="table-class" />
|
||||||
</de-aside-container>
|
</de-aside-container>
|
||||||
@ -19,6 +19,7 @@ import DeMainContainer from '@/components/dataease/DeMainContainer'
|
|||||||
import DeContainer from '@/components/dataease/DeContainer'
|
import DeContainer from '@/components/dataease/DeContainer'
|
||||||
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
|
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
|
||||||
import { export_json_to_excel } from '@/plugins/Export2Excel'
|
import { export_json_to_excel } from '@/plugins/Export2Excel'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserView',
|
name: 'UserView',
|
||||||
@ -38,6 +39,32 @@ export default {
|
|||||||
refId: null
|
refId: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
customStyle() {
|
||||||
|
let style = {
|
||||||
|
}
|
||||||
|
if (this.canvasStyleData.openCommonStyle) {
|
||||||
|
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) {
|
||||||
|
style = {
|
||||||
|
background: `url(${this.canvasStyleData.panel.imageUrl}) no-repeat`,
|
||||||
|
...style
|
||||||
|
}
|
||||||
|
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
||||||
|
style = {
|
||||||
|
background: this.canvasStyleData.panel.color,
|
||||||
|
...style
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return style
|
||||||
|
},
|
||||||
|
...mapState([
|
||||||
|
'isClickComponent',
|
||||||
|
'curComponent',
|
||||||
|
'componentData',
|
||||||
|
'canvasStyleData'
|
||||||
|
])
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
const excelHeader = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.name)
|
const excelHeader = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.name)
|
||||||
|
@ -31,6 +31,17 @@ export function basePieOptionAntV(plot, container, chart, action) {
|
|||||||
pieStyle: {
|
pieStyle: {
|
||||||
lineWidth: 0
|
lineWidth: 0
|
||||||
},
|
},
|
||||||
|
statistic: {
|
||||||
|
title: false,
|
||||||
|
content: {
|
||||||
|
style: {
|
||||||
|
whiteSpace: 'pre-wrap',
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis'
|
||||||
|
},
|
||||||
|
content: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
interactions: [
|
interactions: [
|
||||||
{
|
{
|
||||||
type: 'element-active', cfg: {
|
type: 'element-active', cfg: {
|
||||||
@ -107,6 +118,17 @@ export function basePieRoseOptionAntV(plot, container, chart, action) {
|
|||||||
label: label,
|
label: label,
|
||||||
tooltip: tooltip,
|
tooltip: tooltip,
|
||||||
legend: legend,
|
legend: legend,
|
||||||
|
statistic: {
|
||||||
|
title: false,
|
||||||
|
content: {
|
||||||
|
style: {
|
||||||
|
whiteSpace: 'pre-wrap',
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis'
|
||||||
|
},
|
||||||
|
content: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
interactions: [
|
interactions: [
|
||||||
{
|
{
|
||||||
type: 'element-active', cfg: {
|
type: 'element-active', cfg: {
|
||||||
|
Loading…
Reference in New Issue
Block a user