提交 cb1c4c0b authored 作者: wangjiahao's avatar wangjiahao

Merge remote-tracking branch 'origin/main' into main

...@@ -21,6 +21,8 @@ public class DatasetTable implements Serializable { ...@@ -21,6 +21,8 @@ public class DatasetTable implements Serializable {
private Long createTime; private Long createTime;
private String syncStatus;
private String info; private String info;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -643,6 +643,76 @@ public class DatasetTableExample { ...@@ -643,6 +643,76 @@ public class DatasetTableExample {
addCriterion("create_time not between", value1, value2, "createTime"); addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andSyncStatusIsNull() {
addCriterion("sync_status is null");
return (Criteria) this;
}
public Criteria andSyncStatusIsNotNull() {
addCriterion("sync_status is not null");
return (Criteria) this;
}
public Criteria andSyncStatusEqualTo(String value) {
addCriterion("sync_status =", value, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusNotEqualTo(String value) {
addCriterion("sync_status <>", value, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusGreaterThan(String value) {
addCriterion("sync_status >", value, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusGreaterThanOrEqualTo(String value) {
addCriterion("sync_status >=", value, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusLessThan(String value) {
addCriterion("sync_status <", value, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusLessThanOrEqualTo(String value) {
addCriterion("sync_status <=", value, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusLike(String value) {
addCriterion("sync_status like", value, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusNotLike(String value) {
addCriterion("sync_status not like", value, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusIn(List<String> values) {
addCriterion("sync_status in", values, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusNotIn(List<String> values) {
addCriterion("sync_status not in", values, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusBetween(String value1, String value2) {
addCriterion("sync_status between", value1, value2, "syncStatus");
return (Criteria) this;
}
public Criteria andSyncStatusNotBetween(String value1, String value2) {
addCriterion("sync_status not between", value1, value2, "syncStatus");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<result column="mode" jdbcType="INTEGER" property="mode" /> <result column="mode" jdbcType="INTEGER" property="mode" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> <result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="BIGINT" property="createTime" /> <result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="sync_status" jdbcType="VARCHAR" property="syncStatus" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.dataease.base.domain.DatasetTable"> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.dataease.base.domain.DatasetTable">
<result column="info" jdbcType="LONGVARCHAR" property="info" /> <result column="info" jdbcType="LONGVARCHAR" property="info" />
...@@ -73,7 +74,7 @@ ...@@ -73,7 +74,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, `name`, scene_id, data_source_id, `type`, `mode`, create_by, create_time id, `name`, scene_id, data_source_id, `type`, `mode`, create_by, create_time, sync_status
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
info info
...@@ -129,12 +130,12 @@ ...@@ -129,12 +130,12 @@
<insert id="insert" parameterType="io.dataease.base.domain.DatasetTable"> <insert id="insert" parameterType="io.dataease.base.domain.DatasetTable">
insert into dataset_table (id, `name`, scene_id, insert into dataset_table (id, `name`, scene_id,
data_source_id, `type`, `mode`, data_source_id, `type`, `mode`,
create_by, create_time, info create_by, create_time, sync_status,
) info)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sceneId,jdbcType=VARCHAR}, values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sceneId,jdbcType=VARCHAR},
#{dataSourceId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{mode,jdbcType=INTEGER}, #{dataSourceId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{mode,jdbcType=INTEGER},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{info,jdbcType=LONGVARCHAR} #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{syncStatus,jdbcType=VARCHAR},
) #{info,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.DatasetTable"> <insert id="insertSelective" parameterType="io.dataease.base.domain.DatasetTable">
insert into dataset_table insert into dataset_table
...@@ -163,6 +164,9 @@ ...@@ -163,6 +164,9 @@
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="syncStatus != null">
sync_status,
</if>
<if test="info != null"> <if test="info != null">
info, info,
</if> </if>
...@@ -192,6 +196,9 @@ ...@@ -192,6 +196,9 @@
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=BIGINT}, #{createTime,jdbcType=BIGINT},
</if> </if>
<if test="syncStatus != null">
#{syncStatus,jdbcType=VARCHAR},
</if>
<if test="info != null"> <if test="info != null">
#{info,jdbcType=LONGVARCHAR}, #{info,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -230,6 +237,9 @@ ...@@ -230,6 +237,9 @@
<if test="record.createTime != null"> <if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT}, create_time = #{record.createTime,jdbcType=BIGINT},
</if> </if>
<if test="record.syncStatus != null">
sync_status = #{record.syncStatus,jdbcType=VARCHAR},
</if>
<if test="record.info != null"> <if test="record.info != null">
info = #{record.info,jdbcType=LONGVARCHAR}, info = #{record.info,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -248,6 +258,7 @@ ...@@ -248,6 +258,7 @@
`mode` = #{record.mode,jdbcType=INTEGER}, `mode` = #{record.mode,jdbcType=INTEGER},
create_by = #{record.createBy,jdbcType=VARCHAR}, create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}, create_time = #{record.createTime,jdbcType=BIGINT},
sync_status = #{record.syncStatus,jdbcType=VARCHAR},
info = #{record.info,jdbcType=LONGVARCHAR} info = #{record.info,jdbcType=LONGVARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -262,7 +273,8 @@ ...@@ -262,7 +273,8 @@
`type` = #{record.type,jdbcType=VARCHAR}, `type` = #{record.type,jdbcType=VARCHAR},
`mode` = #{record.mode,jdbcType=INTEGER}, `mode` = #{record.mode,jdbcType=INTEGER},
create_by = #{record.createBy,jdbcType=VARCHAR}, create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT} create_time = #{record.createTime,jdbcType=BIGINT},
sync_status = #{record.syncStatus,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -291,6 +303,9 @@ ...@@ -291,6 +303,9 @@
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=BIGINT},
</if> </if>
<if test="syncStatus != null">
sync_status = #{syncStatus,jdbcType=VARCHAR},
</if>
<if test="info != null"> <if test="info != null">
info = #{info,jdbcType=LONGVARCHAR}, info = #{info,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -306,6 +321,7 @@ ...@@ -306,6 +321,7 @@
`mode` = #{mode,jdbcType=INTEGER}, `mode` = #{mode,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=BIGINT},
sync_status = #{syncStatus,jdbcType=VARCHAR},
info = #{info,jdbcType=LONGVARCHAR} info = #{info,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
...@@ -317,7 +333,8 @@ ...@@ -317,7 +333,8 @@
`type` = #{type,jdbcType=VARCHAR}, `type` = #{type,jdbcType=VARCHAR},
`mode` = #{mode,jdbcType=INTEGER}, `mode` = #{mode,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT} create_time = #{createTime,jdbcType=BIGINT},
sync_status = #{syncStatus,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
package io.dataease.config; package io.dataease.config;
import com.github.pagehelper.PageInterceptor; import com.github.pagehelper.PageInterceptor;
import io.dataease.base.domain.ApiTestReportDetail; import io.dataease.base.domain.*;
import io.dataease.base.domain.AuthSource;
import io.dataease.base.domain.FileContent;
import io.dataease.base.domain.TestResource;
import io.dataease.commons.utils.CompressUtils; import io.dataease.commons.utils.CompressUtils;
import io.dataease.commons.utils.MybatisInterceptorConfig; import io.dataease.commons.utils.MybatisInterceptorConfig;
import io.dataease.interceptor.MybatisInterceptor; import io.dataease.interceptor.MybatisInterceptor;
...@@ -45,7 +42,7 @@ public class MybatisConfig { ...@@ -45,7 +42,7 @@ public class MybatisConfig {
List<MybatisInterceptorConfig> configList = new ArrayList<>(); List<MybatisInterceptorConfig> configList = new ArrayList<>();
configList.add(new MybatisInterceptorConfig(FileContent.class, "file", CompressUtils.class, "zip", "unzip")); configList.add(new MybatisInterceptorConfig(FileContent.class, "file", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(ApiTestReportDetail.class, "content", CompressUtils.class, "compress", "decompress")); configList.add(new MybatisInterceptorConfig(ApiTestReportDetail.class, "content", CompressUtils.class, "compress", "decompress"));
configList.add(new MybatisInterceptorConfig(TestResource.class, "configuration")); configList.add(new MybatisInterceptorConfig(Datasource.class, "configuration"));
configList.add(new MybatisInterceptorConfig(AuthSource.class, "configuration")); configList.add(new MybatisInterceptorConfig(AuthSource.class, "configuration"));
interceptor.setInterceptorConfigList(configList); interceptor.setInterceptorConfigList(configList);
return interceptor; return interceptor;
......
...@@ -3,6 +3,7 @@ package io.dataease.listener; ...@@ -3,6 +3,7 @@ package io.dataease.listener;
import io.dataease.base.domain.DatasetTableTask; import io.dataease.base.domain.DatasetTableTask;
import io.dataease.datasource.service.DatasourceService; import io.dataease.datasource.service.DatasourceService;
import io.dataease.service.ScheduleService; import io.dataease.service.ScheduleService;
import io.dataease.service.dataset.DataSetTableService;
import io.dataease.service.dataset.DataSetTableTaskService; import io.dataease.service.dataset.DataSetTableTaskService;
import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
...@@ -17,9 +18,12 @@ import java.util.List; ...@@ -17,9 +18,12 @@ import java.util.List;
public class DataSourceInitStartListener implements ApplicationListener<ApplicationReadyEvent> { public class DataSourceInitStartListener implements ApplicationListener<ApplicationReadyEvent> {
@Resource @Resource
private DatasourceService datasourceService; private DatasourceService datasourceService;
@Resource
private DataSetTableService dataSetTableService;
@Override @Override
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) { public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
datasourceService.initAllDataSourceConnectionPool(); datasourceService.initAllDataSourceConnectionPool();
dataSetTableService.updateDatasetTableStatus();
} }
} }
...@@ -876,4 +876,12 @@ public class DataSetTableService { ...@@ -876,4 +876,12 @@ public class DataSetTableService {
List<String[]> data = jdbcProvider.getData(datasourceRequest); List<String[]> data = jdbcProvider.getData(datasourceRequest);
return CollectionUtils.isNotEmpty(data); return CollectionUtils.isNotEmpty(data);
} }
public void updateDatasetTableStatus(){
DatasetTable record = new DatasetTable();
record.setSyncStatus(JobStatus.Completed.name());
DatasetTableExample example = new DatasetTableExample();
example.createCriteria().andSyncStatusEqualTo(JobStatus.Underway.name());
datasetTableMapper.updateByExampleSelective(record, example);
}
} }
...@@ -2,6 +2,7 @@ package io.dataease.service.dataset; ...@@ -2,6 +2,7 @@ package io.dataease.service.dataset;
import com.google.gson.Gson; import com.google.gson.Gson;
import io.dataease.base.domain.*; import io.dataease.base.domain.*;
import io.dataease.base.mapper.DatasetTableMapper;
import io.dataease.base.mapper.DatasourceMapper; import io.dataease.base.mapper.DatasourceMapper;
import io.dataease.commons.constants.JobStatus; import io.dataease.commons.constants.JobStatus;
import io.dataease.commons.constants.ScheduleType; import io.dataease.commons.constants.ScheduleType;
...@@ -93,6 +94,8 @@ public class ExtractDataService { ...@@ -93,6 +94,8 @@ public class ExtractDataService {
private DataSetTableTaskService dataSetTableTaskService; private DataSetTableTaskService dataSetTableTaskService;
@Resource @Resource
private DatasourceMapper datasourceMapper; private DatasourceMapper datasourceMapper;
@Resource
private DatasetTableMapper datasetTableMapper;
private static String lastUpdateTime = "${__last_update_time__}"; private static String lastUpdateTime = "${__last_update_time__}";
private static String currentUpdateTime = "${__current_update_time__}"; private static String currentUpdateTime = "${__current_update_time__}";
...@@ -172,12 +175,17 @@ public class ExtractDataService { ...@@ -172,12 +175,17 @@ public class ExtractDataService {
} }
public void extractData(String datasetTableId, String taskId, String type) { public void extractData(String datasetTableId, String taskId, String type) {
DatasetTable datasetTable = dataSetTableService.get(datasetTableId);
datasetTable.setSyncStatus(JobStatus.Underway.name());
DatasetTableExample example = new DatasetTableExample();
example.createCriteria().andIdEqualTo(datasetTableId);
if (datasetTableMapper.updateByExampleSelective(datasetTable, example) == 0) {
return;
}
DatasetTableTaskLog datasetTableTaskLog = new DatasetTableTaskLog(); DatasetTableTaskLog datasetTableTaskLog = new DatasetTableTaskLog();
UpdateType updateType = UpdateType.valueOf(type); UpdateType updateType = UpdateType.valueOf(type);
DatasetTable datasetTable = null;
Datasource datasource = new Datasource(); Datasource datasource = new Datasource();
try { try {
datasetTable = dataSetTableService.get(datasetTableId);
if (StringUtils.isNotEmpty(datasetTable.getDataSourceId())) { if (StringUtils.isNotEmpty(datasetTable.getDataSourceId())) {
datasource = datasourceMapper.selectByPrimaryKey(datasetTable.getDataSourceId()); datasource = datasourceMapper.selectByPrimaryKey(datasetTable.getDataSourceId());
} else { } else {
...@@ -261,6 +269,10 @@ public class ExtractDataService { ...@@ -261,6 +269,10 @@ public class ExtractDataService {
datasetTableTask.setRate(ScheduleType.SIMPLE_COMPLETE.toString()); datasetTableTask.setRate(ScheduleType.SIMPLE_COMPLETE.toString());
dataSetTableTaskService.update(datasetTableTask); dataSetTableTaskService.update(datasetTableTask);
} }
datasetTable.setSyncStatus(JobStatus.Completed.name());
example.clear();
example.createCriteria().andIdEqualTo(datasetTableId);
datasetTableMapper.updateByExampleSelective(datasetTable, example);
} }
} }
...@@ -273,6 +285,8 @@ public class ExtractDataService { ...@@ -273,6 +285,8 @@ public class ExtractDataService {
} }
private void extractData(DatasetTable datasetTable, String extractType) throws Exception { private void extractData(DatasetTable datasetTable, String extractType) throws Exception {
KettleFileRepository repository = CommonBeanFactory.getBean(KettleFileRepository.class); KettleFileRepository repository = CommonBeanFactory.getBean(KettleFileRepository.class);
RepositoryDirectoryInterface repositoryDirectoryInterface = repository.loadRepositoryDirectoryTree(); RepositoryDirectoryInterface repositoryDirectoryInterface = repository.loadRepositoryDirectoryTree();
JobMeta jobMeta = null; JobMeta jobMeta = null;
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<!-- </table>--> <!-- </table>-->
<!-- <table tableName="v_dataset"/>--> <!-- <table tableName="v_dataset"/>-->
<!-- <table tableName="sys_auth_detail"/>--> <!-- <table tableName="sys_auth_detail"/>-->
<table tableName="panel_group"/> <table tableName="dataset_table"/>
</context> </context>
......
...@@ -83,8 +83,8 @@ export default { ...@@ -83,8 +83,8 @@ export default {
thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !', thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !',
expires: 'Login token expired, please login again', expires: 'Login token expired, please login again',
tokenError: 'Token error, please login again', tokenError: 'Token error, please login again',
username_error: 'Please enter the correct user name', username_error: 'Please enter the correct ID',
password_error: 'The password can not be less than 6 digits' password_error: 'The password can not be less than 8 digits'
}, },
commons: { commons: {
close: 'Close', close: 'Close',
...@@ -816,6 +816,8 @@ export default { ...@@ -816,6 +816,8 @@ export default {
input_limit_0_50: '0-50 chars' input_limit_0_50: '0-50 chars'
}, },
panel: { panel: {
no_auth_role: 'Unshared roles',
auth_role: 'Shared roles',
picture_limit: 'Only pictures can be inserted', picture_limit: 'Only pictures can be inserted',
drag_here: 'Please drag the left field here', drag_here: 'Please drag the left field here',
copy_link_passwd: 'Copy link and password', copy_link_passwd: 'Copy link and password',
......
...@@ -83,8 +83,8 @@ export default { ...@@ -83,8 +83,8 @@ export default {
thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!', thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!',
expires: '登陸信息过期,请重新登陸', expires: '登陸信息过期,请重新登陸',
tokenError: '信息错误,请重新登陸', tokenError: '信息错误,请重新登陸',
username_error: '請輸入正確的用戶名', username_error: '請輸入正確的ID',
password_error: '密碼不小於6位' password_error: '密碼不小於8位'
}, },
commons: { commons: {
icon: '圖標', icon: '圖標',
...@@ -815,6 +815,8 @@ export default { ...@@ -815,6 +815,8 @@ export default {
input_limit_0_50: '0-50字符' input_limit_0_50: '0-50字符'
}, },
panel: { panel: {
no_auth_role: '未分享角色',
auth_role: '已分享角色',
picture_limit: '只能插入圖片', picture_limit: '只能插入圖片',
drag_here: '請將左側字段拖至此處', drag_here: '請將左側字段拖至此處',
copy_link_passwd: '複製鏈接及密碼', copy_link_passwd: '複製鏈接及密碼',
......
...@@ -83,8 +83,8 @@ export default { ...@@ -83,8 +83,8 @@ export default {
thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!', thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!',
expires: '登录token过期,请重新登录', expires: '登录token过期,请重新登录',
tokenError: 'token错误,请重新登录', tokenError: 'token错误,请重新登录',
username_error: '请输入正确的用户名', username_error: '请输入正确的ID',
password_error: '密码不小于6位' password_error: '密码不小于8位'
}, },
commons: { commons: {
close: '关闭', close: '关闭',
...@@ -817,6 +817,8 @@ export default { ...@@ -817,6 +817,8 @@ export default {
input_limit_0_50: '0-50字符' input_limit_0_50: '0-50字符'
}, },
panel: { panel: {
no_auth_role: '未分享角色',
auth_role: '已分享角色',
picture_limit: '只能插入图片', picture_limit: '只能插入图片',
drag_here: '请将左侧字段拖至此处', drag_here: '请将左侧字段拖至此处',
copy_link_passwd: '复制链接及密码', copy_link_passwd: '复制链接及密码',
......
...@@ -39,6 +39,7 @@ $menuHover: rgba(158, 158, 158, 0.2); ...@@ -39,6 +39,7 @@ $menuHover: rgba(158, 158, 158, 0.2);
$subMenuBg:#1f2d3d; $subMenuBg:#1f2d3d;
// $subMenuHover:#001528; // $subMenuHover:#001528;
$subMenuHover:#0a7be0; $subMenuHover:#0a7be0;
$colorBg:rgba(10,123,224,.1);
$sideBarWidth: 210px; $sideBarWidth: 210px;
$topBarHeight: 56px; $topBarHeight: 56px;
......
<template> <template>
<el-col> <el-col ref="container" style="width: 100%;height:100%">
<span>{{ table.name }}</span> <span>{{ table.name }}</span>
<ux-grid <ux-grid
ref="plxTable" ref="plxTable"
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
return { return {
fields: [], fields: [],
data: [], data: [],
height: 500 height: 'auto'
} }
}, },
watch: { watch: {
...@@ -45,12 +45,12 @@ export default { ...@@ -45,12 +45,12 @@ export default {
} }
}, },
mounted() { mounted() {
window.onresize = () => { // window.onresize = () => {
return (() => { // return (() => {
this.height = window.innerHeight / 3 // this.height = window.innerHeight / 3
})() // })()
} // }
this.height = window.innerHeight / 3 // this.height = window.innerHeight / 3
this.initData() this.initData()
}, },
methods: { methods: {
...@@ -62,11 +62,11 @@ export default { ...@@ -62,11 +62,11 @@ export default {
this.fields = response.data.fields this.fields = response.data.fields
this.data = response.data.data this.data = response.data.data
const datas = this.data const datas = this.data
if(response.data.status === 'warnning'){ if (response.data.status === 'warnning') {
this.$warning(response.data.msg, 3000); this.$warning(response.data.msg, 3000)
} }
if(response.data.status === 'error'){ if (response.data.status === 'error') {
this.$error(response.data.msg, 3000); this.$error(response.data.msg, 3000)
} }
this.$refs.plxTable.reloadData(datas) this.$refs.plxTable.reloadData(datas)
}) })
......
...@@ -8,13 +8,12 @@ ...@@ -8,13 +8,12 @@
<img v-if="!loginLogoUrl" src="@/assets/DataEase-color.png" alt=""> <img v-if="!loginLogoUrl" src="@/assets/DataEase-color.png" alt="">
<img v-else :src="loginLogoUrl" alt=""> <img v-else :src="loginLogoUrl" alt="">
</div> </div>
<div class="login-border" />
<div class="login-welcome"> <div class="login-welcome">
{{ $t('login.welcome') + (uiInfo && uiInfo['ui.title'] && uiInfo['ui.title'].paramValue || 'DATAEASE') }} {{ $t('login.welcome') + (uiInfo && uiInfo['ui.title'] && uiInfo['ui.title'].paramValue || 'DATAEASE') }}
</div> </div>
<div class="login-form"> <div class="login-form">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model="loginForm.username" :placeholder="$t('login.username')" autofocus /> <el-input v-model="loginForm.username" placeholder="ID" autofocus />
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input
...@@ -73,7 +72,7 @@ export default { ...@@ -73,7 +72,7 @@ export default {
// } // }
} }
const validatePassword = (rule, value, callback) => { const validatePassword = (rule, value, callback) => {
if (value.length < 6) { if (value.length < 8) {
callback(this.$t('login.password_error')) callback(this.$t('login.password_error'))
} else { } else {
callback() callback()
...@@ -180,9 +179,11 @@ export default { ...@@ -180,9 +179,11 @@ export default {
@media only screen and (max-width: 1280px) { @media only screen and (max-width: 1280px) {
margin-top: 20px; margin-top: 20px;
} }
img{
img { width: 240px;
height: 45px; @media only screen and (max-width: 1280px) {
width: 200px;
}
} }
} }
...@@ -210,9 +211,9 @@ export default { ...@@ -210,9 +211,9 @@ export default {
} }
.login-welcome { .login-welcome {
margin-top: 50px; margin-top: 20px;
font-size: 14px; font-size: 14px;
color: #999999; color: $--color-primary;
letter-spacing: 0; letter-spacing: 0;
line-height: 18px; line-height: 18px;
text-align: center; text-align: center;
...@@ -222,20 +223,25 @@ export default { ...@@ -222,20 +223,25 @@ export default {
} }
.login-form { .login-form {
margin-top: 40px; margin-top: 80px;
padding: 0 40px; padding: 0 40px;
@media only screen and (max-width: 1280px) { @media only screen and (max-width: 1280px) {
margin-top: 20px; margin-top: 40px;
} }
& ::v-deep .el-input__inner { & ::v-deep .el-input__inner {
border-radius: 0; border-radius: 20px;
border: 1px solid transparent;
background: $colorBg;
}
& :focus {
border: 1px solid $--color-primary;
} }
} }
.login-btn { .login-btn {
margin-top: 40px; margin-top: 22px;
padding: 0 40px; padding: 0 40px;
@media only screen and (max-width: 1280px) { @media only screen and (max-width: 1280px) {
margin-top: 20px; margin-top: 20px;
...@@ -243,7 +249,7 @@ export default { ...@@ -243,7 +249,7 @@ export default {
.submit { .submit {
width: 100%; width: 100%;
border-radius: 0; border-radius: 20px;
} }
} }
......
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
const rows = this.$refs.table.store.states.selection const rows = this.$refs.table.store.states.selection
const request = this.buildRequest(rows) const request = this.buildRequest(rows)
saveShare(request).then(res => { saveShare(request).then(res => {
this.$success('保存成功') this.$success(this.$t('commons.save_success'))
return true return true
}).catch(err => { }).catch(err => {
this.$error(err.message) this.$error(err.message)
......
...@@ -33,9 +33,9 @@ export default { ...@@ -33,9 +33,9 @@ export default {
data() { data() {
return { return {
data: [], data: [],
defaultHeadName: '全部', defaultHeadName: this.$t('commons.all'),
columnLabel: null, columnLabel: null,
filter_options: [{ text: '未分享角色', value: 0 }, { text: '已分享角色', value: 1 }], filter_options: [{ text: this.$t('panel.no_auth_role'), value: 0 }, { text: this.$t('panel.auth_role'), value: 1 }],
fieldName: 'name', fieldName: 'name',
type: 1, // 类型1代表角色 type: 1, // 类型1代表角色
shares: [] shares: []
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<template :id="scope.row.storeId" slot-scope="scope"> <template :id="scope.row.storeId" slot-scope="scope">
<div class="start-item"> <div class="start-item">
<div class="filter-db-row star-item-content" @click="showPanel(scope.row)"> <div class="filter-db-row star-item-content" @click="showPanel(scope.row)">
<i class="el-icon-s-data" /> <svg-icon icon-class="panel" class="ds-icon-scene" />
<span> {{ scope.row.name }}</span> <span> {{ scope.row.name }}</span>
</div> </div>
<div class="star-item-close"> <div class="star-item-close">
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<!-- <fu-table-button v-permission="['user:add']" icon="el-icon-circle-plus-outline" :label="$t('user.create')" @click="create" /> --> <!-- <fu-table-button v-permission="['user:add']" icon="el-icon-circle-plus-outline" :label="$t('user.create')" @click="create" /> -->
</template> </template>
<el-table-column prop="username" :label="$t('commons.name')" /> <el-table-column prop="username" label="ID" />
<el-table-column prop="nickName" :label="$t('commons.nick_name')" /> <el-table-column prop="nickName" :label="$t('commons.nick_name')" />
<el-table-column prop="gender" :label="$t('commons.gender')" /> <el-table-column prop="gender" :label="$t('commons.gender')" />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论