swMessage.vue 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120
  1. <template>
  2. <view style="background-color: #fff;" v-if="content != null">
  3. <view
  4. style="height: 100rpx;display: flex;align-items: center;justify-content: space-around;border-bottom: 1px solid #ceccca;"
  5. v-if="type == 0">
  6. <!-- <u-tabs :list="list1" :current="current" @click="click"></u-tabs> -->
  7. <view class="tab" :class="current==0?'active':''" @click="current = 0">
  8. 待办内容
  9. </view>
  10. <view style="border-left: 1px solid #ceccca;height: 80%;">
  11. </view>
  12. <view class="tab" :class="current==0?'':'active'" @click="current = 1">
  13. 流转记录
  14. </view>
  15. </view>
  16. <swiper style="background-color:#fff ;" :style="{height:type==0?'calc(100vh - 100rpx)':'100vh'}"
  17. :current="current" disable-touch>
  18. <swiper-item>
  19. <view style="height: 100%;overflow: auto;">
  20. <u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm"
  21. :labelStyle="{fontSize:'32rpx'}" labelWidth="100">
  22. <u-form-item label="来文标题:" borderBottom ref="item1">
  23. <view class="content">
  24. {{content.title}}
  25. <!-- <u--input v-model="content.title" border="none" :readonly='isEdit'></u--input> -->
  26. </view>
  27. </u-form-item>
  28. <u-form-item label="来文单位:" borderBottom ref="item1">
  29. <view class="content">
  30. {{content.sender}}
  31. <!-- <u--input v-model="content.sender" border="none" :readonly='isEdit'></u--input> -->
  32. </view>
  33. </u-form-item>
  34. <u-form-item label="来文日期:" borderBottom ref="item1">
  35. <!-- @click="typeChange('laiwen')" -->
  36. <view class="content">
  37. {{content.sendTime}}
  38. </view>
  39. </u-form-item>
  40. <u-form-item label="流水号:" borderBottom ref="item1">
  41. <view class="content">
  42. <!-- :readonly='isEdit' -->
  43. {{content.serial}}
  44. <!-- <u--input v-model="content.serial" border="none" readonly></u--input> -->
  45. </view>
  46. </u-form-item>
  47. <u-form-item label="文件字号:" borderBottom ref="item1">
  48. <view class="content">
  49. {{content.documentNum}}
  50. <!-- <u--input v-model="content.documentNum" border="none" readonly></u--input> -->
  51. </view>
  52. </u-form-item>
  53. <u-form-item label="紧急程度:" borderBottom ref="item1">
  54. {{content.status}}
  55. <!-- <uni-data-select v-model="content.emergencyDegree" :clear="false" placeholder="请选择紧急程度"
  56. :localdata="statusList"></uni-data-select> -->
  57. </u-form-item>
  58. <u-form-item label="密级:" borderBottom ref="item1">
  59. {{content.miji}}
  60. <!-- <uni-data-select v-model="content.degree" :clear="false" placeholder="请选择紧急程度"
  61. :localdata="mijiList"></uni-data-select> -->
  62. </u-form-item>
  63. <u-form-item label="文件类型:" borderBottom ref="item1">
  64. {{content.wjtype}}
  65. <!-- <uni-data-select v-model="content.receiveType" :clear="false" placeholder="请选择文件类型"
  66. :localdata="wjType"></uni-data-select> -->
  67. </u-form-item>
  68. <u-form-item label="正文查看:" borderBottom ref="item1">
  69. <view>
  70. <!-- <u--text :text="content.sendFile.name" :href="content.sendFile.url"></u--text> -->
  71. <u--text size="30rpx" :lines="3" color="#2979FF" :text="content.sendFile.name"
  72. @click="downLoad(content.sendFile.path)"></u--text>
  73. </view>
  74. </u-form-item>
  75. <u-form-item label="附件查看:" borderBottom ref="item1">
  76. <view v-if="content.fujianFileList != null && content.fujianFileList.length != 0 ">
  77. <u--text :text="v.yfile.name" :lines="3" v-for="(v,i) in content.fujianFileList"
  78. :key="i" size="30rpx" color="#2979FF" @click="downLoad(v.yfile.path)"></u--text>
  79. </view>
  80. </u-form-item>
  81. <u-form-item label="反馈文件:" borderBottom ref="item1" v-if="content.isFeedback === '1' ">
  82. <view style="display: inline;" class="example-body">
  83. <u-button v-if='type==0' style="width:380rpx" type="primary"
  84. @click="uploadPic()">上传</u-button>
  85. <!-- 展示 -->
  86. <div style="display: inline;">
  87. <view style="margin-bottom: 30rpx;display: flex;margin-top: 4rpx;"
  88. v-for="v in rowThis.ywFileList" :key="v.fileId">
  89. <u-icon style="margin-top: 4rpx;color: #2979FF;" name="attach"></u-icon><u--text
  90. :lines="1" size="14" color="#2979FF" decoration="underline" :text="v.name"
  91. @click="downLoad(v.url)">{{v.name}}</u--text>
  92. <u-icon @click="delFile(v)" style="margin-top: 0rpx;" name="close"></u-icon>
  93. </view>
  94. </div>
  95. <view v-if="content.feedbackFileList != null && content.feedbackFileList.length != 0 ">
  96. <view style="margin-bottom: 30rpx;display: flex;margin-top: 4rpx;"
  97. v-for="v in content.feedbackFileList" :key="v.fileId">
  98. <u-icon style="margin-top: 4rpx;color: #2979FF;" name="attach"></u-icon><u--text
  99. :lines="1" size="14" color="#2979FF" decoration="underline"
  100. :text="v.yfile.name"
  101. @click="downLoad(v.yfile.url)">{{v.yfile.name}}</u--text><u-icon <!--
  102. @click="delFile(v)" style="margin-top: 0rpx;" name="close"></u-icon> -->
  103. </view>
  104. </view>
  105. </view>
  106. <u-action-sheet @select="selectClick" :actions="listPic" :closeOnClickOverlay="true"
  107. :closeOnClickAction="true" title="请选择" :show="showUpload"></u-action-sheet>
  108. </u-form-item>
  109. <view v-if="type==0" style="padding-bottom: 40rpx;">
  110. <u-form-item label="下一节点:" borderBottom ref="item1" v-if="overType==false">
  111. <uni-data-select v-model="content.jdindex" placeholder="请选择下一节点" :localdata="list"
  112. :clear="false" @change="change"></uni-data-select>
  113. </u-form-item>
  114. <u-form-item label="处理人员:" borderBottom v-if="DeliveryWay==4" ref="item1"
  115. @click="choosePeo">
  116. <view :style="{color:content.users==null?'rgb(192, 196, 204)':''}">
  117. {{content.users==null?'请选择人员': content.userList}}
  118. </view>
  119. </u-form-item>
  120. <u-form-item label="审批意见:" borderBottom ref="item1" v-if="gdType == false">
  121. <u--textarea v-model="content.reviewMsg" placeholder="请输入审批意见" autoHeight
  122. border="none"></u--textarea>
  123. </u-form-item>
  124. <view v-if="gdType == true">
  125. <!-- <u-form-item label="密级:" borderBottom ref="item1">
  126. <uni-data-select v-model="content.levels" placeholder="请选择密级" :clear="false"
  127. :localdata="gd"></uni-data-select>
  128. </u-form-item> -->
  129. <u-form-item label="档案编号:" borderBottom ref="item1">
  130. <u--input v-model="content.archiveNo" placeholder="请输入档案编号"
  131. border="none"></u--input>
  132. </u-form-item>
  133. <u-form-item label="档案分类:" borderBottom ref="item1" @click="chooseGd">
  134. <view :style="{color:content.typeId==null?'rgb(192, 196, 204)':''}">
  135. {{content.typeId==null?'请选择档案分类': content.gdtype}}
  136. </view>
  137. </u-form-item>
  138. <u-form-item label="打印份数:" borderBottom ref="item1">
  139. <u--input v-model="content.printNum" placeholder="请输入打印份数" border="none"></u--input>
  140. </u-form-item>
  141. </view>
  142. <!-- <view v-if="backType == true">
  143. <u-form-item label="退回节点:" borderBottom ref="item1">
  144. <uni-data-select v-model="content.returnToNodeID" placeholder="请选择节点" :clear="false"
  145. :localdata="backlist"></uni-data-select>
  146. </u-form-item>
  147. <u-form-item label="退回意见:" borderBottom ref="item1" >
  148. <u--textarea v-model="content.backMsg" placeholder="请输入退回意见" autoHeight
  149. border="none"></u--textarea>
  150. </u-form-item>
  151. </view> -->
  152. <!-- <view style="margin: 20rpx 0;padding: 0 20rpx;color:rgb(137, 139, 145);font-size: 30rpx;"
  153. v-if="content.isFeedback==='1' && nodeId == 308">
  154. 注:当前节点可上传反馈文件,如需上传请在协同办公系统进行操作
  155. </view> -->
  156. <view style="margin-top: 40rpx;padding: 0 20rpx;box-sizing: border-box;"
  157. v-if="gdType == false">
  158. <u-button type="primary" text="提交" @click="submit"></u-button>
  159. </view>
  160. <view style="margin-top: 40rpx;padding: 0 20rpx;box-sizing: border-box;"
  161. v-if="gdType == true">
  162. <u-button type="primary" text="归档" @click="save"></u-button>
  163. </view>
  164. <view style="margin-top: 40rpx;padding: 0 20rpx;box-sizing: border-box;"
  165. v-if="yjType == true">
  166. <u-button type="warning" text="移交" @click="yjShow = true"></u-button>
  167. </view>
  168. <view style="margin-top: 40rpx;padding: 0 20rpx;box-sizing: border-box;"
  169. v-if="backType == true">
  170. <u-button type="error" text="退回" @click="show = true"></u-button>
  171. </view>
  172. </view>
  173. <view style="padding: 20rpx;box-sizing: border-box;" v-else>
  174. <u-steps :current="lzNum-1" direction="column" dot v-if="record != null">
  175. <view v-for="(v,i) in record" :key="i">
  176. <u-steps-item :error="v.ActionType==2?true:false"
  177. :title='v.NDFromT+"("+v.ActionTypeText+")"' v-if="v.ActionType==='28'">
  178. <view slot="desc" style="color: #606266">
  179. <view style="font-size: 28rpx;">
  180. 处理人:{{v.EmpFromT}}
  181. </view>
  182. <view style="font-size: 28rpx;">
  183. 到达时间:{{v.SDT}}
  184. </view>
  185. </view>
  186. </u-steps-item>
  187. <view v-else-if="v.ActionType22 != undefined">
  188. <u-steps-item :error="v.ActionType==2?true:false"
  189. v-for="(item,index) in v.ActionType22" :key="index"
  190. :title='item.NDFromT+"("+v.ActionTypeText+")"'>
  191. <view slot="desc" style="color:#606266;">
  192. <view style="font-size: 28rpx;">
  193. 处理部门:{{item.NodeData.split("DeptName=")[1]}}
  194. </view>
  195. <view style="font-size: 28rpx;">
  196. 处理人:{{item.Exer.split(',')[1]}}
  197. </view>
  198. <view style="font-size: 28rpx;">
  199. 处理时间:{{item.RDT}}
  200. </view>
  201. <view style="font-size: 28rpx;">
  202. 审核意见:{{item.Msg}}
  203. </view>
  204. </view>
  205. </u-steps-item>
  206. </view>
  207. <u-steps-item :error="v.ActionType==2?true:false"
  208. :title='v.NDFromT+"("+v.ActionTypeText+")"' v-else>
  209. <view slot="desc" style="color: #606266">
  210. <view style="font-size: 28rpx;">
  211. 处理部门:{{v.NodeData.split("DeptName=")[1]}}
  212. </view>
  213. <view style="font-size: 28rpx;">
  214. 处理人:{{v.Exer.split(',')[1]}}
  215. </view>
  216. <view style="font-size: 28rpx;">
  217. 处理时间:{{v.RDT}}
  218. </view>
  219. </view>
  220. </u-steps-item>
  221. </view>
  222. </u-steps>
  223. </view>
  224. </u--form>
  225. </view>
  226. </swiper-item>
  227. <swiper-item>
  228. <view
  229. style="padding: 20rpx;box-sizing: border-box;width: 100%;box-sizing: border-box;height: 100%;overflow: auto;">
  230. <u-steps :current="lzNum-1" direction="column" dot v-if="record != null">
  231. <view v-for="(v,i) in record" :key="i">
  232. <u-steps-item :error="v.ActionType==2?true:false"
  233. :title='v.NDFromT+"("+v.ActionTypeText+")"' v-if="v.ActionType ==='28'">
  234. <view slot="desc" style="color: #606266">
  235. <view style="font-size: 28rpx;">
  236. 处理人:{{v.EmpFromT}}
  237. </view>
  238. <view style="font-size: 28rpx;">
  239. 到达时间:{{v.SDT}}
  240. </view>
  241. </view>
  242. </u-steps-item>
  243. <view v-else-if="v.ActionType22 != undefined">
  244. <u-steps-item :error="v.ActionType==2?true:false" v-for="(item,index) in v.ActionType22"
  245. :key="index" :title='item.NDFromT+"("+v.ActionTypeText+")"'>
  246. <view slot="desc" style="color:#606266;">
  247. <view style="font-size: 28rpx;">
  248. 处理部门:{{item.NodeData.split("DeptName=")[1]}}
  249. </view>
  250. <view style="font-size: 28rpx;">
  251. 处理人:{{item.Exer.split(',')[1]}}
  252. </view>
  253. <view style="font-size: 28rpx;">
  254. 处理时间:{{item.RDT}}
  255. </view>
  256. <view style="font-size: 28rpx;">
  257. 审核意见:{{item.Msg}}
  258. </view>
  259. </view>
  260. </u-steps-item>
  261. </view>
  262. <u-steps-item :error="v.ActionType==2?true:false"
  263. :title='v.NDFromT+"("+v.ActionTypeText+")"' v-else>
  264. <view slot="desc" style="color: #606266">
  265. <view style="font-size: 28rpx;">
  266. 处理部门:{{v.NodeData.split("DeptName=")[1]}}
  267. </view>
  268. <view style="font-size: 28rpx;">
  269. 处理人:{{v.Exer.split(',')[1]}}
  270. </view>
  271. <view style="font-size: 28rpx;">
  272. 处理时间:{{v.RDT}}
  273. </view>
  274. </view>
  275. </u-steps-item>
  276. </view>
  277. </u-steps>
  278. </view>
  279. </swiper-item>
  280. </swiper>
  281. <u-modal :show="show" title="退回" :closeOnClickOverlay="true" showCancelButton @cancel="close" @close="close"
  282. @confirm="back">
  283. <view class="slot-content" style="width: 100%;">
  284. <u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm1"
  285. :labelStyle="{fontSize:'32rpx'}" labelWidth="100">
  286. <u-form-item label="退回节点:" borderBottom ref="item1">
  287. <uni-data-select v-model="content.returnToNodeID" placeholder="请选择节点" :clear="false"
  288. :localdata="backlist"></uni-data-select>
  289. </u-form-item>
  290. <u-form-item label="退回意见:" borderBottom ref="item1">
  291. <u--textarea v-model="content.backMsg" placeholder="请输入退回意见" autoHeight
  292. border="none"></u--textarea>
  293. </u-form-item>
  294. </u--form>
  295. </view>
  296. </u-modal>
  297. <u-modal :show="yjShow" title="移交" :closeOnClickOverlay="true" showCancelButton @cancel="close1" @close="close1"
  298. @confirm="yijiao">
  299. <view class="slot-content" style="width: 100%;">
  300. <u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm1"
  301. :labelStyle="{fontSize:'32rpx'}" labelWidth="100">
  302. <u-form-item label="移交人员:" borderBottom ref="item1">
  303. <uni-data-select v-model="content.toEmps" placeholder="请选择移交人员" :clear="false"
  304. :localdata="yjPeoList"></uni-data-select>
  305. </u-form-item>
  306. <u-form-item label="移交信息:" borderBottom ref="item1">
  307. <u--textarea v-model="content.yjMsg" placeholder="请输入移交信息" autoHeight
  308. border="none"></u--textarea>
  309. </u-form-item>
  310. </u--form>
  311. </view>
  312. </u-modal>
  313. <u-calendar placeholder="请选择日期" :show="show1" mode="single" allowSameDay @confirm="confirmOne"
  314. @close="show1 = false"></u-calendar>
  315. </view>
  316. </template>
  317. <script>
  318. export default {
  319. data() {
  320. return {
  321. miji: null,
  322. mijiList: [],
  323. typeDate: null,
  324. isEdit: false,
  325. show1: false, //日历
  326. deptList: [], //部门列表
  327. userList: [], //人员列表
  328. value: null,
  329. peoShow: false,
  330. listPic: [{
  331. name: '拍照上传'
  332. }, {
  333. name: '从相册上传'
  334. }],
  335. showUpload: false,
  336. uploadUrl: 'http://192.168.1.42:8087' + "/system/file/fileupload",
  337. rowThis: {
  338. ywFileList: []
  339. },
  340. current: 0,
  341. content: null,
  342. statusList: [],
  343. //流转记录
  344. record: null,
  345. //待办已办
  346. type: 0,
  347. //节点列表
  348. list: [],
  349. //是否选择下发人员
  350. selectType: 3,
  351. workid: null,
  352. flowNo: null,
  353. id: null,
  354. //tabs
  355. list1: [{
  356. name: '待办内容'
  357. },
  358. {
  359. name: '流转记录'
  360. }
  361. ],
  362. DeliveryWay: null, //判断是否需要审核意见
  363. gd: null, //密级列表
  364. gdType: false, //判断是否是归档
  365. overType: false, //判断是否结束
  366. //上个页面传过来的参数
  367. parameter: null,
  368. //已下载附件
  369. list2: [],
  370. list3: [],
  371. //文件类型
  372. wjType: [],
  373. //退回状态
  374. backType: false,
  375. //退回节点列表
  376. backlist: [],
  377. //退回模态框
  378. show: false,
  379. //移交模态框
  380. yjType: false,
  381. yjShow: false,
  382. yjPeoList: [],
  383. //流转记录数量
  384. lzNum: 0,
  385. //当前节点id
  386. nodeId: null
  387. }
  388. },
  389. onLoad(options) {
  390. let that = this
  391. that.getDicts()
  392. that.getWjType()
  393. that.getContent(options.workid)
  394. that.getRecord(options.workid)
  395. that.parameter = options
  396. that.nodeId = options.nodeId
  397. if (options.nodeName.indexOf('归档') != -1) {
  398. that.gdType = true
  399. that.getgd()
  400. }
  401. if (options.nodeId == 308 || options.nodeId == 1208) {
  402. this.getYjPeo()
  403. }
  404. that.type = options.type
  405. that.workid = options.workid
  406. that.flowNo = options.flowNo
  407. uni.setNavigationBarTitle({
  408. title: options.title
  409. })
  410. uni.$u.http.get('/jflow/restful/getSelfParas?workid=' + options.workid).then((res) => {
  411. console.log('res', res)
  412. if (res.data.SelfParas == "isEdit") {
  413. this.isEdit = false;
  414. }
  415. })
  416. },
  417. onShow() {
  418. uni.$once('query', (query) => {
  419. if (query.a == 1) {
  420. this.content.users = getApp().globalData.peoIdList
  421. this.content.userList = getApp().globalData.peoList
  422. this.$forceUpdate()
  423. } else if (query.a == 2) {
  424. this.content.typeId = getApp().globalData.gdId.split(",")[0]
  425. this.content.gdtype = getApp().globalData.gdId.split(",")[1]
  426. this.$forceUpdate()
  427. }
  428. })
  429. },
  430. methods: {
  431. confirmOne() {
  432. },
  433. uploadPic() {
  434. this.showUpload = true
  435. },
  436. typeChange(e) {
  437. if (!this.isEdit) {
  438. this.show1 = true
  439. this.typeDate = e
  440. }
  441. },
  442. downLoad(path) {
  443. console.log('’', path)
  444. uni.downloadFile({
  445. url: path,
  446. success: (res) => {
  447. var filePath = res.tempFilePath;
  448. uni.openDocument({
  449. filePath: filePath,
  450. showMenu: true,
  451. success: function(res) {
  452. console.log('打开文档成功');
  453. }
  454. });
  455. }
  456. })
  457. },
  458. delFile(itemFile) {
  459. console.log('itemFILE', itemFile)
  460. this.rowThis.ywFileList.splice(itemFile, 1)
  461. },
  462. selectClick(index) {
  463. console.log(index)
  464. let that = this
  465. if (index.name == '拍照上传') {
  466. uni.chooseImage({
  467. count: 1, // 默认9,设置图片的数量
  468. sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
  469. success: function(res) {
  470. // 返回选定照片的本地文件路径列表 tempFilePaths
  471. console.log(res.tempFilePaths);
  472. const pathUrl = res.tempFilePaths[0]
  473. uni.uploadFile({
  474. url: 'http://61.240.156.161:28188/prod-api' +
  475. "/system/file/fileupload",
  476. filePath: pathUrl,
  477. name: 'file',
  478. header: {
  479. Authorization: 'Bearer ' + uni.getStorageSync('token')
  480. },
  481. success: (response) => {
  482. console.log('1111111111111111')
  483. console.log('96+', response.data)
  484. console.log(that.rowThis)
  485. let dataFile = JSON.parse(response.data)
  486. that.rowThis.ywFileList.push(dataFile.data)
  487. // if (this.rowThis.ywFileList.length != 0) {
  488. // for (let i = 0; i < this.rowThis.ywFileList.length; i++) {
  489. // if (this.rowThis.ywFileList[i].response != undefined) {
  490. // this.dataSubmit.ywFileList.push(
  491. // this.rowThis.ywFileList[i].response.data
  492. // );
  493. // } else {
  494. // this.dataSubmit.ywFileList.push(this.rowThis
  495. // .ywFileList[i]);
  496. // }
  497. // }
  498. // }
  499. // this.dataSubmit.ywFileList.push()
  500. },
  501. fail: (response) => {
  502. console.log('fail', response)
  503. }
  504. })
  505. }
  506. });
  507. } else if (index.name == '从相册上传') {
  508. console.log('586', this.rowThis)
  509. uni.chooseImage({
  510. count: 1, // 默认9,设置图片的数量
  511. sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
  512. sourceType: ['album'], // 可以指定来源是相册还是相机,默认二者都有
  513. success: function(res) {
  514. // 返回选定照片的本地文件路径列表 tempFilePaths
  515. console.log(res);
  516. const pathUrl = res.tempFilePaths[0]
  517. uni.uploadFile({
  518. url: 'http://61.240.156.161:28188/prod-api' +
  519. "/system/file/fileupload",
  520. filePath: pathUrl,
  521. name: 'file',
  522. header: {
  523. Authorization: 'Bearer ' + uni.getStorageSync('token')
  524. },
  525. success: (response) => {
  526. console.log('1111111111111111')
  527. console.log('96+', response.data)
  528. console.log(that.rowThis)
  529. let dataFile = JSON.parse(response.data)
  530. that.rowThis.ywFileList.push(dataFile.data)
  531. console.log('that.rowThis.ywFileList', that.rowThis.ywFileList)
  532. },
  533. fail: (response) => {
  534. console.log('fail', response)
  535. }
  536. })
  537. }
  538. });
  539. }
  540. this.showUpload = false
  541. },
  542. click(e) {
  543. this.current = e.index
  544. },
  545. //查询收文详情
  546. getContent(id) {
  547. uni.$u.http.get('/offcial/receive/sel/' + id).then(res => {
  548. this.content = res.data
  549. console.log(this.content.feedbackFileList)
  550. this.content.workid = id
  551. if (this.gdType == true) {
  552. this.content.typeId = null //归档分类
  553. this.content.levels = null //密级
  554. this.content.archiveNo = null //档案编号
  555. this.content.archiveFormNo = null
  556. this.content.printNum = null //打印份数
  557. this.content.name = res.data.title //档案名称
  558. this.content.gdtype = null //分类名称
  559. }
  560. if (this.type == 0) {
  561. this.isOver(this.parameter)
  562. this.getBackNo(this.parameter.nodeId)
  563. }
  564. if (this.parameter.nodeId == 308 || this.parameter.nodeId == 1208) {
  565. this.content.toEmps = null //移交人员
  566. // this.content.toEmpsPeo = null //移交人员
  567. this.content.yjMsg = null //移交信息
  568. this.yjType = true
  569. }
  570. this.statusList.forEach(item => {
  571. if (item.dictValue == res.data.emergencyDegree) {
  572. this.content.status = item.dictLabel
  573. }
  574. })
  575. this.wjType.forEach(item => {
  576. if (item.dictValue == res.data.receiveType) {
  577. this.content.wjtype = item.dictLabel
  578. }
  579. })
  580. this.mijiList.forEach(item => {
  581. if (item.dictValue == res.data.degree) {
  582. this.content.miji = item.dictLabel
  583. }
  584. })
  585. })
  586. },
  587. // 查询字典数据详细 紧急程度
  588. getDicts() {
  589. uni.$u.http.get('/system/dict/data/type/urgent_type').then(res => {
  590. // this.statusList = res.data.map((item, index) => {
  591. // let obj = {
  592. // value: item.dictValue,
  593. // id: item.dictValue,
  594. // text: item.dictLabel
  595. // }
  596. // return obj
  597. // })
  598. this.statusList = res.data
  599. })
  600. },
  601. // 查询字典数据详细 文件类型
  602. getWjType() {
  603. uni.$u.http.get('/system/dict/data/type/sw_open_type').then(res => {
  604. // this.wjType = res.data.map((item, index) => {
  605. // let obj = {
  606. // value: item.dictValue,
  607. // id: item.dictValue,
  608. // text: item.dictLabel
  609. // }
  610. // return obj
  611. // })
  612. this.wjType = res.data
  613. })
  614. },
  615. getmiJi() {
  616. uni.$u.http.get('/system/dict/data/type/archive_levels').then(res => {
  617. // this.mijiList = res.data.map((item, index) => {
  618. // let obj = {
  619. // value: item.dictValue,
  620. // id: item.dictValue,
  621. // text: item.dictLabel
  622. // }
  623. // return obj
  624. // })
  625. this.mijiList = res.data
  626. })
  627. },
  628. //查询归档字典 秘籍
  629. getgd() {
  630. uni.$u.http.get('/system/dict/data/type/archive_levels').then(res => {
  631. this.gd = res.data.map((item, index) => {
  632. let obj = {
  633. value: item.dictCode,
  634. id: item.dictCode,
  635. text: item.dictLabel,
  636. }
  637. return obj
  638. })
  639. })
  640. },
  641. //查询流转记录
  642. getRecord(id) {
  643. uni.$u.http.get('/jflow/restful/getWfGenerWorkList', {
  644. params: {
  645. workID: id,
  646. token: uni.getStorageSync('jtoken')
  647. }
  648. }).then(res => {
  649. // console.log(res)
  650. this.record = res.trackList
  651. for (let i in res.trackList) {
  652. if (res.trackList[i].ActionType !== '28') {
  653. if (res.trackList[i].ActionType22 != undefined) {
  654. this.lzNum = this.lzNum + res.trackList[i].ActionType22.length
  655. } else {
  656. this.lzNum = this.lzNum + 1
  657. }
  658. }
  659. }
  660. if (this.type == 0) {
  661. // this.content.jdindex = null
  662. // this.content.nodeId = null
  663. // this.content.optionName = null
  664. this.content.reviewMsg = null //审批意见
  665. this.content.users = null //发送给指定人员
  666. this.content.userList = null //人员列表
  667. // this.id = this.list[0].id
  668. // this.content.jdindex = 0 //下一节点索引
  669. // this.DeliveryWay = this.list[0].DeliveryWay //下一节点状态
  670. // this.content.toNodeId = this.list[0].id //下一节点ID
  671. // this.content.nodeId = this.list[0].id //下一节点ID
  672. // this.content.optionName = this.list[0].text //节点名称
  673. }
  674. })
  675. },
  676. //查询下一步所有节点
  677. jdList(id, flow) {
  678. uni.$u.http.get('/jflow/restful/GenerNextStepAllNode', {
  679. params: {
  680. workid: id,
  681. token: uni.getStorageSync('jtoken'),
  682. flowNo: flow
  683. }
  684. }).then(res => {
  685. this.id = res[0].NodeID
  686. this.content.jdindex = 0 //下一节点索引
  687. this.DeliveryWay = res[0].DeliveryWay //下一节点状态
  688. this.content.toNodeId = res[0].NodeID //下一节点ID
  689. this.content.nodeId = res[0].NodeID //下一节点ID
  690. this.content.optionName = res[0].Name //节点名称
  691. this.list = res.map((item, index) => {
  692. let obj = {
  693. value: index,
  694. id: item.NodeID,
  695. text: item.Name,
  696. DeliveryWay: item.DeliveryWay
  697. }
  698. return obj
  699. })
  700. })
  701. },
  702. //节点选择
  703. change(e) {
  704. if (e >= 0) {
  705. this.id = this.list[e].id
  706. this.DeliveryWay = this.list[e].DeliveryWay
  707. this.content.toNodeId = this.list[e].id
  708. this.content.nodeId = this.list[e].id
  709. this.content.optionName = this.list[e].text
  710. }
  711. },
  712. //选择人员相关
  713. choosePeo() {
  714. if (this.id == null) {
  715. uni.showToast({
  716. title: "请先选择下一节点",
  717. icon: "none"
  718. })
  719. } else {
  720. uni.navigateTo({
  721. url: `/pages/peoChoose/peoChoose?workid=${this.workid}&flowNo=${this.flowNo}&id=${this.id}`,
  722. })
  723. }
  724. },
  725. //选择归档分类
  726. chooseGd() {
  727. uni.navigateTo({
  728. url: "/pages/file/file"
  729. })
  730. },
  731. //判断是否为最后一步
  732. isOver(v) {
  733. uni.$u.http.get("/jflow/restful/judgeNode", {
  734. params: {
  735. nodeId: v.nodeId
  736. }
  737. }).then(res => {
  738. // console.log(res)
  739. if (res.msg == "Y") {
  740. this.overType = true
  741. } else {
  742. this.overType = false
  743. if (this.nodeId != '308') {
  744. this.jdList(v.workid, v.flowNo)
  745. }
  746. }
  747. })
  748. },
  749. //提交待办
  750. submit() {
  751. if (this.overType == false && this.id == null) {
  752. uni.showToast({
  753. title: "请先选择下一节点",
  754. icon: "none"
  755. })
  756. } else if (this.content.users == null && this.DeliveryWay == 4) {
  757. uni.showToast({
  758. title: "请选择人员",
  759. icon: "none"
  760. })
  761. } else if (this.content.reviewMsg == null) {
  762. uni.showToast({
  763. title: "请填写审核意见",
  764. icon: "none"
  765. })
  766. } else {
  767. uni.showLoading({
  768. title: "提交中...",
  769. mask: true
  770. })
  771. this.content.feedbackFileList.push({
  772. fileId: this.rowThis.ywFileList.fileId,
  773. userName: this.rowThis.ywFileList.createBy,
  774. })
  775. uni.$u.http.put('/offcial/receive', this.content).then((res) => {
  776. console.log(res)
  777. })
  778. uni.$u.http.post("/offcial/receive/sendFlowToUsers", this.content, {
  779. header: {
  780. // 'content-Type: 'multipart/form-data'
  781. 'content-Type': 'application/x-www-form-urlencoded'
  782. }
  783. }).then(res => {
  784. // console.log(res)
  785. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  786. uni.showToast({
  787. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  788. .data.VarAcceptersName,
  789. icon: "none",
  790. mask: true,
  791. duration: 2000
  792. })
  793. } else if (res.data.VarAcceptersName == "结束") {
  794. uni.showToast({
  795. title: res.data.Message,
  796. icon: "none",
  797. mask: true,
  798. duration: 2000
  799. })
  800. } else {
  801. uni.showToast({
  802. title: res.data.Message.replace(/[@]/g, ""),
  803. icon: "none",
  804. mask: true,
  805. duration: 2000
  806. })
  807. }
  808. uni.$emit('query', {
  809. a: 'back'
  810. })
  811. setTimeout(() => {
  812. uni.navigateBack()
  813. }, 2000)
  814. }).catch(res => {
  815. uni.hideLoading()
  816. })
  817. }
  818. },
  819. //保存归档
  820. save() {
  821. // if (this.content.levels == null) {
  822. // uni.showToast({
  823. // title: "请选择密级",
  824. // icon: "none"
  825. // })
  826. // } else
  827. if (this.content.archiveNo == null) {
  828. uni.showToast({
  829. title: "请填写档案编号",
  830. icon: "none"
  831. })
  832. } else if (this.content.typeId == null) {
  833. uni.showToast({
  834. title: "请选择归档分类",
  835. icon: "none"
  836. })
  837. } else if (this.content.printNum == null || this.content.printNum < 1 || this.content.printNum % 1 != 0) {
  838. uni.showToast({
  839. title: "请填写打印份数",
  840. icon: "none"
  841. })
  842. } else {
  843. this.content.reviewMsg = "同意"
  844. uni.showLoading({
  845. title: "提交中...",
  846. mask: true
  847. })
  848. uni.$u.http.post("/offcial/archive/save", this.content).then(res => {
  849. uni.$u.http.get('/jflow/restful/GenerNextStepAllNode', {
  850. params: {
  851. workid: this.parameter.workid,
  852. token: uni.getStorageSync('jtoken'),
  853. flowNo: this.parameter.flowNo,
  854. }
  855. }).then(qwe => {
  856. uni.hideLoading()
  857. uni.showToast({
  858. title: "归档成功",
  859. icon: "none",
  860. mask: true,
  861. duration: 2000
  862. })
  863. uni.$emit('query', {
  864. a: 'back'
  865. })
  866. setTimeout(() => {
  867. uni.navigateBack()
  868. }, 2000)
  869. })
  870. }).catch(res => {
  871. uni.hideLoading()
  872. })
  873. }
  874. },
  875. //下载附件
  876. downLoad(v) {
  877. let that = this
  878. uni.navigateTo({
  879. url: "/pages/office/office?url=" + getApp().globalData.saveUrl + v
  880. })
  881. // uni.showLoading({
  882. // title:"打开中...",
  883. // })
  884. // if(that.list3.indexOf(v) == -1){
  885. // uni.downloadFile({
  886. // url:getApp().globalData.saveUrl+v,
  887. // success: function(res) {
  888. // if (res.statusCode === 200) {
  889. // that.list3.push(v)
  890. // that.list2.push(res.tempFilePath)
  891. // uni.openDocument({
  892. // filePath: res.tempFilePath,
  893. // success: function (res) {
  894. // uni.hideLoading();
  895. // }
  896. // });
  897. // }else{
  898. // uni.hideLoading()
  899. // uni.showToast({
  900. // title:"下载失败",
  901. // icon:'none'
  902. // })
  903. // }
  904. // },fail:function(){
  905. // uni.hideLoading()
  906. // uni.showToast({
  907. // title:"下载失败",
  908. // icon:'none'
  909. // })
  910. // }
  911. // });
  912. // }else{
  913. // uni.openDocument({
  914. // filePath: that.list2[that.list3.indexOf(v)],
  915. // success: function (res) {
  916. // uni.hideLoading();
  917. // }
  918. // });
  919. // }
  920. },
  921. //查询是否能退回
  922. getBackNo(id) {
  923. uni.$u.http.get("/jflow/restful/CurrNodeInfo?currNodeID=" + id).then(res => {
  924. if (res[0].ReturnRole != 0) {
  925. this.getBackList()
  926. this.backType = true
  927. this.content.returnToNodeID = null
  928. this.content.backMsg = null
  929. }
  930. })
  931. },
  932. //获取退回节点列表
  933. getBackList() {
  934. uni.$u.http.get("/jflow/restful/getReturnWorkNode", {
  935. params: {
  936. workid: this.parameter.workid,
  937. token: uni.getStorageSync('jtoken')
  938. }
  939. }).then(res => {
  940. this.backlist = res.map((item, index) => {
  941. let obj = {
  942. value: item.No,
  943. id: item.No,
  944. text: item.Name,
  945. }
  946. return obj
  947. })
  948. })
  949. },
  950. //退回上一节点
  951. back() {
  952. if (this.content.returnToNodeID == null) {
  953. uni.showToast({
  954. title: "请选择退回节点",
  955. icon: "none"
  956. })
  957. } else if (this.content.backMsg == null) {
  958. uni.showToast({
  959. title: "请填写退回意见",
  960. icon: "none"
  961. })
  962. } else {
  963. uni.showLoading({
  964. title: "退回中...",
  965. })
  966. uni.$u.http.get("/offcial/receive/NodeReturnWork", {
  967. params: {
  968. workid: this.parameter.workid,
  969. returnToNodeID: this.content.returnToNodeID,
  970. returnMsg: this.content.backMsg
  971. }
  972. }).then(res => {
  973. uni.hideLoading()
  974. this.close()
  975. uni.showToast({
  976. title: res,
  977. icon: "none",
  978. duration: 2000
  979. })
  980. uni.$emit('query', {
  981. a: 'back'
  982. })
  983. setTimeout(() => {
  984. uni.navigateBack()
  985. }, 2000)
  986. }).catch(error => {
  987. uni.hideLoading()
  988. uni.showToast({
  989. title: "请稍后重试",
  990. icon: "none"
  991. })
  992. })
  993. }
  994. },
  995. //关闭模态框
  996. close() {
  997. this.content.returnToNodeID = null
  998. this.content.backMsg = null
  999. this.show = false
  1000. },
  1001. //关闭模态框
  1002. close1() {
  1003. this.content.toEmps = null
  1004. this.content.yjMsg = null
  1005. this.yjShow = false
  1006. },
  1007. //移交
  1008. yijiao() {
  1009. if (this.content.toEmps == null) {
  1010. uni.showToast({
  1011. title: "请选择移交人员",
  1012. icon: "none"
  1013. })
  1014. } else if (this.content.yjMsg == null) {
  1015. uni.showToast({
  1016. title: "请填写移交信息",
  1017. icon: "none"
  1018. })
  1019. } else {
  1020. uni.showLoading({
  1021. title: "移交中...",
  1022. })
  1023. uni.$u.http.get("/jflow/restful/Node_Shift", {
  1024. params: {
  1025. workid: this.parameter.workid,
  1026. toEmps: this.content.toEmps,
  1027. msg: this.content.yjMsg
  1028. }
  1029. }).then(res => {
  1030. uni.hideLoading()
  1031. if (res.msg.indexOf('err') != -1) {
  1032. uni.showToast({
  1033. title: res.msg,
  1034. icon: "none",
  1035. duration: 2000
  1036. })
  1037. } else {
  1038. this.close1()
  1039. uni.showToast({
  1040. title: res.msg.split('@')[0],
  1041. icon: "none",
  1042. duration: 2000
  1043. })
  1044. uni.$emit('query', {
  1045. a: 'back'
  1046. })
  1047. setTimeout(() => {
  1048. uni.navigateBack()
  1049. }, 2000)
  1050. }
  1051. }).catch(error => {
  1052. uni.hideLoading()
  1053. uni.showToast({
  1054. title: error.msg.split('@')[1],
  1055. icon: "none"
  1056. })
  1057. })
  1058. }
  1059. },
  1060. //查询移交人员
  1061. getYjPeo() {
  1062. uni.$u.http.get('/jflow/restful/selectDpPersons').then(res => {
  1063. console.log(res)
  1064. this.yjPeoList = res.Emps.map((item, index) => {
  1065. let obj = {
  1066. value: item.no,
  1067. id: item.no,
  1068. text: item.name,
  1069. }
  1070. return obj
  1071. })
  1072. })
  1073. }
  1074. }
  1075. }
  1076. </script>
  1077. <style lang="scss" scoped>
  1078. .content {
  1079. font-size: 32rpx;
  1080. }
  1081. .tab {
  1082. width: 48%;
  1083. height: 100%;
  1084. box-sizing: border-box;
  1085. display: flex;
  1086. align-items: center;
  1087. justify-content: center;
  1088. }
  1089. .active {
  1090. color: #2979ff
  1091. }
  1092. ::v-deep .u-modal {
  1093. overflow: visible;
  1094. }
  1095. ::v-deep .u-popup__content {
  1096. overflow: visible !important;
  1097. }
  1098. </style>