km-apply.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <div :class="$style.processWrap">
  3. <div :class="$style.tabs">
  4. <a-card title="流程类型">
  5. <a-empty v-if="applyList.length < 1" />
  6. <a-anchor v-else :affix="false" :get-container="getContainer" @click="handleClick">
  7. <a-anchor-link v-for="(item, index) in applyList" :key="index" :href="'#' + index">
  8. <span slot="title"> <a-icon type="sd-list" /> {{ item.topCatName }} </span>
  9. </a-anchor-link>
  10. </a-anchor>
  11. </a-card>
  12. </div>
  13. <div ref="allProcess" :class="$style.allProcess">
  14. <a-empty v-if="applyList.length < 1" />
  15. <a-card v-for="(item, i) in applyList" v-else :id="i" :key="i" :title="item.topCatName">
  16. <div v-for="(itm, index) in item.appDatas" :key="index" :class="$style.cate">
  17. <a-tooltip placement="top">
  18. <template slot="title">
  19. <span>{{ itm.buinessTypeName }}</span>
  20. </template>
  21. <span :class="[$style.cateName]" @click="check(i, index, itm)">
  22. {{ itm.buinessTypeName }}
  23. </span>
  24. </a-tooltip>
  25. </div>
  26. </a-card>
  27. </div>
  28. </div>
  29. </template>
  30. <script>
  31. import openAsTrustId from '@/common/services/open-as-trust-id'
  32. import flowService from '@/webflow/flow-service'
  33. import components from './_import-components/km-apply-import'
  34. export default {
  35. name: 'KmApply',
  36. metaInfo: {
  37. title: 'OaApply',
  38. },
  39. components,
  40. props: {
  41. applyList: {
  42. default: () => {},
  43. type: Array,
  44. },
  45. },
  46. data() {
  47. return {
  48. active: 0,
  49. subActive: 0,
  50. categoryList: [],
  51. }
  52. },
  53. methods: {
  54. handleClick(e) {
  55. e.preventDefault()
  56. },
  57. getContainer() {
  58. return this.$refs.allProcess
  59. },
  60. openDraft(item) {
  61. // 公文类型
  62. if (item.isDoc === '1') {
  63. switch (item.categoryCode) {
  64. // 发文
  65. case 'PRODUCT_GW_FW': {
  66. openAsTrustId(
  67. `/sd-frame/oa-gwguide?code=PRODUCT_GW_FW&typeid=${item.id}`,
  68. item?.srcTrustId ?? ''
  69. )
  70. break
  71. }
  72. // 收文
  73. case 'PRODUCT_GW_SW': {
  74. openAsTrustId(
  75. `/sd-frame/oa-swguide?code=PRODUCT_GW_SW&typeid=${item.id}`,
  76. item?.srcTrustId ?? ''
  77. )
  78. break
  79. }
  80. // 签报
  81. case 'PRODUCT_GW_QB': {
  82. openAsTrustId(
  83. `/sd-frame/oa-swguide?code=PRODUCT_GW_QB&typeid=${item.id}`,
  84. item?.srcTrustId ?? ''
  85. )
  86. break
  87. }
  88. }
  89. } else {
  90. flowService.startProcess(
  91. item.businessFlowId,
  92. {
  93. businessTypeId: item.id,
  94. businessTypeName: item.categoryName,
  95. },
  96. {
  97. srcTrustId: item.srcTrustId,
  98. }
  99. )
  100. }
  101. },
  102. check(i, index, itm) {
  103. this.active = i
  104. this.subActive = index
  105. this.openDraft(itm)
  106. },
  107. },
  108. }
  109. </script>
  110. <style module lang="scss">
  111. @use '@/common/design' as *;
  112. $active: #e7f3ff;
  113. $listdef: #f6f8fb;
  114. .process-wrap {
  115. display: flex;
  116. flex: 1;
  117. width: 100%;
  118. height: calc(100% - 20px);
  119. }
  120. .tabs {
  121. width: 200px;
  122. :global(.ant-card) {
  123. height: 100%;
  124. background: $listdef;
  125. :global(.ant-card-body) {
  126. height: calc(100% - 50px);
  127. padding-top: 0;
  128. padding-right: 0;
  129. padding-left: 0;
  130. :global(.ant-anchor-wrapper) {
  131. background-color: transparent;
  132. :global(.ant-anchor-link) {
  133. position: relative;
  134. height: 40px;
  135. padding: 10px 0 10px 16px;
  136. }
  137. :global(.ant-anchor-link-active) {
  138. background: $active;
  139. &::after {
  140. position: absolute;
  141. top: 0;
  142. right: 0;
  143. width: 2px;
  144. height: 40px;
  145. content: '';
  146. background: $primary-color;
  147. border-radius: 8px;
  148. }
  149. }
  150. :global(.ant-anchor-ink) {
  151. position: static;
  152. }
  153. :global(.ant-anchor) {
  154. padding-left: 0;
  155. }
  156. }
  157. }
  158. :global(.ant-card-head) {
  159. border-bottom: none;
  160. }
  161. }
  162. }
  163. .all-process {
  164. position: relative;
  165. width: calc(100% - 200px);
  166. height: 100%;
  167. overflow: auto;
  168. :global(.ant-card-body) {
  169. display: flex;
  170. flex-wrap: wrap;
  171. padding: 0 40px;
  172. > div {
  173. width: calc(25% - 10px);
  174. margin-right: 10px;
  175. margin-bottom: 20px;
  176. text-align: left;
  177. &:nth-child(4n) {
  178. text-align: right;
  179. }
  180. &:nth-child(4n + 1) {
  181. text-align: left;
  182. }
  183. span {
  184. position: relative;
  185. display: block;
  186. padding: 16px 20px 16px 30px;
  187. overflow: hidden;
  188. text-align: left;
  189. text-overflow: ellipsis;
  190. white-space: nowrap;
  191. cursor: pointer;
  192. background: $listdef;
  193. transition: 0.3s;
  194. }
  195. ::before {
  196. position: absolute;
  197. top: 20px;
  198. right: 0;
  199. bottom: 20px;
  200. left: 20px;
  201. width: 3px;
  202. content: '';
  203. background: $primary-color;
  204. border-radius: 8px;
  205. }
  206. :hover {
  207. background: $active;
  208. transition: all 0.3s;
  209. }
  210. }
  211. }
  212. :global(.ant-card-head) {
  213. padding: 0 40px;
  214. border-bottom: none;
  215. }
  216. }
  217. .all-process::-webkit-scrollbar {
  218. /* 滚动条样式 */
  219. width: 0;
  220. height: 4px;
  221. }
  222. :global(.ant-empty) {
  223. display: flex;
  224. flex-direction: column;
  225. align-items: center;
  226. justify-content: center;
  227. height: 100%;
  228. }
  229. </style>