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

This commit is contained in:
taojinlong 2021-07-30 12:27:30 +08:00
commit 5da8de3332
16 changed files with 77 additions and 21 deletions

View File

@ -42,7 +42,7 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数
仅需两步快速安装 DataEase
1. 准备一台不小于 16 G内存的 64位 Linux 主机;
1. 准备一台不小于 8 G内存的 64位 Linux 主机;
2. 以 root 用户执行如下命令一键安装 DataEase。
```sh

View File

@ -16,13 +16,13 @@ public interface ExtSysMsgMapper {
@Update({
"<script>",
"update sys_msg set status = 1 where msg_id in ",
"update sys_msg set status = 1, read_time = #{time} where msg_id in ",
"<foreach collection='msgIds' item='msgId' open='(' separator=',' close=')' >",
" #{msgId}",
"</foreach>",
"</script>"
})
int batchStatus(@Param("msgIds") List<Long> msgIds);
int batchStatus(@Param("msgIds") List<Long> msgIds, @Param("time") Long time);
@Delete({

View File

@ -109,7 +109,7 @@ public class SysMsgService {
}
public void setBatchReaded(List<Long> msgIds) {
extSysMsgMapper.batchStatus(msgIds);
extSysMsgMapper.batchStatus(msgIds, System.currentTimeMillis());
}
public void batchDelete(List<Long> msgIds) {

View File

@ -59,6 +59,7 @@
"babel-eslint": "10.0.1",
"chalk": "2.4.2",
"connect": "3.6.6",
"copy-webpack-plugin": "^4.6.0",
"eslint": "5.15.3",
"eslint-plugin-vue": "5.2.2",
"html-webpack-plugin": "3.2.0",

View File

@ -26,6 +26,15 @@ export function batchRead(data) {
})
}
export function batchDelete(data) {
return request({
url: '/api/sys_msg/batchDelete',
method: 'post',
loading: true,
data
})
}
export function treeList() {
return request({
url: '/api/sys_msg/treeNodes',

View File

@ -215,6 +215,7 @@ export default {
min-height: 300px;
width: 100%;
height: 100%;
overflow-x: hidden;
/*border: 1px solid #E6E6E6;*/
background-size: 100% 100% !important;
.canvas-container {

View File

@ -5,7 +5,7 @@
<label-normal v-if="chart.type.includes('text')" :chart="chart" class="table-class" />
</de-aside-container>
<de-main-container>
<table-normal :chart="chartTable" class="table-class" />
<table-normal :chart="chartTable" :show-summary="false" class="table-class" />
</de-main-container>
</de-container>
</template>

View File

@ -12,7 +12,7 @@
:row-style="getRowStyle"
class="table-class"
:class="chart.id"
show-summary
:show-summary="showSummary"
:summary-method="summaryMethod"
>
<ux-table-column
@ -48,6 +48,11 @@ export default {
default: function() {
return {}
}
},
showSummary: {
type: Boolean,
required: false,
default: true
}
},
data() {

View File

@ -1245,10 +1245,12 @@ export default {
},
changeChart() {
this.view.tableId = this.changeTable.id
this.view.xaxis = []
this.view.yaxis = []
this.view.customFilter = []
if (this.view.tableId !== this.changeTable.id) {
this.view.tableId = this.changeTable.id
this.view.xaxis = []
this.view.yaxis = []
this.view.customFilter = []
}
this.save(true, 'chart', false)
},

View File

@ -1,7 +1,7 @@
<template>
<de-container>
<de-aside-container>
<dataset-group-selector-tree @getTable="getTable" :privileges=privileges :mode=mode :type=type :customType=customType :showMode=showMode />
<dataset-group-selector-tree :privileges="privileges" :mode="mode" :type="type" :custom-type="customType" :show-mode="showMode" @getTable="getTable" />
</de-aside-container>
<de-main-container>
<dataset-table-data :table="table" />

View File

@ -11,9 +11,16 @@
:pagination-config="paginationConfig"
@select="select"
@search="search"
@selection-change="handleSelectionChange"
@sort-change="sortChange"
>
<template #toolbar>
<el-button :disabled="multipleSelection.length === 0" @click="deleteBatch">{{ $t('commons.delete') }}</el-button>
</template>
<el-table-column
type="selection"
width="55"
/>
<el-table-column prop="content" :label="$t('webmsg.content')">
<template slot-scope="scope">
@ -57,7 +64,7 @@
import LayoutContent from '@/components/business/LayoutContent'
import ComplexTable from '@/components/business/complex-table'
import { query } from '@/api/system/msg'
import { query, batchDelete } from '@/api/system/msg'
import { msgTypes, getTypeName, loadMsgTypes } from '@/utils/webMsg'
import { addOrder, formatOrders } from '@/utils/index'
import { mapGetters } from 'vuex'
@ -85,7 +92,8 @@ export default {
currentPage: 1,
pageSize: 10,
total: 0
}
},
multipleSelection: []
}
},
computed: {
@ -164,6 +172,20 @@ export default {
}
addOrder({ field: prop, value: order }, this.orderConditions)
this.search()
},
deleteBatch() {
if (this.multipleSelection.length === 0) {
this.$warning(this.$t('webmsg.please_select'))
return
}
const param = this.multipleSelection.map(item => item.msgId)
batchDelete(param).then(res => {
this.$success(this.$t('commons.delete_success'))
this.search()
})
},
handleSelectionChange(val) {
this.multipleSelection = val
}
}

View File

@ -96,8 +96,8 @@
<div
id="canvasInfo"
:class="{'style-hidden':canvasStyleData.selfAdaption}"
class="content this_canvas"
:class="{'border-hidden':canvasStyleData.selfAdaption}"
@drop="handleDrop"
@dragover="handleDragOver"
@mousedown="handleMouseDown"
@ -826,10 +826,8 @@ export default {
padding: 1px 15px !important;
}
}
.border-hidden {
overflow: hidden;
}
.style-hidden{
overflow: hidden;
}
</style>

View File

@ -133,6 +133,13 @@ export default {
this.$warning(this.$t('chart.name_can_not_empty'))
return false
}
debugger
if (this.editPanel.panelInfo.name.length > 50) {
this.$warning(this.$t('commons.char_can_not_more_50'))
return false
}
if (!this.editPanel.panelInfo.panelData && this.editPanel.optType === 'new' && this.inputType === 'copy') {
this.$warning(this.$t('chart.template_can_not_empty'))
return false

Binary file not shown.

Binary file not shown.

View File

@ -2,6 +2,8 @@
const path = require('path')
const defaultSettings = require('./src/settings.js')
const CopyWebpackPlugin = require('copy-webpack-plugin')
function resolve(dir) {
return path.join(__dirname, dir)
}
@ -27,6 +29,7 @@ module.exports = {
},
before: require('./mock/mock-server.js')
},
pages: {
index: {
entry: 'src/main.js',
@ -46,7 +49,15 @@ module.exports = {
alias: {
'@': resolve('src')
}
}
},
plugins: [
new CopyWebpackPlugin([
{
from: path.join(__dirname, 'static'),
to: path.join(__dirname, 'dist/static')
}
])
]
},
chainWebpack: config => {
config.module.rules.delete('svg') // 删除默认配置中处理svg,