Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Commit 4234a37

Browse files
author
Faizan Saiyed
committed
Analytics all data view
1 parent 7a3c32c commit 4234a37

File tree

1 file changed

+144
-136
lines changed

1 file changed

+144
-136
lines changed

client/src/pages/flow/analytics.vue

Lines changed: 144 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default {
124124
tableData: [],
125125
isModel: false,
126126
anotherBinding: [],
127-
// colviewCols: [],
127+
colviewCols: [],
128128
colviewData: [],
129129
configCols: [
130130
{
@@ -551,7 +551,16 @@ export default {
551551
// }
552552
// console.log('tableGroupedArray: ', tableGroupedArray)
553553
this.tableData = tableDataArr
554-
this.colviewData = tableDataArr
554+
// this.colviewData = tableDataArr
555+
for (let inst in tableDataArr) {
556+
for (let items in tableDataArr[inst]) {
557+
if (items === 'states') {
558+
for (let item of tableDataArr[inst][items]) {
559+
this.colviewData.push(item)
560+
}
561+
}
562+
}
563+
}
555564
this.tableLoading = false
556565
}).catch(e => {
557566
this.tableLoading = false
@@ -622,118 +631,118 @@ export default {
622631
},
623632
async init () {
624633
this.tableLoading = true
625-
// this.colviewCols = [
626-
// {
627-
// title: 'ID',
628-
// key: '_uuid',
629-
// fixed: 'left',
630-
// width: 280
631-
// // render: (h, params) => {
632-
// // if (params.row.hasOwnProperty('first')) {
633-
// // if (params.row.first) {
634-
// // console.log('Id: ', params.row.id)
635-
// // return h('div', [
636-
// // h('span', {
637-
// // attrs: {
638-
// // title: 'Click to Copy',
639-
// // class: 'clickToCopy'
640-
// // },
641-
// // on: {
642-
// // click: () => {
643-
// // var $temp = $('<input>')
644-
// // $('body').append($temp)
645-
// // $temp.val(params.row.id).select()
646-
// // document.execCommand('copy')
647-
// // this.$Message.info('Copied to Clipboard')
648-
// // $temp.remove()
649-
// // }
650-
// // }
651-
// // }, params.row.id),
652-
// // h('span', {
653-
// // attrs: {
654-
// // class: 'btn btn-default btn-sm showHideBtn'
655-
// // },
656-
// // on: {
657-
// // click: () => {
658-
// // for (let [inx, item] of this.colviewData.entries()) {
659-
// // if (item.id === params.row.id && params.index !== inx) {
660-
// // if (!params.row.first) {
661-
// // item.className = ''
662-
// // } else {
663-
// // item.className = 'notfirst'
664-
// // }
665-
// // }
666-
// // if (params.index === inx) {
667-
// // item.first = !item.first
668-
// // }
669-
// // }
670-
// // }
671-
// // }
672-
// // }, [
673-
// // h('i', {
674-
// // attrs: {
675-
// // class: 'fa fa-angle-up'
676-
// // }
677-
// // })
678-
// // ])
679-
// // ])
680-
// // } else {
681-
// // console.log('Id: ', params.row.id)
682-
// // return h('div', [
683-
// // h('span', {
684-
// // attrs: {
685-
// // title: 'Click to Copy',
686-
// // class: 'clickToCopy'
687-
// // },
688-
// // on: {
689-
// // click: () => {
690-
// // var $temp = $('<input>')
691-
// // $('body').append($temp)
692-
// // $temp.val(params.row.id).select()
693-
// // document.execCommand('copy')
694-
// // this.$Message.info('Copied to Clipboard')
695-
// // $temp.remove()
696-
// // }
697-
// // }
698-
// // }, params.row.id),
699-
// // h('span', {
700-
// // attrs: {
701-
// // class: 'btn btn-sm showHideBtn'
702-
// // },
703-
// // on: {
704-
// // click: () => {
705-
// // for (let [inx, item] of this.colviewData.entries()) {
706-
// // if (item.id === params.row.id && params.index !== inx) {
707-
// // if (!params.row.first) {
708-
// // item.className = ''
709-
// // } else {
710-
// // item.className = 'notfirst'
711-
// // }
712-
// // }
713-
// // if (params.index === inx) {
714-
// // item.first = !item.first
715-
// // }
716-
// // }
717-
// // }
718-
// // }
719-
// // }, [
720-
// // h('i', {
721-
// // attrs: {
722-
// // class: 'fa fa-angle-down'
723-
// // }
724-
// // })
725-
// // ])
726-
// // ])
727-
// // }
728-
// // }
729-
// // }
730-
// },
731-
// {
732-
// title: 'Task',
733-
// key: '_state',
734-
// width: 150
735-
// }
736-
// ]
634+
this.colviewCols = [
635+
{
636+
title: 'ID',
637+
key: '_uuid',
638+
fixed: 'left',
639+
width: 280
640+
// render: (h, params) => {
641+
// if (params.row.hasOwnProperty('first')) {
642+
// if (params.row.first) {
643+
// console.log('Id: ', params.row.id)
644+
// return h('div', [
645+
// h('span', {
646+
// attrs: {
647+
// title: 'Click to Copy',
648+
// class: 'clickToCopy'
649+
// },
650+
// on: {
651+
// click: () => {
652+
// var $temp = $('<input>')
653+
// $('body').append($temp)
654+
// $temp.val(params.row.id).select()
655+
// document.execCommand('copy')
656+
// this.$Message.info('Copied to Clipboard')
657+
// $temp.remove()
658+
// }
659+
// }
660+
// }, params.row._uuid),
661+
// h('span', {
662+
// attrs: {
663+
// class: 'btn btn-default btn-sm showHideBtn'
664+
// },
665+
// on: {
666+
// click: () => {
667+
// for (let [inx, item] of this.colviewData.entries()) {
668+
// if (item.id === params.row.id && params.index !== inx) {
669+
// if (!params.row.first) {
670+
// item.className = ''
671+
// } else {
672+
// item.className = 'notfirst'
673+
// }
674+
// }
675+
// if (params.index === inx) {
676+
// item.first = !item.first
677+
// }
678+
// }
679+
// }
680+
// }
681+
// }, [
682+
// h('i', {
683+
// attrs: {
684+
// class: 'fa fa-angle-up'
685+
// }
686+
// })
687+
// ])
688+
// ])
689+
// } else {
690+
// console.log('Id: ', params.row.id)
691+
// return h('div', [
692+
// h('span', {
693+
// attrs: {
694+
// title: 'Click to Copy',
695+
// class: 'clickToCopy'
696+
// },
697+
// on: {
698+
// click: () => {
699+
// var $temp = $('<input>')
700+
// $('body').append($temp)
701+
// $temp.val(params.row.id).select()
702+
// document.execCommand('copy')
703+
// this.$Message.info('Copied to Clipboard')
704+
// $temp.remove()
705+
// }
706+
// }
707+
// }, params.row._uuid),
708+
// h('span', {
709+
// attrs: {
710+
// class: 'btn btn-sm showHideBtn'
711+
// },
712+
// on: {
713+
// click: () => {
714+
// for (let [inx, item] of this.colviewData.entries()) {
715+
// if (item.id === params.row.id && params.index !== inx) {
716+
// if (!params.row.first) {
717+
// item.className = ''
718+
// } else {
719+
// item.className = 'notfirst'
720+
// }
721+
// }
722+
// if (params.index === inx) {
723+
// item.first = !item.first
724+
// }
725+
// }
726+
// }
727+
// }
728+
// }, [
729+
// h('i', {
730+
// attrs: {
731+
// class: 'fa fa-angle-down'
732+
// }
733+
// })
734+
// ])
735+
// ])
736+
// }
737+
// }
738+
// }
739+
},
740+
{
741+
title: 'Task',
742+
key: '_state',
743+
width: 150
744+
}
745+
]
737746
this.colviewData = []
738747
this.fid = this.$route.params.id
739748
@@ -792,29 +801,28 @@ export default {
792801
computed: {
793802
configdata () {
794803
return this.configuration.fields
795-
},
796-
797-
colviewCols () {
798-
this.colviewCols = []
799-
800-
let cols = []
801-
cols.push({
802-
title: 'ID',
803-
key: '_uuid',
804-
fixed: 'left',
805-
width: 280
806-
})
807-
808-
cols.push({
809-
title: 'Task',
810-
key: '_state',
811-
width: 150
812-
})
813-
814-
this.colviewCols = cols
815-
816-
return this.colviewCols
817804
}
805+
// colviewCols () {
806+
// this.colviewCols = []
807+
808+
// let cols = []
809+
// cols.push({
810+
// title: 'ID',
811+
// key: '_uuid',
812+
// fixed: 'left',
813+
// width: 280
814+
// })
815+
816+
// cols.push({
817+
// title: 'Task',
818+
// key: '_state',
819+
// width: 150
820+
// })
821+
822+
// this.colviewCols = cols
823+
824+
// return this.colviewCols
825+
// }
818826
},
819827
mounted () {
820828
this.init()

0 commit comments

Comments
 (0)