提交 3de8579e authored 作者: junjie's avatar junjie

feat(数据集): 数据集 定时任务

上级 7254b65b
package io.dataease.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class DatasetTableTask implements Serializable {
private String id;
private String tableId;
private String name;
private String type;
private Long startTime;
private String rate;
private String cron;
private String end;
private Long endTime;
private Long createTime;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.dataease.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class DatasetTableTaskLog implements Serializable {
private String id;
private String tableId;
private String taskId;
private Long startTime;
private Long endTime;
private String status;
private String info;
private Long createTime;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.dataease.base.mapper;
import io.dataease.base.domain.DatasetTableTaskLog;
import io.dataease.base.domain.DatasetTableTaskLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DatasetTableTaskLogMapper {
long countByExample(DatasetTableTaskLogExample example);
int deleteByExample(DatasetTableTaskLogExample example);
int deleteByPrimaryKey(String id);
int insert(DatasetTableTaskLog record);
int insertSelective(DatasetTableTaskLog record);
List<DatasetTableTaskLog> selectByExample(DatasetTableTaskLogExample example);
DatasetTableTaskLog selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") DatasetTableTaskLog record, @Param("example") DatasetTableTaskLogExample example);
int updateByExample(@Param("record") DatasetTableTaskLog record, @Param("example") DatasetTableTaskLogExample example);
int updateByPrimaryKeySelective(DatasetTableTaskLog record);
int updateByPrimaryKey(DatasetTableTaskLog record);
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.dataease.base.mapper.DatasetTableTaskLogMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.DatasetTableTaskLog">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="table_id" jdbcType="VARCHAR" property="tableId" />
<result column="task_id" jdbcType="VARCHAR" property="taskId" />
<result column="start_time" jdbcType="BIGINT" property="startTime" />
<result column="end_time" jdbcType="BIGINT" property="endTime" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="info" jdbcType="VARCHAR" property="info" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, table_id, task_id, start_time, end_time, `status`, info, create_time
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.DatasetTableTaskLogExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from dataset_table_task_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from dataset_table_task_log
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from dataset_table_task_log
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.DatasetTableTaskLogExample">
delete from dataset_table_task_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.DatasetTableTaskLog">
insert into dataset_table_task_log (id, table_id, task_id,
start_time, end_time, `status`,
info, create_time)
values (#{id,jdbcType=VARCHAR}, #{tableId,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR},
#{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR},
#{info,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.DatasetTableTaskLog">
insert into dataset_table_task_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="tableId != null">
table_id,
</if>
<if test="taskId != null">
task_id,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="status != null">
`status`,
</if>
<if test="info != null">
info,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="tableId != null">
#{tableId,jdbcType=VARCHAR},
</if>
<if test="taskId != null">
#{taskId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=BIGINT},
</if>
<if test="endTime != null">
#{endTime,jdbcType=BIGINT},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="info != null">
#{info,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.DatasetTableTaskLogExample" resultType="java.lang.Long">
select count(*) from dataset_table_task_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update dataset_table_task_log
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.tableId != null">
table_id = #{record.tableId,jdbcType=VARCHAR},
</if>
<if test="record.taskId != null">
task_id = #{record.taskId,jdbcType=VARCHAR},
</if>
<if test="record.startTime != null">
start_time = #{record.startTime,jdbcType=BIGINT},
</if>
<if test="record.endTime != null">
end_time = #{record.endTime,jdbcType=BIGINT},
</if>
<if test="record.status != null">
`status` = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.info != null">
info = #{record.info,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update dataset_table_task_log
set id = #{record.id,jdbcType=VARCHAR},
table_id = #{record.tableId,jdbcType=VARCHAR},
task_id = #{record.taskId,jdbcType=VARCHAR},
start_time = #{record.startTime,jdbcType=BIGINT},
end_time = #{record.endTime,jdbcType=BIGINT},
`status` = #{record.status,jdbcType=VARCHAR},
info = #{record.info,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.DatasetTableTaskLog">
update dataset_table_task_log
<set>
<if test="tableId != null">
table_id = #{tableId,jdbcType=VARCHAR},
</if>
<if test="taskId != null">
task_id = #{taskId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=BIGINT},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=BIGINT},
</if>
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="info != null">
info = #{info,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.DatasetTableTaskLog">
update dataset_table_task_log
set table_id = #{tableId,jdbcType=VARCHAR},
task_id = #{taskId,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=BIGINT},
end_time = #{endTime,jdbcType=BIGINT},
`status` = #{status,jdbcType=VARCHAR},
info = #{info,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
package io.dataease.base.mapper;
import io.dataease.base.domain.DatasetTableTask;
import io.dataease.base.domain.DatasetTableTaskExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DatasetTableTaskMapper {
long countByExample(DatasetTableTaskExample example);
int deleteByExample(DatasetTableTaskExample example);
int deleteByPrimaryKey(String id);
int insert(DatasetTableTask record);
int insertSelective(DatasetTableTask record);
List<DatasetTableTask> selectByExample(DatasetTableTaskExample example);
DatasetTableTask selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") DatasetTableTask record, @Param("example") DatasetTableTaskExample example);
int updateByExample(@Param("record") DatasetTableTask record, @Param("example") DatasetTableTaskExample example);
int updateByPrimaryKeySelective(DatasetTableTask record);
int updateByPrimaryKey(DatasetTableTask record);
}
\ No newline at end of file
package io.dataease.controller.dataset;
import io.dataease.base.domain.DatasetTableTask;
import io.dataease.service.dataset.DataSetTableTaskService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author gin
* @Date 2021/3/4 1:32 下午
*/
@RestController
@RequestMapping("dataset/task")
public class DataSetTableTaskController {
@Resource
private DataSetTableTaskService dataSetTableTaskService;
@PostMapping("save")
public DatasetTableTask save(@RequestBody DatasetTableTask datasetTableTask) {
return dataSetTableTaskService.save(datasetTableTask);
}
@PostMapping("delete/{id}")
public void delete(@PathVariable String id) {
dataSetTableTaskService.delete(id);
}
@PostMapping("list")
public List<DatasetTableTask> list(@RequestBody DatasetTableTask datasetTableTask) {
return dataSetTableTaskService.list(datasetTableTask);
}
}
package io.dataease.controller.dataset;
import io.dataease.base.domain.DatasetTableTaskLog;
import io.dataease.service.dataset.DataSetTableTaskLogService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @Author gin
* @Date 2021/3/4 1:32 下午
*/
@RestController
@RequestMapping("dataset/taskLog")
public class DataSetTableTaskLogController {
@Resource
private DataSetTableTaskLogService dataSetTableTaskLogService;
@PostMapping("save")
public DatasetTableTaskLog save(@RequestBody DatasetTableTaskLog datasetTableTaskLog) {
return dataSetTableTaskLogService.save(datasetTableTaskLog);
}
@PostMapping("delete/{id}")
public void delete(@PathVariable String id) {
dataSetTableTaskLogService.delete(id);
}
}
package io.dataease.service.dataset;
import io.dataease.base.domain.DatasetTableTaskLog;
import io.dataease.base.mapper.DatasetTableTaskLogMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.UUID;
/**
* @Author gin
* @Date 2021/3/4 1:26 下午
*/
@Service
public class DataSetTableTaskLogService {
@Resource
private DatasetTableTaskLogMapper datasetTableTaskLogMapper;
public DatasetTableTaskLog save(DatasetTableTaskLog datasetTableTaskLog) {
if (StringUtils.isEmpty(datasetTableTaskLog.getId())) {
datasetTableTaskLog.setId(UUID.randomUUID().toString());
datasetTableTaskLog.setCreateTime(System.currentTimeMillis());
datasetTableTaskLogMapper.insert(datasetTableTaskLog);
} else {
datasetTableTaskLogMapper.updateByPrimaryKey(datasetTableTaskLog);
}
return datasetTableTaskLog;
}
public void delete(String id) {
datasetTableTaskLogMapper.deleteByPrimaryKey(id);
}
}
package io.dataease.service.dataset;
import io.dataease.base.domain.DatasetTableTask;
import io.dataease.base.domain.DatasetTableTaskExample;
import io.dataease.base.mapper.DatasetTableTaskMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.UUID;
/**
* @Author gin
* @Date 2021/3/4 1:26 下午
*/
@Service
public class DataSetTableTaskService {
@Resource
private DatasetTableTaskMapper datasetTableTaskMapper;
public DatasetTableTask save(DatasetTableTask datasetTableTask) {
if (StringUtils.isEmpty(datasetTableTask.getId())) {
datasetTableTask.setId(UUID.randomUUID().toString());
datasetTableTask.setCreateTime(System.currentTimeMillis());
datasetTableTaskMapper.insert(datasetTableTask);
} else {
datasetTableTaskMapper.updateByPrimaryKey(datasetTableTask);
}
return datasetTableTask;
}
public void delete(String id) {
datasetTableTaskMapper.deleteByPrimaryKey(id);
}
public List<DatasetTableTask> list(DatasetTableTask datasetTableTask) {
DatasetTableTaskExample datasetTableTaskExample = new DatasetTableTaskExample();
DatasetTableTaskExample.Criteria criteria = datasetTableTaskExample.createCriteria();
if (StringUtils.isNotEmpty(datasetTableTask.getTableId())) {
criteria.andTableIdEqualTo(datasetTableTask.getTableId());
}
datasetTableTaskExample.setOrderByClause("create_time desc,name asc");
return datasetTableTaskMapper.selectByExample(datasetTableTaskExample);
}
}
...@@ -32,3 +32,36 @@ CREATE TABLE IF NOT EXISTS `dataset_table_field` ...@@ -32,3 +32,36 @@ CREATE TABLE IF NOT EXISTS `dataset_table_field`
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4; DEFAULT CHARSET = utf8mb4;
DROP TABLE IF EXISTS `dataset_table_task`;
CREATE TABLE IF NOT EXISTS `dataset_table_task`
(
`id` varchar(50) NOT NULL COMMENT 'ID',
`table_id` varchar(50) NOT NULL COMMENT '表ID',
`name` varchar(255) NOT NULL COMMENT '任务名称',
`type` varchar(50) NOT NULL COMMENT '更新方式:0-全量更新 1-增量更新',
`start_time` bigint(13) COMMENT '开始时间',
`rate` varchar(50) NOT NULL COMMENT '执行频率',
`cron` varchar(255) COMMENT 'cron表达式',
`end` varchar(50) NOT NULL COMMENT '结束限制',
`end_time` bigint(13) COMMENT '结束时间',
`create_time` bigint(13) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `IDX_TABLE_ID` (`table_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
DROP TABLE IF EXISTS `dataset_table_task_log`;
CREATE TABLE IF NOT EXISTS `dataset_table_task_log`
(
`id` varchar(50) NOT NULL COMMENT 'ID',
`table_id` varchar(50) NOT NULL COMMENT '表ID',
`task_id` varchar(50) NOT NULL COMMENT '任务ID',
`start_time` bigint(13) COMMENT '开始时间',
`end_time` bigint(13) COMMENT '结束时间',
`status` varchar(50) NOT NULL COMMENT '执行状态',
`info` varchar(255) COMMENT '执行内容',
`create_time` bigint(13) COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `IDX_TABLE_ID` (`task_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
...@@ -4,6 +4,7 @@ export function post(url, data) { ...@@ -4,6 +4,7 @@ export function post(url, data) {
return request({ return request({
url: url, url: url,
method: 'post', method: 'post',
loading: true,
data data
}) })
} }
...@@ -4,6 +4,7 @@ export function loadTable(data) { ...@@ -4,6 +4,7 @@ export function loadTable(data) {
return request({ return request({
url: '/dataset/table/list', url: '/dataset/table/list',
method: 'post', method: 'post',
loading: true,
data data
}) })
} }
...@@ -11,6 +12,7 @@ export function loadTable(data) { ...@@ -11,6 +12,7 @@ export function loadTable(data) {
export function getScene(sceneId) { export function getScene(sceneId) {
return request({ return request({
url: '/dataset/group/getScene/' + sceneId, url: '/dataset/group/getScene/' + sceneId,
loading: true,
method: 'post' method: 'post'
}) })
} }
...@@ -19,6 +21,7 @@ export function addGroup(data) { ...@@ -19,6 +21,7 @@ export function addGroup(data) {
return request({ return request({
url: '/dataset/group/save', url: '/dataset/group/save',
method: 'post', method: 'post',
loading: true,
data data
}) })
} }
...@@ -26,6 +29,7 @@ export function addGroup(data) { ...@@ -26,6 +29,7 @@ export function addGroup(data) {
export function delGroup(groupId) { export function delGroup(groupId) {
return request({ return request({
url: '/dataset/group/delete/' + groupId, url: '/dataset/group/delete/' + groupId,
loading: true,
method: 'post' method: 'post'
}) })
} }
...@@ -34,6 +38,7 @@ export function addTable(data) { ...@@ -34,6 +38,7 @@ export function addTable(data) {
return request({ return request({
url: '/dataset/table/update', url: '/dataset/table/update',
method: 'post', method: 'post',
loading: true,
data data
}) })
} }
...@@ -41,6 +46,7 @@ export function addTable(data) { ...@@ -41,6 +46,7 @@ export function addTable(data) {
export function delTable(tableId) { export function delTable(tableId) {
return request({ return request({
url: '/dataset/table/delete/' + tableId, url: '/dataset/table/delete/' + tableId,
loading: true,
method: 'post' method: 'post'
}) })
} }
...@@ -49,6 +55,7 @@ export function groupTree(data) { ...@@ -49,6 +55,7 @@ export function groupTree(data) {
return request({ return request({
url: '/dataset/group/tree', url: '/dataset/group/tree',
method: 'post', method: 'post',
loading: true,
data data
}) })
} }
...@@ -56,6 +63,7 @@ export function groupTree(data) { ...@@ -56,6 +63,7 @@ export function groupTree(data) {
export function listDatasource() { export function listDatasource() {
return request({ return request({
url: '/datasource/list', url: '/datasource/list',
loading: true,
method: 'get' method: 'get'
}) })
} }
...@@ -63,6 +71,7 @@ export function listDatasource() { ...@@ -63,6 +71,7 @@ export function listDatasource() {
export function getTable(id) { export function getTable(id) {
return request({ return request({
url: '/dataset/table/get/' + id, url: '/dataset/table/get/' + id,
loading: true,
method: 'post' method: 'post'
}) })
} }
...@@ -71,6 +80,7 @@ export function getPreviewData(data) { ...@@ -71,6 +80,7 @@ export function getPreviewData(data) {
return request({ return request({
url: '/dataset/table/getPreviewData', url: '/dataset/table/getPreviewData',
method: 'post', method: 'post',
loading: true,
data data
}) })
} }
...@@ -78,6 +88,7 @@ export function getPreviewData(data) { ...@@ -78,6 +88,7 @@ export function getPreviewData(data) {
export function fieldList(id) { export function fieldList(id) {
return request({ return request({
url: '/dataset/field/list/' + id, url: '/dataset/field/list/' + id,
loading: true,
method: 'post' method: 'post'
}) })
} }
...@@ -86,6 +97,7 @@ export function batchEdit(data) { ...@@ -86,6 +97,7 @@ export function batchEdit(data) {
return request({ return request({
url: '/dataset/field/batchEdit', url: '/dataset/field/batchEdit',
method: 'post', method: 'post',
loading: true,
data data
}) })
} }
...@@ -94,6 +106,7 @@ export function post(url, data) { ...@@ -94,6 +106,7 @@ export function post(url, data) {
return request({ return request({
url: url, url: url,
method: 'post', method: 'post',
loading: true,
data data
}) })
} }
......
...@@ -609,7 +609,26 @@ export default { ...@@ -609,7 +609,26 @@ export default {
sync_data: '定时同步', sync_data: '定时同步',
update_setting: '更新设置', update_setting: '更新设置',
sync_now: '立即更新', sync_now: '立即更新',
add_task: '添加任务' add_task: '添加任务',
task_name: '任务名称',
start_time: '开始时间',
end_time: '结束时间',
status: '状态',
task_update: '定时更新',
update_type: '更新方式',
all_scope: '全量更新',
add_scope: '增量更新',
select_data_time: '选择日期时间',
execute_rate: '执行频率',
execute_once: '只执行一次',
cron_config: '表达式设定',
no_limit: '无限制',
set_end_time: '设定结束时间',
operate: '操作',
save_success: '保存成功',
close: '关闭',
required: '必填',
input_content: '请输入内容'
}, },
datasource: { datasource: {
create: '新建数据连接', create: '新建数据连接',
......
...@@ -240,12 +240,12 @@ export default { ...@@ -240,12 +240,12 @@ export default {
}, },
groupFormRules: { groupFormRules: {
name: [ name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'blur' } { required: true, message: this.$t('commons.input_content'), trigger: 'change' }
] ]
}, },
tableFormRules: { tableFormRules: {
name: [ name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'blur' } { required: true, message: this.$t('commons.input_content'), trigger: 'change' }
] ]
}, },
selectTableFlag: false, selectTableFlag: false,
...@@ -328,7 +328,7 @@ export default { ...@@ -328,7 +328,7 @@ export default {
post('/chart/group/save', group).then(response => { post('/chart/group/save', group).then(response => {
this.close() this.close()
this.$message({ this.$message({
message: this.$t('commons.save_success'), message: this.$t('dataset.save_success'),
type: 'success', type: 'success',
showClose: true showClose: true
}) })
...@@ -351,7 +351,7 @@ export default { ...@@ -351,7 +351,7 @@ export default {
post('/chart/view/save', view).then(response => { post('/chart/view/save', view).then(response => {
this.closeTable() this.closeTable()
this.$message({ this.$message({
message: this.$t('commons.save_success'), message: this.$t('dataset.save_success'),
type: 'success', type: 'success',
showClose: true showClose: true
}) })
......
<template> <template>
<ms-container> <ms-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
<ms-aside-container> <ms-aside-container>
<group @switchComponent="switchComponent"/> <group @switchComponent="switchComponent"/>
......
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
<el-col style="height: 100%;min-width: 500px;border-top: 1px solid #E6E6E6;"> <el-col style="height: 100%;min-width: 500px;border-top: 1px solid #E6E6E6;">
<el-row style="width: 100%;height: 100%;" class="padding-lr"> <el-row style="width: 100%;height: 100%;" class="padding-lr">
<el-row style="margin-top: 10px;"> <el-row style="margin-top: 10px;">
<el-row style="display:flex;height: 30px;"> <el-row style="display:flex;height: 32px;">
<span style="line-height: 30px;width: 60px;text-align: right;">{{ $t('chart.x_axis') }}</span> <span style="line-height: 32px;width: 60px;text-align: right;">{{ $t('chart.x_axis') }}</span>
<draggable <draggable
v-model="view.xaxis" v-model="view.xaxis"
group="itxst" group="itxst"
...@@ -120,8 +120,8 @@ ...@@ -120,8 +120,8 @@
</transition-group> </transition-group>
</draggable> </draggable>
</el-row> </el-row>
<el-row style="display:flex;height: 30px;margin-top: 10px;"> <el-row style="display:flex;height: 32px;margin-top: 10px;">
<span style="line-height: 30px;width: 60px;text-align: right;">{{ $t('chart.y_axis') }}</span> <span style="line-height: 32px;width: 60px;text-align: right;">{{ $t('chart.y_axis') }}</span>
<draggable <draggable
v-model="view.yaxis" v-model="view.yaxis"
group="itxst" group="itxst"
......
...@@ -262,15 +262,15 @@ export default { ...@@ -262,15 +262,15 @@ export default {
}, },
groupFormRules: { groupFormRules: {
name: [ name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'blur' } { required: true, message: this.$t('commons.input_content'), trigger: 'change' }
] ]
}, },
tableFormRules: { tableFormRules: {
name: [ name: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'blur' } { required: true, message: this.$t('commons.input_content'), trigger: 'change' }
], ],
mode: [ mode: [
{ required: true, message: this.$t('commons.input_content'), trigger: 'blur' } { required: true, message: this.$t('commons.input_content'), trigger: 'change' }
] ]
} }
} }
...@@ -362,7 +362,7 @@ export default { ...@@ -362,7 +362,7 @@ export default {
addGroup(group).then(res => { addGroup(group).then(res => {
this.close() this.close()
this.$message({ this.$message({
message: this.$t('commons.save_success'), message: this.$t('dataset.save_success'),
type: 'success', type: 'success',
showClose: true showClose: true
}) })
...@@ -387,7 +387,7 @@ export default { ...@@ -387,7 +387,7 @@ export default {
addTable(table).then(response => { addTable(table).then(response => {
this.closeTable() this.closeTable()
this.$message({ this.$message({
message: this.$t('commons.save_success'), message: this.$t('dataset.save_success'),
type: 'success', type: 'success',
showClose: true showClose: true
}) })
......
<template> <template>
<ms-container> <ms-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
<ms-aside-container> <ms-aside-container>
<group @switchComponent="switchComponent"/> <group @switchComponent="switchComponent"/>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论