forked from github/dataease
Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
4ecb283020
@ -1,3 +1,8 @@
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
# DataEase - 人人可用的开源数据可视化分析工具
|
||||
|
||||
DataEase 是开源的数据可视化分析工具,帮助用户分析数据、改善业务。DataEase 支持丰富的数据源连接,能够通过拖拉拽方式快速制作图表,并可以方便的与他人分享。
|
||||
|
@ -14,6 +14,10 @@ public class DorisTableUtils {
|
||||
return "delete_" + dorisName;
|
||||
}
|
||||
|
||||
public static String dorisAddName(String dorisName) {
|
||||
return "add_" + dorisName;
|
||||
}
|
||||
|
||||
public static String dorisFieldName(String dorisName) {
|
||||
return "f_" + Md5Utils.md5(dorisName);
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ public class DataSetTableService {
|
||||
if (StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalAdd()) && StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalAdd().replace(" ", ""))) {// 增量添加
|
||||
String sql = datasetTableIncrementalConfig.getIncrementalAdd().replace(lastUpdateTime, Long.valueOf(System.currentTimeMillis()).toString())
|
||||
.replace(currentUpdateTime, Long.valueOf(System.currentTimeMillis()).toString());
|
||||
datasourceRequest.setQuery(sql);
|
||||
datasourceRequest.setQuery(extractDataService.sqlFix(sql));
|
||||
List<String> sqlFileds = new ArrayList<>();
|
||||
datasourceProvider.fetchResultField(datasourceRequest).stream().map(TableFiled::getFieldName).forEach(filed -> {
|
||||
sqlFileds.add(filed);
|
||||
@ -716,7 +716,7 @@ public class DataSetTableService {
|
||||
if (StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalDelete()) && StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalDelete().replace(" ", ""))) {// 增量删除
|
||||
String sql = datasetTableIncrementalConfig.getIncrementalDelete().replace(lastUpdateTime, Long.valueOf(System.currentTimeMillis()).toString())
|
||||
.replace(currentUpdateTime, Long.valueOf(System.currentTimeMillis()).toString());
|
||||
datasourceRequest.setQuery(sql);
|
||||
datasourceRequest.setQuery(extractDataService.sqlFix(sql));
|
||||
List<String> sqlFileds = new ArrayList<>();
|
||||
datasourceProvider.fetchResultField(datasourceRequest).stream().map(TableFiled::getFieldName).forEach(filed -> {
|
||||
sqlFileds.add(filed);
|
||||
|
@ -491,12 +491,12 @@ public class ExtractDataService {
|
||||
case "all_scope":
|
||||
transName = "trans_" + DorisTableUtils.dorisName(datasetTable.getId());
|
||||
outFile = DorisTableUtils.dorisTmpName(DorisTableUtils.dorisName(datasetTable.getId()));
|
||||
jobName = "job_" + datasetTable.getId();
|
||||
script = String.format(shellScript, dorisConfigration.getUsername(), dorisConfigration.getPassword(), String.valueOf(System.currentTimeMillis()), separator, columns, "APPEND", root_path + outFile + "." + extention, dorisConfigration.getHost(), dorisConfigration.getHttpPort(), dorisConfigration.getDataBase(), DorisTableUtils.dorisName(datasetTable.getId()), root_path + outFile + "." + extention);
|
||||
jobName = "job_" + DorisTableUtils.dorisName(datasetTable.getId());
|
||||
script = String.format(shellScript, dorisConfigration.getUsername(), dorisConfigration.getPassword(), String.valueOf(System.currentTimeMillis()), separator, columns, "APPEND", root_path + outFile + "." + extention, dorisConfigration.getHost(), dorisConfigration.getHttpPort(), dorisConfigration.getDataBase(), DorisTableUtils.dorisTmpName(DorisTableUtils.dorisName(datasetTable.getId())), root_path + outFile + "." + extention);
|
||||
break;
|
||||
case "incremental_add":
|
||||
transName = "trans_add_" + DorisTableUtils.dorisName(datasetTable.getId());
|
||||
outFile = DorisTableUtils.dorisName(datasetTable.getId());
|
||||
outFile = DorisTableUtils.dorisAddName(datasetTable.getId());
|
||||
jobName = "job_add_" + DorisTableUtils.dorisName(datasetTable.getId());
|
||||
script = String.format(shellScript, dorisConfigration.getUsername(), dorisConfigration.getPassword(), String.valueOf(System.currentTimeMillis()), separator, columns, "APPEND", root_path + outFile + "." + extention, dorisConfigration.getHost(), dorisConfigration.getHttpPort(), dorisConfigration.getDataBase(), DorisTableUtils.dorisName(datasetTable.getId()), root_path + outFile + "." + extention);
|
||||
break;
|
||||
@ -566,11 +566,10 @@ public class ExtractDataService {
|
||||
}
|
||||
|
||||
private String fetchSqlField(String sql, Datasource ds) throws Exception {
|
||||
String tmpSql = "SELECT * FROM (" + sqlFix(sql) + ") AS tmp " + " LIMIT 0";
|
||||
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(ds.getType());
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
datasourceRequest.setDatasource(ds);
|
||||
datasourceRequest.setQuery(tmpSql);
|
||||
datasourceRequest.setQuery(sqlFix(sql));
|
||||
List<String> dorisFileds = new ArrayList<>();
|
||||
datasourceProvider.fetchResultField(datasourceRequest).stream().map(TableFiled::getFieldName).forEach(filed ->{
|
||||
dorisFileds.add(DorisTableUtils.columnName(filed));
|
||||
@ -578,12 +577,13 @@ public class ExtractDataService {
|
||||
return String.join(",", dorisFileds);
|
||||
}
|
||||
|
||||
private String sqlFix(String sql) {
|
||||
public String sqlFix(String sql) {
|
||||
sql = sql.trim();
|
||||
if (sql.lastIndexOf(";") == (sql.length() - 1)) {
|
||||
sql = sql.substring(0, sql.length() - 1);
|
||||
}
|
||||
return sql;
|
||||
String tmpSql = "SELECT * FROM (" + sql + ") AS tmp " + " LIMIT 0";
|
||||
return tmpSql;
|
||||
}
|
||||
|
||||
|
||||
@ -649,7 +649,7 @@ public class ExtractDataService {
|
||||
break;
|
||||
case "incremental_add":
|
||||
transName = "trans_add_" + DorisTableUtils.dorisName(datasetTable.getId());
|
||||
outFile = DorisTableUtils.dorisName(datasetTable.getId());
|
||||
outFile = DorisTableUtils.dorisAddName(datasetTable.getId());
|
||||
transMeta.setName(transName);
|
||||
break;
|
||||
case "incremental_delete":
|
||||
@ -789,18 +789,18 @@ public class ExtractDataService {
|
||||
|
||||
switch (type) {
|
||||
case "all_scope":
|
||||
transName = "trans_" + dataSetTableId;
|
||||
jobName = "job_" + dataSetTableId;
|
||||
transName = "trans_" + DorisTableUtils.dorisName(dataSetTableId);
|
||||
jobName = "job_" + DorisTableUtils.dorisName(dataSetTableId);
|
||||
fileName = DorisTableUtils.dorisTmpName(dataSetTableId);
|
||||
break;
|
||||
case "incremental_add":
|
||||
transName = "trans_add_" + dataSetTableId;
|
||||
jobName = "job_add_" + dataSetTableId;
|
||||
fileName = DorisTableUtils.dorisName(dataSetTableId);
|
||||
transName = "trans_add_" + DorisTableUtils.dorisName(dataSetTableId);
|
||||
jobName = "job_add_" + DorisTableUtils.dorisName(dataSetTableId);
|
||||
fileName = DorisTableUtils.dorisAddName(dataSetTableId);
|
||||
break;
|
||||
case "incremental_delete":
|
||||
transName = "trans_delete_" + dataSetTableId;
|
||||
jobName = "job_delete_" + dataSetTableId;
|
||||
transName = "trans_delete_" + DorisTableUtils.dorisName(dataSetTableId);
|
||||
jobName = "job_delete_" + DorisTableUtils.dorisName(dataSetTableId);
|
||||
fileName = DorisTableUtils.dorisDeleteName(dataSetTableId);
|
||||
break;
|
||||
default:
|
||||
|
1
frontend/src/icons/svg/docs.svg
Normal file
1
frontend/src/icons/svg/docs.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1623897748319" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23219" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 1024C227.556 1024 0 796.444 0 512S227.556 0 512 0s512 227.556 512 512-227.556 512-512 512z m0-68.267c244.622 0 443.733-199.11 443.733-443.733S756.623 68.267 512 68.267 68.267 267.377 68.267 512 267.377 955.733 512 955.733z m11.378-694.044c45.51 0 85.333 11.378 113.778 39.822 28.444 22.756 45.51 62.578 45.51 102.4 0 34.133-11.377 68.267-28.444 91.022-5.689 5.69-28.444 28.445-62.578 56.89-11.377 11.377-22.755 22.755-28.444 39.821-5.689 17.067-11.378 34.134-11.378 45.512v11.377h-79.644v-11.377c0-28.445 5.689-51.2 17.066-68.267 11.378-22.756 39.823-51.2 79.645-91.022l11.378-11.378c11.377-17.067 22.755-34.133 22.755-51.2 0-22.756-5.689-45.511-22.755-56.889-17.067-17.067-34.134-22.756-62.578-22.756-34.133 0-56.889 11.378-73.956 28.445-11.377 17.067-17.066 39.822-17.066 73.955H352.71c0-51.2 17.067-96.71 45.511-125.155 28.445-34.133 73.956-51.2 125.156-51.2zM512 688.356c17.067 0 28.444 5.688 39.822 17.066 11.378 11.378 17.067 22.756 17.067 39.822 0 17.067-5.689 28.445-17.067 39.823-11.378 11.377-22.755 17.066-39.822 17.066-28.444 0-51.2-22.755-51.2-51.2 0-17.066 5.689-28.444 17.067-39.822 5.689-17.067 22.755-22.755 34.133-22.755z" p-id="23220" fill="#707070"></path></svg>
|
After Width: | Height: | Size: 1.5 KiB |
@ -1 +1 @@
|
||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M84.742 36.8c2.398 7.2 5.595 12.8 11.19 18.4 4.795-4.8 7.992-11.2 10.39-18.4h-21.58zm-52.748 40h20.78l-10.39-28-10.39 28z"/><path d="M111.916 0H16.009C7.218 0 .025 7.2.025 16v96c0 8.8 7.193 16 15.984 16h95.907c8.791 0 15.984-7.2 15.984-16V16c0-8.8-6.394-16-15.984-16zM72.754 103.2c-1.598 1.6-3.197 1.6-4.795 1.6-.8 0-2.398 0-3.197-.8-.8-.8-1.599 0-1.599-.8s-.799-1.6-1.598-3.2c-.8-1.6-.8-2.4-1.599-4l-3.196-8.8H28.797L25.6 96c-1.598 3.2-2.398 5.6-3.197 7.2-.8 1.6-2.398 1.6-4.795 1.6-1.599 0-3.197-.8-4.796-1.6-1.598-1.6-2.397-2.4-2.397-4 0-.8 0-1.6.799-3.2.8-1.6.8-2.4 1.598-4l17.583-44.8c.8-1.6.8-3.2 1.599-4.8.799-1.6 1.598-3.2 2.397-4 .8-.8 1.599-2.4 3.197-3.2 1.599-.8 3.197-.8 4.796-.8 1.598 0 3.196 0 4.795.8 1.598.8 2.398 1.6 3.197 3.2.799.8 1.598 2.4 2.397 4 .8 1.6 1.599 3.2 2.398 5.6l17.583 44c1.598 3.2 2.398 5.6 2.398 7.2-.8.8-1.599 2.4-2.398 4zM116.711 72c-8.791-3.2-15.185-7.2-20.78-12-5.594 5.6-12.787 9.6-21.579 12l-2.397-4c8.791-2.4 15.984-5.6 21.579-11.2C87.939 51.2 83.144 44 81.545 36h-7.992v-3.2h21.58c-1.6-2.4-3.198-5.6-4.796-8l2.397-.8c1.599 2.4 3.997 5.6 5.595 8.8h19.98v4h-7.992c-2.397 8-6.393 15.2-11.189 20 5.595 4.8 11.988 8.8 20.78 11.2l-3.197 4z"/></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1623896817205" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12052" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M616.521143 407.478857h313.417143a69.485714 69.485714 0 0 1 69.705143 69.705143v452.754286a69.485714 69.485714 0 0 1-69.705143 69.705143h-452.754286a69.485714 69.485714 0 0 1-69.705143-69.705143V616.594286H94.061714a69.485714 69.485714 0 0 1-69.705143-69.705143v-452.754286a69.485714 69.485714 0 0 1 69.705143-69.705143h452.754286a69.485714 69.485714 0 0 1 69.705143 69.705143V407.405714z m0 69.705143v69.632a69.485714 69.485714 0 0 1-69.705143 69.705143h-69.632v278.674286c0 19.163429 15.579429 34.742857 34.816 34.742857h383.122286a34.816 34.816 0 0 0 34.816-34.742857V512a34.816 34.816 0 0 0-34.816-34.816h-278.674286zM94.061714 128.731429V512c0 19.236571 15.579429 34.816 34.742857 34.816H512A34.816 34.816 0 0 0 546.816 512V128.877714A34.816 34.816 0 0 0 512 94.061714H128.877714a34.816 34.816 0 0 0-34.816 34.742857z m69.632 265.947428V219.574857h122.733715V146.285714h50.834285c7.021714 1.024 10.532571 1.974857 10.532572 2.998857a11.483429 11.483429 0 0 1-1.462857 4.461715c-3.072 8.045714-4.534857 17.481143-4.534858 28.452571v37.376h130.194286v170.642286h-55.369143v-22.454857H341.796571v128.731428h-53.906285v-128.731428H214.601143v26.989714h-50.907429z m50.834286-133.193143v65.828572h73.362286v-65.828572H214.601143z m202.093714 65.828572v-65.828572H341.796571v65.828572h74.825143z m221.915429 531.163428h-56.905143l100.278857-276.918857h70.363429l97.28 276.918857h-59.830857l-20.992-58.368H659.456l-20.918857 58.368z m35.84-104.813714h79.36L716.361143 635.611429h-1.462857l-40.448 118.198857z m255.561143-450.706286h-69.632a139.337143 139.337143 0 0 0-139.337143-139.337143v-69.632a208.969143 208.969143 0 0 1 208.969143 208.969143zM94.061714 720.969143h69.632c0 76.946286 62.390857 139.337143 139.337143 139.337143v69.632a208.969143 208.969143 0 0 1-208.969143-208.969143z" p-id="12053" fill="#8a8a8a"></path></svg>
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.2 KiB |
@ -446,7 +446,8 @@ export default {
|
||||
origin_passwd: 'Origin Password',
|
||||
new_passwd: 'New Password',
|
||||
confirm_passwd: 'Confirm Password',
|
||||
change_password: 'Change Password'
|
||||
change_password: 'Change Password',
|
||||
search_by_name: 'Search by name'
|
||||
},
|
||||
role: {
|
||||
menu_authorization: 'Menu Authorization',
|
||||
|
@ -446,7 +446,8 @@ export default {
|
||||
origin_passwd: '原始密碼',
|
||||
new_passwd: '新密碼',
|
||||
confirm_passwd: '確認密碼',
|
||||
change_password: '修改密碼'
|
||||
change_password: '修改密碼',
|
||||
search_by_name: '按姓名搜索'
|
||||
},
|
||||
role: {
|
||||
menu_authorization: '菜單授權',
|
||||
|
@ -446,7 +446,8 @@ export default {
|
||||
origin_passwd: '原始密码',
|
||||
new_passwd: '新密码',
|
||||
confirm_passwd: '确认密码',
|
||||
change_password: '修改密码'
|
||||
change_password: '修改密码',
|
||||
search_by_name: '按姓名搜索'
|
||||
},
|
||||
role: {
|
||||
menu_authorization: '菜单授权',
|
||||
|
@ -37,6 +37,11 @@
|
||||
</el-tooltip> -->
|
||||
|
||||
<lang-select class="right-menu-item hover-effect" />
|
||||
<div style="height: 100%;padding: 0 8px;" class="right-menu-item hover-effect">
|
||||
<a href="https://de-docs.fit2cloud.com/" target="_blank" style="display: flex;height: 100%;width: 100%;justify-content: center;align-items: center;">
|
||||
<svg-icon icon-class="docs" />
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-dropdown class="top-dropdown" style="display: flex;align-items: center;">
|
||||
@ -50,9 +55,9 @@
|
||||
<router-link to="/person-pwd/index">
|
||||
<el-dropdown-item>{{ $t('user.change_password') }}</el-dropdown-item>
|
||||
</router-link>
|
||||
<a href="https://de-docs.fit2cloud.com/" target="_blank">
|
||||
<el-dropdown-item>{{ $t('commons.help_documentation') }} </el-dropdown-item>
|
||||
</a>
|
||||
<!-- <a href="https://de-docs.fit2cloud.com/" target="_blank">-->
|
||||
<!-- <el-dropdown-item>{{ $t('commons.help_documentation') }} </el-dropdown-item>-->
|
||||
<!-- </a>-->
|
||||
<router-link to="/about/index">
|
||||
<el-dropdown-item>{{ $t('commons.about_us') }}</el-dropdown-item>
|
||||
</router-link>
|
||||
@ -206,7 +211,7 @@ export default {
|
||||
// 设置侧边栏的显示和隐藏
|
||||
setSidebarHide(route) {
|
||||
// if (!route.children || route.children.length === 1) {
|
||||
if (!route.children || this.showChildLength(route) === 1) {
|
||||
if (route.name !== 'system' && (!route.children || this.showChildLength(route) === 1)) {
|
||||
this.$store.dispatch('app/toggleSideBarHide', true)
|
||||
} else {
|
||||
this.$store.dispatch('app/toggleSideBarHide', false)
|
||||
|
@ -120,6 +120,7 @@ export default {
|
||||
.sidebar-container {
|
||||
width: 100% !important;
|
||||
position: initial !important;
|
||||
height: calc(100vh - 80px) !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -102,7 +102,7 @@
|
||||
|
||||
<!--group add/edit-->
|
||||
<el-dialog v-dialogDrag :title="dialogTitle" :visible="editGroup" :show-close="false" width="30%">
|
||||
<el-form ref="groupForm" :model="groupForm" :rules="groupFormRules">
|
||||
<el-form ref="groupForm" :model="groupForm" :rules="groupFormRules" @keyup.enter.native="saveGroup(groupForm)">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="groupForm.name" />
|
||||
</el-form-item>
|
||||
@ -183,7 +183,7 @@
|
||||
|
||||
<!--rename chart-->
|
||||
<el-dialog v-dialogDrag :title="$t('chart.chart')" :visible="editTable" :show-close="false" width="30%">
|
||||
<el-form ref="tableForm" :model="tableForm" :rules="tableFormRules">
|
||||
<el-form ref="tableForm" :model="tableForm" :rules="tableFormRules" @keyup.enter.native="saveTable(tableForm)">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="tableForm.name" />
|
||||
</el-form-item>
|
||||
|
@ -132,6 +132,11 @@ export default {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
showMode: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -283,7 +288,7 @@ export default {
|
||||
return
|
||||
}
|
||||
// check mode=1的数据集是否创建doris表
|
||||
if (data.mode === 1) {
|
||||
if (data.mode === 1 && !this.showMode) {
|
||||
post('/dataset/table/checkDorisTableIsExists/' + data.id, {}, false).then(response => {
|
||||
if (response.data) {
|
||||
this.$nextTick(function() {
|
||||
|
@ -92,7 +92,7 @@
|
||||
width="500"
|
||||
trigger="click"
|
||||
>
|
||||
<dataset-group-selector :custom-type="customType" :mode="1" @getTable="getTable" />
|
||||
<dataset-group-selector show-mode="union" :custom-type="customType" :mode="1" @getTable="getTable" />
|
||||
<el-button slot="reference" size="mini" style="width: 100%;">
|
||||
<p class="table-name-css" :title="targetTable.name || $t('dataset.pls_slc_union_table')">{{ targetTable.name || $t('dataset.pls_slc_union_table') }}</p>
|
||||
</el-button>
|
||||
@ -193,21 +193,21 @@ export default {
|
||||
|
||||
showUnionEdit() {
|
||||
// 校验同步状态
|
||||
post('/dataset/table/checkDorisTableIsExists/' + this.table.id, {}, true).then(response => {
|
||||
if (response.data) {
|
||||
this.union.sourceTableId = this.table.id
|
||||
fieldList(this.table.id).then(response => {
|
||||
this.sourceFieldOption = response.data
|
||||
})
|
||||
this.editUnion = true
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: this.$t('dataset.invalid_table_check'),
|
||||
showClose: true
|
||||
})
|
||||
}
|
||||
// post('/dataset/table/checkDorisTableIsExists/' + this.table.id, {}, true).then(response => {
|
||||
// if (response.data) {
|
||||
this.union.sourceTableId = this.table.id
|
||||
fieldList(this.table.id).then(response => {
|
||||
this.sourceFieldOption = response.data
|
||||
})
|
||||
this.editUnion = true
|
||||
// } else {
|
||||
// this.$message({
|
||||
// type: 'error',
|
||||
// message: this.$t('dataset.invalid_table_check'),
|
||||
// showClose: true
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
},
|
||||
saveUnion() {
|
||||
// console.log(this.union)
|
||||
|
@ -104,7 +104,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-dialog v-dialogDrag :title="dialogTitle" :visible="editGroup" :show-close="false" width="30%">
|
||||
<el-form ref="groupForm" :model="groupForm" :rules="groupFormRules">
|
||||
<el-form ref="groupForm" :model="groupForm" :rules="groupFormRules" @keyup.enter.native="saveGroup(groupForm)">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="groupForm.name" />
|
||||
</el-form-item>
|
||||
@ -223,7 +223,7 @@
|
||||
</el-tree>
|
||||
|
||||
<el-dialog v-dialogDrag :title="$t('dataset.table')" :visible="editTable" :show-close="false" width="30%">
|
||||
<el-form ref="tableForm" :model="tableForm" :rules="tableFormRules">
|
||||
<el-form ref="tableForm" :model="tableForm" :rules="tableFormRules" @keyup.enter.native="saveTable(tableForm)">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="tableForm.name" />
|
||||
</el-form-item>
|
||||
|
@ -80,7 +80,25 @@ export default {
|
||||
created() {
|
||||
// this.getTree()
|
||||
},
|
||||
mounted() {
|
||||
this.bindKey()
|
||||
},
|
||||
destroyed() {
|
||||
this.unBindKey()
|
||||
},
|
||||
methods: {
|
||||
entryKey(event) {
|
||||
const keyCode = event.keyCode
|
||||
if (keyCode === 13) {
|
||||
this.save()
|
||||
}
|
||||
},
|
||||
bindKey() {
|
||||
document.addEventListener('keyup', this.entryKey)
|
||||
},
|
||||
unBindKey() {
|
||||
document.removeEventListener('keyup', this.entryKey)
|
||||
},
|
||||
showCurrentTemplateInfo(data) {
|
||||
this.editPanel.panelInfo.name = data.name
|
||||
this.editPanel.panelInfo.panelStyle = data.templateStyle
|
||||
|
@ -134,7 +134,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-dialog v-dialogDrag :title="dialogTitle" :visible="editGroup" :show-close="false" width="500px">
|
||||
<el-form ref="groupForm" :model="groupForm" :rules="groupFormRules">
|
||||
<el-form ref="groupForm" :model="groupForm" :rules="groupFormRules" @keyup.enter.native="saveGroup(groupForm)">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="groupForm.name" />
|
||||
</el-form-item>
|
||||
|
@ -169,7 +169,25 @@ export default {
|
||||
}
|
||||
this.initRoles()
|
||||
},
|
||||
mounted() {
|
||||
this.bindKey()
|
||||
},
|
||||
destroyed() {
|
||||
this.unBindKey()
|
||||
},
|
||||
methods: {
|
||||
entryKey(event) {
|
||||
const keyCode = event.keyCode
|
||||
if (keyCode === 13) {
|
||||
this.save()
|
||||
}
|
||||
},
|
||||
bindKey() {
|
||||
document.addEventListener('keyup', this.entryKey)
|
||||
},
|
||||
unBindKey() {
|
||||
document.removeEventListener('keyup', this.entryKey)
|
||||
},
|
||||
repeatValidator(rule, value, callback) {
|
||||
if (value !== this.form.password) {
|
||||
callback(new Error(this.$t('member.inconsistent_passwords')))
|
||||
|
@ -143,6 +143,7 @@
|
||||
label-width="120px"
|
||||
:rules="rule"
|
||||
class="demo-ruleForm"
|
||||
@keyup.enter.native="editUserPassword('editPasswordForm')"
|
||||
>
|
||||
<el-form-item :label="$t('member.new_password')" prop="newPassword">
|
||||
<el-input v-model="ruleForm.newPassword" type="password" autocomplete="off" show-password />
|
||||
@ -196,12 +197,12 @@ export default {
|
||||
searchConfig: {
|
||||
useQuickSearch: true,
|
||||
useComplexSearch: true,
|
||||
quickPlaceholder: '按姓名搜索',
|
||||
quickPlaceholder: this.$t('user.search_by_name'),
|
||||
components: [
|
||||
{ field: 'nick_name', label: '姓名', component: 'DeComplexInput' },
|
||||
{ field: 'nick_name', label: this.$t('commons.nick_name'), component: 'DeComplexInput' },
|
||||
{
|
||||
field: 'u.enabled',
|
||||
label: '状态',
|
||||
label: this.$t('commons.status'),
|
||||
component: 'FuComplexSelect',
|
||||
options: [
|
||||
{ label: '启用', value: '1' },
|
||||
|
Loading…
Reference in New Issue
Block a user