ApproveView.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <view>
  3. <view class="approveMain">
  4. <view class="approveMain_text">审批流程</view>
  5. <u-time-line>
  6. <u-time-line-item node-top="10" v-for="(item,i) in activityList" :key="i">
  7. <template v-slot:node>
  8. <view>
  9. <view class="u-node" :class="{
  10. viewc2:item.status==1,
  11. }">
  12. <!-- 此处为uView的icon组件 -->
  13. <!-- <u-icon name="checkmark" color="#fff" :size="24"></u-icon> -->
  14. </view>
  15. </view>
  16. </template>
  17. <template v-slot:content>
  18. <view class="approveItem_main">
  19. <view class="approveItem_a1">
  20. <view class="approveItem_a1_text1" :class="{
  21. viewc3:item.status==1
  22. }" >
  23. <view class="approveItem_a1_text1_a" >
  24. {{item.activityName}}<span class="approveItem_a1_text1or" v-if="item.operation=='or'&&((item.wfProcinstActUserList&&item.wfProcinstActUserList.length>1)||(item.wfProcinstActRegUserList&&item.wfProcinstActRegUserList.length>1))">或签</span>
  25. </view>
  26. <view class="approveItem_a1_text1_b" v-if="!initStart&&!item.isAlterChecker" >
  27. 是否跳过此环节<u-switch v-model="item.checked" size="25"></u-switch>
  28. </view>
  29. </view>
  30. <view class="approveItem_a1_text2" v-if="item.action!=0" >
  31. {{item.finishTime}}
  32. </view>
  33. <view class="approveItem_a1_text3">
  34. <view class="approveItem_a1_text3Img" v-for="(it,j) in (item.wfProcinstActRegUserList||item.wfProcinstActUserList)"
  35. :key="i+'_'+j" >
  36. <template >
  37. <!-- -->
  38. <view class="approveItem_a1_text3Img_item1" >
  39. <view class="approveItem_a1_text3Img_item0"
  40. v-if="!initStart&&(item.wfProcinstActRegUserList&&item.wfProcinstActRegUserList.length>1)&&!item.isAlterChecker">
  41. <u-checkbox
  42. @change="checkboxChange"
  43. v-model="it.checked"
  44. :key="i+'_'+j"
  45. ></u-checkbox>
  46. </view>
  47. <view class="approveItem_a1_text3Img_item1_1">
  48. <u-avatar size="50" :src="it.headImg" class="img"></u-avatar>
  49. <u-badge size="mini" count="x" type="info" :absolute="false" v-if="0">
  50. </u-badge>
  51. </view>
  52. <view class="approveItem_a1_text3Img_item1_2">
  53. <view class="approveItem_a1_text3Img_item1_2a"
  54. > {{it.orgName||it.departmentName}}</view>
  55. <view class="approveItem_a1_text3Img_item1_2b"
  56. ><span v-if="it.type==2||it.processType==2" class="viewc">抄送</span>{{it.name||it.personName}}</view>
  57. </view>
  58. </view>
  59. </template>
  60. <view v-if="initStart&&it.type==1&&it.action!=0" class="approveItem_a1_text3Img_item2" >
  61. <view>
  62. 审批结果:<span :style="it.action==1?'color:#4CAF50':'color:red'">[{{it.action==1?'通过':'退回'}}]</span>
  63. </view>
  64. <view>{{it.finishTime}}</view>
  65. <view >
  66. 审批意见:<br/>{{it.remark}}
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="approveItem_a2" v-if="0">
  73. <view class="a2_span" @click="gotoSelectPerson(item)">+</view>
  74. <span class="a2_span_2">*</span>
  75. </view>
  76. </view>
  77. </template>
  78. </u-time-line-item>
  79. </u-time-line>
  80. <u-divider>已经到底了</u-divider>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. export default {
  86. name:"approve",
  87. props:{
  88. edit: 0,
  89. skip: {
  90. type: Boolean,
  91. default: false
  92. },
  93. initStart: {
  94. type: Boolean,
  95. default: true
  96. },
  97. activityList: {
  98. type: Array,
  99. default () {
  100. return [];
  101. }
  102. },
  103. status:""
  104. },
  105. data() {
  106. return {
  107. };
  108. },methods:{
  109. checkboxChange(){
  110. this.$forceUpdate()
  111. }
  112. }
  113. }
  114. </script>
  115. <style scoped lang="scss">
  116. .approveMain_text {
  117. font-weight: bold;
  118. color: rgba(51, 51, 51, 1);
  119. font-size: 32rpx;
  120. padding-bottom: 20rpx;
  121. padding-left: 32rpx;
  122. border-bottom: 1px solid #C8C8C8;
  123. margin-bottom: 16rpx;
  124. // padding-top: 32rpx;
  125. }
  126. .viewc{
  127. background-color: #4CAF50;
  128. color: #fff;
  129. padding: 0px 2px;
  130. border-radius: 8rpx;
  131. font-size: 20rpx;
  132. }
  133. .approveMain {
  134. background: #fff;
  135. padding-bottom: 180rpx;
  136. padding-top: 20rpx;
  137. .approveItem_main {
  138. display: flex;
  139. justify-content: space-between;
  140. margin-bottom: 30rpx;
  141. margin-right: 32rpx;
  142. .approveItem_a1 {
  143. width: 100%;
  144. .approveItem_a1_text1 {
  145. display: flex;
  146. align-items: center;
  147. justify-content: space-between;
  148. color: rgba(16, 16, 16, 1);
  149. font-size: 32rpx;
  150. .approveItem_a1_text1_a{
  151. display: flex;
  152. align-items: center;
  153. }
  154. .approveItem_a1_text1_b{
  155. color: #333333;
  156. display: flex;
  157. font-size: 20rpx;
  158. }
  159. .approveItem_a1_text1or{
  160. background-color: #FF5722;
  161. color: #fff;
  162. padding: 0px 2px;
  163. border-radius: 8rpx;
  164. font-size: 20rpx;
  165. }
  166. }
  167. .approveItem_a1_text2 {
  168. margin-bottom: 16rpx;
  169. color: rgba(119, 119, 119, 1);
  170. font-size: 24rpx;
  171. }
  172. .approveItem_a1_text3 {
  173. color: rgba(51, 51, 51, 1);
  174. font-size: 24rpx;
  175. display: flex;
  176. flex-direction: row;
  177. flex-wrap: wrap;
  178. .approveItem_a1_text3Img {
  179. margin-right: 30rpx;
  180. margin-top: 10rpx;
  181. margin-bottom: 10rpx;
  182. display: flex;
  183. align-items: center;
  184. width: 100%;
  185. justify-content: space-between;
  186. .approveItem_a1_text3Img_item0{
  187. display: flex;
  188. align-items: center;
  189. width: 40rpx;
  190. }
  191. .approveItem_a1_text3Img_item1{
  192. display: flex;
  193. align-items: center;
  194. .approveItem_a1_text3Img_item1_2{
  195. margin-left: 8rpx;
  196. .approveItem_a1_text3Img_item1_2a{
  197. color:#3a7cf7 ;
  198. font-size: 28rpx;
  199. }
  200. .approveItem_a1_text3Img_item1_2b{
  201. font-size: 24rpx;
  202. }
  203. }
  204. }
  205. .approveItem_a1_text3Img_item2{
  206. background: #e0dada;
  207. padding: 4rpx;
  208. width: 60%;
  209. }
  210. /deep/.u-badge {
  211. position: relative !important;
  212. top: -40rpx !important;
  213. right: 10rpx !important;
  214. }
  215. }
  216. }
  217. }
  218. .approveItem_a2 {
  219. .a2_span {
  220. border-radius: 4px;
  221. text-align: center;
  222. border: 1px solid rgba(227, 227, 227, 1);
  223. width: 72rpx;
  224. height: 72rpx;
  225. line-height: 60rpx;
  226. font-size: 48rpx;
  227. color: #9F9F9F;
  228. }
  229. .a2_span_2 {
  230. position: relative;
  231. top: -84rpx;
  232. left: 60rpx;
  233. color: red;
  234. }
  235. }
  236. }
  237. }
  238. .u-node {
  239. width: 18rpx;
  240. height: 18rpx;
  241. border-radius: 100rpx !important;
  242. display: flex;
  243. justify-content: center;
  244. align-items: center;
  245. background: #d0d0d0;
  246. }
  247. .viewc2{
  248. width: 27rpx;
  249. height: 27rpx;
  250. background: #4CAF50;
  251. }
  252. .viewc3{
  253. color: #4CAF50 !important;
  254. }
  255. </style>