CommitteeOfficialDocumentList.vue 9.0 KB

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