Commit a9ce480c by yuwei

项目初始化

parent 2cfaf97b
...@@ -53,9 +53,7 @@ public class RabbitMqListenerConfig { ...@@ -53,9 +53,7 @@ public class RabbitMqListenerConfig {
mappingHandlerMapping.unregisterMapping(dataApiEntity); mappingHandlerMapping.unregisterMapping(dataApiEntity);
} }
} }
// 手动确认 } catch (Exception e) {
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
}catch (Exception e){
log.error("全局异常信息ex={}, StackTrace={}", e.getMessage(), ThrowableUtil.getStackTrace(e)); log.error("全局异常信息ex={}, StackTrace={}", e.getMessage(), ThrowableUtil.getStackTrace(e));
if (message.getMessageProperties().getRedelivered()){ if (message.getMessageProperties().getRedelivered()){
log.error("消息已处理,请勿重复处理!"); log.error("消息已处理,请勿重复处理!");
...@@ -67,6 +65,9 @@ public class RabbitMqListenerConfig { ...@@ -67,6 +65,9 @@ public class RabbitMqListenerConfig {
//第一个参数为消息的index,第二个参数是是否批量处理,第三个参数为是否让被拒绝的消息重新入队列 //第一个参数为消息的index,第二个参数是是否批量处理,第三个参数为是否让被拒绝的消息重新入队列
channel.basicNack(message.getMessageProperties().getDeliveryTag(), false, false); channel.basicNack(message.getMessageProperties().getDeliveryTag(), false, false);
} }
} finally {
// 手动确认
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
} }
} }
} }
...@@ -45,9 +45,7 @@ public class RabbitMqListenerConfig { ...@@ -45,9 +45,7 @@ public class RabbitMqListenerConfig {
model.setId(businessKey); model.setId(businessKey);
model.setFlowStatus(flowStatus); model.setFlowStatus(flowStatus);
modelDao.updateById(model); modelDao.updateById(model);
// 手动确认 } catch (Exception e) {
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
}catch (Exception e){
log.error("全局异常信息ex={}, StackTrace={}", e.getMessage(), ThrowableUtil.getStackTrace(e)); log.error("全局异常信息ex={}, StackTrace={}", e.getMessage(), ThrowableUtil.getStackTrace(e));
if (message.getMessageProperties().getRedelivered()){ if (message.getMessageProperties().getRedelivered()){
log.error("消息已处理,请勿重复处理!"); log.error("消息已处理,请勿重复处理!");
...@@ -59,6 +57,9 @@ public class RabbitMqListenerConfig { ...@@ -59,6 +57,9 @@ public class RabbitMqListenerConfig {
//第一个参数为消息的index,第二个参数是是否批量处理,第三个参数为是否让被拒绝的消息重新入队列 //第一个参数为消息的index,第二个参数是是否批量处理,第三个参数为是否让被拒绝的消息重新入队列
channel.basicNack(message.getMessageProperties().getDeliveryTag(), false, false); channel.basicNack(message.getMessageProperties().getDeliveryTag(), false, false);
} }
} finally {
// 手动确认
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
} }
} }
} }
...@@ -285,7 +285,7 @@ export default { ...@@ -285,7 +285,7 @@ export default {
showAdd: false, showAdd: false,
showEdit: false, showEdit: false,
showDetail: false, showDetail: false,
showCall: false showExample: false
}, },
// 保存按钮 // 保存按钮
loadingOptions: { loadingOptions: {
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{ title }}</span> <span>{{ title }}</span>
<el-button-group style="float: right;"> <el-button-group style="float: right;">
<el-button size="mini" icon="el-icon-coin" type="primary" round @click="handleWord">接口文档</el-button> <el-button size="mini" icon="el-icon-coin" round @click="handleWord">接口文档</el-button>
<el-button size="mini" icon="el-icon-s-data" round @click="apiTry">接口示例</el-button> <el-button size="mini" icon="el-icon-s-data" round @click="handleExample">接口示例</el-button>
<el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button> <el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button>
</el-button-group> </el-button-group>
</div> </div>
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
showAdd: false, showAdd: false,
showEdit: false, showEdit: false,
showDetail: false, showDetail: false,
showCall: false showExample: false
}, },
active: 1, active: 1,
// 表单参数 // 表单参数
...@@ -421,13 +421,13 @@ export default { ...@@ -421,13 +421,13 @@ export default {
}) || [] }) || []
} }
}, },
apiTry() { handleExample() {
this.showOptions.data.id = this.data.id this.showOptions.data.id = this.data.id
this.showOptions.showList = false this.showOptions.showList = false
this.showOptions.showAdd = false this.showOptions.showAdd = false
this.showOptions.showEdit = false this.showOptions.showEdit = false
this.showOptions.showDetail = false this.showOptions.showDetail = false
this.showOptions.showCall = true this.showOptions.showExample = true
this.$emit('showCard', this.showOptions) this.$emit('showCard', this.showOptions)
}, },
/** 接口文档 */ /** 接口文档 */
......
...@@ -285,7 +285,7 @@ export default { ...@@ -285,7 +285,7 @@ export default {
showAdd: false, showAdd: false,
showEdit: false, showEdit: false,
showDetail: false, showDetail: false,
showCall: false showExample: false
}, },
// 保存按钮 // 保存按钮
loadingOptions: { loadingOptions: {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{ title }}</span> <span>{{ title }}</span>
<el-button-group style="float: right;"> <el-button-group style="float: right;">
<el-button size="mini" icon="el-icon-s-data" round @click="apiDataCall">接口调用</el-button> <el-button size="mini" icon="el-icon-s-data" round @click="handleCall">接口调用</el-button>
<el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button> <el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button>
</el-button-group> </el-button-group>
</div> </div>
...@@ -165,7 +165,7 @@ import { getDataApiDetail } from '@/api/market/dataapi' ...@@ -165,7 +165,7 @@ import { getDataApiDetail } from '@/api/market/dataapi'
import { getApiCall, postApiCall } from '@/api/market/apimapping' import { getApiCall, postApiCall } from '@/api/market/apimapping'
export default { export default {
name: 'DataApiCall', name: 'DataApiExample',
props: { props: {
data: { data: {
type: Object, type: Object,
...@@ -184,7 +184,7 @@ export default { ...@@ -184,7 +184,7 @@ export default {
showAdd: false, showAdd: false,
showEdit: false, showEdit: false,
showDetail: false, showDetail: false,
showCall: false showExample: false
}, },
activeTabName: 'table0', activeTabName: 'table0',
form: {}, form: {},
...@@ -239,13 +239,13 @@ export default { ...@@ -239,13 +239,13 @@ export default {
handleSizeChange(val) { handleSizeChange(val) {
this.callData.pageNum = 1 this.callData.pageNum = 1
this.callData.pageSize = val this.callData.pageSize = val
this.apiDataCall() this.handleCall()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.callData.pageNum = val this.callData.pageNum = val
this.apiDataCall() this.handleCall()
}, },
apiDataCall() { handleCall() {
const url = 'services/' + this.form.apiVersion + this.form.apiUrl const url = 'services/' + this.form.apiVersion + this.form.apiUrl
const header = { api_key: this.apiHeader.apiKey, secret_key: this.apiHeader.secretKey } const header = { api_key: this.apiHeader.apiKey, secret_key: this.apiHeader.secretKey }
const data = {} const data = {}
......
...@@ -127,14 +127,14 @@ ...@@ -127,14 +127,14 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-upload2" icon="el-icon-upload2"
@click="handleRegister(scope.row)" @click="handleRelease(scope.row)"
>发布</el-button> >发布</el-button>
<el-button <el-button
:disabled="scope.row.status !== '2'" :disabled="scope.row.status !== '2'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-download" icon="el-icon-download"
@click="handleUnRegister(scope.row)" @click="handleCancel(scope.row)"
>注销</el-button> >注销</el-button>
<el-button slot="reference">操作</el-button> <el-button slot="reference">操作</el-button>
</el-popover> </el-popover>
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
showAdd: false, showAdd: false,
showEdit: false, showEdit: false,
showDetail: false, showDetail: false,
showCall: false showExample: false
}, },
// 遮罩层 // 遮罩层
loading: true, loading: true,
...@@ -269,7 +269,7 @@ export default { ...@@ -269,7 +269,7 @@ export default {
this.showOptions.showAdd = true this.showOptions.showAdd = true
this.showOptions.showEdit = false this.showOptions.showEdit = false
this.showOptions.showDetail = false this.showOptions.showDetail = false
this.showOptions.showCall = false this.showOptions.showExample = false
this.$emit('showCard', this.showOptions) this.$emit('showCard', this.showOptions)
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
...@@ -279,7 +279,7 @@ export default { ...@@ -279,7 +279,7 @@ export default {
this.showOptions.showAdd = false this.showOptions.showAdd = false
this.showOptions.showEdit = true this.showOptions.showEdit = true
this.showOptions.showDetail = false this.showOptions.showDetail = false
this.showOptions.showCall = false this.showOptions.showExample = false
this.$emit('showCard', this.showOptions) this.$emit('showCard', this.showOptions)
}, },
/** 详情按钮操作 */ /** 详情按钮操作 */
...@@ -289,7 +289,7 @@ export default { ...@@ -289,7 +289,7 @@ export default {
this.showOptions.showAdd = false this.showOptions.showAdd = false
this.showOptions.showEdit = false this.showOptions.showEdit = false
this.showOptions.showDetail = true this.showOptions.showDetail = true
this.showOptions.showCall = false this.showOptions.showExample = false
this.$emit('showCard', this.showOptions) this.$emit('showCard', this.showOptions)
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
...@@ -318,7 +318,7 @@ export default { ...@@ -318,7 +318,7 @@ export default {
}) })
}, },
/** 接口发布 */ /** 接口发布 */
handleRegister(row) { handleRelease(row) {
releaseDataApi(row.id).then(response => { releaseDataApi(row.id).then(response => {
if (response.success) { if (response.success) {
this.$message.success('接口发布成功') this.$message.success('接口发布成功')
...@@ -327,7 +327,7 @@ export default { ...@@ -327,7 +327,7 @@ export default {
}) })
}, },
/** 接口注销 */ /** 接口注销 */
handleUnRegister(row) { handleCancel(row) {
cancelDataApi(row.id).then(response => { cancelDataApi(row.id).then(response => {
if (response.success) { if (response.success) {
this.$message.success('接口注销成功') this.$message.success('接口注销成功')
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<data-api-detail v-if="options.showDetail" :data="options.data" @showCard="showCard"></data-api-detail> <data-api-detail v-if="options.showDetail" :data="options.data" @showCard="showCard"></data-api-detail>
</transition> </transition>
<transition name="el-zoom-in-bottom"> <transition name="el-zoom-in-bottom">
<data-api-call v-if="options.showCall" :data="options.data" @showCard="showCard"></data-api-call> <data-api-example v-if="options.showExample" :data="options.data" @showCard="showCard"></data-api-example>
</transition> </transition>
</div> </div>
</template> </template>
...@@ -23,11 +23,11 @@ import DataApiList from './DataApiList' ...@@ -23,11 +23,11 @@ import DataApiList from './DataApiList'
import DataApiAdd from './DataApiAdd' import DataApiAdd from './DataApiAdd'
import DataApiEdit from './DataApiEdit' import DataApiEdit from './DataApiEdit'
import DataApiDetail from './DataApiDetail' import DataApiDetail from './DataApiDetail'
import DataApiCall from './DataApiCall' import DataApiExample from './DataApiExample'
export default { export default {
name: 'DataApi', name: 'DataApi',
components: { DataApiList, DataApiAdd, DataApiEdit, DataApiDetail, DataApiCall }, components: { DataApiList, DataApiAdd, DataApiEdit, DataApiDetail, DataApiExample },
data () { data () {
return { return {
options: { options: {
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
showAdd: false, showAdd: false,
showEdit: false, showEdit: false,
showDetail: false, showDetail: false,
showCall: false showExample: false
} }
} }
}, },
......
<template> <template>
<div class="app-container"> <div class="app-container">
<transition name="el-zoom-in-center"> <transition name="el-zoom-in-center">
<change-record-list v-if="options.showList" @showCard="showCard"></change-record-list> <change-record-list v-if="options.showList" @showCard="showCard" />
</transition> </transition>
<transition name="el-zoom-in-top"> <transition name="el-zoom-in-top">
<change-record-add v-if="options.showAdd" :data="options.data" @showCard="showCard"></change-record-add> <change-record-add v-if="options.showAdd" :data="options.data" @showCard="showCard" />
</transition> </transition>
<transition name="el-zoom-in-top"> <transition name="el-zoom-in-top">
<change-record-edit v-if="options.showEdit" :data="options.data" @showCard="showCard"></change-record-edit> <change-record-edit v-if="options.showEdit" :data="options.data" @showCard="showCard" />
</transition> </transition>
<transition name="el-zoom-in-bottom"> <transition name="el-zoom-in-bottom">
<change-record-detail v-if="options.showDetail" :data="options.data" @showCard="showCard"></change-record-detail> <change-record-detail v-if="options.showDetail" :data="options.data" @showCard="showCard" />
</transition> </transition>
</div> </div>
</template> </template>
...@@ -24,7 +24,7 @@ import ChangeRecordDetail from './ChangeRecordDetail' ...@@ -24,7 +24,7 @@ import ChangeRecordDetail from './ChangeRecordDetail'
export default { export default {
name: 'ChangeRecord', name: 'ChangeRecord',
components: { ChangeRecordList, ChangeRecordAdd, ChangeRecordEdit, ChangeRecordDetail }, components: { ChangeRecordList, ChangeRecordAdd, ChangeRecordEdit, ChangeRecordDetail },
data () { data() {
return { return {
options: { options: {
data: {}, data: {},
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
} }
}, },
methods: { methods: {
showCard (data) { showCard(data) {
Object.assign(this.options, data) Object.assign(this.options, data)
} }
} }
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{ title }}</span> <span>{{ title }}</span>
<el-button-group style="float: right;"> <el-button-group style="float: right;">
<el-button :disabled="form.sourceSync === 1" size="mini" icon="el-icon-coin" type="primary" round @click="handleSync">元数据同步</el-button> <el-button v-if="form.isSync === '0'" size="mini" icon="el-icon-coin" round @click="handleSync">元数据同步</el-button>
<el-button :disabled="form.sourceSync === 0" size="mini" icon="el-icon-coin" type="primary" round @click="handleWord">数据库文档</el-button> <el-button v-if="form.isSync === '1'" size="mini" icon="el-icon-coin" round @click="handleWord">数据库文档</el-button>
<el-button size="mini" icon="el-icon-coin" type="primary" round @click="handleCheckConnection">连通性检测</el-button> <el-button size="mini" icon="el-icon-coin" round @click="handleCheckConnection">连通性检测</el-button>
<el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button> <el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button>
</el-button-group> </el-button-group>
</div> </div>
......
<template>
<div class="app-container">
<el-card class="box-card" shadow="always">
<div slot="header" class="clearfix">
<el-form ref="queryForm" :model="queryParams" :inline="true" class="form-inline">
<el-form-item label="时间">
<el-date-picker
v-model="queryParams.checkDate"
type="date"
:clearable="false"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:picker-options="pickerOption"
placeholder="选择日期"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
</el-form-item>
</el-form>
</div>
<div class="body-wrapper">
<h4 style="text-align: center;">{{date}}质量分析报告</h4>
<el-divider content-position="left"><h3>错误量统计分析</h3></el-divider>
<el-row :gutter="20">
<el-col :span="10">
<h5>按数据源统计错误数量</h5>
<el-table
:data="reportTableData1"
:span-method="objectSpanMethod1"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleLevelName" label="规则级别" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center">
<template scope="scope">
<el-progress :percentage="scope.row.checkErrorCount" :stroke-width="20" :text-inside="true" :color="colorFormat(scope.row.ruleLevelName)" :format="cellFormat" />
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="10" :offset="4">
<h5>按规则类型统计错误数量</h5>
<el-table
:data="reportTableData2"
:span-method="objectSpanMethod2"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleTypeName" label="规则类型" align="center" />
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center">
<template scope="scope">
<el-badge :value="scope.row.ruleLevelName" :type="typeFormat(scope.row.ruleLevelName)">
{{ scope.row.checkErrorCount }}
</el-badge>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<el-divider content-position="left"><h3>{{ date }}规则类型统计分析</h3></el-divider>
<el-row>
<el-col :span="24">
<h5>唯一性分析</h5>
<el-table
:data="uniqueTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<h5>完整性分析</h5>
<el-table
:data="integrityTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<h5>一致性分析</h5>
<el-table
:data="consistentTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<h5>关联性分析</h5>
<el-table
:data="relevanceTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<h5>及时性分析</h5>
<el-table
:data="timelinessTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<h5>准确性分析</h5>
<el-table
:data="accuracyTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
</div>
</el-card>
</div>
</template>
<script>
import { getReportBySource, getReportByType, getReportDetail } from '@/api/quality/checkreport'
import moment from 'moment'
export default {
name: 'AnalysisReport',
data() {
return {
queryParams: {
checkDate: moment(moment().add(-1, 'days').startOf('day').valueOf()).format('YYYY-MM-DD')
},
pickerOption: {
disabledDate(date) {
return date.getTime() > Date.now() - 24 * 60 * 60 * 1000
}
},
date: moment().subtract('days', 1).format('YYYY年MM月DD日'),
spanArr1: [],
position1: 0,
reportTableData1: [],
spanArr2: [],
position2: 0,
reportTableData2: [],
// 唯一性核查数据
uniqueTableData: [],
// 完整性核查数据
integrityTableData: [],
// 准确性核查数据
accuracyTableData: [],
// 一致性核查数据
consistentTableData: [],
// 关联性核查数据
relevanceTableData: [],
// 及时性核查数据
timelinessTableData: []
}
},
created() {
this.getReportData1()
this.getReportData2()
this.getReportData3()
},
methods: {
handleQuery() {
this.getReportData1()
this.getReportData2()
this.getReportData3()
this.date = moment(this.queryParams.checkDate).format('YYYY年MM月DD日')
},
getReportData1() {
getReportBySource({ checkDate: this.queryParams.checkDate }).then(response => {
if (response.success) {
this.reportTableData1 = response.data
this.rowspan1()
}
})
},
getReportData2() {
getReportByType({ checkDate: this.queryParams.checkDate }).then(response => {
if (response.success) {
this.reportTableData2 = response.data
this.rowspan2()
}
})
},
rowspan1() {
this.reportTableData1.forEach((item, index) => {
if (index === 0) {
this.spanArr1.push(1)
this.position1 = 0
} else {
if (this.reportTableData1[index].ruleSourceId === this.reportTableData1[index - 1].ruleSourceId) {
this.spanArr1[this.position1] += 1
this.spanArr1.push(0)
} else {
this.spanArr1.push(1)
this.position1 = index
}
}
})
},
objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
const _row = this.spanArr1[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
},
rowspan2() {
this.reportTableData2.forEach((item, index) => {
if (index === 0) {
this.spanArr2.push(1)
this.position2 = 0
} else {
if (this.reportTableData2[index].ruleTypeId === this.reportTableData2[index - 1].ruleTypeId) {
this.spanArr2[this.position2] += 1
this.spanArr2.push(0)
} else {
this.spanArr2.push(1)
this.position2 = index
}
}
})
},
objectSpanMethod2({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
const _row = this.spanArr2[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
},
colorFormat(level) {
if (level === '低') {
return '#409eff'
} else if (level === '中') {
return '#e6a23c'
} else {
return '#f56c6c'
}
},
cellFormat(percentage) {
return `${percentage}`
},
typeFormat(level) {
if (level === '低') {
return 'primary'
} else if (level === '中') {
return 'warning'
} else {
return 'danger'
}
},
getReportData3() {
getReportDetail({ checkDate: this.queryParams.checkDate }).then(response => {
if (response.success) {
this.uniqueTableData = response.data.unique
this.integrityTableData = response.data.integrity
this.accuracyTableData = response.data.accuracy
this.consistentTableData = response.data.consistent
this.relevanceTableData = response.data.relevance
this.timelinessTableData = response.data.timeliness
}
})
}
}
}
</script>
<style lang="scss" scoped>
.el-card ::v-deep .el-card__body {
height: calc(100vh - 230px);
overflow-y: auto;
}
.form-inline {
::v-deep .el-form-item {
margin-bottom: 0px;
}
}
::v-deep .el-badge__content {
margin-top: 10px;
right: 0px;
}
::v-deep .el-table__header th {
background-color: #f5f5f5 !important;
}
</style>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="resumePause(scope.row)" @click="handleResume(scope.row)"
>恢复任务</el-button> >恢复任务</el-button>
<el-button <el-button
size="mini" size="mini"
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
}).catch(() => { }).catch(() => {
}) })
}, },
resumePause(row) { handleResume(row) {
this.$confirm('是否恢复该任务', '提示', { this.$confirm('是否恢复该任务', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
......
<template>
<el-card class="box-card" shadow="always">
<el-form ref="queryForm" :model="queryParams" :inline="true">
<el-form-item label="规则类型" prop="ruleTypeId">
<el-select v-model="queryParams.ruleTypeId" clearable placeholder="请选择规则类型">
<el-option
v-for="item in ruleTypeOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="tableDataList"
border
tooltip-effect="dark"
:height="tableHeight"
style="width: 100%;margin: 15px 0;"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" width="55" align="center">
<template slot-scope="scope">
<span>{{ scope.$index +1 }}</span>
</template>
</el-table-column>
<template v-for="(item, index) in tableColumns">
<el-table-column
v-if="item.show"
:key="index"
:prop="item.prop"
:label="item.label"
:formatter="item.formatter"
align="center"
show-overflow-tooltip
/>
</template>
</el-table>
<el-pagination
:page-sizes="[10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
:current-page.sync="queryParams.pageNum"
:page-size.sync="queryParams.pageSize"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</el-card>
</template>
<script>
import { listRuleType } from '@/api/quality/checkrule'
import { pageCheckLog } from '@/api/quality/checklog'
export default {
name: 'CheckLogList',
data() {
return {
tableHeight: document.body.offsetHeight - 310 + 'px',
// 展示切换
showOptions: {
data: {},
showList: true
},
// 遮罩层
loading: true,
// 表格头
tableColumns: [
{ prop: 'executeJobName', label: '任务名称', show: true },
{ prop: 'executeRuleTypeName', label: '规则类型', show: true },
{ prop: 'executeRuleName', label: '规则名称', show: true },
{ prop: 'executeBatch', label: '执行批次', show: true },
{
prop: 'status',
label: '状态',
show: true,
formatter: this.statusFormatter
},
{ prop: 'executeDate', label: '执行时间', show: true }
],
// 状态数据字典
statusOptions: [],
// 数据集表格数据
tableDataList: [],
// 总数据条数
total: 0,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 20,
ruleTypeId: ''
},
ruleTypeOptions: []
}
},
created() {
this.getDicts('sys_normal_status').then(response => {
if (response.success) {
this.statusOptions = response.data
}
})
this.getRuleTypeList()
this.getList()
},
methods: {
getRuleTypeList() {
listRuleType().then(response => {
if (response.success) {
this.ruleTypeOptions = response.data
}
})
},
/** 查询数据集列表 */
getList() {
this.loading = true
pageCheckLog(this.queryParams).then(response => {
this.loading = false
if (response.success) {
const { data } = response
this.tableDataList = data.data
this.total = data.total
}
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 20,
ruleTypeId: ''
}
this.handleQuery()
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`)
this.queryParams.pageNum = 1
this.queryParams.pageSize = val
this.getList()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`)
this.queryParams.pageNum = val
this.getList()
},
statusFormatter(row, column, cellValue, index) {
const dictLabel = this.selectDictLabel(this.statusOptions, cellValue)
if (cellValue === '1') {
return <el-tag type='success'>{dictLabel}</el-tag>
} else {
return <el-tag type='warning'>{dictLabel}</el-tag>
}
}
}
}
</script>
<style lang="scss" scoped>
.right-toolbar {
float: right;
}
.el-card ::v-deep .el-card__body {
height: calc(100vh - 170px);
}
</style>
<template>
<div class="app-container">
<transition name="el-zoom-in-center">
<check-log-list v-if="options.showList" @showCard="showCard" />
</transition>
</div>
</template>
<script>
import CheckLogList from './CheckLogList'
export default {
name: 'CheckLog',
components: { CheckLogList },
data() {
return {
options: {
data: {},
showList: true
}
}
},
methods: {
showCard(data) {
Object.assign(this.options, data)
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template> <template>
<div class="app-container"> <div class="app-container">
<transition name="el-zoom-in-center"> <el-card class="box-card" shadow="always">
<check-report-list v-if="options.showList" @showCard="showCard" /> <div slot="header" class="clearfix">
</transition> <el-form ref="queryForm" :model="queryParams" :inline="true" class="form-inline">
<el-form-item label="时间">
<el-date-picker
v-model="queryParams.checkDate"
type="date"
:clearable="false"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:picker-options="pickerOption"
placeholder="选择日期"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
</el-form-item>
</el-form>
</div>
<div class="body-wrapper">
<h4 style="text-align: center;">{{date}}质量分析报告</h4>
<el-divider content-position="left"><h3>错误量统计分析</h3></el-divider>
<el-row :gutter="20">
<el-col :span="10">
<h5>按数据源统计错误数量</h5>
<el-table
:data="reportTableData1"
:span-method="objectSpanMethod1"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleLevelName" label="规则级别" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center">
<template scope="scope">
<el-progress :percentage="scope.row.checkErrorCount" :stroke-width="20" :text-inside="true" :color="colorFormat(scope.row.ruleLevelName)" :format="cellFormat" />
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="10" :offset="4">
<h5>按规则类型统计错误数量</h5>
<el-table
:data="reportTableData2"
:span-method="objectSpanMethod2"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleTypeName" label="规则类型" align="center" />
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center">
<template scope="scope">
<el-badge :value="scope.row.ruleLevelName" :type="typeFormat(scope.row.ruleLevelName)">
{{ scope.row.checkErrorCount }}
</el-badge>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<el-divider content-position="left"><h3>{{ date }}规则类型统计分析</h3></el-divider>
<el-row>
<el-col :span="24">
<h5>唯一性分析</h5>
<el-table
:data="uniqueTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<h5>完整性分析</h5>
<el-table
:data="integrityTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<h5>一致性分析</h5>
<el-table
:data="consistentTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<h5>关联性分析</h5>
<el-table
:data="relevanceTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<h5>及时性分析</h5>
<el-table
:data="timelinessTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<h5>准确性分析</h5>
<el-table
:data="accuracyTableData"
border
tooltip-effect="dark"
:max-height="250"
style="width: 100%; margin: 15px 0;"
>
<el-table-column prop="ruleName" label="规则名称" align="center" />
<el-table-column prop="ruleSourceName" label="数据源" align="center" />
<el-table-column prop="ruleTableName" label="数据表(中文)" align="center" />
<el-table-column prop="ruleTableComment" label="数据表(英文)" align="center" />
<el-table-column prop="ruleColumnName" label="核查字段(中文)" align="center" />
<el-table-column prop="ruleColumnComment" label="核查字段(英文)" align="center" />
<el-table-column prop="checkTotalCount" label="核查数" align="center" />
<el-table-column prop="checkErrorCount" label="不合规数" align="center" />
</el-table>
</el-col>
</el-row>
</div>
</el-card>
</div> </div>
</template> </template>
<script> <script>
import CheckReportList from './CheckReportList' import { getReportBySource, getReportByType, getReportDetail } from '@/api/quality/checkreport'
import moment from 'moment'
export default { export default {
name: 'CheckReport', name: 'CheckReport',
components: { CheckReportList },
data() { data() {
return { return {
options: { queryParams: {
data: {}, checkDate: moment(moment().add(-1, 'days').startOf('day').valueOf()).format('YYYY-MM-DD')
showList: true },
} pickerOption: {
disabledDate(date) {
return date.getTime() > Date.now() - 24 * 60 * 60 * 1000
}
},
date: moment().subtract('days', 1).format('YYYY年MM月DD日'),
spanArr1: [],
position1: 0,
reportTableData1: [],
spanArr2: [],
position2: 0,
reportTableData2: [],
// 唯一性核查数据
uniqueTableData: [],
// 完整性核查数据
integrityTableData: [],
// 准确性核查数据
accuracyTableData: [],
// 一致性核查数据
consistentTableData: [],
// 关联性核查数据
relevanceTableData: [],
// 及时性核查数据
timelinessTableData: []
} }
}, },
created() {
this.getReportData1()
this.getReportData2()
this.getReportData3()
},
methods: { methods: {
showCard(data) { handleQuery() {
Object.assign(this.options, data) this.getReportData1()
this.getReportData2()
this.getReportData3()
this.date = moment(this.queryParams.checkDate).format('YYYY年MM月DD日')
},
getReportData1() {
getReportBySource({ checkDate: this.queryParams.checkDate }).then(response => {
if (response.success) {
this.reportTableData1 = response.data
this.rowspan1()
}
})
},
getReportData2() {
getReportByType({ checkDate: this.queryParams.checkDate }).then(response => {
if (response.success) {
this.reportTableData2 = response.data
this.rowspan2()
}
})
},
rowspan1() {
this.reportTableData1.forEach((item, index) => {
if (index === 0) {
this.spanArr1.push(1)
this.position1 = 0
} else {
if (this.reportTableData1[index].ruleSourceId === this.reportTableData1[index - 1].ruleSourceId) {
this.spanArr1[this.position1] += 1
this.spanArr1.push(0)
} else {
this.spanArr1.push(1)
this.position1 = index
}
}
})
},
objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
const _row = this.spanArr1[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
},
rowspan2() {
this.reportTableData2.forEach((item, index) => {
if (index === 0) {
this.spanArr2.push(1)
this.position2 = 0
} else {
if (this.reportTableData2[index].ruleTypeId === this.reportTableData2[index - 1].ruleTypeId) {
this.spanArr2[this.position2] += 1
this.spanArr2.push(0)
} else {
this.spanArr2.push(1)
this.position2 = index
}
}
})
},
objectSpanMethod2({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
const _row = this.spanArr2[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}
},
colorFormat(level) {
if (level === '低') {
return '#409eff'
} else if (level === '中') {
return '#e6a23c'
} else {
return '#f56c6c'
}
},
cellFormat(percentage) {
return `${percentage}`
},
typeFormat(level) {
if (level === '低') {
return 'primary'
} else if (level === '中') {
return 'warning'
} else {
return 'danger'
}
},
getReportData3() {
getReportDetail({ checkDate: this.queryParams.checkDate }).then(response => {
if (response.success) {
this.uniqueTableData = response.data.unique
this.integrityTableData = response.data.integrity
this.accuracyTableData = response.data.accuracy
this.consistentTableData = response.data.consistent
this.relevanceTableData = response.data.relevance
this.timelinessTableData = response.data.timeliness
}
})
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-card ::v-deep .el-card__body {
height: calc(100vh - 230px);
overflow-y: auto;
}
.form-inline {
::v-deep .el-form-item {
margin-bottom: 0px;
}
}
::v-deep .el-badge__content {
margin-top: 10px;
right: 0px;
}
::v-deep .el-table__header th {
background-color: #f5f5f5 !important;
}
</style> </style>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
import { listRuleType, pageCheckReport } from '@/api/quality/checkreport' import { listRuleType, pageCheckReport } from '@/api/quality/checkreport'
export default { export default {
name: 'CheckReportList', name: 'CheckStatisticList',
data() { data() {
return { return {
tableHeight: document.body.offsetHeight - 310 + 'px', tableHeight: document.body.offsetHeight - 310 + 'px',
......
<template>
<div class="app-container">
<transition name="el-zoom-in-center">
<check-report-list v-if="options.showList" @showCard="showCard" />
</transition>
</div>
</template>
<script>
import CheckReportList from './CheckReportList'
export default {
name: 'CheckReport',
components: { CheckReportList },
data() {
return {
options: {
data: {},
showList: true
}
}
},
methods: {
showCard(data) {
Object.assign(this.options, data)
}
}
}
</script>
<style lang="scss" scoped>
</style>
...@@ -239,7 +239,6 @@ export default { ...@@ -239,7 +239,6 @@ export default {
}) })
// 连线 // 连线
_this.jsPlumb.bind('connection', function(evt) { _this.jsPlumb.bind('connection', function(evt) {
console.log('connection', evt)
_this.connEndpoints.push({ _this.connEndpoints.push({
sourceId: evt.sourceId, sourceId: evt.sourceId,
targetId: evt.targetId targetId: evt.targetId
...@@ -247,7 +246,6 @@ export default { ...@@ -247,7 +246,6 @@ export default {
}) })
// 删除连线 // 删除连线
_this.jsPlumb.bind('connectionDetached', function(evt) { _this.jsPlumb.bind('connectionDetached', function(evt) {
console.log('connectionDetached', evt)
_this.connEndpoints.splice(_this.connEndpoints.findIndex(item => item.sourceId === evt.sourceId && item.targetId === evt.targetId), 1) _this.connEndpoints.splice(_this.connEndpoints.findIndex(item => item.sourceId === evt.sourceId && item.targetId === evt.targetId), 1)
}) })
}) })
...@@ -292,7 +290,6 @@ export default { ...@@ -292,7 +290,6 @@ export default {
} }
}, },
handleCancel(id) { handleCancel(id) {
console.log(id)
this.$confirm('是否取消对照关系?', '提示', { this.$confirm('是否取消对照关系?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
icon="el-icon-view" icon="el-icon-view"
@click="handleTrack(scope.row)" @click="handleTrack(scope.row)"
>流程追踪</el-button> >流程追踪</el-button>
<el-button slot="reference">操作</el-button>
</el-popover> </el-popover>
</template> </template>
</el-table-column> </el-table-column>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment