Merge branch 'dev' of github.com:dataease/dataease into dev

This commit is contained in:
taojinlong 2021-10-18 17:46:38 +08:00
commit f1c6de498a
6 changed files with 104 additions and 7 deletions

View File

@ -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";
ExcelReaderUtil.readExcel(file, new FileInputStream("/Users/taojinlong/Desktop/" + file));
}
} */
}

View File

@ -23,6 +23,7 @@ import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@ -30,6 +31,8 @@ import java.util.stream.Collectors;
@Service
public class SysMsgService {
private static final long overDays = 30;
@Resource
private SysMsgMapper sysMsgMapper;
@ -67,6 +70,8 @@ public class SysMsgService {
criteria.andStatusEqualTo(msgRequest.getStatus());
}
criteria.andCreateTimeGreaterThanOrEqualTo(overTime());
example.setOrderByClause(orderClause);
List<SysMsg> sysMsgs = sysMsgMapper.selectByExample(example);
return sysMsgs;
@ -100,6 +105,8 @@ public class SysMsgService {
criteria.andStatusEqualTo(msgRequest.getStatus());
}
criteria.andCreateTimeGreaterThanOrEqualTo(overTime());
example.setOrderByClause(orderClause);
List<MsgGridDto> msgGridDtos = extSysMsgMapper.queryGrid(example);
return msgGridDtos;
@ -109,6 +116,7 @@ public class SysMsgService {
SysMsgExample example = new SysMsgExample();
SysMsgExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId).andStatusEqualTo(false);
criteria.andCreateTimeGreaterThanOrEqualTo(overTime());
return sysMsgMapper.countByExample(example);
}
@ -320,4 +328,23 @@ public class SysMsgService {
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);
} */
}

View File

@ -49,15 +49,18 @@
</div>
</div>
<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
class-name="notification"
icon-class="notification"
/>
<span v-if="count || paginationConfig.total" class="msg-number">{{ count || paginationConfig.total }}</span>
</div>
</div>
</el-popover>
</div> -->
</div></el-popover>
</template>
<script>
@ -275,4 +278,9 @@ export default {
background-color: #171422;
}
}
.item {
margin-top: 0px;
margin-right: 5px;
}
</style>

View File

@ -17,7 +17,6 @@
</el-radio-group>
</div>
<el-tooltip :content="$t('panel.fontSize')">
<i style="float: left;margin-top: 3px;margin-left: 2px;" class="iconfont icon-font_size" />
</el-tooltip>
@ -123,6 +122,17 @@ export default {
tooltip: this.$t('panel.text_align_right'),
label: 'right'
}
],
'v-text': [
'textAlign',
'fontSize',
'fontWeight',
'letterSpacing',
'opacity',
'borderRadius',
'color',
'backgroundColor',
'hyperlinks'
] }
},
watch: {
@ -140,6 +150,9 @@ export default {
// console.log('mainWidthOffset:' + this.mainWidthOffset)
},
computed: {
attrShow(attr) {
return style
},
letterDivColor() {
const style = {
height: '2px',

View File

@ -1,6 +1,6 @@
<template>
<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" />
<label-normal v-if="chart.type.includes('text')" :chart="chart" class="table-class" />
</de-aside-container>
@ -19,6 +19,7 @@ import DeMainContainer from '@/components/dataease/DeMainContainer'
import DeContainer from '@/components/dataease/DeContainer'
import DeAsideContainer from '@/components/dataease/DeAsideContainer'
import { export_json_to_excel } from '@/plugins/Export2Excel'
import { mapState } from 'vuex'
export default {
name: 'UserView',
@ -38,6 +39,32 @@ export default {
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: {
exportExcel() {
const excelHeader = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.name)

View File

@ -31,6 +31,17 @@ export function basePieOptionAntV(plot, container, chart, action) {
pieStyle: {
lineWidth: 0
},
statistic: {
title: false,
content: {
style: {
whiteSpace: 'pre-wrap',
overflow: 'hidden',
textOverflow: 'ellipsis'
},
content: ''
}
},
interactions: [
{
type: 'element-active', cfg: {
@ -107,6 +118,17 @@ export function basePieRoseOptionAntV(plot, container, chart, action) {
label: label,
tooltip: tooltip,
legend: legend,
statistic: {
title: false,
content: {
style: {
whiteSpace: 'pre-wrap',
overflow: 'hidden',
textOverflow: 'ellipsis'
},
content: ''
}
},
interactions: [
{
type: 'element-active', cfg: {