提交 6f7345e8 authored 作者: taojinlong's avatar taojinlong

Merge branch 'v1.7' of github.com:dataease/dataease into v1.7

...@@ -284,6 +284,7 @@ ...@@ -284,6 +284,7 @@
<exclude>static/**/*.woff</exclude> <exclude>static/**/*.woff</exclude>
<exclude>static/**/*.woff2</exclude> <exclude>static/**/*.woff2</exclude>
<exclude>static/**/*.ttf</exclude> <exclude>static/**/*.ttf</exclude>
<exclude>static/**/*.ico</exclude>
</excludes> </excludes>
</resource> </resource>
...@@ -294,6 +295,7 @@ ...@@ -294,6 +295,7 @@
<include>static/**/*.woff</include> <include>static/**/*.woff</include>
<include>static/**/*.woff2</include> <include>static/**/*.woff2</include>
<include>static/**/*.ttf</include> <include>static/**/*.ttf</include>
<include>static/**/*.ico</include>
</includes> </includes>
</resource> </resource>
</resources> </resources>
...@@ -416,13 +418,13 @@ ...@@ -416,13 +418,13 @@
</move> </move>
<copy todir="src/main/resources/static/de-app"> <copy todir="src/main/resources/static/de-app">
<fileset dir="../mobile/dist/build/h5"> <fileset dir="../mobile/dist">
<exclude name="*.html"/> <exclude name="*.html"/>
</fileset> </fileset>
</copy> </copy>
<copy file="../mobile/dist/build/h5/index.html" tofile="src/main/resources/templates/app.html" /> <copy file="../mobile/dist/index.html" tofile="src/main/resources/templates/app.html" />
</target> </target>
......
...@@ -2,6 +2,7 @@ package io.dataease.plugins.server; ...@@ -2,6 +2,7 @@ package io.dataease.plugins.server;
import java.util.List; import java.util.List;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -11,6 +12,7 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -11,6 +12,7 @@ import org.springframework.web.multipart.MultipartFile;
import io.dataease.commons.exception.DEException; import io.dataease.commons.exception.DEException;
import io.dataease.commons.utils.LogUtil; import io.dataease.commons.utils.LogUtil;
import io.dataease.i18n.Translator;
import io.dataease.plugins.config.SpringContextUtil; import io.dataease.plugins.config.SpringContextUtil;
import io.dataease.plugins.xpack.theme.dto.ThemeDto; import io.dataease.plugins.xpack.theme.dto.ThemeDto;
import io.dataease.plugins.xpack.theme.dto.ThemeItem; import io.dataease.plugins.xpack.theme.dto.ThemeItem;
...@@ -42,7 +44,13 @@ public class ThemeServer { ...@@ -42,7 +44,13 @@ public class ThemeServer {
themeXpackService.save(request, bodyFile); themeXpackService.save(request, bodyFile);
} catch (Exception e) { } catch (Exception e) {
LogUtil.error(e.getMessage(), e); LogUtil.error(e.getMessage(), e);
DEException.throwException(e); if (ObjectUtils.isNotEmpty(e.getMessage()) && e.getMessage().indexOf("theme_name_repeat") != -1) {
DEException.throwException(Translator.get("theme_name_repeat"));
} else if (ObjectUtils.isNotEmpty(e.getMessage()) && e.getMessage().indexOf("theme_name_empty") != -1) {
DEException.throwException(Translator.get("theme_name_empty"));
} else {
DEException.throwException(e);
}
} }
} }
......
...@@ -116,4 +116,6 @@ i18n_rp_exist=Row permission of the same type already exists ...@@ -116,4 +116,6 @@ i18n_rp_exist=Row permission of the same type already exists
i18n_field_name_repeat=Field name can't repeat i18n_field_name_repeat=Field name can't repeat
i18n_calc_field_error=Field expression error i18n_calc_field_error=Field expression error
i18n_cp_exist=Column permission of the same type already exists i18n_cp_exist=Column permission of the same type already exists
connection_failed=Connection Failed connection_failed=Connection Failed
\ No newline at end of file theme_name_repeat=name of theme has been existed
theme_name_empty=name can not be empty
\ No newline at end of file
...@@ -116,3 +116,5 @@ i18n_field_name_repeat=字段名不能重复 ...@@ -116,3 +116,5 @@ i18n_field_name_repeat=字段名不能重复
i18n_calc_field_error=字段表达式语法错误 i18n_calc_field_error=字段表达式语法错误
i18n_cp_exist=已有同类型的列权限存在 i18n_cp_exist=已有同类型的列权限存在
connection_failed=连接失败 connection_failed=连接失败
theme_name_repeat=名称已存在
theme_name_empty=名称不能为空
...@@ -117,3 +117,5 @@ i18n_field_name_repeat=字段名不能重復 ...@@ -117,3 +117,5 @@ i18n_field_name_repeat=字段名不能重復
i18n_calc_field_error=字段表達式語法錯誤 i18n_calc_field_error=字段表達式語法錯誤
i18n_cp_exist=已有同類型的列權限存在 i18n_cp_exist=已有同類型的列權限存在
connection_failed=連接失敗 connection_failed=連接失敗
theme_name_repeat=名稱已存在
theme_name_empty=名稱不能為空
...@@ -29,6 +29,11 @@ export default { ...@@ -29,6 +29,11 @@ export default {
} }
} }
}, },
watch: {
'$route.params.reportId': function() {
this.restore()
}
},
mounted() { mounted() {
this.restore() this.restore()
}, },
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
:id="'component' + item.id" :id="'component' + item.id"
ref="wrapperChild" ref="wrapperChild"
class="component" class="component"
:filters="filterMap[item.propValue.viewId]" :filters="filterMap[item.propValue && item.propValue.viewId]"
:style="getComponentStyleDefault(item.style)" :style="getComponentStyleDefault(item.style)"
:prop-value="item.propValue" :prop-value="item.propValue"
:element="item" :element="item"
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
}, },
created() { created() {
if (this.element.options.value) { if (this.element.options.value) {
this.value = this.element.options.value this.value = this.fillValueDerfault()
this.search() this.search()
} }
}, },
......
...@@ -99,6 +99,11 @@ class NumberRangeServiceImpl extends WidgetService { ...@@ -99,6 +99,11 @@ class NumberRangeServiceImpl extends WidgetService {
return param return param
} }
} }
return {
component: element,
value: [],
operator: 'eq'
}
} }
} }
const numberRangeServiceImpl = new NumberRangeServiceImpl() const numberRangeServiceImpl = new NumberRangeServiceImpl()
......
...@@ -68,7 +68,7 @@ class TextInputServiceImpl extends WidgetService { ...@@ -68,7 +68,7 @@ class TextInputServiceImpl extends WidgetService {
}) })
} }
getParam(element) { getParam(element) {
const value = element.options.value const value = this.fillValueDerfault(element)
const param = { const param = {
component: element, component: element,
value: !value ? [] : Array.isArray(value) ? value : [value], value: !value ? [] : Array.isArray(value) ? value : [value],
...@@ -76,6 +76,11 @@ class TextInputServiceImpl extends WidgetService { ...@@ -76,6 +76,11 @@ class TextInputServiceImpl extends WidgetService {
} }
return param return param
} }
fillValueDerfault(element) {
const defaultV = element.options.value === null ? '' : element.options.value.toString()
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV === '[object Object]') return null
return defaultV.split(',')[0]
}
} }
const textInputServiceImpl = new TextInputServiceImpl() const textInputServiceImpl = new TextInputServiceImpl()
export default textInputServiceImpl export default textInputServiceImpl
...@@ -125,7 +125,8 @@ class TimeDateRangeServiceImpl extends WidgetService { ...@@ -125,7 +125,8 @@ class TimeDateRangeServiceImpl extends WidgetService {
getEndQuarter() { getEndQuarter() {
var now = new Date() var now = new Date()
var nowMonth = now.getMonth() var nowMonth = now.getMonth()
const endMonth = Math.floor((nowMonth / 3)) * 3 + (nowMonth % 3) const quar = Math.floor(nowMonth / 3)
const endMonth = quar * 3 + 2
const days = (endMonth === 5 || endMonth === 8) ? 30 : 31 const days = (endMonth === 5 || endMonth === 8) ? 30 : 31
return new Date(now.getFullYear(), endMonth, days) return new Date(now.getFullYear(), endMonth, days)
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<el-form-item :label="$t('chart.text_color')" class="form-item"> <el-form-item :label="$t('chart.text_color')" class="form-item">
<el-color-picker v-model="labelForm.color" class="color-picker-style" :predefine="predefineColors" @change="changeLabelAttr" /> <el-color-picker v-model="labelForm.color" class="color-picker-style" :predefine="predefineColors" @change="changeLabelAttr" />
</el-form-item> </el-form-item>
<el-form-item v-show="chart.type && chart.type !== 'liquid' && !chart.type.includes('line') && chart.type !== 'treemap'" :label="$t('chart.label_position')" class="form-item"> <el-form-item v-show="chart.type && chart.type !== 'liquid' && !chart.type.includes('line') && chart.type !== 'treemap' && chart.type !== 'map'" :label="$t('chart.label_position')" class="form-item">
<el-select v-model="labelForm.position" :placeholder="$t('chart.label_position')" @change="changeLabelAttr"> <el-select v-model="labelForm.position" :placeholder="$t('chart.label_position')" @change="changeLabelAttr">
<el-option v-for="option in labelPosition" :key="option.value" :label="option.name" :value="option.value" /> <el-option v-for="option in labelPosition" :key="option.value" :label="option.name" :value="option.value" />
</el-select> </el-select>
......
...@@ -550,6 +550,7 @@ export default { ...@@ -550,6 +550,7 @@ export default {
this.$refs['tableForm'].validate((valid) => { this.$refs['tableForm'].validate((valid) => {
if (valid) { if (valid) {
view.title = view.name view.title = view.name
view.sceneId = view.pid
post('/chart/view/save', view).then(response => { post('/chart/view/save', view).then(response => {
this.closeTable() this.closeTable()
this.$message({ this.$message({
......
...@@ -426,6 +426,7 @@ export default { ...@@ -426,6 +426,7 @@ export default {
this.$refs['tableForm'].validate((valid) => { this.$refs['tableForm'].validate((valid) => {
if (valid) { if (valid) {
table.isRename = true table.isRename = true
table.sceneId = table.pid
alter(table).then(response => { alter(table).then(response => {
this.closeTable() this.closeTable()
this.$message({ this.$message({
......
...@@ -368,7 +368,7 @@ export default { ...@@ -368,7 +368,7 @@ export default {
} }
if (this.canvasStyleData.openCommonStyle) { if (this.canvasStyleData.openCommonStyle) {
if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) { if (this.canvasStyleData.panel.backgroundType === 'image' && typeof (this.canvasStyleData.panel.imageUrl) === 'string') {
style = { style = {
background: `url(${this.canvasStyleData.panel.imageUrl}) no-repeat`, background: `url(${this.canvasStyleData.panel.imageUrl}) no-repeat`,
...style ...style
......
...@@ -54,9 +54,9 @@ export default { ...@@ -54,9 +54,9 @@ export default {
}, },
{ {
head: this.$t('wizard.teaching_video'), head: this.$t('wizard.teaching_video'),
content: '<a href="https://live.vhall.com/v3/lives/subscribe/533874762" target="_blank"><span style="line-height: 30px">40分钟带你玩转 DataEase </span></a><br><a href="https://live.vhall.com/v3/lives/subscribe/903960272" target="_blank">用DataEase开源工具可视化 ClickHouse数据</a>', content: '<a href="https://www.bilibili.com/video/BV1pb4y1E7Zg?spm_id_from=333.999.0.0" target="_blank"><span style="line-height: 30px">【DataEase教学视频】视图钻取 </span></a><br><a href="https://www.bilibili.com/video/BV1Xq4y187H9?spm_id_from=333.999.0.0" target="_blank">【DataEase教学视频】移动端布局设置</a>',
bottom: '', bottom: '',
href: 'https://e.vhall.com/v3/user/home/45637107', href: 'https://space.bilibili.com/510493147/channel/collectiondetail?sid=150431',
component: 'CardDetail' component: 'CardDetail'
}, },
{ {
......
...@@ -6,7 +6,7 @@ yarn-debug.log* ...@@ -6,7 +6,7 @@ yarn-debug.log*
yarn-error.log* yarn-error.log*
package-lock.json package-lock.json
tests/**/coverage/ tests/**/coverage/
.automator/
# Editor directories and files # Editor directories and files
.hbuilderx .hbuilderx
.idea .idea
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"build": "npm run build:h5", "build": "npm run build:h5",
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build", "build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom", "build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build", "build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 UNI_OUTPUT_DIR=dist vue-cli-service uni-build",
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build", "build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build", "build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build", "build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论