CommitteeApplicationList.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  1. <!-- 委员会通知公告详情 -->
  2. <template>
  3. <div class="autoBox box1" style="position: relative; background: #f5f5f5">
  4. <div class="center" style="margin-top: -20px">
  5. <div class="left">
  6. <div class="centerLeft1">
  7. <div class="top">
  8. <div class="top1"></div>
  9. <div class="top2"></div>
  10. <div class="allApplication">
  11. <span v-if="!isDistinguish">{{
  12. $t("common.allApplicationList")
  13. }}</span>
  14. <span v-else>{{ $t("common.myApplication") }}</span>
  15. </div>
  16. <div @click="back" class="more">
  17. <span>{{ "<" }}{{ $t("common.return") }}</span>
  18. </div>
  19. </div>
  20. <div class="area">
  21. <Screen
  22. v-bind:screen1="screen1s"
  23. :screen1def="screen1def"
  24. :screen2Item="screen2Item"
  25. @screenBack="screenBack"
  26. ></Screen>
  27. <div class="search" style="margin-top: 10px">
  28. <span
  29. style="
  30. margin-right: 20px;
  31. font-size: 14px;
  32. margin-left: 40px;
  33. font-weight: 700;
  34. color: rgb(0, 0, 0);
  35. "
  36. >{{ $t("common.keyWord") }}&nbsp;:</span
  37. >
  38. <el-input
  39. style="width: 200px"
  40. v-model="search"
  41. :placeholder="$t('common.pleaseEnter')"
  42. ></el-input>
  43. <el-button
  44. @click="searchTitle"
  45. style="margin-left: 20px; width: 90px"
  46. type="primary"
  47. >{{ $t("common.query") }}</el-button
  48. >
  49. <el-button @click="reset" style="width: 90px">{{
  50. $t("common.reset")
  51. }}</el-button>
  52. </div>
  53. </div>
  54. <div v-if="showContent" class="content">
  55. <div @click="toCreate" class="content1">
  56. <el-button icon="el-icon-plus" type="text">{{
  57. $t("common.createApplication")
  58. }}</el-button>
  59. </div>
  60. <div
  61. class="content2"
  62. v-for="(item, index) in allApplicationList"
  63. :key="item.id"
  64. >
  65. <div class="topText">
  66. <p class="title">{{ item.title }}</p>
  67. <p class="type">{{ item.applyTime }}</p>
  68. <div
  69. class="test"
  70. style="
  71. width: 270px;
  72. height: 20px;
  73. "
  74. >
  75. <!--<span
  76. class="document"
  77. style="
  78. display: inline-block;
  79. width: 90px;
  80. margin-right: 46px;
  81. "
  82. >{{ showList[item.applyType] }}</span
  83. >-->
  84. <span
  85. v-if="showList[item.applyType] === '公文'"
  86. class="document"
  87. style="display: inline-block;width: 90px;margin-right: 46px;"
  88. >{{ $i18n.locale == "zh" ? "公文" : "Document" }}</span
  89. >
  90. <span
  91. v-if="showList[item.applyType] === '活动方案'"
  92. class="document"
  93. style="display: inline-block;width: 90px;margin-right: 46px;"
  94. >{{ $i18n.locale == "zh" ? "活动方案" : "Activity Plan" }}</span
  95. >
  96. <span
  97. v-if="showList[item.applyType] === '意见与建议'"
  98. class="document"
  99. style="width: 90px;margin-right: 46px;"
  100. >{{ $i18n.locale == "zh" ? "意见与建议" : "Comments And Suggestions" }}</span
  101. >
  102. <span
  103. v-if="showList[item.applyType] === '活动方案'"
  104. class="document"
  105. style="width: 90px;margin-right: 46px;"
  106. >{{ $i18n.locale == "zh" ? "活动方案" : "Activity、 release" }}</span
  107. >
  108. <span
  109. v-if="showList[item.applyType] === '工作计划/总结'"
  110. class="document"
  111. style="width: 90px;margin-right: 46px;"
  112. >{{ $i18n.locale == "zh" ? "工作计划/总结" : "Work Plan/ Conclusion" }}</span
  113. >
  114. <span
  115. v-if="showList[item.applyType] === '委员会资料发布'"
  116. class="document"
  117. style="width: 90px;margin-right: 46px;"
  118. >{{ $i18n.locale == "zh" ? "委员会资料发布" : "Committee Information Releases" }}</span
  119. >
  120. <!--<span
  121. style="
  122. display: inline-block;
  123. width: 100px;
  124. margin-right: 10px;
  125. color: #f01834;
  126. "
  127. class="statu"
  128. v-if="item.reserveThree === '驳回'"
  129. >{{ $i18n.locale == "zh" ? "驳回" : "Reject" }}</span
  130. >
  131. <span
  132. style="
  133. display: inline-block;
  134. width: 100px;
  135. margin-right: 10px;
  136. color: #58c52a;
  137. "
  138. class="statu"
  139. v-if="item.reserveThree === '通过'"
  140. >{{ $i18n.locale == "zh" ? "通过" : "Pass" }}</span
  141. >
  142. <span
  143. style="
  144. display: inline-block;
  145. width: 100px;
  146. margin-right: 10px;
  147. color: #ef992a;
  148. "
  149. class="statu"
  150. v-if="item.reserveThree === '审批中'"
  151. >{{ $i18n.locale == "zh" ? "审批中" : "Auditing" }}</span
  152. >
  153. <span
  154. style="
  155. display: inline-block;
  156. width: 100px;
  157. margin-right: 10px;
  158. color: #f01834;
  159. "
  160. class="statu"
  161. v-if="item.reserveThree === '撤回'"
  162. >{{ $i18n.locale == "zh" ? "撤回" : "Recall" }}</span
  163. >-->
  164. </div>
  165. <div>
  166. <img
  167. v-if="item.reserveThree === '驳回'"
  168. style="margin-top: -110px; margin-left: 150px"
  169. :src="require($i18n.locale == 'zh' ? '@/assets/img/committeeWorkSpace/驳回.png' :'@/assets/img/committeeWorkSpace/_Reject.png' )"
  170. alt=""
  171. />
  172. <img
  173. v-if="item.reserveThree === '通过'"
  174. style="margin-top: -110px; margin-left: 150px"
  175. :src="require($i18n.locale == 'zh' ? '@/assets/img/committeeWorkSpace/已完成.png' :'@/assets/img/committeeWorkSpace/_Pass.png')"
  176. alt=""
  177. />
  178. <img
  179. v-if="item.reserveThree === '审批中'"
  180. style="margin-top: -110px; margin-left: 150px"
  181. :src="require($i18n.locale == 'zh' ? '@/assets/img/committeeWorkSpace/待审批.png' :'@/assets/img/committeeWorkSpace/_Auditing.png')"
  182. alt=""
  183. />
  184. <img
  185. v-if="item.reserveThree === '撤回'"
  186. style="margin-top: -110px; margin-left: 150px"
  187. :src="require($i18n.locale == 'zh' ? '@/assets/img/committeeWorkSpace/撤回.png' :'@/assets/img/committeeWorkSpace/_Recall.png' )"
  188. alt=""
  189. />
  190. </div>
  191. </div>
  192. <div :class="isZh ? 'bottom' : 'bottom1'">
  193. <div style="margin-left: 45px; padding-top: 8px">
  194. <span
  195. class="toProgress"
  196. style="cursor: pointer"
  197. @click="seeprogress(item)"
  198. >{{ $t("common.viewProgress") }}</span
  199. >
  200. </div>
  201. <div style="margin-left: 100px; margin-top: -21px">
  202. <span
  203. :class="isZh ? 'toView' : 'toView1'"
  204. style="cursor: pointer; margin-left: 70px"
  205. @click="seedetail(item)"
  206. >{{ $t("common.checkDetails") }}</span
  207. >
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. <div v-else class="content">
  213. <div style="margin: 0 auto">
  214. <el-empty :description="$t('common.noData')"></el-empty>
  215. </div>
  216. </div>
  217. <!-- 分页 -->
  218. <div v-if="showContent" class="pag">
  219. <el-pagination
  220. type="index"
  221. background
  222. :prev-text= "prevText"
  223. :next-text="nextText"
  224. layout="prev, pager, next, sizes, total"
  225. :page-sizes="[7, 20, 50, 100, 200]"
  226. :total="total - 0"
  227. @current-change="handleCurrentChange"
  228. @size-change="handleSizeChange"
  229. ></el-pagination>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. </template>
  236. <script>
  237. import {
  238. getCommitteeAllApplication,
  239. getCommitteeMySubmitApplication,
  240. getApplicationDicts,
  241. } from "@/api/committee/committeeWorkSpace";
  242. import Screen from "@/components/screen";
  243. export default {
  244. name: "CommitteeApplicationList",
  245. props: ["isDistinguish"],
  246. components: {
  247. Screen,
  248. },
  249. data() {
  250. return {
  251. search: "",
  252. screen1s: {
  253. value: "common.type",
  254. item: [],
  255. },
  256. showContent: false,
  257. screen1def: null,
  258. screen2Item: null,
  259. allApplicationList: [],
  260. defineType: "",
  261. total: "",
  262. pageNo: "",
  263. pageSize:undefined,
  264. query: "",
  265. prevText:"上一页",
  266. nextText:"下一页",
  267. through: null,
  268. toWithdraw: null,
  269. Approval: null,
  270. reject: null,
  271. imgUrl: "",
  272. isZh: true,
  273. logo:undefined,
  274. showList:{
  275. 1:"活动方案",
  276. 2:"意见与建议",
  277. 3:"活动方案",
  278. 4:"工作计划/总结",
  279. 5:"公文",
  280. 6:"委员会资料发布",
  281. }
  282. };
  283. },
  284. watch: {
  285. "$i18n.locale"() {
  286. this.queryApplication();
  287. // handler: function () {
  288. this.isZh = !this.isZh;
  289. if(this.$i18n.locale != 'en'){
  290. this.prevText="上一页";
  291. this.nextText="下一页";
  292. }else{
  293. this.prevText="Previous";
  294. this.nextText="Next";
  295. }
  296. // },
  297. deep: true
  298. },
  299. },
  300. mounted() {
  301. window.scrollTo(0, 0);
  302. this.accessToAllApplications();
  303. this.queryApplication();
  304. if(this.$i18n.locale != 'en'){
  305. this.prevText="上一页";
  306. this.nextText="下一页";
  307. }else{
  308. this.prevText="Previous";
  309. this.nextText="Next";
  310. }
  311. },
  312. destroyed() {},
  313. methods: {
  314. //查看进度
  315. seeprogress(param) {
  316. if(this.isDistinguish){
  317. this.logo = "my";
  318. }else {
  319. this.logo = "all";
  320. }
  321. var params = {
  322. name: "approvals",
  323. type: false,
  324. detailids: param.id,
  325. logo:this.logo,
  326. };
  327. this.$emit("applicationType", params);
  328. },
  329. //查看详情
  330. seedetail(param) {
  331. if(this.isDistinguish){
  332. this.logo = "my";
  333. }else {
  334. this.logo = "all";
  335. }
  336. if (param.reserveTwo == 2) {
  337. var params = {
  338. name: "approvalfinish",
  339. type: false,
  340. detailids: param.id,
  341. flag: 2,
  342. logo:this.logo,
  343. };
  344. this.$emit("applicationType", params);
  345. }
  346. if (param.reserveTwo == 5) {
  347. var params = {
  348. name: "withdrawdetail",
  349. type: false,
  350. detailids: param.id,
  351. flag: 2,
  352. logo:this.logo,
  353. };
  354. this.$emit("applicationType", params);
  355. }
  356. if (
  357. param.reserveTwo == 6 ||
  358. param.reserveTwo == 7 ||
  359. param.reserveTwo == 10 ||
  360. param.reserveTwo == 11
  361. ) {
  362. var params = {
  363. name: "approvaldetail",
  364. type: false,
  365. detailids: param.id,
  366. flag: 2,
  367. logo:this.logo,
  368. };
  369. this.$emit("applicationType", params);
  370. }
  371. if (param.reserveTwo == 8 || param.reserveTwo == 9) {
  372. var params = {
  373. name: "nopassdetail",
  374. type: false,
  375. detailids: param.id,
  376. flag: 2,
  377. logo:this.logo,
  378. };
  379. this.$emit("applicationType", params);
  380. }
  381. },
  382. // 获取全部申请或我提交的申请
  383. accessToAllApplications() {
  384. if (this.isDistinguish) {
  385. console.log("我提交的");
  386. var params = this.pageNo ? this.pageNo : "1";
  387. var pageSize = this.pageSize ? this.pageSize : "7";
  388. var query = this.query ? this.query : "";
  389. var queryConditions = this.search ? this.search : "";
  390. getCommitteeMySubmitApplication(params, pageSize, query, queryConditions).then(
  391. (res) => {
  392. var data = res.data;
  393. console.log(data);
  394. if (JSON.stringify(data) !== "{}") {
  395. this.showContent = true;
  396. this.allApplicationList = res.data.nrcApplyQuerys;
  397. this.total = res.data.page.totalCount;
  398. } else {
  399. this.showContent = false;
  400. }
  401. }
  402. );
  403. } else {
  404. var params = this.pageNo ? this.pageNo : "1";
  405. var pageSize = this.pageSize ? this.pageSize : "7";
  406. var query = this.query ? this.query : "";
  407. var queryConditions = this.search ? this.search : "";
  408. getCommitteeAllApplication(params, pageSize, query, queryConditions).then(
  409. (res) => {
  410. var data = res.data;
  411. if (JSON.stringify(data) !== "{}") {
  412. this.showContent = true;
  413. this.allApplicationList = res.data.nrcApplyQuerys;
  414. this.total = res.data.page.totalCount;
  415. } else {
  416. this.showContent = false;
  417. }
  418. }
  419. );
  420. }
  421. },
  422. // 查询申请
  423. queryApplication() {
  424. getApplicationDicts().then((res) => {
  425. var data = res.data[0];
  426. if(this.$i18n.locale == 'en'){
  427. for (let i = 0; i < data.length; i++) {
  428. data[i].label = data[i].label2
  429. }
  430. }
  431. console.log(data);
  432. if (data) {
  433. this.screen1s.item = res.data[0] || [];
  434. let labelmsg = "全部"
  435. if(this.$i18n.locale == 'en'){
  436. labelmsg = "All";
  437. }
  438. let both = {
  439. label: labelmsg,
  440. value: null,
  441. };
  442. this.screen1s.item.unshift(both);
  443. }
  444. });
  445. },
  446. // 创建申请
  447. toCreate() {
  448. var params = {
  449. name: "submitapplication",
  450. type: false,
  451. flag: 2,
  452. /* category: "3",*/
  453. };
  454. this.$emit("applicationType", params);
  455. },
  456. handleSizeChange(val) {
  457. this.pageSize = val;
  458. this.accessToAllApplications();
  459. console.log(`每页 ${val} 条`);
  460. },
  461. handleCurrentChange(val) {
  462. this.pageNo = val;
  463. console.log(this.pageNo);
  464. this.accessToAllApplications();
  465. },
  466. // 查询
  467. searchTitle() {
  468. this.accessToAllApplications();
  469. },
  470. // 清空
  471. reset() {
  472. this.search = "";
  473. this.accessToAllApplications();
  474. },
  475. // 返回
  476. back() {
  477. var params = {
  478. name: "workspace",
  479. type: false,
  480. };
  481. this.$emit("applicationType", params);
  482. },
  483. screenBack(data) {
  484. this.query = data.click1;
  485. this.accessToAllApplications();
  486. },
  487. },
  488. };
  489. </script>
  490. <style scoped>
  491. .box1 {
  492. padding: 0 0 20px 0;
  493. position: absolute;
  494. }
  495. .center {
  496. display: flex;
  497. }
  498. .topImg img {
  499. display: inline-block;
  500. width: 1200px;
  501. height: 324px;
  502. }
  503. .centerLeft1 {
  504. height: 700px;
  505. width: 1200px;
  506. border-radius: 0px;
  507. background: #fff;
  508. }
  509. .left {
  510. position: relative;
  511. }
  512. .top .top1 {
  513. position: absolute;
  514. width: 5.5px;
  515. height: 10.5px;
  516. left: 20px;
  517. top: 35px;
  518. background: #376ac7;
  519. z-index: 1;
  520. }
  521. .top .top2 {
  522. position: absolute;
  523. width: 5.5px;
  524. height: 15px;
  525. left: 20px;
  526. top: 35px;
  527. background: #83bd50;
  528. }
  529. .top .allApplication {
  530. position: absolute;
  531. height: 22px;
  532. left: 34px;
  533. top: 31px;
  534. }
  535. .top .allApplication span {
  536. font-family: "PingFang SC";
  537. font-style: normal;
  538. font-weight: 600;
  539. font-size: 16px;
  540. line-height: 22px;
  541. color: #375586;
  542. }
  543. .top .notice {
  544. position: absolute;
  545. height: 22px;
  546. left: 160px;
  547. top: 32px;
  548. }
  549. .top .notice span {
  550. font-family: "PingFang SC";
  551. font-style: normal;
  552. font-weight: 600;
  553. font-size: 16px;
  554. line-height: 22px;
  555. color: rgba(10, 10, 10, 0.85);
  556. }
  557. .top .more {
  558. position: absolute;
  559. height: 16px;
  560. right: 21px;
  561. top: 31px;
  562. }
  563. .top .more span {
  564. font-family: "Roboto";
  565. font-style: normal;
  566. font-weight: 500;
  567. font-size: 14px;
  568. line-height: 16px;
  569. color: #4790f7;
  570. }
  571. .content {
  572. width: 1200px;
  573. height: 400px;
  574. position: absolute;
  575. top: 250px;
  576. display: flex;
  577. flex-wrap: wrap;
  578. overflow: auto;
  579. }
  580. .content .content1 {
  581. box-sizing: border-box;
  582. margin: 10px 0 0 18px;
  583. width: 275px;
  584. height: 169px;
  585. border: 1px dashed rgba(0, 0, 0, 0.15);
  586. display: flex;
  587. justify-content: center;
  588. align-items: center;
  589. }
  590. .content .content2 {
  591. margin: 10px 0 0 18px;
  592. box-sizing: border-box;
  593. width: 275px;
  594. height: 169px;
  595. border: 1px solid rgba(0, 0, 0, 0.15);
  596. padding: 0 18px 0 18px;
  597. }
  598. .topText {
  599. position: relative;
  600. }
  601. .content .title {
  602. width: 240px;
  603. overflow: hidden;
  604. text-overflow: ellipsis;
  605. white-space: nowrap;
  606. font-family: "PingFang SC";
  607. font-style: normal;
  608. font-weight: 600;
  609. font-size: 14px;
  610. line-height: 20px;
  611. color: rgba(0, 0, 0, 0.85);
  612. }
  613. .content .time {
  614. font-family: "Roboto";
  615. font-style: normal;
  616. font-weight: 400;
  617. font-size: 12px;
  618. line-height: 14px;
  619. color: rgba(0, 0, 0, 0.65);
  620. }
  621. .content .type {
  622. /* position: absolute; */
  623. font-family: "PingFang SC";
  624. font-style: normal;
  625. font-weight: 300;
  626. font-size: 14px;
  627. line-height: 20px;
  628. color: rgba(0, 0, 0, 0.85);
  629. }
  630. .content .test {
  631. font-family: "PingFang SC";
  632. font-style: normal;
  633. font-weight: 400;
  634. font-size: 14px;
  635. line-height: 20px;
  636. color: rgba(0, 0, 0, 0.85);
  637. }
  638. .test::after {
  639. content: "";
  640. display: inline-block;
  641. overflow: hidden;
  642. width: 100%;
  643. }
  644. .content .bottom {
  645. width: 273px;
  646. height: 38px;
  647. background: #f7f7f7;
  648. margin-left: -18px;
  649. margin-top: 5px;
  650. }
  651. .content .bottom1 {
  652. width: 273px;
  653. height: 38px;
  654. background: #f7f7f7;
  655. margin-left: -18px;
  656. margin-top: 8px;
  657. }
  658. .progress {
  659. height: 34px;
  660. width: 246px;
  661. border-radius: 0px;
  662. display: flex;
  663. justify-content: center;
  664. align-items: center;
  665. }
  666. .detail {
  667. height: 34px;
  668. width: 246px;
  669. border-radius: 0px;
  670. background: rgba(217, 217, 217, 0.2);
  671. display: flex;
  672. justify-content: center;
  673. align-items: center;
  674. }
  675. .content .toView {
  676. margin-left: 100px;
  677. font-family: "Roboto";
  678. font-style: normal;
  679. font-weight: 400;
  680. font-size: 14px;
  681. color: #274e92;
  682. }
  683. .content .toView1 {
  684. margin-left: 100px;
  685. font-family: "Roboto";
  686. font-style: normal;
  687. font-weight: 400;
  688. font-size: 14px;
  689. color: #274e92;
  690. display: block;
  691. margin-top: 5px;
  692. }
  693. .content .toProgress {
  694. font-family: "Roboto";
  695. font-style: normal;
  696. font-weight: 400;
  697. font-size: 14px;
  698. color: #274e92;
  699. margin-top: 10px;
  700. }
  701. .centerLeft2 {
  702. position: relative;
  703. margin-top: 20px;
  704. height: 177px;
  705. width: 850px;
  706. border-radius: 0px;
  707. background: #fff;
  708. }
  709. .content .audit {
  710. position: absolute;
  711. right: 5%;
  712. }
  713. .area {
  714. position: absolute;
  715. top: 100px;
  716. }
  717. .pag {
  718. position: absolute;
  719. bottom: 0;
  720. right: 0;
  721. }
  722. img{
  723. width: 103px;
  724. }
  725. </style>