综合办公系统
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

index.vue 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. <template>
  2. <div class="app-container">
  3. <el-card class="box-card">
  4. <div slot="header" class="clearfix">
  5. <span class="el-icon-document">待办任务</span>
  6. <el-tag style="margin-left:10px">发起人:{{ startUser }}</el-tag>
  7. <el-tag>任务节点:{{ taskName }}</el-tag>
  8. <el-button style="float: right;" size="mini" type="danger" @click="goBack">关闭</el-button>
  9. </div>
  10. <el-tabs tab-position="top" v-model="activeName" @tab-click="handleClick">
  11. <!--表单信息-->
  12. <el-tab-pane label="表单信息" name="1">
  13. <sc-table :tableForm="tableForm" :taskName="taskName" @submit="handleComplete"
  14. v-if="taskForm.procDefName == '生产部门考核'"></sc-table>
  15. <jy-table :tableForm="tableForm" :taskName="taskName" @submit="handleComplete"
  16. v-else-if="taskForm.procDefName == '经营发展部考核'"></jy-table>
  17. <js-table :tableForm="tableForm" :taskName="taskName" @submit="handleComplete"
  18. v-else-if="taskForm.procDefName == '技术质量部考核'"></js-table>
  19. <xm-table :tableForm="tableForm" :taskName="taskName" @submit="handleComplete"
  20. v-else-if="taskForm.procDefName == '项目管理部考核'"></xm-table>
  21. <cw-table :tableForm="tableForm" :taskName="taskName" @submit="handleComplete"
  22. v-else-if="taskForm.procDefName == '财务部考核'"></cw-table>
  23. <zh-table :tableForm="tableForm" :taskName="taskName" @submit="handleComplete"
  24. v-else-if="taskForm.procDefName == '综合事务部考核'"></zh-table>
  25. <car-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '用车审批'"
  26. @goBack="goBack"></car-form>
  27. <car-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '用车审批(工会)'"
  28. @goBack="goBack"></car-form>
  29. <device-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '设备审批'"
  30. @goBack="goBack"></device-form>
  31. <project-process :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '项目流转'"
  32. @goBack="goBack"></project-process>
  33. <budget-index :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '项目预算'"
  34. @goBack="goBack"></budget-index>
  35. <borrow-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '借款审批'"
  36. @goBack="goBack"></borrow-form>
  37. <safe-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '安全交底'"
  38. @goBack="goBack"></safe-form>
  39. <technical-form :taskName="taskName" :taskForm="taskForm" v-else-if="taskForm.procDefName == '技术交底'"
  40. @goBack="goBack"></technical-form>
  41. <el-row type="flex" justify="center" v-show="isShowApprove()">
  42. <el-button v-if="!formKeyExist" icon="el-icon-edit-outline" type="success" size="mini"
  43. @click="handleComplete">审核通过
  44. </el-button>
  45. <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleReturn">退回</el-button>
  46. <!-- <el-button icon="el-icon-circle-close" type="danger" size="mini" @click="handleReject">驳回</el-button> -->
  47. </el-row>
  48. </el-tab-pane>
  49. <!--流程流转记录-->
  50. <el-tab-pane label="流转记录" name="2">
  51. <!--flowRecordList-->
  52. <el-col :span="16" :offset="4">
  53. <div class="block">
  54. <el-timeline>
  55. <el-timeline-item v-for="(item, index ) in flowRecordList" :key="index" :icon="setIcon(item.finishTime)"
  56. :color="setColor(item.finishTime)">
  57. <p style="font-weight: 700">{{ item.taskName }}</p>
  58. <el-card :body-style="{ padding: '10px' }">
  59. <el-descriptions class="margin-top" :column="1" size="small" border>
  60. <el-descriptions-item v-if="item.assigneeName" label-class-name="my-label">
  61. <template slot="label"><i class="el-icon-user"></i>办理人</template>
  62. {{ item.assigneeName }}
  63. <el-tag type="info" size="mini">{{ item.deptName }}</el-tag>
  64. </el-descriptions-item>
  65. <el-descriptions-item v-if="item.candidate" label-class-name="my-label">
  66. <template slot="label"><i class="el-icon-user"></i>候选办理</template>
  67. {{ item.candidate }}
  68. </el-descriptions-item>
  69. <el-descriptions-item label-class-name="my-label">
  70. <template slot="label"><i class="el-icon-date"></i>接收时间</template>
  71. {{ item.createTime }}
  72. </el-descriptions-item>
  73. <el-descriptions-item v-if="item.finishTime" label-class-name="my-label">
  74. <template slot="label"><i class="el-icon-date"></i>处理时间</template>
  75. {{ item.finishTime }}
  76. </el-descriptions-item>
  77. <el-descriptions-item v-if="item.duration" label-class-name="my-label">
  78. <template slot="label"><i class="el-icon-time"></i>耗时</template>
  79. {{ item.duration }}
  80. </el-descriptions-item>
  81. <!-- <el-descriptions-item v-if="item.comment" label-class-name="my-label">
  82. <template slot="label"><i class="el-icon-tickets"></i>处理意见</template>
  83. {{ item.comment }}
  84. </el-descriptions-item> -->
  85. </el-descriptions>
  86. </el-card>
  87. </el-timeline-item>
  88. </el-timeline>
  89. </div>
  90. </el-col>
  91. </el-tab-pane>
  92. <!--流程图-->
  93. <el-tab-pane label="流程图" name="3">
  94. <flow :flowData="flowData" />
  95. </el-tab-pane>
  96. </el-tabs>
  97. <!--审批任务-->
  98. <el-dialog :title="completeTitle" :visible.sync="completeOpen" width="60%" append-to-body>
  99. <el-form ref="taskForm" :model="taskForm">
  100. <el-form-item prop="targetKey">
  101. <flow-user v-if="checkSendUser" :checkType="checkType" @handleUserSelect="handleUserSelect"></flow-user>
  102. <flow-role v-if="checkSendRole" @handleRoleSelect="handleRoleSelect"></flow-role>
  103. </el-form-item>
  104. <!-- <el-form-item label="处理意见" label-width="80px" prop="comment"
  105. :rules="[{ required: true, message: '请输入处理意见', trigger: 'blur' }]">
  106. <el-input type="textarea" v-model="taskForm.comment" placeholder="请输入处理意见" />
  107. </el-form-item> -->
  108. </el-form>
  109. <el-row v-if="!checkSendUser" style="text-align: center;">
  110. <h2>已达到最后节点,点击确定后审核完成</h2>
  111. </el-row>
  112. <span slot="footer" class="dialog-footer">
  113. <el-button @click="completeOpen = false">取 消</el-button>
  114. <el-button type="primary" @click="taskComplete">确 定</el-button>
  115. </span>
  116. </el-dialog>
  117. <!--退回流程-->
  118. <el-dialog :title="returnTitle" :visible.sync="returnOpen" width="40%" append-to-body>
  119. <el-form ref="taskForm" :model="taskForm" label-width="80px">
  120. <el-form-item label="退回节点" prop="targetKey">
  121. <el-radio-group v-model="taskForm.targetKey">
  122. <el-radio-button v-for="item in returnTaskList" :key="item.id" :label="item.id">{{ item.name }}
  123. </el-radio-button>
  124. </el-radio-group>
  125. </el-form-item>
  126. <el-form-item label="退回意见" prop="comment" :rules="[{ required: true, message: '请输入意见', trigger: 'blur' }]">
  127. <el-input style="width: 50%" type="textarea" v-model="taskForm.comment" placeholder="请输入意见" />
  128. </el-form-item>
  129. </el-form>
  130. <span slot="footer" class="dialog-footer">
  131. <el-button @click="returnOpen = false">取 消</el-button>
  132. <el-button type="primary" @click="taskReturn">确 定</el-button>
  133. </span>
  134. </el-dialog>
  135. <!--驳回流程-->
  136. <el-dialog :title="rejectTitle" :visible.sync="rejectOpen" width="60%" append-to-body>
  137. <el-form ref="taskForm" :model="taskForm">
  138. <el-form-item prop="targetKey">
  139. <flow-user v-if="checkSendUser" :checkType="checkType" @handleUserSelect="handleUserSelect"></flow-user>
  140. </el-form-item>
  141. <el-form-item label="驳回意见" prop="comment" :rules="[{ required: true, message: '请输入意见', trigger: 'blur' }]">
  142. <el-input style="width: 50%" type="textarea" v-model="taskForm.comment" placeholder="请输入意见" />
  143. </el-form-item>
  144. </el-form>
  145. <span slot="footer" class="dialog-footer">
  146. <el-button @click="rejectOpen = false">取 消</el-button>
  147. <el-button type="primary" @click="taskReject">确 定</el-button>
  148. </span>
  149. </el-dialog>
  150. </el-card>
  151. </div>
  152. </template>
  153. <script>
  154. import { flowRecord } from "@/api/flowable/finished";
  155. import FlowUser from '@/components/flow/User'
  156. import FlowRole from '@/components/flow/Role'
  157. import Parser from '@/components/parser/Parser'
  158. import { getProcessVariables, flowXmlAndNode, definitionStart } from "@/api/flowable/definition";
  159. import {
  160. complete,
  161. rejectTask,
  162. returnList,
  163. returnTask,
  164. getNextFlowNode,
  165. delegate,
  166. flowTaskForm,
  167. } from "@/api/flowable/todo";
  168. import flow from '@/views/flowable/task/todo/detail/flow'
  169. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  170. import { listUser } from "@/api/system/user";
  171. import { getAssess, modifyAssess, submitAssess, listAssess } from '@/api/oa/assess/assess';
  172. import ScTable from "@/views/flowable/form/scTable.vue";
  173. import JyTable from "@/views/flowable/form/jyTable.vue";
  174. import ZhTable from "@/views/flowable/form/zhTable.vue";
  175. import JsTable from "@/views/flowable/form/jsTable.vue";
  176. import XmTable from "@/views/flowable/form/xmTable.vue";
  177. import CwTable from "@/views/flowable/form/cwTable.vue";
  178. import carForm from "@/views/flowable/form/carForm.vue";
  179. import deviceForm from "@/views/flowable/form/deviceForm";
  180. import projectProcess from "@/views/flowable/form/projectProcess/index.vue"
  181. import AddBudget from '@/views/oa/budget/addBudget.vue';
  182. import borrowForm from '@/views/flowable/form/borrowForm.vue';
  183. import safeForm from '@/views/flowable/form/safeForm.vue';
  184. import technicalForm from '@/views/flowable/form/technicalForm.vue';
  185. import budgetIndex from '@/views/flowable/form/budget/budget.vue';
  186. import businessReview from '@/views/flowable/form/projectProcess/businessReview.vue';
  187. export default {
  188. name: "Record",
  189. components: {
  190. Parser,
  191. flow,
  192. FlowUser,
  193. FlowRole,
  194. ScTable,
  195. ZhTable,
  196. JsTable,
  197. XmTable,
  198. CwTable,
  199. JyTable,
  200. carForm,
  201. deviceForm,
  202. projectProcess,
  203. AddBudget,
  204. borrowForm,
  205. safeForm,
  206. technicalForm,
  207. budgetIndex,
  208. businessReview
  209. },
  210. props: {},
  211. data() {
  212. return {
  213. // 模型xml数据
  214. xmlData: "",
  215. flowData: {},
  216. activeName: '1',
  217. // 部门名称
  218. deptName: undefined,
  219. // 部门树选项
  220. // 用户表格数据
  221. userList: null,
  222. defaultProps: {
  223. children: "children",
  224. label: "label"
  225. },
  226. // 查询参数
  227. queryParams: {
  228. deptId: undefined
  229. },
  230. // 遮罩层
  231. loading: true,
  232. flowRecordList: [], // 流程流转数据
  233. formConfCopy: {},
  234. src: null,
  235. rules: {}, // 表单校验
  236. variablesForm: {}, // 流程变量数据
  237. taskForm: {
  238. returnTaskShow: false, // 是否展示回退表单
  239. delegateTaskShow: false, // 是否展示回退表单
  240. defaultTaskShow: true, // 默认处理
  241. comment: "", // 意见内容
  242. procInsId: "", // 流程实例编号
  243. instanceId: "", // 流程实例编号
  244. deployId: "", // 流程定义编号
  245. taskId: "",// 流程任务编号
  246. procDefId: "", // 流程编号
  247. targetKey: "",
  248. variables: {
  249. variables: {}
  250. },
  251. },
  252. assignee: null,
  253. formConf: {}, // 默认表单数据
  254. variables: [], // 流程变量数据
  255. variablesData: {}, // 流程变量数据
  256. returnTaskList: [], // 回退列表数据
  257. completeTitle: null,
  258. completeOpen: false,
  259. returnTitle: null,
  260. returnOpen: false,
  261. rejectOpen: false,
  262. rejectTitle: null,
  263. userData: [],
  264. checkSendUser: false, // 是否展示人员选择模块
  265. checkSendRole: false,// 是否展示角色选择模块
  266. checkType: 'single', // 选择类型
  267. taskName: null, // 任务节点
  268. startUser: null, // 发起人信息,
  269. multiInstanceVars: '', // 会签节点
  270. formKeyExist: false, // 当前节点是否存在表单
  271. // 表单信息
  272. tableForm: {}
  273. };
  274. },
  275. created() {
  276. if (this.$route.query) {
  277. this.taskName = this.$route.query.taskName;
  278. this.startUser = this.$route.query.startUser;
  279. this.taskForm.deployId = this.$route.query.deployId;
  280. this.taskForm.taskId = this.$route.query.taskId;
  281. this.taskForm.procInsId = this.$route.query.procInsId;
  282. this.taskForm.executionId = this.$route.query.executionId;
  283. this.taskForm.instanceId = this.$route.query.procInsId;
  284. this.taskForm.formId = this.$route.query.formId;
  285. this.taskForm.procDefName = this.$route.query.procDefName;
  286. // 流程任务获取变量信息
  287. if (this.taskForm.taskId) {
  288. this.processVariables(this.taskForm.taskId)
  289. this.getFlowTaskForm(this.taskForm.taskId)
  290. this.getAssessByAssessId(this.taskForm.formId)
  291. }
  292. this.getFlowRecordList(this.taskForm.procInsId, this.taskForm.deployId);
  293. }
  294. },
  295. methods: {
  296. handleClick(tab, event) {
  297. if (tab.name === '3') {
  298. flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
  299. this.flowData = res.data;
  300. })
  301. }
  302. },
  303. setIcon(val) {
  304. if (val) {
  305. return "el-icon-check";
  306. } else {
  307. return "el-icon-time";
  308. }
  309. },
  310. setColor(val) {
  311. if (val) {
  312. return "#2bc418";
  313. } else {
  314. return "#b3bdbb";
  315. }
  316. },
  317. // 用户信息选中数据
  318. handleUserSelect(selection) {
  319. if (selection) {
  320. if (selection instanceof Array) {
  321. const selectVal = selection.map(item => item.userId);
  322. if (this.multiInstanceVars) {
  323. this.$set(this.taskForm.variables, this.multiInstanceVars, selectVal);
  324. } else {
  325. this.$set(this.taskForm.variables, "approval", selectVal.join(','));
  326. }
  327. } else {
  328. this.$set(this.taskForm.variables, "approval", selection.userId.toString());
  329. }
  330. }
  331. },
  332. // 角色信息选中数据
  333. handleRoleSelect(selection) {
  334. if (selection) {
  335. if (selection instanceof Array) {
  336. const selectVal = selection.map(item => item.roleId);
  337. this.$set(this.taskForm.variables, "approval", selectVal.join(','));
  338. } else {
  339. this.$set(this.taskForm.variables, "approval", selection);
  340. }
  341. }
  342. },
  343. /** 流程流转记录 */
  344. getFlowRecordList(procInsId, deployId) {
  345. const that = this
  346. const params = { procInsId: procInsId, deployId: deployId }
  347. flowRecord(params).then(res => {
  348. that.flowRecordList = res.data.flowList;
  349. }).catch(res => {
  350. this.goBack();
  351. })
  352. },
  353. fillFormData(form, data) {
  354. form.fields.forEach(item => {
  355. const val = data[item.__vModel__]
  356. if (val) {
  357. item.__config__.defaultValue = val
  358. }
  359. })
  360. },
  361. /** 获取流程变量内容 */
  362. processVariables(taskId) {
  363. if (taskId) {
  364. // 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示
  365. getProcessVariables(taskId).then(res => {
  366. // this.variablesData = res.data.variables;
  367. });
  368. }
  369. },
  370. /** 流程节点表单 */
  371. getFlowTaskForm(taskId) {
  372. if (taskId) {
  373. // 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示
  374. flowTaskForm({ taskId: taskId }).then(res => {
  375. this.variablesData = res.data.formData;
  376. this.taskForm.variables = res.data.formData;
  377. this.formKeyExist = res.data.formKeyExist;
  378. });
  379. }
  380. },
  381. // 获取需要处理的表单表格信息
  382. getAssessByAssessId(formId) {
  383. getAssess(formId).then(res => {
  384. let data = res.data;
  385. for (let d in data) {
  386. if (d.includes('role')) {
  387. if (data[d] != "" && data[d] != undefined && data[d] != null)
  388. data[d] = data[d].split(',')
  389. }
  390. if (d.includes('familiar')) {
  391. if (data[d] != "" && data[d] != undefined && data[d] != null)
  392. data[d] = parseInt(data[d])
  393. }
  394. }
  395. this.tableForm = data;
  396. this.tableForm.taskId = this.$route.query.taskId;
  397. this.tableForm.taskName = this.$route.query.taskName;
  398. })
  399. },
  400. /** 加载审批任务弹框 */
  401. handleComplete() {
  402. // this.completeOpen = true;
  403. // this.completeTitle = "流程审批";
  404. // this.submitForm(null);
  405. let formData = new FormData();
  406. this.tableForm.formId = this.tableForm.assessId;
  407. let form = JSON.stringify(this.tableForm);
  408. formData.append("form", form);
  409. this.submitForm(formData, this.tableForm.assessId);
  410. },
  411. /** 用户审批任务 */
  412. taskComplete() {
  413. if (!this.taskForm.variables && this.checkSendUser) {
  414. this.$modal.msgError("请选择流程接收人员!");
  415. return;
  416. }
  417. if (!this.taskForm.variables && this.checkSendRole) {
  418. this.$modal.msgError("请选择流程接收角色组!");
  419. return;
  420. }
  421. // if (!this.taskForm.comment) {
  422. // this.$modal.msgError("请输入审批意见!");
  423. // return;
  424. // }
  425. if (this.taskForm && this.formKeyExist) {
  426. // 表单是否禁用
  427. this.taskForm.formData.formData.disabled = true;
  428. // 是否显示按钮
  429. this.taskForm.formData.formData.formBtns = false;
  430. this.taskForm.variables = Object.assign({}, this.taskForm.variables, this.taskForm.formData.valData);
  431. this.taskForm.variables.variables = this.taskForm.formData.formData;
  432. complete(this.taskForm).then(response => {
  433. this.$modal.msgSuccess(response.msg);
  434. this.goBack();
  435. });
  436. } else {
  437. // 流程设计人员类型配置为固定人员接收任务时,直接提交任务到下一步
  438. complete(this.taskForm).then(response => {
  439. this.$modal.msgSuccess(response.msg);
  440. this.goBack();
  441. });
  442. }
  443. },
  444. /** 委派任务 */
  445. handleDelegate() {
  446. this.taskForm.delegateTaskShow = true;
  447. this.taskForm.defaultTaskShow = false;
  448. },
  449. handleAssign() {
  450. },
  451. /** 返回页面 */
  452. goBack() {
  453. // 关闭当前标签页并返回上个页面
  454. const obj = { path: "/task/todo", query: { t: Date.now() } };
  455. this.$tab.closeOpenPage(obj);
  456. },
  457. /** 驳回任务 */
  458. handleReject() {
  459. this.rejectOpen = true;
  460. this.rejectTitle = "驳回流程";
  461. },
  462. /** 驳回任务 */
  463. taskReject() {
  464. this.$refs["taskForm"].validate(valid => {
  465. if (valid) {
  466. rejectTask(this.taskForm).then(res => {
  467. this.$modal.msgSuccess(res.msg);
  468. this.goBack();
  469. });
  470. }
  471. });
  472. },
  473. /** 可退回任务列表 */
  474. handleReturn() {
  475. this.returnOpen = true;
  476. this.returnTitle = "退回流程";
  477. returnList(this.taskForm).then(res => {
  478. this.returnTaskList = res.data;
  479. this.taskForm.variables = null;
  480. })
  481. },
  482. /** 提交退回任务 */
  483. taskReturn() {
  484. this.$refs["taskForm"].validate(valid => {
  485. if (valid) {
  486. returnTask(this.taskForm).then(res => {
  487. this.$modal.msgSuccess(res.msg);
  488. this.goBack()
  489. });
  490. }
  491. });
  492. },
  493. /** 取消回退任务按钮 */
  494. cancelTask() {
  495. this.taskForm.returnTaskShow = false;
  496. this.taskForm.defaultTaskShow = true;
  497. this.returnTaskList = [];
  498. },
  499. /** 委派任务 */
  500. submitDeleteTask() {
  501. this.$refs["taskForm"].validate(valid => {
  502. if (valid) {
  503. delegate(this.taskForm).then(response => {
  504. this.$modal.msgSuccess(response.msg);
  505. this.goBack();
  506. });
  507. }
  508. });
  509. },
  510. /** 取消回退任务按钮 */
  511. cancelDelegateTask() {
  512. this.taskForm.delegateTaskShow = false;
  513. this.taskForm.defaultTaskShow = true;
  514. this.returnTaskList = [];
  515. },
  516. /** 申请流程表单数据提交 */
  517. submitForm(formData, assessId) {
  518. listAssess({ assessId }).then(result => {
  519. let list = result;
  520. if (list.total != 0) {
  521. modifyAssess(formData).then(res => {
  522. });
  523. } else {
  524. submitAssess(formData)
  525. }
  526. })
  527. if (this.taskForm.variables === null) {
  528. this.taskForm.variables = {};
  529. }
  530. // 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况
  531. const params = { taskId: this.taskForm.taskId }
  532. getNextFlowNode(params).then(res => {
  533. const data = res.data;
  534. this.taskForm.formData = formData;
  535. if (data) {
  536. if (data.dataType === 'dynamic') {
  537. if (data.type === 'assignee') { // 指定人员
  538. this.checkSendUser = true;
  539. this.checkType = "single";
  540. } else if (data.type === 'candidateUsers') { // 候选人员(多个)
  541. this.checkSendUser = true;
  542. this.checkType = "multiple";
  543. } else if (data.type === 'candidateGroups') { // 指定组(所属角色接收任务)
  544. this.checkSendRole = true;
  545. } else { // 会签
  546. // 流程设计指定的 elementVariable 作为会签人员列表
  547. this.multiInstanceVars = data.vars;
  548. this.checkSendUser = true;
  549. this.checkType = "multiple";
  550. }
  551. }
  552. }
  553. this.completeOpen = true;
  554. this.completeTitle = "选择下一节点审核人";
  555. })
  556. },
  557. // 是否显示审批通过
  558. isShowApprove() {
  559. if (this.taskName == '员工填报' || this.taskForm.procDefName == '用车审批' || this.taskForm.procDefName == '设备审批' || this.taskForm.procDefName == '项目流转'
  560. || this.taskForm.procDefName == '项目预算' || this.taskForm.procDefName == '借款审批' || this.taskForm.procDefName == '安全交底' || this.taskForm.procDefName == '技术交底') {
  561. return false
  562. } else {
  563. return true
  564. }
  565. }
  566. },
  567. };
  568. </script>
  569. <style lang="scss" scoped>
  570. .test-form {
  571. margin: 15px auto;
  572. width: 800px;
  573. padding: 15px;
  574. }
  575. .clearfix:before,
  576. .clearfix:after {
  577. display: table;
  578. content: "";
  579. }
  580. .clearfix:after {
  581. clear: both
  582. }
  583. .box-card {
  584. width: 100%;
  585. margin-bottom: 20px;
  586. }
  587. .el-tag+.el-tag {
  588. margin-left: 10px;
  589. }
  590. .my-label {
  591. background: #E1F3D8;
  592. }</style>