Merge branch 'dev' into v1.18
This commit is contained in:
commit
2f265d1b99
@ -131,6 +131,9 @@ public class MsgController {
|
||||
if (msgChannelId == 5L) {
|
||||
return authUserService.supportLark();
|
||||
}
|
||||
if (msgChannelId == 6L) {
|
||||
return authUserService.supportLarksuite();
|
||||
}
|
||||
return true;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@ -1109,7 +1109,9 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
||||
@ -39,8 +39,11 @@ public class MysqlDDLProvider extends DDLProviderImpl {
|
||||
for (int i = 0; i < strings.length; i++) {
|
||||
if (StringUtils.isEmpty(strings[i])) {
|
||||
strings1[i] = null;
|
||||
} else {
|
||||
strings1[i] = strings[i].replace("'", "\\'");
|
||||
continue;
|
||||
}
|
||||
strings1[i] = strings[i].replace("'", "\\'");
|
||||
if(strings1[i].equals("/")){
|
||||
strings1[i] = "//";
|
||||
}
|
||||
}
|
||||
values.append("('").append(UUID.randomUUID())
|
||||
|
||||
@ -1096,7 +1096,9 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
if (request.getDatasetTableField().getDeExtractType() == 2
|
||||
|
||||
@ -1091,7 +1091,7 @@ public class CKQueryProvider extends QueryProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
AtomicReference<ChartExtFilterRequest> atomicReference = new AtomicReference<>();
|
||||
List<ChartExtFilterRequest> chartExtFilterRequests = new ArrayList<>();
|
||||
requestList.forEach(request -> {
|
||||
DatasetTableField datasetTableField = request.getDatasetTableField();
|
||||
List<String> requestValue = request.getValue();
|
||||
@ -1106,12 +1106,12 @@ public class CKQueryProvider extends QueryProvider {
|
||||
requestCopy.setValue(new ArrayList<String>() {{
|
||||
add(String.format(toDateTime64, "'" + simpleDateFormat.format(new Date(Long.parseLong(requestValue.get(1)))) + "'"));
|
||||
}});
|
||||
atomicReference.set(requestCopy);
|
||||
chartExtFilterRequests.add(requestCopy);
|
||||
}
|
||||
});
|
||||
|
||||
if (ObjectUtils.isNotEmpty(atomicReference.get())) {
|
||||
requestList.add(atomicReference.get());
|
||||
if (CollectionUtils.isNotEmpty(chartExtFilterRequests)) {
|
||||
requestList.addAll(chartExtFilterRequests);
|
||||
}
|
||||
List<SQLObj> list = new ArrayList<>();
|
||||
for (ChartExtFilterRequest request : requestList) {
|
||||
@ -1181,7 +1181,9 @@ public class CKQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
||||
@ -1169,7 +1169,9 @@ public class Db2QueryProvider extends QueryProvider {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
||||
@ -1119,7 +1119,9 @@ public class EsQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
||||
@ -1075,7 +1075,9 @@ public class HiveQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
||||
@ -1077,7 +1077,9 @@ public class ImpalaQueryProvider extends QueryProvider {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
||||
@ -979,7 +979,9 @@ public class MongoQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
||||
@ -1104,7 +1104,9 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
if (request.getDatasetTableField().getDeExtractType() == 2
|
||||
|
||||
@ -1260,7 +1260,9 @@ public class OracleQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
@ -1127,7 +1127,9 @@ public class PgQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
||||
@ -1108,7 +1108,9 @@ public class RedshiftQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
||||
@ -54,6 +54,7 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
case "NCHAR":
|
||||
case "NTEXT":
|
||||
case "VARCHAR":
|
||||
case "NVARCHAR":
|
||||
case "TEXT":
|
||||
case "TINYTEXT":
|
||||
case "MEDIUMTEXT":
|
||||
@ -898,11 +899,19 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "not_empty")) {
|
||||
whereValue = "''";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "in") || StringUtils.containsIgnoreCase(item.getTerm(), "not in")) {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
if(field.getType().equals("NVARCHAR")){
|
||||
whereValue = Arrays.asList(value.split(",")).stream().map(str ->{return "N"+ str;}).collect(Collectors.joining(","));
|
||||
}else {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
} else {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, value);
|
||||
if(field.getType().equals("NVARCHAR")){
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE_CH, value);
|
||||
}else {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
}
|
||||
SQLObj build = SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1025,11 +1034,19 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
} else if (StringUtils.equalsIgnoreCase(filterItemDTO.getTerm(), "not_empty")) {
|
||||
whereValue = "''";
|
||||
} else if (StringUtils.containsIgnoreCase(filterItemDTO.getTerm(), "in") || StringUtils.containsIgnoreCase(filterItemDTO.getTerm(), "not in")) {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
if(field.getType().equals("NVARCHAR")){
|
||||
whereValue = Arrays.asList(value.split(",")).stream().map(str ->{return "N"+ str;}).collect(Collectors.joining(","));
|
||||
}else {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(filterItemDTO.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
} else {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, value);
|
||||
if(field.getType().equals("NVARCHAR")){
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE_CH, value);
|
||||
}else {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1129,9 +1146,15 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
if(request.getDatasetTableField().getType().equals("NVARCHAR")){
|
||||
whereValue = value.stream().map(str ->{return "N"+ str;}).collect(Collectors.joining(","));
|
||||
}else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
@ -1142,7 +1165,13 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
|
||||
if(request.getDatasetTableField().getType().equals("NVARCHAR")){
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE_CH, value.get(0));
|
||||
}else {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1299,11 +1328,19 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
} else if (StringUtils.equalsIgnoreCase(f.getTerm(), "not_empty")) {
|
||||
whereValue = "''";
|
||||
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(f.getValue(), "','") + "')";
|
||||
if(y.getType().equals("NVARCHAR")){
|
||||
whereValue = Arrays.asList(f.getValue().split(",")).stream().map(str ->{return "N"+ str;}).collect(Collectors.joining(","));
|
||||
}else {
|
||||
whereValue = "('" + String.join("','", f.getValue().split(",")) + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "like")) {
|
||||
whereValue = "'%" + f.getValue() + "%'";
|
||||
} else {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, f.getValue());
|
||||
if(y.getType().equals("NVARCHAR")){
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE_CH, f.getValue());
|
||||
}else {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, f.getValue());
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(fieldAlias)
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package io.dataease.service.chart.util;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
||||
import io.dataease.dto.chart.*;
|
||||
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
||||
import io.dataease.plugins.common.dto.chart.ChartViewFieldDTO;
|
||||
import io.dataease.plugins.xpack.auth.dto.request.ColumnPermissionItem;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@ -1071,11 +1071,11 @@ public class ChartDataBuild {
|
||||
break;
|
||||
}
|
||||
if (originStr.length() >= columnPermissionItem.getDesensitizationRule().getM() && originStr.length() >= columnPermissionItem.getDesensitizationRule().getN()) {
|
||||
desensitizationStr = "***" + StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, columnPermissionItem.getDesensitizationRule().getN()) + "***";
|
||||
desensitizationStr = buildPrefix(columnPermissionItem.getDesensitizationRule().getM()) + StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, columnPermissionItem.getDesensitizationRule().getN()) + "***";
|
||||
break;
|
||||
}
|
||||
if (originStr.length() >= columnPermissionItem.getDesensitizationRule().getM() && originStr.length() < columnPermissionItem.getDesensitizationRule().getN()) {
|
||||
desensitizationStr = "***" + StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, originStr.length());
|
||||
desensitizationStr = buildPrefix(columnPermissionItem.getDesensitizationRule().getM()) + StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, originStr.length());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -1086,6 +1086,18 @@ public class ChartDataBuild {
|
||||
return desensitizationStr;
|
||||
}
|
||||
|
||||
|
||||
private static String buildPrefix(Integer integer) {
|
||||
String prefix = "";
|
||||
if (integer <= 1) {
|
||||
return prefix;
|
||||
}
|
||||
for (int i = 0; i < integer - 1; i++) {
|
||||
prefix = prefix + "*";
|
||||
}
|
||||
return prefix;
|
||||
}
|
||||
|
||||
private static Map<String, Object> transTableNormal(List<ChartViewFieldDTO> fields, ChartViewWithBLOBs view, List<String[]> data, Map<String, ColumnPermissionItem> desensitizationList) {
|
||||
Map<String, Object> map = new TreeMap<>();
|
||||
List<Map<String, Object>> tableRow = new ArrayList<>();
|
||||
|
||||
@ -208,7 +208,10 @@ public class PermissionService {
|
||||
dataSetColumnPermissionsDTO.setDatasetId(datasetId);
|
||||
dataSetColumnPermissionsDTO.setAuthTargetIds(Collections.singletonList(userId));
|
||||
dataSetColumnPermissionsDTO.setAuthTargetType("user");
|
||||
datasetColumnPermissions.addAll(columnPermissionService.searchPermissions(dataSetColumnPermissionsDTO));
|
||||
List<DataSetColumnPermissionsDTO> dataSetColumnPermissionsDTOS = columnPermissionService.searchPermissions(dataSetColumnPermissionsDTO);
|
||||
if(CollectionUtils.isNotEmpty(dataSetColumnPermissionsDTOS)){
|
||||
datasetColumnPermissions.addAll(dataSetColumnPermissionsDTOS);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(roleIds)) {
|
||||
DataSetColumnPermissionsDTO request = new DataSetColumnPermissionsDTO();
|
||||
request.setDatasetId(datasetId);
|
||||
|
||||
@ -17,7 +17,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import fullscreen from 'vue-fullscreen'
|
||||
import Vue from 'vue'
|
||||
Vue.use(fullscreen)
|
||||
import Preview from './Preview'
|
||||
import bus from '@/utils/bus'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
@ -193,7 +193,8 @@ export default {
|
||||
'text',
|
||||
'label',
|
||||
'word-cloud',
|
||||
'flow-map'
|
||||
'flow-map',
|
||||
'bidirectional-bar'
|
||||
],
|
||||
linkageExcludeViewType: [
|
||||
'richTextView',
|
||||
@ -202,7 +203,8 @@ export default {
|
||||
'text',
|
||||
'label',
|
||||
'word-cloud',
|
||||
'flow-map'
|
||||
'flow-map',
|
||||
'bidirectional-bar'
|
||||
],
|
||||
copyData: null,
|
||||
hyperlinksSetVisible: false,
|
||||
|
||||
@ -37,8 +37,11 @@
|
||||
import '@/custom-theme.css'
|
||||
import { mapState } from 'vuex'
|
||||
import bus from '@/utils/bus'
|
||||
import { videoPlayer } from 'vue-video-player'
|
||||
import 'video.js/dist/video-js.css'
|
||||
|
||||
export default {
|
||||
components: { videoPlayer },
|
||||
props: {
|
||||
propValue: {
|
||||
type: String,
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
<el-tab-pane
|
||||
v-for="(item, index) in element.options.tabList"
|
||||
:key="item.name+index"
|
||||
:lazy="false"
|
||||
:lazy="true"
|
||||
:name="item.name"
|
||||
>
|
||||
<span slot="label">
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
.vjs-custom-skin > .video-js {
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
font-family: "PingFang SC","Helvetica Neue","Hiragino Sans GB","Segoe UI","Microsoft YaHei","微软雅黑",sans-serif;
|
||||
}
|
||||
|
||||
|
||||
@ -2785,6 +2785,7 @@ export default {
|
||||
email: 'Email:',
|
||||
tel: 'Tel:',
|
||||
web: 'Web:',
|
||||
bbs: 'BBS:',
|
||||
apply: 'Free Trial Application',
|
||||
more: 'More',
|
||||
weChat_official_account: 'WeChat official account',
|
||||
|
||||
@ -2779,6 +2779,7 @@ export default {
|
||||
email: '郵箱:',
|
||||
tel: '電話:',
|
||||
web: '網址:',
|
||||
bbs: '論壇:',
|
||||
apply: '免費試用申請',
|
||||
more: '更多',
|
||||
weChat_official_account: '微信公眾號',
|
||||
|
||||
@ -2794,6 +2794,7 @@ export default {
|
||||
email: '邮箱:',
|
||||
tel: '电话:',
|
||||
web: '网址:',
|
||||
bbs: '论坛:',
|
||||
apply: '免费试用申请',
|
||||
more: '更多',
|
||||
weChat_official_account: '微信公众号',
|
||||
|
||||
@ -2,8 +2,6 @@ import Vue from 'vue'
|
||||
import Cookies from 'js-cookie'
|
||||
import '@/styles/index.scss' // global css
|
||||
import ElementUI from 'element-ui'
|
||||
import Vuetify from 'vuetify'
|
||||
import Fit2CloudUI from 'fit2cloud-ui'
|
||||
|
||||
import i18n from './lang' // internationalization
|
||||
import App from './App'
|
||||
@ -16,16 +14,12 @@ import api from '@/api/index.js'
|
||||
import filter from '@/filter/filter'
|
||||
import directives from './directive'
|
||||
import VueClipboard from 'vue-clipboard2'
|
||||
import widgets from '@/components/widget'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import './utils/dialog'
|
||||
import DeComplexInput from '@/components/business/conditionTable/DeComplexInput'
|
||||
import DeComplexSelect from '@/components/business/conditionTable/DeComplexSelect'
|
||||
import DeViewSelect from '@/components/deViewSelect'
|
||||
import RemarkEditor from '@/views/chart/components/componentStyle/dialog/RemarkEditor'
|
||||
import TitleRemark from '@/views/chart/view/TitleRemark'
|
||||
import '@/components/canvas/customComponent' // 注册自定义组件
|
||||
import deBtn from '@/components/deCustomCm/DeBtn.vue'
|
||||
|
||||
import '@/utils/DateUtil'
|
||||
@ -33,15 +27,11 @@ import draggable from 'vuedraggable'
|
||||
import deWebsocket from '@/websocket'
|
||||
import { GaodeMap } from '@antv/l7-maps'
|
||||
import * as echarts from 'echarts'
|
||||
import UmyUi from 'umy-ui'
|
||||
// 全屏插件
|
||||
import fullscreen from 'vue-fullscreen'
|
||||
import VueFriendlyIframe from 'vue-friendly-iframe'
|
||||
import vueToPdf from 'vue-to-pdf'
|
||||
import VueVideoPlayer from 'vue-video-player'
|
||||
import 'video.js/dist/video-js.css'
|
||||
|
||||
// 控制标签宽高成比例的指令
|
||||
import proportion from 'vue-proportion-directive'
|
||||
|
||||
import xss from 'xss'
|
||||
// 定义全局XSS解决方法
|
||||
@ -51,19 +41,13 @@ Object.defineProperty(Vue.prototype, '$xss', {
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.use(VueClipboard)
|
||||
Vue.use(widgets)
|
||||
Vue.component('Draggable', draggable)
|
||||
Vue.prototype.$api = api
|
||||
|
||||
Vue.prototype.$echarts = echarts
|
||||
Vue.prototype.$gaodeMap = GaodeMap
|
||||
|
||||
Vue.use(UmyUi)
|
||||
|
||||
Vue.use(fullscreen)
|
||||
|
||||
Vue.use(VueFriendlyIframe)
|
||||
Vue.use(Vuetify)
|
||||
// import TEditor from '@/components/Tinymce/index.vue'
|
||||
// Vue.component('TEditor', TEditor)
|
||||
|
||||
@ -89,9 +73,6 @@ Vue.use(ElementUI, {
|
||||
size: Cookies.get('size') || 'medium', // set element-ui default size
|
||||
i18n: (key, value) => i18n.t(key, value)
|
||||
})
|
||||
Vue.use(Fit2CloudUI, {
|
||||
i18n: (key, value) => i18n.t(key, value)
|
||||
})
|
||||
// Vue.use(VueAxios, axios)
|
||||
Vue.use(filter)
|
||||
Vue.use(directives)
|
||||
@ -100,18 +81,12 @@ Vue.component('Treeselect', Treeselect)
|
||||
Vue.component('DeComplexInput', DeComplexInput)
|
||||
Vue.component('DeComplexSelect', DeComplexSelect)
|
||||
Vue.component('DeViewSelect', DeViewSelect)
|
||||
Vue.component('RemarkEditor', RemarkEditor)
|
||||
Vue.component('TitleRemark', TitleRemark)
|
||||
Vue.component('DeBtn', deBtn)
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.use(vueToPdf)
|
||||
|
||||
Vue.use(VueVideoPlayer)
|
||||
|
||||
Vue.use(proportion)
|
||||
|
||||
Vue.prototype.hasDataPermission = function(pTarget, pSource) {
|
||||
if (this.$store.state.user.user.isAdmin || pSource === 'ignore') {
|
||||
return true
|
||||
|
||||
@ -44,7 +44,7 @@ export const constantRoutes = [
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/login/index'),
|
||||
component: () => import(/* webpackChunkName:"login" */'@/views/login/index'),
|
||||
hidden: true
|
||||
},
|
||||
|
||||
@ -67,29 +67,29 @@ export const constantRoutes = [
|
||||
children: [
|
||||
{
|
||||
path: 'edit',
|
||||
component: () => import('@/views/panel/edit')
|
||||
component: () => import(/* webpackChunkName:"panelEdit" */'@/views/panel/edit')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/delink',
|
||||
component: () => import('@/views/link'),
|
||||
component: () => import(/* webpackChunkName:"link" */'@/views/link'),
|
||||
hidden: true
|
||||
},
|
||||
|
||||
{
|
||||
path: '/preview/:reportId',
|
||||
component: () => import('@/components/canvas/components/editor/PreviewEject'),
|
||||
component: () => import(/* webpackChunkName:"preview" */'@/components/canvas/components/editor/PreviewEject'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/previewScreenShot/:reportId/:backScreenShot',
|
||||
component: () => import('@/components/canvas/components/editor/PreviewEject'),
|
||||
component: () => import(/* webpackChunkName:"PreviewEject" */'@/components/canvas/components/editor/PreviewEject'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/previewFullScreen',
|
||||
component: () => import('@/components/canvas/components/editor/PreviewFullScreen'),
|
||||
component: () => import(/* webpackChunkName:"previewFullScreen" */'@/components/canvas/components/editor/PreviewFullScreen'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
|
||||
@ -109,6 +109,13 @@ const actions = {
|
||||
if (!data) {
|
||||
reject('Verification failed, please Login again.')
|
||||
}
|
||||
const historyUserId = localStorage.getItem('userId')
|
||||
if(historyUserId && historyUserId !== data.userId+''){
|
||||
const clearLocalStorage = [ 'panel-main-tree', 'panel-default-tree','chart-tree','dataset-tree']
|
||||
clearLocalStorage.forEach((item) => {
|
||||
localStorage.removeItem(item)
|
||||
})
|
||||
}
|
||||
localStorage.setItem('userId', data.userId)
|
||||
const currentUser = data
|
||||
commit('SET_USER', currentUser)
|
||||
|
||||
@ -50,6 +50,8 @@
|
||||
style="padding-top: 5px"
|
||||
>
|
||||
<el-color-picker
|
||||
ref="colorPicker"
|
||||
@change="colorChange"
|
||||
v-model="curComponent.commonBackground.color"
|
||||
:disabled="!curComponent.commonBackground.backgroundColorSelect"
|
||||
size="mini"
|
||||
@ -312,6 +314,12 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
colorChange(val) {
|
||||
if (val === null) {
|
||||
this.$refs.colorPicker.color.value = ''
|
||||
this.curComponent.commonBackground.color = ''
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (this.curComponent && this.curComponent.commonBackground && this.curComponent.commonBackground.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') {
|
||||
this.fileList.push({ url: imgUrlTrans(this.curComponent.commonBackground.outerImage) })
|
||||
|
||||
@ -251,6 +251,8 @@ export function baseBidirectionalBarOptionAntV(plot, container, chart, action, i
|
||||
const legend = getLegend(chart)
|
||||
const xAxis = getXAxis(chart)
|
||||
const yAxis = getYAxis(chart)
|
||||
// 处理横轴标题方向不对
|
||||
yAxis?.title && (yAxis.title.autoRotate = false)
|
||||
// data
|
||||
const data = _.cloneDeep(chart.data.data)
|
||||
// options
|
||||
@ -280,12 +282,6 @@ export function baseBidirectionalBarOptionAntV(plot, container, chart, action, i
|
||||
start: [{ trigger: 'legend-item:click', action: ['list-unchecked:toggle', 'data-filter:filter', 'element-active:reset', 'element-highlight:reset'] }]
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'tooltip', cfg: {
|
||||
start: [{ trigger: 'interval:mousemove', action: 'tooltip:show' }],
|
||||
end: [{ trigger: 'interval:mouseleave', action: 'tooltip:hide' }]
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'active-region', cfg: {
|
||||
start: [{ trigger: 'interval:mousemove', action: 'active-region:show' }],
|
||||
@ -307,19 +303,6 @@ export function baseBidirectionalBarOptionAntV(plot, container, chart, action, i
|
||||
}
|
||||
}
|
||||
}
|
||||
// group
|
||||
if (isGroup) {
|
||||
options.isGroup = true
|
||||
} else {
|
||||
delete options.isGroup
|
||||
}
|
||||
// stack
|
||||
if (isStack) {
|
||||
options.isStack = true
|
||||
} else {
|
||||
delete options.isStack
|
||||
}
|
||||
options.isPercent = chart.type.includes('percentage')
|
||||
// custom color
|
||||
options.color = antVCustomColor(chart)
|
||||
if (customAttr.color.gradient) {
|
||||
|
||||
@ -712,8 +712,8 @@ export function getYAxis(chart) {
|
||||
const axisValue = a.axisValue
|
||||
if (!chart.type.includes('horizontal')) {
|
||||
if (axisValue && !axisValue.auto) {
|
||||
axisValue.min && (axis.minLimit = parseFloat(axisValue.min))
|
||||
axisValue.max && (axis.maxLimit = parseFloat(axisValue.max))
|
||||
axisValue.min && (axis.minLimit = axis.min = parseFloat(axisValue.min))
|
||||
axisValue.max && (axis.maxLimit = axis.max = parseFloat(axisValue.max))
|
||||
axisValue.splitCount && (axis.tickCount = parseFloat(axisValue.splitCount))
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,9 +83,9 @@ export function baseMapOption(chart_option, chart, themeStyle, curAreaCode, seri
|
||||
chart_option.tooltip.borderColor = bgColor
|
||||
}
|
||||
}
|
||||
chart_option.title.text = chart.title
|
||||
// 处理data
|
||||
if (chart.data) {
|
||||
chart_option.title.text = chart.title
|
||||
if (chart.data.series && chart.data.series.length > 0) {
|
||||
chart_option.series[0].name = chart.data.series[seriesIndex].name
|
||||
chart_option.series[0].selectedMode = true
|
||||
|
||||
@ -226,9 +226,11 @@
|
||||
import { CHART_FONT_FAMILY, CHART_FONT_LETTER_SPACE, COLOR_PANEL, DEFAULT_TITLE_STYLE } from '../../chart/chart'
|
||||
import { checkViewTitle } from '@/components/canvas/utils/utils'
|
||||
import { mapState } from 'vuex'
|
||||
import RemarkEditor from '@/views/chart/components/componentStyle/dialog/RemarkEditor'
|
||||
|
||||
export default {
|
||||
name: 'TitleSelectorAntV',
|
||||
components: { RemarkEditor },
|
||||
props: {
|
||||
param: {
|
||||
type: Object,
|
||||
|
||||
@ -319,10 +319,10 @@ export default {
|
||||
},
|
||||
isEnableCompare() {
|
||||
let xAxis = null
|
||||
if (Object.prototype.toString.call(this.chart.xaxisExt) === '[object Array]') {
|
||||
xAxis = JSON.parse(JSON.stringify(this.chart.xaxisExt))
|
||||
if (Object.prototype.toString.call(this.chart.xaxis) === '[object Array]') {
|
||||
xAxis = JSON.parse(JSON.stringify(this.chart.xaxis))
|
||||
} else {
|
||||
xAxis = JSON.parse(this.chart.xaxisExt)
|
||||
xAxis = JSON.parse(this.chart.xaxis)
|
||||
}
|
||||
const t1 = xAxis.filter(ele => {
|
||||
return ele.deType === 1 && SUPPORT_Y_M.includes(ele.dateStyle)
|
||||
|
||||
@ -99,10 +99,10 @@ import eventBus from '@/components/canvas/utils/eventBus'
|
||||
import { DEFAULT_COLOR_CASE, DEFAULT_SCROLL, DEFAULT_SIZE, NOT_SUPPORT_PAGE_DATASET } from '@/views/chart/chart/chart'
|
||||
import { mapState } from 'vuex'
|
||||
import DePagination from '@/components/deCustomCm/pagination.js'
|
||||
|
||||
import { UxGrid, UxTableColumn } from 'umy-ui'
|
||||
export default {
|
||||
name: 'TableNormal',
|
||||
components: { DePagination },
|
||||
components: { DePagination, UxGrid, UxTableColumn },
|
||||
props: {
|
||||
chart: {
|
||||
type: Object,
|
||||
|
||||
@ -1763,7 +1763,7 @@ import CalcChartFieldEdit from '@/views/chart/view/CalcChartFieldEdit'
|
||||
import { equalsAny, includesAny } from '@/utils/StringUtils'
|
||||
import PositionAdjust from '@/views/chart/view/PositionAdjust'
|
||||
import MarkMapDataEditor from '@/views/chart/components/map/MarkMapDataEditor'
|
||||
|
||||
import FuSplitPane from './FuSplitPane.vue'
|
||||
export default {
|
||||
name: 'ChartEdit',
|
||||
components: {
|
||||
@ -1801,7 +1801,8 @@ export default {
|
||||
DrillPath,
|
||||
PluginCom,
|
||||
MapMapping,
|
||||
MarkMapDataEditor
|
||||
MarkMapDataEditor,
|
||||
FuSplitPane
|
||||
},
|
||||
props: {
|
||||
param: {
|
||||
|
||||
237
frontend/src/views/chart/view/FuSplitPane.vue
Normal file
237
frontend/src/views/chart/view/FuSplitPane.vue
Normal file
@ -0,0 +1,237 @@
|
||||
<template>
|
||||
<div :style="{ cursor, userSelect }" class="fu-split-pane" ref="outerWrapper">
|
||||
<div
|
||||
:class="[`is-${direction}`, 'fu-split-pane__left']"
|
||||
:style="{
|
||||
[attr]: isReverse ? valueAnother : `${value}px`,
|
||||
'padding-right': padding,
|
||||
}"
|
||||
>
|
||||
<slot :name="isHorizontal ? 'left' : 'top'"></slot>
|
||||
</div>
|
||||
<div
|
||||
:class="resizerClasses"
|
||||
:style="{ [resizerAttr]: `${value}px`, ...resizerStyle }"
|
||||
@mousedown="onMouseDown"
|
||||
@mouseover="hover = true"
|
||||
@mouseleave="hover = false"
|
||||
>
|
||||
<div class="icon" v-if="resizerType === 'resizer'">
|
||||
<slot name="resizer">
|
||||
<i class="el-icon-more"></i>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:class="[`is-${direction}`, 'fu-split-pane__right']"
|
||||
:style="{
|
||||
[attr]: isReverse ? `${value}px` : valueAnother,
|
||||
'padding-left': padding,
|
||||
}"
|
||||
>
|
||||
<slot :name="isHorizontal ? 'right' : 'bottom'"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "FuSplitPane",
|
||||
props: {
|
||||
min: {
|
||||
type: [Number, String],
|
||||
default: "10px",
|
||||
},
|
||||
left: [Number, String],
|
||||
right: [Number, String],
|
||||
top: [Number, String],
|
||||
bottom: [Number, String],
|
||||
direction: {
|
||||
validator: (val) => ["vertical", "horizontal"].includes(val),
|
||||
default: "horizontal",
|
||||
},
|
||||
localKey: String,
|
||||
resizable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
resizerType: {
|
||||
validator: (val) => ["resizer", "line"].includes(val),
|
||||
default: "resizer",
|
||||
},
|
||||
resizerClass: String,
|
||||
resizerStyle: Object,
|
||||
resizerHoverClass: String,
|
||||
},
|
||||
watch: {
|
||||
left: {
|
||||
immediate: true,
|
||||
handler: function (newValue, oldValue) {
|
||||
if (newValue !== oldValue) {
|
||||
this.$nextTick(() => {
|
||||
this.value = this.defaultValue;
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
bottom: {
|
||||
immediate: true,
|
||||
handler: function (newValue, oldValue) {
|
||||
if (newValue !== oldValue) {
|
||||
this.$nextTick(() => {
|
||||
this.value = this.defaultValue;
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isReverse() {
|
||||
return this.right || this.bottom;
|
||||
},
|
||||
isHorizontal() {
|
||||
return this.direction === "horizontal";
|
||||
},
|
||||
userSelect() {
|
||||
return this.active ? "none" : "";
|
||||
},
|
||||
cursor() {
|
||||
return this.active && this.resizable
|
||||
? this.isHorizontal
|
||||
? "col-resize"
|
||||
: "row-resize"
|
||||
: "";
|
||||
},
|
||||
outerWrapperSize() {
|
||||
return this.$refs.outerWrapper[this.offsetSize];
|
||||
},
|
||||
offsetSize() {
|
||||
return this.isHorizontal ? "offsetWidth" : "offsetHeight";
|
||||
},
|
||||
defaultValue() {
|
||||
if (this.isHorizontal) {
|
||||
return this.left
|
||||
? this.getMin(this.percentToValue(this.left))
|
||||
: (this.right && this.getMin(this.percentToValue(this.right))) ||
|
||||
this.outerWrapperSize / 2;
|
||||
} else {
|
||||
return this.top
|
||||
? this.getMin(this.percentToValue(this.top))
|
||||
: (this.bottom && this.getMin(this.percentToValue(this.bottom))) ||
|
||||
this.outerWrapperSize / 2;
|
||||
}
|
||||
},
|
||||
valueAnother() {
|
||||
return `calc(100% - ${this.value}px)`;
|
||||
},
|
||||
attr() {
|
||||
return this.isHorizontal ? "width" : "height";
|
||||
},
|
||||
resizerAttr() {
|
||||
return this.isHorizontal
|
||||
? this.isReverse
|
||||
? "right"
|
||||
: "left"
|
||||
: this.isReverse
|
||||
? "bottom"
|
||||
: "top";
|
||||
},
|
||||
saveKey({ localKey }) {
|
||||
return "Fu-SP-" + localKey;
|
||||
},
|
||||
resizerClasses() {
|
||||
const classes = [
|
||||
`fu-split-pane__${this.resizerType}`,
|
||||
`is-${this.direction}`,
|
||||
this.resizable && "is-resizable",
|
||||
this.resizerClass,
|
||||
this.hover && (this.resizerHoverClass || "hover"),
|
||||
];
|
||||
return classes;
|
||||
},
|
||||
padding() {
|
||||
return this.resizerType === "resizer" && "3px";
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: false,
|
||||
value: 0,
|
||||
oldValue: 0,
|
||||
initOffset: 0,
|
||||
hover: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.readValue();
|
||||
},
|
||||
methods: {
|
||||
onMouseDown(e) {
|
||||
this.initOffset = this.isHorizontal ? e.pageX : e.pageY;
|
||||
this.oldValue = this.value;
|
||||
this.active = true;
|
||||
document.addEventListener("mousemove", this.onMouseMove);
|
||||
document.addEventListener("mouseup", this.onMouseUp);
|
||||
},
|
||||
onMouseUp() {
|
||||
this.active = false;
|
||||
document.removeEventListener("mousemove", this.onMouseMove);
|
||||
document.removeEventListener("mouseup", this.onMouseUp);
|
||||
this.$emit("changeSplit", this.value);
|
||||
},
|
||||
onMouseMove(e) {
|
||||
if (!this.resizable) return;
|
||||
if (this.active) {
|
||||
const currentPage = this.isHorizontal ? e.pageX : e.pageY;
|
||||
const offset = currentPage - this.initOffset;
|
||||
const value = this.isReverse
|
||||
? this.oldValue - offset
|
||||
: this.oldValue + offset;
|
||||
if (
|
||||
value > this.percentToValue(this.min) &&
|
||||
value < this.outerWrapperSize - this.percentToValue(this.min)
|
||||
) {
|
||||
this.value = value;
|
||||
this.writeValue();
|
||||
}
|
||||
}
|
||||
},
|
||||
// 百分比换算成像素
|
||||
percentToValue(val) {
|
||||
const size = this.$refs.outerWrapper[this.offsetSize];
|
||||
if (typeof val === "string" && val.includes("%")) {
|
||||
return (parseInt(val) / 100) * size;
|
||||
} else {
|
||||
return parseInt(val);
|
||||
}
|
||||
},
|
||||
// 是否取最小值
|
||||
getMin(val) {
|
||||
return val < this.percentToValue(this.min)
|
||||
? this.percentToValue(this.min)
|
||||
: val;
|
||||
},
|
||||
// localStorage储存数值
|
||||
writeValue() {
|
||||
const obj = {
|
||||
[this.resizerAttr]: this.value,
|
||||
};
|
||||
if (this.localKey) {
|
||||
localStorage.setItem(this.saveKey, JSON.stringify(obj));
|
||||
}
|
||||
},
|
||||
readValue() {
|
||||
if (this.localKey) {
|
||||
const local = localStorage.getItem(this.saveKey);
|
||||
if (local && local[this.resizerAttr]) {
|
||||
this.value = parseInt(local) || this.defaultValue;
|
||||
} else {
|
||||
this.value = this.defaultValue;
|
||||
}
|
||||
} else {
|
||||
this.value = this.defaultValue;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -220,9 +220,11 @@ import cancelMix from './cancelMix'
|
||||
import msgCfm from '@/components/msgCfm/index'
|
||||
import { pySort } from './util'
|
||||
import { updateCacheTree } from '@/components/canvas/utils/utils'
|
||||
import { UxGrid, UxTableColumn } from 'umy-ui'
|
||||
|
||||
export default {
|
||||
name: 'AddApi',
|
||||
components: { UxGrid, UxTableColumn },
|
||||
mixins: [cancelMix, msgCfm],
|
||||
props: {
|
||||
param: {
|
||||
|
||||
@ -109,10 +109,11 @@ import { getTable, post } from '@/api/dataset/dataset'
|
||||
import DatasetGroupSelector from '../common/DatasetGroupSelector'
|
||||
import DatasetCustomField from '../common/DatasetCustomField'
|
||||
import { updateCacheTree } from '@/components/canvas/utils/utils'
|
||||
import { UxGrid, UxTableColumn } from 'umy-ui'
|
||||
|
||||
export default {
|
||||
name: 'AddCustom',
|
||||
components: { DatasetCustomField, DatasetGroupSelector },
|
||||
components: { DatasetCustomField, DatasetGroupSelector, UxGrid, UxTableColumn },
|
||||
props: {
|
||||
param: {
|
||||
type: Object,
|
||||
|
||||
@ -228,9 +228,11 @@ import cancelMix from './cancelMix'
|
||||
|
||||
import { pySort } from './util'
|
||||
import { updateCacheTree } from '@/components/canvas/utils/utils'
|
||||
import { UxGrid, UxTableColumn } from 'umy-ui'
|
||||
|
||||
export default {
|
||||
name: 'AddDB',
|
||||
components: { UxGrid, UxTableColumn },
|
||||
mixins: [msgCfm, cancelMix],
|
||||
props: {
|
||||
param: {
|
||||
|
||||
@ -239,6 +239,7 @@ import msgCfm from '@/components/msgCfm/index'
|
||||
import cancelMix from './cancelMix'
|
||||
import Config from "@/settings";
|
||||
import { updateCacheTree } from '@/components/canvas/utils/utils'
|
||||
import { UxGrid, UxTableColumn } from 'umy-ui'
|
||||
|
||||
const token = getToken()
|
||||
const RefreshTokenKey = Config.RefreshTokenKey
|
||||
@ -246,6 +247,7 @@ const RefreshTokenKey = Config.RefreshTokenKey
|
||||
export default {
|
||||
name: 'AddExcel',
|
||||
mixins: [msgCfm, cancelMix],
|
||||
components: { UxGrid, UxTableColumn },
|
||||
props: {
|
||||
param: {
|
||||
type: Object,
|
||||
|
||||
@ -23,9 +23,11 @@
|
||||
<script>
|
||||
import { post } from '@/api/dataset/dataset'
|
||||
import _ from 'lodash'
|
||||
import { UxGrid, UxTableColumn } from 'umy-ui'
|
||||
|
||||
export default {
|
||||
name: 'UnionPreview',
|
||||
components: { UxGrid, UxTableColumn },
|
||||
props: {
|
||||
table: {
|
||||
type: Object,
|
||||
|
||||
@ -57,9 +57,11 @@
|
||||
|
||||
<script>
|
||||
import { post } from '@/api/dataset/dataset'
|
||||
import { UxGrid, UxTableColumn } from 'umy-ui'
|
||||
|
||||
export default {
|
||||
name: 'DatasetTableData',
|
||||
components: { UxGrid, UxTableColumn },
|
||||
props: {
|
||||
table: {
|
||||
type: Object,
|
||||
|
||||
@ -81,8 +81,10 @@
|
||||
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import { UxGrid, UxTableColumn } from 'umy-ui'
|
||||
export default {
|
||||
name: 'TabDataPreview',
|
||||
components: { UxGrid, UxTableColumn },
|
||||
props: {
|
||||
table: {
|
||||
type: Object,
|
||||
|
||||
@ -91,8 +91,6 @@ export default {
|
||||
computed: {},
|
||||
mounted() {},
|
||||
beforeCreate() {
|
||||
// this.loadChannelData()
|
||||
|
||||
channelList().then((res) => {
|
||||
this.msg_channels = res.data
|
||||
})
|
||||
@ -153,12 +151,6 @@ export default {
|
||||
// this.checkBoxStatus(node, )
|
||||
}
|
||||
},
|
||||
// 加载消息渠道
|
||||
loadChannelData() {
|
||||
channelList().then((res) => {
|
||||
this.msg_channels = res.data
|
||||
})
|
||||
},
|
||||
// 加载用户设置信息
|
||||
loadSettingData(callBack) {
|
||||
// this.setting_data = {}
|
||||
|
||||
@ -536,7 +536,12 @@ import TextAttr from '@/components/canvas/components/TextAttr'
|
||||
import { userLoginInfo } from '@/api/systemInfo/userLogin'
|
||||
import { activeWatermark } from '@/components/canvas/tools/watermark'
|
||||
import PositionAdjust from '@/views/chart/view/PositionAdjust'
|
||||
import fullscreen from 'vue-fullscreen'
|
||||
import proportion from 'vue-proportion-directive'
|
||||
import Vue from 'vue'
|
||||
Vue.use(proportion)
|
||||
|
||||
Vue.use(fullscreen)
|
||||
export default {
|
||||
name: 'PanelEdit',
|
||||
components: {
|
||||
|
||||
@ -16,20 +16,13 @@
|
||||
style="width:100%;height: 100%;margin:0 10px;border-radius: 4px;overflow-x: auto;display: flex;align-items: center;"
|
||||
@end="end2"
|
||||
>
|
||||
|
||||
<v-flex
|
||||
v-for="(item,index) in element.options.attrs.dragItems"
|
||||
<drag-item
|
||||
:key="item.id"
|
||||
>
|
||||
<drag-item
|
||||
:key="item.id"
|
||||
:item="item"
|
||||
:index="index"
|
||||
|
||||
@closeItem="closeItem"
|
||||
/>
|
||||
</v-flex>
|
||||
|
||||
:item="item"
|
||||
:index="index"
|
||||
v-for="(item,index) in element.options.attrs.dragItems"
|
||||
@closeItem="closeItem"
|
||||
/>
|
||||
<span solt="footer">{{ $t('panel.drag_here') }}</span>
|
||||
</draggable>
|
||||
</el-row>
|
||||
@ -134,6 +127,20 @@ export default {
|
||||
padding: 4px 0 0 0;
|
||||
height: 100%;
|
||||
line-height: 100%;
|
||||
.v-flex {
|
||||
font-variant: tabular-nums;
|
||||
font-feature-settings: "tnum";
|
||||
text-rendering: optimizeLegibility;
|
||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, FangSong, SimHei, STHeiti, STKaiti, STSong, STFangsong sans-serif;
|
||||
font-size: 14px;
|
||||
word-break: break-all;
|
||||
white-space: nowrap;
|
||||
color: #9ea6b2;
|
||||
line-height: 100%;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -19,6 +19,8 @@ import DeMainContainer from '@/components/dataease/DeMainContainer'
|
||||
import DeContainer from '@/components/dataease/DeContainer'
|
||||
import PanelMain from '@/views/panel/list/PanelMain'
|
||||
import PanelEdit from '@/views/panel/edit'
|
||||
import '@/components/canvas/customComponent' // 注册自定义组件
|
||||
import '@/components/widget'
|
||||
|
||||
export default {
|
||||
name: 'Panel',
|
||||
|
||||
@ -368,6 +368,9 @@
|
||||
</el-row>
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import fullscreen from 'vue-fullscreen'
|
||||
Vue.use(fullscreen)
|
||||
import PDFPreExport from '@/views/panel/export/PDFPreExport'
|
||||
import Preview from '@/components/canvas/components/editor/Preview'
|
||||
import SaveToTemplate from '@/views/panel/list/SaveToTemplate'
|
||||
@ -388,6 +391,7 @@ import AppExportForm from '@/views/panel/list/AppExportForm'
|
||||
import GrantAuth from '../grantAuth'
|
||||
import msgCfm from '@/components/msgCfm/index'
|
||||
import { inOtherPlatform } from '@/utils/index'
|
||||
|
||||
export default {
|
||||
name: 'PanelViewShow',
|
||||
components: { AppExportForm, PanelDetailInfo, Preview, SaveToTemplate, PDFPreExport, ShareHead, GrantAuth },
|
||||
|
||||
@ -154,6 +154,7 @@ export default {
|
||||
},
|
||||
themeChange(styleKey) {
|
||||
adaptCurThemeFilterStyleAll(styleKey)
|
||||
this.$store.commit('recordSnapshot')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,314 +0,0 @@
|
||||
<template>
|
||||
<layout-content>
|
||||
<template #header>
|
||||
<el-icon
|
||||
name="back"
|
||||
class="back-button"
|
||||
@click.native="backToList"
|
||||
/>
|
||||
{{
|
||||
params && params.id && params.showModel && params.showModel === 'show' && !canEdit ? $t('driver.show_info') : $t('driver.modify')
|
||||
}}
|
||||
<el-button
|
||||
v-if="canEdit"
|
||||
size="mini"
|
||||
style="float: right;"
|
||||
type="primary"
|
||||
@click="save"
|
||||
>{{ $t('commons.save') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
size="mini"
|
||||
style="float: right;"
|
||||
type="primary"
|
||||
@click="changeEdit"
|
||||
>{{ $t('commons.edit') }}
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
<div>
|
||||
|
||||
<el-form
|
||||
ref="driverForm"
|
||||
:model="driverForm"
|
||||
:rules="rule"
|
||||
size="small"
|
||||
:disabled="params && params.id && params.showModel && params.showModel === 'show' && !canEdit"
|
||||
label-width="180px"
|
||||
label-position="right"
|
||||
>
|
||||
<el-form-item
|
||||
:label="$t('commons.name')"
|
||||
prop="name"
|
||||
>
|
||||
<el-input
|
||||
v-model="driverForm.name"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.description')">
|
||||
<el-input
|
||||
v-model="driverForm.desc"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('datasource.type')"
|
||||
prop="type"
|
||||
>
|
||||
<el-select
|
||||
v-model="driverForm.type"
|
||||
:placeholder="$t('datasource.please_choose_type')"
|
||||
class="select-width"
|
||||
style="width: 100%"
|
||||
disabled
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dsTypes"
|
||||
:key="item.type"
|
||||
:label="item.name"
|
||||
:value="item.type"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
:label="$t('driver.driver')"
|
||||
prop="driverClass"
|
||||
>
|
||||
<el-input
|
||||
v-model="driverForm.driverClass"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-upload
|
||||
:action="baseUrl+'driver/file/upload'"
|
||||
:multiple="true"
|
||||
:show-file-list="false"
|
||||
:file-list="fileList"
|
||||
:data="params"
|
||||
accept=".jar"
|
||||
:before-upload="beforeUpload"
|
||||
:on-success="uploadSuccess"
|
||||
:on-error="uploadFail"
|
||||
name="file"
|
||||
:headers="headers"
|
||||
style="float: right;"
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
style="float: right;"
|
||||
:disabled="uploading"
|
||||
>
|
||||
<span
|
||||
v-if="!uploading"
|
||||
style="font-size: 12px;"
|
||||
>{{ $t('dataset.upload_file') }}</span>
|
||||
<span
|
||||
v-if="uploading"
|
||||
style="font-size: 12px;"
|
||||
><i class="el-icon-loading" /> {{ $t('dataset.uploading') }}</span>
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<fu-table :data="driverFiles">
|
||||
<el-table-column
|
||||
prop="fileName"
|
||||
:label="$t('driver.file_name')"
|
||||
/>
|
||||
<fu-table-operations
|
||||
:buttons="buttons"
|
||||
:label="$t('commons.operating')"
|
||||
fix
|
||||
/>
|
||||
</fu-table>
|
||||
|
||||
</div>
|
||||
</layout-content>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LayoutContent from '@/components/business/LayoutContent'
|
||||
import i18n from '@/lang/index'
|
||||
import { deleteDriverFile, listDriverDetails, updateDriver } from '@/api/system/datasource'
|
||||
import { $alert } from '@/utils/message'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
const token = getToken()
|
||||
|
||||
export default {
|
||||
name: 'DriverForm',
|
||||
components: {
|
||||
LayoutContent
|
||||
},
|
||||
props: {
|
||||
params: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
tData: {
|
||||
type: Array,
|
||||
default: null
|
||||
},
|
||||
dsTypes: {
|
||||
type: Array,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
disabled: false,
|
||||
driverForm: {
|
||||
id: '',
|
||||
name: '',
|
||||
desc: '',
|
||||
type: '',
|
||||
driverClass: ''
|
||||
},
|
||||
datasourceType: {},
|
||||
driverClassList: [],
|
||||
rule: {
|
||||
name: [{ required: true, message: i18n.t('datasource.input_name'), trigger: 'blur' },
|
||||
{ min: 2, max: 50, message: i18n.t('datasource.input_limit_2_25', [2, 25]), trigger: 'blur' }],
|
||||
desc: [{ required: true, message: i18n.t('datasource.input_name'), trigger: 'blur' },
|
||||
{ min: 2, max: 200, message: i18n.t('datasource.input_limit_2_25', [2, 25]), trigger: 'blur' }],
|
||||
type: [{ required: true, message: i18n.t('datasource.please_choose_type'), trigger: 'blur' }],
|
||||
driverClass: [{ required: true, message: i18n.t('driver.please_set_driverClass'), trigger: 'blur' }]
|
||||
},
|
||||
canEdit: false,
|
||||
driverFiles: [],
|
||||
btnDisabled: false,
|
||||
buttons: [
|
||||
{
|
||||
label: this.$t('commons.delete'), icon: 'el-icon-delete', type: 'danger', click: this.deleteDriverFile,
|
||||
disabled: this.btnDisabled
|
||||
}
|
||||
],
|
||||
uploading: false,
|
||||
baseUrl: process.env.VUE_APP_BASE_API,
|
||||
headers: { Authorization: token, 'Accept-Language': i18n.locale.replace('_', '-') },
|
||||
fileList: []
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
const row = this.params
|
||||
this.driverForm = JSON.parse(JSON.stringify(row))
|
||||
this.disabled = this.params && this.params.id && this.params.showModel && this.params.showModel === 'show' && !this.canEdit
|
||||
this.listDriverDetails()
|
||||
},
|
||||
methods: {
|
||||
beforeUpload(file) {
|
||||
this.uploading = true
|
||||
},
|
||||
uploadSuccess(response, file, fileList) {
|
||||
this.uploading = false
|
||||
this.listDriverDetails()
|
||||
},
|
||||
uploadFail(response, file, fileList) {
|
||||
let myError = response.toString()
|
||||
myError = myError.replace('Error: ', '')
|
||||
if (myError.indexOf('AuthenticationException') >= 0) {
|
||||
const message = i18n.t('login.tokenError')
|
||||
$alert(message, () => {
|
||||
store.dispatch('user/logout').then(() => {
|
||||
location.reload()
|
||||
})
|
||||
}, {
|
||||
confirmButtonText: i18n.t('login.re_login'),
|
||||
showClose: false
|
||||
})
|
||||
return
|
||||
}
|
||||
const errorMessage = JSON.parse(myError).message
|
||||
this.uploading = false
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: errorMessage,
|
||||
showClose: true
|
||||
})
|
||||
},
|
||||
deleteDriverFile(row) {
|
||||
deleteDriverFile(row).then(res => {
|
||||
this.$success(this.$t('commons.delete_success'))
|
||||
this.listDriverDetails()
|
||||
})
|
||||
},
|
||||
listDriverDetails() {
|
||||
listDriverDetails(this.driverForm.id).then(res => {
|
||||
this.driverFiles = res.data
|
||||
this.driverClassList = []
|
||||
this.driverFiles.forEach(driverFile => {
|
||||
this.driverClassList = this.driverClassList.concat(driverFile.driverClass.split(','))
|
||||
})
|
||||
})
|
||||
},
|
||||
changeEdit() {
|
||||
this.canEdit = true
|
||||
this.formType = 'modify'
|
||||
this.disabled = this.params && this.params.id && this.params.showModel && this.params.showModel === 'show' && !this.canEdit
|
||||
},
|
||||
save() {
|
||||
this.$refs.driverForm.validate(valid => {
|
||||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
updateDriver(this.driverForm).then(res => {
|
||||
this.$success(i18n.t('commons.success'))
|
||||
this.canEdit = false
|
||||
})
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.$refs.dsForm.resetFields()
|
||||
},
|
||||
backToList() {
|
||||
this.$emit('switch-component', {})
|
||||
},
|
||||
refreshType(form) {
|
||||
this.$emit('refresh-type', form)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.ms-http-input {
|
||||
width: 500px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.tip {
|
||||
padding: 3px 5px;
|
||||
font-size: 16px;
|
||||
border-radius: 0;
|
||||
border-left: 4px solid #409EFF;
|
||||
margin: 5px 5px 10px 5px;
|
||||
}
|
||||
|
||||
.el-select ::v-deep input {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.el-select ::v-deep .el-input__suffix {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.dialog-css ::v-deep .el-dialog__header {
|
||||
padding: 10px 20px 0px;
|
||||
}
|
||||
|
||||
.dialog-css ::v-deep .el-dialog__body {
|
||||
padding: 10px 20px 10px;
|
||||
}
|
||||
|
||||
.dialog-footer ::v-deep .el-dialog__footer {
|
||||
padding: 10px 10px 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -454,6 +454,7 @@
|
||||
size="840px"
|
||||
:before-close="closeEditItem"
|
||||
direction="rtl"
|
||||
:wrapper-closable="false"
|
||||
>
|
||||
<el-steps
|
||||
:active="active"
|
||||
@ -795,11 +796,13 @@ import ApiHttpRequestForm from '@/views/system/datasource/ApiHttpRequestForm'
|
||||
import dePwd from '@/components/deCustomCm/DePwd.vue'
|
||||
import msgCfm from '@/components/msgCfm'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { UxGrid, UxTableColumn } from 'umy-ui'
|
||||
export default {
|
||||
name: 'DsConfiguration',
|
||||
components: {
|
||||
ApiHttpRequestForm,
|
||||
dePwd
|
||||
dePwd,
|
||||
UxGrid, UxTableColumn
|
||||
},
|
||||
mixins: [msgCfm],
|
||||
props: {
|
||||
|
||||
@ -98,6 +98,13 @@
|
||||
href="https://www.dataease.io"
|
||||
>www.dataease.io</a>
|
||||
</el-row>
|
||||
<el-row class="contact_content">
|
||||
{{ $t('wizard.bbs') }}<a
|
||||
style="text-decoration:underline;"
|
||||
target="_blank"
|
||||
href="https://bbs.fit2cloud.com/c/de"
|
||||
>https://bbs.fit2cloud.com/c/de</a>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="content_bottom_qr_code">
|
||||
@ -395,7 +402,7 @@ export default {
|
||||
.content_bottom_contact {
|
||||
float: left;
|
||||
margin-left: 278px;
|
||||
width: 300px;
|
||||
width: 200px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
@ -403,7 +410,7 @@ export default {
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
line-height: 20px;
|
||||
color: var(--TextPrimary, #1F2329);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
@ -411,8 +418,8 @@ export default {
|
||||
.contact_content {
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
color: #646A73;
|
||||
margin-top: 8px;
|
||||
}
|
||||
@ -422,11 +429,12 @@ export default {
|
||||
}
|
||||
|
||||
.content_bottom_qr_code {
|
||||
width: 400px;
|
||||
width: 500px;
|
||||
float: right;
|
||||
text-align: right;
|
||||
margin-right: 180px;
|
||||
margin-top: 40px;
|
||||
padding-right: 100px;
|
||||
}
|
||||
|
||||
.contact_title_qr {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
const defaultSettings = require('./src/settings.js')
|
||||
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
|
||||
const pkg = require('./package.json')
|
||||
|
||||
@ -56,6 +57,7 @@ module.exports = {
|
||||
chunkFilename: `js/[name].[contenthash:8].${pkg.version}.js`
|
||||
},
|
||||
plugins: [
|
||||
// new BundleAnalyzerPlugin(),
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.join(__dirname, 'static'),
|
||||
@ -75,7 +77,18 @@ module.exports = {
|
||||
// dll最终输出的目录
|
||||
outputPath: './vendor'
|
||||
})
|
||||
]
|
||||
],
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
brace: {
|
||||
name: 'chunk-brace',
|
||||
priority: 20,
|
||||
test: /[\\/]node_modules[\\/]brace/
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
chainWebpack: config => {
|
||||
config.module.rules.delete('svg') // 删除默认配置中处理svg,
|
||||
@ -111,6 +124,9 @@ module.exports = {
|
||||
.options({
|
||||
symbolId: '[name]'
|
||||
})
|
||||
// 删除预加载 针对请求 删除预加载 数进行优化
|
||||
config.plugins.delete('prefetch-index')
|
||||
config.plugins.delete('preload-index')
|
||||
},
|
||||
css: {
|
||||
loaderOptions: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user