flow.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. <template>
  2. <view class="ali">
  3. <u-form ref="uForm">
  4. <view class="form_top">流程</view>
  5. <view class="content2">
  6. <view v-for="(item,index) in auditList" :key='index' class="audit">
  7. <view class="row" v-if='item.desc!="_PLACEHOLDER_"'>
  8. <view class="left">
  9. <view class="item1">
  10. <view class="item-content">{{item.operatorTitle}}</view>
  11. <view v-if="item.status=='success'" class='status success'>
  12. <u-icon name="checkmark" color="#2979ff" size="24"></u-icon>
  13. </view>
  14. <view v-if="item.status=='error'" class='status error'>
  15. <u-icon name="close" color="rgb(245, 108, 108)" size="24"></u-icon>
  16. </view>
  17. <view v-if="item.status=='question'" class='status question'>
  18. <u-icon name="question" color="#f9ae3d" size="24"></u-icon>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="right">
  23. <view class="right-item">
  24. <view class="item2">
  25. <view class="name">{{item.operatorName}}
  26. </view>
  27. <!-- <view class='time'>{{item.updateDate}}</view> -->
  28. <view v-if="item.status=='success'" class="status success">
  29. {{item.commonStaffs1?item.staffscontent:item.desc}}<text
  30. v-if='!item.commonStaffs1&&index!=0'>已审核</text>
  31. </view>
  32. <view v-if="item.status=='error'" class="status error">
  33. {{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
  34. v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text>
  35. </view>
  36. <view v-if="item.status=='question'" class="status question">
  37. {{item.commonStaffs1?item.staffscontent:''}}<text
  38. v-if='!item.commonStaffs1'>未审核</text>
  39. </view>
  40. <!-- <view class="status success">吕波(已审核)</view> -->
  41. </view>
  42. <view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0'
  43. class='time'>
  44. {{item.updateDate}}
  45. </view>
  46. </view>
  47. <view class="">
  48. <view v-if='item.auditMind' class="right-content">
  49. {{item.auditMind}}
  50. </view>
  51. <view class="flex audit_img">
  52. <view v-for="(items,indexs) in item.fileUrl" class="url_css">
  53. <image :src="items" imageMode='aspectFill' class="url_img"
  54. @click="auditFile(items)"></image>
  55. </view>
  56. </view>
  57. <view v-if='item.commonReviewComments' v-for="item1 in item.commonReviewComments"
  58. style="display: flex; align-items: center; justify-content: space-between;margin-top: 20rpx;">
  59. <view class="right-content">
  60. {{item1.test}}
  61. </view>
  62. <view class="del" @click="del(item1)" v-if="item1.createUserId==userInfo.id">
  63. <image src="../static/delete.png" mode="widthFix" style="width: 30rpx;"></image>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <view v-if='item.commonStaffs1' class="right">
  69. <u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28">
  70. </u-icon>
  71. </view>
  72. </view>
  73. <view v-if='item.showflow' style='padding:10px 0 0 50px;'>
  74. <view class='row2'>
  75. <view v-for='item1 in item.commonStaffs1' style='margin:5px;text-align:center;'>
  76. <view class="item-content">
  77. <u-icon v-if='item1.status' name="checkmark" color="#fff" size="14"></u-icon>
  78. <u-icon v-if='!item1.status' name="question" color="#f9ae3d" size="14"></u-icon>
  79. </view>
  80. <view class="name">{{item1.staffName}}</view>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="row-line" v-if="index!= auditList.length - 1&&item.desc!='_PLACEHOLDER_'"></view>
  85. </view>
  86. </view>
  87. </u-form>
  88. <view class="pl" @click="plClick">
  89. 评论
  90. </view>
  91. <view v-if='show' class="shade">
  92. <view class="wrap">
  93. <view class="alert-top">
  94. <view class="title">
  95. 评论
  96. </view>
  97. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  98. </view>
  99. <view style='overflow-y: scroll;height: 732rpx;padding-bottom:102rpx;'>
  100. <view class="u-textarea-style">
  101. <view class="right-bottom">
  102. {{text.length}}/500个字
  103. </view>
  104. <textarea maxlength="500" v-model='text' placeholder="请在此输入评论内容" name="" id="" cols="30"
  105. rows="11"></textarea>
  106. </view>
  107. </view>
  108. <view @click='close()' class="cancel">取消</view>
  109. <view @click='passSubmit()' class="confirm">确定</view>
  110. </view>
  111. </view>
  112. <u-toast ref="uToast" />
  113. </view>
  114. </template>
  115. <script>
  116. export default {
  117. props: ["auditList"],
  118. data() {
  119. return {
  120. show: false,
  121. hisId: '',
  122. list: [],
  123. text: "",
  124. userInfo: {}
  125. }
  126. },
  127. watch: {
  128. auditList(val1, val2) {
  129. console.log(145)
  130. console.log(val1)
  131. this.list = val1
  132. this.userInfo = uni.getStorageSync("userInfo")
  133. for (let i = 0; i < this.list.length; i++) {
  134. // 获取当前人的hisId
  135. if (this.list[i].auditUsers && this.list[i].auditUsers == this.userInfo.id) {
  136. this.hisId = this.list[i].id
  137. }
  138. }
  139. console.log("this.hisId", this.hisId)
  140. }
  141. },
  142. methods: {
  143. del(val) {
  144. this.$api.doRequest('post', '/commonReviewComments/api/deleteInfo', {
  145. id: val.id,
  146. }).then(res => {
  147. console.log(res)
  148. uni.hideLoading()
  149. if (res.data.code == 200) {
  150. this.$emit('status', res.data.code)
  151. }
  152. })
  153. .catch(res => {
  154. uni.$u.toast(res.message);
  155. });
  156. },
  157. close() {
  158. this.show = false
  159. },
  160. passSubmit() {
  161. uni.showLoading({
  162. mask: true,
  163. title: "加载中"
  164. })
  165. this.$api.doRequest('post', '/commonReviewComments/api/addInfo', {
  166. hisId: this.hisId,
  167. test: this.text,
  168. }).then(res => {
  169. console.log(res)
  170. uni.hideLoading()
  171. if (res.data.code == 200) {
  172. this.show = false
  173. this.$emit('status', res.data.code)
  174. }
  175. })
  176. .catch(res => {
  177. uni.$u.toast(res.message);
  178. });
  179. },
  180. plClick() {
  181. this.text = ""
  182. this.show = true
  183. },
  184. },
  185. }
  186. </script>
  187. <style scoped lang="scss">
  188. .shade {
  189. position: fixed;
  190. top: 0;
  191. bottom: 0;
  192. left: 0;
  193. width: 100%;
  194. background: rgba(0, 0, 0, 0.4);
  195. z-index: 13;
  196. .wrap {
  197. position: absolute;
  198. left: 0;
  199. top: 0;
  200. right: 0;
  201. bottom: 0;
  202. margin: auto;
  203. background: #fff;
  204. width: calc(100% - 198rpx);
  205. height: 836rpx;
  206. border-radius: 20rpx;
  207. // overflow-y: scroll;
  208. .alert-top {
  209. padding: 33rpx;
  210. display: flex;
  211. justify-content: center;
  212. align-items: center;
  213. position: relative;
  214. }
  215. .title {
  216. font-size: 32rpx;
  217. font-weight: 600;
  218. color: #333333;
  219. }
  220. .close {
  221. position: absolute;
  222. right: 33rpx;
  223. }
  224. }
  225. }
  226. .cancel,
  227. .confirm {
  228. position: absolute;
  229. display: inline-block;
  230. width: 50%;
  231. text-align: center;
  232. bottom: 0;
  233. padding: 10px;
  234. border-top: 1px solid #eee;
  235. font-size: 34rpx;
  236. z-index: 10;
  237. background: #fff;
  238. }
  239. .cancel {
  240. left: 0;
  241. border-right: 1px solid #eee;
  242. color: #AFB3BF;
  243. }
  244. .confirm {
  245. right: 0;
  246. color: #22C572;
  247. }
  248. .textarea,
  249. .textarea1 {
  250. margin: 18rpx auto;
  251. width: 100%;
  252. background: #F9F9FA;
  253. border-radius: 10px;
  254. border: 1px solid #EEEEEE;
  255. font-size: 28rpx;
  256. padding: 10px;
  257. }
  258. .textCss {
  259. display: flex;
  260. justify-content: flex-end;
  261. width: 100%;
  262. text-align: right;
  263. color: #333333;
  264. }
  265. .u-textarea-style {
  266. margin: 20rpx;
  267. background: #F9F9FA;
  268. border-radius: 10px;
  269. border: 1px solid #EEEEEE;
  270. padding: 10rpx 20rpx;
  271. position: relative;
  272. height: 240px;
  273. /deep/.uni-textarea-textarea {
  274. width: 80%;
  275. }
  276. .right-bottom {
  277. position: absolute;
  278. right: 20rpx;
  279. bottom: 20rpx;
  280. color: #AFB3BF;
  281. }
  282. }
  283. /deep/.u-input__textarea {
  284. height: 300rpx !important;
  285. }
  286. /deep/.textarea1 .u-input__textarea {
  287. height: 200rpx !important;
  288. }
  289. .pl {
  290. background-color: #fff;
  291. border-radius: 50rpx;
  292. padding: 20rpx;
  293. text-align: center;
  294. color: #22C572;
  295. margin-bottom:30rpx;
  296. }
  297. .form_top {
  298. border-bottom: 1px solid #F5F6FA;
  299. padding-bottom: 10px;
  300. margin-bottom: 18rpx;
  301. font-size: 30rpx;
  302. font-weight: 600;
  303. }
  304. .content2 {
  305. background: white;
  306. margin: 20rpx 0;
  307. border-radius: 20rpx;
  308. padding: 20rpx;
  309. .row {
  310. display: flex;
  311. align-items: flex-start;
  312. .left {
  313. display: flex;
  314. align-items: center;
  315. .item1 {
  316. position: relative;
  317. .item-content {
  318. background: #617AE0;
  319. width: 44px;
  320. height: 44px;
  321. border-radius: 22px;
  322. line-height: 44px;
  323. text-align: center;
  324. font-size: 15px;
  325. color: #fff;
  326. }
  327. .status {
  328. position: absolute;
  329. border-radius: 50%;
  330. padding: 0px 8rpx;
  331. width: 40rpx;
  332. height: 40rpx;
  333. right: -3px;
  334. bottom: -3px;
  335. background: #fff;
  336. }
  337. .status.success {
  338. border: 1px solid rgb(60, 156, 255);
  339. }
  340. .status.error {
  341. border: 1px solid rgb(245, 108, 108);
  342. }
  343. .status.question {
  344. border: 1px solid #f9ae3d;
  345. }
  346. }
  347. }
  348. .right {
  349. width: 80%;
  350. // color: #B0B1B5;
  351. margin-top: 10px;
  352. .right-content {
  353. background: #F3F4F6;
  354. margin: 0 20rpx;
  355. padding: 10px;
  356. border-radius: 5px;
  357. color: #676D76;
  358. border-radius: 50rpx;
  359. }
  360. .right-item {
  361. display: flex;
  362. justify-content: space-between;
  363. .time {
  364. color: #999;
  365. }
  366. .item2 {
  367. margin-left: 20rpx;
  368. margin-top: -7px;
  369. .name {
  370. font-size: 28rpx;
  371. font-weight: 800;
  372. margin-bottom: 4px;
  373. }
  374. .status.success {
  375. color: #AFB3BF;
  376. }
  377. .status.error {
  378. color: rgb(245, 108, 108);
  379. }
  380. .status.question {
  381. color: #f9ae3d;
  382. }
  383. }
  384. }
  385. .audit_img {
  386. flex-wrap: wrap;
  387. // margin: 0 10rpx;
  388. margin-left: 20rpx;
  389. .url_css {
  390. border: 1px solid #999999;
  391. border-radius: 10px;
  392. margin-top: 10px;
  393. margin-right: 4px;
  394. overflow: hidden;
  395. width: 73px;
  396. height: 73px;
  397. .url_img {
  398. width: 73px;
  399. height: 73px;
  400. // border-radius: 10px;
  401. }
  402. }
  403. }
  404. }
  405. }
  406. .row2 {
  407. display: flex;
  408. .item-content {
  409. background: #22C572;
  410. width: 30px;
  411. height: 30px;
  412. border-radius: 50%;
  413. line-height: 30px;
  414. text-align: center;
  415. font-size: 12px;
  416. color: #fff;
  417. padding: 0 2px;
  418. margin: 0 auto;
  419. }
  420. .status {
  421. position: absolute;
  422. top: 0;
  423. right: 0;
  424. }
  425. }
  426. .row-line {
  427. width: 1px;
  428. height: 30px;
  429. background: #F2F2F2;
  430. margin: 10rpx 50rpx;
  431. }
  432. .audit {
  433. margin-top: 20rpx;
  434. }
  435. }
  436. .del {}
  437. </style>