CommitteeNoticeList.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <!-- 委员会通知公告列表 -->
  2. <template>
  3. <div class="autoBox box1" style="position: relative; background: #f5f5f5">
  4. <div class="center" style="display: flex;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>{{ $t("common.noticeList") }}</span>
  12. </div>
  13. <div @click="back" class="more mouse">
  14. <span>{{ "<" }}{{ $t("common.return") }}</span>
  15. </div>
  16. </div>
  17. <div class="tab">
  18. <div class="leftTitle">
  19. <span style="font-size: 14px; font-weight: 700"
  20. >{{ $t("common.name") }}:</span
  21. >
  22. </div>
  23. <div class="input">
  24. <el-input
  25. style="width: 261px; margin-left: 8px; margin-top: 6px"
  26. v-model="search"
  27. :placeholder="$t('common.pleaseInput')"
  28. >
  29. <!--<i slot="prefix" class="el-input__icon el-icon-search"></i>-->
  30. </el-input>
  31. </div>
  32. <div
  33. class="noticeButton"
  34. style="margin-left: 20px; margin-top: 5px"
  35. >
  36. <el-button
  37. @click="searchTitle"
  38. style="width: 90px"
  39. type="primary"
  40. >{{ $t("common.search") }}</el-button
  41. >
  42. <el-button @click="reset" style="width: 90px">{{ $t("common.reset") }}</el-button>
  43. </div>
  44. </div>
  45. <div v-if="showNav" class="nav">
  46. <div
  47. style="padding: 5px 0 0 0"
  48. class="cursor"
  49. v-show="islogin && titleIndex == 0"
  50. >
  51. <div style="width: 100%">
  52. <div
  53. style="
  54. color: #333;
  55. font-size: 16px;
  56. margin-bottom: 10px;
  57. line-height: 29px;
  58. "
  59. >
  60. <ul>
  61. <li
  62. @click="noticeDetail(item)"
  63. v-for="(item, index) in announcementTheList"
  64. :key="index"
  65. class="content"
  66. >
  67. <el-card>
  68. <div class="list">
  69. <span class="title">{{ item.title }}</span>
  70. <p class="center">{{ item.content }}</p>
  71. <span>{{item.releasePeopleName}}</span>
  72. <spam style="color: rgba(0, 0, 0, 0.65);padding-left: 20px;">
  73. {{ item.releaseTime }}
  74. </spam>
  75. </div>
  76. </el-card>
  77. </li>
  78. </ul>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <div v-else style="margin-left: 43%; margin-top: 15%" class="nav">
  84. <div>
  85. <el-empty :description="$t('common.noData')"></el-empty>
  86. </div>
  87. </div>
  88. <!-- 分页 -->
  89. <div class="pag">
  90. <el-pagination
  91. type="index"
  92. background
  93. layout="prev, pager, next"
  94. :page-size="3"
  95. :total="total - 0"
  96. @current-change="handleCurrentChange"
  97. ></el-pagination>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </template>
  104. <script>
  105. import { getNotificationList } from "@/api/committee/committeeWorkSpace";
  106. import Screen from "@/components/screen";
  107. export default {
  108. name: "CommitteeNoticeList",
  109. components: {
  110. Screen,
  111. },
  112. data() {
  113. return {
  114. titleIndex: 0,
  115. islogin: true,
  116. search: "",
  117. announcementTheList: [],
  118. pageNo: "",
  119. total: "",
  120. showNav: null,
  121. };
  122. },
  123. watch: {
  124. "$i18n.locale"() {},
  125. },
  126. mounted() {
  127. window.scrollTo(0, 0);
  128. this.initData();
  129. },
  130. destroyed() {},
  131. methods: {
  132. initData() {
  133. this.toObtainListAnnouncement();
  134. },
  135. // 获取公告列表
  136. toObtainListAnnouncement() {
  137. var params = "2";
  138. var query = this.pageNo ? this.pageNo : "1";
  139. var queryConditions = this.search ? this.search : "";
  140. getNotificationList(params, query, queryConditions).then((res) => {
  141. var data = res.data;
  142. if (JSON.stringify(data) !== "{}") {
  143. this.announcementTheList = res.data.nrcCommitteeDocumentAnnouncements;
  144. this.total = res.data.page.totalCount;
  145. this.showNav = true;
  146. } else {
  147. this.showNav = false;
  148. }
  149. });
  150. },
  151. handleCurrentChange(val) {
  152. this.pageNo = val;
  153. this.toObtainListAnnouncement();
  154. },
  155. // 通告详情
  156. noticeDetail(item) {
  157. var params = {
  158. name: "noticeDetail",
  159. type: false,
  160. category: "2",
  161. id: item.id,
  162. };
  163. this.$emit("applicationType", params);
  164. },
  165. // 查询
  166. searchTitle() {
  167. this.toObtainListAnnouncement();
  168. },
  169. // 清空
  170. reset() {
  171. this.search = "";
  172. this.toObtainListAnnouncement();
  173. },
  174. back() {
  175. var params = {
  176. name: "workspace",
  177. type: false,
  178. };
  179. this.$emit("applicationType", params);
  180. },
  181. screenBack() {},
  182. changeTitle(i) {
  183. this.titleIndex = i;
  184. },
  185. },
  186. };
  187. </script>
  188. <style scoped>
  189. .mouse {
  190. cursor: pointer;
  191. }
  192. .newsTitle {
  193. display: inline-block;
  194. /* width: 46%; */
  195. width: 100px;
  196. padding: 0 5px;
  197. height: 40px;
  198. text-align: center;
  199. line-height: 40px;
  200. border-radius: 5px;
  201. overflow: hidden;
  202. text-overflow: ellipsis;
  203. white-space: nowrap;
  204. }
  205. .title1 {
  206. background: #286fcf;
  207. color: #fff;
  208. }
  209. .title2 {
  210. background: #e9eef2;
  211. color: #286fcf;
  212. }
  213. .box1 {
  214. padding: 0 0 20px 0;
  215. position: absolute;
  216. }
  217. .center {
  218. display: flex;
  219. }
  220. .topImg img {
  221. display: inline-block;
  222. width: 1200px;
  223. height: 324px;
  224. }
  225. .centerLeft1 {
  226. height: 900px;
  227. width: 1200px;
  228. border-radius: 0px;
  229. background: #fff;
  230. }
  231. .centerLeft1 .tab {
  232. position: absolute;
  233. left: 57px;
  234. top: 79px;
  235. display: flex;
  236. align-items: center;
  237. }
  238. .centerLeft1 .nav {
  239. position: absolute;
  240. top: 139px;
  241. left: 19px;
  242. }
  243. .nav .content {
  244. width: 1160px;
  245. /* height: 187px; */
  246. margin: 30px 0;
  247. }
  248. .list .title {
  249. display: inline-block;
  250. width: 804px;
  251. overflow: hidden;
  252. text-overflow: ellipsis;
  253. white-space: nowrap;
  254. font-family: "PingFang SC";
  255. font-style: normal;
  256. font-weight: 700;
  257. font-size: 20px;
  258. line-height: 22px;
  259. align-items: center;
  260. color: rgba(0, 0, 0, 0.85);
  261. font-feature-settings: "tnum" on, "lnum" on;
  262. }
  263. .list .center {
  264. font-weight: 400;
  265. color: rgba(0, 0, 0, 0.85);
  266. font-size: 14px;
  267. text-indent: 2em;
  268. width: 1115px;
  269. overflow: hidden;
  270. text-overflow: ellipsis;
  271. display: -webkit-box;
  272. -webkit-line-clamp: 2;
  273. -webkit-box-orient: vertical;
  274. }
  275. .left {
  276. position: relative;
  277. }
  278. .top .top1 {
  279. position: absolute;
  280. width: 5.5px;
  281. height: 10.5px;
  282. left: 20px;
  283. top: 35px;
  284. background: #376ac7;
  285. z-index: 1;
  286. }
  287. .top .top2 {
  288. position: absolute;
  289. width: 5.5px;
  290. height: 15px;
  291. left: 20px;
  292. top: 35px;
  293. background: #83bd50;
  294. }
  295. .top .allApplication {
  296. position: absolute;
  297. height: 22px;
  298. left: 34px;
  299. top: 31px;
  300. }
  301. .top .allApplication span {
  302. font-family: "PingFang SC";
  303. font-style: normal;
  304. font-weight: 600;
  305. font-size: 16px;
  306. line-height: 22px;
  307. color: #375586;
  308. }
  309. .top .notice {
  310. position: absolute;
  311. height: 22px;
  312. left: 160px;
  313. top: 32px;
  314. }
  315. .top .notice span {
  316. font-family: "PingFang SC";
  317. font-style: normal;
  318. font-weight: 600;
  319. font-size: 16px;
  320. line-height: 22px;
  321. color: rgba(10, 10, 10, 0.85);
  322. }
  323. .top .more {
  324. position: absolute;
  325. height: 16px;
  326. right: 21px;
  327. top: 31px;
  328. }
  329. .top .more span {
  330. font-family: "Roboto";
  331. font-style: normal;
  332. font-weight: 500;
  333. font-size: 14px;
  334. line-height: 16px;
  335. color: #4790f7;
  336. }
  337. .pag {
  338. position: absolute;
  339. bottom: 0;
  340. right: 45%;
  341. }
  342. </style>