提交数据清洗规则
This commit is contained in:
parent
4d8abf16d1
commit
79aa645817
15
src/api/dataformatsRules.js
Normal file
15
src/api/dataformatsRules.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
||||
|
||||
const createRules = (params)=>postAction("/dataFormatRules/createRules",params);
|
||||
const updateRules = (params)=>putAction("/dataFormatRules/updateRules",params);
|
||||
const deleteRules = (params)=>deleteAction("/dataFormatRules/deleteRules",params);
|
||||
const queryPage = (params)=>getAction("/dataFormatRules/queryPage",params);
|
||||
const queryById = (params)=>getAction("/dataFormatRules/queryById",params);
|
||||
|
||||
export {
|
||||
createRules,
|
||||
updateRules,
|
||||
deleteRules,
|
||||
queryPage,
|
||||
queryById
|
||||
}
|
15
src/api/datatypeConversionRules.js
Normal file
15
src/api/datatypeConversionRules.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
||||
|
||||
const createRules = (params)=>postAction("/typeConversionRules/createRules",params);
|
||||
const updateRules = (params)=>putAction("/typeConversionRules/updateRules",params);
|
||||
const deleteRules = (params)=>deleteAction("/typeConversionRules/deleteRules",params);
|
||||
const queryPage = (params)=>getAction("/typeConversionRules/queryPage",params);
|
||||
const queryById = (params)=>getAction("/typeConversionRules/queryById",params);
|
||||
|
||||
export {
|
||||
createRules,
|
||||
updateRules,
|
||||
deleteRules,
|
||||
queryPage,
|
||||
queryById
|
||||
}
|
17
src/api/deEmphasisRules.js
Normal file
17
src/api/deEmphasisRules.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
||||
|
||||
const createRules = (params)=>postAction("/duplicationRules/createRules",params);
|
||||
const updateRules = (params)=>putAction("/duplicationRules/updateRules",params);
|
||||
const deleteRules = (params)=>deleteAction("/duplicationRules/deleteRules",params);
|
||||
const queryPage = (params)=>getAction("/duplicationRules/queryPage",params);
|
||||
const queryById = (params)=>getAction("/duplicationRules/queryById",params);
|
||||
const querytableColumns = (params)=>getAction("/duplicationRules/getTableColumns",params);
|
||||
|
||||
export {
|
||||
createRules,
|
||||
updateRules,
|
||||
deleteRules,
|
||||
queryPage,
|
||||
queryById,
|
||||
querytableColumns
|
||||
}
|
|
@ -3,9 +3,10 @@ import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
|||
const metaDataTypeTree = (params)=>getAction("/dataManager/getAllTable",params);
|
||||
const metaDatalist = (params)=>getAction("/dataManager/getTableColumns",params);
|
||||
const tableDataList = (params)=>getAction("/dataManager/getTableData",params);
|
||||
const tableIndexes = (params)=>getAction("/tableIndex/getTableIndexes",params);
|
||||
|
||||
export {
|
||||
metaDataTypeTree,
|
||||
metaDatalist,
|
||||
tableDataList
|
||||
tableIndexes
|
||||
}
|
15
src/api/missingvalueRules.js
Normal file
15
src/api/missingvalueRules.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { getAction, deleteAction, putAction, postAction } from '@/api/manage'
|
||||
|
||||
const createRules = (params)=>postAction("/missingValueRules/createRules",params);
|
||||
const updateRules = (params)=>putAction("/missingValueRules/updateRules",params);
|
||||
const deleteRules = (params)=>deleteAction("/missingValueRules/deleteRules",params);
|
||||
const queryPage = (params)=>getAction("/missingValueRules/queryPage",params);
|
||||
const queryById = (params)=>getAction("/missingValueRules/queryById",params);
|
||||
|
||||
export {
|
||||
createRules,
|
||||
updateRules,
|
||||
deleteRules,
|
||||
queryPage,
|
||||
queryById
|
||||
}
|
|
@ -1078,7 +1078,7 @@ tr.ant-table-expanded-row:hover {
|
|||
background-color: transparent !important;
|
||||
color: #00A2FF;
|
||||
height: 50px;
|
||||
font-family: 'MyCustomFont1', sans-serif;
|
||||
// font-family: 'MyCustomFont1', sans-serif;
|
||||
font-weight: 400 !important;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
import Contextmenu from '@/components/menu/Contextmenu'
|
||||
import { mixin, mixinDevice } from '@/utils/mixin.js'
|
||||
import { triggerWindowResizeEvent } from '@/utils/util'
|
||||
const indexKey = '/dashboard/analysis'
|
||||
const indexKey = '/home/index'
|
||||
import Vue from 'vue'
|
||||
import { CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
|
||||
|
||||
|
|
|
@ -124,6 +124,10 @@ export default {
|
|||
if (this.menuList && this.menuList.length > 0) {
|
||||
var choseMenu = this.menuList.filter(item => item.meta.title == this.title)
|
||||
if (choseMenu && choseMenu.length > 0) this.current = choseMenu[0].id
|
||||
else {
|
||||
this.current = this.menuList[0].id
|
||||
this.$router.push({ name: this.menuList[0].name, path: this.menuList[0].path })
|
||||
}
|
||||
}
|
||||
},
|
||||
handleClick(e) {
|
||||
|
@ -138,7 +142,7 @@ export default {
|
|||
|
||||
<style lang="less" scoped>
|
||||
.leftMenu {
|
||||
background-image: url(/img/leftMenu.031fa8a0.png);
|
||||
background-image: url(~@assets/img/leftMenu.png);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 288px;
|
||||
|
|
|
@ -26,7 +26,7 @@ export default {
|
|||
console.log('this.$route.matched', this.$route.matched)
|
||||
|
||||
this.breadList = []
|
||||
this.breadList.push({ name: 'dashboard-analysis', path: '/dashboard/analysis', meta: { title: '首页' } })
|
||||
this.breadList.push({ name: 'dashboard-analysis', path: '/home/index', meta: { title: '首页' } })
|
||||
|
||||
this.name = this.$route.name
|
||||
this.$route.matched.forEach((item) => {
|
||||
|
|
|
@ -11,7 +11,7 @@ export const asyncRouterMap = [
|
|||
name: 'dashboard',
|
||||
component: TabLayout,
|
||||
meta: { title: '首页' },
|
||||
redirect: '/dashboard/analysis',
|
||||
redirect: '/home/index',
|
||||
children: [
|
||||
|
||||
// // dashboard
|
||||
|
|
|
@ -16,7 +16,7 @@ export const SYS_BUTTON_AUTH = 'SYS_BUTTON_AUTH'
|
|||
export const ENCRYPTED_STRING = 'ENCRYPTED_STRING'
|
||||
export const ENHANCE_PRE = 'enhance_'
|
||||
export const UI_CACHE_DB_DICT_DATA = 'UI_CACHE_DB_DICT_DATA'
|
||||
export const INDEX_MAIN_PAGE_PATH = '/dashboard/analysis'
|
||||
export const INDEX_MAIN_PAGE_PATH = '/home/index'
|
||||
export const TENANT_ID = 'TENANT_ID'
|
||||
export const ONL_AUTH_FIELDS = 'ONL_AUTH_FIELDS'
|
||||
//路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
import { metaDataTypeTree, tableDataList } from '@/api/metaData'
|
||||
import { metaDataTypeTree, tableIndexes } from '@/api/metaData'
|
||||
export default {
|
||||
name: "metadata",
|
||||
components: {
|
||||
|
@ -86,44 +86,39 @@ export default {
|
|||
tableParams: {
|
||||
schemaMass: null,
|
||||
tableName: null,
|
||||
startDateString: null,
|
||||
endDateString: null,
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
},
|
||||
treeDate: [],
|
||||
dataSource: [],
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'columnId',
|
||||
width: 60,
|
||||
align: "center",
|
||||
width: 70,
|
||||
customRender: (text, record, index) => `${index + 1}`,
|
||||
},
|
||||
{
|
||||
title: '索引名称',
|
||||
align: "center",
|
||||
dataIndex: 'columnName',
|
||||
dataIndex: 'indexName',
|
||||
},
|
||||
{
|
||||
title: '字段',
|
||||
align: "center",
|
||||
dataIndex: 'dataType',
|
||||
dataIndex: 'columnName',
|
||||
},
|
||||
{
|
||||
title: '索引类型',
|
||||
align: "center",
|
||||
dataIndex: 'dataLength',
|
||||
dataIndex: 'indexType',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
title: '是否唯一',
|
||||
align: "center",
|
||||
dataIndex: 'nullable',
|
||||
dataIndex: 'uniqueness',
|
||||
},
|
||||
{
|
||||
title: '描述',
|
||||
title: '列在索引中的位置',
|
||||
align: "center",
|
||||
dataIndex: 'dataDefault',
|
||||
dataIndex: 'columnPosition',
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -177,13 +172,13 @@ export default {
|
|||
if (info.node.dataRef.type && info.node.dataRef.type == 'childern') {
|
||||
this.tableParams.schemaMass = info.node.$parent.dataRef.title
|
||||
this.tableParams.tableName = info.node.dataRef.title
|
||||
this.getTableDataList()
|
||||
this.getTableIndexList()
|
||||
}
|
||||
},
|
||||
getTableDataList() {
|
||||
tableDataList(this.tableParams).then(res => {
|
||||
getTableIndexList() {
|
||||
tableIndexes(this.tableParams).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.dataSource = res.result.rows
|
||||
this.dataSource = res.result
|
||||
}
|
||||
|
||||
})
|
||||
|
|
199
src/views/datawashing/dataformatsRules/index.vue
Normal file
199
src/views/datawashing/dataformatsRules/index.vue
Normal file
|
@ -0,0 +1,199 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="30">
|
||||
<a-col :md="20">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" size="large"
|
||||
v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
<a-select-option v-for="item in dataTypeList" :value="item.enName">
|
||||
{{ item.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="表名">
|
||||
<a-input placeholder="请输入表名" v-model="queryParam.tableName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24" style="text-align: right;">
|
||||
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<a-row :gutter="30" style="padding: 0 10px;">
|
||||
<a-col :md="24">
|
||||
<div class="linese"></div>
|
||||
<!-- 表格区域 -->
|
||||
<div style="height:calc(100vh - 316px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||
:pagination="pagination" :scroll="{ y: 'calc(100vh - 380px)' }" rowKey="id"
|
||||
@change="handleTableChange">
|
||||
<!-- <span slot="createTime" slot-scope="text, record">
|
||||
{{ moment(text).format('YYYY-MM-DD') }}
|
||||
</span> -->
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record.id)">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleRemove(record.id)">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<rulesModel ref="modalForm" @fatherMethod="getQueryPage" />
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { deleteRules, queryPage } from '@/api/dataformatsRules'
|
||||
import { dataTypeQueryAll } from '@/api/dataType'
|
||||
import rulesModel from './rulesModel.vue'
|
||||
export default {
|
||||
name: "dataformatsRules",
|
||||
components: {
|
||||
rulesModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
tableName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
defaultPageSize: 10, // 默认当前页显示数据的大小total: 0, // 总数,必须先有
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: false,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||
},
|
||||
dataTypeList: [],
|
||||
dataSource: [],
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
width: 70,
|
||||
customRender: (text, record, index) => `${index + 1}`,
|
||||
},
|
||||
{
|
||||
title: '表名',
|
||||
align: "center",
|
||||
dataIndex: 'tableName',
|
||||
},
|
||||
{
|
||||
title: '报文名称',
|
||||
align: "center",
|
||||
dataIndex: 'msgName',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 130,
|
||||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getQueryPage()
|
||||
this.getDataType()
|
||||
},
|
||||
methods: {
|
||||
getDataType() {
|
||||
dataTypeQueryAll().then(res => {
|
||||
if (res.code == 200) this.dataTypeList = res.result
|
||||
})
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
this.pagination = pagination
|
||||
this.queryParam.pageNum = pagination.current - 1
|
||||
this.queryParam.pageSize = pagination.pageSize
|
||||
this.getQueryPage()
|
||||
},
|
||||
getQueryPage() {
|
||||
queryPage(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
const pagination = { ...this.pagination }
|
||||
pagination.total = res.result.total
|
||||
this.dataSource = res.result.rows
|
||||
this.pagination = pagination
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add();
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(recordId) {
|
||||
this.$refs.modalForm.eidt(recordId);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
console.log('dfs', recordId)
|
||||
const _that = this
|
||||
_that.$confirm({
|
||||
title: '你确认执行删除操作吗?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk() {
|
||||
console.log('dfs', recordId)
|
||||
deleteRules({ id: recordId }).then(res => {
|
||||
if (res.code === 200) {
|
||||
_that.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
_that.getQueryPage()
|
||||
} else {
|
||||
_that.$notification.warning({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() { }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
143
src/views/datawashing/dataformatsRules/rulesModel.vue
Normal file
143
src/views/datawashing/dataformatsRules/rulesModel.vue
Normal file
|
@ -0,0 +1,143 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk"
|
||||
@cancel="handleCancel" okText="保存" cancelText="关闭">
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model ref="ruleForm" :model="form" :rules="rules">
|
||||
<a-form-model-item label="表名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tableName">
|
||||
<a-input v-model="form.tableName" placeholder="请输入"></a-input>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="去重类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="transfStrategy">
|
||||
<a-select v-model="form.transfStrategy">
|
||||
<a-select-option value="1">
|
||||
完全去重
|
||||
</a-select-option>
|
||||
<a-select-option value="2">
|
||||
关键列去重
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="判定字段" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<!-- <a-input v-if="form.duplicationType == 1" disabled v-model="allText" placeholder="请输入"></a-input>
|
||||
<a-tree-select v-if="form.duplicationType == 2" v-model="this.form.judgmentField"
|
||||
style="width: 100%" :tree-data="treeData" tree-checkable :show-checked-strategy="SHOW_PARENT"
|
||||
search-placeholder="请选项" /> -->
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JCron from "@/components/jeecg/JCron";
|
||||
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
|
||||
import { createRules, updateRules, queryById } from '@/api/dataformatsRules'
|
||||
|
||||
|
||||
export default {
|
||||
name: "rulesModal",
|
||||
components: {
|
||||
JCron,
|
||||
JSelectMultiple
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: "操作",
|
||||
visible: false,
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
form: {
|
||||
tableName: null,
|
||||
transfStrategy: null,
|
||||
transfFileds: null
|
||||
},
|
||||
rules: {
|
||||
tableName: [{ required: true, message: '请输入表名', trigger: 'blur' }],
|
||||
transfStrategy: [{ required: true, message: '请选择', trigger: 'change' }]
|
||||
},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
treeData: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.loadData();
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
this.form = {
|
||||
tableName: null,
|
||||
transfStrategy: null,
|
||||
transfFileds: null
|
||||
}
|
||||
this.visible = true;
|
||||
},
|
||||
eidt(recordId) {
|
||||
queryById({ id: recordId }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.form = res.result
|
||||
this.visible = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.confirmLoading = true;
|
||||
if (!this.form.id) {
|
||||
createRules(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
this.confirmLoading = false
|
||||
this.$emit('fatherMethod')
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: '操作失败'
|
||||
})
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
updateRules(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
this.confirmLoading = false
|
||||
this.$emit('fatherMethod')
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: '操作失败'
|
||||
})
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
199
src/views/datawashing/datatypeConversionRules/index.vue
Normal file
199
src/views/datawashing/datatypeConversionRules/index.vue
Normal file
|
@ -0,0 +1,199 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="30">
|
||||
<a-col :md="20">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" size="large"
|
||||
v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
<a-select-option v-for="item in dataTypeList" :value="item.enName">
|
||||
{{ item.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="表名">
|
||||
<a-input placeholder="请输入表名" v-model="queryParam.tableName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24" style="text-align: right;">
|
||||
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<a-row :gutter="30" style="padding: 0 10px;">
|
||||
<a-col :md="24">
|
||||
<div class="linese"></div>
|
||||
<!-- 表格区域 -->
|
||||
<div style="height:calc(100vh - 316px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||
:pagination="pagination" :scroll="{ y: 'calc(100vh - 380px)' }" rowKey="ROW_ID"
|
||||
@change="handleTableChange">
|
||||
<!-- <span slot="createTime" slot-scope="text, record">
|
||||
{{ moment(text).format('YYYY-MM-DD') }}
|
||||
</span> -->
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record.id)">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleRemove(record.id)">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<rulesModel ref="modalForm" @fatherMethod="getQueryPage" />
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { deleteRules, queryPage } from '@/api/datatypeConversionRules'
|
||||
import { dataTypeQueryAll } from '@/api/dataType'
|
||||
import rulesModel from './rulesModel.vue'
|
||||
export default {
|
||||
name: "datatypeConversionRules",
|
||||
components: {
|
||||
rulesModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
tableName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
defaultPageSize: 10, // 默认当前页显示数据的大小total: 0, // 总数,必须先有
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: false,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||
},
|
||||
dataTypeList: [],
|
||||
dataSource: [],
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
width: 70,
|
||||
customRender: (text, record, index) => `${index + 1}`,
|
||||
},
|
||||
{
|
||||
title: '表名',
|
||||
align: "center",
|
||||
dataIndex: 'tableName',
|
||||
},
|
||||
{
|
||||
title: '报文名称',
|
||||
align: "center",
|
||||
dataIndex: 'msgName',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 130,
|
||||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getQueryPage()
|
||||
this.getDataType()
|
||||
},
|
||||
methods: {
|
||||
getDataType() {
|
||||
dataTypeQueryAll().then(res => {
|
||||
if (res.code == 200) this.dataTypeList = res.result
|
||||
})
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
this.pagination = pagination
|
||||
this.queryParam.pageNum = pagination.current - 1
|
||||
this.queryParam.pageSize = pagination.pageSize
|
||||
this.getQueryPage()
|
||||
},
|
||||
getQueryPage() {
|
||||
queryPage(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
const pagination = { ...this.pagination }
|
||||
pagination.total = res.result.total
|
||||
this.dataSource = res.result.rows
|
||||
this.pagination = pagination
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add();
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(recordId) {
|
||||
this.$refs.modalForm.eidt(recordId);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
console.log('dfs', recordId)
|
||||
const _that = this
|
||||
_that.$confirm({
|
||||
title: '你确认执行删除操作吗?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk() {
|
||||
console.log('dfs', recordId)
|
||||
deleteRules({ id: recordId }).then(res => {
|
||||
if (res.code === 200) {
|
||||
_that.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
_that.getQueryPage()
|
||||
} else {
|
||||
_that.$notification.warning({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() { }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
159
src/views/datawashing/datatypeConversionRules/rulesModel.vue
Normal file
159
src/views/datawashing/datatypeConversionRules/rulesModel.vue
Normal file
|
@ -0,0 +1,159 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk"
|
||||
@cancel="handleCancel" okText="保存" cancelText="关闭">
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model ref="ruleForm" :model="form" :rules="rules">
|
||||
<a-form-model-item label="表名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tableName">
|
||||
<a-input v-model="form.tableName" placeholder="请输入"></a-input>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="列名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="columnName">
|
||||
<a-select v-model="form.columnName">
|
||||
<a-select-option :value="1">
|
||||
列1
|
||||
</a-select-option>
|
||||
<a-select-option :value="2">
|
||||
列2
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="数据类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dataType">
|
||||
<a-select v-model="form.dataType">
|
||||
<a-select-option :value="1">Int</a-select-option>
|
||||
<a-select-option :value="2">Bigint</a-select-option>
|
||||
<a-select-option :value="3">Varchar</a-select-option>
|
||||
<a-select-option :value="4">Timestamp</a-select-option>
|
||||
<a-select-option :value="5">Number</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item v-show="form.dataType == 5" label="数据精度" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input-number placeholder="请输入" v-model="form.dataPrecision" :min="1" :max="10" :precision='0' style="width: 100%" />
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JCron from "@/components/jeecg/JCron";
|
||||
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
|
||||
import { createRules, updateRules, queryById } from '@/api/datatypeConversionRules'
|
||||
|
||||
|
||||
export default {
|
||||
name: "rulesModal",
|
||||
components: {
|
||||
JCron,
|
||||
JSelectMultiple
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: "操作",
|
||||
visible: false,
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
form: {
|
||||
tableName: null,
|
||||
columnName: null,
|
||||
dataType: null,
|
||||
dataPrecision: null
|
||||
},
|
||||
rules: {
|
||||
tableName: [{ required: true, message: '请输入表名', trigger: 'blur' }],
|
||||
columnName: [{ required: true, message: '请选择', trigger: 'change' }],
|
||||
dataType: [{ required: true, message: '请选择数据类型', trigger: 'change' }]
|
||||
},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
treeData: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.loadData();
|
||||
},
|
||||
methods: {
|
||||
handleChange(value) {
|
||||
if (value == 1) {
|
||||
this.form.judgmentField = 'ALL'
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
add() {
|
||||
this.form = {
|
||||
tableName: null,
|
||||
columnName: null,
|
||||
dataType: null,
|
||||
dataPrecision: null
|
||||
}
|
||||
this.visible = true;
|
||||
},
|
||||
eidt(recordId) {
|
||||
queryById({ id: recordId }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.form = res.result
|
||||
this.visible = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.confirmLoading = true;
|
||||
if (!this.form.id) {
|
||||
createRules(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
this.confirmLoading = false
|
||||
this.$emit('fatherMethod')
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: '操作失败'
|
||||
})
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
updateRules(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
this.confirmLoading = false
|
||||
this.$emit('fatherMethod')
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: '操作失败'
|
||||
})
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
215
src/views/datawashing/deEmphasisRules/index.vue
Normal file
215
src/views/datawashing/deEmphasisRules/index.vue
Normal file
|
@ -0,0 +1,215 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="30">
|
||||
<a-col :md="20">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" size="large"
|
||||
v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
<a-select-option v-for="item in dataTypeList" :value="item.enName">
|
||||
{{ item.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="表名">
|
||||
<a-input placeholder="请输入表名" v-model="queryParam.tableName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24" style="text-align: right;">
|
||||
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<a-row :gutter="30" style="padding: 0 10px;">
|
||||
<a-col :md="24">
|
||||
<div class="linese"></div>
|
||||
<!-- 表格区域 -->
|
||||
<div style="height:calc(100vh - 316px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||
:pagination="pagination" :scroll="{ y: 'calc(100vh - 380px)' }" rowKey="id"
|
||||
@change="handleTableChange">
|
||||
<!-- <span slot="createTime" slot-scope="text, record">
|
||||
{{ moment(text).format('YYYY-MM-DD') }}
|
||||
</span> -->
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record.id)">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleRemove(record.id)">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<rulesModel ref="modalForm" @fatherMethod="getQueryPage" />
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { deleteRules, queryPage } from '@/api/deEmphasisRules'
|
||||
import { dataTypeQueryAll } from '@/api/dataType'
|
||||
import rulesModel from './modules/rulesModel.vue'
|
||||
export default {
|
||||
name: "deEmphasisRules",
|
||||
components: {
|
||||
rulesModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
tableName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
defaultPageSize: 10, // 默认当前页显示数据的大小total: 0, // 总数,必须先有
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: false,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||
},
|
||||
dataTypeList: [],
|
||||
dataSource: [],
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
width: 70,
|
||||
customRender: (text, record, index) => `${index + 1}`,
|
||||
},
|
||||
{
|
||||
title: '表名',
|
||||
align: "center",
|
||||
dataIndex: 'tableName',
|
||||
},
|
||||
{
|
||||
title: '报文名称',
|
||||
align: "center",
|
||||
dataIndex: 'msgName',
|
||||
},
|
||||
{
|
||||
title: '判定字段',
|
||||
align: "center",
|
||||
dataIndex: 'judgmentField',
|
||||
},
|
||||
{
|
||||
title: '去重类型',
|
||||
align: "center",
|
||||
dataIndex: 'duplicationType',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
align: "center",
|
||||
dataIndex: 'createTime',
|
||||
scopedSlots: { customRender: 'createTime' },
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 130,
|
||||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getQueryPage()
|
||||
this.getDataType()
|
||||
},
|
||||
methods: {
|
||||
getDataType() {
|
||||
dataTypeQueryAll().then(res => {
|
||||
if (res.code == 200) this.dataTypeList = res.result
|
||||
})
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
this.pagination = pagination
|
||||
this.queryParam.pageNum = pagination.current - 1
|
||||
this.queryParam.pageSize = pagination.pageSize
|
||||
this.getQueryPage()
|
||||
},
|
||||
getQueryPage() {
|
||||
queryPage(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
const pagination = { ...this.pagination }
|
||||
pagination.total = res.result.total
|
||||
this.dataSource = res.result.rows
|
||||
this.pagination = pagination
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add();
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(recordId) {
|
||||
this.$refs.modalForm.eidt(recordId);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
console.log('dfs', recordId)
|
||||
const _that = this
|
||||
_that.$confirm({
|
||||
title: '你确认执行删除操作吗?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk() {
|
||||
console.log('dfs', recordId)
|
||||
deleteRules({ id: recordId }).then(res => {
|
||||
if (res.code === 200) {
|
||||
_that.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
_that.getQueryPage()
|
||||
} else {
|
||||
_that.$notification.warning({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() { }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
151
src/views/datawashing/deEmphasisRules/modules/rulesModel.vue
Normal file
151
src/views/datawashing/deEmphasisRules/modules/rulesModel.vue
Normal file
|
@ -0,0 +1,151 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk"
|
||||
@cancel="handleCancel" okText="保存" cancelText="关闭">
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model ref="ruleForm" :model="form" :rules="rules">
|
||||
<a-form-model-item label="表名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tableName">
|
||||
<a-input v-model="form.tableName" placeholder="请输入"></a-input>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="去重类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="duplicationType">
|
||||
<a-select v-model="form.duplicationType" @change="handleChange">
|
||||
<a-select-option :value="1">
|
||||
完全去重
|
||||
</a-select-option>
|
||||
<a-select-option :value="2">
|
||||
关键列去重
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="判定字段" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input v-if="form.duplicationType == 1" disabled v-model="allText" placeholder="请输入"></a-input>
|
||||
<a-tree-select v-if="form.duplicationType == 2" v-model="this.form.judgmentField"
|
||||
style="width: 100%" :tree-data="treeData" tree-checkable :show-checked-strategy="SHOW_PARENT"
|
||||
search-placeholder="请选项" />
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JCron from "@/components/jeecg/JCron";
|
||||
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
|
||||
import { createRules, updateRules, queryById, querytableColumns } from '@/api/deEmphasisRules'
|
||||
|
||||
|
||||
export default {
|
||||
name: "rulesModal",
|
||||
components: {
|
||||
JCron,
|
||||
JSelectMultiple
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: "操作",
|
||||
allText: 'ALL',
|
||||
visible: false,
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
form: {
|
||||
tableName: null,
|
||||
duplicationType: null,
|
||||
judgmentField: null
|
||||
},
|
||||
rules: {
|
||||
tableName: [{ required: true, message: '请输入表名', trigger: 'blur' }],
|
||||
duplicationType: [{ required: true, message: '请选择去重类型', trigger: 'change' }]
|
||||
},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
treeData: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.loadData();
|
||||
},
|
||||
methods: {
|
||||
handleChange(value) {
|
||||
if (value == 1) {
|
||||
this.form.judgmentField = 'ALL'
|
||||
} else {
|
||||
|
||||
}
|
||||
},
|
||||
add() {
|
||||
this.form = {
|
||||
tableName: null,
|
||||
duplicationType: 1,
|
||||
judgmentField: null
|
||||
}
|
||||
this.visible = true;
|
||||
},
|
||||
eidt(recordId) {
|
||||
queryById({ id: recordId }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.form = res.result
|
||||
this.visible = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.confirmLoading = true;
|
||||
if (!this.form.id) {
|
||||
createRules(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
this.confirmLoading = false
|
||||
this.$emit('fatherMethod')
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: '操作失败'
|
||||
})
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
updateRules(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
this.confirmLoading = false
|
||||
this.$emit('fatherMethod')
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: '操作失败'
|
||||
})
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
238
src/views/datawashing/missingvalueRules/index.vue
Normal file
238
src/views/datawashing/missingvalueRules/index.vue
Normal file
|
@ -0,0 +1,238 @@
|
|||
<template>
|
||||
<a-card :bordered="false">
|
||||
<!-- 查询区域 -->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="30">
|
||||
<a-col :md="20">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="数据类型">
|
||||
<a-select placeholder="选择数据类型" option-filter-prop="children" size="large"
|
||||
v-model="queryParam.dataType" @change="handleTypeChange">
|
||||
<a-select-option v-for="item in dataTypeList" :value="item.enName">
|
||||
{{ item.cnName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="表名">
|
||||
<a-input placeholder="请输入表名" v-model="queryParam.tableName" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24" style="text-align: right;">
|
||||
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<a-row :gutter="30" style="padding: 0 10px;">
|
||||
<a-col :md="24">
|
||||
<div class="linese"></div>
|
||||
<!-- 表格区域 -->
|
||||
<div style="height:calc(100vh - 316px);background: #e6e9f1;overflow:hidden;padding: 15px;">
|
||||
<a-table size="middle" bordered :columns="columns" :data-source="dataSource" :loading="loading"
|
||||
:pagination="pagination" :scroll="{ y: 'calc(100vh - 380px)' }" rowKey="id"
|
||||
@change="handleTableChange">
|
||||
<!-- <span slot="createTime" slot-scope="text, record">
|
||||
{{ moment(text).format('YYYY-MM-DD') }}
|
||||
</span> -->
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record.id)">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleRemove(record.id)">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="linese"></div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<rulesModel ref="modalForm" @fatherMethod="getQueryPage" />
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { deleteRules, queryPage } from '@/api/missingvalueRules'
|
||||
import { dataTypeQueryAll } from '@/api/dataType'
|
||||
import rulesModel from './rulesModel.vue'
|
||||
export default {
|
||||
name: "missingvalueRules",
|
||||
components: {
|
||||
rulesModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
loading: false,
|
||||
// 查询条件
|
||||
queryParam: {
|
||||
dataType: 'biandui',
|
||||
tableName: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
pagination: {
|
||||
defaultCurrent: 1, // 默认当前页数
|
||||
defaultPageSize: 10, // 默认当前页显示数据的大小total: 0, // 总数,必须先有
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: false,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: total => `总共 ${total} 个项目`, // 显示总数
|
||||
onShowSizeChange: (current, pageSize) => (this.pageSize = pageSize)
|
||||
},
|
||||
dataTypeList: [],
|
||||
dataSource: [],
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
width: 70,
|
||||
customRender: (text, record, index) => `${index + 1}`,
|
||||
},
|
||||
{
|
||||
title: '表名',
|
||||
align: "center",
|
||||
dataIndex: 'tableName',
|
||||
},
|
||||
{
|
||||
title: '报文名称',
|
||||
align: "center",
|
||||
dataIndex: 'msgName',
|
||||
},
|
||||
// {
|
||||
// title: '字符串策略',
|
||||
// align: "center",
|
||||
// width: 110,
|
||||
// dataIndex: 'stringStrategy',
|
||||
// },
|
||||
{
|
||||
title: '字符串策略',
|
||||
align: "center",
|
||||
dataIndex: 'stringStrategyDescribe',
|
||||
},
|
||||
// {
|
||||
// title: '数值策略',
|
||||
// align: "center",
|
||||
// width: 100,
|
||||
// dataIndex: 'digitStrategy',
|
||||
// },
|
||||
{
|
||||
title: '数值策略',
|
||||
align: "center",
|
||||
dataIndex: 'digitStrategyDescribe',
|
||||
},
|
||||
// {
|
||||
// title: '时间策略',
|
||||
// align: "center",
|
||||
// width: 100,
|
||||
// dataIndex: 'dateTimeStrategy',
|
||||
// },
|
||||
{
|
||||
title: '时间策略',
|
||||
align: "center",
|
||||
dataIndex: 'dateTimeStrategyDescribe',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
align: "center",
|
||||
dataIndex: 'createTime',
|
||||
scopedSlots: { customRender: 'createTime' },
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 130,
|
||||
align: "center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getQueryPage()
|
||||
this.getDataType()
|
||||
},
|
||||
methods: {
|
||||
getDataType() {
|
||||
dataTypeQueryAll().then(res => {
|
||||
if (res.code == 200) this.dataTypeList = res.result
|
||||
})
|
||||
},
|
||||
handleTypeChange(value) {
|
||||
this.queryParam.dataType = value
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
this.pagination = pagination
|
||||
this.queryParam.pageNum = pagination.current - 1
|
||||
this.queryParam.pageSize = pagination.pageSize
|
||||
this.getQueryPage()
|
||||
},
|
||||
getQueryPage() {
|
||||
queryPage(this.queryParam).then(res => {
|
||||
if (res.code == 200) {
|
||||
const pagination = { ...this.pagination }
|
||||
pagination.total = res.result.total
|
||||
this.dataSource = res.result.rows
|
||||
this.pagination = pagination
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add();
|
||||
this.$refs.modalForm.title = "新增";
|
||||
},
|
||||
handleEdit(recordId) {
|
||||
this.$refs.modalForm.eidt(recordId);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
},
|
||||
handleRemove(recordId) {
|
||||
console.log('dfs', recordId)
|
||||
const _that = this
|
||||
_that.$confirm({
|
||||
title: '你确认执行删除操作吗?',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk() {
|
||||
console.log('dfs', recordId)
|
||||
deleteRules({ id: recordId }).then(res => {
|
||||
if (res.code === 200) {
|
||||
_that.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
_that.getQueryPage()
|
||||
} else {
|
||||
_that.$notification.warning({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onCancel() { }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
153
src/views/datawashing/missingvalueRules/rulesModel.vue
Normal file
153
src/views/datawashing/missingvalueRules/rulesModel.vue
Normal file
|
@ -0,0 +1,153 @@
|
|||
<template>
|
||||
<a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" @ok="handleOk"
|
||||
@cancel="handleCancel" okText="保存" cancelText="关闭">
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model ref="ruleForm" :model="form" :rules="rules">
|
||||
<a-form-model-item label="表名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tableName">
|
||||
<a-input v-model="form.tableName" placeholder="请输入"></a-input>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="字符串策略" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stringStrategy">
|
||||
<a-select v-model="form.stringStrategy">
|
||||
<a-select-option :value="1">直接删除</a-select-option>
|
||||
<a-select-option :value="2">复制上条数据</a-select-option>
|
||||
<a-select-option :value="3">复制下条数据</a-select-option>
|
||||
<a-select-option :value="4">空</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="数值策略" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="digitStrategy">
|
||||
<a-select v-model="form.digitStrategy">
|
||||
<a-select-option :value="1">直接删除</a-select-option>
|
||||
<a-select-option :value="2">复制上条数据</a-select-option>
|
||||
<a-select-option :value="3">复制下条数据</a-select-option>
|
||||
<a-select-option :value="4">前后均值填充</a-select-option>
|
||||
<a-select-option :value="5">填0</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="时间策略" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dateTimeStrategy">
|
||||
<a-select v-model="form.dateTimeStrategy">
|
||||
<a-select-option :value="1">直接删除</a-select-option>
|
||||
<a-select-option :value="2">前后均值填充</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JCron from "@/components/jeecg/JCron";
|
||||
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
|
||||
import { createRules, updateRules, queryById } from '@/api/missingvalueRules'
|
||||
|
||||
|
||||
export default {
|
||||
name: "rulesModal",
|
||||
components: {
|
||||
JCron,
|
||||
JSelectMultiple
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: "操作",
|
||||
visible: false,
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
form: {
|
||||
tableName: null,
|
||||
stringStrategy: null,
|
||||
digitStrategy: null,
|
||||
dateTimeStrategy: null
|
||||
},
|
||||
rules: {
|
||||
tableName: [{ required: true, message: '请输入表名', trigger: 'blur' }],
|
||||
stringStrategy: [{ required: true, message: '请选择字符串策略', trigger: 'change' }],
|
||||
digitStrategy: [{ required: true, message: '请选择数值策略', trigger: 'change' }],
|
||||
dateTimeStrategy: [{ required: true, message: '请选择时间策略', trigger: 'change' }]
|
||||
},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
treeData: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
this.form = {
|
||||
tableName: null,
|
||||
stringStrategy: null,
|
||||
digitStrategy: null,
|
||||
dateTimeStrategy: null
|
||||
}
|
||||
this.visible = true;
|
||||
},
|
||||
eidt(recordId) {
|
||||
queryById({ id: recordId }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.form = res.result
|
||||
this.visible = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.visible = false;
|
||||
},
|
||||
handleOk() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.confirmLoading = true;
|
||||
if (!this.form.id) {
|
||||
createRules(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
this.confirmLoading = false
|
||||
this.$emit('fatherMethod')
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: '操作失败'
|
||||
})
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
updateRules(this.form).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$notification.success({
|
||||
message: '系统提示',
|
||||
description: res.message
|
||||
})
|
||||
this.confirmLoading = false
|
||||
this.$emit('fatherMethod')
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$notification.error({
|
||||
message: '系统提示',
|
||||
description: '操作失败'
|
||||
})
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -230,7 +230,7 @@ export default {
|
|||
description: `${timeFix()},欢迎回来`,
|
||||
})
|
||||
this.loginBtn = false
|
||||
this.$router.push({ path: '/dashboard/analysis' }).then(() => {
|
||||
this.$router.push({ path: '/home/index' }).then(() => {
|
||||
console.log('222')
|
||||
}).catch(() => {
|
||||
console.log('登录跳转首页出错,这个错误从哪里来的')
|
||||
|
|
|
@ -183,7 +183,7 @@ export const JeecgThirdLoginMixin = {
|
|||
// update-begin- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击
|
||||
// this.loginBtn = false
|
||||
// update-end- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击
|
||||
this.$router.push({ path: "/dashboard/analysis" }).catch(()=>{
|
||||
this.$router.push({ path: "/home/index" }).catch(()=>{
|
||||
console.log('登录跳转首页出错,这个错误从哪里来的')
|
||||
})
|
||||
this.$notification.success({
|
||||
|
|
Loading…
Reference in New Issue
Block a user