index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <script setup>
  2. import {
  3. ref,
  4. reactive
  5. } from "vue";
  6. import {
  7. onLoad,
  8. } from "@dcloudio/uni-app";
  9. import {
  10. getProcessList,
  11. getVideoAddress,
  12. getProcessContact
  13. } from "@/api/work/preFlow.js";
  14. import config from '@/config.js';
  15. const videoPoster = ref(null);
  16. let orginalList = [];
  17. let processList = ref([]);
  18. let lastItem = ref([]);
  19. let videoUrl = ref(null);
  20. let imageUrl = ref(null);
  21. const preViewImage = () => {
  22. uni.previewImage({
  23. current: 0,
  24. urls: [imageUrl.value],
  25. longPressActions: true,
  26. });
  27. }
  28. let contactValue = reactive({
  29. namePt: null,
  30. telPt: null,
  31. nameZrr: null,
  32. tel: null,
  33. nameLead: null,
  34. simCode: null
  35. })
  36. const getContact = id => {
  37. getProcessContact({
  38. id
  39. }).then(res => {
  40. contactValue.nameLead = res.data.nameLead;
  41. contactValue.namePt = res.data.namePt;
  42. contactValue.nameZrr = res.data.nameZrr;
  43. contactValue.simCode = res.data.simCode;
  44. contactValue.tel = res.data.tel;
  45. contactValue.telPt = res.data.telPt;
  46. })
  47. }
  48. // 弹窗显隐
  49. let dialogFlag = ref(false);
  50. const dialogShow = id => {
  51. dialogFlag.value = true;
  52. getContact(id);
  53. }
  54. const dialogHide = () => {
  55. dialogFlag.value = false;
  56. }
  57. onLoad(() => {
  58. getProcessList().then(res => {
  59. orginalList = [...res.data.list];
  60. if (res.data.list.length === 0) return;
  61. if (res.data.list.length > 1) {
  62. res.data.list.length = res.data.list.length - 1;
  63. let tempArr = [];
  64. for (let i in res.data.list) {
  65. tempArr.push(res.data.list[i].list)
  66. }
  67. processList.value = tempArr;
  68. lastItem.value = orginalList[orginalList.length - 1].list;
  69. } else {
  70. lastItem.value = res.data.list[0].list;
  71. }
  72. })
  73. const serverAddress = uni.getStorageSync('serverAddress');
  74. const baseUrlIp = serverAddress ? serverAddress : config.baseUrl;
  75. videoUrl.value = baseUrlIp + '/projects/outApi/preFlow/vedio';
  76. videoPoster.value = baseUrlIp + '/projects/asset/css/images/video_main.png';
  77. imageUrl.value = baseUrlIp + '/projects/outApi/preFlow/img';
  78. })
  79. </script>
  80. <template>
  81. <view class="container">
  82. <page-title>办事流程</page-title>
  83. <view class="main">
  84. <view class="video-play">
  85. <video :src="videoUrl" :poster="videoPoster"></video>
  86. </view>
  87. <view class="image-show" @click="preViewImage()">
  88. <image :src="imageUrl"></image>
  89. </view>
  90. <view class="process-main" v-if="processList.length > 1">
  91. <view class="process-border"></view>
  92. <view class="process-list-line">
  93. <view class="process-list" v-for="(item,index) in processList" :key="index">
  94. <view class="process-box">
  95. <view class="process-title">
  96. <view class="process-title-icon">
  97. <view class="process-title-inner">{{index + 1}}</view>
  98. </view>
  99. 并行审核
  100. </view>
  101. <view class="process-items">
  102. <view class="process-item" v-for="(items,indexs) in item" :key="indexs">
  103. <view class="process-item-info">
  104. <view class="process-item-key">文件:</view>
  105. <view class="process-item-value">{{items.title ??"--"}}</view>
  106. </view>
  107. <view class="process-item-info">
  108. <view class="process-item-key">用时:</view>
  109. <view class="process-item-value">{{items.num1??"--"}}天至{{items.num2??"--"}}天</view>
  110. </view>
  111. <view class="process-item-info">
  112. <view class="process-item-key">审核单位 :</view>
  113. <view class="process-item-value">
  114. {{items.spUnitDesc??"--"}}
  115. <view class="process-item-btn" @click="dialogShow(items.id)">查看</view>
  116. </view>
  117. </view>
  118. <view class="process-item-info">
  119. <view class="process-item-key">科室:</view>
  120. <view class="process-item-value">{{items.departDesc??"--"}}</view>
  121. </view>
  122. <view class="process-item-info">
  123. <view class="process-item-key">备注:</view>
  124. <view class="process-item-value">{{items.remark??"--"}}</view>
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. <view class="process-main" v-if="processList.length > 0">
  133. <view class="process-box">
  134. <view class="process-title">
  135. <view class="process-title-icon">
  136. <view class="process-title-inner">{{processList.length + 1}}</view>
  137. </view>
  138. 并行审核
  139. </view>
  140. <view class="process-items">
  141. <view class="process-item" v-for="(items,indexs) in lastItem" :key="indexs">
  142. <view class="process-item-info">
  143. <view class="process-item-key">文件:</view>
  144. <view class="process-item-value">{{items.title ??"--"}}</view>
  145. </view>
  146. <view class="process-item-info">
  147. <view class="process-item-key">用时:</view>
  148. <view class="process-item-value">{{items.num1??"--"}}天至{{items.num2??"--"}}天</view>
  149. </view>
  150. <view class="process-item-info">
  151. <view class="process-item-key">审核单位 :</view>
  152. <view class="process-item-value">
  153. {{items.spUnitDesc??"--"}}
  154. <view class="process-item-btn" @click="dialogShow(items.id)">查看</view>
  155. </view>
  156. </view>
  157. <view class="process-item-info">
  158. <view class="process-item-key">科室:</view>
  159. <view class="process-item-value">{{items.departDesc??"--"}}</view>
  160. </view>
  161. <view class="process-item-info">
  162. <view class="process-item-key">备注:</view>
  163. <view class="process-item-value">{{items.remark??"--"}}</view>
  164. </view>
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. <!-- 联系人弹窗 -->
  171. <u-popup :show="dialogFlag" :round="20" @close="dialogHide()" mode="center">
  172. <view class="remind-box">
  173. <view class="remind-title">
  174. <view class="remind-title-text">联系人信息</view>
  175. </view>
  176. <view class="remind-content">
  177. <view class="card no-padding">
  178. <view class="card-item first-card-item">
  179. <view class="card-item-name">项目负责人</view>
  180. <view class="card-item-content">{{contactValue.nameZrr ?? "--"}}</view>
  181. </view>
  182. <view class="card-item">
  183. <view class="card-item-name">项目负责电话</view>
  184. <view class="card-item-content">{{contactValue.tel ?? "--"}}</view>
  185. </view>
  186. <view class="card-item">
  187. <view class="card-item-name">项目分管领导</view>
  188. <view class="card-item-content">{{contactValue.nameLead ?? "--"}}</view>
  189. </view>
  190. <view class="card-item">
  191. <view class="card-item-name">项目分管领导电话</view>
  192. <view class="card-item-content">{{contactValue.simCode ?? "--"}}</view>
  193. </view>
  194. <view class="card-item">
  195. <view class="card-item-name">项目管理平台联系人</view>
  196. <view class="card-item-content">{{contactValue.namePt ?? "--"}}</view>
  197. </view>
  198. <view class="card-item">
  199. <view class="card-item-name">项目管理平台电话</view>
  200. <view class="card-item-content">{{contactValue.telPt ?? "--"}}</view>
  201. </view>
  202. </view>
  203. </view>
  204. <view class="remind-btns">
  205. <view class="remind-btn" @click="dialogHide()">关闭</view>
  206. </view>
  207. </view>
  208. </u-popup>
  209. <!-- 图片预览 -->
  210. <!-- <u-popup :show="dialogFlag" :round="20" @close="dialogHide()" mode="center">
  211. <view class="remind-box">
  212. <web-view src="http://192.168.0.143:8080/projects/outApi/preFlow/img"></web-view>
  213. </view>
  214. </u-popup> -->
  215. </view>
  216. </template>
  217. <style lang="scss" scoped>
  218. .main {
  219. position: absolute;
  220. top: 8%;
  221. left: 0;
  222. width: 100%;
  223. min-height: 92%;
  224. padding-top: 68rpx;
  225. background-color: #FFF;
  226. }
  227. .process-main {
  228. position: relative;
  229. display: flex;
  230. width: calc(100% - 68rpx);
  231. margin-left: 68rpx;
  232. min-height: 500rpx;
  233. .process-border {
  234. width: 4rpx;
  235. background-image: linear-gradient(to bottom, #1763E7 0%, #1763E7 60%, transparent 50%);
  236. background-size: 4rpx 40rpx;
  237. background-repeat: y-repeat;
  238. }
  239. .process-box {
  240. position: relative;
  241. display: flex;
  242. justify-content: flex-end;
  243. width: 642rpx;
  244. margin-bottom: 62rpx;
  245. .process-items {
  246. margin-top: 24rpx;
  247. }
  248. }
  249. }
  250. .process-title {
  251. position: absolute;
  252. top: -28rpx;
  253. left: -28rpx;
  254. display: flex;
  255. align-items: center;
  256. font-weight: 500;
  257. color: #1763E7;
  258. font-size: 32rpx;
  259. .process-title-icon {
  260. display: flex;
  261. align-items: center;
  262. justify-content: center;
  263. width: 56rpx;
  264. height: 56rpx;
  265. margin-right: 30rpx;
  266. border: 3rpx solid #1763E7;
  267. border-radius: 50%;
  268. background-color: #fff;
  269. .process-title-inner {
  270. display: flex;
  271. align-items: center;
  272. justify-content: center;
  273. width: 40rpx;
  274. height: 40rpx;
  275. font-weight: 500;
  276. color: #FFFFFF;
  277. font-size: 32rpx;
  278. border-radius: 50%;
  279. background-color: #1763E7;
  280. text-align: center;
  281. }
  282. }
  283. }
  284. .process-item {
  285. width: 590rpx;
  286. height: 262rpx;
  287. border-radius: 16rpx;
  288. border: 2rpx solid #E2E2E2;
  289. margin-top: 24rpx;
  290. padding: 0 32rpx;
  291. .process-item-info {
  292. display: flex;
  293. justify-content: space-between;
  294. width: 100%;
  295. height: 34rpx;
  296. margin: 16rpx 0;
  297. font-weight: 400;
  298. font-size: 24rpx;
  299. .process-item-key {
  300. color: #6B768A;
  301. }
  302. .process-item-value {
  303. display: flex;
  304. align-items: center;
  305. color: #002C78;
  306. }
  307. .process-item-btn {
  308. width: 100rpx;
  309. height: 50rpx;
  310. margin-left: 16rpx;
  311. color: #fff;
  312. background-color: #1763E7;
  313. line-height: 50rpx;
  314. text-align: center;
  315. border-radius: 12rpx;
  316. }
  317. }
  318. }
  319. .video-play {
  320. width: 683rpx;
  321. height: 384rpx;
  322. margin: 0 auto 50rpx;
  323. border-radius: 16rpx;
  324. overflow: hidden;
  325. video {
  326. width: 100%;
  327. height: 100%;
  328. }
  329. }
  330. .image-show {
  331. width: 683rpx;
  332. height: 512rpx;
  333. margin: 0 auto 50rpx;
  334. border-radius: 16rpx;
  335. overflow: hidden;
  336. image {
  337. width: 100%;
  338. height: 100%;
  339. }
  340. }
  341. .remind-box {
  342. width: 618rpx;
  343. // height: 810rpx;
  344. padding: 0 20rpx;
  345. overflow: hidden;
  346. .remind-title {
  347. display: flex;
  348. justify-content: center;
  349. align-items: center;
  350. width: 100%;
  351. height: 100rpx;
  352. .remind-title-text {
  353. font-size: 38rpx;
  354. font-weight: 500;
  355. color: #3A3333;
  356. }
  357. }
  358. .remind-content {
  359. width: 100%;
  360. box-sizing: border-box;
  361. border-radius: 16rpx;
  362. .no-padding {
  363. padding: 20rpx 0;
  364. }
  365. .test {
  366. width: 100%;
  367. height: 1000rpx;
  368. background-color: green;
  369. }
  370. }
  371. .remind-btns {
  372. display: flex;
  373. justify-content: space-between;
  374. align-items: center;
  375. width: 100%;
  376. height: 92rpx;
  377. margin-top: 20rpx;
  378. font-size: 30rpx;
  379. .remind-btn {
  380. width: 100%;
  381. height: 64rpx;
  382. text-align: center;
  383. line-height: 64rpx;
  384. font-size: 24rpx;
  385. font-weight: 500;
  386. color: #FFFFFF;
  387. background: #1763E7;
  388. border-radius: 39rpx;
  389. }
  390. }
  391. }
  392. ::v-deep .u-popup__content {
  393. overflow: hidden;
  394. }
  395. </style>