34
34
<template v-for =" (field ,fieldNumber ) in fields [moduleName ] " >
35
35
<td v-if =" fieldNumber ==0" style =" padding :10px ;font-weight :bold ;border-right : 3px solid #cdd0d4 ;" >
36
36
{{selectedFlowObject.processList[titleCase(item.service)].name}}
37
+ <!-- {{item.service}}
38
+ <br>
39
+ <br>
40
+ {{selectedFlowObject.processList[titleCase(item.service)]}} -->
37
41
</td >
38
42
<td v-else >
39
43
<table class =" table-bordered" style =" width :100% " >
162
166
<script >
163
167
import flowz from ' @/api/flowz'
164
168
import _ from ' lodash'
165
- // import finstanceModal from '@/api/finstance'
169
+ import finstanceModal from ' @/api/finstance'
166
170
import axios from ' axios'
167
171
import viewSVG from ' ./viewSVG'
168
172
import psl from ' psl'
@@ -180,7 +184,7 @@ import moment from 'moment'
180
184
export default {
181
185
name: ' Flowz' ,
182
186
components: {
183
- viewSVG : (resolve ) => { require ([' ./viewSVG' ], resolve) },
187
+ ' viewSVG ' : (resolve ) => { require ([' ./viewSVG' ], resolve) },
184
188
expandRow2 : (resolve ) => { require ([' ./assigned_invite_table-expand.vue' ], resolve) },
185
189
subscription : (resolve ) => { require ([' @/components/subscription' ], resolve) }
186
190
},
@@ -244,32 +248,32 @@ export default {
244
248
align: ' center' ,
245
249
render : (h , params ) => {
246
250
return h (' div' , [
247
- // h('Button', {
248
- // props: {
249
- // type: 'text',
250
- // size: 'large',
251
- // icon: 'arrow-right-b'
252
- // },
253
- // domProps: {
254
- // title: 'Start Instance'
255
- // },
256
- // style: {
257
- // marginRight: '3px',
258
- // padding: '0px',
259
- // fontSize: '20px',
260
- // color: '#2411c5'
261
- // },
262
- // on: {
263
- // click: () => {
264
- // this.createNewInstance(params.row.id)
265
- // }
266
- // }
267
- // }, ''),
268
251
h (' Button' , {
269
252
props: {
270
253
type: ' text' ,
271
254
size: ' large' ,
272
- icon: ' key'
255
+ icon: ' arrow-right-b'
256
+ },
257
+ domProps: {
258
+ title: ' Start Instance'
259
+ },
260
+ style: {
261
+ marginRight: ' 3px' ,
262
+ padding: ' 0px' ,
263
+ fontSize: ' 20px' ,
264
+ color: ' #2411c5'
265
+ },
266
+ on: {
267
+ click : () => {
268
+ this .createNewInstance (params .row .id )
269
+ }
270
+ }
271
+ }, ' ' ),
272
+ h (' Button' , {
273
+ props: {
274
+ type: ' text' ,
275
+ size: ' large' ,
276
+ icon: ' settings'
273
277
},
274
278
domProps: {
275
279
title: ' Set Permission'
@@ -313,9 +317,6 @@ export default {
313
317
size: ' large' ,
314
318
icon: ' ios-personadd'
315
319
},
316
- domProps: {
317
- title: ' Invite User'
318
- },
319
320
style: {
320
321
marginRight: ' 3px' ,
321
322
padding: ' 0px' ,
@@ -333,9 +334,6 @@ export default {
333
334
type: ' text' ,
334
335
size: ' large'
335
336
},
336
- domProps: {
337
- title: ' Field Permissions'
338
- },
339
337
style: {
340
338
marginRight: ' 3px' ,
341
339
padding: ' 0px' ,
@@ -534,6 +532,32 @@ export default {
534
532
console .log (error)
535
533
})
536
534
}
535
+ },
536
+ ' flowz' : {
537
+ created (data ) {
538
+ // console.log(this.limit)
539
+ if (this .total < this .limit ) {
540
+ this .flowzList .push (data)
541
+ } else {
542
+ this .total = ((this .total ) + 1 )
543
+ }
544
+ },
545
+ updated (data ) {
546
+ if (this .flowzList < this .limit ) {
547
+ let inx = _ .findIndex (this .flowzList , (o ) => { return o .id === data .id })
548
+ this .flowzList .splice (inx, 1 )
549
+ this .flowzList .push (data)
550
+ }
551
+ },
552
+ removed (data ) {
553
+ // console.log('Removed Data: ', data)
554
+ if (this .$store .state .role === 1 ) {
555
+ // this.$store.state.flowz = []
556
+ // this.init()
557
+ let i = _ .findIndex (this .flowzList , (o ) => { return o .id === data .id })
558
+ this .flowzList .splice (i, 1 )
559
+ }
560
+ }
537
561
}
538
562
},
539
563
methods: {
@@ -709,7 +733,6 @@ export default {
709
733
this .init ()
710
734
},
711
735
init () {
712
- // var string = '?$skip=' + this.skip + '&$limit=' + this.limit
713
736
this .loading = true
714
737
flowz .get (null , {
715
738
$skip: this .skip ,
@@ -722,26 +745,26 @@ export default {
722
745
})
723
746
.catch (error => {
724
747
this .loading = false
725
- this .$Notice . error ({duration: ' 3' , title: error . message , desc: ' ' })
748
+ this .$Notice ({duration: ' 3' , title: ' Network Error ' , desc: ' ' })
726
749
console .log (error)
727
750
})
728
751
},
729
- // createNewInstance (item) {
730
- // this.$Loading.start()
731
- // let fheaders = null
732
- // finstanceModal.post({fid: item.id}, null, fheaders).then(res => {
733
- // this.$Notice.success({title: 'Instance Generated'})
734
- // this.$Loading.finish()
735
- // }).catch(e => {
736
- // this.$Loading.error()
737
- // console.log('error', e.response)
738
- // if (e.response.data.message) {
739
- // this.$Notice.error({title: 'Error', desc: e.response.data.message.toString()})
740
- // } else {
741
- // this.$Notice.error({title: 'Error', desc: 'Instace Not Generated'})
742
- // }
743
- // })
744
- // },
752
+ createNewInstance (item ) {
753
+ this .$Loading .start ()
754
+ let fheaders = null
755
+ finstanceModal .post ({fid: item .id }, null , fheaders).then (res => {
756
+ this .$Notice .success ({title: ' Instance Generated' })
757
+ this .$Loading .finish ()
758
+ }).catch (e => {
759
+ this .$Loading .error ()
760
+ console .log (' error' , e .response )
761
+ if (e .response .data .message ) {
762
+ this .$Notice .error ({title: ' Error' , desc: e .response .data .message .toString ()})
763
+ } else {
764
+ this .$Notice .error ({title: ' Error' , desc: ' Instace Not Generated' })
765
+ }
766
+ })
767
+ },
745
768
addNewFlow () {
746
769
this .$store .dispatch (' removeXMLtoLocalStorage' )
747
770
this .$router .push ({name: ' flow/new' })
0 commit comments