forked from github/dataease
Merge branch 'dev' into pr@dev_dataset_source
This commit is contained in:
commit
00e43659a2
@ -1123,7 +1123,7 @@ public class OracleQueryProvider extends QueryProvider {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String startTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(0))));
|
||||
String endTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(1))));
|
||||
String st = String.format(OracleConstants.TO_DATE, "'" + startTime + "'", OracleConstants.DEFAULT_DATE_FORMAT);
|
||||
|
@ -675,7 +675,7 @@ public class ChartViewService {
|
||||
if (sqlVariables.stream().map(SqlVariableDetails::getVariableName).collect(Collectors.toList()).contains(parameter)) {
|
||||
hasParameters = true;
|
||||
}
|
||||
if (parameter.contains("|DE|") && table.getId().equals(parameter.split("|DE|")[0]) && sqlVariables.stream().map(SqlVariableDetails::getVariableName).collect(Collectors.toList()).contains(parameter.split("|DE|")[1])) {
|
||||
if (parameter.contains("|DE|") && table.getId().equals(parameter.split("\\|DE\\|")[0]) && sqlVariables.stream().map(SqlVariableDetails::getVariableName).collect(Collectors.toList()).contains(parameter.split("\\|DE\\|")[1])) {
|
||||
hasParameters = true;
|
||||
}
|
||||
}
|
||||
@ -1611,13 +1611,13 @@ public class ChartViewService {
|
||||
|
||||
for (String parameter : chartExtFilterRequest.getParameters()) {
|
||||
if(parameter.contains("|DE|")){
|
||||
if(!parameter.split("|DE|")[0].equals(table.getId())){
|
||||
if(!parameter.split("\\|DE\\|")[0].equals(table.getId())){
|
||||
continue;
|
||||
}
|
||||
List<SqlVariableDetails> parameters = sqlVariables.stream().filter(item -> item.getVariableName().equalsIgnoreCase(parameter.split("|DE|")[1])).collect(Collectors.toList());
|
||||
List<SqlVariableDetails> parameters = sqlVariables.stream().filter(item -> item.getVariableName().equalsIgnoreCase(parameter.split("\\|DE\\|")[1])).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(parameters)) {
|
||||
String filter = qp.transFilter(chartExtFilterRequest, parameters.get(0));
|
||||
sql = sql.replace("${" + parameter.split("|DE|")[1] + "}", filter);
|
||||
sql = sql.replace("${" + parameter.split("\\|DE\\|")[1] + "}", filter);
|
||||
}
|
||||
}else {
|
||||
List<SqlVariableDetails> parameters = sqlVariables.stream().filter(item -> item.getVariableName().equalsIgnoreCase(parameter)).collect(Collectors.toList());
|
||||
|
@ -124,10 +124,9 @@ public class ViewPluginBaseServiceImpl implements ViewPluginBaseService {
|
||||
tableName = dataSetTableService.getCustomSQLDatasource(dataTableInfoDTO, list, ds);
|
||||
break;
|
||||
case UNION:
|
||||
Datasource datasource = new Datasource();
|
||||
datasource.setType(pluginViewSet.getDsType());
|
||||
Datasource datasource = ((PluginViewSetImpl) pluginViewSet).getDs();
|
||||
Map<String, Object> sqlMap = dataSetTableService.getUnionSQLDatasource(dataTableInfoDTO, datasource);
|
||||
tableName = (String) sqlMap.get("sql");
|
||||
tableName = "(" + ((String) sqlMap.get("sql")) + ")";
|
||||
break;
|
||||
default:
|
||||
tableName = dataTableInfoDTO.getTable();
|
||||
|
@ -128,7 +128,7 @@ public class DriverService {
|
||||
}
|
||||
String filename = file.getOriginalFilename();
|
||||
if(!filename.endsWith(".jar")){
|
||||
throw new Exception("File is not jar!");
|
||||
throw new Exception(Translator.get("I18N_NOT_JAR"));
|
||||
}
|
||||
String dirPath = DRIVER_PATH + driverId + "/";
|
||||
String filePath = dirPath + Md5Utils.md5(filename) + ".jar";
|
||||
|
@ -237,4 +237,5 @@ I18N_ACCOUNT_LOCKED=Account\u3010%s\u3011is locked(Please contact the administra
|
||||
|
||||
I18N_PANEL_EXIST=The current panel name already exists under this directory
|
||||
I18N_DATASET_GROUP_EXIST=The current dataset grouping name already exists under this directory
|
||||
I18N_NOT_JAR=File is not jar!
|
||||
|
||||
|
@ -237,4 +237,5 @@ I18N_ACCOUNT_LOCKED=\u8D26\u53F7\u3010%s\u3011\u5DF2\u9501\u5B9A(\u8BF7\u8054\u7
|
||||
|
||||
I18N_PANEL_EXIST=\u5F53\u524D\u4EEA\u8868\u677F\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728
|
||||
I18N_DATASET_GROUP_EXIST=\u5F53\u524D\u6570\u636E\u96C6\u5206\u7EC4\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728
|
||||
I18N_NOT_JAR=文件不是 jar 包!
|
||||
|
||||
|
@ -233,4 +233,4 @@ I18N_ACCOUNT_LOCKED=\u8CEC\u865F\u3010%s\u3011\u5DF2\u9396\u5B9A(\u8ACB\u806F\u7
|
||||
|
||||
I18N_PANEL_EXIST=\u7576\u524D\u5100\u9336\u95C6\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728
|
||||
I18N_DATASET_GROUP_EXIST=\u7576\u524D\u6578\u64DA\u96C6\u5206\u7D44\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728
|
||||
|
||||
I18N_NOT_JAR=文件不是 jar 包!
|
||||
|
@ -1249,6 +1249,7 @@ export default {
|
||||
liquid_shape_rect: 'Rect',
|
||||
dimension_or_quota: 'Dimension Or Quota',
|
||||
axis_value_split_count: 'Tick Count',
|
||||
axis_value_split_space: 'Tick Interval',
|
||||
chart_waterfall: 'Waterfall',
|
||||
pie_inner_radius_percent: 'Inner Radius(%)',
|
||||
pie_outer_radius_size: 'Outer Radius',
|
||||
@ -1815,7 +1816,8 @@ export default {
|
||||
can_be_uploaded: 'Only files in jar format can be uploaded',
|
||||
query_timeout: 'query timeout',
|
||||
add_data_source: 'add data source',
|
||||
delete_this_driver: 'Are you sure to delete this driver?'
|
||||
delete_this_driver: 'Are you sure to delete this driver?',
|
||||
basic_info: 'Basic Info'
|
||||
},
|
||||
pblink: {
|
||||
key_pwd: 'Please enter the password to open the link',
|
||||
|
@ -1249,6 +1249,7 @@ export default {
|
||||
liquid_shape_rect: '矩形',
|
||||
dimension_or_quota: '維度或指標',
|
||||
axis_value_split_count: '刻度數',
|
||||
axis_value_split_space: '刻度間距',
|
||||
chart_waterfall: '瀑佈圖',
|
||||
pie_inner_radius_percent: '內徑佔比',
|
||||
pie_outer_radius_size: '外徑大小',
|
||||
@ -1815,7 +1816,8 @@ export default {
|
||||
can_be_uploaded: '僅支持上傳JAR格式的檔案',
|
||||
query_timeout: '査詢超時',
|
||||
add_data_source: '添加資料來源',
|
||||
delete_this_driver: '確定删除該驅動嗎?'
|
||||
delete_this_driver: '確定删除該驅動嗎?',
|
||||
basic_info: '基本信息'
|
||||
},
|
||||
pblink: {
|
||||
key_pwd: '請輸入密碼打開鏈接',
|
||||
|
@ -1248,6 +1248,7 @@ export default {
|
||||
liquid_shape_rect: '矩形',
|
||||
dimension_or_quota: '维度或指标',
|
||||
axis_value_split_count: '刻度数',
|
||||
axis_value_split_space: '刻度间距',
|
||||
chart_waterfall: '瀑布图',
|
||||
pie_inner_radius_percent: '内径占比',
|
||||
pie_outer_radius_size: '外径大小',
|
||||
@ -1815,7 +1816,8 @@ export default {
|
||||
can_be_uploaded: '仅支持上传JAR格式的文件',
|
||||
query_timeout: '查询超时',
|
||||
add_data_source: '添加数据源',
|
||||
delete_this_driver: '确定删除该驱动吗?'
|
||||
delete_this_driver: '确定删除该驱动吗?',
|
||||
basic_info: '基本信息'
|
||||
},
|
||||
pblink: {
|
||||
key_pwd: '请输入密码打开链接',
|
||||
|
@ -51,7 +51,7 @@
|
||||
<el-form-item :label="$t('chart.axis_value_split')" class="form-item">
|
||||
<span slot="label">
|
||||
<span class="span-box">
|
||||
<span>{{ $t('chart.axis_value_split_count') }}</span>
|
||||
<span>{{ $t('chart.axis_value_split_space') }}</span>
|
||||
<el-tooltip class="item" effect="dark" placement="bottom">
|
||||
<div slot="content">
|
||||
间隔表示两个刻度之间的单位长度。
|
||||
|
@ -51,7 +51,7 @@
|
||||
<el-form-item :label="$t('chart.axis_value_split')" class="form-item">
|
||||
<span slot="label">
|
||||
<span class="span-box">
|
||||
<span>{{ $t('chart.axis_value_split_count') }}</span>
|
||||
<span>{{ $t('chart.axis_value_split_space') }}</span>
|
||||
<el-tooltip class="item" effect="dark" placement="bottom">
|
||||
<div slot="content">
|
||||
间隔表示两个刻度之间的单位长度。
|
||||
|
@ -51,7 +51,7 @@
|
||||
<el-form-item :label="$t('chart.axis_value_split')" class="form-item">
|
||||
<span slot="label">
|
||||
<span class="span-box">
|
||||
<span>{{ $t('chart.axis_value_split_count') }}</span>
|
||||
<span>{{ $t('chart.axis_value_split_space') }}</span>
|
||||
<el-tooltip class="item" effect="dark" placement="bottom">
|
||||
<div slot="content">
|
||||
间隔表示两个刻度之间的单位长度。
|
||||
|
@ -10,7 +10,7 @@ export function getItemType(dimensionData, quotaData, item) {
|
||||
if (status === 'd') {
|
||||
for (let i = 0; i < dimensionData.length; i++) {
|
||||
const ele = dimensionData[i]
|
||||
if (ele.id === item.id && ele.deType === item.deType && ele.groupType === item.groupType) {
|
||||
if (((item.chartId && item.extField === 2 && item.tableId === ele.tableId) || ele.id === item.id) && ele.deType === item.deType && ele.groupType === item.groupType) {
|
||||
checked = true
|
||||
break
|
||||
}
|
||||
@ -19,7 +19,7 @@ export function getItemType(dimensionData, quotaData, item) {
|
||||
if (status === 'q') {
|
||||
for (let i = 0; i < quotaData.length; i++) {
|
||||
const ele = quotaData[i]
|
||||
if (ele.id === item.id && ele.deType === item.deType && ele.groupType === item.groupType) {
|
||||
if (((item.chartId && item.extField === 2 && item.tableId === ele.tableId) || ele.id === item.id) && ele.deType === item.deType && ele.groupType === item.groupType) {
|
||||
checked = true
|
||||
break
|
||||
}
|
||||
|
@ -6,8 +6,7 @@
|
||||
secondary
|
||||
icon="el-icon-plus"
|
||||
@click="() => addTask()"
|
||||
>{{ $t('dataset.add_task') }}</deBtn
|
||||
>
|
||||
>{{ $t('dataset.add_task') }}</deBtn>
|
||||
</el-col>
|
||||
<el-col style="text-align: right" :span="12">
|
||||
<el-button type="text" icon="el-icon-document" @click="showConfig">
|
||||
@ -18,21 +17,21 @@
|
||||
<div class="table-task-container">
|
||||
<grid-table
|
||||
v-loading="loading"
|
||||
:tableData="taskData"
|
||||
:table-data="taskData"
|
||||
:columns="[]"
|
||||
:pagination="paginationConfig"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column
|
||||
min-width="178"
|
||||
key="name"
|
||||
min-width="178"
|
||||
prop="name"
|
||||
:label="$t('dataset.task_name')"
|
||||
/>
|
||||
<el-table-column
|
||||
min-width="100"
|
||||
key="rate"
|
||||
min-width="100"
|
||||
prop="rate"
|
||||
:label="$t('dataset.execute_rate')"
|
||||
>
|
||||
@ -50,8 +49,8 @@
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="lastExecStatus"
|
||||
key="lastExecStatus"
|
||||
prop="lastExecStatus"
|
||||
min-width="140"
|
||||
:label="$t('dataset.task.last_exec_status')"
|
||||
>
|
||||
@ -59,17 +58,17 @@
|
||||
<span
|
||||
v-if="scope.row.lastExecStatus"
|
||||
:class="[`de-${scope.row.lastExecStatus}-pre`, 'de-status']"
|
||||
>{{
|
||||
$t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`)
|
||||
}}
|
||||
>{{
|
||||
$t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`)
|
||||
}}
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="lastExecTime"
|
||||
key="lastExecTime"
|
||||
prop="lastExecTime"
|
||||
min-width="178"
|
||||
:label="$t('dataset.task.last_exec_time')"
|
||||
>
|
||||
@ -81,8 +80,8 @@
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="nextExecTime"
|
||||
key="nextExecTime"
|
||||
prop="nextExecTime"
|
||||
min-width="178"
|
||||
:label="$t('dataset.task.next_exec_time')"
|
||||
>
|
||||
@ -90,48 +89,48 @@
|
||||
<span
|
||||
v-if="
|
||||
scope.row.nextExecTime &&
|
||||
scope.row.nextExecTime !== -1 &&
|
||||
scope.row.rate !== 'SIMPLE' &&
|
||||
scope.row.status !== 'Pending'
|
||||
scope.row.nextExecTime !== -1 &&
|
||||
scope.row.rate !== 'SIMPLE' &&
|
||||
scope.row.status !== 'Pending'
|
||||
"
|
||||
>
|
||||
{{ scope.row.nextExecTime | timestampFormatDate }}
|
||||
</span>
|
||||
<span v-if="!scope.row.nextExecTime || scope.row.rate === 'SIMPLE'"
|
||||
>-</span
|
||||
>
|
||||
<span
|
||||
v-if="!scope.row.nextExecTime || scope.row.rate === 'SIMPLE'"
|
||||
>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
min-width="120"
|
||||
key="status"
|
||||
min-width="120"
|
||||
prop="status"
|
||||
:label="$t('dataset.task.task_status')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span :class="[`de-${scope.row.status}-result`, 'de-status']"
|
||||
>{{ $t(`dataset.task.${scope.row.status.toLocaleLowerCase()}`) }}
|
||||
<span
|
||||
:class="[`de-${scope.row.status}-result`, 'de-status']"
|
||||
>{{ $t(`dataset.task.${scope.row.status.toLocaleLowerCase()}`) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
slot="__operation"
|
||||
:label="$t('commons.operating')"
|
||||
key="__operation"
|
||||
:label="$t('commons.operating')"
|
||||
fixed="right"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@click="selectDataset(scope.row)"
|
||||
class="de-text-btn"
|
||||
style="margin-left: -4px"
|
||||
type="text"
|
||||
>{{
|
||||
$t(disableEdit(scope.row) ? 'auth.view' : 'commons.edit')
|
||||
}}</el-button
|
||||
>
|
||||
@click="selectDataset(scope.row)"
|
||||
>{{
|
||||
$t(disableEdit(scope.row) ? 'auth.view' : 'commons.edit')
|
||||
}}</el-button>
|
||||
<el-dropdown
|
||||
size="medium"
|
||||
trigger="click"
|
||||
@ -141,8 +140,8 @@
|
||||
style="margin-left: 8px"
|
||||
class="el-icon-more de-text-btn"
|
||||
type="text"
|
||||
></el-button>
|
||||
<el-dropdown-menu class="de-card-dropdown" slot="dropdown">
|
||||
/>
|
||||
<el-dropdown-menu slot="dropdown" class="de-card-dropdown">
|
||||
<template
|
||||
v-if="!['Stopped', 'Exec'].includes(scope.row.status)"
|
||||
>
|
||||
@ -195,11 +194,11 @@
|
||||
</el-dialog>
|
||||
|
||||
<el-drawer
|
||||
v-closePress
|
||||
:title="$t('dataset.task.record')"
|
||||
:visible.sync="userDrawer"
|
||||
custom-class="user-drawer-task"
|
||||
size="840px"
|
||||
v-closePress
|
||||
direction="rtl"
|
||||
>
|
||||
<el-row style="margin-top: 12px">
|
||||
@ -223,16 +222,16 @@
|
||||
|
||||
<el-table-column prop="status" :label="$t('dataset.status')">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
v-if="scope.row.status"
|
||||
:class="[`de-${scope.row.status}-pre`, 'de-status']"
|
||||
<span
|
||||
v-if="scope.row.status"
|
||||
:class="[`de-${scope.row.status}-pre`, 'de-status']"
|
||||
>{{
|
||||
$t(`dataset.${scope.row.status.toLocaleLowerCase()}`)
|
||||
}}
|
||||
<svg-icon style="cursor: pointer;" v-if="scope.row.status === 'Error'" @click="showErrorMassage(scope.row.info)" icon-class="icon-maybe" class="field-icon-location" />
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
$t(`dataset.${scope.row.status.toLocaleLowerCase()}`)
|
||||
}}
|
||||
<svg-icon v-if="scope.row.status === 'Error'" style="cursor: pointer;" icon-class="icon-maybe" class="field-icon-location" @click="showErrorMassage(scope.row.info)" />
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row style="margin-top: 10px; text-align: right">
|
||||
@ -249,11 +248,11 @@
|
||||
</el-row>
|
||||
</el-drawer>
|
||||
<el-drawer
|
||||
v-closePress
|
||||
:title="header"
|
||||
:visible.sync="update_task"
|
||||
custom-class="user-drawer update-drawer-task"
|
||||
size="680px"
|
||||
v-closePress
|
||||
direction="rtl"
|
||||
>
|
||||
<el-form
|
||||
@ -276,11 +275,10 @@
|
||||
<el-radio-group v-model="taskForm.type">
|
||||
<el-radio label="all_scope">{{ $t('dataset.all_scope') }}</el-radio>
|
||||
<el-radio label="add_scope">
|
||||
{{ $t('dataset.add_scope') }}</el-radio
|
||||
>
|
||||
{{ $t('dataset.add_scope') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<div class="add-scope-cont" v-if="taskForm.type === 'add_scope' && table.type !== 'api'">
|
||||
<div v-if="taskForm.type === 'add_scope' && table.type !== 'api'" class="add-scope-cont">
|
||||
<el-form-item
|
||||
prop="type"
|
||||
:label="$t('dataset.incremental_update_type')"
|
||||
@ -304,14 +302,12 @@
|
||||
type="text"
|
||||
size="small"
|
||||
@click="insertParamToCodeMirror('${__last_update_time__}')"
|
||||
>{{ $t('dataset.last_update_time') }}</el-button
|
||||
>
|
||||
>{{ $t('dataset.last_update_time') }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="insertParamToCodeMirror('${__current_update_time__}')"
|
||||
>{{ $t('dataset.current_update_time') }}</el-button
|
||||
>
|
||||
>{{ $t('dataset.current_update_time') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="codemirror-cont">
|
||||
@ -337,7 +333,7 @@
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<div class="execute-rate-cont" v-if="taskForm.rate !== 'SIMPLE'">
|
||||
<div v-if="taskForm.rate !== 'SIMPLE'" class="execute-rate-cont">
|
||||
<el-form-item
|
||||
v-if="taskForm.rate === 'SIMPLE_CRON'"
|
||||
:label="$t('dataset.execute_rate')"
|
||||
@ -351,7 +347,7 @@
|
||||
:min="1"
|
||||
size="small"
|
||||
@change="onSimpleCronChange()"
|
||||
></el-input-number>
|
||||
/>
|
||||
<el-select
|
||||
v-model="taskForm.extraData.simple_cron_type"
|
||||
filterable
|
||||
@ -366,14 +362,14 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
prop="cron"
|
||||
v-if="taskForm.rate === 'CRON' && showCron"
|
||||
prop="cron"
|
||||
:label="$t('emailtask.cron_exp')"
|
||||
>
|
||||
<el-popover v-model="cronEdit">
|
||||
<cron
|
||||
:isRate="taskForm.rate === 'CRON'"
|
||||
v-model="taskForm.cron"
|
||||
:is-rate="taskForm.rate === 'CRON'"
|
||||
@close="cronEdit = false"
|
||||
/>
|
||||
<el-input
|
||||
@ -396,8 +392,7 @@
|
||||
type="datetime"
|
||||
:placeholder="$t('dataset.start_time')"
|
||||
size="small"
|
||||
>
|
||||
</el-date-picker>
|
||||
/>
|
||||
<svg-icon
|
||||
icon-class="icon_calendar_outlined"
|
||||
class="icon-calendar-outlined"
|
||||
@ -590,11 +585,11 @@ export default {
|
||||
},
|
||||
header() {
|
||||
return this.disableForm
|
||||
? "查看任务"
|
||||
? '查看任务'
|
||||
: this.taskForm.id
|
||||
? "编辑任务"
|
||||
: this.$t('dataset.add_task');
|
||||
},
|
||||
? '编辑任务'
|
||||
: this.$t('dataset.add_task')
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
table: {
|
||||
@ -655,12 +650,12 @@ export default {
|
||||
methods: {
|
||||
calHeight() {
|
||||
const that = this
|
||||
setTimeout(function () {
|
||||
setTimeout(function() {
|
||||
const currentHeight = document.documentElement.clientHeight
|
||||
that.height = currentHeight - 56 - 30 - 26 - 25 - 55 - 38 - 28 - 10
|
||||
}, 10)
|
||||
},
|
||||
incrementalUpdateTypeChange: function () {
|
||||
incrementalUpdateTypeChange: function() {
|
||||
if (this.incrementalUpdateType === 'incrementalAdd') {
|
||||
if (this.sql) {
|
||||
this.incrementalConfig.incrementalDelete = this.sql
|
||||
@ -782,7 +777,6 @@ export default {
|
||||
disableEdit(task) {
|
||||
return (
|
||||
task.rate === 'SIMPLE' ||
|
||||
task.status === 'Stopped' ||
|
||||
!hasDataPermission('manage', task.privileges)
|
||||
)
|
||||
},
|
||||
@ -812,7 +806,7 @@ export default {
|
||||
this.handlerConfirm(options)
|
||||
},
|
||||
selectDataset(row) {
|
||||
this.disableForm = this.disableEdit(row);
|
||||
this.disableForm = this.disableEdit(row)
|
||||
this.addTask(row)
|
||||
},
|
||||
changeTaskStatus(task) {
|
||||
@ -1158,4 +1152,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -181,13 +181,17 @@ export default {
|
||||
watch: {
|
||||
'childViews.datasetParams': {
|
||||
handler(newName, oldName) {
|
||||
if (this.attrs.parameters.length > 0) {
|
||||
if (this.attrs.parameters.length > 0 && this.attrs.parameters[0].indexOf('|DE|') === -1) {
|
||||
const parameters = []
|
||||
for (var i = 0; i < this.attrs.parameters.length; i++) {
|
||||
for (var j = 0; j < this.childViews.datasetParams.length; j++) {
|
||||
if (this.childViews.datasetParams[j].id.split('|DE|')[1] === this.attrs.parameters[i]) {
|
||||
parameters.push(this.childViews.datasetParams[j].id)
|
||||
if (this.attrs.parameters[i].indexOf('|DE|') === -1) {
|
||||
for (var j = 0; j < this.childViews.datasetParams.length; j++) {
|
||||
if (this.childViews.datasetParams[j].id.split('|DE|')[1] === this.attrs.parameters[i]) {
|
||||
parameters.push(this.childViews.datasetParams[j].id)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
parameters.push(this.attrs.parameters[i])
|
||||
}
|
||||
}
|
||||
this.attrs.parameters = parameters
|
||||
|
@ -1,42 +1,44 @@
|
||||
<template>
|
||||
<div class="de-ds-form" v-loading="formLoading">
|
||||
<div v-loading="formLoading" class="de-ds-form">
|
||||
<div class="de-ds-top">
|
||||
<span class="name">
|
||||
<i @click="logOutTips" class="el-icon-arrow-left"></i>
|
||||
<i class="el-icon-arrow-left" @click="logOutTips" />
|
||||
{{
|
||||
params &&
|
||||
params.id &&
|
||||
params.showModel &&
|
||||
params.showModel === 'show' &&
|
||||
!canEdit
|
||||
params.id &&
|
||||
params.showModel &&
|
||||
params.showModel === 'show' &&
|
||||
!canEdit
|
||||
? $t('datasource.show_info')
|
||||
: formType == 'add'
|
||||
? `${$t('commons.create') + typeMap }${ $t('commons.datasource')}`
|
||||
: $t('datasource.modify')
|
||||
? `${$t('commons.create') + typeMap }${ $t('commons.datasource')}`
|
||||
: $t('datasource.modify')
|
||||
}}
|
||||
</span>
|
||||
<div class="apply">
|
||||
<template v-if="canEdit">
|
||||
<deBtn secondary @click="logOutTips"
|
||||
>{{ $t('commons.cancel') }}
|
||||
</deBtn>
|
||||
<deBtn
|
||||
secondary
|
||||
v-if="
|
||||
formType === 'add' ||
|
||||
hasDataPermission('manage', params.privileges)
|
||||
"
|
||||
@click="validaDatasource"
|
||||
>{{ $t('commons.validate') }}
|
||||
@click="logOutTips"
|
||||
>{{ $t('commons.cancel') }}
|
||||
</deBtn>
|
||||
<deBtn
|
||||
v-if="
|
||||
formType === 'add' ||
|
||||
hasDataPermission('manage', params.privileges)
|
||||
hasDataPermission('manage', params.privileges)
|
||||
"
|
||||
secondary
|
||||
@click="validaDatasource"
|
||||
>{{ $t('commons.validate') }}
|
||||
</deBtn>
|
||||
<deBtn
|
||||
v-if="
|
||||
formType === 'add' ||
|
||||
hasDataPermission('manage', params.privileges)
|
||||
"
|
||||
type="primary"
|
||||
@click="save"
|
||||
>{{ $t('commons.save') }}
|
||||
>{{ $t('commons.save') }}
|
||||
</deBtn>
|
||||
</template>
|
||||
<template v-else>
|
||||
@ -47,7 +49,7 @@
|
||||
: hasDataPermission('manage', params.privileges)
|
||||
"
|
||||
@click="validaDatasource"
|
||||
>{{ $t('commons.validate') }}
|
||||
>{{ $t('commons.validate') }}
|
||||
</deBtn>
|
||||
</template>
|
||||
</div>
|
||||
@ -62,18 +64,18 @@
|
||||
size="small"
|
||||
:disabled="
|
||||
params &&
|
||||
params.id &&
|
||||
params.showModel &&
|
||||
params.showModel === 'show' &&
|
||||
!canEdit
|
||||
params.id &&
|
||||
params.showModel &&
|
||||
params.showModel === 'show' &&
|
||||
!canEdit
|
||||
"
|
||||
class="de-form-item"
|
||||
label-width="180px"
|
||||
label-position="right"
|
||||
>
|
||||
<div class="de-row-rules">
|
||||
<span>基本信息</span>
|
||||
</div>
|
||||
<div class="de-row-rules">
|
||||
<span>{{ $t('datasource.basic_info') }}</span>
|
||||
</div>
|
||||
<el-form-item :label="$t('datasource.display_name')" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
@ -83,9 +85,9 @@
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.description')" prop="desc">
|
||||
<deTextarea
|
||||
class="w100-textarea"
|
||||
v-model="form.desc"
|
||||
></deTextarea>
|
||||
class="w100-textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
@ -116,10 +118,10 @@
|
||||
:form="form"
|
||||
:disabled="
|
||||
params &&
|
||||
params.id &&
|
||||
params.showModel &&
|
||||
params.showModel === 'show' &&
|
||||
!canEdit
|
||||
params.id &&
|
||||
params.showModel &&
|
||||
params.showModel === 'show' &&
|
||||
!canEdit
|
||||
"
|
||||
/>
|
||||
<plugin-com
|
||||
@ -157,7 +159,6 @@ import deTextarea from '@/components/deCustomCm/deTextarea.vue'
|
||||
import msgCfm from '@/components/msgCfm'
|
||||
export default {
|
||||
name: 'DsForm',
|
||||
mixins: [msgCfm],
|
||||
components: {
|
||||
DsConfiguration,
|
||||
LayoutContent,
|
||||
@ -165,6 +166,7 @@ export default {
|
||||
PluginCom,
|
||||
deTextarea
|
||||
},
|
||||
mixins: [msgCfm],
|
||||
data() {
|
||||
return {
|
||||
disabled: false,
|
||||
@ -190,6 +192,7 @@ export default {
|
||||
{
|
||||
required: true,
|
||||
validator: this.nameRepeat,
|
||||
message: i18n.t('datasource.input_name'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
@ -416,7 +419,7 @@ export default {
|
||||
},
|
||||
getDatasourceDetail(id, showModel) {
|
||||
return getDatasourceDetail(id).then((res) => {
|
||||
this.params = {...res.data, showModel}
|
||||
this.params = { ...res.data, showModel }
|
||||
})
|
||||
},
|
||||
queryTreeDatas() {
|
||||
@ -837,9 +840,9 @@ export default {
|
||||
logOutTips() {
|
||||
const options = {
|
||||
title: 'role.tips',
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
content: 'system_parameter_setting.sure_to_exit',
|
||||
type: 'primary',
|
||||
type: 'primary',
|
||||
cb: () => {
|
||||
this.backToList()
|
||||
}
|
||||
@ -1009,4 +1012,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user