Merge remote-tracking branch 'origin/v1.1' into v1.1
This commit is contained in:
commit
dbfce8cc6f
@ -57,7 +57,7 @@ public class DataSetTableTaskController {
|
||||
}
|
||||
|
||||
@PostMapping("/updateStatus")
|
||||
public void updateStatus(@RequestBody DatasetTableTask datasetTableTask) {
|
||||
public void updateStatus(@RequestBody DatasetTableTask datasetTableTask) throws Exception{
|
||||
dataSetTableTaskService.updateDatasetTableTaskStatus(datasetTableTask);
|
||||
}
|
||||
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
package io.dataease.service.dataset;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import io.dataease.base.domain.*;
|
||||
import io.dataease.base.mapper.DatasetTableMapper;
|
||||
import io.dataease.base.mapper.DatasetTableTaskMapper;
|
||||
import io.dataease.base.mapper.ext.ExtDataSetTaskMapper;
|
||||
import io.dataease.base.mapper.ext.UtilMapper;
|
||||
import io.dataease.base.mapper.ext.query.GridExample;
|
||||
import io.dataease.commons.constants.JobStatus;
|
||||
import io.dataease.commons.constants.ScheduleType;
|
||||
@ -53,8 +51,6 @@ public class DataSetTableTaskService {
|
||||
private ExtDataSetTaskMapper extDataSetTaskMapper;
|
||||
@Resource
|
||||
private DatasetTableMapper datasetTableMapper;
|
||||
@Resource
|
||||
private UtilMapper utilMapper;
|
||||
|
||||
public DatasetTableTask save(DataSetTaskRequest dataSetTaskRequest) throws Exception {
|
||||
checkName(dataSetTaskRequest);
|
||||
@ -96,12 +92,15 @@ public class DataSetTableTaskService {
|
||||
datasetTableTaskMapper.updateByPrimaryKeySelective(datasetTableTask);
|
||||
}
|
||||
|
||||
scheduleService.addSchedule(datasetTableTask);
|
||||
|
||||
// simple
|
||||
if (datasetTableTask.getRate().equalsIgnoreCase(ScheduleType.SIMPLE.toString())) { // SIMPLE 类型,提前占位
|
||||
execNow(datasetTableTask);
|
||||
}else {
|
||||
checkTaskIsStopped(datasetTableTask);
|
||||
}
|
||||
scheduleService.addSchedule(datasetTableTask);
|
||||
checkTaskIsStopped(datasetTableTask);
|
||||
|
||||
return datasetTableTask;
|
||||
}
|
||||
|
||||
@ -282,7 +281,13 @@ public class DataSetTableTaskService {
|
||||
}
|
||||
}
|
||||
|
||||
public void updateDatasetTableTaskStatus(DatasetTableTask datasetTableTask){
|
||||
public void updateDatasetTableTaskStatus(DatasetTableTask datasetTableTask)throws Exception{
|
||||
|
||||
DatasetTableTask dbDatasetTableTask = datasetTableTaskMapper.selectByPrimaryKey(datasetTableTask.getId());
|
||||
if(dbDatasetTableTask.getStatus().equalsIgnoreCase(TaskStatus.Exec.name()) || dbDatasetTableTask.getStatus().equals(TaskStatus.Stopped.name())){
|
||||
throw new Exception(Translator.get("i18n_change_task_status_error") + Translator.get("i18n_" + dbDatasetTableTask.getStatus()));
|
||||
}
|
||||
|
||||
DatasetTableTaskExample datasetTableTaskExample = new DatasetTableTaskExample();
|
||||
DatasetTableTaskExample.Criteria criteria = datasetTableTaskExample.createCriteria();
|
||||
criteria.andIdEqualTo(datasetTableTask.getId());
|
||||
|
||||
@ -283,7 +283,7 @@ public class ExtractDataService {
|
||||
createDorisTable(DorisTableUtils.dorisTmpName(DorisTableUtils.dorisName(datasetTableId)), dorisTablColumnSql);
|
||||
generateTransFile("all_scope", datasetTable, datasource, datasetTableFields, null);
|
||||
if (datasetTable.getType().equalsIgnoreCase("sql")) {
|
||||
generateJobFile("all_scope", datasetTable, fetchSqlField(new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class).getSql(), datasource));
|
||||
generateJobFile("all_scope", datasetTable, String.join(",", datasetTableFields.stream().map(DatasetTableField::getDataeaseName).collect(Collectors.toList())));
|
||||
} else {
|
||||
generateJobFile("all_scope", datasetTable, String.join(",", datasetTableFields.stream().map(DatasetTableField::getDataeaseName).collect(Collectors.toList())));
|
||||
}
|
||||
@ -297,6 +297,7 @@ public class ExtractDataService {
|
||||
saveErrorLog(datasetTableId, taskId, e);
|
||||
msg = false;
|
||||
lastExecStatus = JobStatus.Error;
|
||||
execTime = null;
|
||||
} finally {
|
||||
try { deleteFile("all_scope", datasetTableId); }catch (Exception ignore){ System.out.println(ignore.getMessage());}
|
||||
try { sendWebMsg(datasetTable, datasetTableTask, datasetTableTaskLog, msg); }catch (Exception ignore){ System.out.println(ignore.getMessage());}
|
||||
@ -316,14 +317,17 @@ public class ExtractDataService {
|
||||
return;
|
||||
}
|
||||
|
||||
if (datasetTable.getLastUpdateTime() == 0 || datasetTable.getLastUpdateTime() == null) {
|
||||
updateTableStatus(datasetTableId, datasetTable, JobStatus.Completed, null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (datasetTableTask == null ) {
|
||||
datasetTableTaskLog = writeDatasetTableTaskLog(datasetTableId, taskId);
|
||||
}
|
||||
|
||||
if (datasetTable.getLastUpdateTime() == null || datasetTable.getLastUpdateTime() == 0) {
|
||||
updateTableStatus(datasetTableId, datasetTable, JobStatus.Completed, null);
|
||||
saveErrorLog(datasetTableId, taskId, new Exception("未进行全量同步"));
|
||||
lastExecStatus = JobStatus.Error;
|
||||
return;
|
||||
}
|
||||
|
||||
execTime = System.currentTimeMillis();
|
||||
if (StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalAdd()) && StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalAdd().replace(" ", ""))) {// 增量添加
|
||||
String sql = datasetTableIncrementalConfig.getIncrementalAdd().replace(lastUpdateTime, datasetTable.getLastUpdateTime().toString())
|
||||
@ -348,6 +352,7 @@ public class ExtractDataService {
|
||||
saveErrorLog(datasetTableId, taskId, e);
|
||||
msg = false;
|
||||
lastExecStatus = JobStatus.Error;
|
||||
execTime = null;
|
||||
} finally {
|
||||
try { deleteFile("incremental_add", datasetTableId); deleteFile("incremental_delete", datasetTableId); }catch (Exception ignore){}
|
||||
try { sendWebMsg(datasetTable, datasetTableTask, datasetTableTaskLog, msg); }catch (Exception ignore){}
|
||||
|
||||
@ -1,18 +1,4 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : ali_sh_mysql
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50732
|
||||
Source Host : 47.117.200.215:3306
|
||||
Source Schema : dataease
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50732
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 13/07/2021 18:09:09
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
@ -277,4 +277,7 @@ i18n_data_not_sync=Please sync data first
|
||||
i18n_excel_colume_change=The column name of Excel is inconsistent with the original data set
|
||||
i18n_timed_task=Timed Task
|
||||
i18n_datasource_connect_error=Data source connection exception:
|
||||
i18n_check_sql_error=Check incremental SQL exception,
|
||||
i18n_check_sql_error=Check incremental SQL exception,
|
||||
i18n_change_task_status_error=Suspension is not allowed. The task status is:
|
||||
i18n_Stopped=END
|
||||
i18n_Exec=Running
|
||||
@ -277,3 +277,7 @@ i18n_excel_colume_change=Excel的列名与原数据集不一致
|
||||
i18n_timed_task=定时任务
|
||||
i18n_datasource_connect_error=数据源连接异常:
|
||||
i18n_check_sql_error=校验增量 SQL 异常,
|
||||
i18n_change_task_status_error=不允许暂停,任务状态为:
|
||||
i18n_Stopped=执行结束
|
||||
i18n_Exec=运行中
|
||||
|
||||
|
||||
@ -279,4 +279,7 @@ i18n_data_not_sync=請先完成數據同步
|
||||
i18n_excel_colume_change=Excel的列名與原數據集不一致
|
||||
i18n_timed_task=定時任務
|
||||
i18n_datasource_connect_error=數據源連接異常:
|
||||
i18n_check_sql_error=校驗增量SQL異常,
|
||||
i18n_check_sql_error=校驗增量SQL異常,
|
||||
i18n_change_task_status_error=不允許暫停,任務狀態為:
|
||||
i18n_Stopped=執行結束
|
||||
i18n_Exec=運行中
|
||||
172
frontend/src/components/DeDrag/DragShadow.vue
Normal file
172
frontend/src/components/DeDrag/DragShadow.vue
Normal file
@ -0,0 +1,172 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<Toolbar />
|
||||
|
||||
<main>
|
||||
<!-- 左侧组件列表 -->
|
||||
<!-- <section class="left">-->
|
||||
<!-- <ComponentList />-->
|
||||
<!-- </section>-->
|
||||
<!-- 中间画布 -->
|
||||
<section class="center">
|
||||
<div
|
||||
class="content"
|
||||
@drop="handleDrop"
|
||||
@dragover="handleDragOver"
|
||||
@mousedown="handleMouseDown"
|
||||
@mouseup="deselectCurComponent"
|
||||
>
|
||||
<Editor />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Editor from '@/components/Editor/index'
|
||||
import ComponentList from '@/components/ComponentList' // 左侧列表组件
|
||||
import AttrList from '@/components/canvas/components/AttrList' // 右侧属性列表
|
||||
import AnimationList from '@/components/canvas/components/AnimationList' // 右侧动画列表
|
||||
import EventList from '@/components/canvas/components/EventList' // 右侧事件列表
|
||||
import componentList from '@/components/canvas/custom-component/component-list' // 左侧列表数据
|
||||
import Toolbar from '@/components/Toolbar'
|
||||
import { deepCopy } from '@/utils/utils'
|
||||
import { mapState } from 'vuex'
|
||||
import generateID from '@/utils/generateID'
|
||||
import { listenGlobalKeyDown } from '@/utils/shortcutKey'
|
||||
|
||||
export default {
|
||||
// eslint-disable-next-line vue/no-unused-components
|
||||
components: { Editor, ComponentList, AttrList, AnimationList, EventList, Toolbar },
|
||||
data() {
|
||||
return {
|
||||
activeName: 'attr',
|
||||
reSelectAnimateIndex: undefined
|
||||
}
|
||||
},
|
||||
computed: mapState([
|
||||
'componentData',
|
||||
'curComponent',
|
||||
'isClickComponent',
|
||||
'canvasStyleData'
|
||||
]),
|
||||
created() {
|
||||
this.restore()
|
||||
// 全局监听按键事件
|
||||
listenGlobalKeyDown()
|
||||
},
|
||||
methods: {
|
||||
restore() {
|
||||
// 用保存的数据恢复画布
|
||||
if (localStorage.getItem('canvasData')) {
|
||||
this.$store.commit('setComponentData', this.resetID(JSON.parse(localStorage.getItem('canvasData'))))
|
||||
}
|
||||
|
||||
if (localStorage.getItem('canvasStyle')) {
|
||||
this.$store.commit('setCanvasStyle', JSON.parse(localStorage.getItem('canvasStyle')))
|
||||
}
|
||||
},
|
||||
|
||||
resetID(data) {
|
||||
if (data) {
|
||||
data.forEach(item => {
|
||||
// eslint-disable-next-line no-undef
|
||||
item.type !== 'custom' && (item.id = uuid.v1())
|
||||
})
|
||||
}
|
||||
|
||||
return data
|
||||
},
|
||||
|
||||
handleDrop(e) {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
|
||||
let component
|
||||
const id = e.dataTransfer.getData('componentId')
|
||||
componentList.forEach(componentTemp => {
|
||||
if (id === componentTemp.id) {
|
||||
component = deepCopy(componentTemp)
|
||||
}
|
||||
})
|
||||
// const component = deepCopy(componentList[e.dataTransfer.getData('index')])
|
||||
component.style.top = e.offsetY
|
||||
component.style.left = e.offsetX
|
||||
component.id = generateID()
|
||||
this.$store.commit('addComponent', { component })
|
||||
this.$store.commit('recordSnapshot')
|
||||
},
|
||||
|
||||
handleDragOver(e) {
|
||||
e.preventDefault()
|
||||
e.dataTransfer.dropEffect = 'copy'
|
||||
},
|
||||
|
||||
handleMouseDown() {
|
||||
this.$store.commit('setClickComponentStatus', false)
|
||||
},
|
||||
|
||||
deselectCurComponent(e) {
|
||||
if (!this.isClickComponent) {
|
||||
this.$store.commit('setCurComponent', { component: null, index: null })
|
||||
}
|
||||
|
||||
// 0 左击 1 滚轮 2 右击
|
||||
if (e.button !== 2) {
|
||||
this.$store.commit('hideContextMenu')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.home {
|
||||
height: 100vh;
|
||||
background: #fff;
|
||||
|
||||
main {
|
||||
height: calc(100% - 64px);
|
||||
position: relative;
|
||||
|
||||
.left {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 200px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.right {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 262px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.center {
|
||||
margin-left: 200px;
|
||||
margin-right: 262px;
|
||||
background: #f5f5f5;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding: 20px;
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -275,6 +275,7 @@ export default {
|
||||
// 第一次变化 不需要 重置边界 待改进
|
||||
if (this.changeIndex++ > 0) {
|
||||
this.resizeParentBounds()
|
||||
this.$store.state.styleChangeTimes++
|
||||
}
|
||||
// this.changeScale()
|
||||
},
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<el-col>
|
||||
<el-form ref="colorForm" :model="colorForm" label-width="80px" size="mini">
|
||||
<el-form-item :label="$t('chart.color')" class="form-item">
|
||||
<colorPicker v-model="colorForm.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeBackgroundStyle" />
|
||||
<el-color-picker v-model="colorForm.color" style="cursor: pointer;z-index: 1004;" @change="changeBackgroundStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.not_alpha')" class="form-item form-item-slider">
|
||||
<el-slider v-model="colorForm.alpha" show-input :show-input-controls="false" input-size="mini" @change="changeBackgroundStyle" />
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.text_color')" class="form-item">
|
||||
<colorPicker v-model="legendForm.textStyle.color" style="margin-top: 6px;cursor: pointer;z-index: 999;border: solid 1px black" @change="changeLegendStyle" />
|
||||
<el-color-picker v-model="legendForm.textStyle.color" style="cursor: pointer;z-index: 999;" @change="changeLegendStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.text_h_position')" class="form-item">
|
||||
<el-radio-group v-model="legendForm.hPosition" size="mini" @change="changeLegendStyle">
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<el-checkbox v-model="splitForm.name.show" @change="changeSplitStyle">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.color')" class="form-item">
|
||||
<colorPicker v-model="splitForm.name.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeSplitStyle" />
|
||||
<el-color-picker v-model="splitForm.name.color" style="cursor: pointer;z-index: 1004;" @change="changeSplitStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.text_fontsize')" class="form-item form-item-slider">
|
||||
<el-select v-model="splitForm.name.fontSize" :placeholder="$t('chart.text_fontsize')" @change="changeSplitStyle">
|
||||
@ -23,13 +23,13 @@
|
||||
<el-checkbox v-model="splitForm.axisLine.show" @change="changeSplitStyle">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_color')" class="form-item">
|
||||
<colorPicker v-model="splitForm.axisLine.lineStyle.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeSplitStyle" />
|
||||
<el-color-picker v-model="splitForm.axisLine.lineStyle.color" style="cursor: pointer;z-index: 1004;" @change="changeSplitStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_label')" class="form-item">
|
||||
<el-checkbox v-model="splitForm.axisLabel.show" @change="changeSplitStyle">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_label_color')" class="form-item">
|
||||
<colorPicker v-model="splitForm.axisLabel.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeSplitStyle" />
|
||||
<el-color-picker v-model="splitForm.axisLabel.color" style="cursor: pointer;z-index: 1004;" @change="changeSplitStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.label_fontsize')" class="form-item form-item-slider">
|
||||
<el-select v-model="splitForm.axisLabel.fontSize" :placeholder="$t('chart.label_fontsize')" @change="changeSplitStyle">
|
||||
@ -40,7 +40,7 @@
|
||||
<el-checkbox v-model="splitForm.splitLine.show" @change="changeSplitStyle">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.split_color')" class="form-item">
|
||||
<colorPicker v-model="splitForm.splitLine.lineStyle.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeSplitStyle" />
|
||||
<el-color-picker v-model="splitForm.splitLine.lineStyle.color" style="cursor: pointer;z-index: 1004;" @change="changeSplitStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.shadow')" class="form-item">
|
||||
<el-checkbox v-model="splitForm.splitArea.show" @change="changeSplitStyle">{{ $t('chart.show') }}</el-checkbox>
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.text_color')" class="form-item">
|
||||
<colorPicker v-model="titleForm.color" style="margin-top: 6px;cursor: pointer;z-index: 999;border: solid 1px black" @change="changeTitleStyle" />
|
||||
<el-color-picker v-model="titleForm.color" style="cursor: pointer;z-index: 999;" @change="changeTitleStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.text_h_position')" class="form-item">
|
||||
<el-radio-group v-model="titleForm.hPosition" size="mini" @change="changeTitleStyle">
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<el-input v-model="axisForm.name" size="mini" @blur="changeXAxisStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_name_color')" class="form-item">
|
||||
<colorPicker v-model="axisForm.nameTextStyle.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeXAxisStyle" />
|
||||
<el-color-picker v-model="axisForm.nameTextStyle.color" style="cursor: pointer;z-index: 1004;" @change="changeXAxisStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_name_fontsize')" class="form-item form-item-slider">
|
||||
<el-select v-model="axisForm.nameTextStyle.fontSize" :placeholder="$t('chart.axis_name_fontsize')" @change="changeXAxisStyle">
|
||||
@ -35,7 +35,7 @@
|
||||
</el-form-item>
|
||||
<span v-show="axisForm.splitLine.show">
|
||||
<el-form-item :label="$t('chart.axis_color')" class="form-item">
|
||||
<colorPicker v-model="axisForm.splitLine.lineStyle.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeXAxisStyle" />
|
||||
<el-color-picker v-model="axisForm.splitLine.lineStyle.color" style="cursor: pointer;z-index: 1004;" @change="changeXAxisStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_width')" class="form-item form-item-slider">
|
||||
<el-slider v-model="axisForm.splitLine.lineStyle.width" :min="1" :max="10" show-input :show-input-controls="false" input-size="mini" @change="changeXAxisStyle" />
|
||||
@ -54,7 +54,7 @@
|
||||
</el-form-item>
|
||||
<span v-show="axisForm.axisLabel.show">
|
||||
<el-form-item :label="$t('chart.axis_label_color')" class="form-item">
|
||||
<colorPicker v-model="axisForm.axisLabel.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeXAxisStyle" />
|
||||
<el-color-picker v-model="axisForm.axisLabel.color" style="cursor: pointer;z-index: 1004;" @change="changeXAxisStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_label_rotate')" class="form-item form-item-slider">
|
||||
<el-slider v-model="axisForm.axisLabel.rotate" show-input :show-input-controls="false" :min="-90" :max="90" input-size="mini" @change="changeXAxisStyle" />
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<el-input v-model="axisForm.name" size="mini" @blur="changeYAxisStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_name_color')" class="form-item">
|
||||
<colorPicker v-model="axisForm.nameTextStyle.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeYAxisStyle" />
|
||||
<el-color-picker v-model="axisForm.nameTextStyle.color" style="cursor: pointer;z-index: 1004;" @change="changeYAxisStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_name_fontsize')" class="form-item form-item-slider">
|
||||
<el-select v-model="axisForm.nameTextStyle.fontSize" :placeholder="$t('chart.axis_name_fontsize')" @change="changeYAxisStyle">
|
||||
@ -35,7 +35,7 @@
|
||||
</el-form-item>
|
||||
<span v-show="axisForm.splitLine.show">
|
||||
<el-form-item :label="$t('chart.axis_color')" class="form-item">
|
||||
<colorPicker v-model="axisForm.splitLine.lineStyle.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeYAxisStyle" />
|
||||
<el-color-picker v-model="axisForm.splitLine.lineStyle.color" style="cursor: pointer;z-index: 1004;" @change="changeYAxisStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_width')" class="form-item form-item-slider">
|
||||
<el-slider v-model="axisForm.splitLine.lineStyle.width" :min="1" :max="10" show-input :show-input-controls="false" input-size="mini" @change="changeYAxisStyle" />
|
||||
@ -54,7 +54,7 @@
|
||||
</el-form-item>
|
||||
<span v-show="axisForm.axisLabel.show">
|
||||
<el-form-item :label="$t('chart.axis_label_color')" class="form-item">
|
||||
<colorPicker v-model="axisForm.axisLabel.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeYAxisStyle" />
|
||||
<el-color-picker v-model="axisForm.axisLabel.color" style="cursor: pointer;z-index: 1004;" @change="changeYAxisStyle" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.axis_label_rotate')" class="form-item form-item-slider">
|
||||
<el-slider v-model="axisForm.axisLabel.rotate" show-input :show-input-controls="false" :min="-90" :max="90" input-size="mini" @change="changeYAxisStyle" />
|
||||
|
||||
@ -6,15 +6,15 @@
|
||||
id="label-content"
|
||||
:style="content_class"
|
||||
>
|
||||
<p v-for="item in chart.data.series" :key="item.name" :style="label_content_class">
|
||||
{{ item.data[0] }}
|
||||
</p>
|
||||
<span v-if="quotaShow" :style="label_space">
|
||||
<p v-if="dimensionShow" :style="label_class">
|
||||
<!-- {{ chart.data.x[0] }}-->
|
||||
{{ chart.data.series[0].name }}
|
||||
<p v-for="item in chart.data.series" :key="item.name" :style="label_content_class">
|
||||
{{ item.data[0] }}
|
||||
</p>
|
||||
</span>
|
||||
<p v-if="dimensionShow" :style="label_class">
|
||||
<!-- {{ chart.data.x[0] }}-->
|
||||
{{ chart.data.series[0].name }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -21,21 +21,21 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="(chart.type && chart.type.includes('text')) || sourceType==='panelTable'" :label="$t('chart.dimension_color')" class="form-item">
|
||||
<colorPicker v-model="colorForm.dimensionColor" style="margin-top: 6px;cursor: pointer;z-index: 1003;border: solid 1px black" @change="changeColorCase" />
|
||||
<el-color-picker v-model="colorForm.dimensionColor" style="cursor: pointer;z-index: 1003;" @change="changeColorCase" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="(chart.type && chart.type.includes('text')) || sourceType==='panelTable'" :label="$t('chart.quota_color')" class="form-item">
|
||||
<colorPicker v-model="colorForm.quotaColor" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeColorCase" />
|
||||
<el-color-picker v-model="colorForm.quotaColor" style="cursor: pointer;z-index: 1004;" @change="changeColorCase" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="sourceType==='view' || sourceType==='panelTable'">
|
||||
<el-form-item v-show="(chart.type && chart.type.includes('table')) || sourceType==='panelTable'" :label="$t('chart.table_header_bg')" class="form-item">
|
||||
<colorPicker v-model="colorForm.tableHeaderBgColor" style="margin-top: 6px;cursor: pointer;z-index: 1002;border: solid 1px black" @change="changeColorCase" />
|
||||
<el-color-picker v-model="colorForm.tableHeaderBgColor" style="cursor: pointer;z-index: 1002;" @change="changeColorCase" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="(chart.type && chart.type.includes('table')) || sourceType==='panelTable'" :label="$t('chart.table_item_bg')" class="form-item">
|
||||
<colorPicker v-model="colorForm.tableItemBgColor" style="margin-top: 6px;cursor: pointer;z-index: 1003;border: solid 1px black" @change="changeColorCase" />
|
||||
<el-color-picker v-model="colorForm.tableItemBgColor" style="cursor: pointer;z-index: 1003;" @change="changeColorCase" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="(chart.type && chart.type.includes('table')) || sourceType==='panelTable'" :label="$t('chart.table_item_font_color')" class="form-item">
|
||||
<colorPicker v-model="colorForm.tableFontColor" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" @change="changeColorCase" />
|
||||
<el-color-picker v-model="colorForm.tableFontColor" style="cursor: pointer;z-index: 1004;" @change="changeColorCase" />
|
||||
</el-form-item>
|
||||
<!-- 暂时不支持该功能-->
|
||||
<!-- <el-form-item v-show="(chart.type && chart.type.includes('table')) || sourceType==='panelTable'" :label="$t('chart.stripe')" class="form-item">-->
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.text_color')" class="form-item">
|
||||
<colorPicker v-model="labelForm.color" style="margin-top: 6px;cursor: pointer;z-index: 999;border: solid 1px black" @change="changeLabelAttr" />
|
||||
<el-color-picker v-model="labelForm.color" style="cursor: pointer;z-index: 999;" @change="changeLabelAttr" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.label_position')" class="form-item">
|
||||
<el-select v-model="labelForm.position" :placeholder="$t('chart.label_position')" @change="changeLabelAttr">
|
||||
@ -54,7 +54,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.text_color')" class="form-item">
|
||||
<colorPicker v-model="labelForm.color" style="margin-top: 6px;cursor: pointer;z-index: 999;border: solid 1px black" @change="changeLabelAttr" />
|
||||
<el-color-picker v-model="labelForm.color" style="cursor: pointer;z-index: 999;" @change="changeLabelAttr" />
|
||||
</el-form-item>
|
||||
<el-form-item class="form-item">
|
||||
<span slot="label">
|
||||
|
||||
@ -121,14 +121,6 @@
|
||||
</el-form>
|
||||
|
||||
<el-form v-show="chart.type && chart.type.includes('text')" ref="sizeFormPie" :model="sizeForm" label-width="100px" size="mini">
|
||||
<el-form-item :label="$t('chart.dimension_show')" class="form-item">
|
||||
<el-checkbox v-model="sizeForm.dimensionShow" @change="changeBarSizeCase">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.dimension_font_size')" class="form-item">
|
||||
<el-select v-model="sizeForm.dimensionFontSize" :placeholder="$t('chart.dimension_font_size')" @change="changeBarSizeCase">
|
||||
<el-option v-for="option in fontSize" :key="option.value" :label="option.name" :value="option.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.quota_show')" class="form-item">
|
||||
<el-checkbox v-model="sizeForm.quotaShow" @change="changeBarSizeCase">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
@ -137,6 +129,14 @@
|
||||
<el-option v-for="option in fontSize" :key="option.value" :label="option.name" :value="option.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.dimension_show')" class="form-item">
|
||||
<el-checkbox v-model="sizeForm.dimensionShow" @change="changeBarSizeCase">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.dimension_font_size')" class="form-item">
|
||||
<el-select v-model="sizeForm.dimensionFontSize" :placeholder="$t('chart.dimension_font_size')" @change="changeBarSizeCase">
|
||||
<el-option v-for="option in fontSize" :key="option.value" :label="option.name" :value="option.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.space_split')" class="form-item">
|
||||
<el-input-number v-model="sizeForm.spaceSplit" size="mini" @change="changeBarSizeCase" />
|
||||
</el-form-item>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.text_color')" class="form-item">
|
||||
<colorPicker v-model="tooltipForm.textStyle.color" style="margin-top: 6px;cursor: pointer;z-index: 999;border: solid 1px black" @change="changeTooltipAttr" />
|
||||
<el-color-picker v-model="tooltipForm.textStyle.color" style="cursor: pointer;z-index: 999;" @change="changeTooltipAttr" />
|
||||
</el-form-item>
|
||||
<el-form-item class="form-item">
|
||||
<span slot="label">
|
||||
|
||||
@ -257,13 +257,13 @@
|
||||
|
||||
<!--添加视图-选择数据集-->
|
||||
<el-dialog
|
||||
v-if="selectTableFlag"
|
||||
v-dialogDrag
|
||||
:title="$t('chart.add_chart')"
|
||||
:visible="selectTableFlag"
|
||||
:show-close="false"
|
||||
width="70%"
|
||||
class="dialog-css"
|
||||
:destroy-on-close="true"
|
||||
>
|
||||
<el-row style="width: 800px;">
|
||||
<el-form ref="form" :model="table" label-width="80px" size="mini" class="form-item">
|
||||
@ -1045,10 +1045,12 @@ export default {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.father .child {
|
||||
display: none;
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
}
|
||||
.father:hover .child {
|
||||
display: inline;
|
||||
/*display: inline;*/
|
||||
visibility: visible;
|
||||
}
|
||||
.tree-style {
|
||||
padding: 10px 15px;
|
||||
|
||||
@ -398,13 +398,13 @@
|
||||
|
||||
<!--视图更换数据集-->
|
||||
<el-dialog
|
||||
v-if="selectTableFlag"
|
||||
v-dialogDrag
|
||||
:title="changeDsTitle"
|
||||
:visible="selectTableFlag"
|
||||
:show-close="false"
|
||||
width="70%"
|
||||
class="dialog-css"
|
||||
:destroy-on-close="true"
|
||||
>
|
||||
<table-selector @getTable="getTable" />
|
||||
<p style="margin-top: 10px;color:#F56C6C;font-size: 12px;">{{ $t('chart.change_ds_tip') }}</p>
|
||||
@ -416,11 +416,11 @@
|
||||
|
||||
<!--编辑视图使用的数据集的字段-->
|
||||
<el-dialog
|
||||
v-if="editDsField"
|
||||
v-dialogDrag
|
||||
:visible="editDsField"
|
||||
:show-close="false"
|
||||
class="dialog-css"
|
||||
:destroy-on-close="true"
|
||||
:fullscreen="true"
|
||||
>
|
||||
<field-edit :param="{table:table}" @switchComponent="closeEditDsField" />
|
||||
|
||||
@ -68,7 +68,6 @@
|
||||
|
||||
<script>
|
||||
import { isKettleRunning, post } from '@/api/dataset/dataset'
|
||||
import { authModel } from '@/api/system/sysAuth'
|
||||
import { hasDataPermission } from '@/utils/permission'
|
||||
|
||||
export default {
|
||||
@ -403,11 +402,14 @@ export default {
|
||||
|
||||
searchTree(val) {
|
||||
const queryCondition = {
|
||||
withExtend: 'parent',
|
||||
modelType: 'dataset',
|
||||
// withExtend: 'parent',
|
||||
// modelType: 'dataset',
|
||||
name: val
|
||||
}
|
||||
authModel(queryCondition).then(res => {
|
||||
// authModel(queryCondition).then(res => {
|
||||
// this.data = this.buildTree(res.data)
|
||||
// })
|
||||
post('/dataset/table/search', queryCondition).then(res => {
|
||||
this.data = this.buildTree(res.data)
|
||||
})
|
||||
},
|
||||
@ -420,8 +422,8 @@ export default {
|
||||
const roots = []
|
||||
arrs.forEach(el => {
|
||||
// 判断根节点 ###
|
||||
el.type = el.modelInnerType
|
||||
el.isLeaf = el.leaf
|
||||
// el.type = el.modelInnerType
|
||||
// el.isLeaf = el.leaf
|
||||
if (el[this.treeProps.parentId] === null || el[this.treeProps.parentId] === 0 || el[this.treeProps.parentId] === '0') {
|
||||
roots.push(el)
|
||||
return
|
||||
|
||||
@ -433,10 +433,14 @@ export default {
|
||||
created() {
|
||||
this.timer = setInterval(() => {
|
||||
this.listTaskLog(false)
|
||||
}, 5000);
|
||||
this.taskTimer = setInterval(() => {
|
||||
this.listTask(false)
|
||||
}, 5000)
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer)
|
||||
clearInterval(this.taskTimer)
|
||||
},
|
||||
methods: {
|
||||
calHeight() {
|
||||
|
||||
@ -989,10 +989,12 @@ export default {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.father .child {
|
||||
display: none;
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
}
|
||||
.father:hover .child {
|
||||
display: inline;
|
||||
/*display: inline;*/
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.dialog-css >>> .el-dialog__body {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<el-radio v-model="panel.backgroundType" label="color" @change="onChangeType">{{ $t('chart.color') }}</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<colorPicker v-model="panel.color" style="margin-top: 6px;cursor: pointer;z-index: 1004;border: solid 1px black" />
|
||||
<el-color-picker v-model="panel.color" style="cursor: pointer;z-index: 1004;" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="height: 60px;margin-top:10px;overflow: hidden">
|
||||
|
||||
@ -647,10 +647,12 @@ export default {
|
||||
}
|
||||
|
||||
.father .child {
|
||||
display: none;
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
}
|
||||
.father:hover .child {
|
||||
display: inline;
|
||||
/*display: inline;*/
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -298,10 +298,12 @@ export default {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.father .child {
|
||||
display: none;
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
}
|
||||
.father:hover .child {
|
||||
display: inline;
|
||||
/*display: inline;*/
|
||||
visibility: visible;
|
||||
}
|
||||
.tree-style {
|
||||
padding: 10px 15px;
|
||||
|
||||
@ -416,15 +416,21 @@ export default {
|
||||
this.update_task = true
|
||||
},
|
||||
changeTaskStatus(task) {
|
||||
const param = task
|
||||
let param = JSON.parse(JSON.stringify(task));
|
||||
param.status = task.status === 'Underway' ? 'Pending' : 'Underway'
|
||||
post('/dataset/task/updateStatus', task).then(response => {
|
||||
task.status = param.status
|
||||
this.$message({
|
||||
message: this.$t('dataset.task.change_success'),
|
||||
type: 'success',
|
||||
showClose: true
|
||||
})
|
||||
post('/dataset/task/updateStatus', param).then(response => {
|
||||
if(response.success){
|
||||
task.status = param.status
|
||||
this.$message({
|
||||
message: this.$t('dataset.task.change_success'),
|
||||
type: 'success',
|
||||
showClose: true
|
||||
})
|
||||
}else {
|
||||
this.search(this.last_condition, false)
|
||||
}
|
||||
}).catch(() => {
|
||||
this.search(this.last_condition, false)
|
||||
})
|
||||
},
|
||||
execTask(task) {
|
||||
|
||||
@ -140,8 +140,8 @@ export default {
|
||||
createTimer() {
|
||||
if (!this.timer) {
|
||||
this.timer = setInterval(() => {
|
||||
this.search(this.last_condition, false)
|
||||
}, 1000)
|
||||
this.timerSearch(this.last_condition, false)
|
||||
}, 15000)
|
||||
}
|
||||
},
|
||||
destroyTimer() {
|
||||
@ -168,7 +168,7 @@ export default {
|
||||
},
|
||||
select(selection) {
|
||||
},
|
||||
search(condition, showLoading = true) {
|
||||
timerSearch(condition, showLoading = true) {
|
||||
if(!this.lastRequestComplete){
|
||||
return;
|
||||
}else {
|
||||
@ -188,6 +188,17 @@ export default {
|
||||
this.lastRequestComplete = true;
|
||||
})
|
||||
},
|
||||
search(condition, showLoading = true) {
|
||||
this.last_condition = condition
|
||||
condition = formatQuickCondition(condition, 'dataset_table_task.name')
|
||||
const temp = formatCondition(condition)
|
||||
const param = temp || {}
|
||||
param['orders'] = formatOrders(this.orderConditions)
|
||||
post('/dataset/taskLog/list/notexcel/' + this.paginationConfig.currentPage + '/' + this.paginationConfig.pageSize, param, showLoading).then(response => {
|
||||
this.data = response.data.listObject
|
||||
this.paginationConfig.total = response.data.itemCount
|
||||
})
|
||||
},
|
||||
showErrorMassage(massage) {
|
||||
this.show_error_massage = true
|
||||
this.error_massage = massage
|
||||
|
||||
Loading…
Reference in New Issue
Block a user