index.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  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 v-for="item in arr" :key="item" class="divbox">
  147. <img :src="baseUrl + item" alt="" />
  148. </div>
  149. </el-dialog>
  150. </div>
  151. </template>
  152. <script>
  153. import {
  154. getBdglsoldier,
  155. getSoldierList,
  156. getSoldierOnUnitList,
  157. } from "@/api/grassrootsregistration/bdglsoldier";
  158. //引入查看表格
  159. import bdglsoldier from "@/components/look_word/bdglsoldier.vue";
  160. export default {
  161. name: "bdglsoldiers",
  162. data() {
  163. return {
  164. lieList: [],
  165. //查看页面
  166. menuRoleVisible: false,
  167. title: null,
  168. tableStatus: false,
  169. queryParams: {
  170. pageNum: 1,
  171. pageSize: 10,
  172. },
  173. // 党支部记录本表格数据
  174. bdglpartyList: [],
  175. loading: false,
  176. total: 0,
  177. unitId: undefined,
  178. form: {},
  179. year: null,
  180. status: null,
  181. baseUrl: process.env.VUE_APP_BASE_API,
  182. arr: [],
  183. };
  184. },
  185. created() {
  186. this.getSoulist();
  187. },
  188. methods: {
  189. resetQuery() {
  190. this.form.year = null;
  191. getSoldierList(this.year).then((res) => {
  192. res.rows.forEach((item) => {
  193. this.status = 1;
  194. });
  195. this.lieList = res.rows;
  196. });
  197. },
  198. getSoulist() {
  199. if (this.form.year == null||this.form.year=="") {
  200. getSoldierList().then((res) => {
  201. res.rows.forEach((item) => {
  202. this.status = 0;
  203. });
  204. this.lieList = res.rows;
  205. });
  206. } else {
  207. getSoldierList(this.form.year).then((res) => {
  208. res.rows.forEach((item) => {
  209. this.status = 1;
  210. });
  211. this.lieList = res.rows;
  212. });
  213. }
  214. },
  215. getList() {
  216. this.queryParams.unitId = this.unitId;
  217. getSoldierOnUnitList(this.queryParams).then((response) => {
  218. this.bdglpartyList = response.rows;
  219. this.total = response.total;
  220. });
  221. },
  222. chaKan(row) {
  223. this.queryParams.unitId = row;
  224. this.unitId = row;
  225. getSoldierOnUnitList(this.queryParams).then((response) => {
  226. this.bdglpartyList = response.rows;
  227. this.total = response.total;
  228. this.title = "查看军人委员会工作记录本";
  229. this.tableStatus = true;
  230. });
  231. },
  232. chaKan1(row) {
  233. getSoldierOnUnitList(this.queryParams).then((response) => {
  234. this.bdglpartyList = response.rows;
  235. this.total = response.total;
  236. this.title = "查看军人委员会工作记录本";
  237. this.tableStatus = true;
  238. });
  239. },
  240. handleChakan(row) {
  241. // console.log(row);
  242. const id = row.id || this.ids;
  243. getBdglsoldier(id).then((response) => {
  244. if (response.data.fileUrl != null) {
  245. if (response.data.fileUrl != "") {
  246. this.arr = response.data.fileUrl.split(",");
  247. this.title = "查看军人委员会会议登记本";
  248. this.menuRoleVisible = true;
  249. this.tableStatus = false;
  250. }
  251. }
  252. });
  253. },
  254. // 转义视图不加标签
  255. onEditor(str) {
  256. //可以在这里进行对应的操作 quill为富文本对象,html为富文本对象内内容由html标签组成,text为quill内容里面的所有文本内容
  257. if (str) {
  258. var str = str.replace(/<\/?[^>]*>/g, ""); //去除HTML tag
  259. str = str.replace(/[ | ]*\n/g, "\n"); //去除行尾空白
  260. return str;
  261. }
  262. },
  263. closes() {
  264. this.menuRoleVisible = false;
  265. this.tableStatus = true;
  266. },
  267. },
  268. components: {
  269. bdglsoldier,
  270. },
  271. computed: {},
  272. mounted() {},
  273. watch: {},
  274. };
  275. </script>
  276. <style scoped>
  277. ::v-deep .el-dialog {
  278. width: 1070px !important;
  279. }
  280. ::v-deep .el-dialog__body {
  281. margin: 10px 30px 20px 44px;
  282. padding-top: 20px !important;
  283. box-sizing: border-box;
  284. }
  285. ::v-deep .el-dialog__header {
  286. border-bottom: 1px solid #718a9d;
  287. }
  288. .arr_conten {
  289. padding-top: 20px;
  290. }
  291. ul {
  292. display: flex;
  293. /* justify-content: space-between; */
  294. padding: 0 22px;
  295. flex-wrap: wrap;
  296. }
  297. li {
  298. list-style: none;
  299. background: url("../../../assets/images/book.png") no-repeat;
  300. height: 140px;
  301. width: 222px;
  302. /* margin: 20px 0; */
  303. margin-bottom: 20px;
  304. background-size: 100% 100%;
  305. flex: 0 0 16%;
  306. margin-right: 10px;
  307. }
  308. .names {
  309. color: #fff;
  310. font-size: 14px;
  311. text-align: center;
  312. padding: 26px 26px 38px 26px;
  313. letter-spacing: 1px;
  314. }
  315. .btn {
  316. text-align: center;
  317. }
  318. ::v-deep .lieBiao {
  319. background: #004d86 !important;
  320. min-height: 42vh !important;
  321. }
  322. ::v-deep .el-dialog__title {
  323. color: #fff;
  324. font: 18px;
  325. }
  326. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  327. color: #fff;
  328. }
  329. ::v-deep .pagination-container {
  330. /* display: none; */
  331. position: relative;
  332. height: 49px;
  333. margin-bottom: 10px;
  334. margin-top: 6vh;
  335. padding: 10px 20px !important;
  336. background: transparent !important;
  337. }
  338. ::v-deep .el-pagination .el-select .el-input .el-input__inner {
  339. background: #00365f !important;
  340. }
  341. ::v-deep .el-pagination.is-background .btn-prev,
  342. .el-pagination.is-background .btn-next {
  343. background: #00365f !important;
  344. }
  345. ::v-deep .el-pagination__editor.el-input .el-input__inner {
  346. background: #00365f !important;
  347. }
  348. ::v-deep .el-pagination.is-background .btn-next {
  349. background: #00365f !important;
  350. }
  351. ::v-deep .el-pagination.is-background .el-pager li {
  352. background: #00365f;
  353. }
  354. ::v-deep .el-table__body tr:hover > td {
  355. background-color: #3c749d !important;
  356. }
  357. ::v-deep .el-table tr:nth-child(even) {
  358. background: #00365f;
  359. }
  360. ::v-deep .el-input__inner {
  361. cursor: pointer !important;
  362. }
  363. ::v-deep .el-input__inner {
  364. background: transparent;
  365. color: #fff;
  366. border: 1px solid white !important;
  367. border-color: #fff !important;
  368. }
  369. ::v-deep .el-input--medium .el-input__inner {
  370. height: 28px;
  371. line-height: 37px;
  372. }
  373. #chakan ::v-deep .el-dialog{
  374. min-height: 700px;
  375. background: #fff !important;
  376. }
  377. #chakan /deep/ .el-dialog__body {
  378. padding: 30px 30px 30px 132px;
  379. }
  380. ::v-deep img {
  381. object-fit: cover;
  382. }
  383. .divbox {
  384. width: 1016px !important;
  385. min-height: 540px;
  386. }
  387. .divbox img {
  388. width: 700px;
  389. height: 500px;
  390. border-radius: 10px;
  391. }
  392. </style>