commit
caf7bf65be
@ -214,7 +214,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jsoup</groupId>
|
<groupId>org.jsoup</groupId>
|
||||||
<artifactId>jsoup</artifactId>
|
<artifactId>jsoup</artifactId>
|
||||||
<version>1.10.3</version>
|
<version>1.14.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -226,7 +226,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-compress</artifactId>
|
<artifactId>commons-compress</artifactId>
|
||||||
<version>1.20</version>
|
<version>1.21</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -255,7 +255,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>4.5.6</version>
|
<version>4.5.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- 反射工具包 -->
|
<!-- 反射工具包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@ -57,13 +57,11 @@ public class ExcelReaderUtil {
|
|||||||
ExcelXlsxReader excelXlsxReader = new ExcelXlsxReader();
|
ExcelXlsxReader excelXlsxReader = new ExcelXlsxReader();
|
||||||
excelXlsxReader.process(inputStream);
|
excelXlsxReader.process(inputStream);
|
||||||
System.out.println(excelXlsxReader.totalSheets.size());
|
System.out.println(excelXlsxReader.totalSheets.size());
|
||||||
System.out.println(excelXlsxReader.totalSheets.get(1).getExcelLable());
|
System.out.println(excelXlsxReader.totalSheets.get(0).getExcelLable());
|
||||||
for (TableFiled field : excelXlsxReader.totalSheets.get(1).getFields()) {
|
for (TableFiled field : excelXlsxReader.totalSheets.get(0).getFields()) {
|
||||||
System.out.println(new Gson().toJson(field));
|
System.out.println(new Gson().toJson(field));
|
||||||
}
|
}
|
||||||
System.out.println(excelXlsxReader.totalSheets.get(0).getData().get(0));
|
System.out.println(excelXlsxReader.totalSheets.get(0).getData().get(0));
|
||||||
System.out.println(excelXlsxReader.totalSheets.get(0).getData().get(1));
|
|
||||||
System.out.println(excelXlsxReader.totalSheets.get(0).getData().get(2));
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("文件格式错误,fileName的扩展名只能是xls或xlsx。");
|
throw new Exception("文件格式错误,fileName的扩展名只能是xls或xlsx。");
|
||||||
@ -71,7 +69,7 @@ public class ExcelReaderUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
String file ="赤收管理 2.xlsx";
|
String file ="Metersphere_case_DataEase功能用例.xlsx";
|
||||||
ExcelReaderUtil.readExcel(file, new FileInputStream("/Users/taojinlong/Desktop/" + file));
|
ExcelReaderUtil.readExcel(file, new FileInputStream("/Users/taojinlong/Desktop/" + file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -237,6 +237,14 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
if (isTElement) {//这个程序没经过
|
if (isTElement) {//这个程序没经过
|
||||||
//将单元格内容加入rowlist中,在这之前先去掉字符串前后的空白符
|
//将单元格内容加入rowlist中,在这之前先去掉字符串前后的空白符
|
||||||
String value = lastIndex.trim();
|
String value = lastIndex.trim();
|
||||||
|
if(curRow==1){
|
||||||
|
TableFiled tableFiled = new TableFiled();
|
||||||
|
tableFiled.setFieldType("TEXT");
|
||||||
|
tableFiled.setFieldSize(65533);
|
||||||
|
tableFiled.setFieldName(value);
|
||||||
|
tableFiled.setRemarks(value);
|
||||||
|
this.fields.add(tableFiled);
|
||||||
|
}
|
||||||
cellList.add(curCol, value);
|
cellList.add(curCol, value);
|
||||||
curCol++;
|
curCol++;
|
||||||
isTElement = false;
|
isTElement = false;
|
||||||
@ -432,6 +440,10 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(curCol==1){
|
||||||
|
System.out.println(type);
|
||||||
|
System.out.println(nextDataType);
|
||||||
|
}
|
||||||
return thisStr;
|
return thisStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,6 +46,12 @@ public class DataSetTableController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改")
|
||||||
|
@PostMapping("alter")
|
||||||
|
public void alter(@RequestBody DataSetTableRequest request) throws Exception {
|
||||||
|
dataSetTableService.alter(request);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@PostMapping("delete/{id}")
|
@PostMapping("delete/{id}")
|
||||||
public void delete(@PathVariable String id) throws Exception {
|
public void delete(@PathVariable String id) throws Exception {
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
|||||||
import io.dataease.base.domain.SysMsgChannel;
|
import io.dataease.base.domain.SysMsgChannel;
|
||||||
import io.dataease.base.domain.SysMsgSetting;
|
import io.dataease.base.domain.SysMsgSetting;
|
||||||
import io.dataease.base.domain.SysMsgType;
|
import io.dataease.base.domain.SysMsgType;
|
||||||
import io.dataease.commons.exception.DEException;
|
|
||||||
import io.dataease.commons.utils.AuthUtils;
|
import io.dataease.commons.utils.AuthUtils;
|
||||||
import io.dataease.commons.utils.PageUtils;
|
import io.dataease.commons.utils.PageUtils;
|
||||||
import io.dataease.commons.utils.Pager;
|
import io.dataease.commons.utils.Pager;
|
||||||
@ -71,6 +70,12 @@ public class MsgController {
|
|||||||
sysMsgService.setBatchReaded(msgIds);
|
sysMsgService.setBatchReaded(msgIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("全部设置已读")
|
||||||
|
@PostMapping("/allRead")
|
||||||
|
public void allRead() {
|
||||||
|
sysMsgService.setAllRead();
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("批量删除")
|
@ApiOperation("批量删除")
|
||||||
@PostMapping("/batchDelete")
|
@PostMapping("/batchDelete")
|
||||||
public void batchDelete(@RequestBody List<Long> msgIds) {
|
public void batchDelete(@RequestBody List<Long> msgIds) {
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import io.dataease.base.mapper.*;
|
|||||||
import io.dataease.base.mapper.ext.ExtDataSourceMapper;
|
import io.dataease.base.mapper.ext.ExtDataSourceMapper;
|
||||||
import io.dataease.base.mapper.ext.query.GridExample;
|
import io.dataease.base.mapper.ext.query.GridExample;
|
||||||
import io.dataease.commons.exception.DEException;
|
import io.dataease.commons.exception.DEException;
|
||||||
|
import io.dataease.commons.model.AuthURD;
|
||||||
import io.dataease.commons.utils.AuthUtils;
|
import io.dataease.commons.utils.AuthUtils;
|
||||||
import io.dataease.commons.utils.CommonThreadPool;
|
import io.dataease.commons.utils.CommonThreadPool;
|
||||||
import io.dataease.commons.utils.LogUtil;
|
import io.dataease.commons.utils.LogUtil;
|
||||||
@ -25,6 +26,8 @@ import io.dataease.dto.dataset.DataTableInfoDTO;
|
|||||||
import io.dataease.exception.DataEaseException;
|
import io.dataease.exception.DataEaseException;
|
||||||
import io.dataease.i18n.Translator;
|
import io.dataease.i18n.Translator;
|
||||||
import io.dataease.service.dataset.DataSetGroupService;
|
import io.dataease.service.dataset.DataSetGroupService;
|
||||||
|
import io.dataease.service.message.DeMsgutil;
|
||||||
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -34,7 +37,10 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -238,7 +244,8 @@ public class DatasourceService {
|
|||||||
public void updateDatasourceStatus(){
|
public void updateDatasourceStatus(){
|
||||||
List<Datasource> datasources = datasourceMapper.selectByExampleWithBLOBs(new DatasourceExample());
|
List<Datasource> datasources = datasourceMapper.selectByExampleWithBLOBs(new DatasourceExample());
|
||||||
datasources.forEach(datasource -> {
|
datasources.forEach(datasource -> {
|
||||||
checkAndUpdateDatasourceStatus(datasource);
|
// checkAndUpdateDatasourceStatus(datasource);
|
||||||
|
checkAndUpdateDatasourceStatus(datasource, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,4 +262,43 @@ public class DatasourceService {
|
|||||||
datasourceMapper.updateByPrimaryKeySelective(datasource);
|
datasourceMapper.updateByPrimaryKeySelective(datasource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkAndUpdateDatasourceStatus(Datasource datasource, Boolean withMsg){
|
||||||
|
try {
|
||||||
|
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(datasource.getType());
|
||||||
|
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||||
|
datasourceRequest.setDatasource(datasource);
|
||||||
|
datasourceProvider.checkStatus(datasourceRequest);
|
||||||
|
datasource.setStatus("Success");
|
||||||
|
datasourceMapper.updateByPrimaryKeySelective(datasource);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Datasource temp = datasourceMapper.selectByPrimaryKey(datasource.getId());
|
||||||
|
datasource.setStatus("Error");
|
||||||
|
if (!StringUtils.equals(temp.getStatus(), "Error")) {
|
||||||
|
sendWebMsg(datasource);
|
||||||
|
datasourceMapper.updateByPrimaryKeySelective(datasource);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void sendWebMsg(Datasource datasource) {
|
||||||
|
|
||||||
|
String id = datasource.getId();
|
||||||
|
AuthURD authURD = AuthUtils.authURDR(id);
|
||||||
|
Set<Long> userIds = AuthUtils.userIdsByURD(authURD);
|
||||||
|
Long typeId = 8L;// 代表数据源失效
|
||||||
|
Gson gson = new Gson();
|
||||||
|
userIds.forEach(userId -> {
|
||||||
|
Map<String, Object> param = new HashMap<>();
|
||||||
|
param.put("id", id);
|
||||||
|
param.put("name", datasource.getName());
|
||||||
|
|
||||||
|
|
||||||
|
String content = "数据源【" + datasource.getName() + "】无效";
|
||||||
|
|
||||||
|
DeMsgutil.sendMsg(userId, typeId, 1L, content, gson.toJson(param));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,7 +121,7 @@ public class MapUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static AreaEntity root() {
|
private static AreaEntity root() {
|
||||||
return AreaEntity.builder().code("100000").name("中华人名共和国").build();
|
return AreaEntity.builder().code("100000").name("中华人民共和国").build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void recursionWrite(List<AreaEntity> areaEntityList) {
|
public static void recursionWrite(List<AreaEntity> areaEntityList) {
|
||||||
|
|||||||
@ -121,6 +121,8 @@ public class DorisQueryProvider extends QueryProvider {
|
|||||||
fieldName = String.format(DorisConstants.FROM_UNIXTIME, cast, DorisConstants.DEFAULT_DATE_FORMAT);
|
fieldName = String.format(DorisConstants.FROM_UNIXTIME, cast, DorisConstants.DEFAULT_DATE_FORMAT);
|
||||||
} else if (f.getDeType() == 2) {
|
} else if (f.getDeType() == 2) {
|
||||||
fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_INT_FORMAT);
|
fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_INT_FORMAT);
|
||||||
|
} else if (f.getDeType() == 3) {
|
||||||
|
fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_FLOAT_FORMAT);
|
||||||
} else {
|
} else {
|
||||||
fieldName = originField;
|
fieldName = originField;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,6 +37,7 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer transFieldType(String field) {
|
public Integer transFieldType(String field) {
|
||||||
|
field = field.toUpperCase();
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case "CHAR":
|
case "CHAR":
|
||||||
case "NCHAR":
|
case "NCHAR":
|
||||||
|
|||||||
@ -251,6 +251,11 @@ public class DataSetTableService {
|
|||||||
return datasetTable;
|
return datasetTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void alter(DataSetTableRequest request)throws Exception {
|
||||||
|
checkName(request);
|
||||||
|
datasetTableMapper.updateByPrimaryKeySelective(request);
|
||||||
|
}
|
||||||
|
|
||||||
public void delete(String id) throws Exception {
|
public void delete(String id) throws Exception {
|
||||||
DatasetTable table = datasetTableMapper.selectByPrimaryKey(id);
|
DatasetTable table = datasetTableMapper.selectByPrimaryKey(id);
|
||||||
datasetTableMapper.deleteByPrimaryKey(id);
|
datasetTableMapper.deleteByPrimaryKey(id);
|
||||||
|
|||||||
@ -312,4 +312,12 @@ public class SysMsgService {
|
|||||||
return sourceLists;
|
return sourceLists;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAllRead() {
|
||||||
|
SysMsg record = new SysMsg();
|
||||||
|
record.setStatus(true);
|
||||||
|
SysMsgExample example = new SysMsgExample();
|
||||||
|
example.createCriteria().andUserIdEqualTo(AuthUtils.getUser().getUserId()).andStatusEqualTo(false);
|
||||||
|
sysMsgMapper.updateByExampleSelective(record, example);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
7
backend/src/main/resources/db/migration/V26__de1.3.sql
Normal file
7
backend/src/main/resources/db/migration/V26__de1.3.sql
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_msg_type
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_msg_type` VALUES (7, 0, 'i18n_msg_type_ds_invalid', 'datasource', 'to-msg-ds');
|
||||||
|
INSERT INTO `sys_msg_type` VALUES (8, 7, 'i18n_msg_type_ds_invalid', 'datasource', 'to-msg-ds');
|
||||||
|
COMMIT;
|
||||||
@ -43,6 +43,15 @@ export function addTable(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function alter(data) {
|
||||||
|
return request({
|
||||||
|
url: '/dataset/table/alter',
|
||||||
|
method: 'post',
|
||||||
|
loading: true,
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function delTable(tableId) {
|
export function delTable(tableId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/dataset/table/delete/' + tableId,
|
url: '/dataset/table/delete/' + tableId,
|
||||||
|
|||||||
@ -35,6 +35,14 @@ export function batchRead(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function allRead() {
|
||||||
|
return request({
|
||||||
|
url: '/api/sys_msg/allRead',
|
||||||
|
method: 'post',
|
||||||
|
loading: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function batchDelete(data) {
|
export function batchDelete(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/sys_msg/batchDelete',
|
url: '/api/sys_msg/batchDelete',
|
||||||
|
|||||||
@ -72,6 +72,7 @@
|
|||||||
<de-out-widget
|
<de-out-widget
|
||||||
v-else-if="item.type==='custom'"
|
v-else-if="item.type==='custom'"
|
||||||
:id="'component' + item.id"
|
:id="'component' + item.id"
|
||||||
|
ref="wrapperChild"
|
||||||
class="component"
|
class="component"
|
||||||
:style="getComponentStyleDefault(item.style)"
|
:style="getComponentStyleDefault(item.style)"
|
||||||
:prop-value="item.propValue"
|
:prop-value="item.propValue"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<el-input
|
<el-input
|
||||||
v-if="options!== null && options.attrs!==null"
|
v-if="options!== null && options.attrs!==null"
|
||||||
v-model="values"
|
v-model="value"
|
||||||
resize="vertical"
|
resize="vertical"
|
||||||
:placeholder="$t(options.attrs.placeholder)"
|
:placeholder="$t(options.attrs.placeholder)"
|
||||||
@keypress.enter.native="search"
|
@keypress.enter.native="search"
|
||||||
@ -31,22 +31,30 @@ export default {
|
|||||||
return {
|
return {
|
||||||
options: null,
|
options: null,
|
||||||
operator: 'like',
|
operator: 'like',
|
||||||
values: null,
|
value: null,
|
||||||
canEdit: false
|
canEdit: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.options = this.element.options
|
this.options = this.element.options
|
||||||
|
if (this.inDraw && this.options.value && this.options.value.length > 0) {
|
||||||
|
this.value = this.options.value[0]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
search() {
|
search() {
|
||||||
// this.options.value && this.setCondition()
|
// this.options.value && this.setCondition()
|
||||||
|
this.options.value = []
|
||||||
|
if (this.inDraw && this.value) {
|
||||||
|
this.options.value = [this.value]
|
||||||
|
}
|
||||||
|
|
||||||
this.setCondition()
|
this.setCondition()
|
||||||
},
|
},
|
||||||
setCondition() {
|
setCondition() {
|
||||||
const param = {
|
const param = {
|
||||||
component: this.element,
|
component: this.element,
|
||||||
value: !this.values ? [] : Array.isArray(this.values) ? this.values : [this.values],
|
value: !this.options.value ? [] : Array.isArray(this.options.value) ? this.options.value : [this.options.value],
|
||||||
operator: this.operator
|
operator: this.operator
|
||||||
}
|
}
|
||||||
this.inDraw && this.$store.commit('addViewFilter', param)
|
this.inDraw && this.$store.commit('addViewFilter', param)
|
||||||
|
|||||||
@ -66,6 +66,12 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.options = this.element.options
|
this.options = this.element.options
|
||||||
|
if (this.inDraw && this.options.value && this.options.value.length > 0) {
|
||||||
|
this.form.min = this.options.value[0]
|
||||||
|
if (this.options.value.length > 1) {
|
||||||
|
this.form.max = this.options.value[1]
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
searchWithKey(index) {
|
searchWithKey(index) {
|
||||||
@ -134,6 +140,7 @@ export default {
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setCondition()
|
this.setCondition()
|
||||||
this.styleChange()
|
this.styleChange()
|
||||||
})
|
})
|
||||||
@ -145,6 +152,8 @@ export default {
|
|||||||
value: [this.form.min, this.form.max],
|
value: [this.form.min, this.form.max],
|
||||||
operator: this.operator
|
operator: this.operator
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.inDraw && (this.options.value = param.value)
|
||||||
if (this.form.min && this.form.max) {
|
if (this.form.min && this.form.max) {
|
||||||
this.inDraw && this.$store.commit('addViewFilter', param)
|
this.inDraw && this.$store.commit('addViewFilter', param)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -1351,6 +1351,7 @@ export default {
|
|||||||
read_time: 'Read Time',
|
read_time: 'Read Time',
|
||||||
type: 'Message Type',
|
type: 'Message Type',
|
||||||
mark_readed: 'Mark As Read',
|
mark_readed: 'Mark As Read',
|
||||||
|
all_mark_readed: 'Mark All As Read',
|
||||||
please_select: 'Please select at least one message',
|
please_select: 'Please select at least one message',
|
||||||
mark_success: 'Mark read successfully',
|
mark_success: 'Mark read successfully',
|
||||||
receive_manage: 'Receive Manage',
|
receive_manage: 'Receive Manage',
|
||||||
@ -1360,6 +1361,7 @@ export default {
|
|||||||
i18n_msg_type_dataset_sync_success: 'Dataset synchronization successful',
|
i18n_msg_type_dataset_sync_success: 'Dataset synchronization successful',
|
||||||
i18n_msg_type_dataset_sync_faild: 'Dataset synchronization failed',
|
i18n_msg_type_dataset_sync_faild: 'Dataset synchronization failed',
|
||||||
i18n_msg_type_all: 'All type',
|
i18n_msg_type_all: 'All type',
|
||||||
|
i18n_msg_type_ds_invalid: 'Datasource invalid',
|
||||||
channel_inner_msg: 'On site news'
|
channel_inner_msg: 'On site news'
|
||||||
},
|
},
|
||||||
denumberrange: {
|
denumberrange: {
|
||||||
|
|||||||
@ -1350,6 +1350,7 @@ export default {
|
|||||||
read_time: '查看時間',
|
read_time: '查看時間',
|
||||||
type: '消息類型',
|
type: '消息類型',
|
||||||
mark_readed: '標記已讀',
|
mark_readed: '標記已讀',
|
||||||
|
all_mark_readed: '全部已讀',
|
||||||
please_select: '請至少選擇一條消息',
|
please_select: '請至少選擇一條消息',
|
||||||
mark_success: '標記已讀成功',
|
mark_success: '標記已讀成功',
|
||||||
receive_manage: '接收管理',
|
receive_manage: '接收管理',
|
||||||
@ -1358,6 +1359,7 @@ export default {
|
|||||||
i18n_msg_type_dataset_sync: '數據集同步',
|
i18n_msg_type_dataset_sync: '數據集同步',
|
||||||
i18n_msg_type_dataset_sync_success: '數據集同步成功',
|
i18n_msg_type_dataset_sync_success: '數據集同步成功',
|
||||||
i18n_msg_type_dataset_sync_faild: '數據集同步失敗',
|
i18n_msg_type_dataset_sync_faild: '數據集同步失敗',
|
||||||
|
i18n_msg_type_ds_invalid: '數據源失效',
|
||||||
i18n_msg_type_all: '全部類型',
|
i18n_msg_type_all: '全部類型',
|
||||||
channel_inner_msg: '站內消息'
|
channel_inner_msg: '站內消息'
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1353,6 +1353,7 @@ export default {
|
|||||||
read_time: '查看时间',
|
read_time: '查看时间',
|
||||||
type: '消息类型',
|
type: '消息类型',
|
||||||
mark_readed: '标记已读',
|
mark_readed: '标记已读',
|
||||||
|
all_mark_readed: '全部已读',
|
||||||
please_select: '请至少选择一条消息',
|
please_select: '请至少选择一条消息',
|
||||||
mark_success: '标记已读成功',
|
mark_success: '标记已读成功',
|
||||||
receive_manage: '接收管理',
|
receive_manage: '接收管理',
|
||||||
@ -1361,6 +1362,7 @@ export default {
|
|||||||
i18n_msg_type_dataset_sync: '数据集同步',
|
i18n_msg_type_dataset_sync: '数据集同步',
|
||||||
i18n_msg_type_dataset_sync_success: '数据集同步成功',
|
i18n_msg_type_dataset_sync_success: '数据集同步成功',
|
||||||
i18n_msg_type_dataset_sync_faild: '数据集同步失败',
|
i18n_msg_type_dataset_sync_faild: '数据集同步失败',
|
||||||
|
i18n_msg_type_ds_invalid: '数据源失效',
|
||||||
i18n_msg_type_all: '全部类型',
|
i18n_msg_type_all: '全部类型',
|
||||||
channel_inner_msg: '站内消息'
|
channel_inner_msg: '站内消息'
|
||||||
},
|
},
|
||||||
|
|||||||
@ -349,3 +349,7 @@ div:focus {
|
|||||||
width: 5px;
|
width: 5px;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-color-dropdown__link-btn {
|
||||||
|
display: none!important;
|
||||||
|
}
|
||||||
|
|||||||
@ -54,6 +54,7 @@ export function baseTreemapOption(chart_option, chart) {
|
|||||||
// y.type = 'treemap'
|
// y.type = 'treemap'
|
||||||
chart_option.series[0].data.push(y)
|
chart_option.series[0].data.push(y)
|
||||||
}
|
}
|
||||||
|
chart_option.series[0].name = chart.data.series[0].name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(chart_option);
|
// console.log(chart_option);
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
<span>
|
<span>
|
||||||
<i class="el-icon-sort" />
|
<i class="el-icon-sort" />
|
||||||
<span>{{ $t('chart.sort') }}</span>
|
<span>{{ $t('chart.sort') }}</span>
|
||||||
<span class="summary-span">({{ $t('chart.'+item.sort) }})</span>
|
<span class="summary-span-item">({{ $t('chart.'+item.sort) }})</span>
|
||||||
</span>
|
</span>
|
||||||
<i class="el-icon-arrow-right el-icon--right" />
|
<i class="el-icon-arrow-right el-icon--right" />
|
||||||
</span>
|
</span>
|
||||||
@ -171,11 +171,6 @@ export default {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-span{
|
|
||||||
margin-left: 4px;
|
|
||||||
color: #878d9f;;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inner-dropdown-menu{
|
.inner-dropdown-menu{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -185,7 +180,7 @@ export default {
|
|||||||
|
|
||||||
.item-span-style{
|
.item-span-style{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100px;
|
width: 80px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@ -227,7 +227,7 @@ export default {
|
|||||||
|
|
||||||
.item-span-style{
|
.item-span-style{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100px;
|
width: 80px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@ -237,7 +237,7 @@ export default {
|
|||||||
|
|
||||||
.item-span-style{
|
.item-span-style{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 70px;
|
width: 80px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@ -341,7 +341,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { loadTable, getScene, addGroup, delGroup, addTable, delTable, post, isKettleRunning} from '@/api/dataset/dataset'
|
import { loadTable, getScene, addGroup, delGroup, addTable, delTable, post, isKettleRunning, alter} from '@/api/dataset/dataset'
|
||||||
import GroupMoveSelector from './GroupMoveSelector'
|
import GroupMoveSelector from './GroupMoveSelector'
|
||||||
import DsMoveSelector from './DsMoveSelector'
|
import DsMoveSelector from './DsMoveSelector'
|
||||||
|
|
||||||
@ -419,23 +419,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// sceneData: function() {
|
|
||||||
// // this.tableTree()
|
|
||||||
// // console.log(this.$store.state.dataset.sceneData)
|
|
||||||
// this.refreshNodeBy(this.currGroup.id)
|
|
||||||
// return this.$store.state.dataset.sceneData
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.kettleState()
|
this.kettleState()
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
search(val) {
|
search(val) {
|
||||||
// if (val && val !== '') {
|
|
||||||
// this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.name.includes(val) })))
|
|
||||||
// } else {
|
|
||||||
// this.tableData = JSON.parse(JSON.stringify(this.tables))
|
|
||||||
// }
|
|
||||||
this.$emit('switchComponent', { name: '' })
|
this.$emit('switchComponent', { name: '' })
|
||||||
this.tData = []
|
this.tData = []
|
||||||
this.expandedArray = []
|
this.expandedArray = []
|
||||||
@ -526,7 +515,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
saveGroup(group) {
|
saveGroup(group) {
|
||||||
// console.log(group);
|
|
||||||
this.$refs['groupForm'].validate((valid) => {
|
this.$refs['groupForm'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
addGroup(group).then(res => {
|
addGroup(group).then(res => {
|
||||||
@ -536,45 +524,30 @@ export default {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
showClose: true
|
showClose: true
|
||||||
})
|
})
|
||||||
// this.tree(this.groupForm)
|
|
||||||
this.refreshNodeBy(group.pid)
|
this.refreshNodeBy(group.pid)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// this.$message({
|
|
||||||
// message: this.$t('commons.input_error'),
|
|
||||||
// type: 'error',
|
|
||||||
// showClose: true
|
|
||||||
// })
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
saveTable(table) {
|
saveTable(table) {
|
||||||
// console.log(table)
|
|
||||||
table.mode = parseInt(table.mode)
|
table.mode = parseInt(table.mode)
|
||||||
this.$refs['tableForm'].validate((valid) => {
|
this.$refs['tableForm'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
table.isRename = true
|
table.isRename = true
|
||||||
addTable(table).then(response => {
|
alter(table).then(response => {
|
||||||
this.closeTable()
|
this.closeTable()
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('dataset.save_success'),
|
message: this.$t('dataset.save_success'),
|
||||||
type: 'success',
|
type: 'success',
|
||||||
showClose: true
|
showClose: true
|
||||||
})
|
})
|
||||||
// this.tableTree()
|
|
||||||
this.refreshNodeBy(table.sceneId)
|
this.refreshNodeBy(table.sceneId)
|
||||||
// this.$router.push('/dataset/home')
|
|
||||||
// this.$emit('switchComponent', { name: 'ViewTable', param: table.id })
|
|
||||||
this.$store.dispatch('dataset/setTable', new Date().getTime())
|
this.$store.dispatch('dataset/setTable', new Date().getTime())
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// this.$message({
|
|
||||||
// message: this.$t('commons.input_content'),
|
|
||||||
// type: 'error',
|
|
||||||
// showClose: true
|
|
||||||
// })
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -796,14 +769,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
saveMoveDs() {
|
saveMoveDs() {
|
||||||
// if (this.tDs && this.tDs.type === 'group') {
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
this.dsForm.sceneId = this.tDs.id
|
this.dsForm.sceneId = this.tDs.id
|
||||||
this.dsForm.isRename = true
|
this.dsForm.isRename = true
|
||||||
addTable(this.dsForm).then(res => {
|
alter(this.dsForm).then(res => {
|
||||||
this.closeMoveDs()
|
this.closeMoveDs()
|
||||||
// this.tableTree()
|
|
||||||
this.refreshNodeBy(this.dsForm.sceneId)
|
this.refreshNodeBy(this.dsForm.sceneId)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<el-button :disabled="multipleSelection.length === 0" @click="markReaded">{{ $t('webmsg.mark_readed') }}</el-button>
|
<el-button :disabled="multipleSelection.length === 0" @click="markReaded">{{ $t('webmsg.mark_readed') }}</el-button>
|
||||||
<!-- <fu-table-button v-permission="['user:add']" icon="el-icon-circle-plus-outline" :label="$t('user.create')" @click="create" /> -->
|
<el-button @click="allMarkReaded">{{ $t('webmsg.all_mark_readed') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
import LayoutContent from '@/components/business/LayoutContent'
|
import LayoutContent from '@/components/business/LayoutContent'
|
||||||
import ComplexTable from '@/components/business/complex-table'
|
import ComplexTable from '@/components/business/complex-table'
|
||||||
import { query, updateStatus, batchRead } from '@/api/system/msg'
|
import { query, updateStatus, batchRead, allRead } from '@/api/system/msg'
|
||||||
import { msgTypes, getTypeName, loadMsgTypes } from '@/utils/webMsg'
|
import { msgTypes, getTypeName, loadMsgTypes } from '@/utils/webMsg'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
import { addOrder, formatOrders } from '@/utils/index'
|
import { addOrder, formatOrders } from '@/utils/index'
|
||||||
@ -166,6 +166,12 @@ export default {
|
|||||||
this.search()
|
this.search()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
allMarkReaded() {
|
||||||
|
allRead().then(res => {
|
||||||
|
this.$success(this.$t('webmsg.mark_success'))
|
||||||
|
this.search()
|
||||||
|
})
|
||||||
|
},
|
||||||
markReaded() {
|
markReaded() {
|
||||||
if (this.multipleSelection.length === 0) {
|
if (this.multipleSelection.length === 0) {
|
||||||
this.$warning(this.$t('webmsg.please_select'))
|
this.$warning(this.$t('webmsg.please_select'))
|
||||||
|
|||||||
@ -55,6 +55,9 @@ export default {
|
|||||||
},
|
},
|
||||||
refreshTree() {
|
refreshTree() {
|
||||||
this.$refs.dsTree && this.$refs.dsTree.queryTreeDatas()
|
this.$refs.dsTree && this.$refs.dsTree.queryTreeDatas()
|
||||||
|
},
|
||||||
|
msg2Current(sourceParam) {
|
||||||
|
this.$refs.dsTree && this.$refs.dsTree.markInvalid(sourceParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,11 +41,11 @@
|
|||||||
<svg-icon icon-class="datasource" class="ds-icon-scene" />
|
<svg-icon icon-class="datasource" class="ds-icon-scene" />
|
||||||
</span>
|
</span>
|
||||||
<span v-if="data.status === 'Error'">
|
<span v-if="data.status === 'Error'">
|
||||||
<svg-icon icon-class="exclamationmark" class="ds-icon-scene" />
|
<svg-icon icon-class="exclamationmark" class="ds-icon-scene" />
|
||||||
<el-tooltip v-if="data.status === 'Error'" style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" effect="dark" :content="$t('datasource.in_valid')" placement="right">
|
<el-tooltip v-if="data.status === 'Error'" style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" effect="dark" :content="$t('datasource.in_valid')" placement="right">
|
||||||
<el-button type="text" > {{ data.name }} </el-button>
|
<el-button type="text" :style="!!data.msgNode ? {'color': 'red'} : {}"> {{ data.name }} </el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="data.type === 'folder'">
|
<span v-if="data.type === 'folder'">
|
||||||
<i class="el-icon-folder" />
|
<i class="el-icon-folder" />
|
||||||
</span>
|
</span>
|
||||||
@ -129,6 +129,11 @@ export default {
|
|||||||
const newArr = []
|
const newArr = []
|
||||||
for (let index = 0; index < array.length; index++) {
|
for (let index = 0; index < array.length; index++) {
|
||||||
const element = array[index]
|
const element = array[index]
|
||||||
|
if (this.msgNodeId) {
|
||||||
|
if (element.id === this.msgNodeId) {
|
||||||
|
element.msgNode = true
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!(element.type in types)) {
|
if (!(element.type in types)) {
|
||||||
types[element.type] = []
|
types[element.type] = []
|
||||||
// newArr.push(...element, ...{ children: types[element.type] })
|
// newArr.push(...element, ...{ children: types[element.type] })
|
||||||
@ -147,7 +152,7 @@ export default {
|
|||||||
return 'SQL Server'
|
return 'SQL Server'
|
||||||
} else if (type === 'oracle') {
|
} else if (type === 'oracle') {
|
||||||
return 'Oracle'
|
return 'Oracle'
|
||||||
}else if (type === 'pg') {
|
} else if (type === 'pg') {
|
||||||
return 'PostgreSQL'
|
return 'PostgreSQL'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -208,6 +213,21 @@ export default {
|
|||||||
component,
|
component,
|
||||||
componentParam
|
componentParam
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
markInvalid(msgParam) {
|
||||||
|
const param = JSON.parse(msgParam)
|
||||||
|
const msgNodeId = param.id
|
||||||
|
this.msgNodeId = msgNodeId
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.tData.forEach(folder => {
|
||||||
|
const nodes = folder.children
|
||||||
|
nodes.forEach(node => {
|
||||||
|
if (node.id === msgNodeId) {
|
||||||
|
node.msgNode = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -303,4 +323,10 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
.msg-node-class {
|
||||||
|
color: red;
|
||||||
|
>>> i{
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]" style="background-color: #f7f8fa">
|
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]" style="background-color: #f7f8fa">
|
||||||
<de-main-container>
|
<de-main-container>
|
||||||
<ds-main />
|
<ds-main ref="dsMain" />
|
||||||
</de-main-container>
|
</de-main-container>
|
||||||
</de-container>
|
</de-container>
|
||||||
</template>
|
</template>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
import DeMainContainer from '@/components/dataease/DeMainContainer'
|
import DeMainContainer from '@/components/dataease/DeMainContainer'
|
||||||
import DeContainer from '@/components/dataease/DeContainer'
|
import DeContainer from '@/components/dataease/DeContainer'
|
||||||
import DsMain from './DsMain'
|
import DsMain from './DsMain'
|
||||||
|
import bus from '@/utils/bus'
|
||||||
export default {
|
export default {
|
||||||
name: 'Panel',
|
name: 'Panel',
|
||||||
components: { DeMainContainer, DeContainer, DsMain },
|
components: { DeMainContainer, DeContainer, DsMain },
|
||||||
@ -22,10 +22,36 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
bus.$on('to-msg-ds', params => {
|
||||||
|
this.toMsgDs(params)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$store.dispatch('app/toggleSideBarHide', true)
|
||||||
|
const routerParam = this.$router.currentRoute.params
|
||||||
|
this.toMsgDs(routerParam)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toMsgDs(routerParam) {
|
||||||
|
if (routerParam !== null && routerParam.msgNotification) {
|
||||||
|
const panelShareTypeIds = [7, 8]
|
||||||
|
// 说明是从消息通知跳转过来的
|
||||||
|
if (panelShareTypeIds.includes(routerParam.msgType)) { // 是数据集同步
|
||||||
|
if (routerParam.sourceParam) {
|
||||||
|
try {
|
||||||
|
// const msgParam = JSON.parse(routerParam.sourceParam)
|
||||||
|
// this.param = msgParam.id
|
||||||
|
// this.component = ViewTable
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.dsMain && this.$refs.dsMain.msg2Current && this.$refs.dsMain.msg2Current(routerParam.sourceParam)
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user