提交去重和缺失值
This commit is contained in:
parent
79aa645817
commit
7f63280582
|
@ -28,9 +28,9 @@
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="24" style="text-align: right;">
|
<!-- <a-col :md="6" :sm="24" style="text-align: right;">
|
||||||
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
||||||
</a-col>
|
</a-col> -->
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,9 +47,9 @@
|
||||||
{{ moment(text).format('YYYY-MM-DD') }}
|
{{ moment(text).format('YYYY-MM-DD') }}
|
||||||
</span> -->
|
</span> -->
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record.id)">编辑</a>
|
<a @click="handleEdit(record)">配置</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" v-if="record.id" />
|
||||||
<a @click="handleRemove(record.id)">删除</a>
|
<a v-if="record.id" @click="handleRemove(record.id)">删除</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -178,10 +178,11 @@ export default {
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.modalForm.add();
|
this.$refs.modalForm.add();
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = "新增";
|
||||||
|
this.$refs.modalForm.dataType = this.queryParam.dataType
|
||||||
},
|
},
|
||||||
handleEdit(recordId) {
|
handleEdit(record) {
|
||||||
this.$refs.modalForm.eidt(recordId);
|
this.$refs.modalForm.eidt(record.tableName, this.queryParam.dataType);
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = "配置";
|
||||||
},
|
},
|
||||||
handleRemove(recordId) {
|
handleRemove(recordId) {
|
||||||
console.log('dfs', recordId)
|
console.log('dfs', recordId)
|
||||||
|
|
|
@ -19,9 +19,10 @@
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
<a-form-model-item label="判定字段" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-model-item label="判定字段" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input v-if="form.duplicationType == 1" disabled v-model="allText" placeholder="请输入"></a-input>
|
<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"
|
<a-tree-select v-if="form.duplicationType == 2" v-model="checkedList" style="width: 100%"
|
||||||
style="width: 100%" :tree-data="treeData" tree-checkable :show-checked-strategy="SHOW_PARENT"
|
:tree-data="treeData" multiple :show-checked-strategy="SHOW_PARENT"
|
||||||
search-placeholder="请选项" />
|
search-placeholder="请选项" />
|
||||||
|
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
|
@ -32,7 +33,8 @@
|
||||||
import JCron from "@/components/jeecg/JCron";
|
import JCron from "@/components/jeecg/JCron";
|
||||||
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
|
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
|
||||||
import { createRules, updateRules, queryById, querytableColumns } from '@/api/deEmphasisRules'
|
import { createRules, updateRules, queryById, querytableColumns } from '@/api/deEmphasisRules'
|
||||||
|
import { TreeSelect } from 'ant-design-vue';
|
||||||
|
const SHOW_PARENT = TreeSelect.SHOW_PARENT;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "rulesModal",
|
name: "rulesModal",
|
||||||
|
@ -42,14 +44,16 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
SHOW_PARENT,
|
||||||
title: "操作",
|
title: "操作",
|
||||||
allText: 'ALL',
|
allText: 'ALL',
|
||||||
|
dataType: null,
|
||||||
visible: false,
|
visible: false,
|
||||||
model: {},
|
model: {},
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: {
|
form: {
|
||||||
tableName: null,
|
tableName: null,
|
||||||
duplicationType: null,
|
duplicationType: 1,
|
||||||
judgmentField: null
|
judgmentField: null
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
@ -64,13 +68,27 @@ export default {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 16 },
|
sm: { span: 16 },
|
||||||
},
|
},
|
||||||
treeData: []
|
treeData: [],
|
||||||
|
checkedList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.loadData();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getQuerytableColumns(dataType, tableName) {
|
||||||
|
querytableColumns({ dataType: dataType, tableName: tableName }).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.treeData = []
|
||||||
|
res.result.forEach(element => {
|
||||||
|
this.treeData.push({
|
||||||
|
title: element,
|
||||||
|
value: element,
|
||||||
|
key: element,
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
if (value == 1) {
|
if (value == 1) {
|
||||||
this.form.judgmentField = 'ALL'
|
this.form.judgmentField = 'ALL'
|
||||||
|
@ -86,13 +104,10 @@ export default {
|
||||||
}
|
}
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
eidt(recordId) {
|
eidt(tableName, dataType) {
|
||||||
queryById({ id: recordId }).then(res => {
|
this.form.tableName = tableName
|
||||||
if (res.code == 200) {
|
this.getQuerytableColumns(dataType, tableName)
|
||||||
this.form = res.result
|
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
@ -101,25 +116,9 @@ export default {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.confirmLoading = true;
|
this.confirmLoading = true;
|
||||||
if (!this.form.id) {
|
this.form.judgmentField = this.checkedList.join(',')
|
||||||
createRules(this.form).then(res => {
|
|
||||||
if (res.code === 200) {
|
console.log('提交', this.form)
|
||||||
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 => {
|
updateRules(this.form).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$notification.success({
|
this.$notification.success({
|
||||||
|
@ -132,13 +131,12 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$notification.error({
|
this.$notification.error({
|
||||||
message: '系统提示',
|
message: '系统提示',
|
||||||
description: '操作失败'
|
description: res.message
|
||||||
})
|
})
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
|
@ -148,4 +146,4 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
|
|
@ -28,9 +28,9 @@
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
<a-button type="primary" style="left: 10px" icon="search" @click="getQueryPage">查询</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="24" style="text-align: right;">
|
<!-- <a-col :md="6" :sm="24" style="text-align: right;">
|
||||||
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
<a-button type="primary" style="right: 10px" icon="plus" @click="handleAdd">新建</a-button>
|
||||||
</a-col>
|
</a-col> -->
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,9 +47,9 @@
|
||||||
{{ moment(text).format('YYYY-MM-DD') }}
|
{{ moment(text).format('YYYY-MM-DD') }}
|
||||||
</span> -->
|
</span> -->
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record.id)">编辑</a>
|
<a @click="handleEdit(record)">配置</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider v-if="record.id" type="vertical" />
|
||||||
<a @click="handleRemove(record.id)">删除</a>
|
<a v-if="record.id" @click="handleRemove(record.id)">删除</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -202,9 +202,9 @@ export default {
|
||||||
this.$refs.modalForm.add();
|
this.$refs.modalForm.add();
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = "新增";
|
||||||
},
|
},
|
||||||
handleEdit(recordId) {
|
handleEdit(record) {
|
||||||
this.$refs.modalForm.eidt(recordId);
|
this.$refs.modalForm.eidt(record);
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = "配置";
|
||||||
},
|
},
|
||||||
handleRemove(recordId) {
|
handleRemove(recordId) {
|
||||||
console.log('dfs', recordId)
|
console.log('dfs', recordId)
|
||||||
|
|
|
@ -88,13 +88,23 @@ export default {
|
||||||
}
|
}
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
eidt(recordId) {
|
eidt(record) {
|
||||||
queryById({ id: recordId }).then(res => {
|
if (record.id) {
|
||||||
|
queryById({ id: record.id }).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.form = res.result
|
this.form = res.result
|
||||||
this.visible = true;
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.form = {
|
||||||
|
tableName: null,
|
||||||
|
stringStrategy: null,
|
||||||
|
digitStrategy: null,
|
||||||
|
dateTimeStrategy: null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.visible = true;
|
||||||
|
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user