TaskForm.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. <template>
  2. <view>
  3. <u-subsection
  4. :list="procInsId?['表单信息', '流转记录']:['表单信息']"
  5. mode="button"
  6. :fontSize="16"
  7. :current="tabIndex"
  8. @change="tabSelect"
  9. ></u-subsection>
  10. <view v-show="0 === tabIndex">
  11. <scroll-view scroll-y>
  12. <view class=" bg-white ">
  13. <PatrolWorkOrderForm v-if="formUrl.endsWith('PatrolWorkOrderForm')" :formReadOnly="formReadOnly" :class="formReadOnly?'readonly':''" ref="form" :businessId="businessId"></PatrolWorkOrderForm>
  14. <PatrolWorkOrderAuditForm v-if="formUrl.endsWith('PatrolWorkOrderAuditForm')" :formReadOnly="formReadOnly" :class="formReadOnly?'readonly':''" ref="form" :businessId="businessId"></PatrolWorkOrderAuditForm>
  15. <TestActivitiLeaveForm v-if="formUrl.endsWith('TestActivitiLeaveForm')" :formReadOnly="formReadOnly" :class="formReadOnly?'readonly':''" ref="form" :businessId="businessId"></TestActivitiLeaveForm>
  16. <DisposeRubbishForm v-if="formUrl.endsWith('DisposeRubbishForm')" :formReadOnly="formReadOnly" :class="formReadOnly?'readonly':''" ref="form" :businessId="businessId"></DisposeRubbishForm>
  17. <!-- <component :formReadOnly="formReadOnly" :class="formReadOnly?'readonly':''" ref="form" :businessId="businessId" :is="form"></component> -->
  18. <PreviewForm :formData="formData" v-if="formType !== '2'" :processDefinitionId="procDefId" :edit="true" ref="form"></PreviewForm>
  19. </view>
  20. <view class=" bg-white margin-top" v-if="!procInsId || taskId">
  21. <u--form :model="auditForm" labelWidth="130px" class="u-form" labelPosition="left" :rules="rules" ref="auditForm">
  22. <u-form-item v-if="!procInsId" label="流程标题" borderBottom prop="title">
  23. <u--input v-model="title" placeholder="请输入流程标题" border="none"></u--input>
  24. </u-form-item>
  25. <u-form-item v-if="taskId" label="审批意见" borderBottom prop="message">
  26. <u--textarea v-model="auditForm.message" placeholder="请输入审批意见" border="none"></u--textarea>
  27. </u-form-item>
  28. <!--<u-form-item label="是否抄送" borderBottom prop="isCC">
  29. <u-switch v-model="isCC" ></u-switch>
  30. </u-form-item>
  31. <u-form-item label="抄送给" v-if="isCC">
  32. <user-select v-model="auditForm.userIds" ></user-select>
  33. </u-form-item>
  34. <u-form-item label="指定下一步处理者" borderBottom prop="isAssign">
  35. <u-switch v-model="isAssign" ></u-switch>
  36. </u-form-item>
  37. <u-form-item label="指定" v-if="isAssign">
  38. <user-select v-model="auditForm.assignee" ></user-select>
  39. </u-form-item>-->
  40. <user-select-dialog title="选择转办用户" ref="transferUserSelectDialog" :showRadio="true" :showCheckBox="false" @doSubmit="selectUsersToTransferTask"></user-select-dialog>
  41. <user-select-dialog title="选择委派用户" ref="delegateUserSelectDialog" :showRadio="true" :showCheckBox="false" @doSubmit="selectUsersToDelateTask"></user-select-dialog>
  42. <user-select-dialog title="选择加签用户" ref="addSignTaskUserSelectDialog" @doSubmit="selectUsersToAddSignTask"></user-select-dialog>
  43. <task-back-nodes ref="taskBackNodes" @getBackTaskDefKey="back"></task-back-nodes>
  44. <view class="bottom-wrap flex">
  45. <view class="flex-sub" v-show="button.isHide === '0'"
  46. v-for="(button, index) in buttons" :key="index" >
  47. <u-button type="primary" class=" buttonBox" :color="colors[index]" @click="submit(button, buttons)" :text="button.name"></u-button>
  48. </view>
  49. </view>
  50. </u--form>
  51. </view>
  52. <u-gap height="70"></u-gap>
  53. </scroll-view>
  54. </view>
  55. <view v-show="1 === tabIndex">
  56. <view class="padding bg-white">
  57. <view class="cu-timeline" :key="index" v-for="(act, index) in historicTaskList">
  58. <view class="cu-time">{{act.histIns.startTime |formatDate('MM-DD')}}</view>
  59. <view class="cu-item text-blue">
  60. <view class="content">
  61. <view class="cu-capsule radius">
  62. <view class="cu-tag bg-cyan">{{act.histIns.activityName}}</view>
  63. <!-- <view class="cu-tag line-cyan">{{act.histIns.activityName}}</view> -->
  64. </view>
  65. <view class="margin-top">
  66. 审批人 : {{act.assigneeName}}
  67. </view>
  68. <view class="margin-top">
  69. 办理状态 :<view class="cu-tag bg-blue">{{act.comment.status}}</view>
  70. </view>
  71. <view class="margin-top">
  72. 审批意见 : {{act.comment.message}}
  73. </view>
  74. <view class="margin-top">
  75. 开始时间 : {{act.histIns.startTime |formatDate}}
  76. </view>
  77. <view class="margin-top">
  78. 结束时间 : {{act.histIns.endTime |formatDate}}
  79. </view>
  80. <view class="margin-top">
  81. 用时 : {{act.durationTime || '0秒'}}
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </template>
  90. <script>
  91. import userSelect from '@/components/user-select/user-select.vue'
  92. import userSelectDialog from '@/components/user-select/user-select-dialog.vue'
  93. import PreviewForm from '../form/GenerateFlowableForm'
  94. import TaskBackNodes from './components/TaskBackNodes.vue'
  95. import TestActivitiLeaveForm from '@/pages/test/activiti/TestActivitiLeaveForm.vue'
  96. import DisposeRubbishForm from '@/pages/edt/DisposeRubbishForm.vue'
  97. import PatrolWorkOrderForm from '@/pages/edt/PatrolWorkOrderForm.vue'
  98. import PatrolWorkOrderAuditForm from '@/pages/edt/PatrolWorkOrderAuditForm.vue'
  99. import moment from 'moment'
  100. import taskService from "@/api/flowable/taskService"
  101. import formService from "@/api/flowable/formService"
  102. import processService from "@/api/flowable/processService"
  103. import flowCopyService from "@/api/flowable/flowCopyService"
  104. import taskDefExtensionService from "@/api/flowable/taskDefExtensionService"
  105. var graceChecker = require("@/common/graceChecker.js");
  106. export default {
  107. onLoad: function (option) {
  108. this.flow = JSON.parse(decodeURIComponent(option.flow));
  109. this.procDefId = this.flow.procDefId
  110. this.procDefKey = this.flow.procDefKey
  111. this.formType = this.flow.formType
  112. this.formUrl = this.flow.formUrl
  113. this.taskId = this.flow.taskId
  114. this.taskDefKey = this.flow.taskDefKey
  115. this.status = this.flow.status
  116. this.title = this.flow.formTitle
  117. this.businessId = this.flow.businessId
  118. this.procInsId = this.flow.procInsId
  119. this.formReadOnly = this.flow.formReadOnly !== undefined && this.flow.formReadOnly !== 'false' && this.flow.formReadOnly !== false
  120. this.isCC = false
  121. this.isAssign = false
  122. this.auditForm.assignee = null
  123. this.auditForm.userIds = null
  124. this.auditForm.message = ''
  125. uni.setNavigationBarTitle({
  126. title: this.title
  127. });
  128. },
  129. async mounted () {
  130. if (this.formType === '2') { //外置表单
  131. if (this.formUrl === '/404') {
  132. this.form = null
  133. uni.showToast({ title: '没有关联流程表单!', icon: "none" });
  134. } else {
  135. // uniapp 不支持动态组件,所以通过名称匹配决定调用的表单组件
  136. if(this.formUrl.endsWith('TestActivitiLeaveForm')){
  137. this.form = TestActivitiLeaveForm
  138. }else if(this.formUrl.endsWith('DisposeRubbishForm')){
  139. this.form = DisposeRubbishForm
  140. }else if(this.formUrl.endsWith('PatrolWorkOrderForm')){
  141. this.form = PatrolWorkOrderForm
  142. }else if(this.formUrl.endsWith('PatrolWorkOrderAuditForm')){
  143. this.form = PatrolWorkOrderAuditForm
  144. }else{
  145. uni.showToast({ title: '没有关联流程表单!', icon: "none" });
  146. }
  147. }
  148. } else { // 动态表单
  149. // 读取流程表单
  150. if (this.formUrl === '/404') {
  151. uni.showToast({ title: '没有关联流程表单!', icon: "none" });
  152. } else {
  153. let data = await formService.getMobileForm(this.formUrl);
  154. // 初始化动态表单
  155. data.forEach((item)=>{ //挂载 writable,readable,value 属性,是为了触发对这三个属性的监听
  156. item.writable = true
  157. item.readable = true
  158. if(this.isObjectValue(item)){
  159. item.value = null
  160. }else{
  161. item.value = ''
  162. }
  163. let input = JSON.parse(JSON.stringify(item))
  164. this.formData.push(input)
  165. })
  166. if (this.status === 'start') {
  167. // 读取启动表单配置
  168. let data = await formService.getStartFormData({processDefinitionId: this.procDefId})
  169. this.setData(data, 'start')
  170. } else {
  171. // 读取任务表单配置
  172. let data = await formService.getTaskFormData({taskId: this.taskId})
  173. this.setData(data, 'audit')
  174. }
  175. }
  176. }
  177. // 读取按钮配置
  178. if (this.status === 'start') {
  179. this.buttons = [{code: '_flow_start', name: '启动', isHide: '0'}]
  180. } else if (this.procDefKey && this.taskDefKey) {
  181. // 读取按钮
  182. taskDefExtensionService.queryByDefIdAndTaskId({
  183. processDefId: this.procDefKey,
  184. taskDefId: this.taskDefKey
  185. }).then((data) => {
  186. this.buttons = data.flowButtonList
  187. })
  188. }
  189. // 读取历史任务列表
  190. taskService.historicTaskList(this.procInsId).then((data) => {
  191. this.historicTaskList = data.reverse()
  192. })
  193. },
  194. components:{
  195. userSelect,
  196. userSelectDialog,
  197. TestActivitiLeaveForm,
  198. DisposeRubbishForm,
  199. PatrolWorkOrderForm,
  200. PatrolWorkOrderAuditForm,
  201. TaskBackNodes,
  202. PreviewForm
  203. },
  204. data() {
  205. return {
  206. flow: null,
  207. tabIndex: 0,
  208. form: null,
  209. formType: '',
  210. formUrl: '',
  211. taskSelectedTab: 'frist',
  212. historicTaskList: [],
  213. procDefId: '',
  214. procInsId: '',
  215. formReadOnly: false,
  216. procDefKey: '',
  217. taskId: '',
  218. formData: [],
  219. taskDefKey: '',
  220. status: '',
  221. title: '',
  222. businessId: '',
  223. buttons: [],
  224. isCC: false,
  225. isAssign: false,
  226. colors: [ '#3c9cff', '#f56c6c', '#5ac725', '#f9ae3d', '#89c152',
  227. '#c38cc1', '#448aca', '#73d1f1', '#ffb34b', '#f18080',
  228. '#88a867', '#bfbf39', '#94d554', '#f19ec2', '#afaae4',
  229. '#86cefa', '#98d1ee', '#72dcdc', '#9acdcb', '#77b1cc', '#80a7dc'
  230. ],
  231. auditForm: {
  232. message: '',
  233. type: '',
  234. status: '',
  235. userIds: null,
  236. assignee: null
  237. },
  238. rules: {
  239. 'title': [
  240. {
  241. required: true,
  242. message: '流程标题',
  243. trigger: ['blur', 'change']
  244. }
  245. ],
  246. 'messsage': [
  247. {
  248. required: true,
  249. message: '审批内容',
  250. trigger: ['blur', 'change']
  251. }
  252. ]
  253. }
  254. }
  255. },
  256. methods:{
  257. tabSelect (index) {
  258. this.tabIndex = index
  259. },
  260. // 为任务表单赋值
  261. setData (taskFormData, status) {
  262. this.formData.forEach((input)=>{
  263. let item = taskFormData.filter((item)=>{
  264. if(input.model === item.id){
  265. return true
  266. }else{
  267. return false
  268. }
  269. })[0]
  270. if(item){
  271. if(status === 'start'){
  272. this.isFixParam(input)
  273. if(this.isObjectValue(input)){
  274. if(input.options.defaultValue && typeof input.options.defaultValue=== 'string'){
  275. input.value = JSON.parse(input.options.defaultValue)
  276. }else{
  277. input.value = input.options.defaultValue
  278. }
  279. }else{
  280. input.value = input.options.defaultValue || ''
  281. }
  282. }else{
  283. if(this.isObjectValue(input)){
  284. if(item.value && typeof item.value=== 'string'){
  285. input.value = JSON.parse(item.value)
  286. }else {
  287. input.value = item.value
  288. }
  289. }else{
  290. input.value = item.value
  291. }
  292. }
  293. input.readable = item.readable
  294. input.writable = item.writable
  295. }else{
  296. input.readable = false
  297. }
  298. })
  299. },
  300. // 默认参数赋值替换 ${user.name}...
  301. isFixParam (input) {
  302. if(/^[$][{].*[}]$/.test(input.options.defaultValue)){
  303. let params = input.options.defaultValue.substring(2, input.options.defaultValue.length-1)
  304. if(params === "new Date()"){
  305. input.options.defaultValue = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
  306. }else{
  307. let value = {user: this.$store.state.user.userInfo}
  308. params.split('.').forEach((param)=>{
  309. value = value?.[param]
  310. })
  311. input.options.defaultValue = value
  312. }
  313. }
  314. },
  315. // 判断数据类型是否是非String类型
  316. isObjectValue (input) {
  317. if(input.type === 'checkbox' ||
  318. input.type === 'slider' ||
  319. input.type === 'switch' ||
  320. input.type === 'rate' ||
  321. input.type === 'fileupload' ||
  322. input.type === 'imgupload' ||
  323. input.type === 'select' && input.options.multiple ){
  324. return true
  325. }
  326. return false
  327. },
  328. // 抄送
  329. cc (procInsId) {
  330. if (this.isCC && this.auditForm.userIds) {
  331. flowCopyService.save({
  332. userIds: this.auditForm.userIds,
  333. procDefId: this.procDefId,
  334. procInsId: procInsId,
  335. procDefName: '',
  336. procInsName: this.title,
  337. taskName: ''
  338. })
  339. }
  340. },
  341. // 暂存草稿
  342. save () {
  343. },
  344. // 启动流程
  345. start (vars) {
  346. if (this.formType === '2') { // 外置表单启动
  347. this.$refs.form.saveForm((businessTable, businessId,inputForm,disposeType) => {
  348. console.log(inputForm)
  349. if(inputForm.assignee){
  350. this.auditForm.assignee = inputForm.assignee
  351. }
  352. taskService.start({
  353. procDefKey: this.procDefKey,
  354. businessTable: businessTable,
  355. businessId: businessId,
  356. ...vars,
  357. title: this.title,
  358. assignee: this.auditForm.assignee,
  359. disposeType: disposeType
  360. }).then((data) => {
  361. uni.showToast({ title: "启动成功", icon: "success" });
  362. /*uni.navigateTo({
  363. //url: '/pages/workbench/task/TodoList'
  364. //url: '/pages/workbench/workbench'
  365. url: '/pages/index/index'
  366. })*/
  367. uni.reLaunch({
  368. //url: '/pages/workbench/task/TodoList'
  369. //url: '/pages/workbench/workbench'
  370. url: '/pages/index/index'
  371. })
  372. this.cc(data)
  373. })
  374. })
  375. } else { //动态表单启动
  376. this.$refs.form.submitStartFormData({
  377. processDefinitionId: this.procDefId,
  378. ...vars,
  379. title: this.title,
  380. assignee: this.auditForm.assignee
  381. }, (data) => {
  382. uni.showToast({ title: "启动成功", icon: "success" });
  383. uni.navigateTo({
  384. url: '/pages/workbench/task/TodoList'
  385. })
  386. this.cc(data)
  387. })
  388. }
  389. },
  390. // 同意
  391. agree () {
  392. this.commit() // 同意
  393. },
  394. // 驳回
  395. reject () {
  396. uni.showModal({
  397. title: '提示',
  398. content: '确定驳回流程吗?',
  399. success: (res) => {
  400. if (res.confirm) {
  401. uni.showLoading()
  402. taskService.backNodes(this.taskId).then((data) => {
  403. let backNodes = data
  404. if (backNodes.length > 0) {
  405. let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
  406. this.back(backTaskDefKey)
  407. }
  408. })
  409. } else if (res.cancel) {
  410. uni.hideLoading()
  411. }
  412. }
  413. });
  414. },
  415. // 驳回到任意节点
  416. turnBack () {
  417. this.$refs.taskBackNodes.init(this.taskId)
  418. },
  419. // 回退到任意节点
  420. back (backTaskDefKey) {
  421. taskService.back({
  422. taskId: this.taskId,
  423. backTaskDefKey: backTaskDefKey,
  424. ...this.auditForm
  425. }).then((data) => {
  426. uni.showToast({ title: "驳回成功", icon: "success" });
  427. uni.navigateTo({
  428. url: '/pages/workbench/task/TodoList'
  429. })
  430. this.cc(data)
  431. })
  432. },
  433. // 加签
  434. addMultiInstance () {
  435. // this.$refs.addSignTaskUserSelectDialog.showModal()
  436. },
  437. selectUsersToAddSignTask (users) {
  438. let userIds = users.map((user) => {
  439. return user.id
  440. }).join(',')
  441. taskService.addSignTask({taskId: this.taskId, userIds: JSON.stringify(userIds), message: '', flag: false}).then((data) => {
  442. uni.showToast({ title: data, icon: "success" });
  443. })
  444. },
  445. // 减签
  446. delMultiInstance () {
  447. },
  448. // 转办
  449. transfer () {
  450. this.$refs.transferUserSelectDialog.showModal()
  451. },
  452. selectUsersToTransferTask (userId) {
  453. alert(userId)
  454. if(!userId){
  455. uni.showToast({ title: '没有选择任何用户!', icon: "none" });
  456. return
  457. }
  458. taskService.transfer(this.taskId, userId).then((data) => {
  459. uni.showToast({ title: data, icon: "success" });
  460. uni.navigateTo({
  461. url: '/pages/workbench/task/TodoList'
  462. })
  463. })
  464. },
  465. // 委托
  466. delegate () {
  467. this.$refs.delegateUserSelectDialog.showModal()
  468. },
  469. selectUsersToDelateTask (userId) {
  470. if(!userId){
  471. uni.showToast({ title: '没有选择任何用户!', icon: "none" });
  472. return
  473. }
  474. taskService.delegate(this.taskId, userId).then((data) => {
  475. uni.showToast({ title: data, icon: "success" });
  476. uni.navigateTo({
  477. url: '/pages/workbench/task/TodoList'
  478. })
  479. })
  480. },
  481. // 终止
  482. stop () {
  483. //uni.showLoading()
  484. uni.showModal({
  485. title: '提示',
  486. content: '确定终止流程吗?',
  487. success: (res) => {
  488. if (res.confirm) {
  489. processService.stop(this.procInsId, this.auditForm.message).then((data) => {
  490. uni.showToast({ title: data, icon: "success" });
  491. uni.reLaunch({
  492. //url: '/pages/workbench/task/TodoList'
  493. //url: '/pages/workbench/workbench'
  494. url: '/pages/index/index'
  495. })
  496. })
  497. } else if (res.cancel) {
  498. uni.hideLoading()
  499. }
  500. }
  501. });
  502. },
  503. // 打印
  504. print () {
  505. },
  506. // 自定义按钮提交
  507. commit (vars) {
  508. //定义表单规则
  509. var rule = [
  510. /*{name:"message", checkType : "notnull", checkRule:"", errorMsg:"审批意见不能为空!"}*/
  511. ];
  512. //进行表单检查
  513. var formData = this.auditForm;
  514. var checkRes = graceChecker.check(formData, rule);
  515. if(!checkRes){
  516. uni.showToast({ title: graceChecker.error, icon: "none" });
  517. return;
  518. }
  519. if (this.formType === '2') { //外置表单审批
  520. this.$refs.form.saveForm((businessTable, businessId) => {
  521. taskService.audit({
  522. taskId: this.taskId,
  523. taskDefKey: this.taskDefKey,
  524. procInsId: this.procInsId,
  525. procDefId: this.procDefId,
  526. vars: vars,
  527. comment: this.auditForm,
  528. assignee: this.auditForm.assignee
  529. }).then((data) => {
  530. uni.showToast({ title: "审批成功", icon: "success" });
  531. uni.reLaunch({
  532. //url: '/pages/workbench/task/TodoList'
  533. //url: '/pages/workbench/workbench'
  534. url: '/pages/index/index'
  535. })
  536. this.cc(data)
  537. })
  538. })
  539. } else { // 动态表单启动
  540. this.$refs.form.submitTaskFormData(vars, this.procInsId, this.taskId, this.auditForm.assignee, this.auditForm, (data) => {
  541. uni.showToast({ title: "启动成功", icon: "success" });
  542. uni.navigateTo({
  543. url: '/pages/workbench/task/TodoList'
  544. })
  545. //抄送
  546. this.cc(data)
  547. })
  548. }
  549. },
  550. submit (currentBtn, buttons) {
  551. let vars = {} // 存储流程变量
  552. // 把当前操作对应的自定义按钮(以_flow_开头的是系统按钮,排除在外)的编码,存储为对应的流程变量,值设置为true,其余自定义按钮编码对应的流程变量值为false。
  553. buttons.forEach((btn) => {
  554. if (btn.code && !btn.code.startsWith('_flow_')) {
  555. vars[btn.code] = false
  556. }
  557. })
  558. if (currentBtn.code && !currentBtn.code.startsWith('_flow_')) {
  559. vars[currentBtn.code] = true
  560. }
  561. vars.title = this.title // 标题
  562. vars.assignee = this.auditForm.assignee // 指定的下一步骤处理人
  563. this.auditForm.type = currentBtn.code // 提交类型
  564. this.auditForm.status = currentBtn.name // 按钮文字
  565. switch (currentBtn.code) {
  566. case '_flow_start': // 自动流程
  567. this.start(vars)
  568. break
  569. case '_flow_save': // 保存草稿
  570. this.save()
  571. break
  572. case '_flow_agree': // 同意
  573. this.agree()
  574. break
  575. case '_flow_reject': // 驳回
  576. this.reject()
  577. break
  578. case '_flow_back': // 驳回到任意步骤
  579. this.turnBack()
  580. break
  581. case '_flow_add_multi_instance': // 加签
  582. this.addMultiInstance()
  583. break
  584. case '_flow_del_multi_instance': // 减签
  585. this.delMultiInstance()
  586. break
  587. case '_flow_transfer': // 转办
  588. this.transfer()
  589. break
  590. case '_flow_delegate':// 外派
  591. this.delegate()
  592. break
  593. case '_flow_stop':// 终止
  594. this.stop()
  595. break
  596. case '_flow_print':// 打印
  597. this.print()
  598. break
  599. default:
  600. this.commit(vars) // 自定义按钮提交
  601. }
  602. }
  603. }
  604. }
  605. </script>