index.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="68px"
  9. >
  10. <el-form-item prop="deptName">
  11. <el-input
  12. placeholder="请输入单位"
  13. v-model="queryParams.deptName"
  14. @input="handleQuery"
  15. />
  16. </el-form-item>
  17. <!--
  18. <el-form-item label="" prop="compereId">
  19. <el-select
  20. v-model="queryParams.compereId"
  21. placeholder="请输入主持人"
  22. @change="Renyuan"
  23. >
  24. <el-option
  25. v-for="item in renYuans"
  26. :key="item.id"
  27. :label="item.name"
  28. :value="item.id"
  29. class="input_xiala"
  30. >
  31. </el-option>
  32. </el-select>
  33. </el-form-item> -->
  34. <el-form-item>
  35. <el-button size="btr" @click="resetQuery">重置</el-button>
  36. </el-form-item>
  37. </el-form>
  38. <el-row :gutter="10" class="mb8">
  39. <el-col :span="1.5">
  40. <el-button
  41. type="primary"
  42. plain
  43. icon="el-icon-plus"
  44. size="mini"
  45. @click="handleAdd"
  46. v-hasPermi="['grassrootsregistration:bdglmeeting:add']"
  47. >新增</el-button
  48. >
  49. </el-col>
  50. <!-- <el-col :span="1.5">
  51. <el-button
  52. type="success"
  53. plain
  54. icon="el-icon-edit"
  55. size="mini"
  56. :disabled="single"
  57. @click="handleUpdate"
  58. v-hasPermi="['grassrootsregistration:bdglmeeting:edit']"
  59. >修改</el-button
  60. >
  61. </el-col>
  62. <el-col :span="1.5">
  63. <el-button
  64. type="danger"
  65. plain
  66. icon="el-icon-delete"
  67. size="mini"
  68. :disabled="multiple"
  69. @click="handleDelete"
  70. v-hasPermi="['grassrootsregistration:bdglmeeting:remove']"
  71. >删除</el-button
  72. >
  73. </el-col>
  74. <el-col :span="1.5">
  75. <el-button
  76. type="warning"
  77. plain
  78. icon="el-icon-download"
  79. size="mini"
  80. :loading="exportLoading"
  81. @click="handleExport"
  82. v-hasPermi="['grassrootsregistration:bdglmeeting:export']"
  83. >导出</el-button
  84. >
  85. </el-col> -->
  86. </el-row>
  87. <el-table
  88. v-loading="loading"
  89. :data="bdglmeetingList"
  90. @selection-change="handleSelectionChange"
  91. :header-cell-style="{ background: '#003C69', color: 'white' }"
  92. >
  93. <el-table-column type="selection" width="55" align="center" />
  94. <el-table-column label="序号" type="index" width="50" align="center">
  95. <template scope="scope">
  96. <span>{{
  97. (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
  98. }}</span>
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="单位" align="center" prop="deptName" />
  102. <el-table-column
  103. label="召开时间"
  104. align="center"
  105. prop="convokeTime"
  106. width="180"
  107. >
  108. <template slot-scope="scope">
  109. <span>{{ parseTime(scope.row.convokeTime, "{y}-{m}-{d}") }}</span>
  110. </template>
  111. </el-table-column>
  112. <el-table-column label="召开地点" align="center" prop="address" />
  113. <el-table-column
  114. label="会议形式"
  115. align="center"
  116. show-overflow-tooltip
  117. prop="meetingForm"
  118. :formatter="meetingFormFn"
  119. />
  120. <el-table-column
  121. label="会议时间"
  122. align="center"
  123. show-overflow-tooltip
  124. prop="convokeTime"
  125. />
  126. <!-- <el-table-column label="主持人" align="center" prop="compereRen" />
  127. <el-table-column
  128. label="参加人"
  129. align="center"
  130. prop="joinId"
  131. show-overflow-tooltip
  132. /> -->
  133. <el-table-column
  134. label="列席人"
  135. align="center"
  136. prop="peopleIds"
  137. show-overflow-tooltip
  138. />
  139. <el-table-column
  140. label="缺席人"
  141. align="center"
  142. prop="absentIds"
  143. show-overflow-tooltip
  144. />
  145. <el-table-column label="记录人" align="center" prop="peopleJiLu" />
  146. <!-- <el-table-column
  147. label="会议议题"
  148. align="center"
  149. prop="title"
  150. show-overflow-tooltip
  151. /> -->
  152. <el-table-column label="会议议题" align="center" show-overflow-tooltip>
  153. <template slot-scope="scope">
  154. <span>{{ onEditor(scope.row.title) }}</span>
  155. </template>
  156. </el-table-column>
  157. <el-table-column
  158. label="操作"
  159. align="center"
  160. class-name="small-padding fixed-width"
  161. width="200"
  162. >
  163. <template slot-scope="scope">
  164. <el-button
  165. size="btk"
  166. type="text"
  167. @click="handleChakan(scope.row)"
  168. v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
  169. ><span class="chakan">查看</span></el-button
  170. >
  171. <el-button
  172. size="btu"
  173. type="text"
  174. @click="handleUpdate(scope.row)"
  175. v-hasPermi="['grassrootsregistration:bdglmeeting:edit']"
  176. ><span class="edit">修改</span></el-button
  177. >
  178. <el-button
  179. size="btd"
  180. type="text"
  181. @click="handleDelete(scope.row)"
  182. v-hasPermi="['grassrootsregistration:bdglmeeting:remove']"
  183. ><span class="delete">删除</span></el-button
  184. >
  185. </template>
  186. </el-table-column>
  187. </el-table>
  188. <pagination
  189. v-show="total > 0"
  190. :total="total"
  191. :page.sync="queryParams.pageNum"
  192. :limit.sync="queryParams.pageSize"
  193. @pagination="getList"
  194. />
  195. <!-- 添加或修改团支部会议登记本对话框 -->
  196. <el-dialog
  197. :title="title"
  198. :visible.sync="open"
  199. width="1016px"
  200. append-to-body
  201. :close-on-click-modal="false"
  202. >
  203. <div class="userAgree">
  204. <div class="jiben">基本信息</div>
  205. <el-form
  206. ref="form"
  207. :model="form"
  208. :rules="rules"
  209. label-width="80px"
  210. :inline="true"
  211. >
  212. <el-form-item label="单位" prop="unitId">
  213. <treeselect
  214. v-model="form.unitId"
  215. :options="deptOptions"
  216. placeholder="请选择单位"
  217. @select="selectPeo"
  218. @open="blurSelect"
  219. />
  220. </el-form-item>
  221. <el-form-item label="召开时间" prop="convokeTime">
  222. <el-date-picker
  223. clearable
  224. size="small"
  225. v-model="form.convokeTime"
  226. type="date"
  227. value-format="yyyy-MM-dd"
  228. placeholder="选择召开时间"
  229. :editable="false"
  230. @change="timeDay"
  231. >
  232. </el-date-picker>
  233. </el-form-item>
  234. <el-form-item label="召开地点" prop="address" class="address">
  235. <el-input v-model="form.address" placeholder="请输入召开地点" />
  236. </el-form-item>
  237. <el-form-item label="会议形式" prop="meetingForm">
  238. <el-select v-model="form.meetingForm" placeholder="请选择会议形式">
  239. <el-option
  240. v-for="(item, i) in huiYiList"
  241. :key="i"
  242. :label="item.dictLabel"
  243. :value="item.dictValue"
  244. >
  245. </el-option>
  246. </el-select>
  247. </el-form-item>
  248. <el-form-item label="主持人" prop="compereId">
  249. <el-select
  250. v-model="form.compereId"
  251. placeholder="请选择主持人"
  252. ref="headerSearchSelect"
  253. >
  254. <el-option
  255. v-for="(item, i) in renYuan"
  256. :key="i"
  257. :label="item.name"
  258. :value="item.id"
  259. :disabled="item.status == 1"
  260. @click.native="compere(item.name)"
  261. class="input_xiala"
  262. >
  263. </el-option>
  264. </el-select>
  265. </el-form-item>
  266. <el-form-item label="记录人" prop="peopleId">
  267. <el-select v-model="form.peopleId" placeholder="请选择记录人">
  268. <el-option
  269. v-for="(item, i) in renYuan"
  270. :key="i"
  271. :label="item.name"
  272. :value="item.id"
  273. @click.native="people(item.name)"
  274. class="input_xiala"
  275. >
  276. </el-option>
  277. </el-select>
  278. </el-form-item>
  279. <!-- <el-form-item label="会议议题" prop="title">
  280. <el-input v-model="form.title" placeholder="请输入会议议题" />
  281. </el-form-item> -->
  282. <el-form-item label="参加人" prop="joinId" class="joinId">
  283. <el-select
  284. ref="abc"
  285. v-model="form1.joinId"
  286. multiple
  287. placeholder="请选择参加人"
  288. class="input_xiala"
  289. filterable
  290. @remove-tag="removeSelect"
  291. @change="changeSelect"
  292. >
  293. <el-option
  294. v-for="item in renYuan"
  295. :key="item.id"
  296. :label="item.name"
  297. :value="item.name"
  298. class="input_xiala"
  299. :disabled="item.disabled"
  300. :class="item.disabled == true ? 'colors' : ''"
  301. >
  302. </el-option>
  303. </el-select>
  304. </el-form-item>
  305. <el-form-item label="列席人" class="joinId">
  306. <el-select
  307. ref="abcd"
  308. v-model="form1.peopleIds"
  309. multiple
  310. placeholder="请选择列席人"
  311. class="input_xiala"
  312. filterable
  313. @remove-tag="removeSelect"
  314. @change="changeSelect"
  315. >
  316. <el-option
  317. v-for="item in renYuans"
  318. :key="item.id"
  319. :label="item.name"
  320. :disabled="item.disabled"
  321. :value="item.name"
  322. class="input_xiala"
  323. :class="item.disabled == true ? 'colors' : ''"
  324. >
  325. </el-option>
  326. </el-select>
  327. </el-form-item>
  328. <el-form-item label="缺席人" class="joinId">
  329. <el-select
  330. ref="abcde"
  331. v-model="form1.absentIds"
  332. multiple
  333. placeholder="请选择缺席人"
  334. class="input_xiala"
  335. filterable
  336. @remove-tag="removeSelect"
  337. @change="changeSelect"
  338. >
  339. <el-option
  340. v-for="item in renYuan"
  341. :key="item.id"
  342. :label="item.name"
  343. :value="item.name"
  344. :disabled="item.disabled"
  345. class="input_xiala"
  346. :class="item.disabled == true ? 'colors' : ''"
  347. >
  348. </el-option>
  349. </el-select>
  350. </el-form-item>
  351. <div class="jiben">会议议题</div>
  352. <quill-editor
  353. class="quill-editor"
  354. ref="myTextEditor"
  355. v-model="form.title"
  356. style=" height: 150px; width: 920px;
  357. margin-bottom: 60px margin-left: 0px; margin-bottom: 55px;"
  358. ></quill-editor>
  359. <div class="jiben">会议内容</div>
  360. <ImageUpload v-model="form.fileUrl"></ImageUpload>
  361. <!-- <quill-editor
  362. class="quill-editor"
  363. ref="myTextEditor"
  364. v-model="form.contents"
  365. style="height: 150px; width: 920px;
  366. margin-bottom: 60px margin-left: 0px; margin-bottom: 55px;"
  367. ></quill-editor> -->
  368. </el-form>
  369. </div>
  370. <div slot="footer" class="dialog-footer">
  371. <el-button type="primary" @click="submitForm(1)">确 定</el-button>
  372. <el-button @click="cancel" size="btn">取消</el-button>
  373. </div>
  374. </el-dialog>
  375. <!-- 查看 -->
  376. <!-- <el-dialog
  377. :visible.sync="menuRoleVisible"
  378. :title="title"
  379. append-to-body
  380. id="chakan"
  381. :close-on-click-modal="false"
  382. >
  383. <bdglmeeting
  384. v-if="menuRoleVisible"
  385. ref="menuRole"
  386. :message="wordInfo"
  387. ></bdglmeeting>
  388. </el-dialog> -->
  389. <el-dialog
  390. :visible.sync="menuRoleVisible"
  391. :title="title"
  392. append-to-body
  393. id="chakan"
  394. :close-on-click-modal="false"
  395. >
  396. <div
  397. style="
  398. margin-bottom: 20px;
  399. margin-left: 28%;
  400. font-size: 16px;
  401. font-weight: 700;
  402. "
  403. >
  404. 会议形式:<span style="margin-right: 30px">{{ names }}</span>
  405. 会议时间:<span>{{ tiemse }}</span>
  406. </div>
  407. <div v-for="item in arr" :key="item" class="divbox">
  408. <img :src="baseUrl + item" alt="" />
  409. </div>
  410. </el-dialog>
  411. </div>
  412. </template>
  413. <script>
  414. //引入查看表格
  415. import bdglmeeting from "@/components/look_word/bdglmeeting.vue";
  416. import { getZhuChiRen } from "@/api/grassrootsregistration/bdglparty";
  417. import {
  418. listBdglmeeting,
  419. getBdglmeeting,
  420. delBdglmeeting,
  421. addBdglmeeting,
  422. updateBdglmeeting,
  423. exportBdglmeeting,
  424. getDept,
  425. getShouBu,
  426. getAll,
  427. } from "@/api/grassrootsregistration/bdglmeeting";
  428. // 富文本
  429. import "quill/dist/quill.core.css";
  430. import "quill/dist/quill.snow.css";
  431. import "quill/dist/quill.bubble.css";
  432. import { quillEditor } from "vue-quill-editor";
  433. // 树形
  434. import Treeselect from "@riophae/vue-treeselect";
  435. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  436. import { jieZhiList } from "@/api/grassrootsregistration/bdgldiary";
  437. export default {
  438. name: "Bdglmeeting",
  439. components: {
  440. quillEditor,
  441. Treeselect,
  442. bdglmeeting,
  443. },
  444. dicts: ["sys_huiyi"],
  445. data() {
  446. return {
  447. //查看页面
  448. menuRoleVisible: false,
  449. wordInfo: {},
  450. //判断关闭
  451. style: "2",
  452. // 遮罩层
  453. loading: true,
  454. // 导出遮罩层
  455. exportLoading: false,
  456. // 选中数组
  457. ids: [],
  458. // 非单个禁用
  459. single: true,
  460. // 非多个禁用
  461. multiple: true,
  462. // 显示搜索条件
  463. showSearch: true,
  464. // 总条数
  465. total: 0,
  466. // 团支部会议登记本表格数据
  467. bdglmeetingList: [],
  468. // 弹出层标题
  469. title: "",
  470. // 是否显示弹出层
  471. open: false,
  472. // 查询参数
  473. queryParams: {
  474. pageNum: 1,
  475. pageSize: 10,
  476. convokeTime: null,
  477. address: null,
  478. compereId: null,
  479. joinId: null,
  480. peopleIds: null,
  481. absentIds: null,
  482. peopleId: null,
  483. title: null,
  484. contents: null,
  485. createtime: null,
  486. updatetime: null,
  487. unitId: null,
  488. },
  489. // 表单参数
  490. form: {},
  491. // 表单校验
  492. rules: {
  493. unitId: [
  494. { required: true, message: "单位名称不能为空", trigger: "blur" },
  495. ],
  496. convokeTime: [
  497. { required: true, message: "召开时间不能为空", trigger: "blur" },
  498. ],
  499. address: [
  500. { required: true, message: "召开地点不能为空", trigger: "blur" },
  501. ],
  502. compereId: [
  503. { required: true, message: "主持人不能为空", trigger: "blur" },
  504. ],
  505. peopleId: [
  506. { required: true, message: "记录人不能为空", trigger: "blur" },
  507. ],
  508. title: [
  509. { required: true, message: "会议议题不能为空", trigger: "blur" },
  510. ],
  511. joinId: [
  512. { required: true, message: "参加人不能为空", trigger: "blur" },
  513. ],
  514. peopleIds: [
  515. { required: true, message: "列席人不能为空", trigger: "blur" },
  516. ],
  517. absentIds: [
  518. { required: true, message: "缺席人不能为空", trigger: "blur" },
  519. ],
  520. meetingForm: [
  521. { required: true, message: "会议形式不能为空", trigger: "blur" },
  522. ],
  523. },
  524. //下拉菜单
  525. options: [],
  526. // 外面的部门
  527. buMeng: [],
  528. // 主持人 人员
  529. renYuan: [],
  530. // 外面的人员
  531. renYuans: [],
  532. // 单位
  533. unitArr: [],
  534. // 部门列表
  535. deptOptions: [],
  536. // 树形配置对象
  537. defaultProps: {
  538. children: "children",
  539. label: "label",
  540. },
  541. // 修改拿到的数据
  542. result: {},
  543. changeArr: [], //存放选中选项的数组
  544. // 表单参数
  545. form1: {
  546. joinId: "",
  547. peopleIds: "",
  548. absentIds: "",
  549. },
  550. baseUrl: process.env.VUE_APP_BASE_API,
  551. arr: [],
  552. // 会议形式
  553. huiYiList: [],
  554. names: null,
  555. tiemse: null,
  556. // 当月日期
  557. current_month: [],
  558. // 下月日期
  559. current_month1: [],
  560. // 日期开关状态
  561. dayTime: null,
  562. };
  563. },
  564. created() {
  565. this.getList();
  566. this.getBuMen();
  567. this.getSuo();
  568. this.onEditor();
  569. // 获取当月
  570. this.getDay();
  571. // 获取下月
  572. this.getDayX();
  573. //会议形式
  574. this.getDicts("sys_huiyi").then((response) => {
  575. this.huiYiList = response.data;
  576. });
  577. jieZhiList().then((res) => {
  578. this.dayTime = res.rows[0].time;
  579. });
  580. //会议形式
  581. this.getDicts("sys_tuan").then((response) => {
  582. this.huiYiList = response.data;
  583. });
  584. },
  585. methods: {
  586. // 获取当月日期
  587. getDay() {
  588. // 获取标准时间
  589. let now = new Date();
  590. // 年
  591. var year = new Date().getFullYear();
  592. // 月
  593. var month = new Date().getMonth() + 1;
  594. // 日
  595. var day = new Date(year, month, 0).getDate();
  596. // console.log(now);
  597. let current_month_num = day;
  598. this.current_month = [];
  599. for (let i = 1; i <= current_month_num; i++) {
  600. let day = now.setDate(i);
  601. let date = new Date(day); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  602. let Y = date.getFullYear() + "-";
  603. let M =
  604. (date.getMonth() + 1 < 10
  605. ? "0" + (date.getMonth() + 1)
  606. : date.getMonth() + 1) + "-";
  607. let D =
  608. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + "";
  609. this.current_month.push(Y + M + D);
  610. // console.log(this.current_month);
  611. }
  612. },
  613. // 获取下个月日期
  614. getDayX() {
  615. // 获取标准时间
  616. let now = new Date();
  617. // 年
  618. var year = new Date().getFullYear();
  619. // 月
  620. var month = new Date().getMonth() + 2;
  621. // 日
  622. var day = new Date(year, month, 0).getDate();
  623. let current_month_num1 = day;
  624. for (let i = 1; i <= current_month_num1; i++) {
  625. let day = now.setDate(i);
  626. let date = new Date(day); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  627. let Y = date.getFullYear() + "-";
  628. let M =
  629. (date.getMonth() + 2 < 10
  630. ? "0" + (date.getMonth() + 2)
  631. : date.getMonth() + 2) + "-";
  632. let D =
  633. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + "";
  634. this.current_month.push(Y + M + D);
  635. }
  636. },
  637. timeDay(val) {
  638. var date1 = Math.round(new Date(val) / 1000);
  639. // 当月时间
  640. this.current_month.forEach((element) => {
  641. // 十号之前是1675987200
  642. var date2 = Math.round(new Date(element) / 1000);
  643. if (date1 > 1678406400 && this.dayTime == 1) {
  644. this.$confirm("请在规定时间内填写", "提示", {
  645. confirmButtonText: "确定",
  646. cancelButtonText: "取消",
  647. type: "warning",
  648. })
  649. .then(() => {
  650. this.form.convokeTime = null;
  651. })
  652. .catch(() => {
  653. this.form.convokeTime = null;
  654. });
  655. }
  656. if (date1 < 1675180250 && this.dayTime == 1) {
  657. this.$confirm("请在规定时间内填写", "提示", {
  658. confirmButtonText: "确定",
  659. cancelButtonText: "取消",
  660. type: "warning",
  661. })
  662. .then(() => {
  663. this.form.convokeTime = null;
  664. })
  665. .catch(() => {
  666. this.form.convokeTime = null;
  667. });
  668. }
  669. });
  670. },
  671. // 翻译
  672. meetingFormFn(row) {
  673. var name = null;
  674. this.huiYiList.map((item) => {
  675. if (item.dictValue == row.meetingForm) {
  676. name = item.dictLabel;
  677. }
  678. });
  679. return name;
  680. },
  681. //change方法
  682. changeSelect() {
  683. for (var key in this.form1) {
  684. this.form1[key].forEach((item) => {
  685. this.changeArr.push(item);
  686. });
  687. }
  688. //有可能会出现重复的元素,所以对changeArr数组进行去重操作
  689. this.changeArr = this.quchong(this.changeArr);
  690. //对changeArr进行遍历,对hobbyList进行遍历,
  691. //changeArr有哪一项,就把hobbyList中该项的disabled属性置为true,禁用
  692. this.changeArr.forEach((item) => {
  693. this.renYuan.forEach((yitem) => {
  694. if (item === yitem.name) {
  695. yitem.disabled = true;
  696. }
  697. });
  698. });
  699. },
  700. //remove-tag方法,移除某一项时触发该方法
  701. removeSelect(val) {
  702. //将移除的那一项,从changeArr数组中找到下标,并移除
  703. var str = this.changeArr.findIndex((item) => item === val);
  704. this.changeArr.splice(str, 1);
  705. //对hobbyList数组遍历,将移除的那项disabled属性置为false,启用
  706. this.renYuan.forEach((item) => {
  707. if (val === item.name) {
  708. item.disabled = false;
  709. }
  710. });
  711. },
  712. //数组去重的方法,避免changeArr出现重复的元素
  713. quchong(arr) {
  714. return arr.filter(function (item, index, arr) {
  715. return arr.indexOf(item, 0) === index;
  716. });
  717. },
  718. // 获取搜索所有人
  719. getSuo() {
  720. getAll().then((res) => {
  721. this.renYuans = res.data;
  722. });
  723. },
  724. // 转义视图不加标签
  725. onEditor(str) {
  726. if (str != null) {
  727. var str = str.replace(/<\/?[^>]*>/g, "");
  728. str = str.replace(/[ | ]*\n/g, "\n");
  729. str = str.replace(/ /gi, "");
  730. }
  731. return str;
  732. },
  733. // 获取搜索下拉部门
  734. getBuMen() {
  735. getShouBu().then((res) => {
  736. this.buMeng = res.data;
  737. });
  738. },
  739. // 重置表单人员
  740. ChongZhiRen() {
  741. // 主持人
  742. this.form.compereId = null;
  743. // 记录人
  744. this.form.peopleId = null;
  745. // 参加人
  746. this.form1.joinId = [];
  747. // 列席人
  748. this.form1.peopleIds = [];
  749. // 缺席人
  750. this.form1.absentIds = [];
  751. },
  752. // 获取主持人
  753. getZhuChi(id) {
  754. getZhuChiRen(id).then((res) => {
  755. this.renYuan = res.data;
  756. });
  757. },
  758. // 单位选择触发
  759. selectPeo(val) {
  760. this.ChongZhiRen();
  761. this.form.unitId = val.id;
  762. this.getZhuChi(this.form.unitId);
  763. this.changeArr = [];
  764. },
  765. /** 查询部门下拉树结构 */
  766. getTreeselect() {
  767. getDept().then((response) => {
  768. this.deptOptions = response.data;
  769. });
  770. },
  771. // 搜索时间选择触发
  772. tiem() {
  773. this.getList();
  774. },
  775. // 搜索主持人选中触发
  776. Renyuan() {
  777. this.getList();
  778. },
  779. // 主持人选中触发
  780. compere(name) {
  781. this.form.compereRen = name;
  782. },
  783. // 记录人选中触发
  784. people(name) {
  785. this.form.peopleJiLu = name;
  786. },
  787. /** 查询团支部会议登记本列表 */
  788. getList() {
  789. this.loading = true;
  790. listBdglmeeting(this.queryParams).then((response) => {
  791. this.bdglmeetingList = response.rows;
  792. this.total = response.total;
  793. this.loading = false;
  794. });
  795. },
  796. // 搜索单位触发
  797. company() {
  798. this.getList();
  799. // 联动人员
  800. getZhuChiRen(this.queryParams.unitId).then((res) => {
  801. this.renYuans = res.data;
  802. });
  803. },
  804. // 取消按钮
  805. cancel() {
  806. this.open = false;
  807. this.reset();
  808. },
  809. // 表单重置
  810. reset() {
  811. this.form = {
  812. id: null,
  813. convokeTime: null,
  814. address: null,
  815. compereId: null,
  816. joinId: null,
  817. peopleIds: null,
  818. absentIds: null,
  819. peopleId: null,
  820. title: null,
  821. contents: null,
  822. createtime: null,
  823. updatetime: null,
  824. unitId: null,
  825. };
  826. this.resetForm("form");
  827. },
  828. /** 搜索按钮操作 */
  829. handleQuery() {
  830. this.queryParams.pageNum = 1;
  831. this.getList();
  832. },
  833. /** 重置按钮操作 */
  834. resetQuery() {
  835. this.getSuo();
  836. this.reset();
  837. this.resetForm("queryForm");
  838. this.handleQuery();
  839. },
  840. /** 对话框重置按钮操作 */
  841. resertwo() {
  842. this.reset();
  843. },
  844. // 让select失去焦点
  845. blurSelect() {
  846. // this.$refs.headerSearchSelect.blur();
  847. // this.$refs.aa.blur();
  848. // this.$refs.bb.blur();
  849. // this.$refs.cc.blur();
  850. },
  851. // 多选框选中数据
  852. handleSelectionChange(selection) {
  853. this.ids = selection.map((item) => item.id);
  854. this.single = selection.length !== 1;
  855. this.multiple = !selection.length;
  856. },
  857. /** 新增按钮操作 */
  858. handleAdd() {
  859. this.form1.absentIds = [];
  860. this.form1.joinId = [];
  861. this.form1.peopleIds = [];
  862. // 主持人 人员
  863. this.renYuan = [];
  864. this.reset();
  865. this.style = 2;
  866. this.getTreeselect();
  867. this.open = true;
  868. this.title = "添加团支部会议登记本";
  869. },
  870. /** 修改按钮操作 */
  871. handleUpdate(row) {
  872. this.form1.absentIds = [];
  873. this.form1.joinId = [];
  874. this.form1.peopleIds = [];
  875. this.reset();
  876. this.form.unitId = row.unitId;
  877. this.getZhuChi(this.form.unitId);
  878. this.getTreeselect();
  879. const id = row.id || this.ids;
  880. getBdglmeeting(id).then((response) => {
  881. this.result = response.data;
  882. for (var k in this.result) {
  883. if (k === "deptName") {
  884. delete this.result[k];
  885. }
  886. }
  887. if (this.result.joinId !== "") {
  888. this.form1.joinId = response.data.joinId.split(",");
  889. }
  890. if (this.result.peopleIds !== "" && this.result.peopleIds != null) {
  891. this.form1.peopleIds = response.data.peopleIds.split(",");
  892. }
  893. if (this.result.absentIds !== "" && this.result.absentIds != null) {
  894. this.form1.absentIds = response.data.absentIds.split(",");
  895. }
  896. this.changeSelect();
  897. this.form = this.result;
  898. this.open = true;
  899. this.title = "修改团支部会议登记本";
  900. });
  901. },
  902. //查看按钮操作
  903. handleChakan(row) {
  904. // 是否隐藏按钮
  905. this.opens = false;
  906. const id = row.id || this.ids;
  907. getBdglmeeting(id).then((response) => {
  908. if (response.data.fileUrl != null) {
  909. if (response.data.fileUrl != "") {
  910. this.arr = response.data.fileUrl.split(",");
  911. this.tiemse = response.data.convokeTime;
  912. this.huiYiList.map((item) => {
  913. if (item.dictValue == response.data.meetingForm) {
  914. this.names = item.dictLabel;
  915. }
  916. });
  917. this.title = "查看团支部会议登记本";
  918. this.menuRoleVisible = true;
  919. this.tableStatus = false;
  920. return this.names;
  921. }
  922. }
  923. // this.wordInfo = response.data;
  924. });
  925. },
  926. /** 提交按钮 */
  927. submitForm(style) {
  928. this.style = style;
  929. this.form.joinId = this.form1.joinId;
  930. this.$refs["form"].validate((valid) => {
  931. if (valid) {
  932. if (this.form.id != null) {
  933. if (this.form1.joinId !== undefined) {
  934. this.form.joinId = this.form1.joinId.join(",");
  935. }
  936. if (
  937. this.form1.peopleIds !== undefined &&
  938. this.form1.peopleIds != null &&
  939. this.form1.peopleIds != ""
  940. ) {
  941. this.form.peopleIds = this.form1.peopleIds.join(",");
  942. } else {
  943. this.form.peopleIds = "";
  944. }
  945. if (
  946. this.form1.absentIds !== undefined &&
  947. this.form1.absentIds != null &&
  948. this.form1.absentIds != ""
  949. ) {
  950. this.form.absentIds = this.form1.absentIds.join(",");
  951. } else {
  952. this.form.absentIds = "";
  953. }
  954. updateBdglmeeting(this.form).then((response) => {
  955. this.$modal.msgSuccess("修改成功");
  956. this.open = false;
  957. this.getList();
  958. });
  959. } else {
  960. if (
  961. this.form1.peopleIds != null &&
  962. this.form1.peopleIds.length != 0 &&
  963. this.form1.peopleIds != ""
  964. ) {
  965. this.form.peopleIds = this.form1.peopleIds.join(",");
  966. } else {
  967. this.form.peopleIds = "";
  968. }
  969. if (
  970. this.form1.absentIds != null &&
  971. this.form1.absentIds != "" &&
  972. this.form1.absentIds.length != 0
  973. ) {
  974. this.form.absentIds = this.form1.absentIds.join(",");
  975. } else {
  976. this.form.absentIds = "";
  977. }
  978. this.form.joinId = this.form1.joinId.join(",");
  979. addBdglmeeting(this.form).then((response) => {
  980. this.$modal.msgSuccess("新增成功");
  981. this.open = false;
  982. this.getList();
  983. });
  984. }
  985. }
  986. });
  987. },
  988. /** 删除按钮操作 */
  989. handleDelete(row) {
  990. const ids = row.id || this.ids;
  991. this.$modal
  992. // .confirm('是否确认删除团支部会议登记本编号为"' + ids + '"的数据项?')
  993. .confirm("是否确认删除该数据?")
  994. .then(function () {
  995. return delBdglmeeting(ids);
  996. })
  997. .then(() => {
  998. this.getList();
  999. this.$modal.msgSuccess("删除成功");
  1000. })
  1001. .catch(() => {});
  1002. },
  1003. /** 导出按钮操作 */
  1004. handleExport() {
  1005. const queryParams = this.queryParams;
  1006. this.$modal
  1007. .confirm("是否确认导出所有团支部会议登记本数据项?")
  1008. .then(() => {
  1009. this.exportLoading = true;
  1010. return exportBdglmeeting(queryParams);
  1011. })
  1012. .then((response) => {
  1013. this.$download.name(response.msg);
  1014. this.exportLoading = false;
  1015. })
  1016. .catch(() => {});
  1017. },
  1018. },
  1019. };
  1020. </script>
  1021. <style scoped>
  1022. /* 对话框背景颜色 */
  1023. ::v-deep .el-dialog {
  1024. background: #004d86 !important;
  1025. }
  1026. ::v-deep .el-textarea__inner {
  1027. width: 884px;
  1028. height: 104px;
  1029. }
  1030. ::v-deep .el-dialog__header {
  1031. border-bottom: 1px solid #718a9d;
  1032. }
  1033. ::v-deep .el-dialog__title {
  1034. color: #fff;
  1035. font: 18px;
  1036. }
  1037. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  1038. color: #fff;
  1039. }
  1040. ::v-deep .el-form-item__label {
  1041. font: 16px;
  1042. color: #fff;
  1043. width: 100px !important;
  1044. }
  1045. ::v-deep .el-input__inner {
  1046. /* width: 200px !important;
  1047. height: 36px; */
  1048. background: transparent;
  1049. color: #fff;
  1050. border: 1px solid white !important;
  1051. border-color: #fff !important;
  1052. }
  1053. /* 基本信息背景 */
  1054. .jiben {
  1055. width: 920px;
  1056. height: 32px;
  1057. background-image: url(../../../images/小标题底.png);
  1058. margin-bottom: 25px;
  1059. color: #fff;
  1060. padding-left: 16px;
  1061. line-height: 32px;
  1062. }
  1063. ::v-deep .el-dialog__body {
  1064. box-sizing: border-box;
  1065. padding: 30px 0px 30px 42px;
  1066. }
  1067. /* 调整表单间距 */
  1068. ::v-deep .el-form-item__content {
  1069. width: 200px;
  1070. }
  1071. .contents {
  1072. padding: 0px 40px !important;
  1073. }
  1074. /* 下拉菜单字体/背景颜色 */
  1075. .el-select-dropdown__item.hover,
  1076. .el-select-dropdown__item:hover {
  1077. background-color: #196299;
  1078. color: #111;
  1079. }
  1080. .el-select-dropdown__item {
  1081. color: #111;
  1082. }
  1083. /* 刷新图标 */
  1084. /* .el-icon-refresh {
  1085. width: 76px;
  1086. height: 36px;
  1087. color: #fff;
  1088. background-color: #1d96ff !important;
  1089. border-radius: 4px;
  1090. border: none;
  1091. margin-left: 20px;
  1092. font-size: 14px;
  1093. } */
  1094. /* 时间选择 */
  1095. ::v-deep .el-input--small .el-input__inner {
  1096. width: 200px;
  1097. height: 36px;
  1098. line-height: 36px;
  1099. }
  1100. .el-date-editor.el-input {
  1101. width: 200px;
  1102. height: 36px;
  1103. line-height: 36px;
  1104. }
  1105. ::v-deep .el-date-editor.el-input .el-input__inner {
  1106. height: 36px;
  1107. line-height: 36px;
  1108. }
  1109. /* 富文本 */
  1110. ::v-deep .ql-snow .ql-fill,
  1111. .ql-snow .ql-stroke.ql-fill {
  1112. fill: #fff !important;
  1113. }
  1114. ::v-deep .ql-snow .ql-stroke {
  1115. stroke: #fff !important;
  1116. }
  1117. ::v-deep .ql-snow .ql-picker {
  1118. color: #fff !important;
  1119. }
  1120. /* 单位框背景颜色 */
  1121. ::v-deep .vue-treeselect__control {
  1122. background: #004d86 !important;
  1123. }
  1124. /* 单位下拉菜单选中字体颜色 */
  1125. ::v-deep .vue-treeselect__single-value {
  1126. color: #fff !important;
  1127. }
  1128. /* 出席人 */
  1129. ::v-deep .joinId {
  1130. width: 650px !important;
  1131. }
  1132. ::v-deep .joinId .el-input__inner {
  1133. width: 510px !important;
  1134. }
  1135. /* 分页按钮 */
  1136. ::v-deep .el-pagination.is-background .el-pager li {
  1137. background-color: #004d86;
  1138. color: #fff;
  1139. }
  1140. ::v-deep .el-pagination.is-background .btn-next {
  1141. background-color: #004d86;
  1142. color: #fff;
  1143. }
  1144. /* 富文本删除功能 */
  1145. ::v-deep .ql-blockquote {
  1146. display: none !important;
  1147. }
  1148. ::v-deep .ql-strike {
  1149. display: none !important;
  1150. }
  1151. ::v-deep .ql-script {
  1152. display: none !important;
  1153. }
  1154. ::v-deep .ql-code-block {
  1155. display: none !important;
  1156. }
  1157. ::v-deep .ql-direction {
  1158. display: none !important;
  1159. }
  1160. ::v-deep .el-input__inner {
  1161. cursor: pointer !important;
  1162. }
  1163. ::v-deep .ql-toolbar.ql-snow .ql-formats {
  1164. margin-right: 7px;
  1165. }
  1166. /* 底部确定取消按钮 */
  1167. ::v-deep .el-dialog__footer {
  1168. padding: 30px 55px;
  1169. }
  1170. /* 调整输入框提示文字颜色 */
  1171. ::v-deep .vue-treeselect__placeholder {
  1172. color: #bdbdbd4f !important;
  1173. }
  1174. ::v-deep input::-webkit-input-placeholder {
  1175. color: #bdbdbd4f !important;
  1176. }
  1177. ::v-deep input:-moz-placeholder {
  1178. color: #bdbdbd4f !important;
  1179. }
  1180. #chakan /deep/ .el-dialog__body {
  1181. padding: 30px 30px 30px 112px;
  1182. }
  1183. #chakan ::v-deep .el-dialog {
  1184. min-height: 700px;
  1185. background: #fff !important;
  1186. }
  1187. ::v-deep .el-select__input {
  1188. color: #fff !important;
  1189. }
  1190. .colors {
  1191. color: #ccc !important;
  1192. }
  1193. /* 图片上传 */
  1194. ::v-deep .el-upload--picture-card {
  1195. background-color: transparent;
  1196. }
  1197. ::v-deep .el-upload__tip {
  1198. color: #fff;
  1199. }
  1200. ::v-deep img {
  1201. object-fit: cover;
  1202. }
  1203. .divbox {
  1204. width: 1016px !important;
  1205. min-height: 540px;
  1206. }
  1207. .divbox img {
  1208. width: 700px;
  1209. /*height: 500px;*/
  1210. border-radius: 10px;
  1211. }
  1212. </style>