index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div>
  3. <avue-crud :option="option"
  4. :table-loading="loading"
  5. :data="data"
  6. ref="crud"
  7. @refresh-change="refreshChange"
  8. :page.sync="page"
  9. @on-load="onLoad">
  10. <template slot-scope="scope" slot="menu">
  11. <el-button type="text"
  12. size="small"
  13. plain
  14. class="none-border"
  15. @click.stop="handleStart(scope.row)">发起
  16. </el-button>
  17. <el-button type="text"
  18. size="small"
  19. plain
  20. class="none-border"
  21. @click.stop="handleImage(scope.row,scope.index)">流程图
  22. </el-button>
  23. </template>
  24. </avue-crud>
  25. <div style="margin-left: 90%">
  26. <span slot="footer" class="dialog-footer" >
  27. <el-button type="primary" @click="closeFun()">关 闭</el-button>
  28. </span>
  29. </div>
  30. <el-dialog
  31. title="请核"
  32. :visible.sync="dialogPleaseCheck"
  33. width="600px"
  34. append-to-body
  35. :close-on-click-modal="false"
  36. destroy-on-close
  37. >
  38. <examine-start
  39. :processDefinitionId="processDefinitionId"
  40. :itemId = "itemId"
  41. @dialogClose="dialogPleaseCheckClose"
  42. ></examine-start>
  43. </el-dialog>
  44. <el-dialog title="流程图"
  45. append-to-body
  46. :visible.sync="flowBox"
  47. :fullscreen="true">
  48. <iframe
  49. :src=flowUrl
  50. width="80%"
  51. height="700"
  52. title="流程图"
  53. frameBorder="no"
  54. border="0"
  55. marginWidth="0"
  56. marginHeight="0"
  57. scrolling="no"
  58. allowTransparency="yes">
  59. </iframe>
  60. <span slot="footer"
  61. class="dialog-footer">
  62. <el-button @click="flowBox = false">关 闭</el-button>
  63. </span>
  64. </el-dialog>
  65. </div>
  66. </template>
  67. <script>
  68. import option from './config/startDialog.json'
  69. import {startList} from "@/api/work/work";
  70. import examineStart from "@/components/examineApprove/start";
  71. export default {
  72. name: "index",
  73. props: {
  74. itemId: {
  75. type: String
  76. },
  77. closeFun: {
  78. type: Function
  79. }
  80. },
  81. components:{
  82. examineStart
  83. },
  84. data(){
  85. return {
  86. option:option,
  87. loading:false,
  88. data:[],
  89. page: {
  90. pageSize: 10,
  91. pagerCount: 5,
  92. total: 0,
  93. },
  94. dialogPleaseCheck:false,
  95. processDefinitionId:'',
  96. //流程图
  97. flowBox: false,
  98. flowUrl: '',
  99. itemId:'',
  100. }
  101. },
  102. created() {
  103. },
  104. methods:{
  105. refreshChange(){
  106. },
  107. onLoad(page, params = {}){
  108. params.mode = '1';
  109. this.loading = true;
  110. startList(page.currentPage, page.pageSize,params).then(res => {
  111. const data = res.data.data;
  112. this.page.total = data.total;
  113. this.data = data.records;
  114. })
  115. .finally(()=>{
  116. this.loading = false;
  117. })
  118. },
  119. handleStart(row){
  120. this.dialogPleaseCheck = true;
  121. this.processDefinitionId = row.id
  122. },
  123. handleImage(row) {
  124. this.flowUrl = `/api/blade-flow/process/resource-view?processDefinitionId=${row.id}`;
  125. this.flowBox = true;
  126. },
  127. dialogPleaseCheckClose() {
  128. this.dialogPleaseCheck = false;
  129. this.closeFun()
  130. }
  131. }
  132. }
  133. </script>
  134. <style scoped>
  135. </style>