applyList.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  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 :md="6" :sm="8">
  8. <a-form-item label="标题">
  9. <a-input placeholder="请输入搜索关键词" v-model="queryParam.title"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :md="6" :sm="8">
  13. <a-form-item label="状态">
  14. <a-select v-model="queryParam.status" placeholder="请选择" :allowClear="true" >
  15. <a-select-option value="0">草稿</a-select-option>
  16. <a-select-option value="1">处理中</a-select-option>
  17. <a-select-option value="2">已结束</a-select-option>
  18. <a-select-option value="3">已撤回</a-select-option>
  19. </a-select>
  20. </a-form-item>
  21. </a-col>
  22. <a-col :md="6" :sm="8">
  23. <a-form-item label="结果">
  24. <a-select v-model="queryParam.result" placeholder="请选择" :allowClear="true" >
  25. <a-select-option value="0">未提交</a-select-option>
  26. <a-select-option value="1">处理中</a-select-option>
  27. <a-select-option value="2">通过</a-select-option>
  28. <a-select-option value="3">驳回</a-select-option>
  29. </a-select>
  30. </a-form-item>
  31. </a-col>
  32. <a-col :md="6" :sm="10">
  33. <a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
  34. <a-range-picker
  35. style="width: 210px"
  36. v-model="queryParam.createTimeRange"
  37. format="YYYY-MM-DD"
  38. :placeholder="['开始时间', '结束时间']"
  39. @change="onDateChange"
  40. @ok="onDateOk"
  41. />
  42. </a-form-item>
  43. </a-col>
  44. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  45. <a-col :md="6" :sm="12" >
  46. <a-button type="primary" style="left: 10px" @click="searchQuery" icon="search">查询</a-button>
  47. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
  48. </a-col>
  49. </span>
  50. <span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
  51. <a-col :md="12" :sm="12" >
  52. <a-button type="primary" @click="addApply" :loading="addApplyLoading" style="left: 10px" icon="plus-circle">发起申请</a-button>
  53. </a-col>
  54. </span>
  55. </a-row>
  56. </a-form>
  57. </div>
  58. <!-- table区域-begin -->
  59. <a-table :scroll="scroll" bordered
  60. ref="table"
  61. size="middle"
  62. rowKey="id"
  63. :dataSource="dataSource"
  64. :pagination="ipagination"
  65. :loading="loading"
  66. @change="handleTableChange">
  67. <a-table-column title="#" :width="50">
  68. <template slot-scope="t,r,i" >
  69. <span> {{i+1}} </span>
  70. </template>
  71. </a-table-column>
  72. <a-table-column title="标题" dataIndex="title" :width="150" align="center">
  73. <template slot-scope="t,r,i">
  74. <span> {{t}} </span>
  75. </template>
  76. </a-table-column>
  77. <a-table-column title="所属流程" dataIndex="processName" :width="150" align="center">
  78. <template slot-scope="t,r,i">
  79. <span> {{t}} </span>
  80. </template>
  81. </a-table-column>
  82. <a-table-column title="当前审批环节" dataIndex="currTaskName" :width="150" align="center">
  83. <template slot-scope="t,r,i">
  84. <span> {{t}} </span>
  85. </template>
  86. </a-table-column>
  87. <a-table-column title="状态" dataIndex="status" :width="150" align="center"
  88. key="s" :sorter="(a,b)=>a.status - b.status"
  89. >
  90. <template slot-scope="t,r,i">
  91. <span :style="{color:getStatus(t).color}"> {{getStatus(t).text}} </span>
  92. </template>
  93. </a-table-column>
  94. <a-table-column title="结果" dataIndex="result" :width="150" align="center"
  95. key="result" :sorter="(a,b)=>a.result - b.result"
  96. >
  97. <template slot-scope="t,r,i">
  98. <span :style="{color:getResult(t).color}"> {{getResult(t).text}} </span>
  99. </template>
  100. </a-table-column>
  101. <a-table-column title="创建时间" dataIndex="createTime" :width="150" align="center">
  102. <template slot-scope="t,r,i">
  103. <span> {{t}} </span>
  104. </template>
  105. </a-table-column>
  106. <a-table-column title="提交申请时间" dataIndex="applyTime" :width="150" align="center">
  107. <template slot-scope="t,r,i">
  108. <span> {{t}} </span>
  109. </template>
  110. </a-table-column>
  111. <a-table-column title="操作" dataIndex="" align="center">
  112. <template slot-scope="t,r,i">
  113. <template v-if="r.status == 0">
  114. <a href="javascript:void(0);" style="color: #00A0E9" @click="apply(r)" >提交申请</a>
  115. <a-divider type="vertical" />
  116. <a href="javascript:void(0);" @click="edit(r)" style="color: #000000">编辑</a>
  117. <a-divider type="vertical" />
  118. <a-popconfirm title="确定删除吗?" @confirm="() => remove(r)">
  119. <a href="javascript:void(0);" style="color: red">删除</a>
  120. </a-popconfirm>
  121. </template>
  122. <template v-else-if="r.status == 1">
  123. <a href="javascript:void(0);" @click="cancel(r)" style="color:#8000ff;">撤回</a>
  124. <a-divider type="vertical" />
  125. <a href="javascript:void(0);" @click="history(r)" style="color:blue;">查看进度</a>
  126. <a-divider type="vertical" />
  127. <a href="javascript:void(0);" @click="detail(r)" style="color:#999;">表单数据</a>
  128. </template>
  129. <template v-else-if="(r.status == 2 && r.result == 3) || r.status == 3">
  130. <a-popconfirm title="确定提交申请吗?" @confirm="() => apply(r)">
  131. <a href="javascript:void(0);" style="color:#00A0E9;">重新申请</a>
  132. </a-popconfirm>
  133. <a-divider type="vertical" />
  134. <a href="javascript:void(0);" @click="edit(r)" style="color:#000000;">编辑</a>
  135. <a-divider type="vertical" />
  136. <a href="javascript:void(0);" @click="history(r)" style="color:blue;">审批历史</a>
  137. </template>
  138. <template v-else>
  139. <a href="javascript:void(0);" @click="detail(r)" style="color:#999;">表单数据</a>
  140. <a-divider type="vertical" />
  141. <a href="javascript:void(0);" @click="history(r)" style="color:blue;">审批历史</a>
  142. </template>
  143. </template>
  144. </a-table-column>
  145. </a-table>
  146. <!-- table区域-end -->
  147. <!--流程申请选择-->
  148. <a-drawer
  149. title="选择流程" width="33%"
  150. placement="right"
  151. :closable="false"
  152. @close="processModalVisible = false"
  153. :visible="processModalVisible"
  154. >
  155. <a-input-search style="margin-bottom: 10px;width: 200px"
  156. placeholder="输入流程名称" @search="onSearchProcess" />
  157. <a-empty description="无流程可供选择" v-if="activeKeyAll.length==0" />
  158. <div v-else>
  159. <a-collapse v-model="activeKey">
  160. <a-collapse-panel v-for="(value, index) in activeKeyAll" :header="filterDictText(dictOptions,value)||'未分类'" :key="value">
  161. <a-list :grid="{ gutter: 10,column:1}" :dataSource="processDataMap[value]">
  162. <a-list-item slot="renderItem" slot-scope="item">
  163. <a-card>
  164. <div slot="title">
  165. <a-row>
  166. <a-col span="12" :title="item.name">{{item.name}} </a-col>
  167. <a-col span="12" style="text-align: right;">
  168. <a href="javascript:void (0)" @click="chooseProcess(item)">发起申请</a>
  169. </a-col>
  170. </a-row>
  171. </div>
  172. <b>版本:</b>v.{{item.version}}
  173. <br/>
  174. <b>说明:</b>{{item.description}}
  175. </a-card>
  176. </a-list-item>
  177. </a-list>
  178. </a-collapse-panel>
  179. </a-collapse>
  180. </div>
  181. </a-drawer>
  182. <!--流程表单-->
  183. <a-modal :title="lcModa.title" v-model="lcModa.visible" :footer="null" :maskClosable="false" width="100%">
  184. <component :disabled="lcModa.disabled" v-if="lcModa.visible" :is="lcModa.formComponent"
  185. :processData="lcModa.processData" :isNew = "lcModa.isNew"
  186. @afterSubmit="afterSub" @close="lcModa.visible=false,lcModa.disabled = false"></component>
  187. </a-modal>
  188. <!-- <onl-cgform-auto-modal ref="modal" code="b0bea65bfce141deb0ae3fcb18982d76" /> -->
  189. <!--提交申请表单-->
  190. <a-modal title="提交申请" v-model="modalVisible" :mask-closable="false" :width="500" :footer="null">
  191. <div v-if="modalVisible">
  192. <a-form-item label="选择审批人" v-show="showAssign">
  193. <a-select style="width: 100%"
  194. v-model="form.assignees"
  195. placeholder="请选择"
  196. mode="multiple"
  197. :allowClear="true"
  198. >
  199. <a-select-option v-for="(item, i) in assigneeList" :key="i" :value="item.username">{{item.realname}}</a-select-option>
  200. </a-select>
  201. </a-form-item>
  202. <a-form-item label="下一审批人" v-show="isGateway">
  203. <a-alert type="info" showIcon message="分支网关处不支持自定义选择下一审批人,将自动下发给所有可审批人。">,将发送给下一节点所有人</a-alert>
  204. </a-form-item>
  205. <a-form-item label="优先级" prop="priority">
  206. <a-select v-model="form.priority" placeholder="请选择" :allowClear="true" style="width: 100%">
  207. <a-select-option :value="0">普通</a-select-option>
  208. <a-select-option :value="1">重要</a-select-option>
  209. <a-select-option :value="2">紧急</a-select-option>
  210. </a-select>
  211. </a-form-item>
  212. <a-form-item label="消息通知">
  213. <a-checkbox v-model="form.sendMessage">站内消息通知</a-checkbox>
  214. <!-- <a-checkbox v-model="form.sendSms" disabled>短信通知</a-checkbox>
  215. <a-checkbox v-model="form.sendEmail" disabled>邮件通知</a-checkbox> -->
  216. </a-form-item>
  217. <div slot="footer">
  218. <a-button type="text" @click="modalVisible=false">取消</a-button>
  219. <div style="display:inline-block;width: 20px;"></div>
  220. <a-button type="primary" :disabled="submitLoading" @click="applySubmit">提交</a-button>
  221. </div>
  222. </div>
  223. </a-modal>
  224. <a-modal title="审批历史" v-model="modalLsVisible" :mask-closable="false" :width="'80%'" :footer="null">
  225. <div v-if="modalLsVisible">
  226. <historicDetail :procInstId="procInstId"></historicDetail>
  227. </div>
  228. </a-modal>
  229. <a-modal title="确认撤回" v-model="modalCancelVisible" :mask-closable="false" :width="500">
  230. <a-form ref="delForm" v-model="cancelForm" :label-width="70" v-if="modalCancelVisible">
  231. <a-form-item label="撤回原因" prop="reason">
  232. <a-input type="textarea" v-model="cancelForm.reason" :rows="4" />
  233. </a-form-item>
  234. </a-form>
  235. <div slot="footer">
  236. <a-button type="text" @click="modalCancelVisible=false">取消</a-button>
  237. <a-button type="primary" :disabled="submitLoading" @click="handelSubmitCancel">提交</a-button>
  238. </div>
  239. </a-modal>
  240. </a-card>
  241. </template>
  242. <script>
  243. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  244. import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
  245. import { filterObj } from '@/utils/util';
  246. import JEllipsis from '@/components/jeecg/JEllipsis'
  247. import { deleteAction, getAction,downFile } from '@/api/manage'
  248. import pick from "lodash.pick";
  249. import JTreeSelect from '@/components/jeecg/JTreeSelect'
  250. import {initDictOptions, filterDictText} from '@/components/dict/JDictSelectUtil'
  251. import historicDetail from '@/views/activiti/historicDetail'
  252. export default {
  253. name: "applyList",
  254. mixins:[activitiMixin,JeecgListMixin],
  255. components: {
  256. JEllipsis
  257. ,JTreeSelect
  258. ,historicDetail
  259. },
  260. data () {
  261. return {
  262. description: '我的申请',
  263. dictOptions:[],
  264. url: {
  265. list: "/actBusiness/listData",
  266. getProcessDataList: "/activiti_process/listData",
  267. delByIds:'/actBusiness/delByIds',
  268. getFirstNode:'/actProcessIns/getFirstNode',
  269. applyBusiness:'/actBusiness/apply',
  270. cancelApply:'/actBusiness/cancel',
  271. },
  272. // 查询条件
  273. queryParam: {
  274. createTimeRange:[],
  275. keyWord:'',
  276. },
  277. // 表头
  278. labelCol: {
  279. xs: { span: 4 },
  280. sm: { span: 4 },
  281. },
  282. wrapperCol: {
  283. xs: { span: 20 },
  284. sm: { span: 20 },
  285. },
  286. processModalVisible: null,
  287. activeKeyAll: [],
  288. activeKey: [],
  289. processDataMap: {},
  290. searchProcessKey: null,
  291. addApplyLoading: false,
  292. lcModa: {
  293. title:'',
  294. disabled:false,
  295. visible:false,
  296. formComponent : null,
  297. isNew : false
  298. },
  299. form:{
  300. priority:0,
  301. assignees:[],
  302. sendMessage:true
  303. },
  304. modalVisible: false,
  305. showAssign: false,
  306. assigneeList: [],
  307. isGateway: false,
  308. dictPriority: [],
  309. submitLoading: false,
  310. error: "",
  311. /*审批历史*/
  312. modalLsVisible: false,
  313. procInstId: '',
  314. modalCancelVisible: false,
  315. cancelForm: {}
  316. }
  317. },
  318. computed:{
  319. },
  320. methods: {
  321. initDictConfig() {
  322. //初始化字典 - 流程分类
  323. initDictOptions('bpm_process_type').then((res) => {
  324. if (res.success) {
  325. this.dictOptions = res.result;
  326. }
  327. });
  328. },
  329. filterDictText(dictOptions, text) {
  330. if (dictOptions instanceof Array) {
  331. for (let dictItem of dictOptions) {
  332. if (text === dictItem.value) {
  333. return dictItem.text
  334. }
  335. }
  336. }
  337. return text||text=='null'?'':text
  338. },
  339. getProcessList() {
  340. this.addApplyLoading = true;
  341. this.postFormAction(this.url.getProcessDataList,{status:1,roles:true}).then(res => {
  342. this.activeKeyAll = [];
  343. if (res.success) {
  344. var result = res.result||[];
  345. if (result.length>0){
  346. let searchProcessKey = this.searchProcessKey;
  347. if (searchProcessKey){ //过滤条件
  348. result = _.filter(result, function(o) { return o.name.indexOf(searchProcessKey)>-1; });
  349. }
  350. this.processDataMap = _.groupBy(result,'categoryId');
  351. for (const categoryId in this.processDataMap) {
  352. this.activeKeyAll.push(categoryId)
  353. }
  354. this.activeKey = this.activeKeyAll;
  355. }
  356. this.processModalVisible = true;
  357. }else {
  358. this.$message.warning(res.message)
  359. }
  360. }).finally(()=>this.addApplyLoading = false);
  361. },
  362. loadData(arg) {
  363. console.log("loadData")
  364. if(!this.url.list){
  365. this.$message.error("请设置url.list属性!")
  366. return
  367. }
  368. //加载数据 若传入参数1则加载第一页的内容
  369. if (arg === 1) {
  370. this.ipagination.current = 1;
  371. }
  372. var params = this.getQueryParams();//查询条件
  373. this.loading = true;
  374. getAction(this.url.list, params).then((res) => {
  375. if (res.success) {
  376. let records = res.result||[];
  377. this.dataSource = records;
  378. this.ipagination.total = records.length;
  379. }
  380. if(res.code===510){
  381. this.$message.warning(res.message)
  382. }
  383. this.loading = false;
  384. })
  385. },
  386. getQueryParams(){
  387. var param = Object.assign({}, this.queryParam,this.isorter);
  388. delete param.createTimeRange; // 时间参数不传递后台
  389. return filterObj(param);
  390. },
  391. // 重置
  392. searchReset(){
  393. var that = this;
  394. var logType = that.queryParam.logType;
  395. that.queryParam = {}; //清空查询区域参数
  396. that.queryParam.logType = logType;
  397. that.loadData(this.ipagination.current);
  398. },
  399. onDateChange: function (value, dateString) {
  400. console.log(dateString[0],dateString[1]);
  401. this.queryParam.createTime_begin=dateString[0];
  402. this.queryParam.createTime_end=dateString[1];
  403. },
  404. onDateOk(value) {
  405. console.log(value);
  406. },
  407. getStatus(status) {
  408. let text = "未知", color = "";
  409. if (status == 0) {
  410. text = "草稿";
  411. color = "default";
  412. } else if (status == 1) {
  413. text = "处理中";
  414. color = "orange";
  415. } else if (status == 2) {
  416. text = "已结束";
  417. color = "blue";
  418. } else if (status == 3) {
  419. text = "已撤回";
  420. color = "magenta";
  421. }
  422. return {text:text,color:color}
  423. },
  424. getResult(result) {
  425. let text = "未知",
  426. color = "";
  427. if (result == 0) {
  428. text = "未提交";
  429. color = "default";
  430. } else if (result == 1) {
  431. text = "处理中";
  432. color = "orange";
  433. } else if (result == 2) {
  434. text = "已通过";
  435. color = "green";
  436. } else if (result == 3) {
  437. text = "已驳回";
  438. color = "red";
  439. }
  440. return {text:text,color:color}
  441. },
  442. apply(v) {
  443. if (!v.procDefId || v.procDefId == "null") {
  444. this.$message.error("流程定义为空");
  445. return;
  446. }
  447. this.form.id = v.id;
  448. this.form.procDefId = v.procDefId;
  449. this.form.title = v.title;
  450. // 加载审批人
  451. this.getAction(this.url.getFirstNode,{procDefId:v.procDefId}).then(res => {
  452. if (res.success) {
  453. if (res.result.type == 3 || res.result.type == 4) {
  454. this.isGateway = true;
  455. this.modalVisible = true;
  456. this.form.firstGateway = true;
  457. this.showAssign = false;
  458. this.error = "";
  459. return;
  460. }
  461. this.form.firstGateway = false;
  462. this.isGateway = false;
  463. if (res.result.users && res.result.users.length > 0) {
  464. this.error = "";
  465. this.assigneeList = res.result.users;
  466. // 默认勾选
  467. let ids = [];
  468. res.result.users.forEach(e => {
  469. ids.push(e.username);
  470. });
  471. this.form.assignees = ids;
  472. this.showAssign = true;
  473. } else {
  474. this.form.assignees = [];
  475. this.showAssign = true;
  476. this.error = '审批节点未分配候选审批人员,请联系管理员!';
  477. }
  478. if (this.error){
  479. this.$message.error(this.error)
  480. return;
  481. }
  482. this.modalVisible = true;
  483. }else {
  484. this.$message.error(res.message)
  485. }
  486. });
  487. },
  488. applySubmit() {
  489. if (this.showAssign && this.form.assignees.length < 1) {
  490. this.error = "请至少选择一个审批人";
  491. this.$message.error(this.error)
  492. return;
  493. } else {
  494. this.error = "";
  495. }
  496. this.submitLoading = true;
  497. var params = Object.assign({},this.form);
  498. params.assignees = params.assignees.join(",")
  499. this.postFormAction(this.url.applyBusiness,params).then(res => {
  500. if (res.success) {
  501. this.$message.success("操作成功");
  502. this.loadData();
  503. this.modalVisible = false;
  504. }else {
  505. this.$message.error(res.message)
  506. }
  507. }).finally(()=>this.submitLoading = false);
  508. },
  509. edit(r,isView) {
  510. if (!r.routeName) {
  511. this.$message.warning(
  512. "该流程信息未配置表单,请联系开发人员!"
  513. );
  514. return;
  515. }
  516. if(r.routeName.indexOf("外部表单")!=-1){
  517. alert("调用其他项目页面")
  518. }else if(r.routeName.indexOf("自定义")!=-1){
  519. isView = isView||false;
  520. this.lcModa.disabled = isView;
  521. this.lcModa.title = '修改流程业务信息:'+r.title;
  522. if (isView) this.lcModa.title = '查看流程业务信息:'+r.title;
  523. let com={component:() => import(`@/views/activiti/form/demoForm2`)}
  524. this.lcModa.formComponent = com.component;
  525. this.lcModa.isNew = false;
  526. this.lcModa.processData = r;
  527. this.lcModa.visible = true;
  528. }else{
  529. isView = isView||false;
  530. this.lcModa.disabled = isView;
  531. this.lcModa.title = '修改流程业务信息:'+r.title;
  532. if (isView) this.lcModa.title = '查看流程业务信息:'+r.title;
  533. this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
  534. this.lcModa.processData = r;
  535. this.lcModa.isNew = false;
  536. this.lcModa.visible = true;
  537. }
  538. },
  539. remove(r) {
  540. this.postFormAction(this.url.delByIds,{ids:r.id}).then((res)=>{
  541. if (res.success){
  542. this.$message.success(res.message)
  543. this.loadData();
  544. }else {
  545. this.$message.error(res.message)
  546. }
  547. })
  548. },
  549. cancel(v) {
  550. this.cancelForm.id = v.id;
  551. this.cancelForm.procInstId = v.procInstId;
  552. this.modalCancelVisible = true;
  553. },
  554. handelSubmitCancel() {
  555. this.submitLoading = true;
  556. this.postFormAction(this.url.cancelApply,this.cancelForm).then(res => {
  557. if (res.success) {
  558. this.$message.success("操作成功");
  559. this.loadData();
  560. this.modalCancelVisible = false;
  561. }else {
  562. this.$message.error(res.message);
  563. }
  564. }).finally(()=>this.submitLoading = false);
  565. },
  566. history(v) {
  567. if (!v.procInstId) {
  568. this.$message.error("流程实例ID不存在");
  569. return;
  570. }
  571. this.procInstId = v.procInstId;
  572. this.modalLsVisible = true;
  573. },
  574. detail(v) {
  575. // this.$refs.modal.detail("1","8a8080f079ea4ed50179ea4f6c470001")
  576. this.edit(v,true);
  577. },
  578. handleTableChange(pagination, filters, sorter) {
  579. //分页、排序、筛选变化时触发
  580. //TODO 筛选
  581. if (Object.keys(sorter).length > 0) {
  582. this.isorter.column = sorter.field;
  583. this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
  584. }
  585. this.ipagination = pagination;
  586. // this.loadData();
  587. },
  588. addApply() {
  589. this.getProcessList()
  590. },
  591. onSearchProcess(value) {
  592. this.searchProcessKey = value;
  593. this.getProcessList()
  594. },
  595. chooseProcess(v) {
  596. console.log(v)
  597. // this.$refs.modal.add("1")
  598. if (!v.routeName) {
  599. this.$message.warning(
  600. "该流程信息未配置表单,请联系开发人员!"
  601. );
  602. return;
  603. }
  604. if(v.routeName.indexOf("外部表单")!=-1){
  605. alert("调用其他项目页面")
  606. }else if(v.routeName.indexOf("自定义")!=-1){
  607. this.lcModa.disabled = false;
  608. let com={component:() => import(`@/views/activiti/form/demoForm2`)}
  609. this.lcModa.formComponent = com.component;
  610. this.lcModa.title = '发起流程:'+v.name;
  611. this.lcModa.isNew = true;
  612. this.lcModa.processData = v;
  613. this.lcModa.visible = true;
  614. }else{
  615. this.lcModa.disabled = false;
  616. this.lcModa.formComponent = this.getFormComponent(v.routeName).component;
  617. this.lcModa.title = '发起流程:'+v.name;
  618. this.lcModa.isNew = true;
  619. this.lcModa.processData = v;
  620. this.lcModa.visible = true;
  621. }
  622. console.log("发起",v)
  623. },
  624. afterSub(formData){
  625. this.lcModa.visible = false;
  626. this.loadData();
  627. },
  628. }
  629. }
  630. </script>
  631. <style scoped>
  632. @import '~@assets/less/common.less';
  633. </style>