Browse Source

ETL列表增加配置脚本参数功能,整体样式优化

pull/4/head
wangxy 3 years ago
parent
commit
a715e17e91
6 changed files with 341 additions and 64 deletions
  1. +139
    -25
      src/assets/css/base.css
  2. +14
    -14
      src/views/etl/components/configuration.vue
  3. +157
    -0
      src/views/etl/components/configuringParameters.vue
  4. +18
    -1
      src/views/etl/components/edit.vue
  5. +12
    -2
      src/views/etl/index.vue
  6. +1
    -22
      src/views/oneimport/components/edit.vue

+ 139
- 25
src/assets/css/base.css View File

@ -12,17 +12,44 @@ body {
width: 100%;
height: 100%;
}
a {
text-decoration: none;
}
li {
list-style: none;
}
#app {
width: 100%;
height: 100%;
}
/* table样式 */
.el-table--mini td, .el-table--mini th {
padding: 3px 0;
.el-table th {
background: linear-gradient(180deg, #FAFCFC 0%, #EEEEEE 47%, #E7E7E7 100%);
}
.el-table--border td {
border-bottom: 2px solid #D5D5D5;
}
.el-table--border td {
border-right: 2px solid #D5D5D5;
}
.el-table th.is-leaf {
border-right: none !important;
}
.el-table tr td:first-child {
border-left: 2px solid #D5D5D5;
}
.el-table thead {
color: #3D3D42;
}
.el-table__row:nth-child(even) {
background: #F7F7F7;
.el-table th>.cell {
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
color: #3D3D42;
}
.el-table .el-table__body .cell {
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
color: #5C5A5A;
}
.el-table .el-table__body tr.current-row>td {
background: linear-gradient(180deg, #327e77 0%, #2c9b92 46%, #1e524d 100%);
@ -30,6 +57,9 @@ body {
.el-table .el-table__body tr.current-row>td div {
color: #fff;
}
.el-table--mini td, .el-table--mini th{
padding: 3px 0;
}
/* button样式 */
.el-button {
color: #5C5A5A;
@ -40,6 +70,11 @@ body {
color: #5C5A5A;
border: 1px solid #C3C3C3;
}
.el-button.is-disabled, .el-button.is-disabled:focus, .el-button.is-disabled:hover {
background: #C3C3C3;
border-color: #C3C3C3;
color: #fff;
}
.el-table:before {
height: 0;
}
@ -52,9 +87,7 @@ body {
.pagination-container {
position: relative;
height: 25px;
margin-bottom: 10px;
margin-top: 15px;
padding: 10px 20px !important;
padding: 8px 20px !important;
}
.pagination-container .el-pagination {
@ -114,8 +147,10 @@ body {
}
/* 新增按钮样式 */
.add-button-style {
width: 144px;
height: 40px;
width: 72px;
height: 32px !important;
min-height: 32px;
padding: 0;
background: linear-gradient(180deg, #35B0A6 0%, #1E524D 100%);
box-shadow: 0px 1px 1px 0px #FFFFFF;
border-radius: 2px;
@ -132,7 +167,7 @@ body {
}
/* 搜索按钮样式 */
.search-button-style {
height: 40px;
height: 32px;
background: linear-gradient(180deg, #35B0A6 0%, #1E524D 100%);
border-radius: 2px;
border: 1px solid #1E5353;
@ -149,7 +184,7 @@ body {
}
/* 重置按钮样式 */
.reset-button-style {
height: 40px;
height: 32px;
background: linear-gradient(180deg, #EAEDED 0%, #FFFFFF 43%, #E7E7E7 100%);
border-radius: 2px;
border: 1px solid #CCCCCC;
@ -203,6 +238,8 @@ body {
border-radius: 2px;
border: 2px solid #CCCCCC;
color: #5F6266;
height: 32px;
line-height: 32px;
}
.el-input__inner::placeholder {
font-family: PingFang-SC-Medium, PingFang-SC;
@ -216,8 +253,8 @@ body {
line-height: 42px;
}
.el-input--medium .el-input__inner {
height: 40px;
line-height: 40px;
height: 32px;
line-height: 32px;
}
.el-input__inner:focus {
border: 2px solid #CCCCCC;
@ -236,6 +273,11 @@ body {
padding: 0;
border: none;
}
.el-input-number__decrease, .el-input-number__increase {
height: 29px;
line-height: 29px;
top: 5px;
}
/* select筛选框样式 */
.el-select {
width: 100%;
@ -243,6 +285,9 @@ body {
.el-select .el-input.is-focus .el-input__inner, .el-select .el-input__inner:focus {
border-color: #CCCCCC;
}
.el-select-dropdown__item.is-disabled:hover {
background: #2D9B8E;
}
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover {
background: #2D9B8E;
color: #fff;
@ -250,11 +295,14 @@ body {
.el-form .el-select .el-input__suffix {
right: 0;
width: 48px;
height: 36px;
line-height: 36px;
height: 28px;
line-height: 28px;
border: 2px solid #CCCCCC;
background: linear-gradient(180deg, #EAEDED 0%, #FFFFFF 43%, #E7E7E7 100%);
}
.el-select .el-input__icon {
line-height: normal;
}
/* textarea框 */
.el-textarea__inner, .el-textarea__inner:focus {
border: 2px solid #CCCCCC;
@ -303,6 +351,14 @@ body {
border-top: 1px solid #C6C6C6;
padding: 24px 40px 40px;
}
.dialog-delete-button, .el-message-box__btns button:nth-child(2) {
width: 144px;
height: 40px;
background: linear-gradient(180deg, #ec8a8a 0%, #FF3B31 100%);
border-radius: 2px;
border: 1px solid #FF3B31 !important;
color: #fff !important;
}
.dialog-submit-button, .el-message-box__btns button:nth-child(2) {
width: 144px;
height: 40px;
@ -320,16 +376,16 @@ body {
margin-left: 40px !important;
}
.el-dialog .el-button--primary{
width: 144px;
height: 40px;
width: 72px;
height: 30px;
background: linear-gradient(180deg, #35B0A6 0%, #1E524D 100%);
border-radius: 2px;
border: 1px solid #1E5353;
color: #fff;
}
.el-dialog .el-button--default{
width: 144px;
height: 40px;
width: 72px;
height: 30px;
border-radius: 2px;
border: 1px solid #5C5A5A;
color: #3D3D42;
@ -337,8 +393,8 @@ body {
}
.el-dialog .el-button--danger{
width: 144px;
height: 40px;
width: 72px;
height: 30px;
border-radius: 2px;
color: #fff;
}
@ -400,9 +456,9 @@ body {
}
/* 列表修改 删除按钮样式 */
.edit-button-style {
width: 70px;
height: 24px;
padding: 0;
min-width: 50px !important;
height: 24px !important;
padding: 0 10px;
min-height: 24px;
}
/* 查询条件 */
@ -412,12 +468,15 @@ body {
/* form表单样式 */
.el-input-group__append .el-button {
width: 102px;
height: 40px;
height: 32px;
background: linear-gradient(180deg, #EAEDED 0%, #FFFFFF 43%, #E7E7E7 100%);
border-radius: 2px;
border: 2px solid #CCCCCC;
margin: 0;
}
.el-form-item .el-input,.el-input-number{
width: 100%;
}
/* checkbox */
.el-checkbox__input.is-checked+.el-checkbox__label {
color: #3D3D42;
@ -430,4 +489,59 @@ body {
}
.el-checkbox__inner:hover, .el-checkbox__input.is-focus .el-checkbox__inner {
border-color: #979797;
}
/* 穿梭框 */
.el-transfer {
width: 100%;
}
.el-checkbox-group {
display: flex;
flex-direction: column;
}
.el-transfer__buttons {
width: 130px !important;
}
.el-transfer-panel {
width: calc((100% - 190px) / 2);
}
.el-transfer__buttons {
display: inline-flex;
}
.el-transfer__button:first-child {
margin-bottom: 0;
}
.el-transfer__button {
width: 60px !important;
border-radius: 4px;
}
.el-transfer__button.is-disabled:hover {
color: #FFF;
border: 1px solid #1E5353;
background: linear-gradient(180deg, #35B0A6 0%, #1E524D 100%);
}
/* tabs样式 */
.el-tabs--card>.el-tabs__header {
background: #DFDFDF;
border: 2px solid #979797;
}
.el-tabs--card>.el-tabs__header .el-tabs__item {
background: linear-gradient(180deg, #EAEDED 0%, #FFFFFF 43%, #E7E7E7 100%);
/* box-shadow: 0px 4px 3px 0px #FFFFFF; */
border-radius: 2px;
border: 2px solid #B9B9B9;
color: #2D3940;
height: 36px;
line-height: 31px;
}
.el-tabs__nav-wrap {
margin-bottom: -2px;
}
.el-tabs--top .el-tabs__item.is-top:nth-child(n+2) {
border-left: none;
}
.el-tabs--card>.el-tabs__header .el-tabs__item.is-active {
border-bottom-color: transparent;
}
.el-tabs__header {
margin: 0 0 13px;
}

+ 14
- 14
src/views/etl/components/configuration.vue View File

@ -28,7 +28,7 @@
</div>
</el-col>
<template v-for="(item, index) in formData.triggerLi" :key="index">
<el-col :span="8">
<el-col :span="6">
<el-form-item
:label="getColumnName('Trigger-TriggerType')"
:prop="'triggerLi.' + index + '.Trigger-TriggerType'"
@ -52,7 +52,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="5">
<el-form-item
:label="getColumnName('Trigger-Hour')"
:prop="'triggerLi.' + index + '.Trigger-Hour'"
@ -64,7 +64,7 @@
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="5">
<el-form-item
:label="getColumnName('Trigger-Minute')"
:prop="'triggerLi.' + index + '.Trigger-Minute'"
@ -76,7 +76,7 @@
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="6">
<el-form-item
:label="getColumnName('Trigger-Second')"
:prop="'triggerLi.' + index + '.Trigger-Second'"
@ -88,7 +88,7 @@
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="2" style="text-align:right;">
<el-button
type="danger"
@click.prevent="removeDomain(index, 'triggerLi')"
@ -152,7 +152,7 @@
<el-input v-model="item['ETCD_Lock-Table']"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="5">
<el-form-item
:label="getColumnName('ETCD_Lock-LockType')"
:prop="'etcdLockLi.' + index + '.ETCD_Lock-LockType'"
@ -176,7 +176,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="5">
<el-form-item
:label="getColumnName('ETCD_Lock-Stage')"
:prop="'etcdLockLi.' + index + '.ETCD_Lock-Stage'"
@ -197,7 +197,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="2" style="text-align:right;">
<el-button
type="danger"
@click.prevent="removeDomain(index, 'etcdLockLi')"
@ -220,7 +220,7 @@
</div>
</el-col>
<template v-for="(item, index) in formData.shellLi" :key="index">
<el-col :span="10">
<el-col :span="11">
<el-form-item
:label="getColumnName('Shell-ShellName')"
:prop="'shellLi.' + index + '.Shell-ShellName'"
@ -242,7 +242,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-col :span="11">
<el-form-item
:label="getColumnName('Shell-Stage')"
:prop="'shellLi.' + index + '.Shell-Stage'"
@ -263,7 +263,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="2" style="text-align:right;">
<el-button
type="danger"
@click.prevent="removeDomain(index, 'shellLi')"
@ -406,9 +406,9 @@ export default {
font-weight: 600;
}
}
.el-input-number {
width: 140px;
}
// .el-input-number {
// width: 140px;
// }
.el-button--primary {
float: right;
}


+ 157
- 0
src/views/etl/components/configuringParameters.vue View File

@ -0,0 +1,157 @@
<template>
<el-dialog
title="配置脚本参数"
model-value
width="1200px"
:close-on-click-modal="false"
:before-close="handleClose"
>
<el-table size="mini" :data="tableData" v-loading="loading" height="430px" border>
<el-table-column :label="getColumnName('ShellParam-ShellName')">
<template #default="scope">
<el-select v-model="scope.row['ShellParam-ShellName']" placeholder="请选择" size="mini">
<el-option
v-for="item in shellNameArray"
:key="item['Shell-ShellName']"
:label="item['Shell-ShellName']"
:value="item['Shell-ShellName']"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="ShellParam-ParamName" :label="getColumnName('ShellParam-ParamName')">
<template #default="scope">
<el-input size="mini" v-model="scope.row['ShellParam-ParamName']" clearable placeholder="请输入" />
</template>
</el-table-column>
<el-table-column prop="ShellParam-ParamType" :label="getColumnName('ShellParam-ParamType')">
<template #default="scope">
<el-input size="mini" v-model="scope.row['ShellParam-ParamType']" clearable placeholder="请输入" />
</template>
</el-table-column>
<el-table-column prop="ShellParam-ParamValue" :label="getColumnName('ShellParam-ParamValue')">
<template #default="scope">
<el-input size="mini" v-model="scope.row['ShellParam-ParamValue']" clearable placeholder="请输入" />
</template>
</el-table-column>
<el-table-column prop="ShellParam-ValueType" :label="getColumnName('ShellParam-ValueType')">
<template #default="scope">
<el-input-number v-model="scope.row['ShellParam-ValueType']" clearable placeholder="请输入" />
</template>
</el-table-column>
<el-table-column prop="ShellParam-ValueFormat" :label="getColumnName('ShellParam-ValueFormat')">
<template #default="scope">
<el-input size="mini" v-model="scope.row['ShellParam-ValueFormat']" clearable placeholder="请输入" />
</template>
</el-table-column>
<el-table-column align="center" width="100px">
<template #header>
<el-button
size="mini"
type="primary"
@click="handleAddValst()"
>新增</el-button>
</template>
<template #default="scope">
<el-button
size="mini"
type="danger"
@click="handleDeleteValst(scope.$index)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="submitForm('form')"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
import { post, get } from "../../../server/api.js";
export default {
props: {
item: {
default: {},
},
isShowDialog: {
default: "configuringParameters",
},
},
data() {
return {
tableData: [],
loading: false,
shellNameArray: [],
};
},
created() {
this.getShellData()
this.getTableData()
},
mounted() {
},
methods: {
//
getTableData() {
this.loading = true
get('/admin/etl/shellparam/query', {taskid: this.item['TaskHead-TaskId']}).then((res) => {
this.loading = false
if (res.code === 200) {
this.tableData = res.data
}
}).catch(() => {
this.loading = false
})
},
//
getShellData() {
get('/admin/etl/shell/query', {taskid: this.item['TaskHead-TaskId']}).then(({code, data}) => {
if (code === 200) {
this.shellNameArray = data || []
}
})
},
/** 新增字段 */
handleAddValst() {
this.tableData.push({
"ShellParam-ShellName": undefined,
"ShellParam-ParamName": undefined,
"ShellParam-ParamType": undefined,
"ShellParam-ParamValue": undefined,
"ShellParam-ValueType": undefined,
"ShellParam-ValueFormat": undefined,
})
},
/** 删除字段 */
handleDeleteValst(index) {
this.tableData.splice(index, 1)
},
//
handleClose() {
this.$emit("update:isShowDialog", "");
},
//
submitForm() {
let params = {
"taskId": this.item['TaskHead-TaskId'],
"ShellParamLi": this.tableData
}
post('/admin/etl/shellparam/save', params).then(res => {
if (res.code === 200) {
this.msgSuccess('新增成功')
this.$emit('editCallBack')
} else {
this.msgError(res.msg)
}
})
},
},
};
</script>
<style lang="less" scoped>
</style>

+ 18
- 1
src/views/etl/components/edit.vue View File

@ -100,6 +100,18 @@
<el-form-item :label="getColumnName('TaskHead-UniqueField')" prop="TaskHead-UniqueField">
<el-input v-model="form['TaskHead-UniqueField']" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="getColumnName('TaskHead-CtlParam3')" prop="TaskHead-CtlParam3">
<el-select v-model="form['TaskHead-CtlParam3']" placeholder="请选择">
<el-option
v-for="item in ctlParamArray"
:key="item['Stdef-StdefTyp']"
:label="item['Stdef-Bez']"
:value="item['Stdef-StdefTyp']"
/>
</el-select>
</el-form-item>
</el-col>
<el-col v-if="form['TaskHead-ExtractType']" :span="24">
<el-table size="mini" :data="form['TaskHead-TaskLstLi']" :height="tableHeight" border>
@ -157,7 +169,7 @@
<el-input v-model="scope.row['TaskLst-Format']" clearable placeholder="请输入" />
</template>
</el-table-column>
<el-table-column align="center">
<el-table-column align="center" width="100px">
<template #header>
<el-button
size="mini"
@ -209,6 +221,7 @@ export default {
extractTypeArray: [], //
targetFieldTypeArray: [], //
funcArray: [], //
ctlParamArray: [], //
tableHeight: 300,
title: '添加', //
form: {
@ -265,6 +278,10 @@ export default {
this.getStanderOne({ 'StatId': 'TaskLst-Func' }).then(res => {
this.funcArray = res.data || []
})
//
this.getStanderOne({ 'StatId': 'TaskHead-CtlParam3' }).then(res => {
this.ctlParamArray = res.data || []
})
},
methods: {
/** 新增字段 */


+ 12
- 2
src/views/etl/index.vue View File

@ -31,12 +31,13 @@
<span v-else>{{ scope.row[item] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="340" fixed="right">
<el-table-column label="操作" width="460" fixed="right">
<template #default="scope">
<el-button class="edit-button-style" @click="configuration(scope.row)" icon="el-icon-setting" size="small">配置</el-button>
<el-button class="edit-button-style" @click="handlePerform(scope.row)" icon="el-icon-s-open" size="small">执行</el-button>
<el-button class="edit-button-style" @click="handleUpdate(scope.row)" icon="el-icon-edit" size="small">修改</el-button>
<el-button class="edit-button-style" @click="handleDelete(scope.row)" icon="el-icon-delete" size="small">删除</el-button>
<el-button class="edit-button-style" style="width: 120px;" @click="configuringParameters(scope.row)" icon="el-icon-setting" size="small">配置脚本参数</el-button>
</template>
</el-table-column>
</el-table>
@ -46,6 +47,8 @@
<EditTemplate v-if="isShowDialog === 'edit' ? true : false" :item="item" v-model:isShowDialog="isShowDialog" @editCallBack="completeCallBack"></EditTemplate>
<!-- 任务配置项 -->
<Configuration v-if="isShowDialog === 'configuration'" :item="item" v-model:isShowDialog="isShowDialog" @editCallBack="completeCallBack" />
<!-- 配置脚本参数 -->
<ConfiguringParameters v-if="isShowDialog === 'configuringParameters'" :item="item" v-model:isShowDialog="isShowDialog" @editCallBack="completeCallBack" />
</ContentContainer>
</div>
</template>
@ -55,6 +58,7 @@
import ContentContainer from "../../components/ContentContainer.vue"
import EditTemplate from "./components/edit.vue"
import Configuration from "./components/configuration.vue"
import ConfiguringParameters from "./components/configuringParameters.vue"
import { ListMixin } from '@/mixins/ListMixin'
import { post } from "../../server/api.js";
export default {
@ -63,7 +67,8 @@
SearchTemplate,
ContentContainer,
EditTemplate,
Configuration
Configuration,
ConfiguringParameters
},
mixins: [ListMixin], // mixins mixins
data() {
@ -132,6 +137,11 @@
this.item=item;
this.changeDialogStatus('configuration');
},
//
configuringParameters(item) {
this.item=item;
this.changeDialogStatus('configuringParameters');
},
//
handleQuery() {
if (this.pagination.sourcetable === '') this.pagination.sourcetable = undefined


+ 1
- 22
src/views/oneimport/components/edit.vue View File

@ -50,14 +50,8 @@
<el-input v-model="form['DataTableHead-TaskDesc']" clearable />
</el-form-item>
</el-col>
<el-col :span="24">
<el-table size="mini" :data="form['DataTableHead-DataTableLstLi']" :height="tableHeight" border>
<!-- <el-table-column :label="getColumnName('DataTableLst-Pos')">
<template #default="scope">
<el-input v-model="scope.row['DataTableLst-Pos']" clearable placeholder="请输入" />
</template>
</el-table-column> -->
<el-table-column :label="getColumnName('DataTableLst-ColNo')">
<template #default="scope">
<el-input v-model="scope.row['DataTableLst-ColNo']" clearable placeholder="请输入" />
@ -68,16 +62,6 @@
<el-input v-model="scope.row['DataTableLst-ColDesc']" clearable placeholder="请输入" />
</template>
</el-table-column>
<!-- <el-table-column :label="getColumnName('DataTableLst-RowNo')">
<template #default="scope">
<el-input v-model="scope.row['DataTableLst-RowNo']" clearable placeholder="请输入" />
</template>
</el-table-column> -->
<!-- <el-table-column :label="getColumnName('DataTableLst-RowName')">
<template #default="scope">
<el-input v-model="scope.row['DataTableLst-RowName']" clearable placeholder="请输入" />
</template>
</el-table-column> -->
<el-table-column :label="getColumnName('DataTableLst-TargetField')">
<template #default="scope">
<el-input v-model="scope.row['DataTableLst-TargetField']" clearable placeholder="请输入" />
@ -112,12 +96,7 @@
<el-input v-model="scope.row['DataTableLst-DefaultValue']" clearable placeholder="请输入" />
</template>
</el-table-column>
<!-- <el-table-column :label="getColumnName('DataTableLst-SetValue')">
<template #default="scope">
<el-input v-model="scope.row['DataTableLst-SetValue']" clearable placeholder="请输入" />
</template>
</el-table-column> -->
<el-table-column align="center" width="200">
<el-table-column align="center" width="120">
<template #header>
<el-button
size="mini"


Loading…
Cancel
Save