Compare commits
6 Commits
f666110a1a
...
bc96d2ae45
Author | SHA1 | Date | |
---|---|---|---|
bc96d2ae45 | |||
4fd2eac344 | |||
c40352e37c | |||
6583d68ea7 | |||
5859c5d681 | |||
d6dd66c4b3 |
@ -158,7 +158,7 @@ export default {
|
|||||||
}, 500);
|
}, 500);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {},
|
created() { },
|
||||||
async mounted() {
|
async mounted() {
|
||||||
// console.log(this.dataPath);
|
// console.log(this.dataPath);
|
||||||
if (this.gridName) {
|
if (this.gridName) {
|
||||||
@ -166,9 +166,9 @@ export default {
|
|||||||
|
|
||||||
this.scrollBody = document
|
this.scrollBody = document
|
||||||
.getElementsByClassName('tui-grid-rside-area')
|
.getElementsByClassName('tui-grid-rside-area')
|
||||||
[
|
[
|
||||||
document.getElementsByClassName('tui-grid-rside-area').length - 1
|
document.getElementsByClassName('tui-grid-rside-area').length - 1
|
||||||
].getElementsByClassName('tui-grid-body-area')[0];
|
].getElementsByClassName('tui-grid-body-area')[0];
|
||||||
|
|
||||||
this.scrollBody.addEventListener('scroll', e => {
|
this.scrollBody.addEventListener('scroll', e => {
|
||||||
this.gridScrollTop = e.target.scrollTop;
|
this.gridScrollTop = e.target.scrollTop;
|
||||||
@ -606,18 +606,20 @@ export default {
|
|||||||
list.map(item => this.gridInstance.invoke('check', item));
|
list.map(item => this.gridInstance.invoke('check', item));
|
||||||
},
|
},
|
||||||
refreshLayout() {
|
refreshLayout() {
|
||||||
// console.log("---------DEBUG---refreshLayout: ");
|
setTimeout(() => {
|
||||||
this.gridInstance.invoke('refreshLayout');
|
this.gridInstance.invoke('refreshLayout');
|
||||||
|
}, 150);
|
||||||
|
// this.gridInstance.invoke('refreshLayout');
|
||||||
},
|
},
|
||||||
refreshGrid(){
|
refreshGrid() {
|
||||||
// console.log("refreshLayout",this.$refs['tuigrid' + this.gridName])
|
// console.log("refreshLayout",this.$refs['tuigrid' + this.gridName])
|
||||||
var store = this.$refs['tuigrid' + this.gridName].gridInstance.store;
|
var store = this.$refs['tuigrid' + this.gridName].gridInstance.store;
|
||||||
var containerEl = this.$refs['tuigrid' + this.gridName].$el;
|
var containerEl = this.$refs['tuigrid' + this.gridName].$el;
|
||||||
// var containerEl = document.querySelector('.tui-grid-container')
|
// var containerEl = document.querySelector('.tui-grid-container')
|
||||||
var parentEl = containerEl.parentElement;
|
var parentEl = containerEl.parentElement;
|
||||||
|
|
||||||
// console.log("---------DEBUG---containerEl: ",containerEl);
|
// console.log("---------DEBUG---containerEl: ",containerEl);
|
||||||
// console.log('---------DEBUG---parentEl: ', parentEl)
|
// console.log('---------DEBUG---parentEl: ', parentEl)
|
||||||
// function refreshLayout(store, containerEl, parentEl) {
|
// function refreshLayout(store, containerEl, parentEl) {
|
||||||
var dimension = store.dimension;
|
var dimension = store.dimension;
|
||||||
var autoWidth = dimension.autoWidth, fitToParentHeight = dimension.fitToParentHeight;
|
var autoWidth = dimension.autoWidth, fitToParentHeight = dimension.fitToParentHeight;
|
||||||
@ -636,35 +638,35 @@ export default {
|
|||||||
// console.log("parentEl.clientHeight" , parentEl.clientHeight)
|
// console.log("parentEl.clientHeight" , parentEl.clientHeight)
|
||||||
// console.log("clientHeight : ",clientHeight);
|
// console.log("clientHeight : ",clientHeight);
|
||||||
if (parentEl && parentEl.clientHeight !== clientHeight) {
|
if (parentEl && parentEl.clientHeight !== clientHeight) {
|
||||||
var _b = getComputedStyle(parentEl), paddingTop = _b.paddingTop, paddingBottom = _b.paddingBottom;
|
var _b = getComputedStyle(parentEl), paddingTop = _b.paddingTop, paddingBottom = _b.paddingBottom;
|
||||||
this.setHeight(store, parentEl.clientHeight - (parseFloat(paddingTop) + parseFloat(paddingBottom)));
|
this.setHeight(store, parentEl.clientHeight - (parseFloat(paddingTop) + parseFloat(paddingBottom)));
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
setOffsetTop(store, offsetTop) {
|
setOffsetTop(store, offsetTop) {
|
||||||
// console.log("---------DEBUG---setOffsetTop: ");
|
// console.log("---------DEBUG---setOffsetTop: ");
|
||||||
store.dimension.offsetTop = offsetTop;
|
store.dimension.offsetTop = offsetTop;
|
||||||
},
|
},
|
||||||
setWidth(_a, width, autoWidth) {
|
setWidth(_a, width, autoWidth) {
|
||||||
// console.log("---------DEBUG---setWidth: ");
|
// console.log("---------DEBUG---setWidth: ");
|
||||||
var dimension = _a.dimension;
|
var dimension = _a.dimension;
|
||||||
dimension.autoWidth = autoWidth;
|
dimension.autoWidth = autoWidth;
|
||||||
dimension.width = width;
|
dimension.width = width;
|
||||||
},
|
},
|
||||||
setHeaderHeight(store, height) {
|
setHeaderHeight(store, height) {
|
||||||
// console.log("---------DEBUG---setHeaderHeight: ");
|
// console.log("---------DEBUG---setHeaderHeight: ");
|
||||||
store.dimension.headerHeight = height;
|
store.dimension.headerHeight = height;
|
||||||
},
|
},
|
||||||
setOffsetLeft(store, offsetLeft) {
|
setOffsetLeft(store, offsetLeft) {
|
||||||
// console.log("---------DEBUG---setOffsetLeft: ");
|
// console.log("---------DEBUG---setOffsetLeft: ");
|
||||||
store.dimension.offsetLeft = offsetLeft;
|
store.dimension.offsetLeft = offsetLeft;
|
||||||
},
|
},
|
||||||
setHeight(_a,height){
|
setHeight(_a, height) {
|
||||||
// console.log("---------DEBUG---setHeight: ");
|
// console.log("---------DEBUG---setHeight: ");
|
||||||
var dimension = _a.dimension;
|
var dimension = _a.dimension;
|
||||||
var headerHeight = dimension.headerHeight, summaryHeight = dimension.summaryHeight, tableBorderWidth = dimension.tableBorderWidth;
|
var headerHeight = dimension.headerHeight, summaryHeight = dimension.summaryHeight, tableBorderWidth = dimension.tableBorderWidth;
|
||||||
dimension.bodyHeight = height - headerHeight - summaryHeight - tableBorderWidth;
|
dimension.bodyHeight = height - headerHeight - summaryHeight - tableBorderWidth;
|
||||||
},
|
},
|
||||||
sendSelectedRowData(eventRowKey) {
|
sendSelectedRowData(eventRowKey) {
|
||||||
if (this.selectedRowDataWatchFlag) {
|
if (this.selectedRowDataWatchFlag) {
|
||||||
var rowKey =
|
var rowKey =
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<div class="d-flex justify-center align-center"
|
<div class="d-flex justify-center align-center"
|
||||||
:class="directionBtn === 'vertically'?'flex-row':'flex-column'"
|
:class="directionBtn === 'vertically'?'flex-row':'flex-column'"
|
||||||
style="gap: 12px">
|
style="gap: 12px">
|
||||||
<a-button @click="btnActionsFnc('removeRightToLeft')" type="primary" ghost :icon="icons.remove" class="custom-action-btn">
|
<a-button @click="directionBtn === 'vertically' ? btnActionsFnc('removeRightToLeft') : btnActionsFnc('addLeftToRight')" type="primary" ghost :icon="directionBtn === 'vertically'? icons.remove :icons.add " class="custom-action-btn">
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button @click="btnActionsFnc('addLeftToRight')" type="primary" ghost :icon="icons.add" class="custom-action-btn">
|
<a-button @click="directionBtn === 'vertically' ? btnActionsFnc('removeRightToLeft') :btnActionsFnc('removeRightToLeft')" type="primary" ghost :icon="directionBtn === 'vertically'? icons.add :icons.remove" class="custom-action-btn">
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
46
components/common/chartoptions/SankeyChart.js
Normal file
46
components/common/chartoptions/SankeyChart.js
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
// Sankey chart options
|
||||||
|
export function getSankeyChartOption({ isDarkMode = false, data = [], links = [] }) {
|
||||||
|
const chartOption = {
|
||||||
|
backgroundColor: '#FFFFFF',
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data,
|
||||||
|
links,
|
||||||
|
|
||||||
|
layoutIterations: 0,
|
||||||
|
type: 'sankey',
|
||||||
|
left: 25.0,
|
||||||
|
top: 20.0,
|
||||||
|
right: 120,
|
||||||
|
bottom: 50.0,
|
||||||
|
nodeGap: 10,
|
||||||
|
nodeAlign: 'left',
|
||||||
|
lineStyle: {
|
||||||
|
color: 'source',
|
||||||
|
curveness: 0.5,
|
||||||
|
},
|
||||||
|
// nodeWidth:10,
|
||||||
|
// triggerEvent: true,
|
||||||
|
itemStyle: {
|
||||||
|
//color: '#1f77b4',
|
||||||
|
//borderColor: '#1f77b4'
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
color: isDarkMode
|
||||||
|
? '#FFFFFFD9'
|
||||||
|
: '#000000E0',
|
||||||
|
// fontFamily: 'Arial',
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return chartOption;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default getSankeyChartOption;
|
||||||
|
|
@ -404,8 +404,8 @@ export default {
|
|||||||
rowHeight: 'auto',
|
rowHeight: 'auto',
|
||||||
};
|
};
|
||||||
if (this.isMulti) {
|
if (this.isMulti) {
|
||||||
// myOptions['rowHeaders'] = [{ type: 'checkbox' }];
|
myOptions['rowHeaders'] = [{ type: 'checkbox' }];
|
||||||
// myOptions['rowHeight'] = 'auto';
|
myOptions['rowHeight'] = 'auto';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -523,12 +523,11 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
this.loadGrid = true;
|
this.loadGrid = true;
|
||||||
// this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// if (this.isMulti) {
|
if (this.isMulti) {
|
||||||
// this.getChecked();
|
this.getChecked();
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
setUpdate() {
|
setUpdate() {
|
||||||
if (this.isMulti) {
|
if (this.isMulti) {
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<v-col :cols="12" class="mt-5 pb-4">
|
<v-col :cols="12" class="mt-5 pb-4">
|
||||||
<v-card-title class="custom-title-6 pa-0">{{ viewActionData.title }}</v-card-title>
|
<v-card-title class="custom-title-6 pa-0">{{ viewActionData.title }}</v-card-title>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col :cols="12" style="min-height: 30vh;" class="pa-0 custom-view">
|
<v-col :cols="12" style="min-height: 50vh;" class="pa-0 custom-view">
|
||||||
<v-card class="pa-3" style="overflow-y:auto;">
|
<v-card class="pa-3" style="overflow-y:auto;">
|
||||||
<viewer v-if="viewActionData.viewerFlag" ref="tuiViewer" height="inherit"
|
<viewer v-if="viewActionData.viewerFlag" ref="tuiViewer" height="inherit"
|
||||||
:initialValue="viewActionData.content" theme="white"
|
:initialValue="viewActionData.content" theme="white"
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
<!-- 대상일 -->
|
<!-- 대상일 -->
|
||||||
<component :is="'Datepicker'" :parentPrgmId="myPrgmId" :label="'대상일'" :labelCols="3" customClass="datepicker-large" />
|
<component :is="'Datepicker'" :parentPrgmId="myPrgmId" :label="'대상일'" :labelCols="3" customClass="datepicker-large" />
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col :cols="4" class="text-right">
|
<v-col :cols="6" class="text-right">
|
||||||
<BtnSearch @click="search" size="large" />
|
|
||||||
<!-- 조회버튼 -->
|
<!-- 조회버튼 -->
|
||||||
|
<BtnSearch @click="search" size="large" />
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card>
|
</v-card>
|
||||||
@ -47,8 +47,13 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
<div class="px-5" style="height: 80%">
|
<div class="px-5" style="height: 80%">
|
||||||
<div ref="chartParent" class="w100 h100">
|
<div ref="chartParent" class="w100 h100">
|
||||||
<component :ref="chartName" class="w100 h100" :is="loadChart ? 'Chart' : null" :parentPrgmId="myPrgmId"
|
<component
|
||||||
:chartName="chartName" />
|
:ref="chartName"
|
||||||
|
class="w100 h100"
|
||||||
|
:is="loadChart ? 'Chart' : null"
|
||||||
|
:parentPrgmId="myPrgmId"
|
||||||
|
:chartName="chartName"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</v-card>
|
</v-card>
|
||||||
@ -68,6 +73,8 @@ import SelectBox from '@/components/common/select/SelectBox';
|
|||||||
import DateUtility from '~/plugins/dateUtility';
|
import DateUtility from '~/plugins/dateUtility';
|
||||||
import Chart from '~/components/common/Chart';
|
import Chart from '~/components/common/Chart';
|
||||||
|
|
||||||
|
import getSankeyChartOption from "~/components/common/chartoptions/sankeyChart";
|
||||||
|
|
||||||
let myTitle;
|
let myTitle;
|
||||||
let myPrgmId;
|
let myPrgmId;
|
||||||
|
|
||||||
@ -101,6 +108,8 @@ export default {
|
|||||||
selectValue01: null,
|
selectValue01: null,
|
||||||
loadChart: false,
|
loadChart: false,
|
||||||
chartName: 'sankeyChart',
|
chartName: 'sankeyChart',
|
||||||
|
sankeyChartData: [],
|
||||||
|
sankeyChartLinks: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -148,6 +157,16 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isDarkMode(newVal) {
|
||||||
|
this.setChartOption({
|
||||||
|
chartKey: this.chartName,
|
||||||
|
value: getSankeyChartOption({
|
||||||
|
isDarkMode: newVal,
|
||||||
|
data: this.sankeyChartData,
|
||||||
|
links: this.sankeyChartLinks
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
async beforeCreate() {
|
async beforeCreate() {
|
||||||
myPrgmId = this.$route.query.prgmId;
|
myPrgmId = this.$route.query.prgmId;
|
||||||
@ -159,9 +178,6 @@ export default {
|
|||||||
},
|
},
|
||||||
async created() { },
|
async created() { },
|
||||||
async mounted() {
|
async mounted() {
|
||||||
// this.initTest();
|
|
||||||
// return;
|
|
||||||
|
|
||||||
this.init();
|
this.init();
|
||||||
// document.querySelector('.icon_arrow').style.width = document.querySelector('.iconArrowCols').clientWidth-20 + "px";
|
// document.querySelector('.icon_arrow').style.width = document.querySelector('.iconArrowCols').clientWidth-20 + "px";
|
||||||
},
|
},
|
||||||
@ -176,10 +192,8 @@ export default {
|
|||||||
...mapActions({
|
...mapActions({
|
||||||
getCodeList: 'modules/search/getCodeList',
|
getCodeList: 'modules/search/getCodeList',
|
||||||
}),
|
}),
|
||||||
initTest() {
|
initTestChart() {
|
||||||
|
const randomNumber = n => Math.floor(Math.random() * n) + 1;
|
||||||
const randomNumber = n => Math.floor(Math.random() * n) + 1;
|
|
||||||
|
|
||||||
const makeData = [
|
const makeData = [
|
||||||
{ name: 'A' },
|
{ name: 'A' },
|
||||||
{ name: 'B' },
|
{ name: 'B' },
|
||||||
@ -205,45 +219,13 @@ export default {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const chartOption = {
|
this.sankeyChartData = makeData;
|
||||||
backgroundColor: '#FFFFFF',
|
this.sankeyChartLinks = makeLinks;
|
||||||
series: [
|
const chartOption = getSankeyChartOption({
|
||||||
{
|
isDarkMode: this.isDarkMode,
|
||||||
layoutIterations: 0,
|
data: makeData,
|
||||||
type: 'sankey',
|
links: makeLinks
|
||||||
left: 25.0,
|
});
|
||||||
top: 20.0,
|
|
||||||
right: 120,
|
|
||||||
bottom: 50.0,
|
|
||||||
// nodeWidth:10,
|
|
||||||
nodeGap: 10,
|
|
||||||
nodeAlign: 'left',
|
|
||||||
data: makeData,
|
|
||||||
links: makeLinks,
|
|
||||||
lineStyle: {
|
|
||||||
color: 'source',
|
|
||||||
curveness: 0.5,
|
|
||||||
},
|
|
||||||
// triggerEvent: true,
|
|
||||||
itemStyle: {
|
|
||||||
//color: '#1f77b4',
|
|
||||||
//borderColor: '#1f77b4'
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
color: this.isDarkMode
|
|
||||||
? 'rgba(250,250,250,0.7)'
|
|
||||||
: 'rgba(0,0,0,0.7)',
|
|
||||||
fontFamily: 'Arial',
|
|
||||||
fontSize: 12,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
this.setChartOption({ chartKey: this.chartName, value: chartOption });
|
this.setChartOption({ chartKey: this.chartName, value: chartOption });
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.loadChart = true;
|
this.loadChart = true;
|
||||||
@ -254,7 +236,11 @@ export default {
|
|||||||
this.setFromDt();
|
this.setFromDt();
|
||||||
},
|
},
|
||||||
async search() {
|
async search() {
|
||||||
await this.getChartData();
|
try{
|
||||||
|
await this.getChartData();
|
||||||
|
}catch(err){
|
||||||
|
this.initTestChart();
|
||||||
|
}
|
||||||
this.setPageData({
|
this.setPageData({
|
||||||
isFind: false,
|
isFind: false,
|
||||||
});
|
});
|
||||||
@ -458,43 +444,13 @@ export default {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const chartOption = {
|
this.sankeyChartData = makeData;
|
||||||
backgroundColor: '#FFFFFF',
|
this.sankeyChartLinks = makeLinks;
|
||||||
series: [
|
const chartOption = getSankeyChartOption({
|
||||||
{
|
isDarkMode: this.isDarkMode,
|
||||||
layoutIterations: 0,
|
data: makeData,
|
||||||
type: 'sankey',
|
links: makeLinks
|
||||||
left: 25.0,
|
});
|
||||||
top: 20.0,
|
|
||||||
right: 120,
|
|
||||||
bottom: 50.0,
|
|
||||||
// nodeWidth:10,
|
|
||||||
nodeGap: 10,
|
|
||||||
nodeAlign: 'left',
|
|
||||||
data: makeData,
|
|
||||||
links: makeLinks,
|
|
||||||
lineStyle: {
|
|
||||||
color: 'source',
|
|
||||||
curveness: 0.5,
|
|
||||||
},
|
|
||||||
// triggerEvent: true,
|
|
||||||
itemStyle: {
|
|
||||||
//color: '#1f77b4',
|
|
||||||
//borderColor: '#1f77b4'
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
color: this.isDarkMode
|
|
||||||
? 'rgba(250,250,250,0.7)'
|
|
||||||
: 'rgba(0,0,0,0.7)',
|
|
||||||
fontFamily: 'Arial',
|
|
||||||
fontSize: 12,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
this.setChartOption({ chartKey: this.chartName, value: chartOption });
|
this.setChartOption({ chartKey: this.chartName, value: chartOption });
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user