flow.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  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 v-if='item.commonReviewComments' v-for="item1 in item.commonReviewComments"
  52. style="display: flex; align-items: center; justify-content: space-between;margin-top: 20rpx;">
  53. <view class="right-content">
  54. {{item1.test}}
  55. </view>
  56. <view class="del" @click="del(item1)">
  57. <image src="../static/delete.png" mode="widthFix" style="width: 30rpx;"></image>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="flex audit_img">
  62. <view v-for="(items,indexs) in item.fileUrl" class="url_css">
  63. <image :src="items" imageMode='aspectFill' class="url_img"
  64. @click="auditFile(items)"></image>
  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. }
  125. },
  126. watch: {
  127. auditList(val1, val2) {
  128. console.log(145)
  129. console.log(val1[1])
  130. this.list = val1
  131. for (let i = 0; i < this.list.length; i++) {
  132. // 获取当前人的hisId
  133. if (this.list[i].auditUsers && this.list[i].auditUsers == uni.getStorageSync("userInfo").id) {
  134. this.hisId = this.list[i].id
  135. }
  136. }
  137. console.log("this.hisId", this.hisId)
  138. }
  139. },
  140. methods: {
  141. del(val) {
  142. this.$api.doRequest('post', '/commonReviewComments/api/deleteInfo', {
  143. id: val.id,
  144. }).then(res => {
  145. console.log(res)
  146. uni.hideLoading()
  147. if (res.data.code == 200) {
  148. this.$emit('status', res.data.code)
  149. }
  150. })
  151. .catch(res => {
  152. uni.$u.toast(res.message);
  153. });
  154. },
  155. close() {
  156. this.show = false
  157. },
  158. passSubmit() {
  159. uni.showLoading({
  160. mask: true,
  161. title: "加载中"
  162. })
  163. this.$api.doRequest('post', '/commonReviewComments/api/addInfo', {
  164. hisId: this.hisId,
  165. test: this.text,
  166. }).then(res => {
  167. console.log(res)
  168. uni.hideLoading()
  169. if (res.data.code == 200) {
  170. this.show = false
  171. this.$emit('status', res.data.code)
  172. }
  173. })
  174. .catch(res => {
  175. uni.$u.toast(res.message);
  176. });
  177. },
  178. plClick() {
  179. this.show = true
  180. },
  181. },
  182. }
  183. </script>
  184. <style scoped lang="scss">
  185. .shade {
  186. position: fixed;
  187. top: 0;
  188. bottom: 0;
  189. left: 0;
  190. width: 100%;
  191. background: rgba(0, 0, 0, 0.4);
  192. z-index: 13;
  193. .wrap {
  194. position: absolute;
  195. left: 0;
  196. top: 0;
  197. right: 0;
  198. bottom: 0;
  199. margin: auto;
  200. background: #fff;
  201. width: calc(100% - 198rpx);
  202. height: 836rpx;
  203. border-radius: 20rpx;
  204. // overflow-y: scroll;
  205. .alert-top {
  206. padding: 33rpx;
  207. display: flex;
  208. justify-content: center;
  209. align-items: center;
  210. position: relative;
  211. }
  212. .title {
  213. font-size: 32rpx;
  214. font-weight: 600;
  215. color: #333333;
  216. }
  217. .close {
  218. position: absolute;
  219. right: 33rpx;
  220. }
  221. }
  222. }
  223. .cancel,
  224. .confirm {
  225. position: absolute;
  226. display: inline-block;
  227. width: 50%;
  228. text-align: center;
  229. bottom: 0;
  230. padding: 10px;
  231. border-top: 1px solid #eee;
  232. font-size: 34rpx;
  233. z-index: 10;
  234. background: #fff;
  235. }
  236. .cancel {
  237. left: 0;
  238. border-right: 1px solid #eee;
  239. color: #AFB3BF;
  240. }
  241. .confirm {
  242. right: 0;
  243. color: #22C572;
  244. }
  245. .textarea,
  246. .textarea1 {
  247. margin: 18rpx auto;
  248. width: 100%;
  249. background: #F9F9FA;
  250. border-radius: 10px;
  251. border: 1px solid #EEEEEE;
  252. font-size: 28rpx;
  253. padding: 10px;
  254. }
  255. .textCss {
  256. display: flex;
  257. justify-content: flex-end;
  258. width: 100%;
  259. text-align: right;
  260. color: #333333;
  261. }
  262. .u-textarea-style {
  263. margin: 20rpx;
  264. background: #F9F9FA;
  265. border-radius: 10px;
  266. border: 1px solid #EEEEEE;
  267. padding: 10rpx 20rpx;
  268. position: relative;
  269. height: 240px;
  270. /deep/.uni-textarea-textarea {
  271. width: 80%;
  272. }
  273. .right-bottom {
  274. position: absolute;
  275. right: 20rpx;
  276. bottom: 20rpx;
  277. color: #AFB3BF;
  278. }
  279. }
  280. /deep/.u-input__textarea {
  281. height: 300rpx !important;
  282. }
  283. /deep/.textarea1 .u-input__textarea {
  284. height: 200rpx !important;
  285. }
  286. .pl {
  287. background-color: #fff;
  288. border-radius: 50rpx;
  289. padding: 20rpx;
  290. text-align: center;
  291. color: #22C572;
  292. }
  293. .form_top {
  294. border-bottom: 1px solid #F5F6FA;
  295. padding-bottom: 10px;
  296. margin-bottom: 18rpx;
  297. font-size: 30rpx;
  298. font-weight: 600;
  299. }
  300. .content2 {
  301. background: white;
  302. margin: 20rpx 0;
  303. border-radius: 20rpx;
  304. padding: 20rpx;
  305. .row {
  306. display: flex;
  307. align-items: flex-start;
  308. .left {
  309. display: flex;
  310. align-items: center;
  311. .item1 {
  312. position: relative;
  313. .item-content {
  314. background: #617AE0;
  315. width: 44px;
  316. height: 44px;
  317. border-radius: 22px;
  318. line-height: 44px;
  319. text-align: center;
  320. font-size: 15px;
  321. color: #fff;
  322. }
  323. .status {
  324. position: absolute;
  325. border-radius: 50%;
  326. padding: 0px 8rpx;
  327. width: 40rpx;
  328. height: 40rpx;
  329. right: -3px;
  330. bottom: -3px;
  331. background: #fff;
  332. }
  333. .status.success {
  334. border: 1px solid rgb(60, 156, 255);
  335. }
  336. .status.error {
  337. border: 1px solid rgb(245, 108, 108);
  338. }
  339. .status.question {
  340. border: 1px solid #f9ae3d;
  341. }
  342. }
  343. }
  344. .right {
  345. width: 80%;
  346. // color: #B0B1B5;
  347. margin-top: 10px;
  348. .right-content {
  349. background: #F3F4F6;
  350. margin: 0 20rpx;
  351. padding: 10px;
  352. border-radius: 5px;
  353. color: #676D76;
  354. border-radius: 50rpx;
  355. }
  356. .right-item {
  357. display: flex;
  358. justify-content: space-between;
  359. .time {
  360. color: #999;
  361. }
  362. .item2 {
  363. margin-left: 20rpx;
  364. margin-top: -7px;
  365. .name {
  366. font-size: 28rpx;
  367. font-weight: 800;
  368. margin-bottom: 4px;
  369. }
  370. .status.success {
  371. color: #AFB3BF;
  372. }
  373. .status.error {
  374. color: rgb(245, 108, 108);
  375. }
  376. .status.question {
  377. color: #f9ae3d;
  378. }
  379. }
  380. }
  381. .audit_img {
  382. flex-wrap: wrap;
  383. // margin: 0 10rpx;
  384. margin-left: 20rpx;
  385. .url_css {
  386. border: 1px solid #999999;
  387. border-radius: 10px;
  388. margin-top: 10px;
  389. margin-right: 4px;
  390. overflow: hidden;
  391. width: 73px;
  392. height: 73px;
  393. .url_img {
  394. width: 73px;
  395. height: 73px;
  396. // border-radius: 10px;
  397. }
  398. }
  399. }
  400. }
  401. }
  402. .row2 {
  403. display: flex;
  404. .item-content {
  405. background: #22C572;
  406. width: 30px;
  407. height: 30px;
  408. border-radius: 50%;
  409. line-height: 30px;
  410. text-align: center;
  411. font-size: 12px;
  412. color: #fff;
  413. padding: 0 2px;
  414. margin: 0 auto;
  415. }
  416. .status {
  417. position: absolute;
  418. top: 0;
  419. right: 0;
  420. }
  421. }
  422. .row-line {
  423. width: 1px;
  424. height: 30px;
  425. background: #F2F2F2;
  426. margin: 10rpx 50rpx;
  427. }
  428. .audit {
  429. margin-top: 20rpx;
  430. }
  431. }
  432. .del {}
  433. </style>