-
-
-
-
+
+
@@ -171,8 +169,8 @@ export default {
created() { },
async mounted() {
// -------
- this.initTest();
- return;
+ // this.initTest();
+ // return;
// ========End test===========
await this.init();
this.initedFlag = true;
@@ -420,53 +418,25 @@ export default {
class CustumButton {
constructor(props) {
- // v-btn v-btn--is-elevated v-btn--has-bg theme--dark v-size--default
- const el = document.createElement('button');
const { grid, rowKey, columnInfo } = props;
- $(el).addClass('tui-grid-cell-content');
- // $(el).css('text-align', 'center');
- el.classList.add('v-btn');
- // el.style.width = '80%';
- // el.style.height = '80%';
- // el.style.boxShadow = '0px 0px 0px 2px #cbced6';
- // el.style.background = 'linear-gradient(to bottom, #242940 5%, #476e9e 100%)';
- // el.style.backgroundColor = '#144985';
- el.style.borderRadius = '7px';
- el.style.border = '1px solid #4e6096';
- // el.style.display = 'inline-block';
- // el.style.cursor = 'pointer';
- el.style.color = '#ffffff';
- // el.style.fontFamily = 'Arial';
- el.style.padding = '6% 3%';
+ const gridData = grid.store.data.rawData;
+ const value = gridData[rowKey][columnInfo.name];
- // el.style.textDecoration = 'none';
- // el.style.textShadow = '0px 1px 0px #283966';
-
- el.innerText = columnInfo.renderer.options.value;
- this.el = el;
this.disabled = columnInfo.renderer.options.disabled || false;
+ const elDiv = document.createElement('div');
+ elDiv.innerHTML = `
${value}`;
+ $(elDiv).addClass('tui-grid-cell-content d-flex justify-space-between');
+ const el2 = document.createElement('button');
+ $(el2).addClass('edit-btn blue--text');
+ el2.innerText = 'Edit';
+ elDiv.appendChild(el2);
+
+ this.el = elDiv;
if (!this.disabled) {
- // hover 기능 구현
- this.el.addEventListener('mouseover', function (event) {
- // console.log('darkModeFg', _this.darkModeFg);
- // console.log('event',event.fromElement);
- // console.log('event',document.defaultView.getComputedStyle(el).getPropertyValue('background-color'));
- // rgb(85, 130, 220) // light
- // el.style.backgroundColor = '#26578F'; // rgb(20, 73, 133) // dark
- // let btnColor = _this.darkModeFg? {mouseOver: '#26578F', mouseOut: '#144985'} : {mouseOver: 'rgb(85, 130, 220)', mouseOut: 'rgb(71, 119, 217)'};
- // el.style.backgroundColor = btnColor['mouseOver'];
- });
- this.el.addEventListener('mouseout', function (event) {
- // rgb(71, 119, 217) // light
- // el.style.backgroundColor = '#144985'; // dark
- // console.log('event',event.fromElement);
- // let btnColor = _this.darkModeFg? {mouseOver: '#26578F', mouseOut: '#144985'} : {mouseOver: 'rgb(85, 130, 220)', mouseOut: 'rgb(71, 119, 217)'};
- // el.style.backgroundColor = btnColor['mouseOut'];
- });
// click 이벤트
- this.el.addEventListener('click', function (event) {
+ el2.addEventListener('click', function (event) {
let gridData = grid.store.data.rawData;
let rowNum = gridData[rowKey].rowNum;
let selectedGridData = gridData.filter(item => {
@@ -537,18 +507,25 @@ export default {
minWidth: 200,
align: 'left',
// hidden: true,
- formatter: ({ value, row }) => {
- return `
-
${value}
-
- `;
- }
+ // formatter: ({ value, row }) => {
+ // return `
+ //
${value}
+ //
+ // `;
+ // }
+ renderer: {
+ type: CustumButton,
+ options: {
+ value: '계획수정',
+ },
+ },
},
{
header: '',
name: 'btnCol',
width: 70,
align: 'center',
+ hidden: true,
renderer: {
type: CustumButton,
options: {
diff --git a/plugins/eChart.js b/plugins/eChart.js
index 03a5cc5..7ebc410 100644
--- a/plugins/eChart.js
+++ b/plugins/eChart.js
@@ -52,5 +52,4 @@ use([
// ToolboxComponent, // 그래프 이미지 save
]);
-console.log('echart plugin', echarts)
Vue.component('VChart', VChart);
diff --git a/store/index.js b/store/index.js
index 3758a09..d88baf9 100644
--- a/store/index.js
+++ b/store/index.js
@@ -197,8 +197,8 @@ export const mutations = {
// 페이지 그리드 데이터 set
setGridData: (state, payload) => {
- console.log('check:', state.pageData)
- console.log('payload:', payload)
+ // console.log('check:', state.pageData)
+ // console.log('payload:', payload)
// state.pageData['PRG0001']['dashBoard_grid_01'] = {
// ...state.pageData['PRG0001']['dashBoard_grid_01'],
// data: payload.value,