ItdmRunFlowPathList.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <a-card :bordered='false'>
  3. <!-- 查询区域 -->
  4. <div class='table-page-search-wrapper'>
  5. <a-form layout='inline' @keyup.enter.native='searchQuery'>
  6. <a-row :gutter='24'>
  7. <a-col :xl='6' :lg='7' :md='8' :sm='24'>
  8. <a-form-item label='名称'>
  9. <a-input placeholder='请输入名称' v-model='queryParam.name'></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl='6' :lg='7' :md='8' :sm='24'>
  13. <a-form-item label='发起人'>
  14. <j-select-user-by-dep placeholder='请选择发起人' v-model='queryParam.faqiUser' />
  15. </a-form-item>
  16. </a-col>
  17. <a-col :xl='6' :lg='7' :md='8' :sm='24'>
  18. <span style='float: left;overflow: hidden;' class='table-page-search-submitButtons'>
  19. <a-button type='primary' @click='searchQuery' icon='search'>查询</a-button>
  20. <a-button type='primary' @click='searchReset' icon='reload' style='margin-left: 8px'>重置</a-button>
  21. </span>
  22. </a-col>
  23. </a-row>
  24. </a-form>
  25. </div>
  26. <!-- 查询区域-END -->
  27. <!-- 操作按钮区域 -->
  28. <div class='table-operator'>
  29. <a-button @click='handleAdd' type='primary' icon='plus'>新增</a-button>
  30. <a-button type='primary' icon='download' @click="handleExportXls('运行流程表')">导出</a-button>
  31. <a-upload name='file' :showUploadList='false' :multiple='false' :headers='tokenHeader' :action='importExcelUrl'
  32. @change='handleImportExcel'>
  33. <a-button type='primary' icon='import'>导入</a-button>
  34. </a-upload>
  35. <!-- 高级查询区域 -->
  36. <j-super-query :fieldList='superFieldList' ref='superQueryModal'
  37. @handleSuperQuery='handleSuperQuery'></j-super-query>
  38. <a-dropdown v-if='selectedRowKeys.length > 0'>
  39. <a-menu slot='overlay'>
  40. <a-menu-item key='1' @click='batchDel'>
  41. <a-icon type='delete' />
  42. 删除
  43. </a-menu-item>
  44. </a-menu>
  45. <a-button style='margin-left: 8px'> 批量操作
  46. <a-icon type='down' />
  47. </a-button>
  48. </a-dropdown>
  49. </div>
  50. <!-- table区域-begin -->
  51. <div>
  52. <div class='ant-alert ant-alert-info' style='margin-bottom: 16px;'>
  53. <i class='anticon anticon-info-circle ant-alert-icon'></i> 已选择 <a
  54. style='font-weight: 600'>{{ selectedRowKeys.length }}</a>项
  55. <a style='margin-left: 24px' @click='onClearSelected'>清空</a>
  56. </div>
  57. <a-table
  58. ref='table'
  59. size='middle'
  60. :scroll='{x:true}'
  61. bordered
  62. rowKey='id'
  63. :columns='columns'
  64. :dataSource='dataSource'
  65. :pagination='ipagination'
  66. :loading='loading'
  67. :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
  68. class='j-table-force-nowrap'
  69. @change='handleTableChange'>
  70. <template slot='htmlSlot' slot-scope='text'>
  71. <div v-html='text'></div>
  72. </template>
  73. <template slot='imgSlot' slot-scope='text,record'>
  74. <span v-if='!text' style='font-size: 12px;font-style: italic;'>无图片</span>
  75. <img v-else :src='getImgView(text)' :preview='record.id' height='25px' alt=''
  76. style='max-width:80px;font-size: 12px;font-style: italic;' />
  77. </template>
  78. <template slot='fileSlot' slot-scope='text'>
  79. <span v-if='!text' style='font-size: 12px;font-style: italic;'>无文件</span>
  80. <a-button
  81. v-else
  82. :ghost='true'
  83. type='primary'
  84. icon='download'
  85. size='small'
  86. @click='downloadFile(text)'>
  87. 下载
  88. </a-button>
  89. </template>
  90. <span slot='action' slot-scope='text, record'>
  91. <a @click='tongguo(record)'>通过</a>
  92. <a-divider type='vertical' />
  93. <a @click='bohui(record)'>驳回</a>
  94. <a-divider type='vertical' />
  95. <a @click='bohui1(record)'>驳回指定节点</a>
  96. <a-divider type='vertical' />
  97. <a @click='handleEdit(record)'>编辑</a>
  98. <a-divider type='vertical' />
  99. <a-dropdown>
  100. <a class='ant-dropdown-link'>更多 <a-icon type='down' /></a>
  101. <a-menu slot='overlay'>
  102. <a-menu-item>
  103. <a @click='handleDetail(record)'>详情</a>
  104. </a-menu-item>
  105. <a-menu-item>
  106. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  107. <a>删除</a>
  108. </a-popconfirm>
  109. </a-menu-item>
  110. </a-menu>
  111. </a-dropdown>
  112. </span>
  113. </a-table>
  114. </div>
  115. <itdm-run-flow-path-modal ref='modalForm' @ok='modalFormOk'></itdm-run-flow-path-modal>
  116. <itdm-run-flow-path-shenhel ref='bohuiForm' @ok='modalFormOk'></itdm-run-flow-path-shenhel>
  117. <itdm-run-flow-path-shenhel1 ref='bohuiForm1' @ok='modalFormOk'></itdm-run-flow-path-shenhel1>
  118. </a-card>
  119. </template>
  120. <script>
  121. import '@/assets/less/TableExpand.less'
  122. import { mixinDevice } from '@/utils/mixin'
  123. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  124. import ItdmRunFlowPathModal from './modules/ItdmRunFlowPathModal'
  125. import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
  126. import { queryFlowPathSelectList, runFlowPathPass1 } from '@api/api'
  127. import { Modal } from 'ant-design-vue'
  128. import ItdmRunFlowPathShenhel from './modules/ItdmRunFlowPathShenhel.vue'
  129. import ItdmRunFlowPathShenhel1 from './modules/ItdmRunFlowPathShenhel1.vue'
  130. export default {
  131. name: 'ItdmRunFlowPathList',
  132. mixins: [JeecgListMixin, mixinDevice],
  133. components: {
  134. ItdmRunFlowPathModal,ItdmRunFlowPathShenhel,ItdmRunFlowPathShenhel1
  135. },
  136. data() {
  137. return {
  138. description: '运行流程表管理页面',
  139. // 表头
  140. columns: [
  141. {
  142. title: '#',
  143. dataIndex: '',
  144. key: 'rowIndex',
  145. width: 60,
  146. align: 'center',
  147. customRender: function(t, r, index) {
  148. return parseInt(index) + 1
  149. }
  150. },
  151. {
  152. title: '流程id',
  153. align: 'center',
  154. dataIndex: 'flowPathId_dictText'
  155. },
  156. {
  157. title: '名称',
  158. align: 'center',
  159. dataIndex: 'name'
  160. },
  161. {
  162. title: '发起人',
  163. align: 'center',
  164. dataIndex: 'faqiUser_dictText'
  165. },
  166. {
  167. title: '委托编号',
  168. align: 'center',
  169. dataIndex: 'weituoNo'
  170. },
  171. {
  172. title: '当前步骤id',
  173. align: 'center',
  174. dataIndex: 'dqSetp_dictText'
  175. },
  176. {
  177. title: '状态',
  178. align: 'center',
  179. dataIndex: 'status'
  180. },
  181. {
  182. title: '操作',
  183. dataIndex: 'action',
  184. align: 'center',
  185. fixed: 'right',
  186. width: 147,
  187. scopedSlots: { customRender: 'action' }
  188. }
  189. ],
  190. url: {
  191. list: '/flowpath/itdmRunFlowPath/list',
  192. delete: '/flowpath/itdmRunFlowPath/delete',
  193. deleteBatch: '/flowpath/itdmRunFlowPath/deleteBatch',
  194. exportXlsUrl: '/flowpath/itdmRunFlowPath/exportXls',
  195. importExcelUrl: 'flowpath/itdmRunFlowPath/importExcel'
  196. },
  197. dictOptions: {},
  198. superFieldList: []
  199. }
  200. },
  201. created() {
  202. this.getSuperFieldList()
  203. },
  204. computed: {
  205. importExcelUrl: function() {
  206. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  207. }
  208. },
  209. methods: {
  210. tongguo: function(record) {
  211. Modal.confirm({
  212. title: '是否通过',
  213. content: '是否通过',
  214. onOk() {
  215. var data = { 'runFlowPath': record.id }
  216. runFlowPathPass1(data).then(response => {
  217. this.searchQuery();
  218. })
  219. },
  220. onCancel() {},
  221. });
  222. },
  223. bohui: function(record) {
  224. console.log('123123')
  225. this.$refs.bohuiForm.bohui(record);
  226. },
  227. bohui1: function(record) {
  228. console.log('123123')
  229. this.$refs.bohuiForm1.bohui(record);
  230. },
  231. initDictConfig() {
  232. },
  233. getSuperFieldList() {
  234. let fieldList = []
  235. fieldList.push({ type: 'string', value: 'flowPathId', text: '流程id', dictCode: '' })
  236. fieldList.push({ type: 'string', value: 'name', text: '名称', dictCode: '' })
  237. fieldList.push({ type: 'sel_user', value: 'faqiUser', text: '发起人' })
  238. fieldList.push({ type: 'string', value: 'weituoNo', text: '委托编号', dictCode: '' })
  239. fieldList.push({ type: 'string', value: 'dqSetp', text: '当前步骤id', dictCode: 'xxx,xxx,xxx' })
  240. fieldList.push({ type: 'string', value: 'status', text: '状态', dictCode: '' })
  241. this.superFieldList = fieldList
  242. }
  243. }
  244. }
  245. </script>
  246. <style scoped>
  247. @import '~@assets/less/common.less';
  248. </style>