Compare commits
12 Commits
main
...
bc0a854b57
| Author | SHA1 | Date | |
|---|---|---|---|
| bc0a854b57 | |||
| c1ea0180dd | |||
|
|
b635578cbe | ||
|
|
46259b98cc | ||
| 7e763d9ba2 | |||
| d3b3c8bc4e | |||
| 300825d877 | |||
|
|
5c770409d8 | ||
| 372e414840 | |||
|
|
2bc9479c26 | ||
|
|
83b0d6b92b | ||
| 5a2f1cf69d |
14
.eslintrc.js
@@ -53,7 +53,7 @@ module.exports = {
|
|||||||
'after': true
|
'after': true
|
||||||
}],
|
}],
|
||||||
'handle-callback-err': [2, '^(err|error)$'],
|
'handle-callback-err': [2, '^(err|error)$'],
|
||||||
'indent': [2, 2, {
|
'indent': ['off', 2, 2, {
|
||||||
'SwitchCase': 1
|
'SwitchCase': 1
|
||||||
}],
|
}],
|
||||||
'jsx-quotes': [2, 'prefer-single'],
|
'jsx-quotes': [2, 'prefer-single'],
|
||||||
@@ -193,6 +193,16 @@ module.exports = {
|
|||||||
'object-curly-spacing': [2, 'always', {
|
'object-curly-spacing': [2, 'always', {
|
||||||
objectsInObjects: false
|
objectsInObjects: false
|
||||||
}],
|
}],
|
||||||
'array-bracket-spacing': [2, 'never']
|
'array-bracket-spacing': [2, 'never'],
|
||||||
|
"vue/mustache-interpolation-spacing": ["error", "always" | "never"],
|
||||||
|
"vue/html-self-closing": ["error",{
|
||||||
|
"html": {
|
||||||
|
"void": "never",
|
||||||
|
"normal": "any",
|
||||||
|
"component": "any"
|
||||||
|
},
|
||||||
|
"svg": "always",
|
||||||
|
"math": "always"
|
||||||
|
}],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "micro-ui",
|
"name": "micro-ui",
|
||||||
"version": "0.4.3",
|
"version": "0.4.3",
|
||||||
"description": "AllData科学护城河-前端项目",
|
"description": "数据标准符合性检测工具-前端项目",
|
||||||
"author": "AllDataDC",
|
"author": "AllDataDC",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 4.2 KiB |
10
src/api/datamodel/model.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function createDataSource(data) {
|
||||||
|
return request({
|
||||||
|
url: '/salpa/subject/project/createDataSource',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@@ -105,3 +105,11 @@ export function word(id) {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getMetadatablood(data) {
|
||||||
|
return request({
|
||||||
|
url: '/data/metadata/sources/getMetadatablood',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,6 +8,36 @@ export function pageCheckJob(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function saveCheckJob(data) {
|
||||||
|
return request({
|
||||||
|
url: '/data/quality/scheduleJobs',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateCheckJob(data) {
|
||||||
|
return request({
|
||||||
|
url: '/data/quality/scheduleJobs/' + data.id,
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delCheckJob(id) {
|
||||||
|
return request({
|
||||||
|
url: '/data/quality/scheduleJobs/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delCheckJobs(ids) {
|
||||||
|
return request({
|
||||||
|
url: '/data/quality/scheduleJobs/batch/' + ids,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function pauseCheckJob(id) {
|
export function pauseCheckJob(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/quality/scheduleJobs/pause/' + id,
|
url: '/data/quality/scheduleJobs/pause/' + id,
|
||||||
@@ -29,3 +59,10 @@ export function runCheckJob(id) {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getScheduleJobById(id) {
|
||||||
|
return request({
|
||||||
|
url: '/data/quality/scheduleJobs/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -68,3 +68,10 @@ export function updateCheckRule(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function listSourceIdBytable(id, ruleId) {
|
||||||
|
return request({
|
||||||
|
url: '/data/quality/checkRules/listSourceIdBytable/' + id + '/ruleId/' + ruleId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
1
src/assets/database/Hive.svg
Normal file
|
After Width: | Height: | Size: 19 KiB |
15
src/assets/database/MariaDB.svg
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 789.1 195.64" height="48">
|
||||||
|
<defs>
|
||||||
|
<style>.cls-1{fill:#003545;}</style>
|
||||||
|
</defs>
|
||||||
|
<title>MDB-HLogo_RGB</title>
|
||||||
|
<path class="cls-1" d="M378.08,70l18.52,71.5h-14L370.26,90l-23.17,51.5H335.3l-23.07-51.2-12.68,51.2H285.89L304.21,70h12.08l24.95,55.36L366.1,70Z" transform="translate(0 -3.38)"></path>
|
||||||
|
<path class="cls-1" d="M449.27,97.64V89.32h13.47v52.19H449.27v-8.42c-3.56,6-10.89,9.51-19.8,9.51-18.62,0-29-13.08-29-28.23,0-14.55,9.9-26.24,27-26.24C437.29,88.13,445.41,91.5,449.27,97.64Zm-34.46,17.43c0,9.6,6,17.82,17.72,17.82,11.29,0,17.43-8,17.43-17.53s-6.33-17.62-18-17.62C420.65,97.74,414.81,105.86,414.81,115.07Z" transform="translate(0 -3.38)"></path>
|
||||||
|
<path class="cls-1" d="M493.13,141.51H479.66V89.32h13.47V101c3.56-8,10.79-12.87,18.81-12.87a24.2,24.2,0,0,1,8.42,1.39l-2.87,9.9a29.66,29.66,0,0,0-7.13-1c-9.71,0-17.23,7.33-17.23,18.12Z" transform="translate(0 -3.38)"></path>
|
||||||
|
<path class="cls-1" d="M527.09,75.55a6.86,6.86,0,0,1,7.23-7,7.1,7.1,0,0,1,7.33,7.23c0,3.47-2.38,6.93-7.33,6.93A6.93,6.93,0,0,1,527.09,75.55Zm.59,13.77h13.47v38.13c0,2.37.5,4.06,2.48,4.06a14.37,14.37,0,0,0,2.57-.3l2.08,9.8a23.72,23.72,0,0,1-8.91,1.59c-5.65,0-11.69-1.69-11.69-14.46Z" transform="translate(0 -3.38)"></path>
|
||||||
|
<path class="cls-1" d="M601.36,97.64V89.32h13.46v52.19H601.36v-8.42c-3.57,6-10.9,9.51-19.81,9.51-18.62,0-29-13.08-29-28.23,0-14.55,9.91-26.24,27-26.24C589.37,88.13,597.49,91.5,601.36,97.64Zm-34.47,17.43c0,9.6,6,17.82,17.73,17.82,11.29,0,17.43-8,17.43-17.53s-6.34-17.62-18-17.62C572.74,97.74,566.89,105.86,566.89,115.07Z" transform="translate(0 -3.38)"></path>
|
||||||
|
<path class="cls-1" d="M635.51,70H667.8c27.13,0,40.7,14.95,40.5,35.75.2,21.59-14.76,35.75-38.13,35.75H635.51Zm8.91,6.34v58.92H669c21.59,0,29.81-14.56,29.81-29.71,0-17.13-10.3-29.21-29.81-29.21Z" transform="translate(0 -3.38)"></path>
|
||||||
|
<path class="cls-1" d="M763.35,141.51h-41V70h36.94c14.16,0,27.63,2.67,27.43,18.52,0,11.19-6.93,14.26-14.26,15.45,10.4.89,16.64,7.52,16.64,18.22C789.19,138.24,775.13,141.51,763.35,141.51Zm-3.07-40.31c14.16,0,17.33-5.44,17.33-12.38,0-10.39-6.34-12.77-17.33-12.77H730.87V101.2Zm.39,6h-29.8v28.23H762c8.72,0,17.93-2.88,17.93-13.87C779.89,108.93,769.29,107.24,760.67,107.24Z" transform="translate(0 -3.38)"></path>
|
||||||
|
<path class="cls-1" d="M299.2,4.34a4.35,4.35,0,0,0-2.92-1c-2.9,0-6.65,2-8.66,3-.35.19-.62.33-.81.41A27.32,27.32,0,0,1,276,9.53c-3.86.12-7.19.35-11.5.8C238.82,13,227.43,32.6,216.42,51.6c-6,10.32-12.18,21-20.67,29.28a54.92,54.92,0,0,1-5.59,4.74c-8.78,6.54-19.81,11.17-28.43,14.47-8.26,3.15-17.28,6-26,8.74-8,2.51-15.51,4.89-22.44,7.46-3.13,1.16-5.79,2-8.13,2.83-6.31,2.1-10.87,3.62-17.51,8.17-2.59,1.77-5.19,3.69-7,5.14A73.46,73.46,0,0,0,66.8,147.05a86.62,86.62,0,0,1-11.6,14c-1.4,1.37-3.89,2-7.62,2-4.37,0-9.67-.9-15.28-1.85-5.77-1-11.75-2-16.87-2-4.17,0-7.35.67-9.74,2.06,0,0-4,2.34-5.69,5.36l1.66.75a34.71,34.71,0,0,1,7.1,5.07,35.39,35.39,0,0,0,7.37,5.25,6.61,6.61,0,0,1,2.27,1.51c-.7,1-1.73,2.35-2.8,3.76-5.92,7.74-9.37,12.63-7.39,15.29a6.09,6.09,0,0,0,3,.71c12.9,0,19.82-3.36,28.59-7.6,2.54-1.23,5.16-2.5,8.16-3.8,5.12-2.22,10.64-5.76,16.48-9.52,7.74-5,15.74-10.11,23.49-12.6a64,64,0,0,1,19.71-2.77c8.23,0,16.83,1.1,25.15,2.17,6.21.79,12.63,1.61,18.93,2,2.45.15,4.72.22,6.92.22a77.2,77.2,0,0,0,8.83-.47l.7-.24c4.42-2.72,6.49-8.55,8.5-14.18,1.29-3.63,2.37-6.89,4.05-9a2.79,2.79,0,0,1,.34-.28.4.4,0,0,1,.5.09s0,.05,0,.15c-1.06,22.06-9.9,36.05-18.88,48.49l-6,6.43s8.39,0,13.16-1.84c17.42-5.21,30.58-16.69,40.15-35a149.42,149.42,0,0,0,6.32-14.44c.16-.41,1.68-1.17,1.53.95,0,.63-.09,1.32-.14,2h0c0,.43-.06.87-.08,1.31-.25,3-1,9.57-1,9.57l5.38-2.88c13-8.22,23-24.74,30.56-50.47,3.16-10.72,5.47-21.37,7.51-30.76,2.44-11.23,4.55-20.93,7-24.68,3.78-5.89,9.55-9.87,15.13-13.73l2.28-1.58c7-4.93,14-10.62,15.54-21.22l0-.24C301.22,7.29,300.27,5.27,299.2,4.34Z" transform="translate(0 -3.38)"></path>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.9 KiB |
1
src/assets/database/MySQL.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1645770420428" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1363" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M1017.6 521.6c-3.2-3.2-6.4-6.4-6.4-9.6-6.4-12.8-16-22.4-28.8-32-9.6-6.4-28.8-16-32-25.6 6.4 0 12.8-3.2 19.2-3.2 9.6-3.2 16-3.2 25.6-3.2 3.2 0 9.6-3.2 12.8-3.2v-3.2c-3.2-6.4-9.6-12.8-12.8-19.2-12.8-12.8-28.8-25.6-44.8-38.4-9.6-6.4-19.2-9.6-28.8-16-3.2-3.2-9.6-3.2-9.6-6.4-3.2-6.4-6.4-16-9.6-22.4-6.4-16-16-35.2-22.4-54.4-3.2-12.8-6.4-25.6-12.8-35.2-28.8-51.2-57.6-83.2-102.4-115.2-9.6-6.4-22.4-9.6-35.2-12.8h-19.2c-3.2-3.2-9.6-6.4-12.8-9.6-16-9.6-54.4-35.2-67.2-3.2-6.4 19.2 9.6 38.4 16 48 3.2 6.4 9.6 16 12.8 22.4 3.2 6.4 3.2 9.6 3.2 16 6.4 12.8 9.6 28.8 16 41.6l9.6 19.2c3.2 3.2 6.4 6.4 6.4 9.6-3.2 6.4-3.2 16-6.4 22.4-9.6 35.2-6.4 76.8 6.4 102.4 3.2 6.4 16 25.6 28.8 19.2 12.8-6.4 9.6-22.4 12.8-38.4 0-3.2 0-6.4 3.2-9.6 3.2 9.6 6.4 16 9.6 25.6 9.6 16 22.4 32 35.2 41.6 6.4 6.4 12.8 16 19.2 19.2l-6.4-6.4c-6.4-6.4-9.6-12.8-12.8-19.2-12.8-19.2-22.4-35.2-28.8-54.4-3.2-9.6-9.6-19.2-12.8-28.8-3.2-3.2-3.2-9.6-3.2-9.6-3.2 6.4-9.6 12.8-12.8 19.2-6.4 12.8-6.4 28.8-6.4 44.8-9.6-3.2-12.8-12.8-16-22.4-6.4-22.4-9.6-57.6-3.2-83.2 3.2-6.4 9.6-25.6 6.4-32-3.2-6.4-6.4-9.6-9.6-12.8l-9.6-19.2c-6.4-16-9.6-35.2-16-54.4-3.2-6.4-9.6-16-12.8-22.4-6.4-9.6-9.6-12.8-16-22.4 0-3.2-3.2-9.6 0-12.8 0-3.2 3.2-3.2 3.2-3.2 3.2-3.2 12.8 0 16 3.2 9.6 3.2 19.2 9.6 25.6 16 3.2 3.2 6.4 9.6 12.8 9.6h6.4c9.6 3.2 19.2 0 25.6 3.2 12.8 6.4 25.6 12.8 38.4 22.4 35.2 25.6 64 60.8 83.2 105.6 3.2 6.4 3.2 12.8 6.4 22.4 6.4 16 12.8 28.8 19.2 44.8 6.4 12.8 9.6 28.8 19.2 41.6 3.2 6.4 19.2 9.6 28.8 12.8l19.2 9.6c9.6 6.4 19.2 12.8 25.6 19.2 3.2 3.2 19.2 9.6 19.2 16-22.4 0-38.4 3.2-51.2 9.6-6.4-3.2-12.8-3.2-12.8 3.2 3.2 3.2 3.2 6.4 3.2 9.6 3.2 6.4 9.6 12.8 12.8 19.2 6.4 6.4 12.8 9.6 16 12.8 9.6 6.4 22.4 12.8 32 19.2 6.4 3.2 12.8 9.6 19.2 12.8 3.2 3.2 3.2 6.4 9.6 6.4-3.2 0-3.2-3.2-3.2-6.4z" fill="#02608A" p-id="1364"></path><path d="M713.6 166.4c-3.2 0-6.4 0-9.6 3.2 3.2 0 12.8 25.6 16 25.6 3.2-3.2 6.4-9.6 6.4-12.8 0-6.4-3.2-9.6-9.6-12.8 0-3.2 0-3.2-3.2-3.2zM198.4 518.4l-57.6 201.6-57.6-201.6H32c-9.6 86.4-19.2 176-22.4 275.2h44.8c0-73.6 0-137.6 6.4-208l57.6 208h38.4l57.6-208c6.4 73.6 6.4 137.6 9.6 208h48c-3.2-83.2-12.8-172.8-22.4-275.2H198.4zM390.4 588.8c-6.4 60.8-9.6 112-28.8 163.2 0-12.8-3.2-19.2-9.6-44.8l-32-118.4H275.2l44.8 156.8c6.4 22.4 9.6 38.4 9.6 48 0 9.6 0 16-3.2 19.2-6.4 6.4-16 9.6-28.8 9.6h-16v35.2c6.4 3.2 16 6.4 22.4 6.4 25.6 0 48-16 67.2-54.4 25.6-44.8 48-118.4 64-220.8h-44.8z" fill="#02608A" p-id="1365"></path><path d="M953.6 748.8v-230.4h-48v272h115.2v-41.6zM832 771.2c3.2-3.2 6.4-6.4 9.6-12.8 19.2-25.6 28.8-60.8 28.8-112 0-89.6-32-134.4-92.8-134.4-32 0-54.4 12.8-70.4 35.2-19.2 25.6-28.8 60.8-28.8 112 0 48 9.6 83.2 25.6 105.6 16 19.2 38.4 28.8 67.2 28.8 12.8 0 22.4-3.2 32-3.2l57.6 38.4 16-32-44.8-25.6z m-54.4-25.6c-16 0-28.8-6.4-35.2-22.4-9.6-16-12.8-41.6-12.8-73.6 0-60.8 16-89.6 48-89.6 16 0 28.8 6.4 35.2 22.4 9.6 16 12.8 38.4 12.8 73.6 0 60.8-16 89.6-48 89.6zM633.6 656s-35.2-22.4-51.2-32c-19.2-12.8-32-25.6-32-41.6 0-9.6 6.4-16 12.8-25.6 6.4-6.4 16-9.6 28.8-9.6 16 0 32 6.4 44.8 16l9.6-35.2c-19.2-12.8-38.4-19.2-60.8-19.2s-38.4 6.4-54.4 19.2c-12.8 12.8-25.6 38.4-25.6 60.8 0 25.6 9.6 41.6 28.8 57.6 0 0 32 22.4 51.2 32 19.2 12.8 28.8 25.6 28.8 41.6 0 12.8-3.2 22.4-12.8 28.8-9.6 6.4-19.2 3.2-28.8 3.2-16 0-32-6.4-51.2-16l-9.6 32c22.4 16 44.8 25.6 67.2 25.6 25.6 0 44.8-6.4 60.8-22.4 16-16 22.4-35.2 22.4-57.6 0-25.6-9.6-41.6-28.8-57.6z" fill="#E58E01" p-id="1366"></path></svg>
|
||||||
|
After Width: | Height: | Size: 3.7 KiB |
1
src/assets/database/Oracle.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1650692654847" class="icon" viewBox="0 0 8165 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="988" xmlns:xlink="http://www.w3.org/1999/xlink" width="255.15625" height="48"><defs><style type="text/css"></style></defs><path d="M3398.499037 666.115306h520.24153l-274.800972-442.904953-504.499351 800.60224-229.885787 0.187407 614.069914-961.397353A143.303803 143.303803 0 0 1 3643.564782 0.008746c48.350978 0 92.703942 22.801172 118.878438 60.907239l616.193859 963.084015-230.073194-0.187407-107.883901-178.973581h-527.175585l-114.942893-178.723706z m2386.751699 178.911113V10.00378h-195.090574v916.669574c0 25.362399 10.307379 49.600357 28.423379 67.716357 19.115503 18.928096 44.352964 29.360413 71.464494 29.360413h888.995824l114.693017-178.661236H5785.250736z m-3225.2726-149.425762a342.829673 342.829673 0 0 0 0-685.596877H1706.777029v1013.808813h194.903167V188.665016h644.867113a163.856092 163.856092 0 0 1 164.043499 164.105968 163.98103 163.98103 0 0 1-164.043499 164.168437l-549.414537-0.187407 581.77346 507.060579h283.234282l-391.430527-328.399343 89.268149 0.187407zM506.935641 1023.812593a506.873172 506.873172 0 1 1 0-1013.808813h589.269735a506.935641 506.935641 0 0 1 506.873173 506.935641 506.935641 506.935641 0 0 1-506.873173 507.060579l-589.269735-0.187407z m576.151253-178.661236a328.086998 328.086998 0 0 0 328.149467-328.211936 328.086998 328.086998 0 0 0-328.149467-328.211936H519.991655a328.274405 328.274405 0 0 0 0 656.423872h563.095239z m3702.285608 178.661236a506.935641 506.935641 0 1 1 0-1013.808813h700.277084l-114.755487 178.723705h-572.340646a328.274405 328.274405 0 1 0 0 656.423872h702.838312l-114.505611 178.661236h-601.576121z m2384.752692-178.661236a328.086998 328.086998 0 0 1-315.593205-238.506504h833.335977l114.755486-178.723705-948.341339-0.062469a328.211936 328.211936 0 0 1 315.843081-239.193663l572.028302 0.062469 114.942893-178.723705h-700.277084a506.935641 506.935641 0 0 0 0 1013.808813h601.576121l114.505611-178.661236h-702.775843zM7961.482027 117.950149a89.455556 89.455556 0 1 1 179.036051 0 89.455556 89.455556 0 1 1-179.036051 0z m89.580494 114.318204l0 0z m-10.744661-181.597278c17.553779 0 24.800179 0.187407 33.420895 3.435793 22.488827 7.558745 24.800179 28.235972 24.800179 35.794717a49.975171 49.975171 0 0 1-1.374317 10.494785 34.795213 34.795213 0 0 1-15.867117 21.926607c-1.311848 0.999503-2.061476 1.624193-5.747145 2.99851l29.672758 53.098619h-28.673254l-25.987089-48.850729h-17.303903v48.78826h-24.987586V50.671075h32.046579z m8.933061 57.721323c7.683683-0.124938 16.241931-0.687159 21.239448-7.996028a18.990565 18.990565 0 0 0 2.873572-10.932068 16.86662 16.86662 0 0 0-9.62022-15.492303c-5.747145-2.248883-11.619227-2.248883-23.425861-2.248883h-7.058993v36.669282h15.992054z" fill="#d81e06" p-id="989"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.9 KiB |
1
src/assets/database/PostgreSQL.svg
Normal file
|
After Width: | Height: | Size: 14 KiB |
1
src/assets/database/Sqlserver.svg
Normal file
|
After Width: | Height: | Size: 24 KiB |
1
src/assets/database/clickhouse.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg height="2222" viewBox="0 0 9 8" width="2500" xmlns="http://www.w3.org/2000/svg"><path d="m0 7h1v1h-1z" fill="#f00"/><path d="m0 0h1v7h-1zm2 0h1v8h-1zm2 0h1v8h-1zm2 0h1v8h-1zm2 3.25h1v1.5h-1z" fill="#fc0"/></svg>
|
||||||
|
After Width: | Height: | Size: 216 B |
1
src/assets/database/default.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1652175124881" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="42276" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M64 154.944a411.52 154.944 0 1 0 823.04 0 411.52 154.944 0 1 0-823.04 0Z" fill="#434343" p-id="42277"></path><path d="M477.632 709.12c-225.024 0-412.608-62.72-412.608-104.704v209.216c0 76.032 184.768 137.344 412.608 137.344s412.608-61.376 412.608-137.344V604.416c0 41.984-187.584 104.704-412.608 104.704z" fill="#434343" p-id="42278"></path><path d="M479.616 387.264C254.592 387.264 67.008 323.136 67.008 280.128v214.144c0 77.696 184.768 140.544 412.608 140.544s412.608-62.848 412.608-140.544V280.128c0 43.008-187.584 107.136-412.608 107.136z" fill="#434343" p-id="42279"></path></svg>
|
||||||
|
After Width: | Height: | Size: 961 B |
BIN
src/assets/database/dm8.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/database/druid.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
1
src/assets/database/elasticsearch.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg width="2500" height="2500" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet"><path d="M255.96 134.393c0-21.521-13.373-40.117-33.223-47.43a75.239 75.239 0 0 0 1.253-13.791c0-39.909-32.386-72.295-72.295-72.295-23.193 0-44.923 11.074-58.505 30.088-6.686-5.224-14.835-7.94-23.402-7.94-21.104 0-38.446 17.133-38.446 38.446 0 4.597.836 9.194 2.298 13.373C13.582 81.739 0 100.962 0 122.274c0 21.522 13.373 40.327 33.431 47.64-.835 4.388-1.253 8.985-1.253 13.79 0 39.7 32.386 72.087 72.086 72.087 23.402 0 44.924-11.283 58.505-30.088 6.686 5.223 15.044 8.149 23.611 8.149 21.104 0 38.446-17.134 38.446-38.446 0-4.597-.836-9.194-2.298-13.373 19.64-7.104 33.431-26.327 33.431-47.64z" fill="#FFF"/><path d="M100.085 110.364l57.043 26.119 57.669-50.565a64.312 64.312 0 0 0 1.253-12.746c0-35.52-28.834-64.355-64.355-64.355-21.313 0-41.162 10.447-53.072 27.998l-9.612 49.73 11.074 23.82z" fill="#F4BD19"/><path d="M40.953 170.75c-.835 4.179-1.253 8.567-1.253 12.955 0 35.52 29.043 64.564 64.564 64.564 21.522 0 41.372-10.656 53.49-28.208l9.403-49.729-12.746-24.238-57.251-26.118-56.207 50.774z" fill="#3CBEB1"/><path d="M40.536 71.918l39.073 9.194 8.775-44.506c-5.432-4.179-11.91-6.268-18.805-6.268-16.925 0-30.924 13.79-30.924 30.924 0 3.552.627 7.313 1.88 10.656z" fill="#E9478C"/><path d="M37.192 81.32c-17.551 5.642-29.67 22.567-29.67 40.954 0 17.97 11.074 34.059 27.79 40.327l54.953-49.73-10.03-21.52-43.043-10.03z" fill="#2C458F"/><path d="M167.784 219.852c5.432 4.18 11.91 6.478 18.596 6.478 16.925 0 30.924-13.79 30.924-30.924 0-3.761-.627-7.314-1.88-10.657l-39.073-9.193-8.567 44.296z" fill="#95C63D"/><path d="M175.724 165.317l43.043 10.03c17.551-5.85 29.67-22.566 29.67-40.954 0-17.97-11.074-33.849-27.79-40.326l-56.415 49.311 11.492 21.94z" fill="#176655"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/assets/database/gaussdb.png
Normal file
|
After Width: | Height: | Size: 3.3 MiB |
BIN
src/assets/database/ibmdb2.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/database/ignite.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/assets/database/kingbase.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
src/assets/database/kylin.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/database/kyuubi.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
1
src/assets/database/presto.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg width="2500" height="2500" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><rect width="256" height="256" rx="18"/><path d="M230.118 128.531c0 7.047-5.713 12.76-12.761 12.76-7.047 0-12.76-5.713-12.76-12.76 0-7.048 5.713-12.761 12.76-12.761 7.048 0 12.761 5.713 12.761 12.761" fill="#669CFE"/><path d="M203.806 154.531c0 7.047-5.713 12.76-12.761 12.76-7.048 0-12.761-5.713-12.761-12.76 0-7.048 5.713-12.761 12.761-12.761 7.048 0 12.761 5.713 12.761 12.761" fill="#3FE7FE"/><path d="M177.451 181.072c0 7.048-5.713 12.761-12.76 12.761-7.048 0-12.761-5.713-12.761-12.761 0-7.047 5.713-12.76 12.761-12.76 7.047 0 12.76 5.713 12.76 12.76" fill="#FFF"/><path d="M202.993 102.336c0 6.597-5.348 11.944-11.944 11.944-6.597 0-11.945-5.347-11.945-11.944s5.348-11.945 11.945-11.945c6.596 0 11.944 5.348 11.944 11.945" fill="#669CFE"/><path d="M176.738 128.298c0 6.597-5.348 11.945-11.944 11.945-6.597 0-11.945-5.348-11.945-11.945s5.348-11.945 11.945-11.945c6.596 0 11.944 5.348 11.944 11.945" fill="#3FE7FE"/><path d="M150.569 154.642c0 6.597-5.347 11.945-11.944 11.945s-11.945-5.348-11.945-11.945 5.348-11.944 11.945-11.944 11.944 5.347 11.944 11.944" fill="#FFF"/><path d="M175.743 76.235c0 5.991-4.857 10.849-10.849 10.849s-10.849-4.858-10.849-10.849c0-5.992 4.857-10.849 10.849-10.849s10.849 4.857 10.849 10.849" fill="#669CFE"/><path d="M149.522 102.191c0 5.991-4.858 10.849-10.85 10.849-5.991 0-10.849-4.858-10.849-10.849 0-5.992 4.858-10.85 10.849-10.85 5.992 0 10.85 4.858 10.85 10.85" fill="#3FE7FE"/><path d="M123.253 128.618c0 5.992-4.857 10.849-10.849 10.849s-10.849-4.857-10.849-10.849c0-5.991 4.857-10.849 10.849-10.849s10.849 4.858 10.849 10.849" fill="#FFF"/><path d="M148.618 50.008c0 5.386-4.366 9.752-9.752 9.752-5.386 0-9.752-4.366-9.752-9.752 0-5.387 4.366-9.753 9.752-9.753 5.386 0 9.752 4.366 9.752 9.753" fill="#669CFE"/><path d="M122.297 76.089c0 5.386-4.366 9.753-9.752 9.753-5.386 0-9.752-4.367-9.752-9.753s4.366-9.752 9.752-9.752c5.386 0 9.752 4.366 9.752 9.752" fill="#3FE7FE"/><path d="M96.06 102.471c0 5.386-4.367 9.752-9.753 9.752s-9.752-4.366-9.752-9.752c0-5.386 4.366-9.753 9.752-9.753 5.386 0 9.753 4.367 9.753 9.753" fill="#FFF"/><path d="M95.06 154.721a8.67 8.67 0 1 1-17.338-.002 8.67 8.67 0 0 1 17.338.002M121.185 180.846a8.67 8.67 0 1 1-17.338-.002 8.67 8.67 0 0 1 17.338.002M147.268 206.929a8.669 8.669 0 0 1-8.669 8.669 8.669 8.669 0 0 1-8.669-8.669 8.669 8.669 0 0 1 8.669-8.669 8.669 8.669 0 0 1 8.669 8.669M95.185 206.929a8.67 8.67 0 1 1-17.339 0 8.67 8.67 0 0 1 17.339 0M42.601 206.929a8.67 8.67 0 1 1-17.337 0 8.67 8.67 0 0 1 17.337 0M68.726 180.804a8.67 8.67 0 1 1-17.337 0 8.67 8.67 0 0 1 17.337 0" fill="#6A9EFE"/><path d="M95.172 50.032a9.06 9.06 0 0 1-18.118 0 9.06 9.06 0 1 1 18.118 0" fill="#3FE7FE"/><path d="M68.799 76.538a9.06 9.06 0 1 1-18.12 0 9.06 9.06 0 0 1 18.12 0M41.174 49.663a7.31 7.31 0 1 1-14.62 0 7.31 7.31 0 0 1 14.62 0" fill="#FFF"/></svg>
|
||||||
|
After Width: | Height: | Size: 2.9 KiB |
1
src/assets/database/redis.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg width="2500" height="2148" viewBox="0 0 256 220" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet"><path d="M245.97 168.943c-13.662 7.121-84.434 36.22-99.501 44.075-15.067 7.856-23.437 7.78-35.34 2.09-11.902-5.69-87.216-36.112-100.783-42.597C3.566 169.271 0 166.535 0 163.951v-25.876s98.05-21.345 113.879-27.024c15.828-5.679 21.32-5.884 34.79-.95 13.472 4.936 94.018 19.468 107.331 24.344l-.006 25.51c.002 2.558-3.07 5.364-10.024 8.988" fill="#912626"/><path d="M245.965 143.22c-13.661 7.118-84.431 36.218-99.498 44.072-15.066 7.857-23.436 7.78-35.338 2.09-11.903-5.686-87.214-36.113-100.78-42.594-13.566-6.485-13.85-10.948-.524-16.166 13.326-5.22 88.224-34.605 104.055-40.284 15.828-5.677 21.319-5.884 34.789-.948 13.471 4.934 83.819 32.935 97.13 37.81 13.316 4.881 13.827 8.9.166 16.02" fill="#C6302B"/><path d="M245.97 127.074c-13.662 7.122-84.434 36.22-99.501 44.078-15.067 7.853-23.437 7.777-35.34 2.087-11.903-5.687-87.216-36.112-100.783-42.597C3.566 127.402 0 124.67 0 122.085V96.206s98.05-21.344 113.879-27.023c15.828-5.679 21.32-5.885 34.79-.95C162.142 73.168 242.688 87.697 256 92.574l-.006 25.513c.002 2.557-3.07 5.363-10.024 8.987" fill="#912626"/><path d="M245.965 101.351c-13.661 7.12-84.431 36.218-99.498 44.075-15.066 7.854-23.436 7.777-35.338 2.087-11.903-5.686-87.214-36.112-100.78-42.594-13.566-6.483-13.85-10.947-.524-16.167C23.151 83.535 98.05 54.148 113.88 48.47c15.828-5.678 21.319-5.884 34.789-.949 13.471 4.934 83.819 32.933 97.13 37.81 13.316 4.88 13.827 8.9.166 16.02" fill="#C6302B"/><path d="M245.97 83.653c-13.662 7.12-84.434 36.22-99.501 44.078-15.067 7.854-23.437 7.777-35.34 2.087-11.903-5.687-87.216-36.113-100.783-42.595C3.566 83.98 0 81.247 0 78.665v-25.88s98.05-21.343 113.879-27.021c15.828-5.68 21.32-5.884 34.79-.95C162.142 29.749 242.688 44.278 256 49.155l-.006 25.512c.002 2.555-3.07 5.361-10.024 8.986" fill="#912626"/><path d="M245.965 57.93c-13.661 7.12-84.431 36.22-99.498 44.074-15.066 7.854-23.436 7.777-35.338 2.09C99.227 98.404 23.915 67.98 10.35 61.497-3.217 55.015-3.5 50.55 9.825 45.331 23.151 40.113 98.05 10.73 113.88 5.05c15.828-5.679 21.319-5.883 34.789-.948 13.471 4.935 83.819 32.934 97.13 37.811 13.316 4.876 13.827 8.897.166 16.017" fill="#C6302B"/><path d="M159.283 32.757l-22.01 2.285-4.927 11.856-7.958-13.23-25.415-2.284 18.964-6.839-5.69-10.498 17.755 6.944 16.738-5.48-4.524 10.855 17.067 6.391M131.032 90.275L89.955 73.238l58.86-9.035-17.783 26.072M74.082 39.347c17.375 0 31.46 5.46 31.46 12.194 0 6.736-14.085 12.195-31.46 12.195s-31.46-5.46-31.46-12.195c0-6.734 14.085-12.194 31.46-12.194" fill="#FFF"/><path d="M185.295 35.998l34.836 13.766-34.806 13.753-.03-27.52" fill="#621B1C"/><path d="M146.755 51.243l38.54-15.245.03 27.519-3.779 1.478-34.791-13.752" fill="#9A2928"/></svg>
|
||||||
|
After Width: | Height: | Size: 2.7 KiB |
1
src/assets/database/trino.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42.1 62.45"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#dd00a1;}.cls-3{fill:#f9d8d2;}.cls-4{fill:#10110e;}.cls-5{fill:#e5e5e5;}.cls-6{fill:#8accce;opacity:0.2;isolation:isolate;}.cls-7{fill:#515151;}</style></defs><path class="cls-1" d="M14.24,55.36c.92-.61-1.49-.38-1.69-.79a15,15,0,0,1-2.82-.51C8,53.62,3.9,50.85,3.47,48.25s0-7.65,1.83-10.61A17,17,0,0,1,9.73,33S6.16,24.51,5.85,18.1,6,.21,10.24,0s3.49,10.48,2.82,17.43a89.47,89.47,0,0,0-.21,13.89,19.45,19.45,0,0,1,5.51-.92,21.2,21.2,0,0,1,4.9.46S24.58,21,29,14.86,38,2.4,41,4.19s-.81,8.19-3.46,11.52-7.25,8.33-8.78,11a47.26,47.26,0,0,0-2.65,5.51,15,15,0,0,1,6.4,6.32c2.07,4.28,2.27,9.59,1.15,11.83a8.1,8.1,0,0,1-5.61,4c-1.32.1-6.91,1.48-6.91,1.48Z" transform="translate(0 0)"/><path class="cls-2" d="M24,30.94s3.33-8.7,6.32-13.6,7-8.59,8.26-7.84S36,14.85,32.66,19.32a112.3,112.3,0,0,0-7.44,12.37Z" transform="translate(0 0)"/><path class="cls-2" d="M10.64,32.44l.95-.75s-.13-8.7,0-14S12,5.78,10.23,5.85,7.23,11,7.92,18.23A86.92,86.92,0,0,0,10.64,32.44Z" transform="translate(0 0)"/><circle class="cls-3" cx="7.65" cy="49.17" r="1.94"/><circle class="cls-3" cx="30.57" cy="49.17" r="1.94"/><path class="cls-4" d="M22.33,49a.19.19,0,0,0-.25,0h0s-.57,1-1.41,1.06a2.11,2.11,0,0,1-1.5-.7V48c.54-.29,1.41-1.19,1.41-1.5a1.4,1.4,0,0,0-1.5-1.09c-1,0-1.7.65-1.7,1.19s1.1,1.23,1.41,1.44v1.45a1.77,1.77,0,0,1-1.3.7c-.8,0-1.4-1.08-1.4-1.09a.19.19,0,0,0-.25-.08h0a.18.18,0,0,0-.08.23h0c0,.06.71,1.29,1.73,1.29a2.07,2.07,0,0,0,1.5-.72,2.46,2.46,0,0,0,1.59.73h.14a2.47,2.47,0,0,0,1.71-1.25.18.18,0,0,0,0-.25A.24.24,0,0,0,22.33,49Z" transform="translate(0 0)"/><path class="cls-5" d="M9.73,33S7,26,6.42,22.29s-1-9.78-.3-13.85A46.3,46.3,0,0,1,7.31,2.85S6,12.34,6.49,16.49,9.73,33,9.73,33Z" transform="translate(0 0)"/><path class="cls-5" d="M23.26,30.85s2-10.59,4.91-14.76S34.73,6.9,36.52,5.62l1.82-1.28S31,12,28.17,18.34,23.26,30.85,23.26,30.85Z" transform="translate(0 0)"/><path class="cls-4" d="M11.6,42.85a1.52,1.52,0,1,0,1.52,1.52h0a1.52,1.52,0,0,0-1.5-1.52Zm.4,1.41a.42.42,0,1,1,.42-.42h0a.42.42,0,0,1-.41.43h0Z" transform="translate(0 0)"/><path class="cls-4" d="M26.55,42.85a1.52,1.52,0,1,0,1.51,1.53h0a1.52,1.52,0,0,0-1.51-1.53ZM27,44.26a.42.42,0,0,1-.43-.41h0a.43.43,0,0,1,.41-.43.42.42,0,0,1,.43.41h0a.41.41,0,0,1-.4.42h0Z" transform="translate(0 0)"/><ellipse class="cls-6" cx="19.36" cy="44.95" rx="14.1" ry="10.16"/><path class="cls-1" d="M36.43,39.3V32.58a2.46,2.46,0,0,0,1.91-2.29,2.65,2.65,0,0,0-5.27,0A2.48,2.48,0,0,0,35,32.58v6.55h-.2c-2-6.94-7.91-11.28-15.63-11.28S5.51,32.15,3.55,39.13H2.88A2.76,2.76,0,0,0,0,41.71v5.14a2.75,2.75,0,0,0,2.88,2.59h.91a13,13,0,0,0,3.59,5.11L6.09,55.72A.78.78,0,0,0,6,56.82l0,0H6c2.93,3.53,7.72,5.6,13.13,5.6s10.21-2,13.14-5.6a.79.79,0,0,0-.09-1.11h0l-1.3-1.19a13,13,0,0,0,3.59-5.08h1a2.74,2.74,0,0,0,2.87-2.6V41.71A2.58,2.58,0,0,0,36.43,39.3Zm-17.26-4c7.14,0,12.94,4.7,12.94,10.47,0,6.25-6.51,9-12.94,9S6.23,52,6.23,45.72C6.23,40,12,35.25,19.17,35.25Z" transform="translate(0 0)"/><path class="cls-7" d="M36.91,45.16H35v-1a18.61,18.61,0,0,0-.39-3.79h.82a1.35,1.35,0,0,1,1.44,1.25h0Z" transform="translate(0 0)"/><path class="cls-7" d="M35.47,48.18h-1A16.13,16.13,0,0,0,34.89,46h2v.85a1.34,1.34,0,0,1-1.36,1.32h-.06Z" transform="translate(0 0)"/><path class="cls-7" d="M19.17,61.1c-4.79,0-9.06-1.72-11.74-4.78l1.3-1.21a17.87,17.87,0,0,0,10.4,3,17.73,17.73,0,0,0,10.4-3l1.35,1.21C28.23,59.38,24,61.1,19.17,61.1Z" transform="translate(0 0)"/><path class="cls-7" d="M2.88,40.42h.85a19.33,19.33,0,0,0-.38,3.79,8.34,8.34,0,0,0,0,1H1.49v-3.5a1.27,1.27,0,0,1,1.24-1.29Z" transform="translate(0 0)"/><path d="M19.17,34.39a17.66,17.66,0,0,0-4.79.69V29.85a17.23,17.23,0,0,1,4.79-.64,17.3,17.3,0,0,1,4.8.64v5.26A15.91,15.91,0,0,0,19.17,34.39Z" transform="translate(0 0)"/><path class="cls-7" d="M1.44,46h2a17.56,17.56,0,0,0,.43,2.16h-1a1.35,1.35,0,0,1-1.44-1.25h0V46Z" transform="translate(0 0)"/><ellipse class="cls-7" cx="35.71" cy="30.29" rx="1.2" ry="1.08"/></svg>
|
||||||
|
After Width: | Height: | Size: 3.9 KiB |
BIN
src/assets/fonts/element-icons.ttf
Normal file
BIN
src/assets/fonts/element-icons.woff
Normal file
@@ -1 +1 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" class="icon" p-id="6717" t="1547360688278" version="1.1" viewBox="0 0 1024 1024"><defs><style type="text/css"/></defs><path fill="#bfbfbf" d="M890 120H134a70 70 0 0 0-70 70v500a70 70 0 0 0 70 70h756a70 70 0 0 0 70-70V190a70 70 0 0 0-70-70z m-10 520a40 40 0 0 1-40 40H712V448a40 40 0 0 0-80 0v232h-80V368a40 40 0 0 0-80 0v312h-80V512a40 40 0 0 0-80 0v168H184a40 40 0 0 1-40-40V240a40 40 0 0 1 40-40h656a40 40 0 0 1 40 40zM696 824H328a40 40 0 0 0 0 80h368a40 40 0 0 0 0-80z" p-id="6718"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" class="icon" p-id="6717" t="1547360688278" version="1.1" viewBox="0 0 1024 1024"><defs><style type="text/css"/></defs><path fill="#000" d="M890 120H134a70 70 0 0 0-70 70v500a70 70 0 0 0 70 70h756a70 70 0 0 0 70-70V190a70 70 0 0 0-70-70z m-10 520a40 40 0 0 1-40 40H712V448a40 40 0 0 0-80 0v232h-80V368a40 40 0 0 0-80 0v312h-80V512a40 40 0 0 0-80 0v168H184a40 40 0 0 1-40-40V240a40 40 0 0 1 40-40h656a40 40 0 0 1 40 40zM696 824H328a40 40 0 0 0 0 80h368a40 40 0 0 0 0-80z" p-id="6718"/></svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 598 B |
@@ -1 +1 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" class="icon" p-id="2807" t="1547195013953" version="1.1" viewBox="0 0 1024 1024"><defs><style type="text/css"/></defs><path fill="#cdcdcd" d="M529.0496 527.616l-30.7712-30.7456 85.0688-85.0944 30.7712 30.7712z" p-id="2808"/><path fill="#cdcdcd" d="M0 340.48l427.52 256 248.32 427.52L1024 0l-1024 340.48zM665.6 921.6l-207.36-355.84-355.84-212.48L911.36 81.92l-243.2 243.2 30.72 30.72 243.2-243.2L665.6 921.6z" p-id="2809"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" class="icon" p-id="2807" t="1547195013953" version="1.1" viewBox="0 0 1024 1024"><defs><style type="text/css"/></defs><path fill="#000" d="M529.0496 527.616l-30.7712-30.7456 85.0688-85.0944 30.7712 30.7712z" p-id="2808"/><path fill="#000" d="M0 340.48l427.52 256 248.32 427.52L1024 0l-1024 340.48zM665.6 921.6l-207.36-355.84-355.84-212.48L911.36 81.92l-243.2 243.2 30.72 30.72 243.2-243.2L665.6 921.6z" p-id="2809"/></svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 531 B |
@@ -1 +1 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" class="icon" p-id="1497" t="1554868028575" version="1.1" viewBox="0 0 1024 1024"><defs><style type="text/css"/></defs><path fill="#bfbfbf" d="M558.409143 658.285714h-92.818286l-28.379428 62.427429a18.285714 18.285714 0 1 1-33.28-15.140572l91.428571-201.142857a18.285714 18.285714 0 0 1 33.28 0l91.428571 201.142857a18.285714 18.285714 0 1 1-33.28 15.140572L558.409143 658.285714z m-16.64-36.571428L512 556.178286 482.230857 621.714286h59.538286zM329.142857 128h475.428572a18.285714 18.285714 0 1 1 0 36.571429H329.142857a91.428571 91.428571 0 0 0 0 182.857142h475.428572a18.285714 18.285714 0 0 1 18.285714 18.285715v512a18.285714 18.285714 0 0 1-18.285714 18.285714H329.142857A128 128 0 0 1 201.142857 768V256A128 128 0 0 1 329.142857 128zM237.714286 345.6V768A91.428571 91.428571 0 0 0 329.142857 859.428571h457.142857v-475.428571H329.142857a127.634286 127.634286 0 0 1-91.428571-38.4zM329.142857 274.285714a18.285714 18.285714 0 0 1 0-36.571428h438.857143a18.285714 18.285714 0 1 1 0 36.571428H329.142857z" p-id="1498"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" class="icon" p-id="1497" t="1554868028575" version="1.1" viewBox="0 0 1024 1024"><defs><style type="text/css"/></defs><path fill="#000" d="M558.409143 658.285714h-92.818286l-28.379428 62.427429a18.285714 18.285714 0 1 1-33.28-15.140572l91.428571-201.142857a18.285714 18.285714 0 0 1 33.28 0l91.428571 201.142857a18.285714 18.285714 0 1 1-33.28 15.140572L558.409143 658.285714z m-16.64-36.571428L512 556.178286 482.230857 621.714286h59.538286zM329.142857 128h475.428572a18.285714 18.285714 0 1 1 0 36.571429H329.142857a91.428571 91.428571 0 0 0 0 182.857142h475.428572a18.285714 18.285714 0 0 1 18.285714 18.285715v512a18.285714 18.285714 0 0 1-18.285714 18.285714H329.142857A128 128 0 0 1 201.142857 768V256A128 128 0 0 1 329.142857 128zM237.714286 345.6V768A91.428571 91.428571 0 0 0 329.142857 859.428571h457.142857v-475.428571H329.142857a127.634286 127.634286 0 0 1-91.428571-38.4zM329.142857 274.285714a18.285714 18.285714 0 0 1 0-36.571428h438.857143a18.285714 18.285714 0 1 1 0 36.571428H329.142857z" p-id="1498"/></svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1572170050760" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5149" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="400"><defs><style type="text/css"></style></defs><path d="M219.428571 658.285714q0-30.285714-21.428571-51.714285T146.285714 585.142857t-51.714285 21.428572T73.142857 658.285714t21.428572 51.714286T146.285714 731.428571t51.714286-21.428571T219.428571 658.285714z m109.714286-256q0-30.285714-21.428571-51.714285T256 329.142857t-51.714286 21.428572T182.857143 402.285714t21.428571 51.714286T256 475.428571t51.714286-21.428571T329.142857 402.285714z m244.571429 274.857143l57.714285-218.285714q3.428571-14.857143-4.285714-27.714286T605.142857 414.285714t-27.428571 3.714286-17.142857 22.571429l-57.714286 218.285714q-34.285714 2.857143-61.142857 24.857143t-36 56.285714q-11.428571 44 11.428571 83.428571t66.857143 50.857143 83.428571-11.428571 50.857143-66.857143q9.142857-34.285714-3.428571-66.857143t-41.142857-52z m377.142857-18.857143q0-30.285714-21.428572-51.714285T877.714286 585.142857t-51.714286 21.428572-21.428571 51.714285 21.428571 51.714286 51.714286 21.428571 51.714285-21.428571 21.428572-51.714286z m-365.714286-365.714285q0-30.285714-21.428571-51.714286T512 219.428571t-51.714286 21.428572T438.857143 292.571429t21.428571 51.714285T512 365.714286t51.714286-21.428572T585.142857 292.571429z m256 109.714285q0-30.285714-21.428571-51.714285T768 329.142857t-51.714286 21.428572T694.857143 402.285714t21.428571 51.714286T768 475.428571t51.714286-21.428571T841.142857 402.285714z m182.857143 256q0 149.142857-80.571429 276-10.857143 16.571429-30.857142 16.571429H111.428571q-20 0-30.857142-16.571429Q0 808 0 658.285714q0-104 40.571429-198.857143t109.142857-163.428571 163.428571-109.142857 198.857143-40.571429 198.857143 40.571429 163.428571 109.142857 109.142857 163.428571 40.571429 198.857143z" p-id="5150" fill="#bfbfbf"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1572170050760" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5149" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="400"><defs><style type="text/css"></style></defs><path d="M219.428571 658.285714q0-30.285714-21.428571-51.714285T146.285714 585.142857t-51.714285 21.428572T73.142857 658.285714t21.428572 51.714286T146.285714 731.428571t51.714286-21.428571T219.428571 658.285714z m109.714286-256q0-30.285714-21.428571-51.714285T256 329.142857t-51.714286 21.428572T182.857143 402.285714t21.428571 51.714286T256 475.428571t51.714286-21.428571T329.142857 402.285714z m244.571429 274.857143l57.714285-218.285714q3.428571-14.857143-4.285714-27.714286T605.142857 414.285714t-27.428571 3.714286-17.142857 22.571429l-57.714286 218.285714q-34.285714 2.857143-61.142857 24.857143t-36 56.285714q-11.428571 44 11.428571 83.428571t66.857143 50.857143 83.428571-11.428571 50.857143-66.857143q9.142857-34.285714-3.428571-66.857143t-41.142857-52z m377.142857-18.857143q0-30.285714-21.428572-51.714285T877.714286 585.142857t-51.714286 21.428572-21.428571 51.714285 21.428571 51.714286 51.714286 21.428571 51.714285-21.428571 21.428572-51.714286z m-365.714286-365.714285q0-30.285714-21.428571-51.714286T512 219.428571t-51.714286 21.428572T438.857143 292.571429t21.428571 51.714285T512 365.714286t51.714286-21.428572T585.142857 292.571429z m256 109.714285q0-30.285714-21.428571-51.714285T768 329.142857t-51.714286 21.428572T694.857143 402.285714t21.428571 51.714286T768 475.428571t51.714286-21.428571T841.142857 402.285714z m182.857143 256q0 149.142857-80.571429 276-10.857143 16.571429-30.857142 16.571429H111.428571q-20 0-30.857142-16.571429Q0 808 0 658.285714q0-104 40.571429-198.857143t109.142857-163.428571 163.428571-109.142857 198.857143-40.571429 198.857143 40.571429 163.428571 109.142857 109.142857 163.428571 40.571429 198.857143z" p-id="5150" fill="#000"></path></svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1649727721107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21653" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M554.666667 896v85.333333h-85.333334v-85.333333h-341.333333A42.666667 42.666667 0 0 1 85.333333 853.333333V256h853.333334V853.333333a42.666667 42.666667 0 0 1-42.666667 42.666667h-341.333333zM341.333333 426.666667a128 128 0 1 0 128 128H341.333333V426.666667z m213.333334 0V512h256V426.666667h-256z m0 170.666666V682.666667h256v-85.333334h-256zM85.333333 128h853.333334v85.333333h-853.333334v-85.333333z" p-id="21654" fill="#bfbfbf"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1649727721107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21653" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M554.666667 896v85.333333h-85.333334v-85.333333h-341.333333A42.666667 42.666667 0 0 1 85.333333 853.333333V256h853.333334V853.333333a42.666667 42.666667 0 0 1-42.666667 42.666667h-341.333333zM341.333333 426.666667a128 128 0 1 0 128 128H341.333333V426.666667z m213.333334 0V512h256V426.666667h-256z m0 170.666666V682.666667h256v-85.333334h-256zM85.333333 128h853.333334v85.333333h-853.333334v-85.333333z" p-id="21654" fill="#000"></path></svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 823 B After Width: | Height: | Size: 821 B |
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1574576420335" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9530" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M915.94 827.89h-91.42a12.5 12.5 0 0 1 0-25h78.92v-535h-78.92a12.5 12.5 0 1 1 0-25h91.42a12.5 12.5 0 0 1 12.5 12.5v560a12.5 12.5 0 0 1-12.5 12.5z" fill="#cdcdcd" p-id="9531"></path><path d="M915.94 547.91h-91.42a12.5 12.5 0 0 1 0-25h91.42a12.5 12.5 0 0 1 0 25z" fill="#cdcdcd" p-id="9532"></path><path d="M774.6 231.51a90.63 90.63 0 0 1-90.37 90.37H215.94a90.62 90.62 0 0 1-81.18-50.81 88.92 88.92 0 0 0 15.4 1.33h468.29a90.26 90.26 0 0 0 81.18-129.92c42.44 7.35 74.97 44.57 74.97 89.03z" fill="#cdcdcd" p-id="9533"></path><path d="M684.23 334.38H215.94a102.23 102.23 0 0 1-55.12-16.11 103.66 103.66 0 0 1-37.28-41.69 12.5 12.5 0 0 1 13.38-17.82 76.71 76.71 0 0 0 13.24 1.14h468.29a77.76 77.76 0 0 0 70-111.91 12.5 12.5 0 0 1 13.35-17.83 103.18 103.18 0 0 1 85.3 101.35 103.13 103.13 0 0 1-102.87 102.87zM159.46 284.9a78.31 78.31 0 0 0 56.48 24.48h468.29a77.75 77.75 0 0 0 59.28-128.2 78.73 78.73 0 0 0-24.14-19.08 103.06 103.06 0 0 1-100.92 122.8z" fill="#cdcdcd" p-id="9534"></path><path d="M618.45 284.91H150.16a102.86 102.86 0 1 1 0-205.73h468.29a102.86 102.86 0 0 1 0 205.73zM150.16 104.18a77.86 77.86 0 1 0 0 155.73h468.29a77.86 77.86 0 0 0 0-155.73z" fill="#cdcdcd" p-id="9535"></path><path d="M176.2 235.43A53.39 53.39 0 1 1 229.59 182a53.45 53.45 0 0 1-53.39 53.43z m0-81.78A28.39 28.39 0 1 0 204.59 182a28.43 28.43 0 0 0-28.39-28.35zM551.12 194.54H423a12.5 12.5 0 0 1 0-25h128.12a12.5 12.5 0 0 1 0 25z" fill="#cdcdcd" p-id="9536"></path><path d="M774.6 534.74a90.63 90.63 0 0 1-90.37 90.37H215.94a90.62 90.62 0 0 1-81.18-50.81 88.92 88.92 0 0 0 15.4 1.33h468.29a90.26 90.26 0 0 0 81.18-129.92c42.44 7.35 74.97 44.57 74.97 89.03z" fill="#cdcdcd" p-id="9537"></path><path d="M684.23 637.61H215.94a102.23 102.23 0 0 1-55.12-16.11 103.66 103.66 0 0 1-37.28-41.69A12.5 12.5 0 0 1 136.92 562a76.71 76.71 0 0 0 13.24 1.14h468.29a77.76 77.76 0 0 0 70-111.91 12.5 12.5 0 0 1 13.35-17.83 103.18 103.18 0 0 1 85.3 101.34 103.13 103.13 0 0 1-102.87 102.87z m-524.77-49.48a78.31 78.31 0 0 0 56.48 24.48h468.29a77.75 77.75 0 0 0 59.28-128.2 78.73 78.73 0 0 0-24.14-19.08 103.06 103.06 0 0 1-100.92 122.8z" fill="#cdcdcd" p-id="9538"></path><path d="M618.45 588.13H150.16a102.86 102.86 0 1 1 0-205.73h468.29a102.86 102.86 0 0 1 0 205.73zM150.16 407.4a77.86 77.86 0 1 0 0 155.73h468.29a77.86 77.86 0 0 0 0-155.73z" fill="#cdcdcd" p-id="9539"></path><path d="M176.2 538.66a53.39 53.39 0 1 1 53.39-53.39 53.45 53.45 0 0 1-53.39 53.39z m0-81.78a28.39 28.39 0 1 0 28.39 28.39 28.43 28.43 0 0 0-28.39-28.39zM551.12 497.77H423a12.5 12.5 0 0 1 0-25h128.12a12.5 12.5 0 0 1 0 25z" fill="#cdcdcd" p-id="9540"></path><path d="M774.6 869.33a90.63 90.63 0 0 1-90.37 90.37H215.94a90.62 90.62 0 0 1-81.18-50.81 88.92 88.92 0 0 0 15.4 1.33h468.29a90.26 90.26 0 0 0 81.18-129.92c42.44 7.35 74.97 44.57 74.97 89.03z" fill="#cdcdcd" p-id="9541"></path><path d="M684.23 972.2H215.94a102.23 102.23 0 0 1-55.12-16.11 103.66 103.66 0 0 1-37.28-41.69 12.5 12.5 0 0 1 13.38-17.82 76.71 76.71 0 0 0 13.24 1.14h468.29a77.76 77.76 0 0 0 70-111.91A12.5 12.5 0 0 1 701.76 768a102.73 102.73 0 0 1 55.14 174 102.16 102.16 0 0 1-72.67 30.2z m-524.77-49.48a78.31 78.31 0 0 0 56.48 24.48h468.29A77.75 77.75 0 0 0 743.51 819a78.71 78.71 0 0 0-24.14-19.08 103.06 103.06 0 0 1-100.92 122.8z" fill="#cdcdcd" p-id="9542"></path><path d="M618.45 922.72H150.16a102.86 102.86 0 1 1 0-205.73h468.29a102.86 102.86 0 0 1 0 205.73zM150.16 742a77.86 77.86 0 1 0 0 155.73h468.29a77.86 77.86 0 1 0 0-155.73z" fill="#cdcdcd" p-id="9543"></path><path d="M176.2 873.25a53.39 53.39 0 1 1 53.39-53.39 53.45 53.45 0 0 1-53.39 53.39z m0-81.78a28.39 28.39 0 1 0 28.39 28.39 28.42 28.42 0 0 0-28.39-28.4zM551.12 832.35H423a12.5 12.5 0 0 1 0-25h128.12a12.5 12.5 0 0 1 0 25z" fill="#cdcdcd" p-id="9544"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1574576420335" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9530" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M915.94 827.89h-91.42a12.5 12.5 0 0 1 0-25h78.92v-535h-78.92a12.5 12.5 0 1 1 0-25h91.42a12.5 12.5 0 0 1 12.5 12.5v560a12.5 12.5 0 0 1-12.5 12.5z" fill="#000" p-id="9531"></path><path d="M915.94 547.91h-91.42a12.5 12.5 0 0 1 0-25h91.42a12.5 12.5 0 0 1 0 25z" fill="#000" p-id="9532"></path><path d="M774.6 231.51a90.63 90.63 0 0 1-90.37 90.37H215.94a90.62 90.62 0 0 1-81.18-50.81 88.92 88.92 0 0 0 15.4 1.33h468.29a90.26 90.26 0 0 0 81.18-129.92c42.44 7.35 74.97 44.57 74.97 89.03z" fill="#000" p-id="9533"></path><path d="M684.23 334.38H215.94a102.23 102.23 0 0 1-55.12-16.11 103.66 103.66 0 0 1-37.28-41.69 12.5 12.5 0 0 1 13.38-17.82 76.71 76.71 0 0 0 13.24 1.14h468.29a77.76 77.76 0 0 0 70-111.91 12.5 12.5 0 0 1 13.35-17.83 103.18 103.18 0 0 1 85.3 101.35 103.13 103.13 0 0 1-102.87 102.87zM159.46 284.9a78.31 78.31 0 0 0 56.48 24.48h468.29a77.75 77.75 0 0 0 59.28-128.2 78.73 78.73 0 0 0-24.14-19.08 103.06 103.06 0 0 1-100.92 122.8z" fill="#000" p-id="9534"></path><path d="M618.45 284.91H150.16a102.86 102.86 0 1 1 0-205.73h468.29a102.86 102.86 0 0 1 0 205.73zM150.16 104.18a77.86 77.86 0 1 0 0 155.73h468.29a77.86 77.86 0 0 0 0-155.73z" fill="#000" p-id="9535"></path><path d="M176.2 235.43A53.39 53.39 0 1 1 229.59 182a53.45 53.45 0 0 1-53.39 53.43z m0-81.78A28.39 28.39 0 1 0 204.59 182a28.43 28.43 0 0 0-28.39-28.35zM551.12 194.54H423a12.5 12.5 0 0 1 0-25h128.12a12.5 12.5 0 0 1 0 25z" fill="#000" p-id="9536"></path><path d="M774.6 534.74a90.63 90.63 0 0 1-90.37 90.37H215.94a90.62 90.62 0 0 1-81.18-50.81 88.92 88.92 0 0 0 15.4 1.33h468.29a90.26 90.26 0 0 0 81.18-129.92c42.44 7.35 74.97 44.57 74.97 89.03z" fill="#000" p-id="9537"></path><path d="M684.23 637.61H215.94a102.23 102.23 0 0 1-55.12-16.11 103.66 103.66 0 0 1-37.28-41.69A12.5 12.5 0 0 1 136.92 562a76.71 76.71 0 0 0 13.24 1.14h468.29a77.76 77.76 0 0 0 70-111.91 12.5 12.5 0 0 1 13.35-17.83 103.18 103.18 0 0 1 85.3 101.34 103.13 103.13 0 0 1-102.87 102.87z m-524.77-49.48a78.31 78.31 0 0 0 56.48 24.48h468.29a77.75 77.75 0 0 0 59.28-128.2 78.73 78.73 0 0 0-24.14-19.08 103.06 103.06 0 0 1-100.92 122.8z" fill="#000" p-id="9538"></path><path d="M618.45 588.13H150.16a102.86 102.86 0 1 1 0-205.73h468.29a102.86 102.86 0 0 1 0 205.73zM150.16 407.4a77.86 77.86 0 1 0 0 155.73h468.29a77.86 77.86 0 0 0 0-155.73z" fill="#000" p-id="9539"></path><path d="M176.2 538.66a53.39 53.39 0 1 1 53.39-53.39 53.45 53.45 0 0 1-53.39 53.39z m0-81.78a28.39 28.39 0 1 0 28.39 28.39 28.43 28.43 0 0 0-28.39-28.39zM551.12 497.77H423a12.5 12.5 0 0 1 0-25h128.12a12.5 12.5 0 0 1 0 25z" fill="#000" p-id="9540"></path><path d="M774.6 869.33a90.63 90.63 0 0 1-90.37 90.37H215.94a90.62 90.62 0 0 1-81.18-50.81 88.92 88.92 0 0 0 15.4 1.33h468.29a90.26 90.26 0 0 0 81.18-129.92c42.44 7.35 74.97 44.57 74.97 89.03z" fill="#000" p-id="9541"></path><path d="M684.23 972.2H215.94a102.23 102.23 0 0 1-55.12-16.11 103.66 103.66 0 0 1-37.28-41.69 12.5 12.5 0 0 1 13.38-17.82 76.71 76.71 0 0 0 13.24 1.14h468.29a77.76 77.76 0 0 0 70-111.91A12.5 12.5 0 0 1 701.76 768a102.73 102.73 0 0 1 55.14 174 102.16 102.16 0 0 1-72.67 30.2z m-524.77-49.48a78.31 78.31 0 0 0 56.48 24.48h468.29A77.75 77.75 0 0 0 743.51 819a78.71 78.71 0 0 0-24.14-19.08 103.06 103.06 0 0 1-100.92 122.8z" fill="#000" p-id="9542"></path><path d="M618.45 922.72H150.16a102.86 102.86 0 1 1 0-205.73h468.29a102.86 102.86 0 0 1 0 205.73zM150.16 742a77.86 77.86 0 1 0 0 155.73h468.29a77.86 77.86 0 1 0 0-155.73z" fill="#000" p-id="9543"></path><path d="M176.2 873.25a53.39 53.39 0 1 1 53.39-53.39 53.45 53.45 0 0 1-53.39 53.39z m0-81.78a28.39 28.39 0 1 0 28.39 28.39 28.42 28.42 0 0 0-28.39-28.4zM551.12 832.35H423a12.5 12.5 0 0 1 0-25h128.12a12.5 12.5 0 0 1 0 25z" fill="#000" p-id="9544"></path></svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -1 +1 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="211.719" height="200" class="icon" p-id="10233" t="1543827724451" version="1.1" viewBox="0 0 1084 1024"><defs><style type="text/css">@font-face{font-family:rbicon;src:url(chrome-extension://dipiagiiohfljcicegpgffpbnjmgjcnf/fonts/rbicon.woff2) format("woff2");font-weight:400;font-style:normal}</style></defs><path fill="#bfbfbf" d="M1080.09609 434.500756c-4.216302-23.731757-26.9241-47.945376-50.595623-53.185637l-17.648235-4.095836a175.940257 175.940257 0 0 1-101.612877-80.832531 177.807476 177.807476 0 0 1-18.732427-129.801867l5.541425-16.684509c7.10748-23.129428-2.108151-54.992624-20.599646-70.833873 0 0-16.624276-14.094495-63.244529-41.199293-46.800951-26.984332-66.858502-34.513443-66.858502-34.513443-22.76803-8.372371-54.631227-0.361397-71.255503 17.407304l-12.287509 13.251234a173.470708 173.470708 0 0 1-120.465769 48.065842A174.13327 174.13327 0 0 1 421.329029 33.590675L409.583617 20.761071C393.140039 2.99237 361.096144-4.898138 338.267881 3.353767c0 0-20.358715 7.529111-67.099434 34.513443-46.800951 27.34573-63.244529 41.440225-63.244529 41.440225-18.431263 15.66055-27.646894 47.222582-20.539413 70.592941l5.059562 16.865207a178.048407 178.048407 0 0 1-18.672194 129.621169 174.916297 174.916297 0 0 1-102.275439 81.073463l-17.045906 3.854904c-23.310126 5.42096-46.258856 29.333415-50.595623 53.185637 0 0-3.854905 21.382674-3.854905 75.712737 0 54.330062 3.854905 75.712736 3.854905 75.712736 4.216302 23.972688 26.9241 47.945376 50.595623 53.185637l16.624276 3.854905a174.253736 174.253736 0 0 1 102.395904 81.314394c23.310126 40.837896 28.911785 87.337683 18.732427 129.801867l-4.81863 16.443578c-7.10748 23.129428 2.108151 54.992624 20.599646 70.833872 0 0 16.624276 14.094495 63.244529 41.199293 46.800951 27.104798 66.918735 34.513443 66.918735 34.513443 22.707798 8.372371 54.631227 0.361397 71.255503-17.407303l11.624947-12.588673a175.096996 175.096996 0 0 1 242.256662 0.120465l11.624947 12.648906c16.383345 17.708468 48.427239 25.598976 71.255503 17.347071 0 0 20.358715-7.529111 67.159666-34.513443 46.740719-27.104798 63.124063-41.199293 63.124064-41.199293 18.491496-15.600317 27.707127-47.463513 20.599646-70.833873l-5.059562-17.106139a176.723284 176.723284 0 0 1 18.672194-129.139305 176.060722 176.060722 0 0 1 102.395904-81.314394l16.68451-3.854905c23.310126-5.42096 46.258856-29.333415 50.595623-53.185637 0 0 3.854905-21.382674 3.854904-75.712737-0.240932-54.330062-4.095836-75.833202-4.095836-75.833202z m-537.819428 293.334149c-119.261112 0-216.175824-97.336342-216.175824-217.621412a216.657687 216.657687 0 0 1 216.236057-217.320249c119.200879 0 216.115591 97.276109 216.11559 217.56118-0.240932 120.044139-96.974945 217.320248-216.175823 217.320249z" p-id="10234"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="211.719" height="200" class="icon" p-id="10233" t="1543827724451" version="1.1" viewBox="0 0 1084 1024"><defs><style type="text/css">@font-face{font-family:rbicon;src:url(chrome-extension://dipiagiiohfljcicegpgffpbnjmgjcnf/fonts/rbicon.woff2) format("woff2");font-weight:400;font-style:normal}</style></defs><path fill="#000" d="M1080.09609 434.500756c-4.216302-23.731757-26.9241-47.945376-50.595623-53.185637l-17.648235-4.095836a175.940257 175.940257 0 0 1-101.612877-80.832531 177.807476 177.807476 0 0 1-18.732427-129.801867l5.541425-16.684509c7.10748-23.129428-2.108151-54.992624-20.599646-70.833873 0 0-16.624276-14.094495-63.244529-41.199293-46.800951-26.984332-66.858502-34.513443-66.858502-34.513443-22.76803-8.372371-54.631227-0.361397-71.255503 17.407304l-12.287509 13.251234a173.470708 173.470708 0 0 1-120.465769 48.065842A174.13327 174.13327 0 0 1 421.329029 33.590675L409.583617 20.761071C393.140039 2.99237 361.096144-4.898138 338.267881 3.353767c0 0-20.358715 7.529111-67.099434 34.513443-46.800951 27.34573-63.244529 41.440225-63.244529 41.440225-18.431263 15.66055-27.646894 47.222582-20.539413 70.592941l5.059562 16.865207a178.048407 178.048407 0 0 1-18.672194 129.621169 174.916297 174.916297 0 0 1-102.275439 81.073463l-17.045906 3.854904c-23.310126 5.42096-46.258856 29.333415-50.595623 53.185637 0 0-3.854905 21.382674-3.854905 75.712737 0 54.330062 3.854905 75.712736 3.854905 75.712736 4.216302 23.972688 26.9241 47.945376 50.595623 53.185637l16.624276 3.854905a174.253736 174.253736 0 0 1 102.395904 81.314394c23.310126 40.837896 28.911785 87.337683 18.732427 129.801867l-4.81863 16.443578c-7.10748 23.129428 2.108151 54.992624 20.599646 70.833872 0 0 16.624276 14.094495 63.244529 41.199293 46.800951 27.104798 66.918735 34.513443 66.918735 34.513443 22.707798 8.372371 54.631227 0.361397 71.255503-17.407303l11.624947-12.588673a175.096996 175.096996 0 0 1 242.256662 0.120465l11.624947 12.648906c16.383345 17.708468 48.427239 25.598976 71.255503 17.347071 0 0 20.358715-7.529111 67.159666-34.513443 46.740719-27.104798 63.124063-41.199293 63.124064-41.199293 18.491496-15.600317 27.707127-47.463513 20.599646-70.833873l-5.059562-17.106139a176.723284 176.723284 0 0 1 18.672194-129.139305 176.060722 176.060722 0 0 1 102.395904-81.314394l16.68451-3.854905c23.310126-5.42096 46.258856-29.333415 50.595623-53.185637 0 0 3.854905-21.382674 3.854904-75.712737-0.240932-54.330062-4.095836-75.833202-4.095836-75.833202z m-537.819428 293.334149c-119.261112 0-216.175824-97.336342-216.175824-217.621412a216.657687 216.657687 0 0 1 216.236057-217.320249c119.200879 0 216.115591 97.276109 216.11559 217.56118-0.240932 120.044139-96.974945 217.320248-216.175823 217.320249z" p-id="10234"/></svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
src/assets/images/data.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
3
src/assets/images/icon-unlock.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.79171 4.37499C3.79171 2.60308 5.22813 1.16666 7.00004 1.16666C8.77196 1.16666 10.2084 2.60308 10.2084 4.37499H9.04171C9.04171 3.24741 8.12762 2.33332 7.00004 2.33332C5.87246 2.33332 4.95837 3.24741 4.95837 4.37499V5.54166H11.6667C12.15 5.54166 12.5417 5.93341 12.5417 6.41666V11.6667C12.5417 12.1499 12.15 12.5417 11.6667 12.5417H2.33337C1.85013 12.5417 1.45837 12.1499 1.45837 11.6667V6.41666C1.45837 5.93341 1.85012 5.54166 2.33337 5.54166H3.79171V4.37499ZM2.62504 6.70832V11.375H11.375V6.70832H2.62504ZM7.58337 10.5V7.58332H6.41671V10.5H7.58337Z" fill="#4E5969"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 722 B |
3
src/assets/images/icon-user.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.25004 4.375C5.25004 3.4085 6.03354 2.62499 7.00004 2.62499C7.96654 2.62499 8.75004 3.4085 8.75004 4.375C8.75004 5.34149 7.96654 6.125 7.00004 6.125C6.03354 6.125 5.25004 5.34149 5.25004 4.375ZM7.00004 1.45833C5.38921 1.45833 4.08337 2.76416 4.08337 4.375C4.08337 5.98583 5.38921 7.29166 7.00004 7.29166C8.61087 7.29166 9.91671 5.98583 9.91671 4.375C9.91671 2.76416 8.61087 1.45833 7.00004 1.45833ZM4.66671 7.875C3.82716 7.875 3.03057 8.13082 2.43366 8.63611C1.8275 9.14923 1.45837 9.8955 1.45837 10.7917V11.6667C1.45837 12.1499 1.85013 12.5417 2.33337 12.5417H11.6667C12.15 12.5417 12.5417 12.1499 12.5417 11.6667V10.7917C12.5417 9.8955 12.1726 9.14923 11.5664 8.63611C10.9695 8.13082 10.1729 7.875 9.33337 7.875H4.66671ZM2.62504 10.7917C2.62504 10.2381 2.84354 9.81768 3.18744 9.52657C3.54059 9.22763 4.0565 9.04166 4.66671 9.04166H9.33337C9.94358 9.04166 10.4595 9.22763 10.8126 9.52657C11.1565 9.81768 11.375 10.2381 11.375 10.7917V11.375H2.62504V10.7917Z" fill="#4E5969"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/images/login-bg.jpg
Normal file
|
After Width: | Height: | Size: 473 KiB |
@@ -23,8 +23,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||||
<div class="avatar-wrapper">
|
<div>
|
||||||
<img :src="user.avatarName ? baseApi + '/system/avatar/' + user.avatarName : Avatar" class="user-avatar">
|
<el-avatar :style="`background:${extractColorByName(user.nickName)}`">{{ extractName(user.nickName) }}</el-avatar>
|
||||||
<i class="el-icon-caret-bottom" />
|
<i class="el-icon-caret-bottom" />
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
@@ -110,6 +110,17 @@ export default {
|
|||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
location.reload()
|
location.reload()
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
extractColorByName(name) {
|
||||||
|
var temp = []
|
||||||
|
temp.push('#')
|
||||||
|
for (let index = 0; index < name.length; index++) {
|
||||||
|
temp.push(parseInt(name[index].charCodeAt(0), 10).toString(16))
|
||||||
|
}
|
||||||
|
return temp.slice(0, 5).join('').slice(0, 4)
|
||||||
|
},
|
||||||
|
extractName(name) {
|
||||||
|
return name.slice(0, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Logo from '@/assets/images/logo.png'
|
import Logo from '@/assets/images/data.png'
|
||||||
export default {
|
export default {
|
||||||
name: 'SidebarLogo',
|
name: 'SidebarLogo',
|
||||||
props: {
|
props: {
|
||||||
@@ -25,7 +25,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: 'AllData科学护城河',
|
title: '数据标准符合性检测工具',
|
||||||
logo: Logo
|
logo: Logo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import Vue from 'vue'
|
|||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
|
|
||||||
import 'normalize.css/normalize.css'
|
import 'normalize.css/normalize.css'
|
||||||
|
import './styles/datastyle.css'
|
||||||
|
|
||||||
import Element from 'element-ui'
|
import Element from 'element-ui'
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ module.exports = {
|
|||||||
/**
|
/**
|
||||||
* @description 网站标题
|
* @description 网站标题
|
||||||
*/
|
*/
|
||||||
title: 'AllData科学护城河',
|
title: '数据标准符合性检测工具',
|
||||||
/**
|
/**
|
||||||
* @description 是否显示 tagsView
|
* @description 是否显示 tagsView
|
||||||
*/
|
*/
|
||||||
|
|||||||
666
src/styles/datastyle.css
Normal file
@@ -0,0 +1,666 @@
|
|||||||
|
/*sidebar-container*/
|
||||||
|
body #app .sidebar-container{
|
||||||
|
background: #f5f6fd;
|
||||||
|
border-right: 1px solid #E5E6EB;
|
||||||
|
}
|
||||||
|
body .sidebar-logo-container {
|
||||||
|
padding: 8px 0;
|
||||||
|
height: 66px !important;
|
||||||
|
}
|
||||||
|
body .sidebar-logo-container .sidebar-logo-link .sidebar-title{
|
||||||
|
color: #1D2129 !important;
|
||||||
|
font-size: 16px !important;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .el-scrollbar__view>.el-menu{
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .el-scrollbar__view>.el-menu .menu-wrapper+.menu-wrapper{
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .el-menu{
|
||||||
|
background: #f5f6fd !important;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .el-submenu .el-menu-item {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .el-menu .el-menu-item{
|
||||||
|
background: #f5f6fd !important;
|
||||||
|
color: #4E5969 !important;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .el-submenu>.el-submenu__title .svg-icon{
|
||||||
|
fill:currentColor;
|
||||||
|
color:#4E5969;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .el-menu .el-menu .el-menu-item .svg-icon{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .el-menu .el-menu .el-menu-item .svg-icon+span{
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .submenu-title-noDropdown:hover,
|
||||||
|
body #app .sidebar-container .el-submenu__title:hover {
|
||||||
|
background-color: #f5f6fd !important;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .el-submenu>.el-submenu__title{
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
background: #f5f6fd !important;
|
||||||
|
color: #4E5969 !important;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .is-active>.el-submenu__title{
|
||||||
|
color: #233A82;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .nest-menu .el-submenu>.el-submenu__title:hover,
|
||||||
|
body #app .sidebar-container .el-submenu .el-menu-item:hover {
|
||||||
|
background: #f5f6fd !important;
|
||||||
|
color: #4E5969 !important;
|
||||||
|
}
|
||||||
|
body #app .sidebar-container .el-submenu .el-menu-item.is-active,
|
||||||
|
body #app .sidebar-container .el-submenu .el-menu-item.is-active:hover{
|
||||||
|
background: #E9ECF4 !important;
|
||||||
|
color: #233A82 !important;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
body #app .hideSidebar .submenu-title-noDropdown .el-tooltip .svg-icon,
|
||||||
|
body #app .hideSidebar .el-submenu>.el-submenu__title .svg-icon{
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
body #app .hideSidebar .submenu-title-noDropdown .el-tooltip,
|
||||||
|
body #app .hideSidebar .el-submenu>.el-submenu__title{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
body #app .openSidebar .sidebar-logo-container .sidebar-logo-link .sidebar-logo{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
body #app .hideSidebar .sidebar-logo-container .sidebar-logo-link .sidebar-logo{
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*main-container*/
|
||||||
|
|
||||||
|
/*fixed-header*/
|
||||||
|
body .main-container .fixed-header{
|
||||||
|
z-index: 1002 !important;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .navbar .hamburger-container{
|
||||||
|
padding: 0 !important;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 40px;
|
||||||
|
background: #f5f6fd;
|
||||||
|
color: #4E5969;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 150px;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
float: inherit;
|
||||||
|
transition:transform .28s;
|
||||||
|
}
|
||||||
|
body .hideSidebar .main-container .fixed-header .navbar .hamburger-container{
|
||||||
|
left: 7px;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .navbar{
|
||||||
|
box-shadow: none !important;
|
||||||
|
border-bottom: 1px solid #E5E6EB;
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .navbar .app-breadcrumb.el-breadcrumb{
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .navbar .app-breadcrumb.el-breadcrumb .el-breadcrumb__item .el-breadcrumb__inner.is-link,
|
||||||
|
body .main-container .fixed-header .navbar .app-breadcrumb.el-breadcrumb .el-breadcrumb__item .el-breadcrumb__inner a{
|
||||||
|
color: #4E5969 !important;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .navbar .app-breadcrumb.el-breadcrumb .el-breadcrumb__item .no-redirect{
|
||||||
|
color: #4E5969 !important;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .navbar .app-breadcrumb.el-breadcrumb .el-breadcrumb__item:last-child .no-redirect{
|
||||||
|
color: #1D2129 !important;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .tags-view-container{
|
||||||
|
box-shadow: none !important;
|
||||||
|
border-bottom: 1px solid #E5E6EB;
|
||||||
|
background: #F7F8FA;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .tags-view-container .tags-view-wrapper .tags-view-item{
|
||||||
|
background: transparent;
|
||||||
|
border-color: transparent;
|
||||||
|
color: #4E5969;
|
||||||
|
margin-top: 6px;
|
||||||
|
padding: 0 5px 0 16px;
|
||||||
|
margin-left: 6px;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .tags-view-container .tags-view-wrapper .tags-view-item:first-of-type {
|
||||||
|
margin-left: 20px;
|
||||||
|
padding: 0 16px;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .tags-view-container .tags-view-wrapper .tags-view-item.active{
|
||||||
|
background-color: #fff;
|
||||||
|
color: #233a82;
|
||||||
|
border-color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .tags-view-container .tags-view-wrapper .tags-view-item.active::before{
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .tags-view-container .tags-view-wrapper .tags-view-item .el-icon-close{
|
||||||
|
background: transparent !important;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
body .main-container .fixed-header .tags-view-container .tags-view-wrapper .tags-view-item .el-icon-close:hover,
|
||||||
|
body .main-container .fixed-header .tags-view-container .tags-view-wrapper .tags-view-item.active .el-icon-close:hover{
|
||||||
|
color: #233a82;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*app-main*/
|
||||||
|
body .hasTagsView .fixed-header+.app-main{
|
||||||
|
padding-top: 90px !important;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main{
|
||||||
|
min-height: calc(100vh - 90px) !important;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main .el-card{
|
||||||
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main .el-card.box-card.is-always-shadow{
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main .el-card .el-card__header{
|
||||||
|
border-bottom: 1px solid #E5E6EB;
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main .el-card .el-card__header>.clearfix>span{
|
||||||
|
line-height: 29px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #1D2129 ;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main .el-card .el-card__body{
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main .dashboard-editor-container{
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #f7f8fa;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main .dashboard-editor-container .panel-group:first-child,
|
||||||
|
body .hasTagsView .app-main .dashboard-editor-container .github-corner+.panel-group{
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main .dashboard-editor-container .github-corner{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.app-container*/
|
||||||
|
body .hasTagsView .app-main>.app-container{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main>.app-container>.el-row{
|
||||||
|
margin-left: 0 !important;
|
||||||
|
margin-right: 0 !important;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main>.app-container>.el-row>.el-col{
|
||||||
|
padding-left: 0 !important;
|
||||||
|
padding-right: 0 !important;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main>.app-container>.el-row>.el-col.el-col-6{
|
||||||
|
width: 248px;
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main>.app-container>.el-row>.el-col.el-col-6+.el-col-18{
|
||||||
|
width: calc(100% - 248px);
|
||||||
|
}
|
||||||
|
body .hasTagsView .app-main>.app-container>.el-row>.el-col.el-col-6>.el-card>.el-card__body{
|
||||||
|
height: calc(100vh - 90px);
|
||||||
|
overflow: auto;
|
||||||
|
border-right: 1px solid #e5e6eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-button*/
|
||||||
|
body .el-button,
|
||||||
|
body .el-button:focus{
|
||||||
|
color:#4E5969;
|
||||||
|
background-color:#fff;
|
||||||
|
border-color:#E5E6EB;
|
||||||
|
}
|
||||||
|
body .el-button:hover{
|
||||||
|
color:#4E5969;
|
||||||
|
background-color:#fff;
|
||||||
|
border-color:#C9CDD4;
|
||||||
|
}
|
||||||
|
body .el-button:active{
|
||||||
|
color:#4E5969;
|
||||||
|
background-color:#fff;
|
||||||
|
border-color:#86909C;
|
||||||
|
}
|
||||||
|
body .el-button.is-disabled,
|
||||||
|
body .el-button.is-disabled:active,
|
||||||
|
body .el-button.is-disabled:focus,
|
||||||
|
body .el-button.is-disabled:hover {
|
||||||
|
color: #C9CDD4;
|
||||||
|
background-color: #fff;
|
||||||
|
border-color: #E5E6EB;
|
||||||
|
}
|
||||||
|
body .el-button--primary,
|
||||||
|
body .el-button--primary:focus,
|
||||||
|
body .el-button.ms-btn,
|
||||||
|
body .el-button.ms-btn:focus{
|
||||||
|
color:#fff;
|
||||||
|
background-color:#233A82;
|
||||||
|
border-color:#233A82;
|
||||||
|
}
|
||||||
|
body .el-button--primary:hover,
|
||||||
|
body .el-button.ms-btn:hover{
|
||||||
|
color:#fff;
|
||||||
|
background:#2B50C4;
|
||||||
|
border-color:#2B50C4;
|
||||||
|
}
|
||||||
|
body .el-button--primary:active,
|
||||||
|
body .el-button--primary.is-active,
|
||||||
|
body .el-button.ms-btn:active,
|
||||||
|
body .el-button.ms-btn.is-active{
|
||||||
|
color:#fff;
|
||||||
|
background:#042281;
|
||||||
|
border-color:#042281;
|
||||||
|
}
|
||||||
|
body .el-button--primary.is-disabled,
|
||||||
|
body .el-button--primary.is-disabled:active,
|
||||||
|
body .el-button--primary.is-disabled:focus,
|
||||||
|
body .el-button--primary.is-disabled:hover ,
|
||||||
|
body .el-button.ms-btn.is-disabled,
|
||||||
|
body .el-button.ms-btn.is-disabled:active,
|
||||||
|
body .el-button.ms-btn.is-disabled:focus,
|
||||||
|
body .el-button.ms-btn.is-disabled:hover{
|
||||||
|
color: #fff;
|
||||||
|
background-color: #93A7E4;
|
||||||
|
border-color: #93A7E4;
|
||||||
|
}
|
||||||
|
body .el-button.is-plain,
|
||||||
|
body .el-button.is-plain:focus{
|
||||||
|
color:#4E5969;
|
||||||
|
background-color:#fff;
|
||||||
|
border-color:#E5E6EB;
|
||||||
|
}
|
||||||
|
body .el-button.is-plain:hover{
|
||||||
|
color:#4E5969;
|
||||||
|
background-color:#fff;
|
||||||
|
border-color:#C9CDD4;
|
||||||
|
}
|
||||||
|
body .el-button.is-plain:active{
|
||||||
|
color:#4E5969;
|
||||||
|
background-color:#fff;
|
||||||
|
border-color:#86909C;
|
||||||
|
}
|
||||||
|
body .el-button.is-plain.is-disabled,
|
||||||
|
body .el-button.is-plain.is-disabled:active,
|
||||||
|
body .el-button.is-plain.is-disabled:focus,
|
||||||
|
body .el-button.is-plain.is-disabled:hover {
|
||||||
|
color: #C9CDD4;
|
||||||
|
background-color: #fff;
|
||||||
|
border-color: #E5E6EB;
|
||||||
|
}
|
||||||
|
body .el-button--primary.is-plain,
|
||||||
|
body .el-button--primary.is-plain:focus{
|
||||||
|
color: #4e5969;
|
||||||
|
background: #f2f3f5;
|
||||||
|
border-color: #f2f3f5;
|
||||||
|
}
|
||||||
|
body .el-button--primary.is-plain:hover{
|
||||||
|
color: #4e5969;
|
||||||
|
background: #e5e6eb;
|
||||||
|
border-color: #e5e6eb;
|
||||||
|
}
|
||||||
|
body .el-button--primary.is-plain:active{
|
||||||
|
color: #4e5969;
|
||||||
|
background: #c9cdd4;
|
||||||
|
border-color: #c9cdd4;
|
||||||
|
}
|
||||||
|
body .el-button--primary.is-plain.is-disabled,
|
||||||
|
body .el-button--primary.is-plain.is-disabled:active,
|
||||||
|
body .el-button--primary.is-plain.is-disabled:focus,
|
||||||
|
body .el-button--primary.is-plain.is-disabled:hover {
|
||||||
|
color: #c9cdd4;
|
||||||
|
background-color: #f7f8fa;
|
||||||
|
border-color: #f7f8fa;
|
||||||
|
}
|
||||||
|
body .el-button--text,
|
||||||
|
body .el-button--text:focus{
|
||||||
|
color: #233A82;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0;
|
||||||
|
padding: 0 !important;
|
||||||
|
width: auto !important;
|
||||||
|
}
|
||||||
|
body .el-button--text:hover{
|
||||||
|
color:#2B50C4;
|
||||||
|
background-color:transparent;
|
||||||
|
}
|
||||||
|
body .el-button--text:active{
|
||||||
|
color:#042281;
|
||||||
|
background-color:transparent;
|
||||||
|
}
|
||||||
|
body .el-button--text.is-disabled,
|
||||||
|
body .el-button--text.is-disabled:active,
|
||||||
|
body .el-button--text.is-disabled:focus,
|
||||||
|
body .el-button--text.is-disabled:hover {
|
||||||
|
color:#93A7E4;
|
||||||
|
background-color:transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-tag*/
|
||||||
|
body .el-tag{
|
||||||
|
background: #E8F7FF;
|
||||||
|
border-color: #E8F7FF;
|
||||||
|
color: #3491fa;
|
||||||
|
}
|
||||||
|
body .el-tag.el-tag--success{
|
||||||
|
background: #E8FFEA;
|
||||||
|
border-color: #E8FFEA;
|
||||||
|
color: #00b42a;
|
||||||
|
}
|
||||||
|
body .el-tag.el-tag--warning{
|
||||||
|
background: #FFF7E8;
|
||||||
|
border-color: #FFF7E8;
|
||||||
|
color: #ff7d00;
|
||||||
|
}
|
||||||
|
body .el-tag.el-tag--danger{
|
||||||
|
background: #FFECE8;
|
||||||
|
border-color: #FFECE8;
|
||||||
|
color: #f53f3f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-table*/
|
||||||
|
body .el-table{
|
||||||
|
color: #1d2129;
|
||||||
|
}
|
||||||
|
body .el-table::before{
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
body .el-table-column--selection .cell {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
body .el-table .el-table__cell.is-center {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
body .el-table th.el-table__cell{
|
||||||
|
background: #f2f3f5;
|
||||||
|
color: #1d2129;
|
||||||
|
}
|
||||||
|
body .el-table th.el-table__cell.is-leaf,
|
||||||
|
body .el-table td.el-table__cell{
|
||||||
|
border-color: #e5e6eb ;
|
||||||
|
}
|
||||||
|
body .el-table--medium .el-table__cell {
|
||||||
|
padding: 8px 0;
|
||||||
|
}
|
||||||
|
body .el-table--border {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
body .el-table--border .el-table__cell {
|
||||||
|
border-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-tree*/
|
||||||
|
body .el-tree {
|
||||||
|
color: #1d2129;
|
||||||
|
}
|
||||||
|
body .el-tree-node+.el-tree-node{
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
body .el-tree-node__content{
|
||||||
|
height: 34px;
|
||||||
|
}
|
||||||
|
body .el-tree-node.is-current>.el-tree-node__content {
|
||||||
|
background-color: #f2f3f5;
|
||||||
|
color: #233A82;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
body .el-tree-node .el-tree-node__content:hover{
|
||||||
|
background-color: #f2f3f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-checkbox*/
|
||||||
|
body .el-checkbox__inner:hover,
|
||||||
|
body .el-checkbox__input.is-focus .el-checkbox__inner{
|
||||||
|
border-color: #233A82;
|
||||||
|
}
|
||||||
|
body .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||||
|
background-color: #233A82;
|
||||||
|
border-color: #233A82;
|
||||||
|
}
|
||||||
|
body .el-checkbox__input.is-checked+.el-checkbox__label {
|
||||||
|
color: #233A82;
|
||||||
|
}
|
||||||
|
body .el-checkbox__input.is-indeterminate .el-checkbox__inner {
|
||||||
|
background-color: #233A82;
|
||||||
|
border-color: #233A82;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-radio*/
|
||||||
|
body .el-radio__inner:hover,
|
||||||
|
body .el-.el-radio__input.is-focus .el-.el-radio__inner {
|
||||||
|
border-color: #233A82;
|
||||||
|
}
|
||||||
|
body .el-radio__input.is-checked .el-radio__inner {
|
||||||
|
border-color: #233A82;
|
||||||
|
background: #233A82;
|
||||||
|
}
|
||||||
|
body .el-radio__input.is-checked+.el-radio__label {
|
||||||
|
color: #233A82;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-input*/
|
||||||
|
body .el-textarea__inner:focus,
|
||||||
|
body .el-input__inner:focus{
|
||||||
|
border-color:#233A82
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-select-dropdown*/
|
||||||
|
body .el-select .el-input.is-focus .el-input__inner,
|
||||||
|
body .el-pagination__sizes .el-input .el-input__inner:hover{
|
||||||
|
border-color:#233A82
|
||||||
|
}
|
||||||
|
body .el-select-dropdown__item.hover,
|
||||||
|
body .el-select-dropdown__item:hover {
|
||||||
|
background-color: #f2f3f5;
|
||||||
|
}
|
||||||
|
body .el-select-dropdown__item.selected {
|
||||||
|
color: #233A82;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-pager*/
|
||||||
|
body .el-pager li:hover,
|
||||||
|
body .el-pager li.active {
|
||||||
|
color: #233A82;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-main-footer*/
|
||||||
|
body #el-main-footer{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-switch*/
|
||||||
|
body .el-switch.is-checked .el-switch__core {
|
||||||
|
border-color: #233a82;
|
||||||
|
background-color: #233a82;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-step*/
|
||||||
|
body .el-step__title {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
body .el-step__line {
|
||||||
|
background-color: #E5E6EB;
|
||||||
|
}
|
||||||
|
body .el-step__head.is-success {
|
||||||
|
color: #00B42A;
|
||||||
|
border-color: #00B42A;
|
||||||
|
}
|
||||||
|
body .el-step__title.is-success {
|
||||||
|
color: #00B42A;
|
||||||
|
}
|
||||||
|
body .el-step__head.is-process {
|
||||||
|
color: #4E5969;
|
||||||
|
border-color: #4E5969;
|
||||||
|
}
|
||||||
|
body .el-step__title.is-process {
|
||||||
|
color: #4E5969;
|
||||||
|
}
|
||||||
|
body .el-step__icon.is-text {
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*el-form*/
|
||||||
|
body .el-form-item .el-form-item__label {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #4E5969;
|
||||||
|
padding: 0 6px 0 0;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*modellist*/
|
||||||
|
.modellist{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.modellist .list{
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid #E5E6EB;
|
||||||
|
padding: 20px;
|
||||||
|
width: calc((100% - 60px) / 4);
|
||||||
|
margin: 10px 20px 10px 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.modellist .list:nth-child(4n){
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
.modellist .list:hover {
|
||||||
|
border-color: transparent;
|
||||||
|
box-shadow: 0 1px 2px -2px rgb(0 0 0 / 16%), 0 3px 6px 0 rgb(0 0 0 / 12%), 0 5px 12px 4px rgb(0 0 0 / 9%);
|
||||||
|
}
|
||||||
|
.modellist .list .limg{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.modellist .list .limg img{
|
||||||
|
display: block;
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
.modellist .list .ltitle{
|
||||||
|
display: block;
|
||||||
|
margin: 12px 0 0 0;
|
||||||
|
}
|
||||||
|
.modellist .list .ltitle .title{
|
||||||
|
display: inline-block;
|
||||||
|
color: #4E5969 ;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 24px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.modellist .list:hover .ltitle .title,
|
||||||
|
.modellist .list .ltitle .title:hover{
|
||||||
|
color: #233A82;
|
||||||
|
}
|
||||||
|
.modellist .list .lbtn{
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 100%;
|
||||||
|
padding: 20px 10px;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.modellist .list:hover .lbtn{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.modellist .list .lbtn i{
|
||||||
|
line-height: 24px;
|
||||||
|
padding: 0 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #4E5969;
|
||||||
|
}
|
||||||
|
.modellist .list .lbtn i:hover{
|
||||||
|
color: #165DFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*login-page*/
|
||||||
|
body ,html{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.login-page{
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
.login-page .loleft{
|
||||||
|
display: block;
|
||||||
|
width: 66%;
|
||||||
|
background: url("../assets/images/login-bg.jpg") no-repeat center;
|
||||||
|
background-size: cover;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.login-page .loright{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 34%;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.login-page .loright .locont{
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
.login-page .loright .locont .title{
|
||||||
|
display: block;
|
||||||
|
color: #1D2129;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 50px;
|
||||||
|
letter-spacing:0;
|
||||||
|
margin: 0 0 60px 0;
|
||||||
|
}
|
||||||
|
.login-page .loright .locont .el-form-item{
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.login-page .loright .locont .el-form-item:last-child{
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.login-page .loright .locont .el-form-item .el-button{
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.login-page .loright .locont .el-input__icon.el-icon-user{
|
||||||
|
background: url("../assets/images/icon-user.svg") no-repeat center;
|
||||||
|
box-sizing: 14px;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
.login-page .loright .locont .el-input__icon.el-icon-view{
|
||||||
|
background: url("../assets/images/icon-unlock.svg") no-repeat center;
|
||||||
|
box-sizing: 14px;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
.login-page .loright .locont .el-input__inner,
|
||||||
|
.login-page .loright .locont .el-button{
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
1
src/styles/index.css
Normal file
@@ -7,9 +7,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">
|
||||||
New Visits
|
接入数据源数量
|
||||||
</div>
|
</div>
|
||||||
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
|
<count-to :start-val="0" :end-val="5" :duration="2600" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">
|
||||||
Messages
|
数据模型总数
|
||||||
</div>
|
</div>
|
||||||
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
|
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login" :style="'background-image:url('+ Background +');'">
|
<!--<div class="login" :style="'background-image:url('+ Background +');'">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
|
||||||
<div style="text-align: center;"> <img :src="allDataIcon" alt=""></div>
|
<div style="text-align: center;"> <img :src="allDataIcon" alt=""></div>
|
||||||
<h3 class="title">
|
<h3 class="title">
|
||||||
AllData科学护城河
|
数据标准符合性检测工具
|
||||||
</h3>
|
</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
@@ -33,12 +33,37 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 底部 -->
|
<!– 底部 –>
|
||||||
<div v-if="$store.state.settings.showFooter" id="el-login-footer">
|
<div v-if="$store.state.settings.showFooter" id="el-login-footer">
|
||||||
<span v-html="$store.state.settings.footerTxt" />
|
<span v-html="$store.state.settings.footerTxt" />
|
||||||
<span v-if="$store.state.settings.caseNumber"> ⋅ </span>
|
<span v-if="$store.state.settings.caseNumber"> ⋅ </span>
|
||||||
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">{{ $store.state.settings.caseNumber }}</a>
|
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">{{ $store.state.settings.caseNumber }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>-->
|
||||||
|
|
||||||
|
<div id="app">
|
||||||
|
<div class="login-page">
|
||||||
|
<div class="loleft"></div>
|
||||||
|
<div class="loright">
|
||||||
|
<div class="locont">
|
||||||
|
<div class="title">数据标准符合性检测工具</div>
|
||||||
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
|
||||||
|
<el-form-item prop="username">
|
||||||
|
<el-input v-model="loginForm.username" prefix-icon="el-icon-user" type="text" auto-complete="off" placeholder="请输入账号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="password">
|
||||||
|
<el-input v-model="loginForm.password" prefix-icon="el-icon-view" type="password" auto-complete="off" placeholder="请输入密码" @keyup.enter.native="handleLogin"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button :loading="loading" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
|
||||||
|
<span v-if="!loading">登 录</span>
|
||||||
|
<span v-else>登 录 中...</span>
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--login-page-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -49,7 +74,7 @@ import { getCodeImg } from '@/api/login'
|
|||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
import qs from 'qs'
|
import qs from 'qs'
|
||||||
import Background from '@/assets/images/background.webp'
|
import Background from '@/assets/images/background.webp'
|
||||||
import allDataIcon from '@/assets/images/avatar.png'
|
import allDataIcon from '@/assets/images/data.png'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
<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 v-hasPerm="['masterdata:data:add']" size="mini" icon="el-icon-plus" round :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
<el-button v-hasPerm="['masterdata:data:add']" type="primary" size="mini" icon="el-icon-finished" :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
<el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button>
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="body-wrapper">
|
<div class="body-wrapper">
|
||||||
<el-form ref="form" :model="form" label-width="80px">
|
<el-form ref="form" :model="form" label-width="80px">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-for="(item, index) in columnList"
|
v-for="(item) in columnList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.columnComment"
|
:label="item.columnComment"
|
||||||
:prop="item.columnName"
|
:prop="item.columnName"
|
||||||
@@ -42,10 +42,10 @@
|
|||||||
<template v-if="item.isBindDict === '1' && item.dictList && item.dictList.length > 0">
|
<template v-if="item.isBindDict === '1' && item.dictList && item.dictList.length > 0">
|
||||||
<el-select v-model.trim="form[item.columnName]" placeholder="请选择">
|
<el-select v-model.trim="form[item.columnName]" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in item.dictList"
|
v-for="dictitem in item.dictList"
|
||||||
:key="item.id"
|
:key="dictitem.id"
|
||||||
:label="item.label"
|
:label="dictitem.label"
|
||||||
:value="item.value"
|
:value="dictitem.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
@@ -54,9 +54,9 @@
|
|||||||
<template v-if="item.isBindDict === '1' && item.dictList && item.dictList.length > 0">
|
<template v-if="item.isBindDict === '1' && item.dictList && item.dictList.length > 0">
|
||||||
<el-radio-group v-model.trim="form[item.columnName]">
|
<el-radio-group v-model.trim="form[item.columnName]">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="item in item.dictList"
|
v-for="dictitem in item.dictList"
|
||||||
:key="item.id"
|
:key="dictitem.id"
|
||||||
:label="item.value"
|
:label="dictitem.value"
|
||||||
>{{ item.label }}</el-radio>
|
>{{ item.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</template>
|
</template>
|
||||||
@@ -65,9 +65,9 @@
|
|||||||
<template v-if="item.isBindDict === '1' && item.dictList && item.dictList.length > 0">
|
<template v-if="item.isBindDict === '1' && item.dictList && item.dictList.length > 0">
|
||||||
<el-checkbox-group v-model.trim="form[item.columnName]">
|
<el-checkbox-group v-model.trim="form[item.columnName]">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-for="item in item.dictList"
|
v-for="dictitem in item.dictList"
|
||||||
:key="item.id"
|
:key="dictitem.id"
|
||||||
:label="item.value"
|
:label="dictitem.value"
|
||||||
>{{ item.label }}</el-checkbox>
|
>{{ item.label }}</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||
@@ -1,44 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<transition name="el-zoom-in-center">
|
<iframe src="http://192.168.1.217:8001/model/modelChildren" width="100%" height="850px" frameborder="0" />
|
||||||
<data-model-list v-if="options.showList" @showCard="showCard" />
|
|
||||||
</transition>
|
|
||||||
<transition name="el-zoom-in-top">
|
|
||||||
<data-model-add v-if="options.showAdd" :data="options.data" @showCard="showCard" />
|
|
||||||
</transition>
|
|
||||||
<transition name="el-zoom-in-top">
|
|
||||||
<data-model-edit v-if="options.showEdit" :data="options.data" @showCard="showCard" />
|
|
||||||
</transition>
|
|
||||||
<transition name="el-zoom-in-bottom">
|
|
||||||
<data-model-detail v-if="options.showDetail" :data="options.data" @showCard="showCard" />
|
|
||||||
</transition>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DataModelList from './DataModelList'
|
|
||||||
import DataModelAdd from './DataModelAdd'
|
|
||||||
import DataModelEdit from './DataModelEdit'
|
|
||||||
import DataModelDetail from './DataModelDetail'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DataModel',
|
name: 'DataModel',
|
||||||
components: { DataModelList, DataModelAdd, DataModelEdit, DataModelDetail },
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options: {
|
|
||||||
data: {},
|
|
||||||
showList: true,
|
|
||||||
showAdd: false,
|
|
||||||
showEdit: false,
|
|
||||||
showDetail: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showCard(data) {
|
|
||||||
Object.assign(this.options, data)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||
@@ -1,197 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-row :gutter="20">
|
<iframe src="http://192.168.1.217:8001/modelMonitor/dataextension" width="100%" height="850px" frameborder="0" />
|
||||||
<el-col :span="6">
|
|
||||||
<el-card class="box-card tree-wrapper" shadow="always">
|
|
||||||
<el-tree
|
|
||||||
ref="leftTree"
|
|
||||||
:data="leftTreeOptions"
|
|
||||||
node-key="id"
|
|
||||||
empty-text="加载中,请稍后"
|
|
||||||
:props="leftTreeDefaultProps"
|
|
||||||
default-expand-all
|
|
||||||
highlight-current
|
|
||||||
:expand-on-click-node="false"
|
|
||||||
@node-click="handleNodeClick"
|
|
||||||
>
|
|
||||||
<span slot-scope="{ node, data }" class="custom-tree-node">
|
|
||||||
<span><i v-if="node.level === 1" class="iconfont icon-zuzhi tree-folder" />{{ node.label }}</span>
|
|
||||||
</span>
|
|
||||||
</el-tree>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="18">
|
|
||||||
<el-card class="box-card tree-wrapper" shadow="always">
|
|
||||||
<el-row type="flex" justify="space-between">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-button-group>
|
|
||||||
<el-button
|
|
||||||
v-hasPerm="['metadata:dataauthorize:refresh']"
|
|
||||||
type="warning"
|
|
||||||
icon="el-icon-refresh"
|
|
||||||
size="mini"
|
|
||||||
@click="handleCacheRefresh"
|
|
||||||
>刷新缓存</el-button>
|
|
||||||
</el-button-group>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-button-group style="float: right;">
|
|
||||||
<template v-if="showBtns">
|
|
||||||
<el-button v-if="disabled" v-hasPerm="['metadata:dataauthorize:edit']" size="mini" round @click="disabled = false">修改</el-button>
|
|
||||||
<el-button v-else v-hasPerm="['metadata:dataauthorize:edit']" size="mini" round @click="handSubmit">保存</el-button>
|
|
||||||
</template>
|
|
||||||
</el-button-group>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-divider />
|
|
||||||
<el-form ref="form" :model="form" :disabled="disabled">
|
|
||||||
<el-tree
|
|
||||||
ref="rightTree"
|
|
||||||
:data="rightTreeOptions"
|
|
||||||
show-checkbox
|
|
||||||
accordion
|
|
||||||
node-key="id"
|
|
||||||
empty-text="加载中,请稍后"
|
|
||||||
:props="rightTreeDefaultProps"
|
|
||||||
highlight-current
|
|
||||||
:expand-on-click-node="false"
|
|
||||||
:check-strictly="checkStrictly"
|
|
||||||
>
|
|
||||||
<span slot-scope="{ node, data }" class="custom-tree-node">
|
|
||||||
<span>
|
|
||||||
<i v-if="node.level === 1" class="iconfont icon-shujuku tree-folder" />
|
|
||||||
<i v-else-if="node.level === 2" class="iconfont icon-shujubiao tree-folder" />
|
|
||||||
<i v-else-if="node.level === 3" class="iconfont icon-shujuziduan tree-folder" />
|
|
||||||
{{ data.code ? (data.name ? data.code + '(' + data.name + ')' : data.code) : data.name }}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</el-tree>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listRole } from '@/api/systemMarket/role'
|
|
||||||
import { getDataMetadataTree } from '@/api/metadata/datacolumn'
|
|
||||||
import { getAuthorizedMetadata, metadataAuthorize, refreshAuthorize } from '@/api/metadata/dataauthorize'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DataAuthorize',
|
name: 'DataAuthorize',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableHeight: document.body.offsetHeight - 310 + 'px',
|
|
||||||
// 左侧树
|
|
||||||
leftTreeOptions: [],
|
|
||||||
leftTreeDefaultProps: {
|
|
||||||
children: 'children',
|
|
||||||
label: 'roleName'
|
|
||||||
},
|
|
||||||
// 右侧树
|
|
||||||
rightTreeOptions: [],
|
|
||||||
rightTreeDefaultProps: {
|
|
||||||
children: 'children',
|
|
||||||
label: 'label'
|
|
||||||
},
|
|
||||||
checkStrictly: false,
|
|
||||||
form: {},
|
|
||||||
disabled: true,
|
|
||||||
showBtns: false,
|
|
||||||
btnSubmitEnable: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getLeftTree()
|
|
||||||
this.getRightTree()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getLeftTree() {
|
|
||||||
listRole().then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
const { data } = response
|
|
||||||
const tree = {}
|
|
||||||
tree.roleName = '角色组'
|
|
||||||
tree.children = data
|
|
||||||
this.leftTreeOptions = []
|
|
||||||
this.leftTreeOptions.push(tree)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleNodeClick(data) {
|
|
||||||
if (data.id) {
|
|
||||||
this.form.roleId = data.id
|
|
||||||
getAuthorizedMetadata(data.id).then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
this.$refs.rightTree.setCheckedKeys([])
|
|
||||||
const checkedKeys = response.data || []
|
|
||||||
if (checkedKeys && checkedKeys.length > 0) {
|
|
||||||
this.checkStrictly = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.rightTree.setCheckedKeys(checkedKeys)
|
|
||||||
this.checkStrictly = false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.showBtns = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getRightTree() {
|
|
||||||
getDataMetadataTree('column').then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
const { data } = response
|
|
||||||
this.rightTreeOptions = data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handSubmit() {
|
|
||||||
const data = []
|
|
||||||
const checkedNodes = this.$refs.rightTree.getCheckedNodes(false, true)
|
|
||||||
checkedNodes.forEach((item, index, arr) => {
|
|
||||||
const obj = {}
|
|
||||||
obj.objectId = item.id
|
|
||||||
obj.roleId = this.form.roleId
|
|
||||||
obj.objectType = item.type
|
|
||||||
data.push(obj)
|
|
||||||
})
|
|
||||||
metadataAuthorize({ roleId: this.form.roleId, authorizeDataList: data }).then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
this.$message.success('保存成功')
|
|
||||||
this.disabled = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleCacheRefresh() {
|
|
||||||
refreshAuthorize().then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
this.$message.success('刷新缓存成功')
|
|
||||||
} else {
|
|
||||||
this.$message.error('刷新缓存失败')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.el-card ::v-deep .el-card__body {
|
|
||||||
height: calc(100vh - 170px);
|
|
||||||
}
|
|
||||||
.tree-wrapper {
|
|
||||||
overflow-y: auto;
|
|
||||||
::v-deep .custom-tree-node {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
font-size: 14px;
|
|
||||||
.tree-folder {
|
|
||||||
margin-right: 5px;
|
|
||||||
color: #f6cf07;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,23 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card class="box-card" shadow="always">
|
<el-card class="box-card" shadow="always">
|
||||||
<el-row>
|
<div class="body-wrapper">
|
||||||
<el-col :span="24">
|
<el-form :inline="true" :model="searchForm">
|
||||||
<el-form ref="queryForm" :model="queryParams" :inline="true" class="demo-form-inline">
|
<el-form-item label="数据库">
|
||||||
<el-form-item label="数据表名">
|
<el-select v-model="searchForm.sourceId" placeholder="数据库">
|
||||||
<el-input
|
<el-option
|
||||||
v-model="queryParams.tableName"
|
v-for="item in sourceOptions"
|
||||||
placeholder="请输入数据表名"
|
:key="item.id"
|
||||||
clearable
|
:label="item.sourceName"
|
||||||
size="small"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据表">
|
||||||
|
<el-select v-model="searchForm.tableId" clearable placeholder="数据表">
|
||||||
|
<el-option
|
||||||
|
v-for="item in tableOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.tableComment ? item.tableComment : item.tableName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
<el-divider />
|
||||||
</el-row>
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-table
|
<el-table
|
||||||
@@ -27,40 +37,65 @@
|
|||||||
:max-height="200"
|
:max-height="200"
|
||||||
style="width: 100%; margin: 15px 0;"
|
style="width: 100%; margin: 15px 0;"
|
||||||
>
|
>
|
||||||
<el-table-column prop="subjectArea" label="数据主题域" align="center" show-overflow-tooltip />
|
<el-table-column prop="CONSTRAINT_NAME" label="映射名称" align="center" show-overflow-tooltip />
|
||||||
<el-table-column prop="mappingName" label="映射名称" align="center" show-overflow-tooltip />
|
<el-table-column prop="TABLE_NAME" label="源表" align="center" show-overflow-tooltip />
|
||||||
<el-table-column prop="sourceTable" label="源表" align="center" show-overflow-tooltip />
|
<el-table-column prop="REFERENCED_TABLE_NAME" label="目标表" align="center" show-overflow-tooltip />
|
||||||
<el-table-column prop="targetTable" label="目标表" align="center" show-overflow-tooltip />
|
<el-table-column prop="COLUMN_NAME" label="映射字段" align="center" show-overflow-tooltip />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div id="chart" style="width: 100%; height: 300px;" />
|
<div id="chart" style="width: 100%; height: 500px;" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
|
import { listDataSource } from '@/api/metadata/datasource'
|
||||||
|
import { listDataTable } from '@/api/metadata/datatable'
|
||||||
|
import { getMetadatablood } from '@/api/metadata/datasource'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DataBlood',
|
name: 'DataBlood',
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
|
searchForm: {
|
||||||
|
sourceId: '',
|
||||||
|
tableId: ''
|
||||||
|
},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
tableName: ''
|
tableName: ''
|
||||||
},
|
},
|
||||||
|
sourceOptions: [],
|
||||||
|
tableOptions: [],
|
||||||
chart: null,
|
chart: null,
|
||||||
tableDataList: []
|
tableDataList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'searchForm.sourceId': {
|
||||||
|
immediate: true,
|
||||||
|
// handler:是一个回调函数,即监听到变化应该执行的函数
|
||||||
|
handler(value) {
|
||||||
|
if (value) {
|
||||||
|
// 清空数据
|
||||||
|
this.searchForm.tableId = ''
|
||||||
|
this.getDataTableList(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getDataSourceList()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.chart = echarts.init(document.getElementById('chart'))
|
this.chart = echarts.init(document.getElementById('chart'))
|
||||||
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
@@ -70,20 +105,43 @@ export default {
|
|||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getDataSourceList() {
|
||||||
|
listDataSource().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.sourceOptions = response.data
|
||||||
|
this.searchForm.sourceId = this.sourceOptions[0].id
|
||||||
|
this.getDataTableList(this.sourceOptions[0].id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDataTableList(sourceId) {
|
||||||
|
const data = {}
|
||||||
|
data.sourceId = sourceId
|
||||||
|
listDataTable(data).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
console.log('ddddddd', response)
|
||||||
|
this.tableOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.tableDataList = [
|
getMetadatablood({ sourceId: this.searchForm.sourceId, tableId: this.searchForm.tableId }).then(response => {
|
||||||
{ subjectArea: 'DataCenter', mappingName: 'm_ts_test_table_inc', sourceTable: 'src_test_table', targetTable: 'ts_test_table' },
|
if (response.success) {
|
||||||
{ subjectArea: 'DataCenter', mappingName: 'm_ts_test_table_inc', sourceTable: 'ts_test_table', targetTable: 'th_test_table' },
|
const { data } = response
|
||||||
{ subjectArea: 'DataCenter', mappingName: 'm_ts_test_table_inc', sourceTable: 'ts_test_table', targetTable: 'ti_test_table' },
|
this.tableDataList = data
|
||||||
{ subjectArea: 'DataCenter', mappingName: 'm_ods_test_table_inc', sourceTable: 'ti_test_table', targetTable: 't_test_table' }
|
console.log('datadata', data)
|
||||||
]
|
this.reloadData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
reloadData() {
|
||||||
let data = { nodes: [], links: [] }
|
let data = { nodes: [], links: [] }
|
||||||
const nodes = []
|
const nodes = []
|
||||||
const links = []
|
const links = []
|
||||||
const colors = ['#fbb4ae', '#b3cde3', '#ccebc5', '#decbe4']
|
const colors = ['#fbb4ae', '#b3cde3', '#ccebc5', '#decbe4']
|
||||||
this.tableDataList.forEach(item => {
|
this.tableDataList.forEach(item => {
|
||||||
nodes.push({
|
nodes.push({
|
||||||
name: item.sourceTable,
|
name: item.TABLE_NAME,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: colors[Math.floor(Math.random() * colors.length)]
|
color: colors[Math.floor(Math.random() * colors.length)]
|
||||||
@@ -91,7 +149,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
nodes.push({
|
nodes.push({
|
||||||
name: item.targetTable,
|
name: item.REFERENCED_TABLE_NAME,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: colors[Math.floor(Math.random() * colors.length)]
|
color: colors[Math.floor(Math.random() * colors.length)]
|
||||||
@@ -99,10 +157,10 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
links.push({
|
links.push({
|
||||||
source: item.sourceTable,
|
source: item.TABLE_NAME,
|
||||||
target: item.targetTable,
|
target: item.REFERENCED_TABLE_NAME,
|
||||||
value: item.mappingName.length,
|
value: item.CONSTRAINT_NAME.length,
|
||||||
mapping: item.mappingName
|
mapping: item.CONSTRAINT_NAME
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// nodes数组去重
|
// nodes数组去重
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||
@@ -131,6 +131,8 @@ export default {
|
|||||||
listDataSource().then(response => {
|
listDataSource().then(response => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
this.sourceOptions = response.data
|
this.sourceOptions = response.data
|
||||||
|
this.searchForm.sourceId = this.sourceOptions[0].id
|
||||||
|
this.getDataTableList(this.sourceOptions[0].id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -140,6 +142,7 @@ export default {
|
|||||||
listDataTable(data).then(response => {
|
listDataTable(data).then(response => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
this.tableOptions = response.data
|
this.tableOptions = response.data
|
||||||
|
this.searchForm.tableId = this.tableOptions.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,66 +2,19 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card class="box-card" shadow="always">
|
<el-card class="box-card" shadow="always">
|
||||||
<div class="body-wrapper">
|
<div class="body-wrapper">
|
||||||
<div v-if="searchExecuting">
|
待开发~~~
|
||||||
<el-row>
|
|
||||||
<el-col :span="12" :offset="6">
|
|
||||||
<el-input v-model="keyword" placeholder="请输入内容">
|
|
||||||
<el-select slot="prepend" v-model="type" placeholder="请选择" style="width: 100px;" @change="typeSelectChanged">
|
|
||||||
<el-option label="数据库" value="1" />
|
|
||||||
<el-option label="数据表" value="2" />
|
|
||||||
<el-option label="数据元" value="3" />
|
|
||||||
</el-select>
|
|
||||||
<el-button slot="append" :disabled="btnEnable" icon="el-icon-search" @click="search" />
|
|
||||||
</el-input>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-divider />
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<source-pane v-if="type === '1'" :data="dataList" />
|
|
||||||
<table-pane v-if="type === '2'" :data="dataList" />
|
|
||||||
<column-pane v-if="type === '3'" :data="dataList" />
|
|
||||||
<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-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<div class="search-container">
|
|
||||||
<el-input v-model="keyword" placeholder="请输入内容">
|
|
||||||
<el-select slot="prepend" v-model="type" placeholder="请选择" style="width: 100px;">
|
|
||||||
<el-option label="数据库" value="1" />
|
|
||||||
<el-option label="数据表" value="2" />
|
|
||||||
<el-option label="数据元" value="3" />
|
|
||||||
</el-select>
|
|
||||||
<el-button slot="append" icon="el-icon-search" :disabled="btnEnable" @click="search" />
|
|
||||||
</el-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SourcePane from './SourcePane'
|
|
||||||
import TablePane from './TablePane'
|
|
||||||
import ColumnPane from './ColumnPane'
|
|
||||||
|
|
||||||
import { pageDataSource } from '@/api/metadata/datasource'
|
import { pageDataSource } from '@/api/metadata/datasource'
|
||||||
import { pageDataTable } from '@/api/metadata/datatable'
|
import { pageDataTable } from '@/api/metadata/datatable'
|
||||||
import { pageDataColumn } from '@/api/metadata/datacolumn'
|
import { pageDataColumn } from '@/api/metadata/datacolumn'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DataSearch',
|
name: 'DataSearch',
|
||||||
components: { SourcePane, TablePane, ColumnPane },
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchExecuting: false,
|
searchExecuting: false,
|
||||||
|
|||||||
@@ -3,26 +3,20 @@
|
|||||||
<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 v-if="active == 2" v-hasPerm="['metadata:datasource:add']" size="mini" icon="el-icon-plus" round :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
<el-button v-if="active == 3" type="primary" size="mini" icon="el-icon-finished" :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
<el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button>
|
<el-button v-if="active != 3" size="mini" type="primary" @click="handleNextStep">下一步</el-button>
|
||||||
|
<el-button v-if="active != 1" size="mini" type="primary" @click="handleLastStep">上一步</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="body-wrapper">
|
<div class="body-wrapper">
|
||||||
<el-steps :active="active" finish-status="success" align-center>
|
<el-steps :active="active" finish-status="success" align-center>
|
||||||
<el-step title="数据源信息" />
|
<el-step title="填写数据源信息" />
|
||||||
<el-step title="连接信息" />
|
<el-step title="选择数据库类型" />
|
||||||
|
<el-step title="填写连接信息" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-form v-if="active == 1" ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form v-if="active == 1" ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="数据源类型" prop="dbType">
|
<div style="padding: 20px 200px">
|
||||||
<el-select v-model="form.dbType">
|
|
||||||
<el-option
|
|
||||||
v-for="item in dbTypeOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.itemValue"
|
|
||||||
:value="item.itemText"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="数据源名称" prop="sourceName">
|
<el-form-item label="数据源名称" prop="sourceName">
|
||||||
<el-input v-model="form.sourceName" placeholder="请输入数据源名称" />
|
<el-input v-model="form.sourceName" placeholder="请输入数据源名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -38,8 +32,95 @@
|
|||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-form v-if="active == 2" ref="form2" :model="form2" :rules="rules2" label-width="80px">
|
<el-form v-if="active == 2" ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<div class="modellist" style="padding: 20px 200px">
|
||||||
|
<div :class="[form.dbType =='1' ? 'choosedDbType' : '','list']" @click="chooseDbType('1')">
|
||||||
|
<div class="limg"><img :src="databaseImg.imgMySQL"></div>
|
||||||
|
<div class="ltitle">
|
||||||
|
<el-tooltip content="mysql数据库" placement="bottom" effect="light">
|
||||||
|
<p class="title">mysql</p>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div :class="[form.dbType =='2' ? 'choosedDbType' : '','list']" @click="chooseDbType('2')">
|
||||||
|
<div class="limg"><img :src="databaseImg.imgMariaDB"></div>
|
||||||
|
<div class="ltitle">
|
||||||
|
<el-tooltip content="mariadb-3.0.3数据库" placement="bottom" effect="light">
|
||||||
|
<p class="title">mariadb-3.0.3</p>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div :class="[form.dbType =='3' ? 'choosedDbType' : '','list']" @click="chooseDbType('3')">
|
||||||
|
<div class="limg"><img :src="databaseImg.imgOracle"></div>
|
||||||
|
<div class="ltitle">
|
||||||
|
<el-tooltip content="oracle数据库" placement="bottom" effect="light">
|
||||||
|
<p class="title">oracle</p>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div :class="[form.dbType =='9' ? 'choosedDbType' : '','list']" @click="chooseDbType('9')">
|
||||||
|
<div class="limg"><img :src="databaseImg.imgdm8"></div>
|
||||||
|
<div class="ltitle">
|
||||||
|
<el-tooltip content="dm数据库" placement="bottom" effect="light">
|
||||||
|
<p class="title">dm</p>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div :class="[form.dbType =='8' ? 'choosedDbType' : '','list']" @click="chooseDbType('8')">
|
||||||
|
<div class="limg"><img :src="databaseImg.imgibmdb2"></div>
|
||||||
|
<div class="ltitle">
|
||||||
|
<el-tooltip content="db2数据库" placement="bottom" effect="light">
|
||||||
|
<p class="title">db2</p>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div :class="[form.dbType =='5' ? 'choosedDbType' : '','list']" @click="chooseDbType('5')">
|
||||||
|
<div class="limg"><img :src="databaseImg.imgPostgreSQL"></div>
|
||||||
|
<div class="ltitle">
|
||||||
|
<el-tooltip content="PostgreSQ数据库" placement="bottom" effect="light">
|
||||||
|
<p class="title">PostgreSQ</p>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div :class="[form.dbType =='6' ? 'choosedDbType' : '','list']" @click="chooseDbType('6')">
|
||||||
|
<div class="limg"><img :src="databaseImg.imgSqlserver"></div>
|
||||||
|
<div class="ltitle">
|
||||||
|
<el-tooltip content="Sqlserver数据库" placement="bottom" effect="light">
|
||||||
|
<p class="title">Sqlserver</p>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div :class="[form.dbType =='7' ? 'choosedDbType' : '','list']" @click="chooseDbType('7')">
|
||||||
|
<div class="limg"><img :src="databaseImg.imgkingbase"></div>
|
||||||
|
<div class="ltitle">
|
||||||
|
<el-tooltip content="kingbase数据库" placement="bottom" effect="light">
|
||||||
|
<p class="title">kingbase</p>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div :class="[form.dbType =='10' ? 'choosedDbType' : '','list']" @click="chooseDbType('10')">
|
||||||
|
<div class="limg"><img :src="databaseImg.imggaussdb"></div>
|
||||||
|
<div class="ltitle">
|
||||||
|
<el-tooltip content="GaussDB数据库" placement="bottom" effect="light">
|
||||||
|
<p class="title">GaussDB</p>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div :class="[form.dbType =='4' ? 'choosedDbType' : '','list']" @click="chooseDbType('4')">
|
||||||
|
<div class="limg"><img :src="databaseImg.imgdefault"></div>
|
||||||
|
<div class="ltitle">
|
||||||
|
<el-tooltip content="MaxCompute数据库" placement="bottom" effect="light">
|
||||||
|
<p class="title">MaxCompute</p>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!--modellist 模型监控列表-->
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<el-form v-if="active == 3" ref="form2" :model="form2" :rules="rules2" label-width="80px">
|
||||||
|
<div style="padding: 20px 200px">
|
||||||
<el-form-item label="主机" prop="host">
|
<el-form-item label="主机" prop="host">
|
||||||
<el-input v-model="form2.host" placeholder="请输入主机" />
|
<el-input v-model="form2.host" placeholder="请输入主机" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -61,15 +142,25 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-hasPerm="['metadata:datasource:connect']" size="mini" type="primary" @click="handleCheckConnection">连通性检测</el-button>
|
<el-button v-hasPerm="['metadata:datasource:connect']" size="mini" type="primary" @click="handleCheckConnection">连通性检测</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button v-if="active == 1" style="margin-top: 12px;" @click="handleNextStep">下一步</el-button>
|
|
||||||
<el-button v-if="active == 2" style="margin-top: 12px;" @click="handleLastStep">上一步</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { addDataSource, checkConnection } from '@/api/metadata/datasource'
|
import { addDataSource, checkConnection } from '@/api/metadata/datasource'
|
||||||
|
import { createDataSource } from '@/api/datamodel/model'
|
||||||
|
import imgMySQL from '@/assets/database/MySQL.svg'
|
||||||
|
import imgMariaDB from '@/assets/database/MariaDB.svg'
|
||||||
|
import imgOracle from '@/assets/database/Oracle.svg'
|
||||||
|
import imgdm8 from '@/assets/database/dm8.png'
|
||||||
|
import imgibmdb2 from '@/assets/database/ibmdb2.png'
|
||||||
|
import imgPostgreSQL from '@/assets/database/PostgreSQL.svg'
|
||||||
|
import imgSqlserver from '@/assets/database/Sqlserver.svg'
|
||||||
|
import imgdefault from '@/assets/database/default.svg'
|
||||||
|
import imgkingbase from '@/assets/database/kingbase.png'
|
||||||
|
import imggaussdb from '@/assets/database/gaussdb.png'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DataSourceAdd',
|
name: 'DataSourceAdd',
|
||||||
@@ -84,6 +175,19 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '数据源新增',
|
title: '数据源新增',
|
||||||
|
databaseImg: {
|
||||||
|
isActive: true,
|
||||||
|
imgMySQL: imgMySQL,
|
||||||
|
imgMariaDB: imgMariaDB,
|
||||||
|
imgOracle: imgOracle,
|
||||||
|
imgdm8: imgdm8,
|
||||||
|
imgibmdb2: imgibmdb2,
|
||||||
|
imgPostgreSQL: imgPostgreSQL,
|
||||||
|
imgSqlserver: imgSqlserver,
|
||||||
|
imgdefault: imgdefault,
|
||||||
|
imgkingbase: imgkingbase,
|
||||||
|
imggaussdb: imggaussdb
|
||||||
|
},
|
||||||
// 展示切换
|
// 展示切换
|
||||||
showOptions: {
|
showOptions: {
|
||||||
data: {},
|
data: {},
|
||||||
@@ -124,7 +228,8 @@ export default {
|
|||||||
dbName: undefined,
|
dbName: undefined,
|
||||||
username: undefined,
|
username: undefined,
|
||||||
password: undefined,
|
password: undefined,
|
||||||
sid: undefined
|
sid: undefined,
|
||||||
|
schema: ''
|
||||||
},
|
},
|
||||||
rules2: {
|
rules2: {
|
||||||
host: [
|
host: [
|
||||||
@@ -180,6 +285,9 @@ export default {
|
|||||||
handleLastStep() {
|
handleLastStep() {
|
||||||
this.active--
|
this.active--
|
||||||
},
|
},
|
||||||
|
chooseDbType(type) {
|
||||||
|
this.form.dbType = type
|
||||||
|
},
|
||||||
/** 检测数据库连通性 */
|
/** 检测数据库连通性 */
|
||||||
handleCheckConnection() {
|
handleCheckConnection() {
|
||||||
this.$refs['form2'].validate(valid => {
|
this.$refs['form2'].validate(valid => {
|
||||||
@@ -204,6 +312,7 @@ export default {
|
|||||||
addDataSource(this.form).then(response => {
|
addDataSource(this.form).then(response => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
this.$message.success('保存成功')
|
this.$message.success('保存成功')
|
||||||
|
this.saveModelDataSource()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 2秒后跳转列表页
|
// 2秒后跳转列表页
|
||||||
this.$emit('showCard', this.showOptions)
|
this.$emit('showCard', this.showOptions)
|
||||||
@@ -221,6 +330,21 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
saveModelDataSource() {
|
||||||
|
const dbType = this.form.dbType
|
||||||
|
const dataSource = {
|
||||||
|
projectId: '11111',
|
||||||
|
databaseName: this.form2.dbName,
|
||||||
|
schemaName: this.form2.schema === '' ? this.form2.dbName : this.form2.schema,
|
||||||
|
databaseType: dbType,
|
||||||
|
url: this.form2.host + this.form2.port,
|
||||||
|
username: this.form2.username,
|
||||||
|
password: this.form2.password
|
||||||
|
}
|
||||||
|
createDataSource(dataSource).then(() => {
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -231,4 +355,7 @@ export default {
|
|||||||
height: calc(100vh - 230px);
|
height: calc(100vh - 230px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
.choosedDbType{
|
||||||
|
border: 1px solid #165DFF;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<span>{{ title }}</span>
|
<span>{{ title }}</span>
|
||||||
<el-button-group style="float: right;">
|
<el-button-group style="float: right;">
|
||||||
<el-button v-if="active == 2" v-hasPerm="['metadata:datasource:edit']" size="mini" icon="el-icon-plus" round :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
<el-button v-if="active == 2" v-hasPerm="['metadata:datasource:edit']" size="mini" icon="el-icon-plus" round :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
<el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button>
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="body-wrapper">
|
<div class="body-wrapper">
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<el-step title="数据源信息" />
|
<el-step title="数据源信息" />
|
||||||
<el-step title="连接信息" />
|
<el-step title="连接信息" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-form v-if="active == 1" ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form v-if="active == 1" ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="数据源类型" prop="dbType">
|
<el-form-item label="数据源类型" prop="dbType">
|
||||||
<el-select v-model="form.dbType">
|
<el-select v-model="form.dbType">
|
||||||
<el-option
|
<el-option
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
@@ -102,10 +102,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-popover
|
|
||||||
placement="left"
|
|
||||||
trigger="click"
|
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPerm="['metadata:datasource:edit']"
|
v-hasPerm="['metadata:datasource:edit']"
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -127,8 +123,6 @@
|
|||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
<el-button slot="reference">操作</el-button>
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
@@ -1,189 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card class="box-card" shadow="always">
|
<iframe src="http://192.168.1.217:8001/OnlinInquiry/OnlinInquiryChildren" width="100%" height="850px" frameborder="0" />
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form :inline="true" class="demo-form-inline">
|
|
||||||
<el-form-item label="数据源">
|
|
||||||
<el-select v-model="sqlDataSource" placeholder="请选择数据源">
|
|
||||||
<el-option
|
|
||||||
v-for="source in sourceOptions"
|
|
||||||
:key="source.id"
|
|
||||||
:label="source.sourceName"
|
|
||||||
:value="source.id"
|
|
||||||
:disabled="source.status === '0'"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button size="mini" round :disabled="sqlExecuting" @click="runData">运行</el-button>
|
|
||||||
<el-button size="mini" round :disabled="!sqlExecuting" @click="stopData">停止</el-button>
|
|
||||||
<el-button size="mini" round :disabled="sqlExecuting" @click="formaterSql">格式化</el-button>
|
|
||||||
<el-button size="mini" round :disabled="sqlExecuting" @click="refreshData">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<sql-editor
|
|
||||||
ref="sqleditor"
|
|
||||||
:value="sqlText"
|
|
||||||
style="height: 300px; margin: 20px 0;"
|
|
||||||
@changeTextarea="changeTextarea($event)"
|
|
||||||
/>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col>
|
|
||||||
<div v-if="sqlExecuting" v-loading="sqlExecuting">数据加载中...</div>
|
|
||||||
<div v-else>
|
|
||||||
<div v-if="sqlConsole.length > 0">
|
|
||||||
<el-tabs v-model="activeTabName" type="border-card">
|
|
||||||
<el-tab-pane label="信息" name="table0">
|
|
||||||
<pre>{{ executeResultInfo }}</pre>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane v-for="(item,index) in sqlConsole" :key="(index+1)" :name="'table'+(index+1)" :label="'结果'+(index+1)">
|
|
||||||
<el-table
|
|
||||||
:data="item.dataList"
|
|
||||||
stripe
|
|
||||||
border
|
|
||||||
:max-height="300"
|
|
||||||
style="width: 100%; margin: 15px 0;"
|
|
||||||
>
|
|
||||||
<el-table-column label="序号" width="55" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ scope.$index + 1 }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<template v-for="(column, index) in item.columnList">
|
|
||||||
<el-table-column
|
|
||||||
:key="index"
|
|
||||||
:prop="column"
|
|
||||||
:label="column"
|
|
||||||
align="center"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import sqlFormatter from 'sql-formatter'
|
|
||||||
import SqlEditor from '@/components/SqlEditor'
|
|
||||||
import { listDataSource } from '@/api/metadata/datasource'
|
|
||||||
import { runSql, stopSql } from '@/api/metadata/sqlconsole'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SqlConsole',
|
name: 'SqlConsole',
|
||||||
components: {
|
|
||||||
SqlEditor
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 数据源数据字典
|
|
||||||
sourceOptions: [],
|
|
||||||
sqlDataSource: undefined,
|
|
||||||
sqlText: undefined,
|
|
||||||
sqlExecuting: false,
|
|
||||||
activeTabName: 'table0',
|
|
||||||
sqlExecutorId: undefined,
|
|
||||||
sqlConsole: [],
|
|
||||||
executeResultInfo: undefined
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDataSourceList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDataSourceList() {
|
|
||||||
listDataSource().then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
this.sourceOptions = response.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
runData() {
|
|
||||||
if (!this.sqlDataSource) {
|
|
||||||
this.$message.error('数据源不能为空')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!this.sqlText) {
|
|
||||||
this.$message.error('查询SQL不能为空')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.sqlExecuting = true
|
|
||||||
this.sqlExecutorId = (new Date()).getTime() + Math.ceil(Math.random() * 1000)
|
|
||||||
this.sqlConsole = []
|
|
||||||
const data = {}
|
|
||||||
data.sqlKey = this.sqlExecutorId
|
|
||||||
data.sourceId = this.sqlDataSource
|
|
||||||
data.sqlText = this.sqlText
|
|
||||||
runSql(data).then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
const { data } = response
|
|
||||||
let resultStr = ''
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
|
||||||
const item = data[i]
|
|
||||||
resultStr += item.sql
|
|
||||||
resultStr += '\n> 状态:' + ((item.success) ? '成功' : '失败')
|
|
||||||
if (item.count && item.count >= 0) {
|
|
||||||
resultStr += '\n> 影响行数:' + item.count
|
|
||||||
}
|
|
||||||
resultStr += '\n> 耗时:' + (item.time || 0) / 1000 + 's'
|
|
||||||
resultStr += '\n\n'
|
|
||||||
}
|
|
||||||
this.executeResultInfo = resultStr
|
|
||||||
this.sqlConsole = data
|
|
||||||
}
|
|
||||||
this.sqlExecuting = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
stopData() {
|
|
||||||
const data = {}
|
|
||||||
data.sqlKey = this.sqlExecutorId
|
|
||||||
stopSql(data).then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
this.$message.success('停止成功')
|
|
||||||
}
|
|
||||||
this.sqlExecuting = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
changeTextarea(val) {
|
|
||||||
this.sqlText = val
|
|
||||||
},
|
|
||||||
formaterSql() {
|
|
||||||
if (!this.sqlText) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.$refs.sqleditor.editor.setValue(sqlFormatter.format(this.$refs.sqleditor.editor.getValue()))
|
|
||||||
},
|
|
||||||
refreshData() {
|
|
||||||
if (!this.sqlText) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.sqlExecuting = false
|
|
||||||
this.activeTabName = 'table0'
|
|
||||||
this.sqlExecutorId = undefined
|
|
||||||
this.sqlText = undefined
|
|
||||||
this.$refs.sqleditor.editor.setValue('')
|
|
||||||
this.sqlConsole = []
|
|
||||||
this.executeResultInfo = undefined
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.el-card ::v-deep .el-card__body {
|
|
||||||
height: calc(100vh - 170px);
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<div v-if="crud.props.searchToggle">
|
<div v-if="crud.props.searchToggle">
|
||||||
@@ -71,6 +72,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<div v-if="crud.props.searchToggle">
|
<div v-if="crud.props.searchToggle">
|
||||||
@@ -63,6 +64,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<div v-if="crud.props.searchToggle">
|
<div v-if="crud.props.searchToggle">
|
||||||
@@ -102,6 +103,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<div v-if="crud.props.searchToggle">
|
<div v-if="crud.props.searchToggle">
|
||||||
@@ -37,6 +38,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
<!--工具栏-->
|
<!--工具栏-->
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<div v-if="crud.props.searchToggle">
|
<div v-if="crud.props.searchToggle">
|
||||||
@@ -54,6 +55,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<Search />
|
<Search />
|
||||||
<crudOperation>
|
<crudOperation>
|
||||||
@@ -47,6 +48,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<Search />
|
<Search />
|
||||||
<crudOperation>
|
<crudOperation>
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<div v-if="crud.props.searchToggle">
|
<div v-if="crud.props.searchToggle">
|
||||||
<el-input v-model="query.filter" clearable size="small" placeholder="全表模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
<el-input v-model="query.filter" clearable size="small" placeholder="全表模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||||
@@ -50,6 +51,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
456
src/views/quality/checkcontentrule/CheckContentRuleAdd.vue
Normal file
@@ -0,0 +1,456 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>{{ title }}</span>
|
||||||
|
<el-button-group style="float: right;">
|
||||||
|
<el-button v-hasPerm="['quality:rule:add']" type="primary" size="mini" icon="el-icon-finished" :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="规则名称" prop="ruleName">
|
||||||
|
<el-input v-model="form.ruleName" placeholder="请输入规则名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查类型" prop="ruleItemId">
|
||||||
|
<el-select v-model="form.ruleItemId" placeholder="请选择核查类型" @change="ruleItemSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleItemOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.itemExplain"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规则级别" prop="ruleLevelId">
|
||||||
|
<el-select v-model="form.ruleLevelId" placeholder="请选择规则级别">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleLevelOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据源" prop="ruleSourceId">
|
||||||
|
<el-select v-model="form.ruleSourceId" placeholder="请选择数据源" @change="sourceSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="source in sourceOptions"
|
||||||
|
:key="source.id"
|
||||||
|
:label="source.sourceName"
|
||||||
|
:value="source.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据表" prop="ruleTableId">
|
||||||
|
<el-select v-model="form.ruleTableId" placeholder="请选择数据表" @change="tableSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查字段" prop="ruleColumnId">
|
||||||
|
<el-select v-model="form.ruleColumnId" placeholder="请选择核查字段" @change="columnSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="column in columnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-divider content-position="left">核查配置</el-divider>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'timeliness_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="判定阀值">
|
||||||
|
<el-input-number v-model="form.ruleConfig.timeliness.threshold" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'consistent_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典类别">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.gbTypeId" placeholder="请选择" @change="dictTypeSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dictTypeOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.gbTypeName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典字段">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.bindGbColumn" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in gbColumnOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'relevance_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联表">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedTableId" placeholder="请选择" @change="relatedTableSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联字段">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedColumnId" placeholder="请选择" @change="relatedColumnSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="column in relatedColumnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'accuracy_key_length'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="最大长度">
|
||||||
|
<el-input-number v-model="form.ruleConfig.accuracy.maxLength" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- 正则表达式规则-->
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'regular_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="正则表达">
|
||||||
|
<el-input v-model="form.ruleConfig.regular.regular" placeholder="请输入正则规则" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'regular_key'">
|
||||||
|
<el-form-item label="常用正则">
|
||||||
|
<el-radio-group v-model="form.zzStatus" @change="handleZzStatusRadioChange">
|
||||||
|
<el-radio label="1">手机号码</el-radio>
|
||||||
|
<el-radio label="2">邮箱</el-radio>
|
||||||
|
<el-radio label="3">整数</el-radio>
|
||||||
|
<el-radio label="4">负数</el-radio>
|
||||||
|
<el-radio label="5">身份证</el-radio>
|
||||||
|
<el-radio label="6">日期格式yyyy-mm-dd</el-radio>
|
||||||
|
<el-radio label="7">IP</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.itemText"
|
||||||
|
>{{ dict.itemValue }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listRuleLevel, listRuleItem, addCheckRule } from '@/api/quality/checkrule'
|
||||||
|
import { listDataSource } from '@/api/metadata/datasource'
|
||||||
|
import { listDataTable } from '@/api/metadata/datatable'
|
||||||
|
import { listDataColumn } from '@/api/metadata/datacolumn'
|
||||||
|
import { listDataDictType } from '@/api/standard/datadict'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckContentRuleAdd',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: function() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '核查规则新增',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 保存按钮
|
||||||
|
loadingOptions: {
|
||||||
|
loading: false,
|
||||||
|
loadingText: '保存',
|
||||||
|
isDisabled: false
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
ruleName: undefined,
|
||||||
|
ruleTypeId: undefined,
|
||||||
|
ruleItemId: undefined,
|
||||||
|
ruleLevelId: undefined,
|
||||||
|
ruleDbType: undefined,
|
||||||
|
ruleSourceId: undefined,
|
||||||
|
ruleSource: undefined,
|
||||||
|
ruleTableId: undefined,
|
||||||
|
ruleTable: undefined,
|
||||||
|
ruleTableComment: undefined,
|
||||||
|
ruleColumnId: undefined,
|
||||||
|
ruleColumn: undefined,
|
||||||
|
ruleColumnComment: undefined,
|
||||||
|
ruleConfig: {
|
||||||
|
ruleItemCode: undefined,
|
||||||
|
consistent: {
|
||||||
|
gbTypeId: undefined,
|
||||||
|
bindGbColumn: undefined
|
||||||
|
},
|
||||||
|
relevance: {
|
||||||
|
relatedTableId: undefined,
|
||||||
|
relatedTable: undefined,
|
||||||
|
relatedTableComment: undefined,
|
||||||
|
relatedColumnId: undefined,
|
||||||
|
relatedColumn: undefined,
|
||||||
|
relatedColumnComment: undefined
|
||||||
|
},
|
||||||
|
timeliness: {
|
||||||
|
threshold: undefined
|
||||||
|
},
|
||||||
|
accuracy: {
|
||||||
|
maxLength: undefined
|
||||||
|
},
|
||||||
|
regular: {
|
||||||
|
regular: undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
status: '1',
|
||||||
|
zzStatus: '0' // 状态正则
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
ruleName: [
|
||||||
|
{ required: true, message: '规则名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
ruleItemId: [
|
||||||
|
{ required: true, message: '核查类型不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleLevelId: [
|
||||||
|
{ required: true, message: '规则级别不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleSourceId: [
|
||||||
|
{ required: true, message: '数据源不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleTableId: [
|
||||||
|
{ required: true, message: '数据表不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleColumnId: [
|
||||||
|
{ required: true, message: '核查字段不能为空', trigger: 'change' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 规则级别数据字典
|
||||||
|
ruleLevelOptions: [],
|
||||||
|
// 核查类型数据字典
|
||||||
|
ruleItemOptions: [],
|
||||||
|
sourceOptions: [],
|
||||||
|
tableOptions: [],
|
||||||
|
columnOptions: [],
|
||||||
|
dictTypeOptions: [],
|
||||||
|
gbColumnOptions: [
|
||||||
|
{ value: 'gb_code', label: '标准编码' },
|
||||||
|
{ value: 'gb_name', label: '标准名称' }
|
||||||
|
],
|
||||||
|
relatedColumnOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log('data:' + this.data)
|
||||||
|
this.form.ruleTypeId = this.data.ruleTypeId
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
listDataDictType().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.dictTypeOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getRuleLevelList()
|
||||||
|
this.getRuleItemList()
|
||||||
|
this.getDataSourceList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showCard() {
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
getRuleLevelList() {
|
||||||
|
listRuleLevel().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.ruleLevelOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getRuleItemList() {
|
||||||
|
listRuleItem({ ruleTypeId: this.data.ruleTypeId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.ruleItemOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDataSourceList() {
|
||||||
|
listDataSource().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.sourceOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
ruleItemSelectChanged(val) {
|
||||||
|
const item = this.ruleItemOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.ruleItemCode = item.itemCode
|
||||||
|
},
|
||||||
|
sourceSelectChanged(val) {
|
||||||
|
listDataTable({ sourceId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.tableOptions = response.data
|
||||||
|
this.columnOptions = []
|
||||||
|
const source = this.sourceOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleSource = source.sourceName
|
||||||
|
this.form.ruleDbType = source.dbType
|
||||||
|
this.form.ruleTableId = ''
|
||||||
|
this.form.ruleTable = ''
|
||||||
|
this.form.ruleTableComment = ''
|
||||||
|
this.form.ruleColumnId = ''
|
||||||
|
this.form.ruleColumn = ''
|
||||||
|
this.form.ruleColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableSelectChanged(val) {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.columnOptions = response.data
|
||||||
|
const table = this.tableOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleTable = table.tableName
|
||||||
|
this.form.ruleTableComment = table.tableComment
|
||||||
|
this.form.ruleColumnId = ''
|
||||||
|
this.form.ruleColumn = ''
|
||||||
|
this.form.ruleColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
columnSelectChanged(val) {
|
||||||
|
const column = this.columnOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleColumn = column.columnName
|
||||||
|
this.form.ruleColumnComment = column.columnComment
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
dictTypeSelectChanged(val) {
|
||||||
|
const item = this.dictTypeOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.consistent.gbTypeCode = item.gbTypeCode
|
||||||
|
this.form.ruleConfig.consistent.gbTypeName = item.gbTypeName
|
||||||
|
},
|
||||||
|
relatedTableSelectChanged(val) {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.relatedColumnOptions = response.data
|
||||||
|
const table = this.tableOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.relevance.relatedTable = table.tableName
|
||||||
|
this.form.ruleConfig.relevance.relatedTableComment = table.tableComment
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnId = ''
|
||||||
|
this.form.ruleConfig.relevance.relatedColumn = ''
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
relatedColumnSelectChanged(val) {
|
||||||
|
const column = this.relatedColumnOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.relevance.relatedColumn = column.columnName
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnComment = column.columnComment
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs['form'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.loadingOptions.loading = true
|
||||||
|
this.loadingOptions.loadingText = '保存中...'
|
||||||
|
this.loadingOptions.isDisabled = true
|
||||||
|
addCheckRule(this.form).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
// 2秒后跳转列表页
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
this.$message.error('保存失败')
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleZzStatusRadioChange(value) {
|
||||||
|
// 在这里执行其他需要的操作
|
||||||
|
if (value === '1') {
|
||||||
|
this.form.ruleConfig.regular.regular = '^[1-9][0-9]{10}$'
|
||||||
|
} else if (value === '2') {
|
||||||
|
this.form.ruleConfig.regular.regular = '^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 230px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
285
src/views/quality/checkcontentrule/CheckContentRuleDetail.vue
Normal file
@@ -0,0 +1,285 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>{{ title }}</span>
|
||||||
|
<el-button-group style="float: right;">
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-form ref="form" :model="form" label-width="80px" disabled>
|
||||||
|
<el-form-item label="规则名称">
|
||||||
|
<el-input v-model="form.ruleName" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查类型">
|
||||||
|
<el-select v-model="form.ruleItemId">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleItemOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.itemExplain"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规则级别">
|
||||||
|
<el-select v-model="form.ruleLevelId">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleLevelOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据源">
|
||||||
|
<el-select v-model="form.ruleSourceId">
|
||||||
|
<el-option
|
||||||
|
v-for="source in sourceOptions"
|
||||||
|
:key="source.id"
|
||||||
|
:label="source.sourceName"
|
||||||
|
:value="source.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据表">
|
||||||
|
<el-select v-model="form.ruleTableId">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查字段">
|
||||||
|
<el-select v-model="form.ruleColumnId">
|
||||||
|
<el-option
|
||||||
|
v-for="column in columnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-divider content-position="left">核查配置</el-divider>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'timeliness_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="判定阀值">
|
||||||
|
<el-input-number v-model="form.ruleConfig.timeliness.threshold" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'consistent_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典类别">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.gbTypeId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dictTypeOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.gbTypeName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典字段">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.bindGbColumn" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in gbColumnOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'relevance_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联表">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedTableId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联字段">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedColumnId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="column in relatedColumnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'accuracy_key_length'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="最大长度">
|
||||||
|
<el-input-number v-model="form.ruleConfig.accuracy.maxLength" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'regular_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="正则表达">
|
||||||
|
<el-input v-model="form.ruleConfig.regular.regular" placeholder="请输入正则规则" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="状态">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.itemText"
|
||||||
|
>{{ dict.itemValue }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form.remark" type="textarea" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listRuleLevel, listRuleItem, getCheckRule } from '@/api/quality/checkrule'
|
||||||
|
import { listDataSource } from '@/api/metadata/datasource'
|
||||||
|
import { listDataTable } from '@/api/metadata/datatable'
|
||||||
|
import { listDataColumn } from '@/api/metadata/datacolumn'
|
||||||
|
import { listDataDictType } from '@/api/standard/datadict'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckContentRuleDetail',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: function() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '核查规则详情',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 规则级别数据字典
|
||||||
|
ruleLevelOptions: [],
|
||||||
|
// 核查类型数据字典
|
||||||
|
ruleItemOptions: [],
|
||||||
|
sourceOptions: [],
|
||||||
|
tableOptions: [],
|
||||||
|
columnOptions: [],
|
||||||
|
dictTypeOptions: [],
|
||||||
|
gbColumnOptions: [
|
||||||
|
{ value: 'gb_code', label: '标准编码' },
|
||||||
|
{ value: 'gb_name', label: '标准名称' }
|
||||||
|
],
|
||||||
|
relatedColumnOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log('id:' + this.data.id)
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
listDataDictType().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.dictTypeOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getRuleLevelList()
|
||||||
|
this.getDataSourceList()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getCheckRule(this.data.id)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showCard() {
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 获取详情 */
|
||||||
|
async getCheckRule(id) {
|
||||||
|
this.form = await getCheckRule(id).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.ruleItemOptions = await listRuleItem({ ruleTypeId: this.form.ruleTypeId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.tableOptions = await listDataTable({ sourceId: this.form.ruleSourceId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
}) || []
|
||||||
|
this.columnOptions = await listDataColumn({ sourceId: this.form.ruleSourceId, tableId: this.form.ruleTableId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
}) || []
|
||||||
|
if (this.form.ruleConfig.ruleItemCode === 'relevance_key') {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: this.form.ruleConfig.relevance.relatedTableId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.relatedColumnOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getRuleLevelList() {
|
||||||
|
listRuleLevel().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.ruleLevelOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDataSourceList() {
|
||||||
|
listDataSource().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.sourceOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 230px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
439
src/views/quality/checkcontentrule/CheckContentRuleEdit.vue
Normal file
@@ -0,0 +1,439 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>{{ title }}</span>
|
||||||
|
<el-button-group style="float: right;">
|
||||||
|
<el-button v-hasPerm="['quality:rule:edit']" type="primary" size="mini" icon="el-icon-finished" :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="规则名称" prop="ruleName">
|
||||||
|
<el-input v-model="form.ruleName" placeholder="请输入规则名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查类型" prop="ruleItemId">
|
||||||
|
<el-select v-model="form.ruleItemId" placeholder="请选择核查类型" @change="ruleItemSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleItemOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.itemExplain"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规则级别" prop="ruleLevelId">
|
||||||
|
<el-select v-model="form.ruleLevelId" placeholder="请选择规则级别">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleLevelOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据源" prop="ruleSourceId">
|
||||||
|
<el-select v-model="form.ruleSourceId" placeholder="请选择数据源" @change="sourceSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="source in sourceOptions"
|
||||||
|
:key="source.id"
|
||||||
|
:label="source.sourceName"
|
||||||
|
:value="source.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据表" prop="ruleTableId">
|
||||||
|
<el-select v-model="form.ruleTableId" placeholder="请选择数据表" @change="tableSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查字段" prop="ruleColumnId">
|
||||||
|
<el-select v-model="form.ruleColumnId" placeholder="请选择核查字段" @change="columnSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="column in columnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-divider content-position="left">核查配置</el-divider>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'timeliness_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="判定阀值">
|
||||||
|
<el-input-number v-model="form.ruleConfig.timeliness.threshold" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'consistent_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典类别">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.gbTypeId" placeholder="请选择" @change="dictTypeSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dictTypeOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.gbTypeName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典字段">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.bindGbColumn" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in gbColumnOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'relevance_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联表">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedTableId" placeholder="请选择" @change="relatedTableSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联字段">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedColumnId" placeholder="请选择" @change="relatedColumnSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="column in relatedColumnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'accuracy_key_length'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="最大长度">
|
||||||
|
<el-input-number v-model="form.ruleConfig.accuracy.maxLength" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'regular_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="正则表达">
|
||||||
|
<el-input v-model="form.ruleConfig.regular.regular" placeholder="请输入正则规则" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'regular_key'">
|
||||||
|
<el-form-item label="常用正则">
|
||||||
|
<el-radio-group v-model="form.zzStatus" @change="handleZzStatusRadioChange">
|
||||||
|
<el-radio label="1">手机号码</el-radio>
|
||||||
|
<el-radio label="2">邮箱</el-radio>
|
||||||
|
<el-radio label="3">整数</el-radio>
|
||||||
|
<el-radio label="4">负数</el-radio>
|
||||||
|
<el-radio label="5">身份证</el-radio>
|
||||||
|
<el-radio label="6">日期格式yyyy-mm-dd</el-radio>
|
||||||
|
<el-radio label="7">IP</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.itemText"
|
||||||
|
>{{ dict.itemValue }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listRuleLevel, listRuleItem, getCheckRule, updateCheckRule } from '@/api/quality/checkrule'
|
||||||
|
import { listDataSource } from '@/api/metadata/datasource'
|
||||||
|
import { listDataTable } from '@/api/metadata/datatable'
|
||||||
|
import { listDataColumn } from '@/api/metadata/datacolumn'
|
||||||
|
import { listDataDictType } from '@/api/standard/datadict'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckContentRuleEdit',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: function() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '核查规则编辑',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 保存按钮
|
||||||
|
loadingOptions: {
|
||||||
|
loading: false,
|
||||||
|
loadingText: '保存',
|
||||||
|
isDisabled: false
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
ruleName: [
|
||||||
|
{ required: true, message: '规则名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
ruleItemId: [
|
||||||
|
{ required: true, message: '核查类型不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleLevelId: [
|
||||||
|
{ required: true, message: '规则级别不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleSourceId: [
|
||||||
|
{ required: true, message: '数据源不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleTableId: [
|
||||||
|
{ required: true, message: '数据表不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleColumnId: [
|
||||||
|
{ required: true, message: '核查字段不能为空', trigger: 'change' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 规则级别数据字典
|
||||||
|
ruleLevelOptions: [],
|
||||||
|
// 核查类型数据字典
|
||||||
|
ruleItemOptions: [],
|
||||||
|
sourceOptions: [],
|
||||||
|
tableOptions: [],
|
||||||
|
columnOptions: [],
|
||||||
|
dictTypeOptions: [],
|
||||||
|
gbColumnOptions: [
|
||||||
|
{ value: 'gb_code', label: '标准编码' },
|
||||||
|
{ value: 'gb_name', label: '标准名称' }
|
||||||
|
],
|
||||||
|
relatedColumnOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log('id:' + this.data.id)
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
listDataDictType().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.dictTypeOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getRuleLevelList()
|
||||||
|
this.getDataSourceList()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getCheckRule(this.data.id)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showCard() {
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 获取详情 */
|
||||||
|
async getCheckRule(id) {
|
||||||
|
this.form = await getCheckRule(id).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.ruleItemOptions = await listRuleItem({ ruleTypeId: this.form.ruleTypeId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.tableOptions = await listDataTable({ sourceId: this.form.ruleSourceId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.columnOptions = await listDataColumn({ sourceId: this.form.ruleSourceId, tableId: this.form.ruleTableId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (this.form.ruleConfig.ruleItemCode === 'relevance_key') {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: this.form.ruleConfig.relevance.relatedTableId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.relatedColumnOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getRuleLevelList() {
|
||||||
|
listRuleLevel().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.ruleLevelOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDataSourceList() {
|
||||||
|
listDataSource().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.sourceOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
ruleItemSelectChanged(val) {
|
||||||
|
const item = this.ruleItemOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.ruleItemCode = item.itemCode
|
||||||
|
},
|
||||||
|
sourceSelectChanged(val) {
|
||||||
|
listDataTable({ sourceId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.tableOptions = response.data
|
||||||
|
this.columnOptions = []
|
||||||
|
const source = this.sourceOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleSource = source.sourceName
|
||||||
|
this.form.ruleDbType = source.dbType
|
||||||
|
this.form.ruleTableId = ''
|
||||||
|
this.form.ruleTable = ''
|
||||||
|
this.form.ruleTableComment = ''
|
||||||
|
this.form.ruleColumnId = ''
|
||||||
|
this.form.ruleColumn = ''
|
||||||
|
this.form.ruleColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableSelectChanged(val) {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.columnOptions = response.data
|
||||||
|
const table = this.tableOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleTable = table.tableName
|
||||||
|
this.form.ruleTableComment = table.tableComment
|
||||||
|
this.form.ruleColumnId = ''
|
||||||
|
this.form.ruleColumn = ''
|
||||||
|
this.form.ruleColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
columnSelectChanged(val) {
|
||||||
|
const column = this.columnOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleColumn = column.columnName
|
||||||
|
this.form.ruleColumnComment = column.columnComment
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
dictTypeSelectChanged(val) {
|
||||||
|
const item = this.dictTypeOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.consistent.gbTypeCode = item.gbTypeCode
|
||||||
|
this.form.ruleConfig.consistent.gbTypeName = item.gbTypeName
|
||||||
|
},
|
||||||
|
relatedTableSelectChanged(val) {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.relatedColumnOptions = response.data
|
||||||
|
const table = this.tableOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.relevance.relatedTable = table.tableName
|
||||||
|
this.form.ruleConfig.relevance.relatedTableComment = table.tableComment
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnId = ''
|
||||||
|
this.form.ruleConfig.relevance.relatedColumn = ''
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
relatedColumnSelectChanged(val) {
|
||||||
|
const column = this.relatedColumnOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.relevance.relatedColumn = column.columnName
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnComment = column.columnComment
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs['form'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.loadingOptions.loading = true
|
||||||
|
this.loadingOptions.loadingText = '保存中...'
|
||||||
|
this.loadingOptions.isDisabled = true
|
||||||
|
updateCheckRule(this.form).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
// 2秒后跳转列表页
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
this.$message.error('保存失败')
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleZzStatusRadioChange(value) {
|
||||||
|
// 在这里执行其他需要的操作
|
||||||
|
if (value === '1') {
|
||||||
|
this.form.ruleConfig.regular.regular = '^[1-9][0-9]{10}$'
|
||||||
|
} else if (value === '2') {
|
||||||
|
this.form.ruleConfig.regular.regular = '^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 230px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
428
src/views/quality/checkcontentrule/CheckContentRuleList.vue
Normal file
@@ -0,0 +1,428 @@
|
|||||||
|
<template>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card class="box-card tree-wrapper" shadow="always">
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-tree
|
||||||
|
ref="ruleType"
|
||||||
|
:data="ruleTypeOptions"
|
||||||
|
node-key="id"
|
||||||
|
empty-text="加载中,请稍后"
|
||||||
|
:props="defaultProps"
|
||||||
|
default-expand-all
|
||||||
|
highlight-current
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
>
|
||||||
|
<template slot-scope="{ node }">
|
||||||
|
<span class="custom-tree-node">
|
||||||
|
<span><i v-if="node.level === 1" class="iconfont icon-zuzhi tree-folder" />{{ node.label }}</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-tree>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="18">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="数据源" prop="ruleName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.ruleSource"
|
||||||
|
placeholder="请输入数据源"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="数据表" prop="ruleName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.ruleTable"
|
||||||
|
placeholder="请输入数据表"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="规则名称" prop="ruleName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.ruleName"
|
||||||
|
placeholder="请输入规则名称"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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-row type="flex" justify="space-between">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-button-group>
|
||||||
|
<el-button
|
||||||
|
v-hasPerm="['quality:rule:add']"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="right-toolbar">
|
||||||
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
|
<el-button circle size="mini">
|
||||||
|
<i class="el-icon-s-grid"></i>
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="small">中等</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="mini">紧凑</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
|
<i class="el-icon-refresh"></i>
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
|
<el-popover placement="bottom" width="100" trigger="click">
|
||||||
|
<el-checkbox-group v-model="checkedTableColumns" @change="handleCheckedColsChange">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="(item, index) in tableColumns"
|
||||||
|
:key="index"
|
||||||
|
:label="item.prop"
|
||||||
|
>{{ item.label }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
<span slot="reference">
|
||||||
|
<el-button circle size="mini">
|
||||||
|
<i class="el-icon-setting"></i>
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</el-popover>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableDataList"
|
||||||
|
border
|
||||||
|
tooltip-effect="dark"
|
||||||
|
:size="tableSize"
|
||||||
|
: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"
|
||||||
|
:width="item.width"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-hasPerm="['quality:rule:edit']"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit-outline"
|
||||||
|
@click="handleEdit(scope.row)"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
v-hasPerm="['quality:rule:detail']"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="handleDetail(scope.row)"
|
||||||
|
>详情</el-button>
|
||||||
|
<el-button
|
||||||
|
v-hasPerm="['quality:rule:remove']"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</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>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listRuleType, pageCheckRule, delCheckRule } from '@/api/quality/checkrule'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckContentRuleList',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableHeight: document.body.offsetHeight - 330 + 'px',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 表格头
|
||||||
|
tableColumns: [
|
||||||
|
{ prop: 'ruleSource', label: '数据源', show: true },
|
||||||
|
{ prop: 'ruleTable', label: '数据表', show: true, formatter: this.ruleTableFormatter },
|
||||||
|
{ prop: 'ruleColumn', label: '核查字段', show: true, formatter: this.ruleColumnFormatter },
|
||||||
|
{ prop: 'ruleName', label: '规则名称', show: true },
|
||||||
|
{ prop: 'ruleType', label: '规则类型', show: true },
|
||||||
|
{ prop: 'ruleLevel', label: '规则级别', width: 100, show: true },
|
||||||
|
{
|
||||||
|
prop: 'status',
|
||||||
|
label: '状态',
|
||||||
|
show: true,
|
||||||
|
width: 80,
|
||||||
|
formatter: this.statusFormatter
|
||||||
|
},
|
||||||
|
{ prop: 'createTime', label: '创建时间', show: true }
|
||||||
|
],
|
||||||
|
// 默认选择中表格头
|
||||||
|
checkedTableColumns: [],
|
||||||
|
tableSize: 'medium',
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 表格数据
|
||||||
|
tableDataList: [],
|
||||||
|
// 总数据条数
|
||||||
|
total: 0,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
ruleTypeId: '',
|
||||||
|
ruleName: ''
|
||||||
|
},
|
||||||
|
// 左侧树
|
||||||
|
ruleTypeOptions: [],
|
||||||
|
defaultProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'name'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getTree()
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initCols()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getTree() {
|
||||||
|
listRuleType().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
const { data } = response
|
||||||
|
const tree = {}
|
||||||
|
tree.name = '规则类型'
|
||||||
|
const children = []
|
||||||
|
data.forEach(e => {
|
||||||
|
if (e.code === 'unique' || e.code === 'integrity' || e.code === 'accuracy' ||
|
||||||
|
e.code === 'consistent' || e.code === 'regular') {
|
||||||
|
children.push(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
tree.children = children
|
||||||
|
this.ruleTypeOptions = []
|
||||||
|
this.ruleTypeOptions.push(tree)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 节点单击事件 */
|
||||||
|
handleNodeClick(data) {
|
||||||
|
if (data.id) {
|
||||||
|
this.queryParams.ruleTypeId = data.id
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 查询数据源列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
pageCheckRule(this.queryParams).then(response => {
|
||||||
|
this.loading = false
|
||||||
|
if (response.success) {
|
||||||
|
const { data } = response
|
||||||
|
this.tableDataList = data.data
|
||||||
|
this.total = data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
initCols() {
|
||||||
|
this.checkedTableColumns = this.tableColumns.map(col => col.prop)
|
||||||
|
},
|
||||||
|
handleCheckedColsChange(val) {
|
||||||
|
this.tableColumns.forEach(col => {
|
||||||
|
if (!this.checkedTableColumns.includes(col.prop)) {
|
||||||
|
col.show = false
|
||||||
|
} else {
|
||||||
|
col.show = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCommand(command) {
|
||||||
|
this.tableSize = command
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
ruleTypeId: '',
|
||||||
|
ruleName: ''
|
||||||
|
}
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
/** 刷新列表 */
|
||||||
|
handleRefresh() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.showOptions.data = {}
|
||||||
|
if (!this.queryParams.ruleTypeId) {
|
||||||
|
this.$message.warning('请先选择核查规则类型')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.showOptions.data.ruleTypeId = this.queryParams.ruleTypeId
|
||||||
|
this.showOptions.showList = false
|
||||||
|
this.showOptions.showAdd = true
|
||||||
|
this.showOptions.showEdit = false
|
||||||
|
this.showOptions.showDetail = false
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleEdit(row) {
|
||||||
|
this.showOptions.data.id = row.id
|
||||||
|
this.showOptions.showList = false
|
||||||
|
this.showOptions.showAdd = false
|
||||||
|
this.showOptions.showEdit = true
|
||||||
|
this.showOptions.showDetail = false
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
handleDetail(row) {
|
||||||
|
this.showOptions.data.id = row.id
|
||||||
|
this.showOptions.showList = false
|
||||||
|
this.showOptions.showAdd = false
|
||||||
|
this.showOptions.showEdit = false
|
||||||
|
this.showOptions.showDetail = true
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$confirm('选中数据将被永久删除, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
delCheckRule(row.id).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ruleTableFormatter(row, column, cellValue, index) {
|
||||||
|
return row.ruleTableComment ? row.ruleTable + '(' + row.ruleTableComment + ')' : row.ruleTable
|
||||||
|
},
|
||||||
|
ruleColumnFormatter(row, column, cellValue, index) {
|
||||||
|
return row.ruleColumnComment ? row.ruleColumn + '(' + row.ruleColumnComment + ')' : row.ruleColumn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.right-toolbar {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 100px);
|
||||||
|
}
|
||||||
|
.tree-wrapper {
|
||||||
|
overflow-y: auto;
|
||||||
|
.body-wrapper {
|
||||||
|
margin: -10px;
|
||||||
|
::v-deep .custom-tree-node {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
.tree-folder {
|
||||||
|
margin-right: 5px;
|
||||||
|
color: #f6cf07;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
48
src/views/quality/checkcontentrule/index.vue
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<transition name="el-zoom-in-center">
|
||||||
|
<check-rule-list v-if="options.showList" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
|
<transition name="el-zoom-in-top">
|
||||||
|
<check-rule-add v-if="options.showAdd" :data="options.data" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
|
<transition name="el-zoom-in-top">
|
||||||
|
<check-rule-edit v-if="options.showEdit" :data="options.data" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
|
<transition name="el-zoom-in-bottom">
|
||||||
|
<check-rule-detail v-if="options.showDetail" :data="options.data" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CheckRuleList from './CheckContentRuleList'
|
||||||
|
import CheckRuleAdd from './CheckContentRuleAdd'
|
||||||
|
import CheckRuleEdit from './CheckContentRuleEdit'
|
||||||
|
import CheckRuleDetail from './CheckContentRuleDetail'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckContentRule',
|
||||||
|
components: { CheckRuleList, CheckRuleAdd, CheckRuleEdit, CheckRuleDetail },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
options: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showCard(data) {
|
||||||
|
Object.assign(this.options, data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
170
src/views/quality/checkjob/CheckJobAdd.vue
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>{{ title }}</span>
|
||||||
|
<el-button-group style="float: right;">
|
||||||
|
<el-button type="primary" size="mini" icon="el-icon-finished" :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="任务名称" prop="jobName">
|
||||||
|
<el-input v-model="form.jobName" placeholder="任务名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务类型" prop="jobType">
|
||||||
|
<el-select v-model="form.jobType" placeholder="请选择任务类型" @change="ruleItemSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleItemOptions"
|
||||||
|
:key="item.typeId"
|
||||||
|
:label="item.typeName"
|
||||||
|
:value="item.typeId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-divider content-position="left">任务配置</el-divider>
|
||||||
|
<el-form-item label="cron表达式" prop="cronExpression">
|
||||||
|
<el-input v-model="form.cronExpression" placeholder="cron表达式" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.itemText"
|
||||||
|
>{{ dict.itemValue }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务概述" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { saveCheckJob } from '@/api/quality/checkjob'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckJobAdd',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '检测任务新增',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 保存按钮
|
||||||
|
loadingOptions: {
|
||||||
|
loading: false,
|
||||||
|
loadingText: '保存',
|
||||||
|
isDisabled: false
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
jobName: undefined,
|
||||||
|
jobType: undefined,
|
||||||
|
cronExpression: undefined,
|
||||||
|
beanName: 'qualityTask',
|
||||||
|
methodName: 'task',
|
||||||
|
status: '0'
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
jobName: [
|
||||||
|
{ required: true, message: '任务名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
jobType: [
|
||||||
|
{ required: true, message: '任务类型不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
cronExpression: [
|
||||||
|
{ required: true, message: 'cron表达式不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 规则级别数据字典
|
||||||
|
ruleLevelOptions: [],
|
||||||
|
// 核查类型数据字典
|
||||||
|
ruleItemOptions: [
|
||||||
|
{ typeId: 'structure', typeName: '结构符合性' },
|
||||||
|
{ typeId: 'content', typeName: '内容符合性' },
|
||||||
|
{ typeId: 'relevance', typeName: '关联符合性' }
|
||||||
|
],
|
||||||
|
sourceOptions: [],
|
||||||
|
tableOptions: [],
|
||||||
|
columnOptions: [],
|
||||||
|
dictTypeOptions: [],
|
||||||
|
relatedColumnOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.form.jobType = this.data.jobType
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showCard() {
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
ruleItemSelectChanged(val) {
|
||||||
|
const item = this.ruleItemOptions.find(function (item) {
|
||||||
|
return item.typeId === val
|
||||||
|
})
|
||||||
|
this.form.jobType = item.typeId
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function () {
|
||||||
|
this.$refs['form'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.loadingOptions.loading = true
|
||||||
|
this.loadingOptions.loadingText = '保存中...'
|
||||||
|
this.loadingOptions.isDisabled = true
|
||||||
|
saveCheckJob(this.form).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
// 2秒后跳转列表页
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
this.$message.error('保存失败')
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 230px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
174
src/views/quality/checkjob/CheckJobDetail.vue
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>{{ title }}</span>
|
||||||
|
<el-button-group style="float: right;">
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px" disabled>
|
||||||
|
<el-form-item label="任务名称" prop="jobName">
|
||||||
|
<el-input v-model="form.jobName" placeholder="任务名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务类型" prop="jobType">
|
||||||
|
<el-select v-model="form.jobType" placeholder="请选择任务类型" @change="ruleItemSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleItemOptions"
|
||||||
|
:key="item.typeId"
|
||||||
|
:label="item.typeName"
|
||||||
|
:value="item.typeId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-divider content-position="left">任务配置</el-divider>
|
||||||
|
<el-form-item label="cron表达式" prop="cronExpression">
|
||||||
|
<el-input v-model="form.cronExpression" placeholder="cron表达式" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.itemText"
|
||||||
|
>{{ dict.itemValue }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务概述" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updateCheckJob, getScheduleJobById } from '@/api/quality/checkjob'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckJobDetail',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '检测任务详情',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 保存按钮
|
||||||
|
loadingOptions: {
|
||||||
|
loading: false,
|
||||||
|
loadingText: '保存',
|
||||||
|
isDisabled: false
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
jobName: [
|
||||||
|
{ required: true, message: '任务名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
jobType: [
|
||||||
|
{ required: true, message: '任务类型不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
cronExpression: [
|
||||||
|
{ required: true, message: 'cron表达式不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 规则级别数据字典
|
||||||
|
ruleLevelOptions: [],
|
||||||
|
// 核查类型数据字典
|
||||||
|
ruleItemOptions: [
|
||||||
|
{ typeId: 'structure', typeName: '结构符合性' },
|
||||||
|
{ typeId: 'content', typeName: '内容符合性' },
|
||||||
|
{ typeId: 'relevance', typeName: '关联符合性' }
|
||||||
|
],
|
||||||
|
sourceOptions: [],
|
||||||
|
tableOptions: [],
|
||||||
|
columnOptions: [],
|
||||||
|
dictTypeOptions: [],
|
||||||
|
relatedColumnOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.form.jobType = this.data.jobType
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getCheckJob(this.data.id)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 获取详情 */
|
||||||
|
async getCheckJob(id) {
|
||||||
|
this.form = await getScheduleJobById(id).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
console.log('response==', response)
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showCard() {
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
ruleItemSelectChanged(val) {
|
||||||
|
const item = this.ruleItemOptions.find(function (item) {
|
||||||
|
return item.typeId === val
|
||||||
|
})
|
||||||
|
this.form.jobType = item.typeId
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function () {
|
||||||
|
this.$refs['form'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.loadingOptions.loading = true
|
||||||
|
this.loadingOptions.loadingText = '保存中...'
|
||||||
|
this.loadingOptions.isDisabled = true
|
||||||
|
updateCheckJob(this.form).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
// 2秒后跳转列表页
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
this.$message.error('保存失败')
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 230px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
175
src/views/quality/checkjob/CheckJobEdit.vue
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>{{ title }}</span>
|
||||||
|
<el-button-group style="float: right;">
|
||||||
|
<el-button type="primary" size="mini" icon="el-icon-finished" :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="任务名称" prop="jobName">
|
||||||
|
<el-input v-model="form.jobName" placeholder="任务名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务类型" prop="jobType">
|
||||||
|
<el-select v-model="form.jobType" placeholder="请选择任务类型" @change="ruleItemSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleItemOptions"
|
||||||
|
:key="item.typeId"
|
||||||
|
:label="item.typeName"
|
||||||
|
:value="item.typeId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-divider content-position="left">任务配置</el-divider>
|
||||||
|
<el-form-item label="cron表达式" prop="cronExpression">
|
||||||
|
<el-input v-model="form.cronExpression" placeholder="cron表达式" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.itemText"
|
||||||
|
>{{ dict.itemValue }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务概述" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updateCheckJob, getScheduleJobById } from '@/api/quality/checkjob'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckJobEdit',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '检测任务修改',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 保存按钮
|
||||||
|
loadingOptions: {
|
||||||
|
loading: false,
|
||||||
|
loadingText: '保存',
|
||||||
|
isDisabled: false
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
jobName: [
|
||||||
|
{ required: true, message: '任务名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
jobType: [
|
||||||
|
{ required: true, message: '任务类型不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
cronExpression: [
|
||||||
|
{ required: true, message: 'cron表达式不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 规则级别数据字典
|
||||||
|
ruleLevelOptions: [],
|
||||||
|
// 核查类型数据字典
|
||||||
|
ruleItemOptions: [
|
||||||
|
{ typeId: 'structure', typeName: '结构符合性' },
|
||||||
|
{ typeId: 'content', typeName: '内容符合性' },
|
||||||
|
{ typeId: 'relevance', typeName: '关联符合性' }
|
||||||
|
],
|
||||||
|
sourceOptions: [],
|
||||||
|
tableOptions: [],
|
||||||
|
columnOptions: [],
|
||||||
|
dictTypeOptions: [],
|
||||||
|
relatedColumnOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.form.jobType = this.data.jobType
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getCheckJob(this.data.id)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 获取详情 */
|
||||||
|
async getCheckJob(id) {
|
||||||
|
this.form = await getScheduleJobById(id).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
console.log('response==', response)
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showCard() {
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
ruleItemSelectChanged(val) {
|
||||||
|
const item = this.ruleItemOptions.find(function (item) {
|
||||||
|
return item.typeId === val
|
||||||
|
})
|
||||||
|
this.form.jobType = item.typeId
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function () {
|
||||||
|
this.$refs['form'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.loadingOptions.loading = true
|
||||||
|
this.loadingOptions.loadingText = '保存中...'
|
||||||
|
this.loadingOptions.isDisabled = true
|
||||||
|
updateCheckJob(this.form).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
// 2秒后跳转列表页
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
this.$message.error('保存失败')
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 230px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,10 +1,77 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card class="box-card" shadow="always">
|
<el-card class="box-card" shadow="always">
|
||||||
|
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="任务名称" prop="sourceName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.sourceName"
|
||||||
|
placeholder="请输入任务名称"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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-row type="flex" justify="space-between">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-button-group>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="right-toolbar">
|
||||||
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
|
<el-button circle size="mini">
|
||||||
|
<i class="el-icon-s-grid"></i>
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="small">中等</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="mini">紧凑</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
|
<i class="el-icon-refresh"></i>
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
|
<el-popover placement="bottom" width="100" trigger="click">
|
||||||
|
<el-checkbox-group v-model="checkedTableColumns" @change="handleCheckedColsChange">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="(item, index) in tableColumns"
|
||||||
|
:key="index"
|
||||||
|
:label="item.prop"
|
||||||
|
>{{ item.label }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
<span slot="reference">
|
||||||
|
<el-button circle size="mini">
|
||||||
|
<i class="el-icon-setting"></i>
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</el-popover>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="tableDataList"
|
:data="tableDataList"
|
||||||
border
|
border
|
||||||
tooltip-effect="dark"
|
tooltip-effect="dark"
|
||||||
|
:size="tableSize"
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
style="width: 100%;margin: 15px 0;"
|
style="width: 100%;margin: 15px 0;"
|
||||||
>
|
>
|
||||||
@@ -27,13 +94,21 @@
|
|||||||
</template>
|
</template>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-popover
|
<el-button
|
||||||
placement="left"
|
size="mini"
|
||||||
trigger="click"
|
type="text"
|
||||||
>
|
icon="el-icon-view"
|
||||||
|
@click="handleDetail(scope.row)"
|
||||||
|
>详情</el-button>
|
||||||
|
<el-button
|
||||||
|
v-hasPerm="['quality:rule:edit']"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit-outline"
|
||||||
|
@click="handleEdit(scope.row)"
|
||||||
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.status === '1'"
|
v-if="scope.row.status === '1'"
|
||||||
v-hasPerm="['quality:job:pause']"
|
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-view"
|
icon="el-icon-view"
|
||||||
@@ -41,21 +116,17 @@
|
|||||||
>任务暂停</el-button>
|
>任务暂停</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.status === '0'"
|
v-if="scope.row.status === '0'"
|
||||||
v-hasPerm="['quality:job:resume']"
|
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-view"
|
icon="el-icon-view"
|
||||||
@click="handleResume(scope.row)"
|
@click="handleResume(scope.row)"
|
||||||
>任务恢复</el-button>
|
>任务恢复</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPerm="['quality:job:run']"
|
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-view"
|
icon="el-icon-s-promotion"
|
||||||
@click="handleRun(scope.row)"
|
@click="handleRun(scope.row)"
|
||||||
>立即执行</el-button>
|
>立即执行</el-button>
|
||||||
<el-button slot="reference">操作</el-button>
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -73,7 +144,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { pageCheckJob, pauseCheckJob, resumeCheckJob, runCheckJob } from '@/api/quality/checkjob'
|
import { pageCheckJob, delCheckJob, pauseCheckJob, resumeCheckJob, runCheckJob } from '@/api/quality/checkjob'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CheckJobList',
|
name: 'CheckJobList',
|
||||||
@@ -83,17 +154,21 @@ export default {
|
|||||||
// 展示切换
|
// 展示切换
|
||||||
showOptions: {
|
showOptions: {
|
||||||
data: {},
|
data: {},
|
||||||
showList: true
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
},
|
},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 表格头
|
// 表格头
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{ prop: 'jobName', label: '任务名称', show: true },
|
{ prop: 'jobName', label: '任务名称', show: true },
|
||||||
{ prop: 'beanName', label: 'bean名称', show: true },
|
// { prop: 'beanName', label: 'bean名称', show: true },
|
||||||
{ prop: 'methodName', label: '方法名称', show: true },
|
// { prop: 'methodName', label: '方法名称', show: true },
|
||||||
{ prop: 'methodParams', label: '方法参数', show: true },
|
// { prop: 'methodParams', label: '方法参数', show: true },
|
||||||
{ prop: 'cronExpression', label: 'cron表达式', show: true },
|
{ prop: 'cronExpression', label: 'cron表达式', show: true },
|
||||||
|
{ prop: 'afterDate', label: '最近完成时间', show: true },
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
@@ -101,6 +176,9 @@ export default {
|
|||||||
formatter: this.statusFormatter
|
formatter: this.statusFormatter
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
tableSize: 'medium',
|
||||||
|
// 默认选择中表格头
|
||||||
|
checkedTableColumns: [],
|
||||||
// 状态数据字典
|
// 状态数据字典
|
||||||
statusOptions: [],
|
statusOptions: [],
|
||||||
// 数据集表格数据
|
// 数据集表格数据
|
||||||
@@ -110,7 +188,8 @@ export default {
|
|||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20
|
pageSize: 20,
|
||||||
|
sourceName: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -123,6 +202,21 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initCols() {
|
||||||
|
this.checkedTableColumns = this.tableColumns.map(col => col.prop)
|
||||||
|
},
|
||||||
|
handleCheckedColsChange(val) {
|
||||||
|
this.tableColumns.forEach(col => {
|
||||||
|
if (!this.checkedTableColumns.includes(col.prop)) {
|
||||||
|
col.show = false
|
||||||
|
} else {
|
||||||
|
col.show = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCommand(command) {
|
||||||
|
this.tableSize = command
|
||||||
|
},
|
||||||
/** 查询数据集列表 */
|
/** 查询数据集列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@@ -130,6 +224,7 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
const { data } = response
|
const { data } = response
|
||||||
|
console.log('data.data==', data.data)
|
||||||
this.tableDataList = data.data
|
this.tableDataList = data.data
|
||||||
this.total = data.total
|
this.total = data.total
|
||||||
}
|
}
|
||||||
@@ -199,6 +294,67 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return <el-tag type='warning'>{dictLabel}</el-tag>
|
return <el-tag type='warning'>{dictLabel}</el-tag>
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
sourceName: ''
|
||||||
|
}
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
/** 刷新列表 */
|
||||||
|
handleRefresh() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.showOptions.data = {}
|
||||||
|
this.showOptions.showList = false
|
||||||
|
this.showOptions.showAdd = true
|
||||||
|
this.showOptions.showEdit = false
|
||||||
|
this.showOptions.showDetail = false
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleEdit(row) {
|
||||||
|
this.showOptions.data.id = row.id
|
||||||
|
this.showOptions.showList = false
|
||||||
|
this.showOptions.showAdd = false
|
||||||
|
this.showOptions.showEdit = true
|
||||||
|
this.showOptions.showDetail = false
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
handleDetail(row) {
|
||||||
|
this.showOptions.data.id = row.id
|
||||||
|
this.showOptions.showList = false
|
||||||
|
this.showOptions.showAdd = false
|
||||||
|
this.showOptions.showEdit = false
|
||||||
|
this.showOptions.showDetail = true
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$confirm('选中数据将被永久删除, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
delCheckJob(row.id).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -209,6 +365,6 @@ export default {
|
|||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
.el-card ::v-deep .el-card__body {
|
.el-card ::v-deep .el-card__body {
|
||||||
height: calc(100vh - 170px);
|
height: calc(100vh - 100px);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,15 +3,27 @@
|
|||||||
<transition name="el-zoom-in-center">
|
<transition name="el-zoom-in-center">
|
||||||
<check-job-list v-if="options.showList" @showCard="showCard" />
|
<check-job-list v-if="options.showList" @showCard="showCard" />
|
||||||
</transition>
|
</transition>
|
||||||
|
<transition name="el-zoom-in-top">
|
||||||
|
<check-job-add v-if="options.showAdd" :data="options.data" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
|
<transition name="el-zoom-in-top">
|
||||||
|
<check-job-edit v-if="options.showEdit" :data="options.data" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
|
<transition name="el-zoom-in-top">
|
||||||
|
<check-job-detail v-if="options.showDetail" :data="options.data" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CheckJobList from './CheckJobList'
|
import CheckJobList from './CheckJobList'
|
||||||
|
import CheckJobAdd from './CheckJobAdd'
|
||||||
|
import CheckJobEdit from './CheckJobEdit'
|
||||||
|
import CheckJobDetail from './CheckJobDetail'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CheckJob',
|
name: 'CheckJob',
|
||||||
components: { CheckJobList },
|
components: { CheckJobList, CheckJobAdd, CheckJobEdit, CheckJobDetail },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options: {
|
options: {
|
||||||
|
|||||||
456
src/views/quality/checkrelevancerule/CheckRelevanceRuleAdd.vue
Normal file
@@ -0,0 +1,456 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>{{ title }}</span>
|
||||||
|
<el-button-group style="float: right;">
|
||||||
|
<el-button v-hasPerm="['quality:rule:add']" type="primary" size="mini" icon="el-icon-finished" :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="规则名称" prop="ruleName">
|
||||||
|
<el-input v-model="form.ruleName" placeholder="请输入规则名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查类型" prop="ruleItemId">
|
||||||
|
<el-select v-model="form.ruleItemId" placeholder="请选择核查类型" @change="ruleItemSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleItemOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.itemExplain"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规则级别" prop="ruleLevelId">
|
||||||
|
<el-select v-model="form.ruleLevelId" placeholder="请选择规则级别">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleLevelOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据源" prop="ruleSourceId">
|
||||||
|
<el-select v-model="form.ruleSourceId" placeholder="请选择数据源" @change="sourceSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="source in sourceOptions"
|
||||||
|
:key="source.id"
|
||||||
|
:label="source.sourceName"
|
||||||
|
:value="source.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据表" prop="ruleTableId">
|
||||||
|
<el-select v-model="form.ruleTableId" placeholder="请选择数据表" @change="tableSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查字段" prop="ruleColumnId">
|
||||||
|
<el-select v-model="form.ruleColumnId" placeholder="请选择核查字段" @change="columnSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="column in columnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-divider content-position="left">核查配置</el-divider>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'timeliness_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="判定阀值">
|
||||||
|
<el-input-number v-model="form.ruleConfig.timeliness.threshold" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'consistent_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典类别">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.gbTypeId" placeholder="请选择" @change="dictTypeSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dictTypeOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.gbTypeName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典字段">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.bindGbColumn" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in gbColumnOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'relevance_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联表">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedTableId" placeholder="请选择" @change="relatedTableSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联字段">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedColumnId" placeholder="请选择" @change="relatedColumnSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="column in relatedColumnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'accuracy_key_length'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="最大长度">
|
||||||
|
<el-input-number v-model="form.ruleConfig.accuracy.maxLength" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<!-- 正则表达式规则-->
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'regular_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="正则表达">
|
||||||
|
<el-input v-model="form.ruleConfig.regular.regular" placeholder="请输入正则规则" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'regular_key'">
|
||||||
|
<el-form-item label="常用正则">
|
||||||
|
<el-radio-group v-model="form.zzStatus" @change="handleZzStatusRadioChange">
|
||||||
|
<el-radio label="1">手机号码</el-radio>
|
||||||
|
<el-radio label="2">邮箱</el-radio>
|
||||||
|
<el-radio label="3">整数</el-radio>
|
||||||
|
<el-radio label="4">负数</el-radio>
|
||||||
|
<el-radio label="5">身份证</el-radio>
|
||||||
|
<el-radio label="6">日期格式yyyy-mm-dd</el-radio>
|
||||||
|
<el-radio label="7">IP</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.itemText"
|
||||||
|
>{{ dict.itemValue }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listRuleLevel, listRuleItem, addCheckRule } from '@/api/quality/checkrule'
|
||||||
|
import { listDataSource } from '@/api/metadata/datasource'
|
||||||
|
import { listDataTable } from '@/api/metadata/datatable'
|
||||||
|
import { listDataColumn } from '@/api/metadata/datacolumn'
|
||||||
|
import { listDataDictType } from '@/api/standard/datadict'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckRelevanceRuleAdd',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: function() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '核查规则新增',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 保存按钮
|
||||||
|
loadingOptions: {
|
||||||
|
loading: false,
|
||||||
|
loadingText: '保存',
|
||||||
|
isDisabled: false
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
ruleName: undefined,
|
||||||
|
ruleTypeId: undefined,
|
||||||
|
ruleItemId: undefined,
|
||||||
|
ruleLevelId: undefined,
|
||||||
|
ruleDbType: undefined,
|
||||||
|
ruleSourceId: undefined,
|
||||||
|
ruleSource: undefined,
|
||||||
|
ruleTableId: undefined,
|
||||||
|
ruleTable: undefined,
|
||||||
|
ruleTableComment: undefined,
|
||||||
|
ruleColumnId: undefined,
|
||||||
|
ruleColumn: undefined,
|
||||||
|
ruleColumnComment: undefined,
|
||||||
|
ruleConfig: {
|
||||||
|
ruleItemCode: undefined,
|
||||||
|
consistent: {
|
||||||
|
gbTypeId: undefined,
|
||||||
|
bindGbColumn: undefined
|
||||||
|
},
|
||||||
|
relevance: {
|
||||||
|
relatedTableId: undefined,
|
||||||
|
relatedTable: undefined,
|
||||||
|
relatedTableComment: undefined,
|
||||||
|
relatedColumnId: undefined,
|
||||||
|
relatedColumn: undefined,
|
||||||
|
relatedColumnComment: undefined
|
||||||
|
},
|
||||||
|
timeliness: {
|
||||||
|
threshold: undefined
|
||||||
|
},
|
||||||
|
accuracy: {
|
||||||
|
maxLength: undefined
|
||||||
|
},
|
||||||
|
regular: {
|
||||||
|
regular: undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
status: '1',
|
||||||
|
zzStatus: '0' // 状态正则
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
ruleName: [
|
||||||
|
{ required: true, message: '规则名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
ruleItemId: [
|
||||||
|
{ required: true, message: '核查类型不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleLevelId: [
|
||||||
|
{ required: true, message: '规则级别不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleSourceId: [
|
||||||
|
{ required: true, message: '数据源不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleTableId: [
|
||||||
|
{ required: true, message: '数据表不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleColumnId: [
|
||||||
|
{ required: true, message: '核查字段不能为空', trigger: 'change' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 规则级别数据字典
|
||||||
|
ruleLevelOptions: [],
|
||||||
|
// 核查类型数据字典
|
||||||
|
ruleItemOptions: [],
|
||||||
|
sourceOptions: [],
|
||||||
|
tableOptions: [],
|
||||||
|
columnOptions: [],
|
||||||
|
dictTypeOptions: [],
|
||||||
|
gbColumnOptions: [
|
||||||
|
{ value: 'gb_code', label: '标准编码' },
|
||||||
|
{ value: 'gb_name', label: '标准名称' }
|
||||||
|
],
|
||||||
|
relatedColumnOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log('data:' + this.data)
|
||||||
|
this.form.ruleTypeId = this.data.ruleTypeId
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
listDataDictType().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.dictTypeOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getRuleLevelList()
|
||||||
|
this.getRuleItemList()
|
||||||
|
this.getDataSourceList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showCard() {
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
getRuleLevelList() {
|
||||||
|
listRuleLevel().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.ruleLevelOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getRuleItemList() {
|
||||||
|
listRuleItem({ ruleTypeId: this.data.ruleTypeId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.ruleItemOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDataSourceList() {
|
||||||
|
listDataSource().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.sourceOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
ruleItemSelectChanged(val) {
|
||||||
|
const item = this.ruleItemOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.ruleItemCode = item.itemCode
|
||||||
|
},
|
||||||
|
sourceSelectChanged(val) {
|
||||||
|
listDataTable({ sourceId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.tableOptions = response.data
|
||||||
|
this.columnOptions = []
|
||||||
|
const source = this.sourceOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleSource = source.sourceName
|
||||||
|
this.form.ruleDbType = source.dbType
|
||||||
|
this.form.ruleTableId = ''
|
||||||
|
this.form.ruleTable = ''
|
||||||
|
this.form.ruleTableComment = ''
|
||||||
|
this.form.ruleColumnId = ''
|
||||||
|
this.form.ruleColumn = ''
|
||||||
|
this.form.ruleColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableSelectChanged(val) {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.columnOptions = response.data
|
||||||
|
const table = this.tableOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleTable = table.tableName
|
||||||
|
this.form.ruleTableComment = table.tableComment
|
||||||
|
this.form.ruleColumnId = ''
|
||||||
|
this.form.ruleColumn = ''
|
||||||
|
this.form.ruleColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
columnSelectChanged(val) {
|
||||||
|
const column = this.columnOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleColumn = column.columnName
|
||||||
|
this.form.ruleColumnComment = column.columnComment
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
dictTypeSelectChanged(val) {
|
||||||
|
const item = this.dictTypeOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.consistent.gbTypeCode = item.gbTypeCode
|
||||||
|
this.form.ruleConfig.consistent.gbTypeName = item.gbTypeName
|
||||||
|
},
|
||||||
|
relatedTableSelectChanged(val) {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.relatedColumnOptions = response.data
|
||||||
|
const table = this.tableOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.relevance.relatedTable = table.tableName
|
||||||
|
this.form.ruleConfig.relevance.relatedTableComment = table.tableComment
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnId = ''
|
||||||
|
this.form.ruleConfig.relevance.relatedColumn = ''
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
relatedColumnSelectChanged(val) {
|
||||||
|
const column = this.relatedColumnOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.relevance.relatedColumn = column.columnName
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnComment = column.columnComment
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs['form'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.loadingOptions.loading = true
|
||||||
|
this.loadingOptions.loadingText = '保存中...'
|
||||||
|
this.loadingOptions.isDisabled = true
|
||||||
|
addCheckRule(this.form).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
// 2秒后跳转列表页
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
this.$message.error('保存失败')
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleZzStatusRadioChange(value) {
|
||||||
|
// 在这里执行其他需要的操作
|
||||||
|
if (value === '1') {
|
||||||
|
this.form.ruleConfig.regular.regular = '^[1-9][0-9]{10}$'
|
||||||
|
} else if (value === '2') {
|
||||||
|
this.form.ruleConfig.regular.regular = '^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 230px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,285 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>{{ title }}</span>
|
||||||
|
<el-button-group style="float: right;">
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-form ref="form" :model="form" label-width="80px" disabled>
|
||||||
|
<el-form-item label="规则名称">
|
||||||
|
<el-input v-model="form.ruleName" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查类型">
|
||||||
|
<el-select v-model="form.ruleItemId">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleItemOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.itemExplain"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规则级别">
|
||||||
|
<el-select v-model="form.ruleLevelId">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleLevelOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据源">
|
||||||
|
<el-select v-model="form.ruleSourceId">
|
||||||
|
<el-option
|
||||||
|
v-for="source in sourceOptions"
|
||||||
|
:key="source.id"
|
||||||
|
:label="source.sourceName"
|
||||||
|
:value="source.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据表">
|
||||||
|
<el-select v-model="form.ruleTableId">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查字段">
|
||||||
|
<el-select v-model="form.ruleColumnId">
|
||||||
|
<el-option
|
||||||
|
v-for="column in columnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-divider content-position="left">核查配置</el-divider>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'timeliness_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="判定阀值">
|
||||||
|
<el-input-number v-model="form.ruleConfig.timeliness.threshold" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'consistent_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典类别">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.gbTypeId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dictTypeOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.gbTypeName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典字段">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.bindGbColumn" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in gbColumnOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'relevance_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联表">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedTableId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联字段">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedColumnId" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="column in relatedColumnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'accuracy_key_length'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="最大长度">
|
||||||
|
<el-input-number v-model="form.ruleConfig.accuracy.maxLength" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'regular_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="正则表达">
|
||||||
|
<el-input v-model="form.ruleConfig.regular.regular" placeholder="请输入正则规则" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="状态">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.itemText"
|
||||||
|
>{{ dict.itemValue }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form.remark" type="textarea" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listRuleLevel, listRuleItem, getCheckRule } from '@/api/quality/checkrule'
|
||||||
|
import { listDataSource } from '@/api/metadata/datasource'
|
||||||
|
import { listDataTable } from '@/api/metadata/datatable'
|
||||||
|
import { listDataColumn } from '@/api/metadata/datacolumn'
|
||||||
|
import { listDataDictType } from '@/api/standard/datadict'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckRelevanceRuleDetail',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: function() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '核查规则详情',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 规则级别数据字典
|
||||||
|
ruleLevelOptions: [],
|
||||||
|
// 核查类型数据字典
|
||||||
|
ruleItemOptions: [],
|
||||||
|
sourceOptions: [],
|
||||||
|
tableOptions: [],
|
||||||
|
columnOptions: [],
|
||||||
|
dictTypeOptions: [],
|
||||||
|
gbColumnOptions: [
|
||||||
|
{ value: 'gb_code', label: '标准编码' },
|
||||||
|
{ value: 'gb_name', label: '标准名称' }
|
||||||
|
],
|
||||||
|
relatedColumnOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log('id:' + this.data.id)
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
listDataDictType().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.dictTypeOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getRuleLevelList()
|
||||||
|
this.getDataSourceList()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getCheckRule(this.data.id)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showCard() {
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 获取详情 */
|
||||||
|
async getCheckRule(id) {
|
||||||
|
this.form = await getCheckRule(id).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.ruleItemOptions = await listRuleItem({ ruleTypeId: this.form.ruleTypeId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.tableOptions = await listDataTable({ sourceId: this.form.ruleSourceId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
}) || []
|
||||||
|
this.columnOptions = await listDataColumn({ sourceId: this.form.ruleSourceId, tableId: this.form.ruleTableId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
}) || []
|
||||||
|
if (this.form.ruleConfig.ruleItemCode === 'relevance_key') {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: this.form.ruleConfig.relevance.relatedTableId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.relatedColumnOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getRuleLevelList() {
|
||||||
|
listRuleLevel().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.ruleLevelOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDataSourceList() {
|
||||||
|
listDataSource().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.sourceOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 230px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
439
src/views/quality/checkrelevancerule/CheckRelevanceRuleEdit.vue
Normal file
@@ -0,0 +1,439 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>{{ title }}</span>
|
||||||
|
<el-button-group style="float: right;">
|
||||||
|
<el-button v-hasPerm="['quality:rule:edit']" type="primary" size="mini" icon="el-icon-finished" :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="规则名称" prop="ruleName">
|
||||||
|
<el-input v-model="form.ruleName" placeholder="请输入规则名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查类型" prop="ruleItemId">
|
||||||
|
<el-select v-model="form.ruleItemId" placeholder="请选择核查类型" @change="ruleItemSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleItemOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.itemExplain"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规则级别" prop="ruleLevelId">
|
||||||
|
<el-select v-model="form.ruleLevelId" placeholder="请选择规则级别">
|
||||||
|
<el-option
|
||||||
|
v-for="item in ruleLevelOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据源" prop="ruleSourceId">
|
||||||
|
<el-select v-model="form.ruleSourceId" placeholder="请选择数据源" @change="sourceSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="source in sourceOptions"
|
||||||
|
:key="source.id"
|
||||||
|
:label="source.sourceName"
|
||||||
|
:value="source.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据表" prop="ruleTableId">
|
||||||
|
<el-select v-model="form.ruleTableId" placeholder="请选择数据表" @change="tableSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="核查字段" prop="ruleColumnId">
|
||||||
|
<el-select v-model="form.ruleColumnId" placeholder="请选择核查字段" @change="columnSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="column in columnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-divider content-position="left">核查配置</el-divider>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'timeliness_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="判定阀值">
|
||||||
|
<el-input-number v-model="form.ruleConfig.timeliness.threshold" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'consistent_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典类别">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.gbTypeId" placeholder="请选择" @change="dictTypeSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dictTypeOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.gbTypeName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="标准字典字段">
|
||||||
|
<el-select v-model="form.ruleConfig.consistent.bindGbColumn" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in gbColumnOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'relevance_key'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联表">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedTableId" placeholder="请选择" @change="relatedTableSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="table in tableOptions"
|
||||||
|
:key="table.id"
|
||||||
|
:label="table.tableName"
|
||||||
|
:value="table.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="关联字段">
|
||||||
|
<el-select v-model="form.ruleConfig.relevance.relatedColumnId" placeholder="请选择" @change="relatedColumnSelectChanged">
|
||||||
|
<el-option
|
||||||
|
v-for="column in relatedColumnOptions"
|
||||||
|
:key="column.id"
|
||||||
|
:label="column.columnName"
|
||||||
|
:value="column.id"
|
||||||
|
>
|
||||||
|
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'accuracy_key_length'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="最大长度">
|
||||||
|
<el-input-number v-model="form.ruleConfig.accuracy.maxLength" :controls="false" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'regular_key'">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="正则表达">
|
||||||
|
<el-input v-model="form.ruleConfig.regular.regular" placeholder="请输入正则规则" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.ruleConfig.ruleItemCode === 'regular_key'">
|
||||||
|
<el-form-item label="常用正则">
|
||||||
|
<el-radio-group v-model="form.zzStatus" @change="handleZzStatusRadioChange">
|
||||||
|
<el-radio label="1">手机号码</el-radio>
|
||||||
|
<el-radio label="2">邮箱</el-radio>
|
||||||
|
<el-radio label="3">整数</el-radio>
|
||||||
|
<el-radio label="4">负数</el-radio>
|
||||||
|
<el-radio label="5">身份证</el-radio>
|
||||||
|
<el-radio label="6">日期格式yyyy-mm-dd</el-radio>
|
||||||
|
<el-radio label="7">IP</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.itemText"
|
||||||
|
>{{ dict.itemValue }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listRuleLevel, listRuleItem, getCheckRule, updateCheckRule } from '@/api/quality/checkrule'
|
||||||
|
import { listDataSource } from '@/api/metadata/datasource'
|
||||||
|
import { listDataTable } from '@/api/metadata/datatable'
|
||||||
|
import { listDataColumn } from '@/api/metadata/datacolumn'
|
||||||
|
import { listDataDictType } from '@/api/standard/datadict'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckRelevanceRuleEdit',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: function() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '核查规则编辑',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 保存按钮
|
||||||
|
loadingOptions: {
|
||||||
|
loading: false,
|
||||||
|
loadingText: '保存',
|
||||||
|
isDisabled: false
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
ruleName: [
|
||||||
|
{ required: true, message: '规则名称不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
ruleItemId: [
|
||||||
|
{ required: true, message: '核查类型不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleLevelId: [
|
||||||
|
{ required: true, message: '规则级别不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleSourceId: [
|
||||||
|
{ required: true, message: '数据源不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleTableId: [
|
||||||
|
{ required: true, message: '数据表不能为空', trigger: 'change' }
|
||||||
|
],
|
||||||
|
ruleColumnId: [
|
||||||
|
{ required: true, message: '核查字段不能为空', trigger: 'change' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 规则级别数据字典
|
||||||
|
ruleLevelOptions: [],
|
||||||
|
// 核查类型数据字典
|
||||||
|
ruleItemOptions: [],
|
||||||
|
sourceOptions: [],
|
||||||
|
tableOptions: [],
|
||||||
|
columnOptions: [],
|
||||||
|
dictTypeOptions: [],
|
||||||
|
gbColumnOptions: [
|
||||||
|
{ value: 'gb_code', label: '标准编码' },
|
||||||
|
{ value: 'gb_name', label: '标准名称' }
|
||||||
|
],
|
||||||
|
relatedColumnOptions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log('id:' + this.data.id)
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
listDataDictType().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.dictTypeOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getRuleLevelList()
|
||||||
|
this.getDataSourceList()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getCheckRule(this.data.id)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showCard() {
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 获取详情 */
|
||||||
|
async getCheckRule(id) {
|
||||||
|
this.form = await getCheckRule(id).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.ruleItemOptions = await listRuleItem({ ruleTypeId: this.form.ruleTypeId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.tableOptions = await listDataTable({ sourceId: this.form.ruleSourceId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.columnOptions = await listDataColumn({ sourceId: this.form.ruleSourceId, tableId: this.form.ruleTableId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
return response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (this.form.ruleConfig.ruleItemCode === 'relevance_key') {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: this.form.ruleConfig.relevance.relatedTableId }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.relatedColumnOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getRuleLevelList() {
|
||||||
|
listRuleLevel().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.ruleLevelOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDataSourceList() {
|
||||||
|
listDataSource().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.sourceOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
ruleItemSelectChanged(val) {
|
||||||
|
const item = this.ruleItemOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.ruleItemCode = item.itemCode
|
||||||
|
},
|
||||||
|
sourceSelectChanged(val) {
|
||||||
|
listDataTable({ sourceId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.tableOptions = response.data
|
||||||
|
this.columnOptions = []
|
||||||
|
const source = this.sourceOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleSource = source.sourceName
|
||||||
|
this.form.ruleDbType = source.dbType
|
||||||
|
this.form.ruleTableId = ''
|
||||||
|
this.form.ruleTable = ''
|
||||||
|
this.form.ruleTableComment = ''
|
||||||
|
this.form.ruleColumnId = ''
|
||||||
|
this.form.ruleColumn = ''
|
||||||
|
this.form.ruleColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableSelectChanged(val) {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.columnOptions = response.data
|
||||||
|
const table = this.tableOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleTable = table.tableName
|
||||||
|
this.form.ruleTableComment = table.tableComment
|
||||||
|
this.form.ruleColumnId = ''
|
||||||
|
this.form.ruleColumn = ''
|
||||||
|
this.form.ruleColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
columnSelectChanged(val) {
|
||||||
|
const column = this.columnOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleColumn = column.columnName
|
||||||
|
this.form.ruleColumnComment = column.columnComment
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
dictTypeSelectChanged(val) {
|
||||||
|
const item = this.dictTypeOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.consistent.gbTypeCode = item.gbTypeCode
|
||||||
|
this.form.ruleConfig.consistent.gbTypeName = item.gbTypeName
|
||||||
|
},
|
||||||
|
relatedTableSelectChanged(val) {
|
||||||
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.relatedColumnOptions = response.data
|
||||||
|
const table = this.tableOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.relevance.relatedTable = table.tableName
|
||||||
|
this.form.ruleConfig.relevance.relatedTableComment = table.tableComment
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnId = ''
|
||||||
|
this.form.ruleConfig.relevance.relatedColumn = ''
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnComment = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
relatedColumnSelectChanged(val) {
|
||||||
|
const column = this.relatedColumnOptions.find(function(item) {
|
||||||
|
return item.id === val
|
||||||
|
})
|
||||||
|
this.form.ruleConfig.relevance.relatedColumn = column.columnName
|
||||||
|
this.form.ruleConfig.relevance.relatedColumnComment = column.columnComment
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs['form'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.loadingOptions.loading = true
|
||||||
|
this.loadingOptions.loadingText = '保存中...'
|
||||||
|
this.loadingOptions.isDisabled = true
|
||||||
|
updateCheckRule(this.form).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
// 2秒后跳转列表页
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
this.$message.error('保存失败')
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadingOptions.loading = false
|
||||||
|
this.loadingOptions.loadingText = '保存'
|
||||||
|
this.loadingOptions.isDisabled = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleZzStatusRadioChange(value) {
|
||||||
|
// 在这里执行其他需要的操作
|
||||||
|
if (value === '1') {
|
||||||
|
this.form.ruleConfig.regular.regular = '^[1-9][0-9]{10}$'
|
||||||
|
} else if (value === '2') {
|
||||||
|
this.form.ruleConfig.regular.regular = '^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 230px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
429
src/views/quality/checkrelevancerule/CheckRelevanceRuleList.vue
Normal file
@@ -0,0 +1,429 @@
|
|||||||
|
<template>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card class="box-card tree-wrapper" shadow="always">
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<el-tree
|
||||||
|
ref="ruleType"
|
||||||
|
:data="ruleTypeOptions"
|
||||||
|
node-key="id"
|
||||||
|
empty-text="加载中,请稍后"
|
||||||
|
:props="defaultProps"
|
||||||
|
default-expand-all
|
||||||
|
highlight-current
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
>
|
||||||
|
<template slot-scope="{ node }">
|
||||||
|
<span class="custom-tree-node">
|
||||||
|
<span><i v-if="node.level === 1" class="iconfont icon-zuzhi tree-folder" />{{ node.label }}</span>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-tree>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="18">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="数据源" prop="ruleName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.ruleSource"
|
||||||
|
placeholder="请输入数据源"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="数据表" prop="ruleName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.ruleTable"
|
||||||
|
placeholder="请输入数据表"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="规则名称" prop="ruleName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.ruleName"
|
||||||
|
placeholder="请输入规则名称"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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-row type="flex" justify="space-between">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-button-group>
|
||||||
|
<el-button
|
||||||
|
v-hasPerm="['quality:rule:add']"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="right-toolbar">
|
||||||
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
|
<el-button circle size="mini">
|
||||||
|
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="small">中等</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="mini">紧凑</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
|
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
|
<el-popover placement="bottom" width="100" trigger="click">
|
||||||
|
<el-checkbox-group v-model="checkedTableColumns" @change="handleCheckedColsChange">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="(item, index) in tableColumns"
|
||||||
|
:key="index"
|
||||||
|
:label="item.prop"
|
||||||
|
>{{ item.label }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
<span slot="reference">
|
||||||
|
<el-button circle size="mini">
|
||||||
|
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</el-popover>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableDataList"
|
||||||
|
border
|
||||||
|
tooltip-effect="dark"
|
||||||
|
:size="tableSize"
|
||||||
|
: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"
|
||||||
|
:width="item.width"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-hasPerm="['quality:rule:edit']"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit-outline"
|
||||||
|
@click="handleEdit(scope.row)"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
v-hasPerm="['quality:rule:detail']"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="handleDetail(scope.row)"
|
||||||
|
>详情</el-button>
|
||||||
|
<el-button
|
||||||
|
v-hasPerm="['quality:rule:remove']"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</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>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listRuleType, pageCheckRule, delCheckRule } from '@/api/quality/checkrule'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckRelevanceRuleList',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableHeight: document.body.offsetHeight - 310 + 'px',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 表格头
|
||||||
|
tableColumns: [
|
||||||
|
{ prop: 'ruleSource', label: '数据源', show: true },
|
||||||
|
{ prop: 'ruleTable', label: '数据表', show: true, formatter: this.ruleTableFormatter },
|
||||||
|
{ prop: 'ruleColumn', label: '核查字段', show: true, formatter: this.ruleColumnFormatter },
|
||||||
|
{ prop: 'ruleName', label: '规则名称', show: true },
|
||||||
|
{ prop: 'ruleType', label: '规则类型', show: true },
|
||||||
|
{ prop: 'ruleLevel', label: '规则级别', width: 100, show: true },
|
||||||
|
{
|
||||||
|
prop: 'status',
|
||||||
|
label: '状态',
|
||||||
|
show: true,
|
||||||
|
width: 80,
|
||||||
|
formatter: this.statusFormatter
|
||||||
|
},
|
||||||
|
{ prop: 'createTime', label: '创建时间', show: true }
|
||||||
|
],
|
||||||
|
// 默认选择中表格头
|
||||||
|
checkedTableColumns: [],
|
||||||
|
tableSize: 'medium',
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 表格数据
|
||||||
|
tableDataList: [],
|
||||||
|
// 总数据条数
|
||||||
|
total: 0,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
ruleTypeId: '',
|
||||||
|
ruleName: '',
|
||||||
|
ruleType: 'gl'
|
||||||
|
},
|
||||||
|
// 左侧树
|
||||||
|
ruleTypeOptions: [],
|
||||||
|
defaultProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'name'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getDicts('sys_common_status').then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.statusOptions = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getTree()
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initCols()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getTree() {
|
||||||
|
listRuleType().then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
const { data } = response
|
||||||
|
const tree = {}
|
||||||
|
tree.name = '规则类型'
|
||||||
|
const children = []
|
||||||
|
data.forEach(e => {
|
||||||
|
if (e.code === 'relevance') {
|
||||||
|
children.push(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
tree.children = children
|
||||||
|
this.ruleTypeOptions = []
|
||||||
|
this.ruleTypeOptions.push(tree)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 节点单击事件 */
|
||||||
|
handleNodeClick(data) {
|
||||||
|
if (data.id) {
|
||||||
|
this.queryParams.ruleTypeId = data.id
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 查询数据源列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
pageCheckRule(this.queryParams).then(response => {
|
||||||
|
this.loading = false
|
||||||
|
if (response.success) {
|
||||||
|
const { data } = response
|
||||||
|
this.tableDataList = data.data
|
||||||
|
this.total = data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
initCols() {
|
||||||
|
this.checkedTableColumns = this.tableColumns.map(col => col.prop)
|
||||||
|
},
|
||||||
|
handleCheckedColsChange(val) {
|
||||||
|
this.tableColumns.forEach(col => {
|
||||||
|
if (!this.checkedTableColumns.includes(col.prop)) {
|
||||||
|
col.show = false
|
||||||
|
} else {
|
||||||
|
col.show = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCommand(command) {
|
||||||
|
this.tableSize = command
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
ruleTypeId: '',
|
||||||
|
ruleName: '',
|
||||||
|
ruleType: 'gl'
|
||||||
|
}
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
/** 刷新列表 */
|
||||||
|
handleRefresh() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.showOptions.data = {}
|
||||||
|
if (!this.queryParams.ruleTypeId) {
|
||||||
|
this.$message.warning('请先选择核查规则类型')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.showOptions.data.ruleTypeId = this.queryParams.ruleTypeId
|
||||||
|
this.showOptions.showList = false
|
||||||
|
this.showOptions.showAdd = true
|
||||||
|
this.showOptions.showEdit = false
|
||||||
|
this.showOptions.showDetail = false
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleEdit(row) {
|
||||||
|
this.showOptions.data.id = row.id
|
||||||
|
this.showOptions.showList = false
|
||||||
|
this.showOptions.showAdd = false
|
||||||
|
this.showOptions.showEdit = true
|
||||||
|
this.showOptions.showDetail = false
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
handleDetail(row) {
|
||||||
|
this.showOptions.data.id = row.id
|
||||||
|
this.showOptions.showList = false
|
||||||
|
this.showOptions.showAdd = false
|
||||||
|
this.showOptions.showEdit = false
|
||||||
|
this.showOptions.showDetail = true
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$confirm('选中数据将被永久删除, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
delCheckRule(row.id).then(response => {
|
||||||
|
if (response.success) {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ruleTableFormatter(row, column, cellValue, index) {
|
||||||
|
return row.ruleTableComment ? row.ruleTable + '(' + row.ruleTableComment + ')' : row.ruleTable
|
||||||
|
},
|
||||||
|
ruleColumnFormatter(row, column, cellValue, index) {
|
||||||
|
return row.ruleColumnComment ? row.ruleColumn + '(' + row.ruleColumnComment + ')' : row.ruleColumn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.right-toolbar {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 100px);
|
||||||
|
}
|
||||||
|
.tree-wrapper {
|
||||||
|
overflow-y: auto;
|
||||||
|
.body-wrapper {
|
||||||
|
margin: -10px;
|
||||||
|
::v-deep .custom-tree-node {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
.tree-folder {
|
||||||
|
margin-right: 5px;
|
||||||
|
color: #f6cf07;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
48
src/views/quality/checkrelevancerule/index.vue
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<transition name="el-zoom-in-center">
|
||||||
|
<check-rule-list v-if="options.showList" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
|
<transition name="el-zoom-in-top">
|
||||||
|
<check-rule-add v-if="options.showAdd" :data="options.data" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
|
<transition name="el-zoom-in-top">
|
||||||
|
<check-rule-edit v-if="options.showEdit" :data="options.data" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
|
<transition name="el-zoom-in-bottom">
|
||||||
|
<check-rule-detail v-if="options.showDetail" :data="options.data" @showCard="showCard" />
|
||||||
|
</transition>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CheckRuleList from './CheckRelevanceRuleList'
|
||||||
|
import CheckRuleAdd from './CheckRelevanceRuleAdd'
|
||||||
|
import CheckRuleEdit from './CheckRelevanceRuleEdit'
|
||||||
|
import CheckRuleDetail from './CheckRelevanceRuleDetail'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CheckRelevanceRule',
|
||||||
|
components: { CheckRuleList, CheckRuleAdd, CheckRuleEdit, CheckRuleDetail },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
options: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showAdd: false,
|
||||||
|
showEdit: false,
|
||||||
|
showDetail: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showCard(data) {
|
||||||
|
Object.assign(this.options, data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
259
src/views/quality/checkreport/CheckReportList.vue
Normal file
@@ -0,0 +1,259 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
||||||
|
<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" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row type="flex" justify="space-between">
|
||||||
|
<el-col :span="12">
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="right-toolbar">
|
||||||
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
|
<el-button circle size="mini">
|
||||||
|
<i class="el-icon-s-grid"></i>
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="small">中等</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="mini">紧凑</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
|
<i class="el-icon-refresh"></i>
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
|
<el-popover placement="bottom" width="100" trigger="click">
|
||||||
|
<el-checkbox-group v-model="checkedTableColumns" @change="handleCheckedColsChange">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="(item, index) in tableColumns"
|
||||||
|
:key="index"
|
||||||
|
:label="item.prop"
|
||||||
|
>{{ item.label }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
<span slot="reference">
|
||||||
|
<el-button circle size="mini">
|
||||||
|
<i class="el-icon-setting"></i>
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</el-popover>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableDataList"
|
||||||
|
border
|
||||||
|
tooltip-effect="dark"
|
||||||
|
:height="tableHeight"
|
||||||
|
:size="tableSize"
|
||||||
|
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-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="handleReport(scope.row)"
|
||||||
|
>查看报告</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-pagination
|
||||||
|
style="margin-bottom: 50px"
|
||||||
|
: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 { pageCheckReport } from '@/api/quality/checkreport'
|
||||||
|
import moment from 'moment'
|
||||||
|
export default {
|
||||||
|
name: 'CheckReportList',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableHeight: document.body.offsetHeight - 330 + 'px',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true
|
||||||
|
},
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 表格头
|
||||||
|
tableColumns: [
|
||||||
|
{
|
||||||
|
prop: 'checkReportType',
|
||||||
|
label: '报告类型',
|
||||||
|
show: true,
|
||||||
|
formatter: this.checkReportTypeFormatter
|
||||||
|
},
|
||||||
|
{ prop: 'checkDate', label: '检测时间', show: true },
|
||||||
|
{
|
||||||
|
prop: 'checkResult',
|
||||||
|
label: '检测结果',
|
||||||
|
show: true,
|
||||||
|
formatter: this.checkResultFormatter
|
||||||
|
},
|
||||||
|
{ prop: 'checkTotalCount', label: '检测数量', show: true },
|
||||||
|
{ prop: 'checkErrorCount', label: '不合规数量', show: true }
|
||||||
|
],
|
||||||
|
// 默认选择中表格头
|
||||||
|
checkedTableColumns: [],
|
||||||
|
tableSize: 'medium',
|
||||||
|
// 状态数据字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 数据集表格数据
|
||||||
|
tableDataList: [],
|
||||||
|
// 总数据条数
|
||||||
|
total: 0,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
checkDate: moment(moment().add(0, 'days').startOf('day').valueOf()).format('YYYY-MM-DD')
|
||||||
|
},
|
||||||
|
pickerOption: {
|
||||||
|
disabledDate(date) {
|
||||||
|
return date.getTime() > Date.now()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initCols() {
|
||||||
|
this.checkedTableColumns = this.tableColumns.map(col => col.prop)
|
||||||
|
},
|
||||||
|
handleCheckedColsChange(val) {
|
||||||
|
this.tableColumns.forEach(col => {
|
||||||
|
if (!this.checkedTableColumns.includes(col.prop)) {
|
||||||
|
col.show = false
|
||||||
|
} else {
|
||||||
|
col.show = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCommand(command) {
|
||||||
|
this.tableSize = command
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
pageCheckReport(this.queryParams).then(response => {
|
||||||
|
this.loading = false
|
||||||
|
if (response.success) {
|
||||||
|
const { data } = response
|
||||||
|
this.tableDataList = data.data
|
||||||
|
this.total = data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleReport(row) {
|
||||||
|
this.showOptions.data = row
|
||||||
|
this.showOptions.showList = false
|
||||||
|
this.showOptions.showDetail = true
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
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()
|
||||||
|
},
|
||||||
|
checkReportTypeFormatter(row, column, cellValue, index) {
|
||||||
|
if (cellValue === 'structure') {
|
||||||
|
return '结构符合性检测报告'
|
||||||
|
} else {
|
||||||
|
return '内容符合性检测报告'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
checkResultFormatter(row, column, cellValue, index) {
|
||||||
|
if (cellValue === '1') {
|
||||||
|
return <el-tag type='success'> 成功</el-tag>
|
||||||
|
} else {
|
||||||
|
return <el-tag type='warning'> 失败</el-tag>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
sourceName: ''
|
||||||
|
}
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
/** 刷新列表 */
|
||||||
|
handleRefresh() {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.right-toolbar {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.el-card ::v-deep .el-card__body {
|
||||||
|
height: calc(100vh - 170px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
435
src/views/quality/checkreport/CheckReportStructure.vue
Normal file
@@ -0,0 +1,435 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card class="box-card" shadow="always">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<el-button-group style="float: right;">
|
||||||
|
<el-button type="primary" size="mini" icon="el-icon-download">导出</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<div class="body-wrapper">
|
||||||
|
<h4 style="text-align: center;">{{ date }}{{ data.checkReportType === 'structure' ? '结构符合性' : '内容符合性' }}检测结果报告</h4>
|
||||||
|
<el-divider content-position="left"><h3>检测指标统计分析</h3></el-divider>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<div>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="6">
|
||||||
|
<div>
|
||||||
|
<el-statistic
|
||||||
|
group-separator=","
|
||||||
|
:precision="0"
|
||||||
|
:value="data.checkTotalCount"
|
||||||
|
title="检测表总数"
|
||||||
|
></el-statistic>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<div>
|
||||||
|
<el-statistic title="检测总耗时(毫秒)">
|
||||||
|
<template slot="formatter">
|
||||||
|
{{ data.checkTimeConsuming }}
|
||||||
|
</template>
|
||||||
|
</el-statistic>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<div>
|
||||||
|
<el-statistic
|
||||||
|
group-separator=","
|
||||||
|
:precision="0"
|
||||||
|
decimal-separator="."
|
||||||
|
:value="data.checkErrorCount"
|
||||||
|
title="不合规总数"
|
||||||
|
>
|
||||||
|
<template slot="prefix">
|
||||||
|
<i class="el-icon-s-flag" style="color: red"></i>
|
||||||
|
</template>
|
||||||
|
</el-statistic>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<div>
|
||||||
|
<el-statistic title="不合规率">
|
||||||
|
<template slot="prefix">
|
||||||
|
<span class="like">
|
||||||
|
<i class="el-icon-star-on" style="color:red"></i>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template slot="formatter">
|
||||||
|
{{ (data.checkErrorCount / data.checkTotalCount * 100) + '%' }}
|
||||||
|
</template>
|
||||||
|
</el-statistic>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<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
|
||||||
|
default-expand-all
|
||||||
|
: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 slot-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 slot-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>规则类型统计分析</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: 'CheckReportStructure',
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: function() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
queryParams: {
|
||||||
|
checkDate: ''
|
||||||
|
},
|
||||||
|
pickerOption: {
|
||||||
|
disabledDate(date) {
|
||||||
|
return date.getTime() > Date.now()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
date: '',
|
||||||
|
// 展示切换
|
||||||
|
showOptions: {
|
||||||
|
data: {},
|
||||||
|
showList: true,
|
||||||
|
showDetail: false
|
||||||
|
},
|
||||||
|
spanArr1: [],
|
||||||
|
position1: 0,
|
||||||
|
reportTableData1: [],
|
||||||
|
spanArr2: [],
|
||||||
|
position2: 0,
|
||||||
|
reportTableData2: [],
|
||||||
|
// 唯一性核查数据
|
||||||
|
uniqueTableData: [],
|
||||||
|
// 完整性核查数据
|
||||||
|
integrityTableData: [],
|
||||||
|
// 准确性核查数据
|
||||||
|
accuracyTableData: [],
|
||||||
|
// 一致性核查数据
|
||||||
|
consistentTableData: [],
|
||||||
|
// 关联性核查数据
|
||||||
|
relevanceTableData: [],
|
||||||
|
// 及时性核查数据
|
||||||
|
timelinessTableData: [],
|
||||||
|
like: true,
|
||||||
|
value1: 4154.564,
|
||||||
|
totalTables: 1314,
|
||||||
|
title: '增长人数'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.queryParams.checkDate = moment(this.data.checkDate).format('YYYY-MM-DD')
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showCard() {
|
||||||
|
this.$emit('showCard', this.showOptions)
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.spanArr1 = []
|
||||||
|
this.spanArr2 = []
|
||||||
|
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>
|
||||||
@@ -1,370 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card class="box-card" shadow="always">
|
<transition name="el-zoom-in-center">
|
||||||
<div slot="header" class="clearfix">
|
<check-report-list v-if="options.showList" @showCard="showCard" />
|
||||||
<el-form ref="queryForm" :model="queryParams" :inline="true" class="form-inline">
|
</transition>
|
||||||
<el-form-item label="时间">
|
<transition name="el-zoom-in-bottom">
|
||||||
<el-date-picker
|
<check-report-structure v-if="options.showDetail" :data="options.data" @showCard="showCard" />
|
||||||
v-model="queryParams.checkDate"
|
</transition>
|
||||||
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>规则类型统计分析</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 { getReportBySource, getReportByType, getReportDetail } from '@/api/quality/checkreport'
|
import CheckReportList from './CheckReportList'
|
||||||
import moment from 'moment'
|
import CheckReportStructure from './CheckReportStructure'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CheckReport',
|
name: 'CheckReport',
|
||||||
|
components: { CheckReportList, CheckReportStructure },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
queryParams: {
|
options: {
|
||||||
checkDate: moment(moment().add(-1, 'days').startOf('day').valueOf()).format('YYYY-MM-DD')
|
data: {},
|
||||||
},
|
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: {
|
||||||
handleQuery() {
|
showCard(data) {
|
||||||
this.getReportData1()
|
console.log('ffffffffff', data)
|
||||||
this.getReportData2()
|
Object.assign(this.options, data)
|
||||||
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>
|
||||||
|
|||||||
@@ -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 v-hasPerm="['quality:rule:add']" size="mini" icon="el-icon-plus" round :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
<el-button type="primary" size="mini" icon="el-icon-finished" :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
<el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button>
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="body-wrapper">
|
<div class="body-wrapper">
|
||||||
@@ -42,108 +42,24 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数据表" prop="ruleTableId">
|
<div>
|
||||||
<el-select v-model="form.ruleTableId" placeholder="请选择数据表" @change="tableSelectChanged">
|
<el-transfer
|
||||||
<el-option
|
v-model="form.transferValue"
|
||||||
v-for="table in tableOptions"
|
filterable
|
||||||
:key="table.id"
|
:titles="['备选', '已选']"
|
||||||
:label="table.tableName"
|
:filter-method="filterMethod"
|
||||||
:value="table.id"
|
filter-placeholder="请输入表名"
|
||||||
>
|
:data="transferData"
|
||||||
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="核查字段" prop="ruleColumnId">
|
|
||||||
<el-select v-model="form.ruleColumnId" placeholder="请选择核查字段" @change="columnSelectChanged">
|
|
||||||
<el-option
|
|
||||||
v-for="column in columnOptions"
|
|
||||||
:key="column.id"
|
|
||||||
:label="column.columnName"
|
|
||||||
:value="column.id"
|
|
||||||
>
|
|
||||||
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-divider content-position="left">核查配置</el-divider>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'timeliness_key'">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="判定阀值">
|
|
||||||
<el-input-number v-model="form.ruleConfig.timeliness.threshold" :controls="false" :min="1" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'consistent_key'">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="标准字典类别">
|
|
||||||
<el-select v-model="form.ruleConfig.consistent.gbTypeId" placeholder="请选择" @change="dictTypeSelectChanged">
|
|
||||||
<el-option
|
|
||||||
v-for="item in dictTypeOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.gbTypeName"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</div>
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="标准字典字段">
|
|
||||||
<el-select v-model="form.ruleConfig.consistent.bindGbColumn" placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in gbColumnOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'relevance_key'">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="关联表">
|
|
||||||
<el-select v-model="form.ruleConfig.relevance.relatedTableId" placeholder="请选择" @change="relatedTableSelectChanged">
|
|
||||||
<el-option
|
|
||||||
v-for="table in tableOptions"
|
|
||||||
:key="table.id"
|
|
||||||
:label="table.tableName"
|
|
||||||
:value="table.id"
|
|
||||||
>
|
|
||||||
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="关联字段">
|
|
||||||
<el-select v-model="form.ruleConfig.relevance.relatedColumnId" placeholder="请选择" @change="relatedColumnSelectChanged">
|
|
||||||
<el-option
|
|
||||||
v-for="column in relatedColumnOptions"
|
|
||||||
:key="column.id"
|
|
||||||
:label="column.columnName"
|
|
||||||
:value="column.id"
|
|
||||||
>
|
|
||||||
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'accuracy_key_length'">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="最大长度">
|
|
||||||
<el-input-number v-model="form.ruleConfig.accuracy.maxLength" :controls="false" :min="1" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="dict in statusOptions"
|
v-for="dict in statusOptions"
|
||||||
:key="dict.id"
|
:key="dict.id"
|
||||||
:label="dict.itemText"
|
:label="dict.itemText"
|
||||||
>{{ dict.itemValue }}</el-radio>
|
>{{ dict.itemValue }}
|
||||||
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
@@ -155,24 +71,30 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listRuleLevel, listRuleItem, addCheckRule } from '@/api/quality/checkrule'
|
import { listRuleLevel, listRuleItem, addCheckRule, listSourceIdBytable } from '@/api/quality/checkrule'
|
||||||
import { listDataSource } from '@/api/metadata/datasource'
|
import { listDataSource } from '@/api/metadata/datasource'
|
||||||
import { listDataTable } from '@/api/metadata/datatable'
|
import { listDataTable } from '@/api/metadata/datatable'
|
||||||
import { listDataColumn } from '@/api/metadata/datacolumn'
|
import { listDataColumn } from '@/api/metadata/datacolumn'
|
||||||
import { listDataDictType } from '@/api/standard/datadict'
|
import { Transfer } from 'element-ui'
|
||||||
|
import 'element-ui/lib/theme-chalk/index.css'
|
||||||
export default {
|
export default {
|
||||||
name: 'CheckRuleAdd',
|
name: 'CheckRuleAdd',
|
||||||
|
components: {
|
||||||
|
ElTransfer: Transfer
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: function() {
|
default: function () {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
// eslint-disable-next-line vue/no-dupe-keys
|
||||||
|
transferData: [],
|
||||||
|
|
||||||
title: '核查规则新增',
|
title: '核查规则新增',
|
||||||
// 展示切换
|
// 展示切换
|
||||||
showOptions: {
|
showOptions: {
|
||||||
@@ -190,6 +112,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
|
qualityType: 'jg',
|
||||||
ruleName: undefined,
|
ruleName: undefined,
|
||||||
ruleTypeId: undefined,
|
ruleTypeId: undefined,
|
||||||
ruleItemId: undefined,
|
ruleItemId: undefined,
|
||||||
@@ -222,9 +145,14 @@ export default {
|
|||||||
},
|
},
|
||||||
accuracy: {
|
accuracy: {
|
||||||
maxLength: undefined
|
maxLength: undefined
|
||||||
|
},
|
||||||
|
regular: {
|
||||||
|
regular: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
status: '1'
|
status: '1',
|
||||||
|
zzStatus: '0', // 状态正则
|
||||||
|
transferValue: []
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
@@ -261,27 +189,39 @@ export default {
|
|||||||
{ value: 'gb_code', label: '标准编码' },
|
{ value: 'gb_code', label: '标准编码' },
|
||||||
{ value: 'gb_name', label: '标准名称' }
|
{ value: 'gb_name', label: '标准名称' }
|
||||||
],
|
],
|
||||||
relatedColumnOptions: []
|
relatedColumnOptions: [],
|
||||||
|
tableNameOldList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log('data:' + this.data)
|
|
||||||
this.form.ruleTypeId = this.data.ruleTypeId
|
this.form.ruleTypeId = this.data.ruleTypeId
|
||||||
this.getDicts('sys_common_status').then(response => {
|
this.getDicts('sys_common_status').then(response => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
this.statusOptions = response.data
|
this.statusOptions = response.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
listDataDictType().then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
this.dictTypeOptions = response.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.getRuleLevelList()
|
this.getRuleLevelList()
|
||||||
this.getRuleItemList()
|
this.getRuleItemList()
|
||||||
this.getDataSourceList()
|
this.getDataSourceList()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
filterMethod(query, item) {
|
||||||
|
return item.pinyin.indexOf(query) > -1
|
||||||
|
},
|
||||||
|
generateData(tableData) {
|
||||||
|
const data = []
|
||||||
|
const tableName = tableData
|
||||||
|
const pinyin = tableData
|
||||||
|
tableName.forEach((tableData, index) => {
|
||||||
|
data.push({
|
||||||
|
label: tableData,
|
||||||
|
key: tableData,
|
||||||
|
pinyin: pinyin[index]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.transferData = data
|
||||||
|
},
|
||||||
showCard() {
|
showCard() {
|
||||||
this.$emit('showCard', this.showOptions)
|
this.$emit('showCard', this.showOptions)
|
||||||
},
|
},
|
||||||
@@ -307,17 +247,38 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
ruleItemSelectChanged(val) {
|
ruleItemSelectChanged(val) {
|
||||||
const item = this.ruleItemOptions.find(function(item) {
|
const item = this.ruleItemOptions.find(function (item) {
|
||||||
return item.id === val
|
return item.id === val
|
||||||
})
|
})
|
||||||
this.form.ruleConfig.ruleItemCode = item.itemCode
|
this.form.ruleConfig.ruleItemCode = item.itemCode
|
||||||
|
this.form.ruleConfig.id = item.id
|
||||||
},
|
},
|
||||||
sourceSelectChanged(val) {
|
async sourceSelectChanged(val) {
|
||||||
listDataTable({ sourceId: val }).then(response => {
|
// this.inspectSourceId(val)
|
||||||
|
// const tableNameOldList = []
|
||||||
|
const tableNameOldList = await listSourceIdBytable(val, this.form.ruleConfig.id).then(response => {
|
||||||
|
const result = []
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
const tableName = response.data[i].ruleTable
|
||||||
|
result.push(tableName)
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
const response = await listDataTable({ sourceId: val })
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
|
// 处理过滤数据
|
||||||
|
const tableNameList = []
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
const tableName = response.data[i].tableName
|
||||||
|
if (!tableNameOldList.some((str) => str === tableName)) {
|
||||||
|
tableNameList.push(tableName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await this.generateData(tableNameList)
|
||||||
|
// this.form.transferValue = ['robot_patient'] 暂时失效,初始化默认值
|
||||||
this.tableOptions = response.data
|
this.tableOptions = response.data
|
||||||
this.columnOptions = []
|
this.columnOptions = []
|
||||||
const source = this.sourceOptions.find(function(item) {
|
const source = this.sourceOptions.find(function (item) {
|
||||||
return item.id === val
|
return item.id === val
|
||||||
})
|
})
|
||||||
this.form.ruleSource = source.sourceName
|
this.form.ruleSource = source.sourceName
|
||||||
@@ -328,14 +289,27 @@ export default {
|
|||||||
this.form.ruleColumnId = ''
|
this.form.ruleColumnId = ''
|
||||||
this.form.ruleColumn = ''
|
this.form.ruleColumn = ''
|
||||||
this.form.ruleColumnComment = ''
|
this.form.ruleColumnComment = ''
|
||||||
|
|
||||||
|
// console.log('tableNameOldList=', tableNameOldList)
|
||||||
|
// this.form.transferValue = tableNameOldList
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 根据来源数据获取已有表
|
||||||
|
inspectSourceId(val) {
|
||||||
|
listSourceIdBytable(val).then(response => {
|
||||||
|
const tableNameOldList = []
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
const tableName = response.data[i].ruleTable
|
||||||
|
tableNameOldList.push(tableName)
|
||||||
|
}
|
||||||
|
this.tableNameOldList = tableNameOldList
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tableSelectChanged(val) {
|
tableSelectChanged(val) {
|
||||||
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
this.columnOptions = response.data
|
this.columnOptions = response.data
|
||||||
const table = this.tableOptions.find(function(item) {
|
const table = this.tableOptions.find(function (item) {
|
||||||
return item.id === val
|
return item.id === val
|
||||||
})
|
})
|
||||||
this.form.ruleTable = table.tableName
|
this.form.ruleTable = table.tableName
|
||||||
@@ -347,7 +321,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
columnSelectChanged(val) {
|
columnSelectChanged(val) {
|
||||||
const column = this.columnOptions.find(function(item) {
|
const column = this.columnOptions.find(function (item) {
|
||||||
return item.id === val
|
return item.id === val
|
||||||
})
|
})
|
||||||
this.form.ruleColumn = column.columnName
|
this.form.ruleColumn = column.columnName
|
||||||
@@ -355,7 +329,7 @@ export default {
|
|||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
dictTypeSelectChanged(val) {
|
dictTypeSelectChanged(val) {
|
||||||
const item = this.dictTypeOptions.find(function(item) {
|
const item = this.dictTypeOptions.find(function (item) {
|
||||||
return item.id === val
|
return item.id === val
|
||||||
})
|
})
|
||||||
this.form.ruleConfig.consistent.gbTypeCode = item.gbTypeCode
|
this.form.ruleConfig.consistent.gbTypeCode = item.gbTypeCode
|
||||||
@@ -365,7 +339,7 @@ export default {
|
|||||||
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
this.relatedColumnOptions = response.data
|
this.relatedColumnOptions = response.data
|
||||||
const table = this.tableOptions.find(function(item) {
|
const table = this.tableOptions.find(function (item) {
|
||||||
return item.id === val
|
return item.id === val
|
||||||
})
|
})
|
||||||
this.form.ruleConfig.relevance.relatedTable = table.tableName
|
this.form.ruleConfig.relevance.relatedTable = table.tableName
|
||||||
@@ -377,14 +351,14 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
relatedColumnSelectChanged(val) {
|
relatedColumnSelectChanged(val) {
|
||||||
const column = this.relatedColumnOptions.find(function(item) {
|
const column = this.relatedColumnOptions.find(function (item) {
|
||||||
return item.id === val
|
return item.id === val
|
||||||
})
|
})
|
||||||
this.form.ruleConfig.relevance.relatedColumn = column.columnName
|
this.form.ruleConfig.relevance.relatedColumn = column.columnName
|
||||||
this.form.ruleConfig.relevance.relatedColumnComment = column.columnComment
|
this.form.ruleConfig.relevance.relatedColumnComment = column.columnComment
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function () {
|
||||||
this.$refs['form'].validate(valid => {
|
this.$refs['form'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loadingOptions.loading = true
|
this.loadingOptions.loading = true
|
||||||
@@ -410,14 +384,22 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
handleZzStatusRadioChange(value) {
|
||||||
|
// 在这里执行其他需要的操作
|
||||||
|
if (value === '1') {
|
||||||
|
this.form.ruleConfig.regular.regular = '^[1-9][0-9]{10}$'
|
||||||
|
} else if (value === '2') {
|
||||||
|
this.form.ruleConfig.regular.regular = '^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.el-card ::v-deep .el-card__body {
|
.el-card ::v-deep .el-card__body {
|
||||||
height: calc(100vh - 230px);
|
height: calc(100vh - 230px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -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-back" round @click="showCard">返回</el-button>
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="body-wrapper">
|
<div class="body-wrapper">
|
||||||
@@ -65,77 +65,6 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-divider content-position="left">核查配置</el-divider>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'timeliness_key'">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="判定阀值">
|
|
||||||
<el-input-number v-model="form.ruleConfig.timeliness.threshold" :controls="false" :min="1" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'consistent_key'">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="标准字典类别">
|
|
||||||
<el-select v-model="form.ruleConfig.consistent.gbTypeId" placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in dictTypeOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.gbTypeName"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="标准字典字段">
|
|
||||||
<el-select v-model="form.ruleConfig.consistent.bindGbColumn" placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in gbColumnOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'relevance_key'">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="关联表">
|
|
||||||
<el-select v-model="form.ruleConfig.relevance.relatedTableId" placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="table in tableOptions"
|
|
||||||
:key="table.id"
|
|
||||||
:label="table.tableName"
|
|
||||||
:value="table.id"
|
|
||||||
>
|
|
||||||
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="关联字段">
|
|
||||||
<el-select v-model="form.ruleConfig.relevance.relatedColumnId" placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="column in relatedColumnOptions"
|
|
||||||
:key="column.id"
|
|
||||||
:label="column.columnName"
|
|
||||||
:value="column.id"
|
|
||||||
>
|
|
||||||
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'accuracy_key_length'">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="最大长度">
|
|
||||||
<el-input-number v-model="form.ruleConfig.accuracy.maxLength" :controls="false" :min="1" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio
|
<el-radio
|
||||||
@@ -207,13 +136,7 @@ export default {
|
|||||||
this.statusOptions = response.data
|
this.statusOptions = response.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
listDataDictType().then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
this.dictTypeOptions = response.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.getRuleLevelList()
|
this.getRuleLevelList()
|
||||||
this.getDataSourceList()
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getCheckRule(this.data.id)
|
this.getCheckRule(this.data.id)
|
||||||
@@ -259,13 +182,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getDataSourceList() {
|
|
||||||
listDataSource().then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
this.sourceOptions = response.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -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 v-hasPerm="['quality:rule:edit']" size="mini" icon="el-icon-plus" round :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
<el-button v-hasPerm="['quality:rule:edit']" type="primary" size="mini" icon="el-icon-finished" :loading="loadingOptions.loading" :disabled="loadingOptions.isDisabled" @click="submitForm">{{ loadingOptions.loadingText }}</el-button>
|
||||||
<el-button size="mini" icon="el-icon-back" round @click="showCard">返回</el-button>
|
<el-button size="mini" icon="el-icon-back" @click="showCard">返回</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="body-wrapper">
|
<div class="body-wrapper">
|
||||||
@@ -54,89 +54,6 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="核查字段" prop="ruleColumnId">
|
|
||||||
<el-select v-model="form.ruleColumnId" placeholder="请选择核查字段" @change="columnSelectChanged">
|
|
||||||
<el-option
|
|
||||||
v-for="column in columnOptions"
|
|
||||||
:key="column.id"
|
|
||||||
:label="column.columnName"
|
|
||||||
:value="column.id"
|
|
||||||
>
|
|
||||||
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-divider content-position="left">核查配置</el-divider>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'timeliness_key'">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="判定阀值">
|
|
||||||
<el-input-number v-model="form.ruleConfig.timeliness.threshold" :controls="false" :min="1" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'consistent_key'">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="标准字典类别">
|
|
||||||
<el-select v-model="form.ruleConfig.consistent.gbTypeId" placeholder="请选择" @change="dictTypeSelectChanged">
|
|
||||||
<el-option
|
|
||||||
v-for="item in dictTypeOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.gbTypeName"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="标准字典字段">
|
|
||||||
<el-select v-model="form.ruleConfig.consistent.bindGbColumn" placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in gbColumnOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'relevance_key'">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="关联表">
|
|
||||||
<el-select v-model="form.ruleConfig.relevance.relatedTableId" placeholder="请选择" @change="relatedTableSelectChanged">
|
|
||||||
<el-option
|
|
||||||
v-for="table in tableOptions"
|
|
||||||
:key="table.id"
|
|
||||||
:label="table.tableName"
|
|
||||||
:value="table.id"
|
|
||||||
>
|
|
||||||
<span style="float: left">{{ table.tableName + '(' + table.tableComment + ')' }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="关联字段">
|
|
||||||
<el-select v-model="form.ruleConfig.relevance.relatedColumnId" placeholder="请选择" @change="relatedColumnSelectChanged">
|
|
||||||
<el-option
|
|
||||||
v-for="column in relatedColumnOptions"
|
|
||||||
:key="column.id"
|
|
||||||
:label="column.columnName"
|
|
||||||
:value="column.id"
|
|
||||||
>
|
|
||||||
<span style="float: left">{{ column.columnName + '(' + column.columnComment + ')' }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="form.ruleConfig.ruleItemCode === 'accuracy_key_length'">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="最大长度">
|
|
||||||
<el-input-number v-model="form.ruleConfig.accuracy.maxLength" :controls="false" :min="1" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio
|
<el-radio
|
||||||
@@ -159,7 +76,6 @@ import { listRuleLevel, listRuleItem, getCheckRule, updateCheckRule } from '@/ap
|
|||||||
import { listDataSource } from '@/api/metadata/datasource'
|
import { listDataSource } from '@/api/metadata/datasource'
|
||||||
import { listDataTable } from '@/api/metadata/datatable'
|
import { listDataTable } from '@/api/metadata/datatable'
|
||||||
import { listDataColumn } from '@/api/metadata/datacolumn'
|
import { listDataColumn } from '@/api/metadata/datacolumn'
|
||||||
import { listDataDictType } from '@/api/standard/datadict'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CheckRuleEdit',
|
name: 'CheckRuleEdit',
|
||||||
@@ -189,7 +105,9 @@ export default {
|
|||||||
isDisabled: false
|
isDisabled: false
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
qualityType: 'jg'
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
ruleName: [
|
ruleName: [
|
||||||
@@ -235,11 +153,6 @@ export default {
|
|||||||
this.statusOptions = response.data
|
this.statusOptions = response.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
listDataDictType().then(response => {
|
|
||||||
if (response.success) {
|
|
||||||
this.dictTypeOptions = response.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.getRuleLevelList()
|
this.getRuleLevelList()
|
||||||
this.getDataSourceList()
|
this.getDataSourceList()
|
||||||
},
|
},
|
||||||
@@ -263,6 +176,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.tableOptions = await listDataTable({ sourceId: this.form.ruleSourceId }).then(response => {
|
this.tableOptions = await listDataTable({ sourceId: this.form.ruleSourceId }).then(response => {
|
||||||
|
console.log('response.data==', response.data)
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
return response.data
|
return response.data
|
||||||
}
|
}
|
||||||
@@ -378,6 +292,7 @@ export default {
|
|||||||
this.loadingOptions.loading = true
|
this.loadingOptions.loading = true
|
||||||
this.loadingOptions.loadingText = '保存中...'
|
this.loadingOptions.loadingText = '保存中...'
|
||||||
this.loadingOptions.isDisabled = true
|
this.loadingOptions.isDisabled = true
|
||||||
|
this.form.qualityType = 'jg'
|
||||||
updateCheckRule(this.form).then(response => {
|
updateCheckRule(this.form).then(response => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
this.$message.success('保存成功')
|
this.$message.success('保存成功')
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
>
|
>
|
||||||
<template slot-scope="{ node, data }">
|
<template slot-scope="{ node }">
|
||||||
<span class="custom-tree-node">
|
<span class="custom-tree-node">
|
||||||
<span><i v-if="node.level === 1" class="iconfont icon-zuzhi tree-folder" />{{ node.label }}</span>
|
<span><i v-if="node.level === 1" class="iconfont icon-zuzhi tree-folder" />{{ node.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -26,6 +26,26 @@
|
|||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-card class="box-card" shadow="always">
|
<el-card class="box-card" shadow="always">
|
||||||
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
<el-form ref="queryForm" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="数据源" prop="ruleName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.ruleSource"
|
||||||
|
placeholder="请输入数据源"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="数据表" prop="ruleName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.ruleTable"
|
||||||
|
placeholder="请输入数据表"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="规则名称" prop="ruleName">
|
<el-form-item label="规则名称" prop="ruleName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.ruleName"
|
v-model="queryParams.ruleName"
|
||||||
@@ -52,13 +72,21 @@
|
|||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
<el-button-group>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
@click="deleteSelected"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-button-group>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="right-toolbar">
|
<div class="right-toolbar">
|
||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -69,7 +97,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -83,7 +111,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
@@ -100,6 +128,7 @@
|
|||||||
:size="tableSize"
|
:size="tableSize"
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
style="width: 100%;margin: 15px 0;"
|
style="width: 100%;margin: 15px 0;"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="序号" width="55" align="center">
|
<el-table-column label="序号" width="55" align="center">
|
||||||
@@ -114,16 +143,13 @@
|
|||||||
:prop="item.prop"
|
:prop="item.prop"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:formatter="item.formatter"
|
:formatter="item.formatter"
|
||||||
|
:width="item.width"
|
||||||
align="center"
|
align="center"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-popover
|
|
||||||
placement="left"
|
|
||||||
trigger="click"
|
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPerm="['quality:rule:edit']"
|
v-hasPerm="['quality:rule:edit']"
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -145,8 +171,6 @@
|
|||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
<el-button slot="reference">操作</el-button>
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -172,7 +196,7 @@ export default {
|
|||||||
name: 'CheckRuleList',
|
name: 'CheckRuleList',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableHeight: document.body.offsetHeight - 310 + 'px',
|
tableHeight: document.body.offsetHeight - 330 + 'px',
|
||||||
// 展示切换
|
// 展示切换
|
||||||
showOptions: {
|
showOptions: {
|
||||||
data: {},
|
data: {},
|
||||||
@@ -185,16 +209,17 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
// 表格头
|
// 表格头
|
||||||
tableColumns: [
|
tableColumns: [
|
||||||
{ prop: 'ruleName', label: '规则名称', show: true },
|
|
||||||
{ prop: 'ruleType', label: '规则类型', show: true },
|
|
||||||
{ prop: 'ruleSource', label: '数据源', show: true },
|
{ prop: 'ruleSource', label: '数据源', show: true },
|
||||||
{ prop: 'ruleTable', label: '数据表', show: true, formatter: this.ruleTableFormatter },
|
{ prop: 'ruleTable', label: '数据表', show: true, formatter: this.ruleTableFormatter },
|
||||||
{ prop: 'ruleColumn', label: '核查字段', show: true, formatter: this.ruleColumnFormatter },
|
{ prop: 'ruleName', label: '规则名称', show: true },
|
||||||
{ prop: 'ruleLevel', label: '规则级别', show: true },
|
{ prop: 'ruleType', label: '规则类型', show: true },
|
||||||
|
// { prop: 'ruleColumn', label: '核查字段', show: true, formatter: this.ruleColumnFormatter },
|
||||||
|
{ prop: 'ruleLevel', label: '规则级别', width: 100, show: true },
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
show: true,
|
show: true,
|
||||||
|
width: 80,
|
||||||
formatter: this.statusFormatter
|
formatter: this.statusFormatter
|
||||||
},
|
},
|
||||||
{ prop: 'createTime', label: '创建时间', show: true }
|
{ prop: 'createTime', label: '创建时间', show: true }
|
||||||
@@ -213,14 +238,16 @@ export default {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
ruleTypeId: '',
|
ruleTypeId: '',
|
||||||
ruleName: ''
|
ruleName: '',
|
||||||
|
ruleType: 'jg'
|
||||||
},
|
},
|
||||||
// 左侧树
|
// 左侧树
|
||||||
ruleTypeOptions: [],
|
ruleTypeOptions: [],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
}
|
},
|
||||||
|
selectedRows: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -241,8 +268,15 @@ export default {
|
|||||||
if (response.success) {
|
if (response.success) {
|
||||||
const { data } = response
|
const { data } = response
|
||||||
const tree = {}
|
const tree = {}
|
||||||
tree.name = '核查规则类型'
|
tree.name = '规则类型'
|
||||||
tree.children = data
|
const children = []
|
||||||
|
data.forEach(e => {
|
||||||
|
if (e.code === 'table_jc' || e.code === 'length_jc' || e.code === 'null_jc' ||
|
||||||
|
e.code === 'pk_jc' || e.code === 'fk_jc') {
|
||||||
|
children.push(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
tree.children = children
|
||||||
this.ruleTypeOptions = []
|
this.ruleTypeOptions = []
|
||||||
this.ruleTypeOptions.push(tree)
|
this.ruleTypeOptions.push(tree)
|
||||||
}
|
}
|
||||||
@@ -293,7 +327,8 @@ export default {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
ruleTypeId: '',
|
ruleTypeId: '',
|
||||||
ruleName: ''
|
ruleName: '',
|
||||||
|
ruleType: 'jg'
|
||||||
}
|
}
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
@@ -349,6 +384,26 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.selectedRows = selection
|
||||||
|
},
|
||||||
|
async deleteSelected() {
|
||||||
|
if (this.selectedRows.length === 0) {
|
||||||
|
this.$message.warning('请勾选需要删除的数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await this.$confirm('选中数据将被永久删除, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
await Promise.all(this.selectedRows.map(row => delCheckRule(row.id)))
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.getList()
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
console.log(`每页 ${val} 条`)
|
console.log(`每页 ${val} 条`)
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
@@ -383,7 +438,7 @@ export default {
|
|||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
.el-card ::v-deep .el-card__body {
|
.el-card ::v-deep .el-card__body {
|
||||||
height: calc(100vh - 170px);
|
height: calc(100vh - 110px);
|
||||||
}
|
}
|
||||||
.tree-wrapper {
|
.tree-wrapper {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<transition name="el-zoom-in-center">
|
<transition name="el-zoom-in-center">
|
||||||
<check-rule-list v-if="options.showList" @showCard="showCard" />
|
<check-rule-list v-if="options.showList" @showCard="showCard"/>
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="el-zoom-in-top">
|
<transition name="el-zoom-in-top">
|
||||||
<check-rule-add v-if="options.showAdd" :data="options.data" @showCard="showCard" />
|
<check-rule-add v-if="options.showAdd" :data="options.data" @showCard="showCard" />
|
||||||
|
|||||||
@@ -66,7 +66,18 @@
|
|||||||
align="center"
|
align="center"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
|
</template><el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-hasPerm="['quality:rule:detail']"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="handleDetail(scope.row)"
|
||||||
|
>检验报告</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@@ -137,11 +148,36 @@ export default {
|
|||||||
listRuleType().then(response => {
|
listRuleType().then(response => {
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
const { data } = response
|
const { data } = response
|
||||||
|
// const tree = {}
|
||||||
|
// tree.name = '核查规则类型'
|
||||||
|
// tree.children = data
|
||||||
|
// this.ruleTypeOptions = []
|
||||||
|
// this.ruleTypeOptions.push(tree)
|
||||||
|
|
||||||
const tree = {}
|
const tree = {}
|
||||||
tree.name = '核查规则类型'
|
const matchingItems = []
|
||||||
tree.children = data
|
tree.name = '结构符合性结果'
|
||||||
|
data.forEach(item => {
|
||||||
|
if (item.id === '11111' || item.id === '22222' || item.id === '33333' || item.id === '44444' ||
|
||||||
|
item.id === '55555') {
|
||||||
|
matchingItems.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
this.ruleTypeOptions = []
|
this.ruleTypeOptions = []
|
||||||
|
tree.children = matchingItems
|
||||||
this.ruleTypeOptions.push(tree)
|
this.ruleTypeOptions.push(tree)
|
||||||
|
|
||||||
|
const treeContent = {}
|
||||||
|
const matchingItems_treeContent = []
|
||||||
|
treeContent.name = '内容符合性结果'
|
||||||
|
data.forEach(item => {
|
||||||
|
if (item.id !== '11111' && item.id !== '22222' && item.id !== '33333' && item.id !== '44444' &&
|
||||||
|
item.id !== '55555') {
|
||||||
|
matchingItems_treeContent.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
treeContent.children = matchingItems_treeContent
|
||||||
|
this.ruleTypeOptions.push(treeContent)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
<el-tooltip content="密度" effect="dark" placement="top">
|
<el-tooltip content="密度" effect="dark" placement="top">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="colum-height" />
|
<i class="el-icon-s-grid"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
<el-dropdown-item command="medium">正常</el-dropdown-item>
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="刷新" effect="dark" placement="top">
|
<el-tooltip content="刷新" effect="dark" placement="top">
|
||||||
<el-button circle size="mini" @click="handleRefresh">
|
<el-button circle size="mini" @click="handleRefresh">
|
||||||
<svg-icon class-name="size-icon" icon-class="shuaxin" />
|
<i class="el-icon-refresh"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="列设置" effect="dark" placement="top">
|
<el-tooltip content="列设置" effect="dark" placement="top">
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<span slot="reference">
|
<span slot="reference">
|
||||||
<el-button circle size="mini">
|
<el-button circle size="mini">
|
||||||
<svg-icon class-name="size-icon" icon-class="shezhi" />
|
<i class="el-icon-setting"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||