39 changed files with 7551 additions and 5 deletions
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,539 @@ |
|||||
|
/* Logo 字体 */ |
||||
|
@font-face { |
||||
|
font-family: "iconfont logo"; |
||||
|
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); |
||||
|
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), |
||||
|
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), |
||||
|
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), |
||||
|
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); |
||||
|
} |
||||
|
|
||||
|
.logo { |
||||
|
font-family: "iconfont logo"; |
||||
|
font-size: 160px; |
||||
|
font-style: normal; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
|
||||
|
/* tabs */ |
||||
|
.nav-tabs { |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
.nav-tabs .nav-more { |
||||
|
position: absolute; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
height: 42px; |
||||
|
line-height: 42px; |
||||
|
color: #666; |
||||
|
} |
||||
|
|
||||
|
#tabs { |
||||
|
border-bottom: 1px solid #eee; |
||||
|
} |
||||
|
|
||||
|
#tabs li { |
||||
|
cursor: pointer; |
||||
|
width: 100px; |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
text-align: center; |
||||
|
font-size: 16px; |
||||
|
border-bottom: 2px solid transparent; |
||||
|
position: relative; |
||||
|
z-index: 1; |
||||
|
margin-bottom: -1px; |
||||
|
color: #666; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
#tabs .active { |
||||
|
border-bottom-color: #f00; |
||||
|
color: #222; |
||||
|
} |
||||
|
|
||||
|
.tab-container .content { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
/* 页面布局 */ |
||||
|
.main { |
||||
|
padding: 30px 100px; |
||||
|
width: 960px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
|
||||
|
.main .logo { |
||||
|
color: #333; |
||||
|
text-align: left; |
||||
|
margin-bottom: 30px; |
||||
|
line-height: 1; |
||||
|
height: 110px; |
||||
|
margin-top: -50px; |
||||
|
overflow: hidden; |
||||
|
*zoom: 1; |
||||
|
} |
||||
|
|
||||
|
.main .logo a { |
||||
|
font-size: 160px; |
||||
|
color: #333; |
||||
|
} |
||||
|
|
||||
|
.helps { |
||||
|
margin-top: 40px; |
||||
|
} |
||||
|
|
||||
|
.helps pre { |
||||
|
padding: 20px; |
||||
|
margin: 10px 0; |
||||
|
border: solid 1px #e7e1cd; |
||||
|
background-color: #fffdef; |
||||
|
overflow: auto; |
||||
|
} |
||||
|
|
||||
|
.icon_lists { |
||||
|
width: 100% !important; |
||||
|
overflow: hidden; |
||||
|
*zoom: 1; |
||||
|
} |
||||
|
|
||||
|
.icon_lists li { |
||||
|
width: 100px; |
||||
|
margin-bottom: 10px; |
||||
|
margin-right: 20px; |
||||
|
text-align: center; |
||||
|
list-style: none !important; |
||||
|
cursor: default; |
||||
|
} |
||||
|
|
||||
|
.icon_lists li .code-name { |
||||
|
line-height: 1.2; |
||||
|
} |
||||
|
|
||||
|
.icon_lists .icon { |
||||
|
display: block; |
||||
|
height: 100px; |
||||
|
line-height: 100px; |
||||
|
font-size: 42px; |
||||
|
margin: 10px auto; |
||||
|
color: #333; |
||||
|
-webkit-transition: font-size 0.25s linear, width 0.25s linear; |
||||
|
-moz-transition: font-size 0.25s linear, width 0.25s linear; |
||||
|
transition: font-size 0.25s linear, width 0.25s linear; |
||||
|
} |
||||
|
|
||||
|
.icon_lists .icon:hover { |
||||
|
font-size: 100px; |
||||
|
} |
||||
|
|
||||
|
.icon_lists .svg-icon { |
||||
|
/* 通过设置 font-size 来改变图标大小 */ |
||||
|
width: 1em; |
||||
|
/* 图标和文字相邻时,垂直对齐 */ |
||||
|
vertical-align: -0.15em; |
||||
|
/* 通过设置 color 来改变 SVG 的颜色/fill */ |
||||
|
fill: currentColor; |
||||
|
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 |
||||
|
normalize.css 中也包含这行 */ |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
.icon_lists li .name, |
||||
|
.icon_lists li .code-name { |
||||
|
color: #666; |
||||
|
} |
||||
|
|
||||
|
/* markdown 样式 */ |
||||
|
.markdown { |
||||
|
color: #666; |
||||
|
font-size: 14px; |
||||
|
line-height: 1.8; |
||||
|
} |
||||
|
|
||||
|
.highlight { |
||||
|
line-height: 1.5; |
||||
|
} |
||||
|
|
||||
|
.markdown img { |
||||
|
vertical-align: middle; |
||||
|
max-width: 100%; |
||||
|
} |
||||
|
|
||||
|
.markdown h1 { |
||||
|
color: #404040; |
||||
|
font-weight: 500; |
||||
|
line-height: 40px; |
||||
|
margin-bottom: 24px; |
||||
|
} |
||||
|
|
||||
|
.markdown h2, |
||||
|
.markdown h3, |
||||
|
.markdown h4, |
||||
|
.markdown h5, |
||||
|
.markdown h6 { |
||||
|
color: #404040; |
||||
|
margin: 1.6em 0 0.6em 0; |
||||
|
font-weight: 500; |
||||
|
clear: both; |
||||
|
} |
||||
|
|
||||
|
.markdown h1 { |
||||
|
font-size: 28px; |
||||
|
} |
||||
|
|
||||
|
.markdown h2 { |
||||
|
font-size: 22px; |
||||
|
} |
||||
|
|
||||
|
.markdown h3 { |
||||
|
font-size: 16px; |
||||
|
} |
||||
|
|
||||
|
.markdown h4 { |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
|
||||
|
.markdown h5 { |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
|
||||
|
.markdown h6 { |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
|
||||
|
.markdown hr { |
||||
|
height: 1px; |
||||
|
border: 0; |
||||
|
background: #e9e9e9; |
||||
|
margin: 16px 0; |
||||
|
clear: both; |
||||
|
} |
||||
|
|
||||
|
.markdown p { |
||||
|
margin: 1em 0; |
||||
|
} |
||||
|
|
||||
|
.markdown>p, |
||||
|
.markdown>blockquote, |
||||
|
.markdown>.highlight, |
||||
|
.markdown>ol, |
||||
|
.markdown>ul { |
||||
|
width: 80%; |
||||
|
} |
||||
|
|
||||
|
.markdown ul>li { |
||||
|
list-style: circle; |
||||
|
} |
||||
|
|
||||
|
.markdown>ul li, |
||||
|
.markdown blockquote ul>li { |
||||
|
margin-left: 20px; |
||||
|
padding-left: 4px; |
||||
|
} |
||||
|
|
||||
|
.markdown>ul li p, |
||||
|
.markdown>ol li p { |
||||
|
margin: 0.6em 0; |
||||
|
} |
||||
|
|
||||
|
.markdown ol>li { |
||||
|
list-style: decimal; |
||||
|
} |
||||
|
|
||||
|
.markdown>ol li, |
||||
|
.markdown blockquote ol>li { |
||||
|
margin-left: 20px; |
||||
|
padding-left: 4px; |
||||
|
} |
||||
|
|
||||
|
.markdown code { |
||||
|
margin: 0 3px; |
||||
|
padding: 0 5px; |
||||
|
background: #eee; |
||||
|
border-radius: 3px; |
||||
|
} |
||||
|
|
||||
|
.markdown strong, |
||||
|
.markdown b { |
||||
|
font-weight: 600; |
||||
|
} |
||||
|
|
||||
|
.markdown>table { |
||||
|
border-collapse: collapse; |
||||
|
border-spacing: 0px; |
||||
|
empty-cells: show; |
||||
|
border: 1px solid #e9e9e9; |
||||
|
width: 95%; |
||||
|
margin-bottom: 24px; |
||||
|
} |
||||
|
|
||||
|
.markdown>table th { |
||||
|
white-space: nowrap; |
||||
|
color: #333; |
||||
|
font-weight: 600; |
||||
|
} |
||||
|
|
||||
|
.markdown>table th, |
||||
|
.markdown>table td { |
||||
|
border: 1px solid #e9e9e9; |
||||
|
padding: 8px 16px; |
||||
|
text-align: left; |
||||
|
} |
||||
|
|
||||
|
.markdown>table th { |
||||
|
background: #F7F7F7; |
||||
|
} |
||||
|
|
||||
|
.markdown blockquote { |
||||
|
font-size: 90%; |
||||
|
color: #999; |
||||
|
border-left: 4px solid #e9e9e9; |
||||
|
padding-left: 0.8em; |
||||
|
margin: 1em 0; |
||||
|
} |
||||
|
|
||||
|
.markdown blockquote p { |
||||
|
margin: 0; |
||||
|
} |
||||
|
|
||||
|
.markdown .anchor { |
||||
|
opacity: 0; |
||||
|
transition: opacity 0.3s ease; |
||||
|
margin-left: 8px; |
||||
|
} |
||||
|
|
||||
|
.markdown .waiting { |
||||
|
color: #ccc; |
||||
|
} |
||||
|
|
||||
|
.markdown h1:hover .anchor, |
||||
|
.markdown h2:hover .anchor, |
||||
|
.markdown h3:hover .anchor, |
||||
|
.markdown h4:hover .anchor, |
||||
|
.markdown h5:hover .anchor, |
||||
|
.markdown h6:hover .anchor { |
||||
|
opacity: 1; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.markdown>br, |
||||
|
.markdown>p>br { |
||||
|
clear: both; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
.hljs { |
||||
|
display: block; |
||||
|
background: white; |
||||
|
padding: 0.5em; |
||||
|
color: #333333; |
||||
|
overflow-x: auto; |
||||
|
} |
||||
|
|
||||
|
.hljs-comment, |
||||
|
.hljs-meta { |
||||
|
color: #969896; |
||||
|
} |
||||
|
|
||||
|
.hljs-string, |
||||
|
.hljs-variable, |
||||
|
.hljs-template-variable, |
||||
|
.hljs-strong, |
||||
|
.hljs-emphasis, |
||||
|
.hljs-quote { |
||||
|
color: #df5000; |
||||
|
} |
||||
|
|
||||
|
.hljs-keyword, |
||||
|
.hljs-selector-tag, |
||||
|
.hljs-type { |
||||
|
color: #a71d5d; |
||||
|
} |
||||
|
|
||||
|
.hljs-literal, |
||||
|
.hljs-symbol, |
||||
|
.hljs-bullet, |
||||
|
.hljs-attribute { |
||||
|
color: #0086b3; |
||||
|
} |
||||
|
|
||||
|
.hljs-section, |
||||
|
.hljs-name { |
||||
|
color: #63a35c; |
||||
|
} |
||||
|
|
||||
|
.hljs-tag { |
||||
|
color: #333333; |
||||
|
} |
||||
|
|
||||
|
.hljs-title, |
||||
|
.hljs-attr, |
||||
|
.hljs-selector-id, |
||||
|
.hljs-selector-class, |
||||
|
.hljs-selector-attr, |
||||
|
.hljs-selector-pseudo { |
||||
|
color: #795da3; |
||||
|
} |
||||
|
|
||||
|
.hljs-addition { |
||||
|
color: #55a532; |
||||
|
background-color: #eaffea; |
||||
|
} |
||||
|
|
||||
|
.hljs-deletion { |
||||
|
color: #bd2c00; |
||||
|
background-color: #ffecec; |
||||
|
} |
||||
|
|
||||
|
.hljs-link { |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
|
||||
|
/* 代码高亮 */ |
||||
|
/* PrismJS 1.15.0 |
||||
|
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ |
||||
|
/** |
||||
|
* prism.js default theme for JavaScript, CSS and HTML |
||||
|
* Based on dabblet (http://dabblet.com) |
||||
|
* @author Lea Verou |
||||
|
*/ |
||||
|
code[class*="language-"], |
||||
|
pre[class*="language-"] { |
||||
|
color: black; |
||||
|
background: none; |
||||
|
text-shadow: 0 1px white; |
||||
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; |
||||
|
text-align: left; |
||||
|
white-space: pre; |
||||
|
word-spacing: normal; |
||||
|
word-break: normal; |
||||
|
word-wrap: normal; |
||||
|
line-height: 1.5; |
||||
|
|
||||
|
-moz-tab-size: 4; |
||||
|
-o-tab-size: 4; |
||||
|
tab-size: 4; |
||||
|
|
||||
|
-webkit-hyphens: none; |
||||
|
-moz-hyphens: none; |
||||
|
-ms-hyphens: none; |
||||
|
hyphens: none; |
||||
|
} |
||||
|
|
||||
|
pre[class*="language-"]::-moz-selection, |
||||
|
pre[class*="language-"] ::-moz-selection, |
||||
|
code[class*="language-"]::-moz-selection, |
||||
|
code[class*="language-"] ::-moz-selection { |
||||
|
text-shadow: none; |
||||
|
background: #b3d4fc; |
||||
|
} |
||||
|
|
||||
|
pre[class*="language-"]::selection, |
||||
|
pre[class*="language-"] ::selection, |
||||
|
code[class*="language-"]::selection, |
||||
|
code[class*="language-"] ::selection { |
||||
|
text-shadow: none; |
||||
|
background: #b3d4fc; |
||||
|
} |
||||
|
|
||||
|
@media print { |
||||
|
|
||||
|
code[class*="language-"], |
||||
|
pre[class*="language-"] { |
||||
|
text-shadow: none; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/* Code blocks */ |
||||
|
pre[class*="language-"] { |
||||
|
padding: 1em; |
||||
|
margin: .5em 0; |
||||
|
overflow: auto; |
||||
|
} |
||||
|
|
||||
|
:not(pre)>code[class*="language-"], |
||||
|
pre[class*="language-"] { |
||||
|
background: #f5f2f0; |
||||
|
} |
||||
|
|
||||
|
/* Inline code */ |
||||
|
:not(pre)>code[class*="language-"] { |
||||
|
padding: .1em; |
||||
|
border-radius: .3em; |
||||
|
white-space: normal; |
||||
|
} |
||||
|
|
||||
|
.token.comment, |
||||
|
.token.prolog, |
||||
|
.token.doctype, |
||||
|
.token.cdata { |
||||
|
color: slategray; |
||||
|
} |
||||
|
|
||||
|
.token.punctuation { |
||||
|
color: #999; |
||||
|
} |
||||
|
|
||||
|
.namespace { |
||||
|
opacity: .7; |
||||
|
} |
||||
|
|
||||
|
.token.property, |
||||
|
.token.tag, |
||||
|
.token.boolean, |
||||
|
.token.number, |
||||
|
.token.constant, |
||||
|
.token.symbol, |
||||
|
.token.deleted { |
||||
|
color: #905; |
||||
|
} |
||||
|
|
||||
|
.token.selector, |
||||
|
.token.attr-name, |
||||
|
.token.string, |
||||
|
.token.char, |
||||
|
.token.builtin, |
||||
|
.token.inserted { |
||||
|
color: #690; |
||||
|
} |
||||
|
|
||||
|
.token.operator, |
||||
|
.token.entity, |
||||
|
.token.url, |
||||
|
.language-css .token.string, |
||||
|
.style .token.string { |
||||
|
color: #9a6e3a; |
||||
|
background: hsla(0, 0%, 100%, .5); |
||||
|
} |
||||
|
|
||||
|
.token.atrule, |
||||
|
.token.attr-value, |
||||
|
.token.keyword { |
||||
|
color: #07a; |
||||
|
} |
||||
|
|
||||
|
.token.function, |
||||
|
.token.class-name { |
||||
|
color: #DD4A68; |
||||
|
} |
||||
|
|
||||
|
.token.regex, |
||||
|
.token.important, |
||||
|
.token.variable { |
||||
|
color: #e90; |
||||
|
} |
||||
|
|
||||
|
.token.important, |
||||
|
.token.bold { |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
.token.italic { |
||||
|
font-style: italic; |
||||
|
} |
||||
|
|
||||
|
.token.entity { |
||||
|
cursor: help; |
||||
|
} |
File diff suppressed because it is too large
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,42 @@ |
|||||
|
|
||||
|
// Features specially written for demo
|
||||
|
|
||||
|
(function() { |
||||
|
|
||||
|
// language
|
||||
|
function language(params) { |
||||
|
|
||||
|
var lang = navigator.language||navigator.userLanguage;//常规浏览器语言和IE浏览器
|
||||
|
lang = lang.substr(0, 2);//截取lang前2位字符
|
||||
|
|
||||
|
return lang; |
||||
|
|
||||
|
} |
||||
|
// Tencent Forum Link Button
|
||||
|
function supportButton() { |
||||
|
const text = language() === 'zh' ? '反馈' : 'Forum'; |
||||
|
const link = language() === 'zh' ? 'https://support.qq.com/product/288322' : 'https://groups.google.com/g/luckysheet'; |
||||
|
|
||||
|
document.querySelector("body").insertAdjacentHTML('beforeend', '<a id="container" href="'+ link +'" target="_blank" style="z-index:2;width:50px;height:50px;line-height:50px;position:fixed;right:40px;bottom:86px;border-radius:50px;cursor:pointer;background:rgb(71,133,249);color:#fff;text-align:center;text-decoration:none;">'+ text +'</a>'); |
||||
|
} |
||||
|
|
||||
|
supportButton() |
||||
|
|
||||
|
/** |
||||
|
* Get url parameters |
||||
|
*/ |
||||
|
function getRequest() { |
||||
|
var vars = {}; |
||||
|
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, |
||||
|
function(m,key,value) { |
||||
|
vars[key] = value; |
||||
|
}); |
||||
|
return vars; |
||||
|
} |
||||
|
|
||||
|
window.luckysheetDemoUtil = { |
||||
|
language:language, |
||||
|
getRequest:getRequest |
||||
|
} |
||||
|
|
||||
|
})() |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 434 KiB |
Binary file not shown.
@ -0,0 +1,122 @@ |
|||||
|
<template> |
||||
|
<div style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="testCaseGridRef" |
||||
|
:title="$t('engine.st.testCase.grid.title')" |
||||
|
:config-button="true" |
||||
|
selection="multiple" |
||||
|
:checkbox-selection="true" |
||||
|
:data-url="Environment.apiContextPath('/api/st/testCase')" |
||||
|
:pageable="true" |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="[ |
||||
|
'refresh', |
||||
|
'separator', |
||||
|
'add', |
||||
|
'edit', |
||||
|
'remove', |
||||
|
'separator', |
||||
|
{ |
||||
|
name: 'scenario', |
||||
|
label: $t('engine.st.testCase.grid.toolbar.scenario'), |
||||
|
icon: 'bi-pin-angle', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected; |
||||
|
}, |
||||
|
click: () => { |
||||
|
scenarioRef.open(); |
||||
|
}, |
||||
|
}, |
||||
|
'separator', |
||||
|
{ |
||||
|
name: 'test', |
||||
|
label: $t('engine.st.testCase.grid.toolbar.test'), |
||||
|
icon: 'bi-lightning-charge', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected; |
||||
|
}, |
||||
|
}, |
||||
|
'separator', |
||||
|
{ |
||||
|
name: 'viewResult', |
||||
|
label: $t('engine.st.testCase.grid.toolbar.viewResult'), |
||||
|
icon: 'bi-display', |
||||
|
enableIf: (arg) => { |
||||
|
return arg.selected; |
||||
|
}, |
||||
|
}, |
||||
|
'separator', |
||||
|
'view', |
||||
|
'separator', |
||||
|
'export', |
||||
|
]" |
||||
|
:columns="[ |
||||
|
{ width: 140, name: 'startDate', label: $t('startDate') }, |
||||
|
{ width: 140, name: 'endDate', label: $t('endDate') }, |
||||
|
{ name: 'periodType', label: $t('engine.st.testCase.grid.entity.periodType'), format: Formater.enum(StatisticalPeriodTypeEnums) }, |
||||
|
{ width: 200, name: 'name', label: $t('name') }, |
||||
|
{ width: '100%', name: 'description', label: $t('description') }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'name', label: $t('name'), type: 'text', required: true }, |
||||
|
{ name: 'description', label: $t('description'), type: 'text' }, |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('engine.st.testCase.grid.entity.periodType'), |
||||
|
type: 'select', |
||||
|
options: Options.enum(StatisticalPeriodTypeEnums), |
||||
|
required: true, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'name', label: $t('name') }, |
||||
|
{ name: 'description', label: $t('description') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom'), format: Formater.none() }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
@row-click=" |
||||
|
(evt, row, index) => { |
||||
|
currentSelectedTestCaseId = row.id; |
||||
|
} |
||||
|
" |
||||
|
@before-request-data=" |
||||
|
() => { |
||||
|
currentSelectedTestCaseId = ''; |
||||
|
} |
||||
|
" |
||||
|
></w-grid> |
||||
|
<Scenario |
||||
|
ref="scenarioRef" |
||||
|
:data-url="Environment.apiContextPath('/api/st/testScenario')" |
||||
|
foreign-key="testCase" |
||||
|
:foreign-value="currentSelectedTestCaseId" |
||||
|
></Scenario> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue'; |
||||
|
import { Environment, Formater, Options, EnumTools } from 'platform-core'; |
||||
|
import Scenario from './Scenario.vue'; |
||||
|
|
||||
|
const testCaseGridRef = ref(); |
||||
|
const scenarioRef = ref(); |
||||
|
const currentSelectedTestCaseId = ref(''); |
||||
|
const StatisticalPeriodTypeEnums = await EnumTools.fetch('io.sc.engine.st.enums.StatisticalPeriodType'); |
||||
|
</script> |
@ -0,0 +1,160 @@ |
|||||
|
<template> |
||||
|
<div style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="gridRef" |
||||
|
:title="$t('engine.st.economicIndicator.grid.title')" |
||||
|
:checkbox-selection="true" |
||||
|
:data-url="Environment.apiContextPath('/api/st/economicIndicator')" |
||||
|
:pageable="false" |
||||
|
:sort-by="['year', 'month', 'quarter']" |
||||
|
:query-form-cols-num="4" |
||||
|
:query-form-fields="[ |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('engine.st.economicIndicator.grid.entity.periodType'), |
||||
|
type: 'select', |
||||
|
options: Options.enum(StatisticalPeriodTypeEnums), |
||||
|
queryOperator: 'equals', |
||||
|
//defaultValue: 'MONTH', |
||||
|
}, |
||||
|
]" |
||||
|
:toolbar-actions="['query', 'separator', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
||||
|
:columns="[ |
||||
|
{ name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType'), format: Formater.enum(StatisticalPeriodTypeEnums) }, |
||||
|
{ name: 'year', label: $t('year') }, |
||||
|
{ name: 'month', label: $t('month') }, |
||||
|
{ name: 'quarter', label: $t('quarter') }, |
||||
|
{ |
||||
|
name: 'gdp', |
||||
|
label: $t('engine.st.economicIndicator.grid.entity.GDP'), |
||||
|
title: $t('engine.st.economicIndicator.grid.entity.GDP.title'), |
||||
|
align: 'right', |
||||
|
format: Formater.thousands(), |
||||
|
}, |
||||
|
{ |
||||
|
name: 'm2', |
||||
|
label: $t('engine.st.economicIndicator.grid.entity.M2'), |
||||
|
title: $t('engine.st.economicIndicator.grid.entity.M2.title'), |
||||
|
align: 'right', |
||||
|
format: Formater.thousands(), |
||||
|
}, |
||||
|
{ |
||||
|
name: 'cpi', |
||||
|
label: $t('engine.st.economicIndicator.grid.entity.CPI'), |
||||
|
title: $t('engine.st.economicIndicator.grid.entity.CPI.title'), |
||||
|
align: 'right', |
||||
|
format: Formater.percent(), |
||||
|
}, |
||||
|
{ |
||||
|
name: 'hpi', |
||||
|
label: $t('engine.st.economicIndicator.grid.entity.HPI'), |
||||
|
title: $t('engine.st.economicIndicator.grid.entity.HPI.title'), |
||||
|
align: 'right', |
||||
|
format: Formater.percent(), |
||||
|
}, |
||||
|
{ |
||||
|
name: 'pmi', |
||||
|
label: $t('engine.st.economicIndicator.grid.entity.PMI'), |
||||
|
title: $t('engine.st.economicIndicator.grid.entity.PMI.title'), |
||||
|
align: 'right', |
||||
|
format: Formater.percent(), |
||||
|
}, |
||||
|
{ |
||||
|
name: 'blr', |
||||
|
label: $t('engine.st.economicIndicator.grid.entity.BLR'), |
||||
|
title: $t('engine.st.economicIndicator.grid.entity.BLR.title'), |
||||
|
align: 'right', |
||||
|
format: Formater.percent(), |
||||
|
}, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('engine.st.economicIndicator.grid.entity.periodType'), |
||||
|
type: 'select', |
||||
|
options: Options.enum(StatisticalPeriodTypeEnums), |
||||
|
}, |
||||
|
{ |
||||
|
name: 'year', |
||||
|
label: $t('year'), |
||||
|
type: 'select', |
||||
|
options: yearOptionsRef, |
||||
|
showIf: (arg) => { |
||||
|
return arg.form.getFieldValue('periodType') === 'YEAR'; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'month', |
||||
|
label: $t('month'), |
||||
|
type: 'select', |
||||
|
options: monthOptionsRef, |
||||
|
showIf: (arg) => { |
||||
|
return arg.form.getFieldValue('periodType') === 'MONTH'; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'quarter', |
||||
|
label: $t('quarter'), |
||||
|
type: 'select', |
||||
|
options: quarterOptionsRef, |
||||
|
showIf: (arg) => { |
||||
|
return arg.form.getFieldValue('periodType') === 'QUARTER'; |
||||
|
}, |
||||
|
}, |
||||
|
{ name: 'gdp', label: $t('engine.st.economicIndicator.grid.entity.GDP'), type: 'number' }, |
||||
|
{ name: 'm2', label: $t('engine.st.economicIndicator.grid.entity.M2'), type: 'number' }, |
||||
|
{ name: 'cpi', label: $t('engine.st.economicIndicator.grid.entity.CPI'), type: 'number', precision: 6 }, |
||||
|
{ name: 'hpi', label: $t('engine.st.economicIndicator.grid.entity.HPI'), type: 'number', precision: 6 }, |
||||
|
{ name: 'pmi', label: $t('engine.st.economicIndicator.grid.entity.PMI'), type: 'number', precision: 6 }, |
||||
|
{ name: 'blr', label: $t('engine.st.economicIndicator.grid.entity.BLR'), type: 'number', precision: 6 }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType') }, |
||||
|
{ name: 'year', label: $t('year') }, |
||||
|
{ name: 'month', label: $t('month') }, |
||||
|
{ name: 'gdp', label: $t('engine.st.economicIndicator.grid.entity.GDP') }, |
||||
|
{ name: 'm2', label: $t('engine.st.economicIndicator.grid.entity.M2') }, |
||||
|
{ name: 'cpi', label: $t('engine.st.economicIndicator.grid.entity.CPI') }, |
||||
|
{ name: 'hpi', label: $t('engine.st.economicIndicator.grid.entity.HPI') }, |
||||
|
{ name: 'pmi', label: $t('engine.st.economicIndicator.grid.entity.PMI') }, |
||||
|
{ name: 'blr', label: $t('engine.st.economicIndicator.grid.entity.BLR') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
></w-grid> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue'; |
||||
|
import { Environment, EnumTools, Formater, Options, Tools } from 'platform-core'; |
||||
|
|
||||
|
const gridRef = ref(); |
||||
|
const years = []; |
||||
|
for (let i = 0; i < 30; i++) { |
||||
|
years.push(new Date().getFullYear() - i); |
||||
|
} |
||||
|
const yearOptionsRef = ref(years); |
||||
|
const monthOptionsRef = ref([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); |
||||
|
const quarterOptionsRef = ref([1, 2, 3, 4]); |
||||
|
const StatisticalPeriodTypeEnums = await EnumTools.fetch('io.sc.engine.st.enums.StatisticalPeriodType'); |
||||
|
</script> |
@ -0,0 +1,194 @@ |
|||||
|
<template> |
||||
|
<q-splitter :model-value="60" class="w-full" style="height: 100%"> |
||||
|
<template #before> |
||||
|
<div class="pr-1" style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="factorTypeGridRef" |
||||
|
:title="$t('engine.st.factorType.grid.title')" |
||||
|
:checkbox-selection="true" |
||||
|
:data-url="Environment.apiContextPath('/api/st/factorType')" |
||||
|
:pageable="false" |
||||
|
:sort-by="['code']" |
||||
|
:query-form-cols-num="4" |
||||
|
:query-form-fields="[ |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('period'), |
||||
|
type: 'select', |
||||
|
options: Options.enum(Enums.PeriodType), |
||||
|
queryOperator: 'equals', |
||||
|
}, |
||||
|
{ name: 'code', label: $t('code'), type: 'text' }, |
||||
|
{ name: 'name', label: $t('name'), type: 'text' }, |
||||
|
]" |
||||
|
:toolbar-actions="['query', 'separator', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
||||
|
:columns="[ |
||||
|
{ width: 150, name: 'name', label: $t('name') }, |
||||
|
{ width: 100, name: 'code', label: $t('code') }, |
||||
|
{ width: 60, name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType'), format: Formater.enum(Enums.PeriodType) }, |
||||
|
{ width: 100, name: 'description', label: $t('description') }, |
||||
|
{ width: 80, name: 'valueType', label: $t('valueType'), format: Formater.enum(Enums.ValueType) }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('period'), |
||||
|
required: true, |
||||
|
type: 'select', |
||||
|
options: Options.enum(Enums.PeriodType), |
||||
|
}, |
||||
|
{ name: 'code', label: $t('code'), type: 'text', required: true }, |
||||
|
{ name: 'name', label: $t('name'), type: 'text', required: true }, |
||||
|
{ name: 'valueType', label: $t('valueType'), required: true, type: 'select', options: Options.enum(Enums.ValueType) }, |
||||
|
{ name: 'description', label: $t('description'), type: 'text' }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'periodType', label: $t('period') }, |
||||
|
{ name: 'code', label: $t('code') }, |
||||
|
{ name: 'name', label: $t('name') }, |
||||
|
{ name: 'description', label: $t('description') }, |
||||
|
{ name: 'valueType', label: $t('valueType') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
@row-click=" |
||||
|
(evt, row, index) => { |
||||
|
currentSelectedFactorType = row; |
||||
|
factorGridRef?.refresh(); |
||||
|
} |
||||
|
" |
||||
|
@before-request-data=" |
||||
|
() => { |
||||
|
currentSelectedFactorType = { id: '' }; |
||||
|
factorGridRef?.refresh(); |
||||
|
} |
||||
|
" |
||||
|
></w-grid> |
||||
|
</div> |
||||
|
</template> |
||||
|
<template #after> |
||||
|
<q-splitter :model-value="70" horizontal class="w-full" style="height: 100%"> |
||||
|
<template #before> |
||||
|
<div class="pl-1" style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="factorGridRef" |
||||
|
title="engine.st.factor.grid.title" |
||||
|
:checkbox-selection="true" |
||||
|
:fetch-data-url="Environment.apiContextPath('/api/st/factor?factorType=' + currentSelectedFactorType.id)" |
||||
|
:data-url="Environment.apiContextPath('/api/st/factor')" |
||||
|
:pageable="false" |
||||
|
:sort-by="['year', 'quarter', 'month', 'day']" |
||||
|
:query-form-cols-num="4" |
||||
|
:query-form-fields="[]" |
||||
|
:toolbar-actions="['refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
||||
|
:columns="getFactorColumns" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('period'), |
||||
|
required: true, |
||||
|
type: 'select', |
||||
|
options: Options.enum(Enums.PeriodType), |
||||
|
}, |
||||
|
{ name: 'code', label: $t('code'), type: 'text', required: true }, |
||||
|
{ name: 'name', label: $t('name'), type: 'text', required: true }, |
||||
|
{ name: 'valueType', label: $t('valueType'), required: true, type: 'select', options: Options.enum(Enums.ValueType) }, |
||||
|
{ name: 'description', label: $t('description'), type: 'text' }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'periodType', label: $t('period') }, |
||||
|
{ name: 'code', label: $t('code') }, |
||||
|
{ name: 'name', label: $t('name') }, |
||||
|
{ name: 'description', label: $t('description') }, |
||||
|
{ name: 'valueType', label: $t('valueType') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
></w-grid> |
||||
|
</div> |
||||
|
</template> |
||||
|
<template #after> |
||||
|
<div class="pl-1" style="height: 100%"></div> |
||||
|
</template> |
||||
|
</q-splitter> |
||||
|
</template> |
||||
|
</q-splitter> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue'; |
||||
|
import { useI18n } from 'vue-i18n'; |
||||
|
import { Environment, EnumTools, Formater, Options } from 'platform-core'; |
||||
|
import { computed } from 'vue'; |
||||
|
|
||||
|
const { t } = useI18n(); |
||||
|
const factorTypeGridRef = ref(); |
||||
|
const factorGridRef = ref(); |
||||
|
const currentSelectedFactorType = ref({}); |
||||
|
const Enums = await EnumTools.fetch(['io.sc.engine.st.enums.PeriodType', 'io.sc.engine.st.enums.ValueType']); |
||||
|
|
||||
|
const getFactorColumns = computed(() => { |
||||
|
let result = [{ width: '100%', name: 'value', label: t('value') }]; |
||||
|
if (currentSelectedFactorType.value.periodType === 'YEAR') { |
||||
|
result = [ |
||||
|
{ width: 60, name: 'year', label: t('year') }, |
||||
|
{ width: '100%', name: 'value', label: t('value') }, |
||||
|
]; |
||||
|
} else if (currentSelectedFactorType.value.periodType === 'QUARTER') { |
||||
|
result = [ |
||||
|
{ width: 60, name: 'year', label: t('year') }, |
||||
|
{ width: 60, name: 'quarter', label: t('quarter') }, |
||||
|
{ width: '100%', name: 'value', label: t('value') }, |
||||
|
]; |
||||
|
} else if (currentSelectedFactorType.value.periodType === 'MONTH') { |
||||
|
result = [ |
||||
|
{ width: 60, name: 'year', label: t('year') }, |
||||
|
{ width: 60, name: 'month', label: t('month') }, |
||||
|
{ width: '100%', name: 'value', label: t('value') }, |
||||
|
]; |
||||
|
} else if (currentSelectedFactorType.value.periodType === 'DAY') { |
||||
|
result = [ |
||||
|
{ width: 60, name: 'year', label: t('year') }, |
||||
|
{ width: 60, name: 'month', label: t('month') }, |
||||
|
{ width: 60, name: 'day', label: t('day') }, |
||||
|
{ width: '100%', name: 'value', label: t('value') }, |
||||
|
]; |
||||
|
} |
||||
|
return result; |
||||
|
}); |
||||
|
</script> |
@ -0,0 +1,188 @@ |
|||||
|
<template> |
||||
|
<q-splitter :model-value="60" class="w-full" style="height: 100%"> |
||||
|
<template #before> |
||||
|
<div class="pr-1" style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="factorTypeGridRef" |
||||
|
:title="$t('engine.st.factorType.grid.title')" |
||||
|
:checkbox-selection="true" |
||||
|
:data-url="Environment.apiContextPath('/api/st/factorType')" |
||||
|
:pageable="false" |
||||
|
:sort-by="['code']" |
||||
|
:query-form-cols-num="4" |
||||
|
:query-form-fields="[ |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('period'), |
||||
|
type: 'select', |
||||
|
options: Options.enum(Enums.PeriodType), |
||||
|
queryOperator: 'equals', |
||||
|
}, |
||||
|
{ name: 'code', label: $t('code'), type: 'text' }, |
||||
|
{ name: 'name', label: $t('name'), type: 'text' }, |
||||
|
]" |
||||
|
:toolbar-actions="['query', 'separator', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
||||
|
:columns="[ |
||||
|
{ width: 150, name: 'name', label: $t('name') }, |
||||
|
{ width: 100, name: 'code', label: $t('code') }, |
||||
|
{ width: 60, name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType'), format: Formater.enum(Enums.PeriodType) }, |
||||
|
{ width: 100, name: 'description', label: $t('description') }, |
||||
|
{ width: 80, name: 'valueType', label: $t('valueType'), format: Formater.enum(Enums.ValueType) }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('period'), |
||||
|
required: true, |
||||
|
type: 'select', |
||||
|
options: Options.enum(Enums.PeriodType), |
||||
|
}, |
||||
|
{ name: 'code', label: $t('code'), type: 'text', required: true }, |
||||
|
{ name: 'name', label: $t('name'), type: 'text', required: true }, |
||||
|
{ name: 'valueType', label: $t('valueType'), required: true, type: 'select', options: Options.enum(Enums.ValueType) }, |
||||
|
{ name: 'description', label: $t('description'), type: 'text' }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'periodType', label: $t('period') }, |
||||
|
{ name: 'code', label: $t('code') }, |
||||
|
{ name: 'name', label: $t('name') }, |
||||
|
{ name: 'description', label: $t('description') }, |
||||
|
{ name: 'valueType', label: $t('valueType') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
@row-click=" |
||||
|
(evt, row, index) => { |
||||
|
currentSelectedFactorType = row; |
||||
|
factorGridRef?.refresh(); |
||||
|
} |
||||
|
" |
||||
|
@before-request-data=" |
||||
|
() => { |
||||
|
currentSelectedFactorType = { id: '' }; |
||||
|
factorGridRef?.refresh(); |
||||
|
} |
||||
|
" |
||||
|
></w-grid> |
||||
|
</div> |
||||
|
</template> |
||||
|
<template #after> |
||||
|
<div class="pl-1" style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="factorGridRef" |
||||
|
title="" |
||||
|
:checkbox-selection="true" |
||||
|
:fetch-data-url="Environment.apiContextPath('/api/st/factor?factorType=' + currentSelectedFactorType.id)" |
||||
|
:data-url="Environment.apiContextPath('/api/st/factor')" |
||||
|
:pageable="false" |
||||
|
:sort-by="['year', 'quarter', 'month', 'day']" |
||||
|
:query-form-cols-num="4" |
||||
|
:query-form-fields="[]" |
||||
|
:toolbar-actions="['refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
||||
|
:columns="getFactorColumns" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('period'), |
||||
|
required: true, |
||||
|
type: 'select', |
||||
|
options: Options.enum(Enums.PeriodType), |
||||
|
}, |
||||
|
{ name: 'code', label: $t('code'), type: 'text', required: true }, |
||||
|
{ name: 'name', label: $t('name'), type: 'text', required: true }, |
||||
|
{ name: 'valueType', label: $t('valueType'), required: true, type: 'select', options: Options.enum(Enums.ValueType) }, |
||||
|
{ name: 'description', label: $t('description'), type: 'text' }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'periodType', label: $t('period') }, |
||||
|
{ name: 'code', label: $t('code') }, |
||||
|
{ name: 'name', label: $t('name') }, |
||||
|
{ name: 'description', label: $t('description') }, |
||||
|
{ name: 'valueType', label: $t('valueType') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
></w-grid> |
||||
|
</div> |
||||
|
</template> |
||||
|
</q-splitter> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue'; |
||||
|
import { useI18n } from 'vue-i18n'; |
||||
|
import { Environment, EnumTools, Formater, Options } from 'platform-core'; |
||||
|
import { computed } from 'vue'; |
||||
|
|
||||
|
const { t } = useI18n(); |
||||
|
const factorTypeGridRef = ref(); |
||||
|
const factorGridRef = ref(); |
||||
|
const currentSelectedFactorType = ref({}); |
||||
|
const Enums = await EnumTools.fetch(['io.sc.engine.st.enums.PeriodType', 'io.sc.engine.st.enums.ValueType']); |
||||
|
|
||||
|
const getFactorColumns = computed(() => { |
||||
|
let result = []; |
||||
|
if (currentSelectedFactorType.value.periodType === 'YEAR') { |
||||
|
result = [ |
||||
|
{ width: 60, name: 'year', label: t('year') }, |
||||
|
{ width: '100%', name: 'value', label: t('value') }, |
||||
|
]; |
||||
|
} else if (currentSelectedFactorType.value.periodType === 'QUARTER') { |
||||
|
result = [ |
||||
|
{ width: 60, name: 'year', label: t('year') }, |
||||
|
{ width: 60, name: 'quarter', label: t('quarter') }, |
||||
|
{ width: '100%', name: 'value', label: t('value') }, |
||||
|
]; |
||||
|
} else if (currentSelectedFactorType.value.periodType === 'MONTH') { |
||||
|
result = [ |
||||
|
{ width: 60, name: 'year', label: t('year') }, |
||||
|
{ width: 60, name: 'month', label: t('month') }, |
||||
|
{ width: '100%', name: 'value', label: t('value') }, |
||||
|
]; |
||||
|
} else if (currentSelectedFactorType.value.periodType === 'DAY') { |
||||
|
result = [ |
||||
|
{ width: 60, name: 'year', label: t('year') }, |
||||
|
{ width: 60, name: 'month', label: t('month') }, |
||||
|
{ width: 60, name: 'day', label: t('day') }, |
||||
|
{ width: '100%', name: 'value', label: t('value') }, |
||||
|
]; |
||||
|
} |
||||
|
console.log(result); |
||||
|
return result; |
||||
|
}); |
||||
|
</script> |
@ -0,0 +1,119 @@ |
|||||
|
<template> |
||||
|
<div style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="gridRef" |
||||
|
:title="$t('engine.st.factorType.grid.title')" |
||||
|
:checkbox-selection="true" |
||||
|
:data-url="Environment.apiContextPath('/api/st/factorType')" |
||||
|
:pageable="false" |
||||
|
:sort-by="['year', 'month', 'quarter']" |
||||
|
:query-form-cols-num="4" |
||||
|
:query-form-fields="[ |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('period'), |
||||
|
type: 'select', |
||||
|
options: Options.enum(StatisticalPeriodTypeEnums), |
||||
|
queryOperator: 'equals', |
||||
|
}, |
||||
|
]" |
||||
|
:toolbar-actions="['query', 'separator', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
||||
|
:columns="[ |
||||
|
{ name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType'), format: Formater.enum(StatisticalPeriodTypeEnums) }, |
||||
|
|
||||
|
{ name: 'code', label: $t('code') }, |
||||
|
{ name: 'name', label: $t('name') }, |
||||
|
{ name: 'description', label: $t('description') }, |
||||
|
{ name: 'valueType', label: $t('valueType') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ |
||||
|
name: 'periodType', |
||||
|
label: $t('engine.st.economicIndicator.grid.entity.periodType'), |
||||
|
type: 'select', |
||||
|
options: Options.enum(StatisticalPeriodTypeEnums), |
||||
|
}, |
||||
|
{ |
||||
|
name: 'year', |
||||
|
label: $t('year'), |
||||
|
type: 'select', |
||||
|
options: yearOptionsRef, |
||||
|
showIf: (arg) => { |
||||
|
return arg.form.getFieldValue('periodType') === 'YEAR'; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'month', |
||||
|
label: $t('month'), |
||||
|
type: 'select', |
||||
|
options: monthOptionsRef, |
||||
|
showIf: (arg) => { |
||||
|
return arg.form.getFieldValue('periodType') === 'MONTH'; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'quarter', |
||||
|
label: $t('quarter'), |
||||
|
type: 'select', |
||||
|
options: quarterOptionsRef, |
||||
|
showIf: (arg) => { |
||||
|
return arg.form.getFieldValue('periodType') === 'QUARTER'; |
||||
|
}, |
||||
|
}, |
||||
|
{ name: 'gdp', label: $t('engine.st.economicIndicator.grid.entity.GDP'), type: 'number' }, |
||||
|
{ name: 'm2', label: $t('engine.st.economicIndicator.grid.entity.M2'), type: 'number' }, |
||||
|
{ name: 'cpi', label: $t('engine.st.economicIndicator.grid.entity.CPI'), type: 'number', precision: 6 }, |
||||
|
{ name: 'hpi', label: $t('engine.st.economicIndicator.grid.entity.HPI'), type: 'number', precision: 6 }, |
||||
|
{ name: 'pmi', label: $t('engine.st.economicIndicator.grid.entity.PMI'), type: 'number', precision: 6 }, |
||||
|
{ name: 'blr', label: $t('engine.st.economicIndicator.grid.entity.BLR'), type: 'number', precision: 6 }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType') }, |
||||
|
{ name: 'year', label: $t('year') }, |
||||
|
{ name: 'month', label: $t('month') }, |
||||
|
{ name: 'gdp', label: $t('engine.st.economicIndicator.grid.entity.GDP') }, |
||||
|
{ name: 'm2', label: $t('engine.st.economicIndicator.grid.entity.M2') }, |
||||
|
{ name: 'cpi', label: $t('engine.st.economicIndicator.grid.entity.CPI') }, |
||||
|
{ name: 'hpi', label: $t('engine.st.economicIndicator.grid.entity.HPI') }, |
||||
|
{ name: 'pmi', label: $t('engine.st.economicIndicator.grid.entity.PMI') }, |
||||
|
{ name: 'blr', label: $t('engine.st.economicIndicator.grid.entity.BLR') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
></w-grid> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue'; |
||||
|
import { Environment, EnumTools, Formater, Options, Tools } from 'platform-core'; |
||||
|
|
||||
|
const gridRef = ref(); |
||||
|
const years = []; |
||||
|
for (let i = 0; i < 30; i++) { |
||||
|
years.push(new Date().getFullYear() - i); |
||||
|
} |
||||
|
const yearOptionsRef = ref(years); |
||||
|
const monthOptionsRef = ref([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); |
||||
|
const quarterOptionsRef = ref([1, 2, 3, 4]); |
||||
|
const StatisticalPeriodTypeEnums = await EnumTools.fetch('io.sc.engine.st.enums.StatisticalPeriodType'); |
||||
|
</script> |
@ -0,0 +1,15 @@ |
|||||
|
package io.sc.engine.st.controller; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.EconomicIndicatorEntity; |
||||
|
import io.sc.engine.st.jpa.repository.EconomicIndicatorRepository; |
||||
|
import io.sc.engine.st.service.EconomicIndicatorService; |
||||
|
import io.sc.engine.st.vo.EconomicIndicatorVo; |
||||
|
import io.sc.platform.mvc.controller.support.RestCrudController; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@RestController("io.sc.engine.st.controller.EconomicIndicatorWebController") |
||||
|
@RequestMapping("/api/st/economicIndicator") |
||||
|
public class EconomicIndicatorWebController extends RestCrudController<EconomicIndicatorVo, EconomicIndicatorEntity,String, EconomicIndicatorRepository, EconomicIndicatorService> { |
||||
|
|
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package io.sc.engine.st.controller; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.FactorTypeEntity; |
||||
|
import io.sc.engine.st.jpa.repository.FactorTypeRepository; |
||||
|
import io.sc.engine.st.service.FactorTypeService; |
||||
|
import io.sc.engine.st.vo.FactorTypeVo; |
||||
|
import io.sc.platform.mvc.controller.support.RestCrudController; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@RestController("io.sc.engine.st.controller.FactorTypeWebController") |
||||
|
@RequestMapping("/api/st/factorType") |
||||
|
public class FactorTypeWebController extends RestCrudController<FactorTypeVo, FactorTypeEntity,String, FactorTypeRepository, FactorTypeService> { |
||||
|
|
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package io.sc.engine.st.controller; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.FactorEntity; |
||||
|
import io.sc.engine.st.jpa.repository.FactorRepository; |
||||
|
import io.sc.engine.st.service.FactorService; |
||||
|
import io.sc.engine.st.vo.FactorVo; |
||||
|
import io.sc.platform.mvc.controller.support.RestCrudController; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@RestController("io.sc.engine.st.controller.FactorWebController") |
||||
|
@RequestMapping("/api/st/factor") |
||||
|
public class FactorWebController extends RestCrudController<FactorVo, FactorEntity,String, FactorRepository, FactorService> { |
||||
|
|
||||
|
} |
@ -0,0 +1,157 @@ |
|||||
|
package io.sc.engine.st.jpa.entity; |
||||
|
|
||||
|
import io.sc.engine.st.enums.StatisticalPeriodType; |
||||
|
import io.sc.engine.st.vo.EconomicIndicatorVo; |
||||
|
import io.sc.platform.orm.entity.CorporationAuditorEntity; |
||||
|
import org.hibernate.annotations.GenericGenerator; |
||||
|
|
||||
|
import javax.persistence.*; |
||||
|
import javax.validation.constraints.Size; |
||||
|
|
||||
|
@Entity(name="io.sc.engine.st.jpa.entity.EconomicIndicatorEntity" /* 避免和 io.sc.platform.system.dictionary.jpa.entity.DictionaryEntity 冲突 */) |
||||
|
@Table(name="ST_ECONOMIC_INDICATOR") |
||||
|
public class EconomicIndicatorEntity extends CorporationAuditorEntity<EconomicIndicatorVo> { |
||||
|
@Id |
||||
|
@GeneratedValue(generator = "system-uuid") |
||||
|
@GenericGenerator(name = "system-uuid", strategy = "uuid2") |
||||
|
@Column(name="ID_", length=36) |
||||
|
@Size(max=36) |
||||
|
protected String id; |
||||
|
|
||||
|
@Column(name="PERIOD_TYPE_") |
||||
|
@Enumerated(EnumType.STRING) |
||||
|
protected StatisticalPeriodType periodType; |
||||
|
|
||||
|
@Column(name="YEAR_") |
||||
|
protected Integer year; |
||||
|
|
||||
|
@Column(name="MONTH_") |
||||
|
protected Integer month; |
||||
|
|
||||
|
@Column(name="QUARTER_") |
||||
|
protected Integer quarter; |
||||
|
|
||||
|
@Column(name="GDP_") |
||||
|
protected Double gdp; |
||||
|
|
||||
|
@Column(name="M2_") |
||||
|
protected Double m2; |
||||
|
|
||||
|
@Column(name="CPI_") |
||||
|
protected Double cpi; |
||||
|
|
||||
|
@Column(name="HPI_") |
||||
|
protected Double hpi; |
||||
|
|
||||
|
@Column(name="PMI_") |
||||
|
protected Double pmi; |
||||
|
|
||||
|
@Column(name="BLR_") |
||||
|
protected Double blr; |
||||
|
|
||||
|
@Override |
||||
|
public EconomicIndicatorVo toVo() { |
||||
|
EconomicIndicatorVo vo =new EconomicIndicatorVo(); |
||||
|
super.toVo(vo); |
||||
|
vo.setId(this.getId()); |
||||
|
vo.setPeriodType(this.getPeriodType()); |
||||
|
vo.setYear(this.getYear()); |
||||
|
vo.setMonth(this.getMonth()); |
||||
|
vo.setQuarter(this.getQuarter()); |
||||
|
vo.setGdp(this.getGdp()); |
||||
|
vo.setM2(this.getM2()); |
||||
|
vo.setCpi(this.getCpi()); |
||||
|
vo.setHpi(this.getHpi()); |
||||
|
vo.setPmi(this.getPmi()); |
||||
|
vo.setBlr(this.getBlr()); |
||||
|
return vo; |
||||
|
} |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public StatisticalPeriodType getPeriodType() { |
||||
|
return periodType; |
||||
|
} |
||||
|
|
||||
|
public void setPeriodType(StatisticalPeriodType periodType) { |
||||
|
this.periodType = periodType; |
||||
|
} |
||||
|
|
||||
|
public Integer getYear() { |
||||
|
return year; |
||||
|
} |
||||
|
|
||||
|
public void setYear(Integer year) { |
||||
|
this.year = year; |
||||
|
} |
||||
|
|
||||
|
public Integer getMonth() { |
||||
|
return month; |
||||
|
} |
||||
|
|
||||
|
public void setMonth(Integer month) { |
||||
|
this.month = month; |
||||
|
} |
||||
|
|
||||
|
public Integer getQuarter() { |
||||
|
return quarter; |
||||
|
} |
||||
|
|
||||
|
public void setQuarter(Integer quarter) { |
||||
|
this.quarter = quarter; |
||||
|
} |
||||
|
|
||||
|
public Double getGdp() { |
||||
|
return gdp; |
||||
|
} |
||||
|
|
||||
|
public void setGdp(Double gdp) { |
||||
|
this.gdp = gdp; |
||||
|
} |
||||
|
|
||||
|
public Double getM2() { |
||||
|
return m2; |
||||
|
} |
||||
|
|
||||
|
public void setM2(Double m2) { |
||||
|
this.m2 = m2; |
||||
|
} |
||||
|
|
||||
|
public Double getCpi() { |
||||
|
return cpi; |
||||
|
} |
||||
|
|
||||
|
public void setCpi(Double cpi) { |
||||
|
this.cpi = cpi; |
||||
|
} |
||||
|
|
||||
|
public Double getHpi() { |
||||
|
return hpi; |
||||
|
} |
||||
|
|
||||
|
public void setHpi(Double hpi) { |
||||
|
this.hpi = hpi; |
||||
|
} |
||||
|
|
||||
|
public Double getPmi() { |
||||
|
return pmi; |
||||
|
} |
||||
|
|
||||
|
public void setPmi(Double pmi) { |
||||
|
this.pmi = pmi; |
||||
|
} |
||||
|
|
||||
|
public Double getBlr() { |
||||
|
return blr; |
||||
|
} |
||||
|
|
||||
|
public void setBlr(Double blr) { |
||||
|
this.blr = blr; |
||||
|
} |
||||
|
} |
@ -0,0 +1,118 @@ |
|||||
|
package io.sc.engine.st.jpa.entity; |
||||
|
|
||||
|
import io.sc.engine.st.enums.PeriodType; |
||||
|
import io.sc.engine.st.enums.ValueType; |
||||
|
import io.sc.engine.st.vo.FactorTypeVo; |
||||
|
import io.sc.engine.st.vo.FactorVo; |
||||
|
import io.sc.platform.orm.entity.CorporationAuditorEntity; |
||||
|
import org.hibernate.annotations.GenericGenerator; |
||||
|
|
||||
|
import javax.persistence.*; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.Size; |
||||
|
|
||||
|
@Entity(name="io.sc.engine.st.jpa.entity.FactorEntity") |
||||
|
@Table(name="ST_FACTOR") |
||||
|
public class FactorEntity extends CorporationAuditorEntity<FactorVo> { |
||||
|
@Id |
||||
|
@GeneratedValue(generator = "system-uuid") |
||||
|
@GenericGenerator(name = "system-uuid", strategy = "uuid2") |
||||
|
@Column(name="ID_", length=36) |
||||
|
@Size(max=36) |
||||
|
protected String id; |
||||
|
|
||||
|
@Column(name="YEAR_") |
||||
|
protected Integer year; |
||||
|
|
||||
|
@Column(name="QUARTER_") |
||||
|
protected Integer quarter; |
||||
|
|
||||
|
@Column(name="MONTH_") |
||||
|
protected Integer month; |
||||
|
|
||||
|
@Column(name="DAY_") |
||||
|
protected Integer day; |
||||
|
|
||||
|
@Column(name="VALUE_", length=255) |
||||
|
@Size(max=255) |
||||
|
protected String value; |
||||
|
|
||||
|
@ManyToOne(fetch=FetchType.LAZY) |
||||
|
@JoinColumn(name="FACTOR_TYPE_ID_") |
||||
|
protected FactorTypeEntity factorType; |
||||
|
|
||||
|
@Override |
||||
|
public FactorVo toVo() { |
||||
|
FactorVo vo =new FactorVo(); |
||||
|
super.toVo(vo); |
||||
|
vo.setId(this.getId()); |
||||
|
vo.setYear(this.getYear()); |
||||
|
vo.setQuarter(this.getQuarter()); |
||||
|
vo.setMonth(this.getMonth()); |
||||
|
vo.setDay(this.getDay()); |
||||
|
vo.setValue(this.getValue()); |
||||
|
vo.setFactorType(this.getFactorType()==null?null:this.getFactorType().getId()); |
||||
|
return vo; |
||||
|
} |
||||
|
|
||||
|
public FactorEntity(){} |
||||
|
public FactorEntity(String id){ |
||||
|
this.id =id; |
||||
|
} |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Integer getYear() { |
||||
|
return year; |
||||
|
} |
||||
|
|
||||
|
public void setYear(Integer year) { |
||||
|
this.year = year; |
||||
|
} |
||||
|
|
||||
|
public Integer getQuarter() { |
||||
|
return quarter; |
||||
|
} |
||||
|
|
||||
|
public void setQuarter(Integer quarter) { |
||||
|
this.quarter = quarter; |
||||
|
} |
||||
|
|
||||
|
public Integer getMonth() { |
||||
|
return month; |
||||
|
} |
||||
|
|
||||
|
public void setMonth(Integer month) { |
||||
|
this.month = month; |
||||
|
} |
||||
|
|
||||
|
public Integer getDay() { |
||||
|
return day; |
||||
|
} |
||||
|
|
||||
|
public void setDay(Integer day) { |
||||
|
this.day = day; |
||||
|
} |
||||
|
|
||||
|
public String getValue() { |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public void setValue(String value) { |
||||
|
this.value = value; |
||||
|
} |
||||
|
|
||||
|
public FactorTypeEntity getFactorType() { |
||||
|
return factorType; |
||||
|
} |
||||
|
|
||||
|
public void setFactorType(FactorTypeEntity factorType) { |
||||
|
this.factorType = factorType; |
||||
|
} |
||||
|
} |
@ -0,0 +1,110 @@ |
|||||
|
package io.sc.engine.st.jpa.entity; |
||||
|
|
||||
|
import io.sc.engine.st.enums.PeriodType; |
||||
|
import io.sc.engine.st.enums.ValueType; |
||||
|
import io.sc.engine.st.vo.FactorTypeVo; |
||||
|
import io.sc.platform.orm.entity.CorporationAuditorEntity; |
||||
|
import org.hibernate.annotations.GenericGenerator; |
||||
|
|
||||
|
import javax.persistence.*; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.Size; |
||||
|
|
||||
|
@Entity(name="io.sc.engine.st.jpa.entity.FactorTypeEntity") |
||||
|
@Table(name="ST_FACTOR_TYPE") |
||||
|
public class FactorTypeEntity extends CorporationAuditorEntity<FactorTypeVo> { |
||||
|
@Id |
||||
|
@GeneratedValue(generator = "system-uuid") |
||||
|
@GenericGenerator(name = "system-uuid", strategy = "uuid2") |
||||
|
@Column(name="ID_", length=36) |
||||
|
@Size(max=36) |
||||
|
protected String id; |
||||
|
|
||||
|
@Column(name="CODE_", length=255) |
||||
|
@NotBlank |
||||
|
@Size(max=255) |
||||
|
protected String code; |
||||
|
|
||||
|
@Column(name="NAME_", length=255) |
||||
|
@NotBlank |
||||
|
@Size(max=255) |
||||
|
protected String name; |
||||
|
|
||||
|
@Column(name="DESCRIPTION_", length=255) |
||||
|
@Size(max=255) |
||||
|
protected String description; |
||||
|
|
||||
|
@Column(name="PERIOD_TYPE_", length=20) |
||||
|
@Enumerated(EnumType.STRING) |
||||
|
protected PeriodType periodType; |
||||
|
|
||||
|
@Column(name="VALUE_TYPE_", length=20) |
||||
|
@Enumerated(EnumType.STRING) |
||||
|
protected ValueType valueType; |
||||
|
|
||||
|
@Override |
||||
|
public FactorTypeVo toVo() { |
||||
|
FactorTypeVo vo =new FactorTypeVo(); |
||||
|
super.toVo(vo); |
||||
|
vo.setId(this.getId()); |
||||
|
vo.setCode(this.getCode()); |
||||
|
vo.setName(this.getName()); |
||||
|
vo.setDescription(this.getDescription()); |
||||
|
vo.setPeriodType(this.getPeriodType()); |
||||
|
vo.setValueType(this.getValueType()); |
||||
|
return vo; |
||||
|
} |
||||
|
|
||||
|
public FactorTypeEntity(){} |
||||
|
public FactorTypeEntity(String id){ |
||||
|
this.id =id; |
||||
|
} |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getDescription() { |
||||
|
return description; |
||||
|
} |
||||
|
|
||||
|
public void setDescription(String description) { |
||||
|
this.description = description; |
||||
|
} |
||||
|
|
||||
|
public PeriodType getPeriodType() { |
||||
|
return periodType; |
||||
|
} |
||||
|
|
||||
|
public void setPeriodType(PeriodType periodType) { |
||||
|
this.periodType = periodType; |
||||
|
} |
||||
|
|
||||
|
public ValueType getValueType() { |
||||
|
return valueType; |
||||
|
} |
||||
|
|
||||
|
public void setValueType(ValueType valueType) { |
||||
|
this.valueType = valueType; |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package io.sc.engine.st.jpa.repository; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.EconomicIndicatorEntity; |
||||
|
import io.sc.platform.orm.repository.DaoRepository; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service("io.sc.engine.st.jpa.repository.EconomicIndicatorRepository") |
||||
|
public interface EconomicIndicatorRepository extends DaoRepository<EconomicIndicatorEntity,String>{ |
||||
|
|
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package io.sc.engine.st.jpa.repository; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.FactorEntity; |
||||
|
import io.sc.platform.orm.repository.DaoRepository; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service("io.sc.engine.st.jpa.repository.FactorRepository") |
||||
|
public interface FactorRepository extends DaoRepository<FactorEntity,String>{ |
||||
|
|
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package io.sc.engine.st.jpa.repository; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.FactorTypeEntity; |
||||
|
import io.sc.platform.orm.repository.DaoRepository; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service("io.sc.engine.st.jpa.repository.FactorTypeRepository") |
||||
|
public interface FactorTypeRepository extends DaoRepository<FactorTypeEntity,String>{ |
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package io.sc.engine.st.service; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.EconomicIndicatorEntity; |
||||
|
import io.sc.engine.st.jpa.repository.EconomicIndicatorRepository; |
||||
|
import io.sc.platform.orm.service.DaoService; |
||||
|
import io.sc.platform.orm.service.support.QueryParameter; |
||||
|
import org.springframework.data.domain.Page; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
public interface EconomicIndicatorService extends DaoService<EconomicIndicatorEntity, String, EconomicIndicatorRepository>{ |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
package io.sc.engine.st.service; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.FactorEntity; |
||||
|
import io.sc.engine.st.jpa.repository.FactorRepository; |
||||
|
import io.sc.platform.orm.service.DaoService; |
||||
|
|
||||
|
public interface FactorService extends DaoService<FactorEntity, String, FactorRepository>{ |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
package io.sc.engine.st.service; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.FactorTypeEntity; |
||||
|
import io.sc.engine.st.jpa.repository.FactorTypeRepository; |
||||
|
import io.sc.platform.orm.service.DaoService; |
||||
|
|
||||
|
public interface FactorTypeService extends DaoService<FactorTypeEntity, String, FactorTypeRepository>{ |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package io.sc.engine.st.service.impl; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.EconomicIndicatorEntity; |
||||
|
import io.sc.engine.st.jpa.repository.EconomicIndicatorRepository; |
||||
|
import io.sc.engine.st.service.EconomicIndicatorService; |
||||
|
import io.sc.platform.orm.service.impl.DaoServiceImpl; |
||||
|
import io.sc.platform.orm.service.support.QueryParameter; |
||||
|
import org.springframework.data.domain.Page; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service("io.sc.engine.st.service.impl.EconomicIndicatorServiceImpl") |
||||
|
public class EconomicIndicatorServiceImpl extends DaoServiceImpl<EconomicIndicatorEntity, String, EconomicIndicatorRepository> implements EconomicIndicatorService { |
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package io.sc.engine.st.service.impl; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.FactorEntity; |
||||
|
import io.sc.engine.st.jpa.repository.FactorRepository; |
||||
|
import io.sc.engine.st.service.FactorService; |
||||
|
import io.sc.platform.orm.service.impl.DaoServiceImpl; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service("io.sc.engine.st.service.impl.FactorServiceImpl") |
||||
|
public class FactorServiceImpl extends DaoServiceImpl<FactorEntity, String, FactorRepository> implements FactorService { |
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package io.sc.engine.st.service.impl; |
||||
|
|
||||
|
import io.sc.engine.st.jpa.entity.FactorTypeEntity; |
||||
|
import io.sc.engine.st.jpa.repository.FactorTypeRepository; |
||||
|
import io.sc.engine.st.service.FactorTypeService; |
||||
|
import io.sc.platform.orm.service.impl.DaoServiceImpl; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
@Service("io.sc.engine.st.service.impl.FactorTypeServiceImpl") |
||||
|
public class FactorTypeServiceImpl extends DaoServiceImpl<FactorTypeEntity, String, FactorTypeRepository> implements FactorTypeService { |
||||
|
|
||||
|
} |
@ -0,0 +1,106 @@ |
|||||
|
package io.sc.engine.st.vo; |
||||
|
|
||||
|
import io.sc.engine.st.enums.StatisticalPeriodType; |
||||
|
import io.sc.platform.orm.api.vo.CorporationAuditorVo; |
||||
|
|
||||
|
public class EconomicIndicatorVo extends CorporationAuditorVo { |
||||
|
protected String id; |
||||
|
protected StatisticalPeriodType periodType; |
||||
|
protected Integer year; |
||||
|
protected Integer month; |
||||
|
protected Integer quarter; |
||||
|
protected Double gdp; |
||||
|
protected Double m2; |
||||
|
protected Double cpi; |
||||
|
protected Double hpi; |
||||
|
protected Double pmi; |
||||
|
protected Double blr; |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public StatisticalPeriodType getPeriodType() { |
||||
|
return periodType; |
||||
|
} |
||||
|
|
||||
|
public void setPeriodType(StatisticalPeriodType periodType) { |
||||
|
this.periodType = periodType; |
||||
|
} |
||||
|
|
||||
|
public Integer getYear() { |
||||
|
return year; |
||||
|
} |
||||
|
|
||||
|
public void setYear(Integer year) { |
||||
|
this.year = year; |
||||
|
} |
||||
|
|
||||
|
public Integer getMonth() { |
||||
|
return month; |
||||
|
} |
||||
|
|
||||
|
public void setMonth(Integer month) { |
||||
|
this.month = month; |
||||
|
} |
||||
|
|
||||
|
public Integer getQuarter() { |
||||
|
return quarter; |
||||
|
} |
||||
|
|
||||
|
public void setQuarter(Integer quarter) { |
||||
|
this.quarter = quarter; |
||||
|
} |
||||
|
|
||||
|
public Double getGdp() { |
||||
|
return gdp; |
||||
|
} |
||||
|
|
||||
|
public void setGdp(Double gdp) { |
||||
|
this.gdp = gdp; |
||||
|
} |
||||
|
|
||||
|
public Double getM2() { |
||||
|
return m2; |
||||
|
} |
||||
|
|
||||
|
public void setM2(Double m2) { |
||||
|
this.m2 = m2; |
||||
|
} |
||||
|
|
||||
|
public Double getCpi() { |
||||
|
return cpi; |
||||
|
} |
||||
|
|
||||
|
public void setCpi(Double cpi) { |
||||
|
this.cpi = cpi; |
||||
|
} |
||||
|
|
||||
|
public Double getHpi() { |
||||
|
return hpi; |
||||
|
} |
||||
|
|
||||
|
public void setHpi(Double hpi) { |
||||
|
this.hpi = hpi; |
||||
|
} |
||||
|
|
||||
|
public Double getPmi() { |
||||
|
return pmi; |
||||
|
} |
||||
|
|
||||
|
public void setPmi(Double pmi) { |
||||
|
this.pmi = pmi; |
||||
|
} |
||||
|
|
||||
|
public Double getBlr() { |
||||
|
return blr; |
||||
|
} |
||||
|
|
||||
|
public void setBlr(Double blr) { |
||||
|
this.blr = blr; |
||||
|
} |
||||
|
} |
@ -0,0 +1,62 @@ |
|||||
|
package io.sc.engine.st.vo; |
||||
|
|
||||
|
import io.sc.engine.st.enums.PeriodType; |
||||
|
import io.sc.engine.st.enums.ValueType; |
||||
|
import io.sc.platform.orm.api.vo.CorporationAuditorVo; |
||||
|
|
||||
|
public class FactorTypeVo extends CorporationAuditorVo { |
||||
|
protected String id; |
||||
|
protected String code; |
||||
|
protected String name; |
||||
|
protected String description; |
||||
|
protected PeriodType periodType; |
||||
|
protected ValueType valueType; |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getDescription() { |
||||
|
return description; |
||||
|
} |
||||
|
|
||||
|
public void setDescription(String description) { |
||||
|
this.description = description; |
||||
|
} |
||||
|
|
||||
|
public PeriodType getPeriodType() { |
||||
|
return periodType; |
||||
|
} |
||||
|
|
||||
|
public void setPeriodType(PeriodType periodType) { |
||||
|
this.periodType = periodType; |
||||
|
} |
||||
|
|
||||
|
public ValueType getValueType() { |
||||
|
return valueType; |
||||
|
} |
||||
|
|
||||
|
public void setValueType(ValueType valueType) { |
||||
|
this.valueType = valueType; |
||||
|
} |
||||
|
} |
@ -0,0 +1,74 @@ |
|||||
|
package io.sc.engine.st.vo; |
||||
|
|
||||
|
import io.sc.engine.st.enums.PeriodType; |
||||
|
import io.sc.engine.st.enums.ValueType; |
||||
|
import io.sc.platform.orm.api.vo.CorporationAuditorVo; |
||||
|
|
||||
|
import javax.persistence.Column; |
||||
|
import javax.validation.constraints.Size; |
||||
|
|
||||
|
public class FactorVo extends CorporationAuditorVo { |
||||
|
protected String id; |
||||
|
protected Integer year; |
||||
|
protected Integer quarter; |
||||
|
protected Integer month; |
||||
|
protected Integer day; |
||||
|
protected String value; |
||||
|
protected String factorType; |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Integer getYear() { |
||||
|
return year; |
||||
|
} |
||||
|
|
||||
|
public void setYear(Integer year) { |
||||
|
this.year = year; |
||||
|
} |
||||
|
|
||||
|
public Integer getQuarter() { |
||||
|
return quarter; |
||||
|
} |
||||
|
|
||||
|
public void setQuarter(Integer quarter) { |
||||
|
this.quarter = quarter; |
||||
|
} |
||||
|
|
||||
|
public Integer getMonth() { |
||||
|
return month; |
||||
|
} |
||||
|
|
||||
|
public void setMonth(Integer month) { |
||||
|
this.month = month; |
||||
|
} |
||||
|
|
||||
|
public Integer getDay() { |
||||
|
return day; |
||||
|
} |
||||
|
|
||||
|
public void setDay(Integer day) { |
||||
|
this.day = day; |
||||
|
} |
||||
|
|
||||
|
public String getValue() { |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public void setValue(String value) { |
||||
|
this.value = value; |
||||
|
} |
||||
|
|
||||
|
public String getFactorType() { |
||||
|
return factorType; |
||||
|
} |
||||
|
|
||||
|
public void setFactorType(String factorType) { |
||||
|
this.factorType = factorType; |
||||
|
} |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
io.sc.engine.st.enums.PeriodType.YEAR=Year |
||||
|
io.sc.engine.st.enums.PeriodType.QUARTER=Quarter |
||||
|
io.sc.engine.st.enums.PeriodType.MONTH=Month |
||||
|
io.sc.engine.st.enums.PeriodType.DAY=Day |
||||
|
|
||||
|
io.sc.engine.st.enums.ValueType.NUMBER=Number |
||||
|
io.sc.engine.st.enums.ValueType.STRING=String |
||||
|
io.sc.engine.st.enums.ValueType.DATE=Date |
@ -0,0 +1,8 @@ |
|||||
|
io.sc.engine.st.enums.PeriodType.YEAR=\u5E74 |
||||
|
io.sc.engine.st.enums.PeriodType.QUARTER=\u5B63 |
||||
|
io.sc.engine.st.enums.PeriodType.MONTH=\u6708 |
||||
|
io.sc.engine.st.enums.PeriodType.DAY=\u65E5 |
||||
|
|
||||
|
io.sc.engine.st.enums.ValueType.NUMBER=\u6578\u5B57 |
||||
|
io.sc.engine.st.enums.ValueType.STRING=\u5B57\u7B26\u4E32 |
||||
|
io.sc.engine.st.enums.ValueType.DATE=\u65E5\u671F |
@ -0,0 +1,8 @@ |
|||||
|
io.sc.engine.st.enums.PeriodType.YEAR=\u5E74 |
||||
|
io.sc.engine.st.enums.PeriodType.QUARTER=\u5B63 |
||||
|
io.sc.engine.st.enums.PeriodType.MONTH=\u6708 |
||||
|
io.sc.engine.st.enums.PeriodType.DAY=\u65E5 |
||||
|
|
||||
|
io.sc.engine.st.enums.ValueType.NUMBER=\u6570\u5B57 |
||||
|
io.sc.engine.st.enums.ValueType.STRING=\u5B57\u7B26\u4E32 |
||||
|
io.sc.engine.st.enums.ValueType.DATE=\u65E5\u671F |
Loading…
Reference in new issue