index.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541
  1. <template>
  2. <view class="flowBefore-v">
  3. <div class="flow-urgent-value" :style="{'background-color':flowUrgentList[selectflowUrgent.extra].bgColor}"
  4. @click="handleShowSelect">
  5. <span :style="{'color':flowUrgentList[selectflowUrgent.extra].color}">{{selectflowUrgent.label}}</span>
  6. </div>
  7. <view class="flowBefore-box">
  8. <view class="scroll-v" scroll-y>
  9. <childForm ref="child" :config="config" @eventReceiver="eventReceiver" v-if="!loading"
  10. @setBtnLoad="setBtnLoad" :key="childFormKey" />
  11. <ErrorForm @submitErrorForm="submitErrorForm" ref="ErrorForm" />
  12. <RecordTimeList :progressList="progressList" :taskInfo="taskInfo" v-if="getShowExtraPanel"
  13. :commentList="commentList" :taskId="config.opType==0 ? config.id:config.taskId" ref="RecordTimeList"
  14. @handleReply="goWriteComment" :hasComment="hasComment" :dataLog="dataLog" :opType="config.opType"
  15. :formID="config?.formData?.id" :dataLogList="dataLogList" :auxiliaryInfo="auxiliaryInfo">
  16. </RecordTimeList>
  17. </view>
  18. </view>
  19. <flowBtn :actionList="actionList" :btnInfo="btnInfo" :opType="config.opType" :hideSaveBtn="config.hideSaveBtn"
  20. @handleBtn="handleBtn" @handlePress="handlePress" :btnLoading="btnLoading" v-if="formLoding"
  21. :rightBtnList="rightBtnList" :saveBtnText="properties.saveBtnText" :hasComment="hasComment"
  22. :hasSignFor="flowInfo?.flowNodes?.global?.hasSignFor" :todoBtnList="todoBtnList"
  23. :isProcessing="config.isProcessing">
  24. </flowBtn>
  25. <u-select :list="flowUrgentList" v-model="showFlowUrgent" @confirm="seltConfirm"
  26. :default-value="defaultValue" />
  27. <uni-popup mode="bottom" ref="reduceApprover" background-color='#fff'>
  28. <view class="approverContent">
  29. <view class="notice-warp">
  30. <view class="u-flex close-icon">
  31. <u-icon name="close" size="32" @click="hideReduceApprover" color="#93969c"></u-icon>
  32. </view>
  33. <view class="search-box">
  34. <u-search :placeholder="$t('app.apply.pleaseKeyword')" v-model="keyword" height="72"
  35. :show-action="false" @change="getAddSignUserList" bg-color="#f0f2f6" shape="square" />
  36. </view>
  37. </view>
  38. <view class="popup">
  39. <view v-for="(item, index) in signUserIdList" :key="index" v-if="signUserIdList.length"
  40. class="list-box">
  41. <view class="u-flex item">
  42. <view class="u-flex" style="flex: 1;">
  43. <u-avatar :src="define.baseURL+item.headIcon"></u-avatar>
  44. <view class="u-m-l-10">
  45. <view>{{item.fullName}}</view>
  46. <view>{{item.organize}}</view>
  47. </view>
  48. </view>
  49. <view class="" @click="deleteReduce(item.id)">
  50. <u-icon name="trash" size="32" color="#93969c"></u-icon>
  51. </view>
  52. </view>
  53. </view>
  54. <NoData v-else backgroundColor="#fff"></NoData>
  55. </view>
  56. </view>
  57. </uni-popup>
  58. <MultSelect :list="userList" :show="showSelectModal" @confirm="selectUser" @close="showSelectClose"
  59. v-if="userList.length" />
  60. </view>
  61. </template>
  62. <script>
  63. import {
  64. getDelegateUser
  65. } from '@/api/workFlow/entrust.js'
  66. import NoData from '@/components/noData'
  67. import {
  68. Create,
  69. Update
  70. } from '@/api/workFlow/workFlowForm'
  71. import {
  72. FlowTask,
  73. Audit,
  74. Reject,
  75. Transfer,
  76. saveAudit,
  77. saveAssist,
  78. AddSignUserIdList,
  79. ReduceApprover,
  80. Candidates,
  81. RejectList,
  82. FreeApprover,
  83. launchRecall,
  84. auditRecall,
  85. cancel,
  86. SignFor,
  87. Transact,
  88. sendBack,
  89. back,
  90. Assist
  91. } from '@/api/workFlow/flowBefore'
  92. import {
  93. Revoke,
  94. Press
  95. } from '@/api/workFlow/flowLaunch'
  96. import {
  97. createModel,
  98. updateModel,
  99. getOnlineLog
  100. } from '@/api/apply/visualDev'
  101. import {
  102. createComment
  103. } from '@/api/workFlow/flowEngine'
  104. import {
  105. checkInfo
  106. } from '@/api/message.js'
  107. import resources from '@/libs/resources.js'
  108. import childForm from './form.vue'
  109. import flowBtn from '../components/flowBtn'
  110. import RecordTimeList from '../components/RecordTimeList'
  111. import ErrorForm from '../components/ErrorForm'
  112. import {
  113. useUserStore
  114. } from '@/store/modules/user'
  115. const sysConfigInfo = uni.getStorageSync('sysConfigInfo')
  116. import MultSelect from '@/components/MultSelect'
  117. export default {
  118. components: {
  119. childForm,
  120. ErrorForm,
  121. flowBtn,
  122. RecordTimeList,
  123. NoData,
  124. MultSelect
  125. },
  126. data() {
  127. return {
  128. dataLogList: [],
  129. dataLog: false,
  130. childFormKey: +new Date(),
  131. todoBtnList: [],
  132. signUserIdList: [],
  133. keyword: '',
  134. formLoding: false,
  135. loading: false,
  136. taskInfo: {},
  137. backNodeList: [],
  138. btnInfo: [],
  139. nodeList: [],
  140. handleStatus: 1,
  141. isComment: false,
  142. isSummary: false,
  143. show: false,
  144. config: {},
  145. currentView: '',
  146. formData: {},
  147. flowFormInfo: {},
  148. flowTemplateInfo: {},
  149. flowTaskNodeList: [],
  150. flowTemplateJson: [],
  151. recordList: [],
  152. properties: {},
  153. tablist: [],
  154. flowStatus: '',
  155. stepIndex: 0,
  156. btnLoading: false,
  157. eventType: '',
  158. commentList: [],
  159. processId: "",
  160. candidateList: [],
  161. summaryType: 0,
  162. title: '',
  163. branchList: [],
  164. candidateType: 3,
  165. selectflowUrgent: {
  166. extra: '0',
  167. label: '普通',
  168. value: 1,
  169. },
  170. showFlowUrgent: false,
  171. defaultValue: [0],
  172. flowUrgent: 1,
  173. flowUrgentList: [{
  174. label: '普通',
  175. color: '#409EFF',
  176. bgColor: '#e5f3fe',
  177. value: 1,
  178. extra: '0'
  179. },
  180. {
  181. label: '重要',
  182. color: '#E6A23C',
  183. bgColor: '#fef6e5',
  184. value: 2,
  185. extra: '1'
  186. },
  187. {
  188. label: '紧急',
  189. color: '#F56C6C',
  190. bgColor: '#fee5e5',
  191. value: 3,
  192. extra: '2'
  193. },
  194. ],
  195. showAction: false,
  196. actionList: [],
  197. rejectList: [],
  198. rejectStep: '',
  199. hasComment: false,
  200. progressList: [],
  201. signValue: '',
  202. rightBtnList: [],
  203. approvalField: [],
  204. delegateUser: '',
  205. showSelectModal: false,
  206. userList: [],
  207. auxiliaryInfo: []
  208. };
  209. },
  210. computed: {
  211. baseURL() {
  212. return this.define.baseURL
  213. },
  214. getShowExtraPanel() {
  215. return this.dataLog && this.config?.formData?.id || (this.config.opType != '-1' && !this.loading)
  216. }
  217. },
  218. onLoad(option) {
  219. if (!option.config) return this.jnpf.goBack()
  220. this.config = JSON.parse(this.jnpf.base64.decode(option.config))
  221. uni.$on('operate', (data) => {
  222. this.btnLoading = true
  223. this[data.eventType + 'Handle'](data)
  224. })
  225. this.loading = true
  226. // 短链接
  227. if (option.token) {
  228. const userStore = useUserStore()
  229. userStore.setToken('')
  230. userStore.setToken(option.token)
  231. let dataConfig = {
  232. id: this.config.taskId,
  233. flowId: this.config.flowId,
  234. opType: this.config.opType,
  235. taskId: this.config.taskId,
  236. operatorId: this.config.operatorId,
  237. hideCancelBtn: true,
  238. }
  239. checkInfo(dataConfig.operatorId || dataConfig.taskId, dataConfig.opType).then(res => {
  240. dataConfig.opType = res.data.opType;
  241. this.config = dataConfig
  242. this.init()
  243. }).catch((err) => {})
  244. return
  245. }
  246. this.init()
  247. this.processId = this.config.id
  248. },
  249. onShow() {
  250. uni.$off('comment')
  251. uni.$on('comment', data => {
  252. this.commentList = [];
  253. this.current = 0;
  254. this.addComment(data)
  255. })
  256. uni.$on('openRevokeFlow', data => {
  257. this.config = data
  258. this.$nextTick(() => {
  259. this.getBeforeInfo(this.config)
  260. })
  261. })
  262. uni.$emit('initCollapse')
  263. },
  264. onUnload() {
  265. uni.$off('operate')
  266. uni.$off('refresh')
  267. uni.$off('comment')
  268. uni.$off('openRevokeFlow')
  269. },
  270. methods: {
  271. handlePreviewImage(url) {
  272. // #ifdef H5
  273. uni.previewImage({
  274. urls: [url],
  275. current: url,
  276. success: () => {},
  277. fail: () => {
  278. uni.showToast({
  279. title: '预览图片失败',
  280. icon: 'none'
  281. });
  282. }
  283. });
  284. // #endif
  285. },
  286. handleCodeGeneration(config) {
  287. this.config = config
  288. this.init(this.config)
  289. uni.$on('operate', (data) => {
  290. this[data.eventType + 'Handle'](data)
  291. })
  292. uni.$on('comment', data => {
  293. this.commentList = [];
  294. this.current = 0;
  295. this.addComment(data)
  296. })
  297. this.processId = this.config.id
  298. uni.setNavigationBarTitle({
  299. title: this.config.fullName
  300. })
  301. this.key = +new Date()
  302. },
  303. //流程按钮事件
  304. handleBtn(type, dataForm = {}) {
  305. // 定义事件类型列表
  306. const eventTypeList1 = ['submit', 'audit', 'reject', 'save', 'saveAudit', 'saveAssist',
  307. 'freeApprover', 'approvalButton', 'delegateSubmit'
  308. ];
  309. const eventTypeList2 = ['transfer', 'back', 'launchRecall', 'assist', 'auditRecall', 'cancelSign',
  310. 'revoke', 'approvalCancel', 'sign', 'startHandle'
  311. ];
  312. // 根据事件类型执行相应逻辑
  313. this.eventType = type;
  314. switch (true) {
  315. case type.includes('initiationForm'):
  316. const config = {
  317. previewType: 'initiationForm',
  318. taskId: this.config.taskId,
  319. title: this.config.fullName
  320. };
  321. uni.navigateTo({
  322. url: `/pages/workFlow/scanForm/index?config=${JSON.stringify(config)}`
  323. });
  324. break;
  325. case type.includes('press'):
  326. this.handlePress();
  327. break;
  328. case type.includes('reduceApprover'):
  329. this.getAddSignUserList();
  330. break;
  331. case type.includes('comment'):
  332. this.goWriteComment();
  333. break;
  334. case eventTypeList1.includes(type):
  335. this.eventLauncher(type);
  336. break;
  337. case eventTypeList2.includes(type):
  338. this.eventReceiver({}, type);
  339. break;
  340. case type === 'customBtns':
  341. this.handleCustomBtns(dataForm.value)
  342. break;
  343. default:
  344. // 可以添加默认处理逻辑,或者什么也不做
  345. break;
  346. }
  347. },
  348. // 自定义按钮
  349. handleCustomBtns(key) {
  350. this.actionList.length &&
  351. this.actionList.map(item => {
  352. if (item.value === key) {
  353. const parameter = {
  354. flowInfo: this.flowInfo,
  355. formData: this.formData,
  356. taskInfo: this.taskInfo,
  357. onlineUtils: this.jnpf.onlineUtils
  358. };
  359. const func = this.jnpf.getScriptFunc(item.jsJson);
  360. if (!func) return
  361. func.call(this, {
  362. ...parameter
  363. })
  364. }
  365. });
  366. return null;
  367. },
  368. // 委托用户详情
  369. getDelegateUser() {
  370. getDelegateUser(this.config.flowId).then(res => {
  371. this.userList = res.data.list || [];
  372. if (this.userList.length == 1) return this.selectUser([{
  373. id: this.userList[0].id
  374. }]);
  375. if (this.userList.length) return this.openUserListModal();
  376. });
  377. },
  378. showSelectClose() {
  379. this.showSelectModal = false
  380. },
  381. openUserListModal() {
  382. this.showSelectModal = true
  383. },
  384. selectUser(item) {
  385. this.delegateUser = item[0].id;
  386. this.getCandidates(this.config.operatorId);
  387. },
  388. delegateSubmitHandle(data) {
  389. this.handleRequest(data)
  390. },
  391. //催办
  392. handlePress() {
  393. uni.showModal({
  394. title: '提示',
  395. content: '此操作将提示该节点尽快处理',
  396. success: res => {
  397. if (res.confirm) {
  398. Press(this.config.id).then(res => {
  399. this.$u.toast(res.msg)
  400. })
  401. }
  402. }
  403. })
  404. },
  405. //关闭减签弹窗
  406. hideReduceApprover() {
  407. this.keyword = ''
  408. this.$refs.reduceApprover.close()
  409. },
  410. //获取减签加签列表
  411. getAddSignUserList() {
  412. let data = {
  413. currentPage: 1,
  414. enabledMark: 1,
  415. id: this.config.operatorId,
  416. keyword: this.keyword,
  417. organizeId: '',
  418. pageSize: 10000,
  419. sidx: "",
  420. sort: "desc"
  421. }
  422. AddSignUserIdList(data, this.config.operatorId).then(res => {
  423. this.signUserIdList = res.data.list || []
  424. this.$refs.reduceApprover.open('bottom')
  425. })
  426. },
  427. //减签
  428. deleteReduce(id) {
  429. let data = {
  430. ids: [id]
  431. }
  432. ReduceApprover(data, this.config.operatorId).then(res => {
  433. let signUserIdList = this.signUserIdList.filter(item => id !== item.id)
  434. this.signUserIdList = signUserIdList
  435. })
  436. },
  437. goWriteComment(replyId) {
  438. let data = {
  439. taskId: this.config.opType == 0 ? this.config.id : this.config.taskId
  440. };
  441. if (replyId) {
  442. data.replyId = replyId;
  443. }
  444. data = encodeURIComponent(JSON.stringify(data));
  445. uni.navigateTo({
  446. url: '/pages/workFlow/comment/index?data=' + data
  447. })
  448. },
  449. addComment(query) {
  450. query.taskId = this.config.opType == 0 ? this.config.id : this.config.taskId
  451. createComment(query).then(res => {
  452. this.$nextTick(() => {
  453. this.$refs.RecordTimeList.change(1)
  454. })
  455. })
  456. },
  457. init() {
  458. this.processId = this.config.id
  459. if (this.config.id) {
  460. let extra = {
  461. modelId: this.config.flowId,
  462. id: this.config.id,
  463. type: 1,
  464. flowId: this.config.flowId,
  465. processId: this.config.id,
  466. taskId: this.config.taskId,
  467. opType: this.config.opType,
  468. }
  469. uni.setStorageSync('dynamicModelExtra', extra)
  470. }
  471. /**
  472. * opType
  473. * -1 - 我发起的新建/编辑
  474. * 0 - 我发起的详情
  475. * 1 - 待办事宜
  476. * 2 - 已办事宜
  477. * 3 - 抄送事宜
  478. */
  479. this.getBeforeInfo(this.config)
  480. },
  481. getBeforeInfo() {
  482. let config = this.config;
  483. this.formData.flowId = config.flowId;
  484. this.loading = true;
  485. const query = {
  486. flowId: config.flowId, // 流程大Id
  487. opType: config.opType == 2 ? 3 : config.opType, //特殊:待办点击开始办理需要跳到在办页面
  488. };
  489. if (config.opType != "-1" && config.opType != '0') query.operatorId = config.operatorId;
  490. FlowTask(config?.taskId || config?.id || 0, query).then((res) => {
  491. this.flowInfo = res.data.flowInfo || {};
  492. this.properties = res.data.nodeProperties || {};
  493. this.auxiliaryInfo = this.properties.auxiliaryInfo
  494. this.$nextTick(() => {
  495. this.initApprovalField()
  496. })
  497. this.formInfo = res.data.formInfo || {};
  498. this.taskInfo = res.data.taskInfo || {};
  499. this.btnInfo = res.data.btnInfo || [];
  500. this.progressList = res.data.progressList || [];
  501. config.formOperates = res.data.formOperates || [];
  502. config.formType = this.formInfo.type
  503. const fullName =
  504. config.opType == "-1" ?
  505. this.flowInfo.fullName :
  506. this.taskInfo.fullName;
  507. config.fullName = fullName;
  508. this.title = this.flowInfo.fullName;
  509. this.thisStep = this.taskInfo.thisStep || "";
  510. if (config.status !== 0 && config.status !== 3) {
  511. this.title = this.thisStep ?
  512. config.fullName + "/" + this.thisStep :
  513. config.fullName;
  514. }
  515. config.type = this.flowInfo.type;
  516. config.draftData = res.data.draftData || null;
  517. config.formData = res.data.formData || {};
  518. let dataId = config.formData.id
  519. config.formEnCode = this.formInfo.enCode;
  520. this.nodeList = res.data.nodeList || [];
  521. this.recordList = (res.data.recordList || []).reverse();
  522. config.formConf = this.formInfo.formData;
  523. if (config.formConf) {
  524. this.dataLog = JSON.parse(config.formConf).dataLog
  525. if (this.dataLog) this.getOnlineLog(dataId)
  526. }
  527. this.hasComment = this.flowInfo.flowNodes.global.hasComment;
  528. this.loading = false;
  529. this.formLoding = true;
  530. uni.setNavigationBarTitle({
  531. title: this.config.formEnCode === "revoke" ? `${this.flowInfo.fullName}撤销申请` : this
  532. .flowInfo.fullName,
  533. });
  534. if (config.formRecords && config.title) {
  535. uni.setNavigationBarTitle({
  536. title: config.title,
  537. });
  538. }
  539. this.flowUrgent = this.taskInfo.flowUrgent || 1;
  540. const getSelectInfo = () => {
  541. var obj = {
  542. value: this.flowUrgent,
  543. extra: "0",
  544. label: "普通",
  545. };
  546. this.flowUrgentList.forEach((e, i) => {
  547. if (e.value == this.flowUrgent) {
  548. obj.extra = i;
  549. obj.label = e.label;
  550. }
  551. });
  552. return obj;
  553. };
  554. this.selectflowUrgent = getSelectInfo();
  555. this.initRightBtnList();
  556. if (config.opType != "-1" && config.opType != "3") config.readonly =
  557. true;
  558. config.formOperates = [];
  559. if (config.opType == 0) {
  560. if (this.properties && this.properties && this.properties.formOperates) config
  561. .formOperates = this.properties.formOperates || [];
  562. } else {
  563. config.formOperates = res.data.formOperates || [];
  564. }
  565. this.getFlowStatus()
  566. setTimeout(() => {
  567. this.$nextTick(() => {
  568. if (!this.$refs.child || !this.$refs.child.$refs.form) {
  569. uni.showToast({
  570. title: "暂无此流程表单",
  571. icon: "none",
  572. complete: () => {
  573. setTimeout(() => {
  574. uni.navigateBack();
  575. }, 1500);
  576. },
  577. });
  578. return;
  579. }
  580. this.$refs.child.$refs.form.init(config)
  581. });
  582. }, 100);
  583. this.config = config;
  584. });
  585. },
  586. //获取修改记录
  587. getOnlineLog(dataId) {
  588. let modelId = this.formInfo.id
  589. getOnlineLog(modelId, dataId).then(res => {
  590. let list = res.data.list || []
  591. //倒序转正
  592. // this.dataLogList = [...list].reverse()
  593. this.dataLogList = list
  594. })
  595. },
  596. //设置拓展自带
  597. initApprovalField() {
  598. this.approvalField = []
  599. if (this.config.opType == 3 && this.properties.hasApprovalField) {
  600. const approvalFieldList = this.flowInfo?.flowNodes?.global?.approvalFieldList || [];
  601. this.properties.approvalField.map(o => {
  602. const list = approvalFieldList.filter(item => item.id == o);
  603. list?.length && this.approvalField.push({
  604. ...list[0],
  605. value: null
  606. });
  607. });
  608. }
  609. },
  610. getFlowStatus() {
  611. //待签收
  612. if (this.config.category == '0') this.flowStatus = resources.status.signfor
  613. // 待办,在办
  614. if (this.config.category == '1' || this.config.category == '2') {
  615. //流转中
  616. if (this.config.status == '1') this.flowStatus = resources.status.circulation
  617. //已退回
  618. if (this.config.status == '5') this.flowStatus = resources.status.back
  619. }
  620. //发起
  621. if (!this.config.category) {
  622. //待提交
  623. if (this.config.status == '0') this.flowStatus = resources.status.draft
  624. //进行中
  625. if (this.config.status == '1') this.flowStatus = resources.status.doing
  626. //已通过
  627. if (this.config.status == '2') this.flowStatus = resources.status.adopt
  628. }
  629. //已办
  630. if (this.config.category == '3') {
  631. //转审
  632. if (this.config.status == '7') this.flowStatus = resources.status.transfer
  633. //同意
  634. if (this.config.status == '1') this.flowStatus = resources.status.agree
  635. //拒绝
  636. if (this.config.status == '0') this.flowStatus = resources.status.refuse
  637. //加签
  638. if (this.config.status == '4') this.flowStatus = resources.status.addSign
  639. //减签
  640. if (this.config.status == '5') this.flowStatus = resources.status.return
  641. }
  642. //抄送
  643. if (this.config.category == '4') {
  644. //进行中
  645. if (this.config.status == '1') this.flowStatus = resources.status.doing
  646. //已退回
  647. if (this.config.status == '8') this.flowStatus = resources.status.back
  648. }
  649. },
  650. initRightBtnList() {
  651. const list = [];
  652. if (this.opType != 6) {
  653. // 右侧按钮
  654. // 委托发起
  655. if (this.btnInfo?.hasDelegateSubmitBtn) list.push({
  656. id: 'delegateSubmit',
  657. fullName: '委托发起',
  658. type: 'primary'
  659. });
  660. // 提交
  661. if (this.btnInfo?.hasSubmitBtn) list.push({
  662. id: 'submit',
  663. fullName: this.properties.submitBtnText || '提交',
  664. type: 'primary'
  665. });
  666. // 待签
  667. if (sysConfigInfo.flowSign == 1 && this.btnInfo?.hasSignBtn) list.push({
  668. id: 'sign',
  669. fullName: this.btnInfo?.proxyMark ? '代签' : '签收',
  670. type: 'primary',
  671. width: '100%'
  672. });
  673. //特殊:待办点击开始办理需要跳到在办页面
  674. if (this.config.opType == 2) {
  675. if (sysConfigInfo.flowSign == 1 && this.flowInfo?.flowNodes?.global?.hasSignFor) this.todoBtnList
  676. .push({
  677. id: 'cancelSign',
  678. fullName: '退签',
  679. type: 'warning'
  680. });
  681. this.todoBtnList.push({
  682. id: 'startHandle',
  683. fullName: this.btnInfo?.proxyMark ? '代办' : '开始办理',
  684. type: 'primary',
  685. width: '100%'
  686. });
  687. }
  688. // 在办
  689. if (this.btnInfo?.hasRecallLaunchBtn) list.push({
  690. id: 'launchRecall',
  691. fullName: '撤回',
  692. type: 'warning',
  693. width: '100%'
  694. });
  695. if (this.btnInfo?.hasRecallAuditBtn) list.push({
  696. id: 'auditRecall',
  697. fullName: '撤回',
  698. type: 'warning',
  699. width: '100%'
  700. });
  701. if (this.btnInfo?.hasAssistSaveBtn) list.push({
  702. id: 'saveAssist',
  703. fullName: '保存'
  704. });
  705. if (this.btnInfo?.hasAuditBtn) list.push({
  706. id: 'audit',
  707. fullName: this.properties.auditBtnText || '同意',
  708. type: 'primary'
  709. });
  710. if (this.btnInfo?.hasReduceApproverBtn) {
  711. list.push({
  712. id: 'reduceApprover',
  713. fullName: this.properties.reduceApproverBtnText || '减签',
  714. type: 'primary',
  715. width: '100%'
  716. });
  717. }
  718. this.rightBtnList = list
  719. this.initBtnList()
  720. }
  721. },
  722. initBtnList() {
  723. const list = [];
  724. const properties = this.properties;
  725. const btnInfo = this.btnInfo;
  726. // 自定义按钮
  727. if (properties?.customBtns?.length) {
  728. properties?.customBtns.map((item) => {
  729. list.push({
  730. id: "customBtns",
  731. text: item.label,
  732. jsJson: item.jsJson,
  733. value: item.value
  734. });
  735. });
  736. }
  737. // 流程审批
  738. if (this.hasComment && this.config.opType != '-1' && this.rightBtnList.length) list.push({
  739. id: 'comment',
  740. text: '评论'
  741. });
  742. if (btnInfo?.hasViewStartFormBtn) list.push({
  743. id: 'initiationForm',
  744. text: '查看发起表单'
  745. });
  746. if (this.config.opType != 2) {
  747. if (btnInfo?.hasPressBtn) list.push({
  748. id: 'press',
  749. text: '催办'
  750. });
  751. if (btnInfo?.hasSaveAuditBtn) list.push({
  752. id: 'saveAudit',
  753. text: '暂存'
  754. });
  755. if (btnInfo?.hasBackBtn) list.push({
  756. id: 'back',
  757. text: properties.backBtnText || '退回'
  758. });
  759. if (btnInfo?.hasFreeApproverBtn) list.push({
  760. id: 'freeApprover',
  761. text: properties.freeApproverBtnText || '加签'
  762. });
  763. if (btnInfo?.hasTransferBtn) list.push({
  764. id: 'transfer',
  765. text: properties.transferBtnText || '转审'
  766. });
  767. if (btnInfo?.hasAssistBtn) list.push({
  768. id: 'assist',
  769. text: properties.assistBtnText || '协办'
  770. });
  771. if (btnInfo?.hasRevokeBtn) list.push({
  772. id: 'revoke',
  773. text: '撤销'
  774. });
  775. }
  776. this.actionList = list;
  777. },
  778. handleAction(index) {
  779. switch (this.actionList[index].id) {
  780. case 'assist':
  781. this.eventLauncher('assist')
  782. break;
  783. case 'back':
  784. this.eventLauncher('back')
  785. break;
  786. case 'save':
  787. this.eventLauncher('save')
  788. break;
  789. case 'transfer':
  790. this.eventReceiver({}, 'transfer')
  791. break;
  792. case 'reject':
  793. this.eventReceiver({}, 'reject')
  794. break;
  795. case 'launchRecall':
  796. this.eventReceiver({}, 'launchRecall')
  797. break;
  798. case 'auditRecall':
  799. this.eventReceiver({}, 'auditRecall')
  800. break;
  801. case 'cancelSign':
  802. this.eventReceiver({}, 'cancelSign')
  803. break;
  804. case 'saveAudit':
  805. this.eventLauncher('saveAudit')
  806. break;
  807. case 'revoke':
  808. this.eventReceiver({}, 'revoke')
  809. break;
  810. case 'freeApprover':
  811. this.eventLauncher('freeApprover')
  812. break;
  813. case 'approvalCancel':
  814. this.eventReceiver({}, 'approvalCancel')
  815. default:
  816. break;
  817. }
  818. },
  819. eventLauncher(eventType) {
  820. this.$refs.child && this.$refs.child.$refs.form && this.$refs.child
  821. .$refs.form.submit(eventType, this.selectflowUrgent.value)
  822. },
  823. eventReceiver(formData, eventType) {
  824. this.formData = {
  825. ...formData,
  826. flowId: this.flowInfo.flowId
  827. };
  828. this.eventType = eventType
  829. if (eventType === "sign" || eventType === "cancelSign") {
  830. let data = {
  831. ids: [this.config.operatorId],
  832. type: eventType === "sign" ? 0 : 1,
  833. };
  834. let signContent = "确定签收,签收后进入待办。";
  835. if (eventType === "cancelSign")
  836. signContent = "确定退签,确定后进入我的待签。";
  837. uni.showModal({
  838. title: "提示",
  839. content: signContent,
  840. success: (res) => {
  841. if (res.confirm) this.signFor(data);
  842. },
  843. });
  844. }
  845. if (eventType === "startHandle") {
  846. let data = {
  847. ids: [this.config.operatorId],
  848. };
  849. uni.showModal({
  850. title: "提示",
  851. content: "确定开始办理流程。",
  852. success: (res) => {
  853. if (res.confirm) this.Transact(data);
  854. },
  855. });
  856. }
  857. if (['save', 'submit', 'delegateSubmit'].includes(eventType)) return this.submitOrSave(eventType)
  858. if (['saveAudit', 'saveAssist'].includes(eventType)) return this.saveAudit()
  859. if (eventType === "reject" || eventType === 'audit') {
  860. if (this.properties.type === 'processing') {
  861. uni.showModal({
  862. title: "提示",
  863. content: "是否确认办理该审批单?",
  864. success: (res) => {
  865. if (res.confirm) return this.getCandidates(this.config.operatorId)
  866. },
  867. });
  868. } else {
  869. this.getCandidates(this.config.operatorId)
  870. }
  871. }
  872. if (eventType === 'back') return this.back()
  873. if (eventType === 'revoke') return this.jumRevokePage()
  874. if (eventType === 'assist') return this.operate()
  875. if (eventType === 'transfer') return this.operate(this.properties.transferBtnText)
  876. if (eventType === 'freeApprover') return this.getCandidates(this.config.operatorId)
  877. if (eventType === 'launchRecall' || eventType === 'auditRecall') this.operate()
  878. if (eventType === 'approvalCancel') {
  879. let data = {
  880. formData: this.formData,
  881. eventType: this.eventType
  882. }
  883. if (!this.properties.hasOpinion && !this.properties.hasSign) {
  884. return uni.showModal({
  885. title: '提示',
  886. content: `此操作将审批驳回终止流程,是否继续?`,
  887. success: res => {
  888. if (res.confirm) this.approvalCancelHandle(data)
  889. }
  890. })
  891. }
  892. return this.operate(this.properties.cancelBtnText || '驳回')
  893. }
  894. },
  895. // 撤销操作
  896. jumRevokePage() {
  897. let config = {
  898. type: this.eventType
  899. }
  900. uni.navigateTo({
  901. url: '/pages/workFlow/operate/revoke?config=' + encodeURIComponent(JSON.stringify(config))
  902. })
  903. },
  904. /* 退回 */
  905. back(data) {
  906. back(this.config.id).then(res => {
  907. this.backNodeList = res.data.list || []
  908. this.$nextTick(() => {
  909. this.operate(this.properties.backBtnText)
  910. })
  911. }).catch(() => {
  912. this.btnLoading = false
  913. });
  914. },
  915. /* 退回处理 */
  916. backHandle(data) {
  917. delete data.addSignParameter
  918. const query = {
  919. ...data,
  920. ...this.formData,
  921. };
  922. sendBack(query, this.config.id).then(res => {
  923. const errorData = res.data?.errorCodeList;
  924. if (errorData && Array.isArray(errorData) && errorData.length) return this.$refs.ErrorForm
  925. .init(errorData, query)
  926. this.toastAndBack(res.msg)
  927. }).catch(() => {
  928. this.btnLoading = false
  929. });
  930. },
  931. /* 开始办理 */
  932. Transact(data) {
  933. this.btnLoading = true
  934. // #ifdef MP-WEIXIN
  935. this.loading = true
  936. // #endif
  937. Transact(data).then(res => {
  938. this.config.opType = 3
  939. this.btnLoading = false
  940. // #ifdef MP-WEIXIN
  941. this.loading = false
  942. // #endif
  943. if (this.config.readonly) this.$set(this.config, 'readonly', false)
  944. this.initRightBtnList();
  945. this.initApprovalField()
  946. this.childFormKey = +new Date()
  947. uni.$emit('refresh')
  948. }).catch(err => {
  949. this.btnLoading = false
  950. })
  951. },
  952. /* 签收 */
  953. signFor(data) {
  954. this.btnLoading = true
  955. SignFor(data).then(res => {
  956. this.toastAndBack(res.msg)
  957. }).catch(err => {
  958. this.btnLoading = false
  959. })
  960. },
  961. /* 保存草稿 */
  962. saveAudit() {
  963. this.btnLoading = true
  964. const save = this.eventType == 'saveAssist' ? saveAssist : saveAudit;
  965. this.formData.id = this.config.taskId
  966. let data = {
  967. ...this.formData,
  968. id: this.config.taskId,
  969. flowId: this.flowInfo.flowId
  970. }
  971. save(this.config.operatorId, data).then(res => {
  972. uni.showToast({
  973. title: res.msg,
  974. icon: 'none',
  975. complete: () => {
  976. setTimeout(() => {
  977. uni.navigateBack()
  978. }, 1500)
  979. }
  980. });
  981. }).catch(() => {
  982. this.btnLoading = false
  983. })
  984. },
  985. //异常处理
  986. submitErrorForm(data) {
  987. let formData = {
  988. ...this.formData,
  989. ...data
  990. }
  991. if (this.eventType === "submit") {
  992. this.handleRequest(formData)
  993. } else {
  994. this.handleApproval(formData)
  995. }
  996. },
  997. getCandidates(id) {
  998. this.formData.flowId = this.flowInfo.flowId
  999. this.formData.f_id = this.config.taskId
  1000. let data = {
  1001. flowId: this.flowInfo.flowId,
  1002. flowUrgent: this.flowUrgent,
  1003. ...this.formData,
  1004. f_id: this.config.taskId
  1005. }
  1006. if (this.eventType === 'delegateSubmit') data.delegateUser = this.delegateUser
  1007. if (['audit', 'reject'].includes(this.eventType)) data.handleStatus = this.eventType === 'audit' ? 1 : 0
  1008. Candidates(id || 0, data).then(res => {
  1009. const data = res.data || {}
  1010. this.candidateType = data.type || 3
  1011. this.candidateList = data.list.filter(o => !o.isBranchFlow && o.isCandidates);
  1012. this.branchList = data.list || []
  1013. if (['audit', 'reject'].includes(this.eventType)) return this.operate()
  1014. if (this.eventType === 'freeApprover') return this.operate(this.properties.freeApproverBtnText)
  1015. if (this.eventType === 'save') return handleRequest();
  1016. if (this.candidateList.length || this.candidateType == 1) return this.operate('submit')
  1017. if (!this.candidateList.length && !this.properties.isCustomCopy && this.candidateType == 3) {
  1018. this.branchList = []
  1019. uni.showModal({
  1020. title: '提示',
  1021. content: '您确定要提交当前流程吗?',
  1022. success: res => {
  1023. if (res.confirm) {
  1024. this.btnLoading = true
  1025. this.handleRequest()
  1026. }
  1027. }
  1028. })
  1029. }
  1030. }).catch(() => {})
  1031. },
  1032. // getCandidates(id) {
  1033. // this.formData.flowId = this.flowInfo.flowId
  1034. // this.formData.f_id = this.config.taskId
  1035. // let data = {
  1036. // flowId: this.flowInfo.flowId,
  1037. // flowUrgent: this.flowUrgent,
  1038. // ...this.formData,
  1039. // f_id: this.config.taskId
  1040. // }
  1041. // if (this.eventType === 'delegateSubmit') data.delegateUser = this.delegateUser
  1042. // if (['audit', 'reject'].includes(this.eventType)) data.handleStatus = this.eventType === 'audit' ? 1 : 0
  1043. // Candidates(id || 0, data).then(res => {
  1044. // const data = res.data || {}
  1045. // this.candidateType = data.type || 3
  1046. // this.branchList = data.list || []
  1047. // this.candidateList = res.data.list.filter(o => !o.isBranchFlow && o.isCandidates)
  1048. // if (['audit', 'reject'].includes(this.eventType)) return this.operate()
  1049. // if (this.eventType === 'freeApprover') return this.operate(this.properties.freeApproverBtnText)
  1050. // if (['save', 'submit', 'delegateSubmit'].includes(this.eventType)) {
  1051. // if (this.eventType === 'save') return handleRequest();
  1052. // if (!this.candidateList.length && this.candidateType != 3) return this.operate('submit')
  1053. // this.branchList = []
  1054. // uni.showModal({
  1055. // title: '提示',
  1056. // content: '您确定要提交当前流程吗?',
  1057. // success: res => {
  1058. // if (res.confirm) {
  1059. // this.btnLoading = true
  1060. // this.handleRequest()
  1061. // }
  1062. // }
  1063. // })
  1064. // }
  1065. // }).catch(() => {})
  1066. // },
  1067. submitOrSave(eventType) {
  1068. this.formData.status = eventType === 'submit' ? 0 : 1
  1069. if (eventType === 'save') return this.handleRequest()
  1070. if (eventType === 'delegateSubmit') return this.getDelegateUser()
  1071. let id = this.config.opType === '-1' ? 0 : this.config.operatorId
  1072. this.getCandidates(id)
  1073. },
  1074. submitHandle(data) {
  1075. this.handleRequest(data)
  1076. },
  1077. selfHandleRequest() {
  1078. const formMethod = this.formData.id ? updateModel : createModel
  1079. formMethod(this.flowInfo.flowId, this.formData).then(res => {
  1080. uni.showToast({
  1081. title: res.msg,
  1082. icon: 'none',
  1083. complete: () => {
  1084. setTimeout(() => {
  1085. uni.navigateBack()
  1086. }, 1500)
  1087. }
  1088. })
  1089. }).catch(() => {})
  1090. },
  1091. //暂存提交
  1092. handleRequest(data) {
  1093. this.formData = {
  1094. ...this.formData,
  1095. ...data,
  1096. flowId: this.flowInfo.flowId,
  1097. candidateType: this.candidateType,
  1098. status: this.eventType === 'save' ? 0 : 1,
  1099. delegateUser: this.config.delegateUser || '',
  1100. id: this.config.id,
  1101. isFlow: this.config.isFlow || 1,
  1102. flowUrgent: this.flowUrgent
  1103. }
  1104. if (this.eventType === 'save') this.btnLoading = true
  1105. if (this.eventType === 'delegateSubmit') this.formData.delegateUser = this.delegateUser
  1106. let formMethod = this.formData.id ? Update : Create
  1107. // 流程
  1108. formMethod(this.formData).then(res => {
  1109. //异常处理
  1110. const errorData = res.data?.errorCodeList;
  1111. if (errorData && Array.isArray(errorData) && errorData.length) return this.$refs.ErrorForm
  1112. .init(errorData)
  1113. uni.showToast({
  1114. title: res.msg,
  1115. icon: 'none',
  1116. complete: () => {
  1117. setTimeout(() => {
  1118. uni.$emit('refresh')
  1119. uni.navigateBack()
  1120. }, 1500)
  1121. }
  1122. })
  1123. }).catch(() => {
  1124. this.btnLoading = false
  1125. })
  1126. },
  1127. //催办
  1128. handlePress() {
  1129. uni.showModal({
  1130. title: '提示',
  1131. content: '此操作将提示该节点尽快处理',
  1132. success: res => {
  1133. if (res.confirm) {
  1134. Press(this.config.id).then(res => {
  1135. this.$u.toast(res.msg)
  1136. })
  1137. }
  1138. }
  1139. })
  1140. },
  1141. operate() {
  1142. const candidateList = this.candidateList.filter(o => !o.isBranchFlow && o.isCandidates);
  1143. const branchList = this.branchList.filter(o => o.isBranchFlow);
  1144. let properties = this.properties;
  1145. let eventType = this.eventType;
  1146. let config = {
  1147. // 基本属性
  1148. type: eventType,
  1149. operatorId: this.config.operatorId,
  1150. formData: this.formData,
  1151. candidateType: this.candidateType,
  1152. branchList: branchList,
  1153. candidateList: candidateList,
  1154. rejectList: this.rejectList,
  1155. // 根据事件类型设置的属性
  1156. propertiesType: properties.type === 'processing' ? properties.type : '',
  1157. taskId: eventType === 'submit' ? 0 : this.config.taskId,
  1158. hasFreeApprover: eventType === 'freeApprover' ? properties.hasFreeApproverBtn : false,
  1159. // 流程相关属性
  1160. hasSign: properties.hasSign,
  1161. isCustomCopy: properties.isCustomCopy,
  1162. hasOpinion: properties.hasOpinion,
  1163. hasReduceApproverBtn: properties.hasReduceApproverBtn,
  1164. hasFile: properties.hasFile,
  1165. hasBackBtn: properties.hasBackBtn,
  1166. backNodeList: this.backNodeList,
  1167. // 回退相关属性
  1168. backNodeCode: properties.backNodeCode,
  1169. backMsgConfig: properties.backMsgConfig,
  1170. backType: properties.backType,
  1171. nodeName: properties.nodeName,
  1172. // 审批相关属性
  1173. approvalField: this.approvalField,
  1174. delegateUser: this.delegateUser,
  1175. // UI组件配置
  1176. props: {
  1177. label: 'nodeName',
  1178. value: 'nodeId'
  1179. }
  1180. };
  1181. uni.navigateTo({
  1182. url: '/pages/workFlow/operate/index?config=' + encodeURIComponent(JSON.stringify(config))
  1183. })
  1184. },
  1185. //撤销
  1186. revokeHandle(data) {
  1187. Revoke(this.config.id, {
  1188. handleOpinion: data.handleOpinion
  1189. }).then(res => {
  1190. this.toastAndBack(res.msg, true)
  1191. }).catch(() => {
  1192. this.btnLoading = false
  1193. })
  1194. },
  1195. //协办
  1196. assistHandle(data) {
  1197. Assist(this.config.id, data).then(res => {
  1198. this.toastAndBack(res.msg, true)
  1199. }).catch(() => {
  1200. this.btnLoading = false
  1201. })
  1202. },
  1203. //撤回
  1204. recallHandle(data) {
  1205. let id = this.eventType === 'auditRecall' ? this.config.operatorId : this.config.id
  1206. let recallMethod = this.eventType === 'auditRecall' ? auditRecall : launchRecall;
  1207. recallMethod(id, {
  1208. handleOpinion: data.handleOpinion,
  1209. signImg: data.signImg,
  1210. fileList: data.fileList
  1211. }).then(res => {
  1212. this.toastAndBack(res.msg)
  1213. }).catch(() => {
  1214. this.btnLoading = false
  1215. })
  1216. },
  1217. //同意
  1218. auditHandle(data) {
  1219. this.handleApproval(data)
  1220. },
  1221. //加签
  1222. freeApproverHandle(data) {
  1223. this.freeApprover(data)
  1224. },
  1225. //转审
  1226. transferHandle(data) {
  1227. Transfer(this.config.id, data).then(res => {
  1228. this.toastAndBack(res.msg, true)
  1229. }).catch(() => {
  1230. this.btnLoading = false
  1231. })
  1232. },
  1233. // 驳回审核
  1234. approvalCancelHandle(data) {
  1235. cancel(this.config.id, {
  1236. handleOpinion: data.handleOpinion,
  1237. signImg: data.signImg,
  1238. fileList: data.fileList,
  1239. eventType: 'approvalCancel',
  1240. }).then(res => {
  1241. this.toastAndBack(res.msg, true)
  1242. }).catch(err => {
  1243. this.btnLoading = false
  1244. })
  1245. },
  1246. //拒绝
  1247. rejectHandle(data) {
  1248. this.handleApproval(data)
  1249. },
  1250. //加签
  1251. freeApprover(data) {
  1252. const query = {
  1253. ...data,
  1254. ...this.formData,
  1255. id: this.config.taskId
  1256. }
  1257. FreeApprover(this.config.id, query).then(res => {
  1258. this.toastAndBack(res.msg, true)
  1259. }).catch(err => {
  1260. this.btnLoading = false
  1261. })
  1262. },
  1263. setBtnLoad(val) {
  1264. this.btnLoading = !!val
  1265. },
  1266. //通过,拒绝
  1267. handleApproval(data) {
  1268. delete data.addSignParameter
  1269. if (data.eventType === 'audit') this.handleStatus = 1;
  1270. if (data.eventType === 'reject') this.handleStatus = 0;
  1271. const query = {
  1272. ...data,
  1273. ...this.formData,
  1274. id: this.config.taskId,
  1275. flowId: this.flowInfo.flowId,
  1276. handleStatus: this.handleStatus
  1277. }
  1278. const approvalMethod = this.eventType === 'audit' ? Audit : Reject
  1279. approvalMethod(this.config.operatorId, query).then(res => {
  1280. //异常处理
  1281. const errorData = res.data?.errorCodeList;
  1282. if (errorData && Array.isArray(errorData) && errorData.length) return this.$refs.ErrorForm
  1283. .init(errorData, query)
  1284. this.toastAndBack(res.msg, true)
  1285. }).catch(err => {
  1286. this.btnLoading = false
  1287. })
  1288. },
  1289. //消息弹窗
  1290. toastAndBack(title, refresh) {
  1291. uni.showToast({
  1292. title: title,
  1293. icon: 'none',
  1294. mask: true,
  1295. complete: () => {
  1296. setTimeout(() => {
  1297. uni.$emit('refresh')
  1298. uni.navigateBack()
  1299. }, 1500)
  1300. }
  1301. })
  1302. },
  1303. handleShowSelect() {
  1304. if (this.config.opType == '-1') this.showFlowUrgent = true
  1305. },
  1306. seltConfirm(e) {
  1307. this.flowUrgent = e[0].value
  1308. this.selectflowUrgent = e[0]
  1309. this.defaultValue = [this.flowUrgentList.findIndex(item => item.value === e[0].value)] || [0]
  1310. }
  1311. }
  1312. }
  1313. </script>
  1314. <style lang="scss">
  1315. page {
  1316. background-color: #f0f2f6;
  1317. height: 100%;
  1318. }
  1319. .flow-urgent-value {
  1320. position: fixed;
  1321. top: var(--window-top);
  1322. width: 100%;
  1323. z-index: 99;
  1324. display: flex;
  1325. align-items: center;
  1326. justify-content: center;
  1327. height: 60rpx;
  1328. font-size: 28rpx;
  1329. }
  1330. .flowBefore-v {
  1331. display: flex;
  1332. flex-direction: column;
  1333. margin-top: 60rpx;
  1334. .workFlowTitle {
  1335. width: 100%;
  1336. padding: 0 32rpx 32rpx 32rpx;
  1337. background-color: #FFFFFF;
  1338. font-size: 32rpx;
  1339. font-weight: 700;
  1340. white-space: pre-wrap;
  1341. text-align: left;
  1342. }
  1343. .flowBefore-box {
  1344. height: 100%;
  1345. flex: 1;
  1346. display: flex;
  1347. flex-direction: column;
  1348. overflow: hidden;
  1349. padding-bottom: 3.3rem;
  1350. .sticky-box {
  1351. z-index: 500;
  1352. }
  1353. }
  1354. .swiper-box {
  1355. height: 100vh;
  1356. }
  1357. .swiper-item {
  1358. flex: 1;
  1359. flex-direction: row;
  1360. }
  1361. .scroll-v {
  1362. flex: 1;
  1363. /* #ifndef MP-ALIPAY */
  1364. flex-direction: column;
  1365. /* #endif */
  1366. width: 100%;
  1367. height: 100%;
  1368. }
  1369. .flowStatus {
  1370. position: absolute;
  1371. top: 90rpx;
  1372. right: 0;
  1373. border: 0;
  1374. margin: 20rpx;
  1375. opacity: 0.7;
  1376. z-index: 999;
  1377. image {
  1378. width: 200rpx;
  1379. }
  1380. }
  1381. .discuss_btn {
  1382. background-color: #fff;
  1383. position: fixed;
  1384. bottom: 0;
  1385. display: flex;
  1386. width: 100%;
  1387. // height: 88rpx;
  1388. // box-shadow: 0 -2rpx 8rpx #e1e5ec;
  1389. z-index: 20;
  1390. .custom-style {
  1391. background-color: #2979ff;
  1392. color: #FFFFFF;
  1393. width: 100%;
  1394. border-radius: 0 !important;
  1395. &::after {
  1396. border: none !important;
  1397. }
  1398. }
  1399. .content {
  1400. padding: 24rpx;
  1401. text-align: center;
  1402. .confrim-btn {
  1403. display: flex;
  1404. flex-direction: row;
  1405. .send {
  1406. flex: 1;
  1407. background-color: #2979ff;
  1408. color: #FFFFFF;
  1409. }
  1410. .cancel {
  1411. flex: 1;
  1412. }
  1413. }
  1414. }
  1415. }
  1416. }
  1417. .approverContent {
  1418. height: 1000rpx;
  1419. overflow-y: scroll;
  1420. padding: 0 20rpx;
  1421. .notice-warp {
  1422. top: 0;
  1423. height: 5.6rem;
  1424. .close-icon {
  1425. height: 60rpx;
  1426. padding: 10rpx 20rpx;
  1427. justify-content: flex-end;
  1428. }
  1429. }
  1430. .popup {
  1431. margin-top: 5.65rem;
  1432. .list-box {
  1433. .item {
  1434. border-bottom: 1rpx solid #f0f0f0;
  1435. padding: 20rpx 0;
  1436. }
  1437. }
  1438. }
  1439. }
  1440. .nodeList-v {
  1441. background-color: #fff;
  1442. }
  1443. .record-v {
  1444. padding: 32rpx 32rpx 10rpx;
  1445. background-color: #fff;
  1446. }
  1447. .discuss_box {
  1448. .discuss_list {
  1449. .time_button {
  1450. padding-left: 110rpx;
  1451. margin-top: 20rpx;
  1452. padding-right: 10rpx;
  1453. }
  1454. .discuss_txt {
  1455. width: 100%;
  1456. justify-content: space-between;
  1457. .discuss_txt_left {
  1458. .uName {
  1459. margin-left: 8px;
  1460. font-size: 14px;
  1461. font-family: PingFang SC;
  1462. line-height: 17rpx;
  1463. .replyText {
  1464. margin-left: 8px;
  1465. }
  1466. }
  1467. }
  1468. .del {
  1469. color: red;
  1470. margin-left: 20px;
  1471. }
  1472. .reply {
  1473. margin-left: 20px;
  1474. }
  1475. }
  1476. .discuss_content {
  1477. font-size: 12px;
  1478. padding-left: 70rpx;
  1479. .img_box {
  1480. margin: 40rpx 0;
  1481. }
  1482. }
  1483. }
  1484. }
  1485. .comment-creator-time {
  1486. font-size: 12px;
  1487. color: #999999;
  1488. font-family: PingFang SC;
  1489. line-height: 17rpx;
  1490. }
  1491. .comment-content-color {
  1492. color: #606266;
  1493. }
  1494. .comment-header-color {
  1495. color: #303133;
  1496. }
  1497. </style>