CommitteeCommentsAndSuggestions.vue 10 KB

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