audit-home.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. <template>
  2. <a-layout id="components-layout-demo-top" :class="[$style.layout, $style.audithome]">
  3. <sd-header>
  4. <span style="font-size:22px;padding:0 11px;vertical-align:top">
  5. <a-icon type="sd-module" title="工作台" @click="$router.push('/sd-frame/iam-content')" />
  6. </span>
  7. <sd-header-user-action />
  8. </sd-header>
  9. <!-- 首页图片 -->
  10. <table :class="$style.bannertable" border="0" align="center" cellpadding="0" cellspacing="0">
  11. <img v-if="currentIndex === 0" :class="$style.previewimg" src="./images/banner.png" />
  12. <img v-if="currentIndex === 1" :class="$style.previewimg" src="./images/banner1.png" />
  13. <img v-if="currentIndex === 2" :class="$style.previewimg" src="./images/banner2.png" />
  14. </table>
  15. <a-layout-content :class="$style.layoutContent">
  16. <div :class="$style.mainWrap">
  17. <a-row :gutter="24" :class="$style.maint">
  18. <a-col v-for="(mk, index) in mklist" :key="index" :span="6">
  19. <div
  20. :class="$style.tab"
  21. :style="'background-color:' + mk.color"
  22. @click="$router.push(mk.link)"
  23. >
  24. <span style="float:left;">
  25. <span><a-icon slot="image" :type="mk.icon" /> </span>
  26. <span style="padding-left:10px">{{ mk.name }}</span>
  27. </span>
  28. <span v-if="mk.num !== '-1'" style="float:right;font-size:30px;margin-top:-10px">{{
  29. mk.num
  30. }}</span></div
  31. >
  32. </a-col>
  33. </a-row>
  34. <a-row :gutter="24" :class="$style.maint">
  35. <a-col :span="11">
  36. <div :class="$style.box">
  37. <a-card :bordered="false" :class="$style.cardBody">
  38. <div slot="title">
  39. <a-icon
  40. type="bell"
  41. title="通知公告"
  42. @click="$router.push('/sd-frame/audit-information-list')"
  43. />
  44. 通知公告
  45. </div>
  46. <div slot="extra">
  47. <a-icon
  48. slot="tabBarExtraContent"
  49. :class="$style.morebtn"
  50. type="ellipsis"
  51. @click="goMoreNews('audit-information-list')"
  52. />
  53. </div>
  54. <HomeTzggList
  55. :news-id="'tzgg'"
  56. type="getInformation"
  57. :max-results="4"
  58. ></HomeTzggList>
  59. </a-card>
  60. </div>
  61. </a-col>
  62. <a-col :span="2"></a-col>
  63. <a-col :span="11">
  64. <div :class="$style.box">
  65. <a-card :bordered="false" :class="$style.cardBody">
  66. <div slot="title">
  67. <a-icon
  68. type="project"
  69. title="新闻动态"
  70. @click="$router.push('/sd-frame/audit-information-list')"
  71. />
  72. <!-- <project-outlined /> -->
  73. 新闻动态
  74. </div>
  75. <div slot="extra">
  76. <a-icon
  77. slot="tabBarExtraContent"
  78. :class="$style.morebtn"
  79. type="ellipsis"
  80. @click="goMoreNews('audit-information-list')"
  81. />
  82. </div>
  83. <HomeXwdtList
  84. :news-id="'xwdt'"
  85. type="getInformation"
  86. :xwdt="true"
  87. :max-results="3"
  88. ></HomeXwdtList>
  89. </a-card>
  90. </div>
  91. </a-col>
  92. </a-row>
  93. <a-row :gutter="24" :class="$style.maint">
  94. <a-col :span="11">
  95. <div :class="$style.box">
  96. <a-card :bordered="false" :class="$style.cardBody">
  97. <div slot="title"
  98. ><a-icon
  99. type="read"
  100. title="法规政策"
  101. @click="
  102. $router.push('/sd-frame/iam-audit-auditsource-lawinstitutionquery-list')
  103. "
  104. />
  105. 法规政策
  106. </div>
  107. <div slot="extra">
  108. <a-icon
  109. slot="tabBarExtraContent"
  110. :class="$style.morebtn"
  111. type="ellipsis"
  112. @click="goMoreNews('iam-audit-auditsource-lawinstitutionquery-list')"
  113. />
  114. </div>
  115. <HomeXwdtList
  116. :news-id="'law'"
  117. :xwdt="false"
  118. type="getLawInstitutions"
  119. ></HomeXwdtList>
  120. </a-card>
  121. </div>
  122. </a-col>
  123. <a-col :span="2"></a-col>
  124. <a-col :span="11">
  125. <div :class="$style.box">
  126. <a-card :bordered="false" :class="$style.cardBody">
  127. <div slot="title">
  128. <a-icon
  129. type="bulb"
  130. title="知识库"
  131. @click="$router.push('/sd-frame/km-knowledage-base')"
  132. />
  133. 知识库
  134. </div>
  135. <div slot="extra">
  136. <a-icon
  137. slot="tabBarExtraContent"
  138. :class="$style.morebtn"
  139. type="ellipsis"
  140. @click="goMoreNews('km-knowledage-base')"
  141. />
  142. </div>
  143. <HomeXwdtList :news-id="'km'" type="getKmKnowledges" :xwdt="false"></HomeXwdtList>
  144. </a-card>
  145. </div>
  146. </a-col>
  147. </a-row>
  148. <a-row :gutter="24" :class="$style.maint">
  149. <a-col :span="24">
  150. <div :class="[$style.yqlj, $style.box]">
  151. <a-card :bordered="false" :class="$style.cardBody">
  152. <div slot="title">
  153. <a-icon
  154. type="link"
  155. title="友情链接"
  156. @click="$router.push('/sd-frame/km-knowledage-base')"
  157. />
  158. 友情链接
  159. </div>
  160. <div slot="extra">
  161. <a-icon
  162. slot="tabBarExtraContent"
  163. :class="$style.morebtn"
  164. type="LinkOutlined"
  165. @click="goMoreNews('PRODUCT_XXFB_XWDT')"
  166. />
  167. </div>
  168. <div>
  169. <span v-for="(lj, index) in yqlj" :key="index">
  170. <a :href="lj.link" target="_blank" :title="lj.title">
  171. <img
  172. class="linkpreviewimg"
  173. :src="
  174. `api/flow-mobile/v1/task-form-process/download-attachments/${lj.imgsrc}`
  175. | sdResource
  176. "
  177. />
  178. </a>
  179. </span>
  180. </div>
  181. </a-card>
  182. </div>
  183. </a-col>
  184. </a-row>
  185. </div>
  186. <a-layout-footer :class="$style.footer">
  187. <div>Copyright 2020 WE.iam8.0 All Rights</div>
  188. <div v-if="false">北京XX科技有限公司 &nbsp; 版权所有</div>
  189. </a-layout-footer>
  190. </a-layout-content>
  191. </a-layout>
  192. </template>
  193. <script>
  194. import storeMixin from '@/common/store-mixin'
  195. import axios from '@/common/services/axios-instance'
  196. import loginService from '@/login/login-service'
  197. import homepageService from './homepage-service'
  198. // import oaSearchInput from '../fullsearch/oa-search-input.vue'
  199. import HomeTzggList from './home-tzgg-list.vue'
  200. import HomeXwdtList from './home-xwdt-list.vue'
  201. import components from './_import-components/audit-home-import'
  202. export default {
  203. name: 'AuditHome',
  204. components: {
  205. ...components,
  206. HomeTzggList,
  207. HomeXwdtList,
  208. },
  209. mixins: [storeMixin],
  210. metaInfo: {
  211. title: '首页',
  212. },
  213. data() {
  214. return {
  215. news: { id: 4 },
  216. leftActiveKey: '1',
  217. rightActiveKey: '1',
  218. imgList: [],
  219. infolist: [],
  220. mklist: [
  221. {
  222. name: '待办',
  223. icon: 'sd-notebook',
  224. num: '-1',
  225. color: '#ff4a55',
  226. link: '/sd-frame/sd-mytodolist?type=todo',
  227. },
  228. {
  229. name: '待阅',
  230. icon: 'sd-notebook',
  231. num: '-1',
  232. color: '#ffb74a',
  233. link: '/sd-frame/sd-mytoreadlist',
  234. },
  235. {
  236. name: '提醒',
  237. icon: 'sd-notebook',
  238. num: '-1',
  239. color: '#54c5eb',
  240. link: '/sd-frame/sd-message-remind',
  241. },
  242. {
  243. name: '项目',
  244. icon: 'sd-notebook',
  245. num: '-1',
  246. color: '#bb7ec4',
  247. link: '/sd-frame/audit-project-list',
  248. },
  249. ],
  250. yqlj: [],
  251. yqljnum: 0,
  252. currentIndex: 1,
  253. timer: null,
  254. }
  255. },
  256. created() {
  257. this.getdbxx()
  258. },
  259. mounted() {
  260. this.startInterval()
  261. },
  262. methods: {
  263. // 开启定时器
  264. startInterval() {
  265. this.timer = setInterval(() => {
  266. this.currentIndex++
  267. if (this.currentIndex > 2) {
  268. this.currentIndex = 0
  269. }
  270. }, 3000)
  271. },
  272. changeInterval(val) {
  273. if (val) {
  274. clearInterval(this.timer)
  275. } else {
  276. this.startInterval()
  277. }
  278. },
  279. getdbxx() {
  280. homepageService.getCount().then((res) => {
  281. this.mklist[0].num = res.data.todoCount
  282. this.mklist[1].num = res.data.readCount
  283. this.mklist[2].num = res.data.remindCount
  284. this.mklist[3].num = res.data.projectCount
  285. })
  286. homepageService.getHomeYqlj().then((res) => {
  287. console.log('获取友情链接')
  288. this.yqljnum = res.data.length
  289. res.data.forEach((item) => {
  290. this.fngetattachment(item, 'entity:iamAuditInformation', '', item.instId)
  291. })
  292. })
  293. },
  294. fngetattachment(item, formId, beanId, instId) {
  295. return axios
  296. .get(`api/xcoa-mobile/v1/attachment-extend/attachments-info-perm/${item.thumbnail}`, {
  297. params: {
  298. formId: formId,
  299. beanId: beanId,
  300. instId: instId,
  301. },
  302. })
  303. .then((res) => {
  304. if (res.data.length) {
  305. console.log(res.data[0].code)
  306. this.yqlj.push({
  307. title: item.name,
  308. link: item.url,
  309. imgsrc: res.data[0].code,
  310. })
  311. }
  312. })
  313. },
  314. goMoreNews(data) {
  315. const href = '#/sd-frame/' + data
  316. window.open(href, '_blank')
  317. },
  318. },
  319. }
  320. </script>
  321. <style module lang="scss">
  322. @use '@/common/design' as *;
  323. :global(.linkpreviewimg) {
  324. width: 100px;
  325. height: 30px;
  326. padding: 0 10px;
  327. }
  328. .theme {
  329. color: $primary-color;
  330. }
  331. $importcolor: #e02020;
  332. $nodata-icon: #d9d9d9;
  333. $carousel-title: 64px;
  334. $module-title: 64px;
  335. $fonsicon-bg: 48px;
  336. .pull-right {
  337. float: right;
  338. padding: 0 10px;
  339. cursor: pointer;
  340. &:hover {
  341. // 悬浮的颜色,与主题无关
  342. /* stylelint-disable-next-line */
  343. background-color: rgba(0, 0, 0, 0.2);
  344. }
  345. }
  346. .pull-top {
  347. margin-top: 5px;
  348. }
  349. .gobance {
  350. cursor: pointer;
  351. }
  352. .navsetting {
  353. cursor: pointer;
  354. }
  355. .layout {
  356. height: 100%;
  357. .logotitle {
  358. display: flex;
  359. align-items: center;
  360. float: left;
  361. height: 100%;
  362. .logo {
  363. width: 55px;
  364. height: 55px;
  365. margin-right: 10px;
  366. border-radius: 50%;
  367. }
  368. .title {
  369. font-size: 1.5em;
  370. font-weight: 600;
  371. }
  372. }
  373. .layout-content {
  374. height: calc(100% - 64px);
  375. }
  376. .footer {
  377. display: flex;
  378. flex-direction: column;
  379. align-items: center;
  380. justify-content: center;
  381. font-size: $font-size-sm;
  382. color: $white;
  383. background: $layout-header-background;
  384. width: 100vw;
  385. }
  386. }
  387. .empty-size {
  388. margin: 10% 0;
  389. :global(.ant-empty-image) {
  390. height: 50px;
  391. i {
  392. height: 100%;
  393. font-size: $fonsicon-bg;
  394. color: $nodata-icon;
  395. }
  396. }
  397. }
  398. .main-wrap {
  399. height: 100%;
  400. padding: $padding-lg;
  401. background-color: #fff;
  402. .maint {
  403. // height: 52%;
  404. // padding-bottom: $padding-lg;
  405. margin-left: 50px !important;
  406. margin-right: 50px !important;
  407. .main-top-l {
  408. width: calc(50% - 203px);
  409. height: 100%;
  410. padding-right: $padding-lg;
  411. .empty-size {
  412. display: flex;
  413. flex-direction: column;
  414. justify-content: center;
  415. width: 100%;
  416. height: 100%;
  417. margin-left: 0;
  418. background: $card-background;
  419. :global(.ant-empty-image) {
  420. height: 50px;
  421. i {
  422. height: 100%;
  423. font-size: $fonsicon-bg;
  424. color: $nodata-icon;
  425. }
  426. }
  427. }
  428. }
  429. .main-top-c {
  430. width: calc(50% - 203px);
  431. height: 100%;
  432. padding-right: $padding-lg;
  433. }
  434. .main-top-r {
  435. float: left;
  436. width: 406px;
  437. height: 100%;
  438. }
  439. :global(.ant-list-item-meta-description) {
  440. white-space: nowrap;
  441. overflow: hidden;
  442. text-overflow: ellipsis;
  443. }
  444. :global(.ant-list-item-meta-title) {
  445. white-space: nowrap;
  446. overflow: hidden;
  447. text-overflow: ellipsis;
  448. }
  449. }
  450. .mainb {
  451. height: 48%;
  452. .bottomhei {
  453. height: 100%;
  454. &.mainb-l {
  455. padding-right: $padding-lg / 2;
  456. }
  457. &.mainb-r {
  458. padding-left: $padding-lg / 2;
  459. }
  460. }
  461. }
  462. :global(.ant-card-head) {
  463. border-bottom: none;
  464. }
  465. }
  466. .boxslider {
  467. position: relative;
  468. .slidebox {
  469. height: 100%;
  470. div {
  471. width: 100%;
  472. height: 100%;
  473. overflow: hidden;
  474. cursor: pointer;
  475. background: #fff;
  476. }
  477. img {
  478. height: 100%;
  479. margin: 0 auto;
  480. }
  481. }
  482. .sd-dots {
  483. bottom: 30px;
  484. padding: 0 10px;
  485. text-align: right;
  486. li {
  487. margin: 0 4px;
  488. &:global(.slick-active) {
  489. button {
  490. width: 6px;
  491. background: $primary-color;
  492. }
  493. }
  494. button {
  495. width: 6px;
  496. height: 6px;
  497. background: $white;
  498. border-radius: 50%;
  499. opacity: 1;
  500. }
  501. }
  502. }
  503. .slider-title {
  504. position: relative;
  505. bottom: $carousel-title;
  506. display: inline-block;
  507. width: 100%;
  508. height: $carousel-title;
  509. padding: 0 100px 0 15px;
  510. overflow: hidden;
  511. font-size: $font-size-lg;
  512. line-height: $carousel-title;
  513. color: $white;
  514. text-align: left;
  515. text-overflow: ellipsis;
  516. white-space: nowrap;
  517. background: rgba(0, 0, 0, 0.7);
  518. }
  519. }
  520. .box {
  521. height: 100%;
  522. // height: 430px;
  523. overflow-y: auto;
  524. background: $card-background;
  525. border-radius: 2px;
  526. :global(.ant-card-head-title) {
  527. padding: 20px 0;
  528. font-size: $font-size-base;
  529. color: $text-color;
  530. :global(.anticon) {
  531. color: $primary-color;
  532. }
  533. }
  534. .card-body {
  535. :global(.ant-card-body) {
  536. padding: 0 24px;
  537. }
  538. }
  539. :global(.ant-tabs) {
  540. padding: 0 24px;
  541. :global(.ant-tabs-bar) {
  542. border-bottom: none;
  543. :global(.ant-tabs-tab) {
  544. padding: 20px 15px;
  545. margin: 0 8px 0 0;
  546. }
  547. }
  548. }
  549. :global(.previewimg) {
  550. height: 150px;
  551. width: 100%;
  552. }
  553. &.box-r {
  554. padding: 0;
  555. background: transparent;
  556. }
  557. .morebtn {
  558. cursor: pointer;
  559. }
  560. &.boxbottom {
  561. height: 100%;
  562. }
  563. .smart-cart-t {
  564. padding-bottom: 24px;
  565. .pending {
  566. display: flex;
  567. align-items: center;
  568. justify-content: space-between;
  569. height: 80px;
  570. border-radius: 2px;
  571. :global(.ant-card-body) {
  572. width: 100%;
  573. padding: 0;
  574. }
  575. }
  576. }
  577. .smart-cart-b {
  578. height: calc(100% - 104px);
  579. overflow: hidden;
  580. background: $card-background;
  581. border-radius: 2px;
  582. .quick {
  583. height: 100%;
  584. overflow-y: auto;
  585. }
  586. :global(.ant-card-head) {
  587. min-height: $module-title;
  588. line-height: $module-title;
  589. :global(.ant-card-head-title) {
  590. padding: 0;
  591. }
  592. :global(.ant-card-extra) {
  593. padding: 0;
  594. }
  595. }
  596. :global(.ant-card-body) {
  597. padding: 0 10px;
  598. > div {
  599. display: flex;
  600. flex-wrap: wrap;
  601. justify-content: space-around;
  602. }
  603. }
  604. }
  605. }
  606. .worklink {
  607. display: flex;
  608. align-items: center;
  609. justify-content: center;
  610. cursor: pointer;
  611. border-right: 1px solid $primary-1;
  612. .worklinknum {
  613. display: flex;
  614. align-items: center;
  615. justify-content: space-between;
  616. width: 100%;
  617. padding: 0 30px;
  618. font-size: $font-size-base;
  619. span {
  620. font-size: $font-size-lg;
  621. color: $text-color;
  622. }
  623. span:first-child {
  624. margin-top: 2px;
  625. }
  626. span:last-child {
  627. font-size: 2.1em;
  628. font-weight: 700;
  629. color: $importcolor;
  630. }
  631. }
  632. }
  633. .bannertable {
  634. width: 100%;
  635. height: 150px;
  636. background-color: #1b365d !important;
  637. }
  638. .previewimg {
  639. width: 100%;
  640. height: 150px;
  641. }
  642. .banner {
  643. background-image: url(./images/banner.png);
  644. background-size: 100%;
  645. background-color: #1b365d !important;
  646. }
  647. .banner1 {
  648. background-image: url(./images/banner1.png);
  649. background-size: 100%;
  650. background-color: #1b365d !important;
  651. }
  652. .banner2 {
  653. background-image: url(./images/banner2.png);
  654. background-size: 100%;
  655. background-color: #1b365d !important;
  656. }
  657. .tab {
  658. // width: 80%;
  659. height: 60px;
  660. border-radius: 5px;
  661. color: #fff;
  662. font-size: 20px;
  663. padding-top: 15px;
  664. padding-left: 15px;
  665. padding-right: 15px;
  666. text-align: center;
  667. cursor: pointer;
  668. }
  669. .cardBody {
  670. :global(.ant-card-head-wrapper) {
  671. border-bottom: 2px solid #efefef;
  672. }
  673. }
  674. .audithome {
  675. :global .header_sd-header_common.ant-layout-header {
  676. width: 100% !important;
  677. background-color: #1b365d !important;
  678. }
  679. :global .right_sd-header_common {
  680. display: inline;
  681. color: #fff;
  682. }
  683. }
  684. </style>