index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. <!-- 军人委员会记录本领导 -->
  2. <template>
  3. <div class="arr_conten">
  4. <el-form
  5. :model="form"
  6. ref="form"
  7. :inline="true"
  8. label-width="68px"
  9. style="padding-left: 30px"
  10. >
  11. <el-form-item prop="year">
  12. <el-date-picker
  13. v-model="form.year"
  14. type="year"
  15. placeholder="选择年"
  16. @change="getSoulist"
  17. value-format="yyyy"
  18. :editable="false"
  19. >
  20. </el-date-picker>
  21. </el-form-item>
  22. <el-form-item>
  23. <el-button size="btr" @click="resetQuery">重置</el-button>
  24. </el-form-item>
  25. </el-form>
  26. <div v-if="status == 1">
  27. <ul>
  28. <li v-for="(item, i) in lieList" :key="i">
  29. <div class="names">{{ item.deptName }}</div>
  30. <div class="btn">
  31. <el-button size="btJS" @click="chaKan(item.deptId)">查看</el-button>
  32. </div>
  33. </li>
  34. </ul>
  35. </div>
  36. <div v-if="status == 0">
  37. <ul v-for="(item, i) in lieList" :key="i + ''">
  38. <li v-for="(item1, i) in item" :key="i">
  39. <div class="names">{{ item1.deptName }}</div>
  40. <div class="btn">
  41. <el-button size="btJS" @click="chaKan(item1.deptId)"
  42. >查看</el-button
  43. >
  44. </div>
  45. </li>
  46. </ul>
  47. </div>
  48. <!-- 查看第一次 -->
  49. <el-dialog
  50. :visible.sync="tableStatus"
  51. :title="title"
  52. append-to-body
  53. id="list"
  54. :close-on-click-modal="false"
  55. custom-class="lieBiao"
  56. >
  57. <el-table
  58. v-loading="loading"
  59. :data="bdglpartyList"
  60. :header-cell-style="{ background: '#003C69', color: 'white' }"
  61. >
  62. <el-table-column label="序号" type="index" width="50" align="center">
  63. <template scope="scope">
  64. <span>{{
  65. (queryParams.pageNum - 1) * queryParams.pageSize +
  66. scope.$index +
  67. 1
  68. }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="单位" align="center" prop="deptName" />
  72. <el-table-column label="会议议题" align="center" show-overflow-tooltip>
  73. <template slot-scope="scope">
  74. <span>{{ onEditor(scope.row.title) }}</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column label="记录人" align="center" prop="peopleJiLu" />
  78. <el-table-column label="主持人" align="center" prop="compereRen" />
  79. <el-table-column
  80. label="列席人"
  81. align="center"
  82. prop="peopleIds"
  83. show-overflow-tooltip
  84. />
  85. <el-table-column
  86. label="缺席人"
  87. align="center"
  88. prop="absentIds"
  89. show-overflow-tooltip
  90. />
  91. <el-table-column
  92. label="参加人"
  93. align="center"
  94. prop="joinId"
  95. show-overflow-tooltip
  96. />
  97. <el-table-column label="召开地点" align="center" prop="address" />
  98. <el-table-column
  99. label="操作"
  100. align="center"
  101. class-name="small-padding fixed-width"
  102. width="100"
  103. >
  104. <template slot-scope="scope">
  105. <el-button
  106. size="btk"
  107. type="text"
  108. @click="handleChakan(scope.row)"
  109. v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
  110. ><span class="chakan">查看</span></el-button
  111. >
  112. </template>
  113. </el-table-column>
  114. </el-table>
  115. <pagination
  116. v-show="total > 0"
  117. :total="total"
  118. :page.sync="queryParams.pageNum"
  119. :limit.sync="queryParams.pageSize"
  120. @pagination="chaKan1"
  121. />
  122. </el-dialog>
  123. <!-- 查看二次-->
  124. <!-- <el-dialog
  125. :visible.sync="menuRoleVisible"
  126. :title="title"
  127. append-to-body
  128. id="chakan"
  129. :close-on-click-modal="false"
  130. :before-close="closes"
  131. >
  132. <bdglsoldier
  133. v-if="menuRoleVisible"
  134. ref="menuRole"
  135. :message="wordInfo"
  136. ></bdglsoldier>
  137. </el-dialog> -->
  138. <el-dialog
  139. :visible.sync="menuRoleVisible"
  140. :title="title"
  141. append-to-body
  142. id="chakan"
  143. :close-on-click-modal="false"
  144. :before-close="closes"
  145. >
  146. <div
  147. style="
  148. margin-bottom: 20px;
  149. margin-left: 28%;
  150. font-size: 16px;
  151. font-weight: 700;
  152. "
  153. >
  154. 会议形式:<span style="margin-right: 30px">{{ names }}</span>
  155. 会议时间:<span>{{ tiemse }}</span>
  156. </div>
  157. <div v-for="item in arr" :key="item" class="divbox">
  158. <img :src="baseUrl + item" alt="" />
  159. </div>
  160. </el-dialog>
  161. </div>
  162. </template>
  163. <script>
  164. import {
  165. getBdglsoldier,
  166. getSoldierList,
  167. getSoldierOnUnitList,
  168. } from "@/api/grassrootsregistration/bdglsoldier";
  169. //引入查看表格
  170. import bdglsoldier from "@/components/look_word/bdglsoldier.vue";
  171. export default {
  172. name: "bdglsoldiers",
  173. dicts: ["sys_huiyi"],
  174. data() {
  175. return {
  176. lieList: [],
  177. //查看页面
  178. menuRoleVisible: false,
  179. title: null,
  180. tableStatus: false,
  181. queryParams: {
  182. pageNum: 1,
  183. pageSize: 10,
  184. },
  185. // 党支部记录本表格数据
  186. bdglpartyList: [],
  187. loading: false,
  188. total: 0,
  189. unitId: undefined,
  190. form: {},
  191. year: null,
  192. status: null,
  193. baseUrl: process.env.VUE_APP_BASE_API,
  194. arr: [],
  195. // 会议形式
  196. huiYiList: [],
  197. names: null,
  198. tiemse: null,
  199. };
  200. },
  201. created() {
  202. this.getSoulist();
  203. //会议形式
  204. this.getDicts("sys_huiyi").then((response) => {
  205. this.huiYiList = response.data;
  206. });
  207. },
  208. methods: {
  209. resetQuery() {
  210. this.form.year = null;
  211. getSoldierList(this.year).then((res) => {
  212. res.rows.forEach((item) => {
  213. this.status = 1;
  214. });
  215. this.lieList = res.rows;
  216. });
  217. },
  218. getSoulist() {
  219. if (this.form.year == null || this.form.year == "") {
  220. getSoldierList().then((res) => {
  221. res.rows.forEach((item) => {
  222. this.status = 0;
  223. });
  224. this.lieList = res.rows;
  225. });
  226. } else {
  227. getSoldierList(this.form.year).then((res) => {
  228. res.rows.forEach((item) => {
  229. this.status = 1;
  230. });
  231. this.lieList = res.rows;
  232. });
  233. }
  234. },
  235. getList() {
  236. this.queryParams.unitId = this.unitId;
  237. getSoldierOnUnitList(this.queryParams).then((response) => {
  238. this.bdglpartyList = response.rows;
  239. this.total = response.total;
  240. });
  241. },
  242. chaKan(row) {
  243. this.queryParams.unitId = row;
  244. this.unitId = row;
  245. getSoldierOnUnitList(this.queryParams).then((response) => {
  246. this.bdglpartyList = response.rows;
  247. this.total = response.total;
  248. this.title = "查看军人委员会工作记录本";
  249. this.tableStatus = true;
  250. });
  251. },
  252. chaKan1(row) {
  253. getSoldierOnUnitList(this.queryParams).then((response) => {
  254. this.bdglpartyList = response.rows;
  255. this.total = response.total;
  256. this.title = "查看军人委员会工作记录本";
  257. this.tableStatus = true;
  258. });
  259. },
  260. handleChakan(row) {
  261. // console.log(row);
  262. const id = row.id || this.ids;
  263. getBdglsoldier(id).then((response) => {
  264. if (response.data.fileUrl != null) {
  265. if (response.data.fileUrl != "") {
  266. this.arr = response.data.fileUrl.split(",");
  267. this.tiemse = response.data.convokeTime;
  268. this.huiYiList.map((item) => {
  269. if (item.dictValue == response.data.meetingForm) {
  270. this.names = item.dictLabel;
  271. }
  272. });
  273. this.title = "查看军人委员会会议登记本";
  274. this.menuRoleVisible = true;
  275. this.tableStatus = false;
  276. return this.names;
  277. }
  278. }
  279. });
  280. },
  281. // 转义视图不加标签
  282. onEditor(str) {
  283. //可以在这里进行对应的操作 quill为富文本对象,html为富文本对象内内容由html标签组成,text为quill内容里面的所有文本内容
  284. if (str) {
  285. var str = str.replace(/<\/?[^>]*>/g, ""); //去除HTML tag
  286. str = str.replace(/[ | ]*\n/g, "\n"); //去除行尾空白
  287. return str;
  288. }
  289. },
  290. closes() {
  291. this.menuRoleVisible = false;
  292. this.tableStatus = true;
  293. },
  294. },
  295. components: {
  296. bdglsoldier,
  297. },
  298. computed: {},
  299. mounted() {},
  300. watch: {},
  301. };
  302. </script>
  303. <style scoped>
  304. ::v-deep .el-dialog {
  305. width: 1070px !important;
  306. }
  307. ::v-deep .el-dialog__body {
  308. margin: 10px 30px 20px 44px;
  309. padding-top: 20px !important;
  310. box-sizing: border-box;
  311. }
  312. ::v-deep .el-dialog__header {
  313. border-bottom: 1px solid #718a9d;
  314. }
  315. .arr_conten {
  316. padding-top: 20px;
  317. }
  318. ul {
  319. display: flex;
  320. /* justify-content: space-between; */
  321. padding: 0 22px;
  322. flex-wrap: wrap;
  323. }
  324. li {
  325. list-style: none;
  326. background: url("../../../assets/images/book.png") no-repeat;
  327. height: 140px;
  328. width: 222px;
  329. /* margin: 20px 0; */
  330. margin-bottom: 20px;
  331. background-size: 100% 100%;
  332. flex: 0 0 16%;
  333. margin-right: 10px;
  334. }
  335. .names {
  336. color: #fff;
  337. font-size: 14px;
  338. text-align: center;
  339. padding: 26px 26px 38px 26px;
  340. letter-spacing: 1px;
  341. }
  342. .btn {
  343. text-align: center;
  344. }
  345. ::v-deep .lieBiao {
  346. background: #004d86 !important;
  347. min-height: 42vh !important;
  348. }
  349. ::v-deep .el-dialog__title {
  350. color: #fff;
  351. font: 18px;
  352. }
  353. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  354. color: #fff;
  355. }
  356. ::v-deep .pagination-container {
  357. /* display: none; */
  358. position: relative;
  359. height: 49px;
  360. margin-bottom: 10px;
  361. margin-top: 6vh;
  362. padding: 10px 20px !important;
  363. background: transparent !important;
  364. }
  365. ::v-deep .el-pagination .el-select .el-input .el-input__inner {
  366. background: #00365f !important;
  367. }
  368. ::v-deep .el-pagination.is-background .btn-prev,
  369. .el-pagination.is-background .btn-next {
  370. background: #00365f !important;
  371. }
  372. ::v-deep .el-pagination__editor.el-input .el-input__inner {
  373. background: #00365f !important;
  374. }
  375. ::v-deep .el-pagination.is-background .btn-next {
  376. background: #00365f !important;
  377. }
  378. ::v-deep .el-pagination.is-background .el-pager li {
  379. background: #00365f;
  380. }
  381. ::v-deep .el-table__body tr:hover > td {
  382. background-color: #3c749d !important;
  383. }
  384. ::v-deep .el-table tr:nth-child(even) {
  385. background: #00365f;
  386. }
  387. ::v-deep .el-input__inner {
  388. cursor: pointer !important;
  389. }
  390. ::v-deep .el-input__inner {
  391. background: transparent;
  392. color: #fff;
  393. border: 1px solid white !important;
  394. border-color: #fff !important;
  395. }
  396. ::v-deep .el-input--medium .el-input__inner {
  397. height: 36px;
  398. line-height: 37px;
  399. }
  400. #chakan ::v-deep .el-dialog {
  401. min-height: 700px;
  402. background: #fff !important;
  403. }
  404. #chakan /deep/ .el-dialog__body {
  405. padding: 30px 30px 30px 132px;
  406. }
  407. ::v-deep img {
  408. object-fit: cover;
  409. }
  410. .divbox {
  411. width: 1016px !important;
  412. min-height: 540px;
  413. }
  414. .divbox img {
  415. width: 700px;
  416. height: 500px;
  417. border-radius: 10px;
  418. }
  419. </style>