index.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447
  1. <template>
  2. <div class="app-container">
  3. <el-row :gutter="20">
  4. <el-col :span="4" :xs="24">
  5. <div class="dadui">
  6. <img src="../../../images/星星.png" alt />
  7. 大队
  8. </div>
  9. <div class="tree">
  10. <el-tree
  11. class="userAgrees"
  12. style="height: calc(100vh - 170px); overflow: auto"
  13. :data="deptOptions"
  14. :props="defaultProps"
  15. @node-click="handleNodeClick"
  16. default-expand-all
  17. highlight-current
  18. :expand-on-click-node="false"
  19. ></el-tree>
  20. </div>
  21. </el-col>
  22. <el-col :span="1.5" class="mb8">
  23. <el-button
  24. type="primary"
  25. plain
  26. icon="el-icon-plus"
  27. size="mini"
  28. @click="handleAdd"
  29. v-hasPermi="['thought:getready:add']"
  30. >新增</el-button
  31. >
  32. </el-col>
  33. <el-col :span="1.5">
  34. <el-button
  35. type="success"
  36. plain
  37. icon="el-icon-edit"
  38. size="mini"
  39. :disabled="single"
  40. @click="handleUpdate"
  41. v-hasPermi="['thought:getready:edit']"
  42. >修改</el-button
  43. >
  44. </el-col>
  45. <el-col :span="1.5">
  46. <el-button
  47. type="danger"
  48. plain
  49. icon="el-icon-delete"
  50. size="mini"
  51. :disabled="multiple"
  52. @click="handleDelete"
  53. v-hasPermi="['thought:getready:remove']"
  54. >删除</el-button
  55. >
  56. </el-col>
  57. <!-- <el-col :span="1.5"> -->
  58. <!-- <el-button
  59. type="warning"
  60. plain
  61. icon="el-icon-download"
  62. size="mini"
  63. :loading="exportLoading"
  64. @click="handleExport"
  65. v-hasPermi="['thought:getready:export']"
  66. >导出</el-button
  67. > -->
  68. <!-- </el-col> -->
  69. <!-- </el-row> -->
  70. <el-col :span="20" :xs="24">
  71. <el-table
  72. v-loading="loading"
  73. :data="getreadyList"
  74. @selection-change="handleSelectionChange"
  75. >
  76. <el-table-column type="selection" width="55" align="center" />
  77. <el-table-column
  78. label="序号"
  79. type="index"
  80. width="50"
  81. align="center"
  82. />
  83. <el-table-column
  84. label="教育议题"
  85. align="center"
  86. prop="talkTheme"
  87. show-overflow-tooltip
  88. />
  89. <el-table-column
  90. label="教育议题简介"
  91. align="center"
  92. prop="talkIntroduction"
  93. show-overflow-tooltip
  94. />
  95. <el-table-column
  96. label="教育内容"
  97. align="center"
  98. prop="talkContent"
  99. show-overflow-tooltip
  100. >
  101. <template slot-scope="scope">
  102. <span>{{ onEditor(scope.row.talkContent) }}</span>
  103. </template>
  104. </el-table-column>
  105. <el-table-column
  106. label="开始时间"
  107. align="center"
  108. prop="startTime"
  109. width="100"
  110. >
  111. <template slot-scope="scope">
  112. <span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
  113. </template>
  114. </el-table-column>
  115. <el-table-column
  116. label="组织人"
  117. align="center"
  118. prop="createName"
  119. width="100"
  120. />
  121. <el-table-column
  122. label="记录人"
  123. align="center"
  124. prop="recorder"
  125. width="100"
  126. />
  127. <el-table-column
  128. label="参加人"
  129. align="center"
  130. prop="talkPeople"
  131. show-overflow-tooltip
  132. :formatter="unit2Format"
  133. />
  134. <el-table-column
  135. label="结束时间"
  136. align="center"
  137. prop="endTime"
  138. width="100"
  139. >
  140. <template slot-scope="scope">
  141. <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
  142. </template>
  143. </el-table-column>
  144. <el-table-column
  145. label="操作"
  146. align="center"
  147. class-name="small-padding fixed-width"
  148. width="300px"
  149. fixed="right"
  150. >
  151. <template slot-scope="scope">
  152. <el-button
  153. size="btk"
  154. type="text"
  155. @click.native="ViewRead(scope.row)"
  156. >
  157. <a target="_blank">预览</a>
  158. </el-button>
  159. <el-button
  160. size="btk"
  161. type="text"
  162. @click="handlelook(scope.row)"
  163. v-hasPermi="['thought:getready:query']"
  164. >查看</el-button
  165. >
  166. <el-button
  167. size="btu"
  168. type="text"
  169. @click="handleUpdate(scope.row)"
  170. v-hasPermi="['thought:getready:edit']"
  171. >修改</el-button
  172. >
  173. <el-button
  174. size="btd"
  175. type="text"
  176. @click="handleDelete(scope.row)"
  177. v-hasPermi="['thought:getready:remove']"
  178. >删除</el-button
  179. >
  180. </template>
  181. </el-table-column>
  182. </el-table>
  183. <pagination
  184. v-show="total > 0"
  185. :total="total"
  186. :page.sync="queryParams.pageNum"
  187. :limit.sync="queryParams.pageSize"
  188. @pagination="getList"
  189. />
  190. </el-col>
  191. </el-row>
  192. <!-- 添加或修改教育准备会对话框 -->
  193. <el-dialog
  194. :title="title"
  195. :visible.sync="open"
  196. width="1080px"
  197. append-to-body
  198. :close-on-click-modal="false"
  199. >
  200. <div class="userAgree">
  201. <el-form
  202. ref="form"
  203. :model="form"
  204. :rules="rules"
  205. label-width="100px"
  206. :inline="true"
  207. >
  208. <div class="jiben">基本信息</div>
  209. <el-form-item label="教育议题" prop="talkTheme">
  210. <el-input v-model="form.talkTheme" placeholder="请输入内容" />
  211. </el-form-item>
  212. <el-form-item label="开始时间" prop="startTime">
  213. <el-date-picker
  214. editable
  215. clearable
  216. size="small"
  217. v-model="form.startTime"
  218. type="date"
  219. value-format="yyyy-MM-dd"
  220. placeholder="选择开始时间"
  221. >
  222. </el-date-picker>
  223. </el-form-item>
  224. <el-form-item label="结束时间" prop="endTime" label-width="115px">
  225. <el-date-picker
  226. editable
  227. clearable
  228. size="small"
  229. v-model="form.endTime"
  230. type="date"
  231. value-format="yyyy-MM-dd"
  232. placeholder="选择结束时间"
  233. >
  234. </el-date-picker>
  235. </el-form-item>
  236. <el-form-item label="组织人" prop="createName">
  237. <!-- <el-input
  238. v-model="form.createName"
  239. placeholder="请选择用户名称"
  240. /> -->
  241. <el-select
  242. filterable
  243. v-model="form.createName"
  244. ref="createName"
  245. placeholder="请选择组织人"
  246. >
  247. <el-option
  248. v-for="item in executor"
  249. :key="item.id"
  250. :label="item.name"
  251. :value="item.name"
  252. @click.native="zuzhiPeople(item.id)"
  253. />
  254. </el-select>
  255. </el-form-item>
  256. <!-- <el-form-item label="创建人id" prop="createId">
  257. <el-input v-model="form.createId" placeholder="请输入创建人id" />
  258. </el-form-item> -->
  259. <!-- <el-form-item label="文件名称" prop="fileName">
  260. <el-input v-model="form.fileName" placeholder="请输入文件名称" />
  261. </el-form-item>
  262. <el-form-item label="文件路径" prop="filePath">
  263. <el-input v-model="form.filePath" placeholder="请输入文件路径" />
  264. </el-form-item> -->
  265. <el-form-item label="记录人" prop="recorder">
  266. <!-- <el-input v-model="form.recorder" placeholder="请输入记录人" /> -->
  267. <el-select
  268. v-model="form.recorder"
  269. ref="recorder"
  270. placeholder="请选择记录人"
  271. filterable
  272. >
  273. <el-option
  274. v-for="item in recodeexecutor"
  275. :key="item.id"
  276. :label="item.name"
  277. :value="item.name"
  278. @click.native="jiluPeople(item.id)"
  279. />
  280. </el-select>
  281. </el-form-item>
  282. <el-form-item label="参加人" prop="talkPeople" label-width="100px">
  283. <!-- <el-input v-model="form.talkPeople" placeholder="请输入谈心人员" /> -->
  284. <el-select
  285. v-model="form.talkPeople"
  286. ref="peoplenames"
  287. placeholder="请选择参加人"
  288. class="canjiaren"
  289. multiple
  290. filterable
  291. >
  292. <el-option
  293. v-for="item in executor"
  294. :key="item.id"
  295. :label="item.name"
  296. :value="item.id"
  297. @click.native="returnExecutor(item.id, item.name)"
  298. />
  299. </el-select>
  300. </el-form-item>
  301. <!-- <el-form-item label="记录人id" prop="recorderId">
  302. <el-input v-model="form.recorderId" placeholder="请输入记录人id" />
  303. </el-form-item> -->
  304. <div class="jiben">教育议题简介</div>
  305. <el-form-item prop="talkIntroduction">
  306. <el-input
  307. v-model="form.talkIntroduction"
  308. type="textarea"
  309. placeholder="请输入内容"
  310. />
  311. </el-form-item>
  312. <!-- <div class="jiben">会议主题</div> -->
  313. <div class="jiben">教育内容</div>
  314. <el-form-item>
  315. <!-- <editor v-model="form.talkContent" :min-height="192"/> -->
  316. <!-- <quill-editor
  317. class="quill-editor"
  318. ref="myTextEditor"
  319. v-model="form.talkContent"
  320. style="
  321. height: 150px;
  322. width: 1010px;
  323. margin-left: 0px;
  324. margin-bottom: 60px;
  325. "
  326. ></quill-editor> -->
  327. <quill-editor
  328. class="quill-editor"
  329. ref="myTextEditor"
  330. v-model="form.talkContent"
  331. style="
  332. height: 150px;
  333. width: 1010px;
  334. margin-left: 0px;
  335. color: white;
  336. margin-bottom: 60px;
  337. "
  338. ></quill-editor>
  339. </el-form-item>
  340. <div class="jiben">附件</div>
  341. <el-form-item>
  342. <FileUpload v-model="form.fileName" />
  343. </el-form-item>
  344. <!-- <el-input
  345. v-model="form.fileName"
  346. /> -->
  347. </el-form>
  348. </div>
  349. <div slot="footer" class="dialog-footer">
  350. <el-button type="primary" @click="submitForm">确 定</el-button>
  351. <el-button @click="cancel" size="btn">取 消</el-button>
  352. </div>
  353. </el-dialog>
  354. <!-- 查看教育准备会 -->
  355. <el-dialog
  356. :title="title1"
  357. :visible.sync="open1"
  358. width="1080px"
  359. append-to-body
  360. :close-on-click-modal="false"
  361. >
  362. <div class="userAgree">
  363. <el-form
  364. ref="form"
  365. :model="form1"
  366. :rules="rules"
  367. label-width="100px"
  368. :inline="true"
  369. >
  370. <div class="jiben">基本信息</div>
  371. <el-form-item label="教育议题" prop="talkTheme">
  372. <el-input
  373. v-model="form1.talkTheme"
  374. disabled
  375. placeholder="请输入内容"
  376. />
  377. </el-form-item>
  378. <el-form-item label="开始时间" prop="startTime">
  379. <el-date-picker
  380. disabled
  381. editable
  382. clearable
  383. size="small"
  384. v-model="form1.startTime"
  385. type="date"
  386. value-format="yyyy-MM-dd"
  387. placeholder="选择开始时间"
  388. >
  389. </el-date-picker>
  390. </el-form-item>
  391. <el-form-item label="结束时间" prop="endTime" label-width="115px">
  392. <el-date-picker
  393. disabled
  394. editable
  395. clearable
  396. size="small"
  397. v-model="form1.endTime"
  398. type="date"
  399. value-format="yyyy-MM-dd"
  400. placeholder="选择结束时间"
  401. >
  402. </el-date-picker>
  403. </el-form-item>
  404. <el-form-item label="组织人" prop="createName">
  405. <el-select
  406. disabled
  407. filterable
  408. v-model="form1.createName"
  409. ref="createName"
  410. placeholder="请选择组织人"
  411. >
  412. <el-option
  413. v-for="item in executor"
  414. :key="item.id"
  415. :label="item.name"
  416. :value="item.name"
  417. @click.native="zuzhiPeople(item.id)"
  418. />
  419. </el-select>
  420. </el-form-item>
  421. <el-form-item label="记录人" prop="recorder">
  422. <el-select
  423. disabled
  424. v-model="form1.recorder"
  425. ref="recorder"
  426. placeholder="请选择记录人"
  427. filterable
  428. >
  429. <el-option
  430. v-for="item in recodeexecutor"
  431. :key="item.id"
  432. :label="item.name"
  433. :value="item.name"
  434. @click.native="jiluPeople(item.id)"
  435. />
  436. </el-select>
  437. </el-form-item>
  438. <el-form-item label="参加人" prop="talkPeople" label-width="100px">
  439. <el-select
  440. disabled
  441. v-model="form1.talkPeople"
  442. ref="peoplenames"
  443. placeholder="请选择参加人"
  444. class="canjiaren"
  445. multiple
  446. filterable
  447. >
  448. <el-option
  449. v-for="item in executor"
  450. :key="item.id"
  451. :label="item.name"
  452. :value="item.id"
  453. @click.native="returnExecutor(item.id, item.name)"
  454. />
  455. </el-select>
  456. </el-form-item>
  457. <div class="jiben">教育议题简介</div>
  458. <el-form-item prop="talkIntroduction">
  459. <el-input
  460. disabled
  461. v-model="form1.talkIntroduction"
  462. type="textarea"
  463. placeholder="请输入内容"
  464. />
  465. </el-form-item>
  466. <div class="jiben">教育内容</div>
  467. <el-form-item>
  468. <quill-editor
  469. disabled
  470. class="quill-editor"
  471. ref="myTextEditor"
  472. v-model="form1.talkContent"
  473. style="
  474. height: 150px;
  475. width: 1010px;
  476. margin-left: 0px;
  477. color: white;
  478. margin-bottom: 60px;
  479. "
  480. ></quill-editor>
  481. </el-form-item>
  482. <div class="jiben">附件</div>
  483. <el-form-item class="fujian">
  484. <!-- <FileUpload v-model="form1.fileName" /> -->
  485. <span class="filename">{{ form1.fileName }}</span>
  486. <a
  487. :href="form1.filePath"
  488. :download="form1.fileName"
  489. title="下载"
  490. style="color: white; margin-left: 10px"
  491. class="downloadfile"
  492. >下载附件</a
  493. >
  494. </el-form-item>
  495. </el-form>
  496. </div>
  497. <div slot="footer" class="dialog-footer">
  498. <el-button type="primary" @click="open1 = false">关 闭</el-button>
  499. <!-- <el-button @click="open1=false" size="btn">取 消</el-button> -->
  500. </div>
  501. </el-dialog>
  502. <!-- </div> -->
  503. <!-- 添加预览doc文件弹框 -->
  504. <el-dialog
  505. style="color: pink"
  506. :title="title3"
  507. :visible.sync="open33"
  508. width="1200px"
  509. append-to-body
  510. id="fileinfodocx"
  511. class="el-dialog__header"
  512. custom-class="yuedu"
  513. :close-on-click-modal="false"
  514. >
  515. <div ref="file"></div>
  516. <div slot="footer" class="dialog-footer">
  517. <el-button type="primary" @click="open33 = false">关 闭</el-button>
  518. <!-- <el-button type="primary" @click="open33 = false">
  519. 关 闭</el-button
  520. > -->
  521. </div>
  522. </el-dialog>
  523. <!-- 预览PDF文件弹框 -->
  524. <el-dialog
  525. :title="title3"
  526. :visible.sync="previewDialog"
  527. width="1200px"
  528. append-to-body
  529. id="fileinfopdf"
  530. class="el-dialog__header"
  531. :close-on-click-modal="false"
  532. >
  533. <template>
  534. <div style="display: flex">
  535. <el-button
  536. :class="gopage == true ? 'bg' : ''"
  537. class="gopage"
  538. :theme="'default'"
  539. type="submit"
  540. :title="'上一页'"
  541. @click.native="prePage"
  542. >
  543. 上一页</el-button
  544. >
  545. <div
  546. style="
  547. width: 50px;
  548. height: 28px;
  549. background: #f4f4f4;
  550. text-align: center;
  551. line-height: 28px;
  552. "
  553. >
  554. {{ pageNum }}/{{ pageTotalNum }}
  555. </div>
  556. <el-button
  557. :class="gopage == false ? 'bg' : ''"
  558. :theme="'default'"
  559. class="downpage"
  560. type="submit"
  561. :title="'下一页'"
  562. @click.native="nextPage"
  563. >
  564. 下一页</el-button
  565. >
  566. </div>
  567. <PDF
  568. ref="pdf"
  569. :src="pdfurl"
  570. :page="pageNum"
  571. :rotate="pageRotate"
  572. @progress="loadedRatio = $event"
  573. @page-loaded="pageLoaded($event)"
  574. @num-pages="pageTotalNum = $event"
  575. @error="pdfError($event)"
  576. @link-clicked="page = $event"
  577. ></PDF>
  578. <div slot="footer" class="dialog-footer">
  579. <el-button type="primary" @click="previewDialog = false"
  580. >关 闭</el-button
  581. >
  582. </div>
  583. </template>
  584. </el-dialog>
  585. </div>
  586. </template>
  587. <script>
  588. import {
  589. listGetready,
  590. getGetready,
  591. delGetready,
  592. addGetready,
  593. updateGetready,
  594. exportGetready,
  595. } from "@/api/thought/getready";
  596. import { exportBdgShuju } from "@/api/grassrootsregistration/bdgldiary";
  597. import { allUser } from "@/api/workingArrangements/workTask";
  598. import { getAll } from "@/api/thought/parliament";
  599. import { getWeiShu } from "@/api/grassrootsregistration/bdglmeeting";
  600. import axios from "axios";
  601. import PDF from "vue-pdf";
  602. const docx = require("docx-preview");
  603. window.JSZip = require("jszip");
  604. // 富文本
  605. import "quill/dist/quill.core.css";
  606. import "quill/dist/quill.snow.css";
  607. import "quill/dist/quill.bubble.css";
  608. import { quillEditor } from "vue-quill-editor";
  609. export default {
  610. name: "Getready",
  611. data() {
  612. return {
  613. tiem: "",
  614. // 遮罩层
  615. loading: true,
  616. // 导出遮罩层
  617. exportLoading: false,
  618. // 选中数组
  619. ids: [],
  620. // 非单个禁用
  621. single: true,
  622. // 非多个禁用
  623. multiple: true,
  624. // 显示搜索条件
  625. showSearch: true,
  626. // 总条数
  627. total: 0,
  628. // 教育准备会表格数据
  629. getreadyList: [],
  630. // 弹出层标题
  631. title: "",
  632. // 是否显示弹出层
  633. open: false,
  634. // 查询参数
  635. queryParams: {
  636. pageNum: 1,
  637. pageSize: 10,
  638. talkPeople: null,
  639. startTime: null,
  640. endTime: null,
  641. createName: null,
  642. createId: null,
  643. filePath: null,
  644. fileName: null,
  645. talkContent: null,
  646. talkTheme: null,
  647. talkIntroduction: null,
  648. recorder: null,
  649. recorderId: null,
  650. },
  651. // 表单参数
  652. form: {},
  653. // 表单校验
  654. rules: {
  655. talkTheme: [
  656. { required: true, message: "教育议题不能为空", trigger: "blur" },
  657. ],
  658. startTime: [
  659. { required: true, message: "开始时间不能为空", trigger: "blur" },
  660. ],
  661. endTime: [
  662. { required: true, message: "结束时间不能为空", trigger: "blur" },
  663. ],
  664. createName: [
  665. { required: true, message: "组织人不能为空", trigger: "blur" },
  666. ],
  667. recorder: [
  668. { required: true, message: "记录人不能为空", trigger: "blur" },
  669. ],
  670. talkPeople: [
  671. { required: true, message: "参加人不能为空", trigger: "blur" },
  672. ],
  673. },
  674. // 获取人员
  675. executors: [],
  676. // 记录人
  677. recodeexecutor: [],
  678. // 添加列表的人员
  679. executor: [],
  680. // 左侧树形
  681. deptOptions: [],
  682. //左侧时间选择
  683. pickerOptions: {
  684. disabledDate(time) {
  685. return time.getTime() > Date.now();
  686. },
  687. },
  688. // 树形配置
  689. defaultProps: {
  690. children: "children",
  691. label: "label",
  692. },
  693. // 搜索时间的保存
  694. timeDate: "",
  695. rylist: [],
  696. form1: {},
  697. open1: false,
  698. title1: "",
  699. // 下载文件路径
  700. downurl: process.env.VUE_APP_BASE_API,
  701. // pdf文件
  702. previewDialog: false,
  703. pdfurl: "",
  704. pageNum: 1,
  705. pageTotalNum: 1,
  706. pageRotate: 0,
  707. // 加载进度
  708. loadedRatio: 0,
  709. curPageNum: 0,
  710. gopage: true,
  711. // 虚拟字段
  712. fid: "",
  713. open33: false,
  714. title3: "预览文件",
  715. };
  716. },
  717. components: {
  718. quillEditor,
  719. },
  720. created() {
  721. this.getList();
  722. this.getSuoYou();
  723. // 获取外部部门树形
  724. this.treeselect();
  725. allUser().then((res) => {
  726. this.rylist = res.rows;
  727. });
  728. },
  729. components: {
  730. PDF,
  731. },
  732. methods: {
  733. // 预览弹框
  734. submitForm3() {
  735. this.open33 = false;
  736. },
  737. /**
  738. * 预览PDF
  739. */
  740. previewPDF(row, index) {
  741. this.previewDialog = true;
  742. },
  743. // 上一页函数,
  744. prePage() {
  745. this.gopage = true;
  746. var page = this.pageNum;
  747. page = page > 1 ? page - 1 : this.pageTotalNum;
  748. this.pageNum = page;
  749. },
  750. // 下一页函数
  751. nextPage() {
  752. this.gopage = false;
  753. var page = this.pageNum;
  754. page = page < this.pageTotalNum ? page + 1 : 1;
  755. this.pageNum = page;
  756. },
  757. // 页面顺时针翻转90度。
  758. clock() {
  759. this.pageRotate += 90;
  760. },
  761. // 页面逆时针翻转90度。
  762. counterClock() {
  763. this.pageRotate -= 90;
  764. },
  765. // 页面加载回调函数,其中e为当前页数
  766. pageLoaded(e) {
  767. this.curPageNum = e;
  768. },
  769. // 错误时回调函数。
  770. pdfError(error) {
  771. console.error(error);
  772. },
  773. // 打印全部
  774. pdfPrintAll() {
  775. /**
  776. * 打印界面字符乱码是因为你pdf中使用了自定义字体导致的,谷歌浏览器打印的时候预览界面真的变成了真·方块字 ,解决方案如下:
  777. * 用文章最后的pdfjsWrapper.js在替换掉node_modules/vue-pdf/src/pdfjsWrapper.js
  778. */
  779. this.$refs.pdf.print();
  780. },
  781. // 阅读按钮操作
  782. ViewRead(row) {
  783. console.log(row);
  784. var path = row.filePath;
  785. var index = path.lastIndexOf(".");
  786. var str = path.substring(index + 1, path.length);
  787. if (str == "docx" || str == "doc") {
  788. this.open33 = true;
  789. axios({
  790. method: "get",
  791. responseType: "blob", // 设置响应文件格式
  792. url: process.env.VUE_APP_BASE_API + row.filePath,
  793. }).then(({ data }) => {
  794. $(".docx").attr("id", "printArea");
  795. docx.renderAsync(data, this.$refs.file); // 渲染到页面预览
  796. });
  797. } else if (str == "pdf") {
  798. this.previewDialog = true;
  799. this.pdfurl = process.env.VUE_APP_BASE_API + row.filePath;
  800. this.pageNum = 1;
  801. } else {
  802. this.$message.error("只能预览Doc,Docx,Pdf格式的文件!");
  803. }
  804. },
  805. // 获取执行人
  806. unit2Format(row) {
  807. var deptName = "";
  808. this.recodeexecutor.map((item) => {
  809. row.talkPeople.split(",").forEach((items, index) => {
  810. if (item.id == items) {
  811. deptName += item.name + " ";
  812. }
  813. });
  814. });
  815. return deptName;
  816. },
  817. returnExecutor(id, name) {
  818. // this.form.talkPeople=id
  819. },
  820. zuzhiPeople(id) {
  821. this.form.createId = id;
  822. },
  823. jiluPeople(id) {
  824. this.form.recorderId = id;
  825. },
  826. // 获取部门数据
  827. getShuJu(data) {
  828. exportBdgShuju(data).then((res) => {
  829. this.DataTime = data;
  830. this.registrationData = res;
  831. this.cg = res.cg;
  832. this.sb = res.sb;
  833. // this.yishenpi = res.yiShenPi;
  834. // this.weishenpi = res.weiShenPi;
  835. this.tiems = res.time;
  836. });
  837. },
  838. // 搜索时间触发
  839. shiJian(data) {
  840. this.queryParams.diaryTime = data;
  841. this.timeDate = data;
  842. this.getList();
  843. this.getShuJu(data);
  844. },
  845. // 获取外面部门树形
  846. treeselect() {
  847. getWeiShu().then((res) => {
  848. this.deptOptions = res.data;
  849. });
  850. },
  851. //外面树形选择搜索
  852. handleNodeClick(data) {
  853. this.queryParams.unitId = data.id;
  854. this.getList();
  855. },
  856. // 获取所有人员
  857. getSuoYou() {
  858. getAll().then((response) => {
  859. this.executors = response.data;
  860. // 添加的人员
  861. this.executor = response.data;
  862. // 记录人
  863. this.recodeexecutor = response.data;
  864. });
  865. },
  866. // 转义视图不加标签
  867. onEditor(str) {
  868. //可以在这里进行对应的操作 quill为富文本对象,html为富文本对象内内容由html标签组成,text为quill内容里面的所有文本内容
  869. if (str) {
  870. var str = str.replace(/<\/?[^>]*>/g, ""); //去除HTML tag
  871. str = str.replace(/[ | ]*\n/g, "\n"); //去除行尾空白
  872. return str;
  873. }
  874. },
  875. /** 查询教育准备会列表 */
  876. getList() {
  877. this.loading = true;
  878. listGetready(this.queryParams).then((response) => {
  879. this.getreadyList = response.rows;
  880. this.total = response.total;
  881. this.loading = false;
  882. });
  883. },
  884. // 取消按钮
  885. cancel() {
  886. this.open = false;
  887. this.reset();
  888. },
  889. // 表单重置
  890. reset() {
  891. this.form = {
  892. id: null,
  893. talkPeople: null,
  894. startTime: null,
  895. endTime: null,
  896. createTime: null,
  897. updateTime: null,
  898. createName: null,
  899. createId: null,
  900. filePath: null,
  901. fileName: null,
  902. talkContent: null,
  903. talkTheme: null,
  904. talkIntroduction: null,
  905. recorder: null,
  906. recorderId: null,
  907. };
  908. this.resetForm("form");
  909. },
  910. /** 搜索按钮操作 */
  911. handleQuery() {
  912. this.queryParams.pageNum = 1;
  913. this.getList();
  914. },
  915. /** 重置按钮操作 */
  916. resetQuery() {
  917. this.queryParams = {};
  918. this.resetForm("queryForm");
  919. this.handleQuery();
  920. },
  921. // 多选框选中数据
  922. handleSelectionChange(selection) {
  923. this.ids = selection.map((item) => item.id);
  924. this.single = selection.length !== 1;
  925. this.multiple = !selection.length;
  926. },
  927. /** 新增按钮操作 */
  928. handleAdd() {
  929. this.reset();
  930. this.open = true;
  931. this.title = "添加教育准备会";
  932. },
  933. /** 修改按钮操作 */
  934. handleUpdate(row) {
  935. this.reset();
  936. const id = row.id || this.ids;
  937. getGetready(id).then((response) => {
  938. this.form = response.data;
  939. this.form.talkPeople = this.form.talkPeople.split(",").map(Number);
  940. this.open = true;
  941. this.title = "修改教育准备会";
  942. });
  943. },
  944. // 查看按钮操作
  945. handlelook(row) {
  946. this.reset();
  947. const id = row.id || this.ids;
  948. getGetready(id).then((response) => {
  949. this.form1 = response.data;
  950. this.form1.talkPeople = this.form1.talkPeople.split(",").map(Number);
  951. this.form1.filePath =
  952. process.env.VUE_APP_BASE_API + this.form1.filePath;
  953. this.open1 = true;
  954. this.title1 = "查看教育准备会";
  955. });
  956. },
  957. /** 提交按钮 */
  958. submitForm() {
  959. if (this.form.fileName) {
  960. this.form.filePath = this.form.fileName[0].url;
  961. this.form.fileName = this.form.fileName[0].name;
  962. }
  963. this.form.talkPeople = this.form.talkPeople.join(",");
  964. this.form.talkPeopleId = this.form.talkPeople;
  965. this.$refs["form"].validate((valid) => {
  966. if (valid) {
  967. if (this.form.id != null) {
  968. updateGetready(this.form).then((response) => {
  969. this.$modal.msgSuccess("修改成功");
  970. this.open = false;
  971. this.getList();
  972. });
  973. } else {
  974. addGetready(this.form).then((response) => {
  975. this.$modal.msgSuccess("新增成功");
  976. this.open = false;
  977. this.getList();
  978. });
  979. }
  980. }
  981. });
  982. },
  983. /** 删除按钮操作 */
  984. handleDelete(row) {
  985. const ids = row.id || this.ids;
  986. this.$modal
  987. .confirm("是否确认删除?")
  988. .then(function () {
  989. return delGetready(ids);
  990. })
  991. .then(() => {
  992. this.getList();
  993. this.$modal.msgSuccess("删除成功");
  994. })
  995. .catch(() => {});
  996. },
  997. /** 导出按钮操作 */
  998. handleExport() {
  999. const queryParams = this.queryParams;
  1000. this.$modal
  1001. .confirm("是否确认导出所有教育准备会数据项?")
  1002. .then(() => {
  1003. this.exportLoading = true;
  1004. return exportGetready(queryParams);
  1005. })
  1006. .then((response) => {
  1007. this.$download.name(response.msg);
  1008. this.exportLoading = false;
  1009. })
  1010. .catch(() => {});
  1011. },
  1012. },
  1013. };
  1014. </script>
  1015. <style scoped>
  1016. /* 附件 */
  1017. ::v-deep .fujian .el-form-item__content {
  1018. display: flex;
  1019. }
  1020. /* 备注 */
  1021. .thistext {
  1022. color: white;
  1023. width: 900px;
  1024. border: 1px solid #fff;
  1025. border-radius: 4px;
  1026. height: auto;
  1027. min-height: 30px;
  1028. text-indent: 1em;
  1029. padding: 2px;
  1030. line-height: 30px;
  1031. margin-bottom: 20px;
  1032. /* margin: auto; */
  1033. }
  1034. /* 附件名称样式 */
  1035. .filename {
  1036. display: inline-block;
  1037. color: white;
  1038. width: 900px;
  1039. height: 30px;
  1040. border: 1px solid white;
  1041. line-height: 30px;
  1042. text-indent: 1em;
  1043. }
  1044. /* 下载按钮 */
  1045. .downloadfile {
  1046. border: 1px solid white;
  1047. display: inline-block;
  1048. width: 100px;
  1049. height: 33px;
  1050. border-radius: 5px;
  1051. line-height: 33px;
  1052. text-align: center;
  1053. }
  1054. ::v-deep .el-pagination__sizes .el-input__suffix {
  1055. right: 6px;
  1056. }
  1057. ::v-deep .ql-snow .ql-picker-options .ql-picker-item:focus {
  1058. outline: none !important;
  1059. }
  1060. ::v-deep .ql-snow .ql-picker:focus {
  1061. outline: none !important;
  1062. }
  1063. ::v-deep .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label:focus {
  1064. outline: none !important;
  1065. }
  1066. ::v-deep .ql-toolbar.ql-snow .ql-picker-label {
  1067. border: none !important;
  1068. }
  1069. ::v-deep .ql-formats:focus {
  1070. outline: none !important;
  1071. }
  1072. ::v-deep .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
  1073. border-color: none !important;
  1074. color: black !important;
  1075. }
  1076. /* normal */
  1077. ::v-deep .ql-active {
  1078. outline: none !important;
  1079. }
  1080. /* 输入框 */
  1081. ::v-deep .el-dialog .el-input__inner {
  1082. background-color: #004d86 !important;
  1083. width: 216px;
  1084. color: white;
  1085. margin-right: 20px;
  1086. border: 1px solid white !important;
  1087. }
  1088. ::v-deep .el-input__inner {
  1089. border: 1px solid white !important;
  1090. }
  1091. /* 表格样式 */
  1092. ::v-deep .el-table .el-table__header-wrapper th {
  1093. background-color: #004d86 !important;
  1094. color: white;
  1095. }
  1096. /* 标题弹框 */
  1097. ::v-deep .el-dialog__title {
  1098. color: white;
  1099. /* border-bottom: 1px solid white; */
  1100. }
  1101. /* 标题下划线 */
  1102. ::v-deep .el-dialog__header {
  1103. border-bottom: 1px solid white;
  1104. }
  1105. /* 日历样式 */
  1106. ::v-deep .el-date-editor .el-input__inner {
  1107. height: 36px !important;
  1108. line-height: 36px;
  1109. }
  1110. ::v-deep .datesend .el-form-item__label {
  1111. width: 115px !important;
  1112. }
  1113. /* 会议文本域样式 */
  1114. ::v-deep .el-form-item__content .el-textarea {
  1115. width: 1010px;
  1116. /* height: 80px !important; */
  1117. }
  1118. ::v-deep .el-form-item__content .el-textarea .el-textarea__inner {
  1119. /* width: 1000px; */
  1120. height: 80px !important;
  1121. }
  1122. ::v-deep .el-dialog__body {
  1123. padding-left: 27px;
  1124. padding-right: 0px !important;
  1125. padding-bottom: 0px !important;
  1126. }
  1127. /* 富文本内容 */
  1128. /* ::v-deep .editor{
  1129. width: 1010px;
  1130. color: white;
  1131. } */
  1132. /* 富文本 */
  1133. ::v-deep .ql-snow .ql-fill,
  1134. .ql-snow .ql-stroke.ql-fill {
  1135. fill: #fff !important;
  1136. }
  1137. ::v-deep .ql-snow .ql-stroke {
  1138. stroke: #fff !important;
  1139. }
  1140. ::v-deep .ql-snow .ql-picker {
  1141. color: #fff !important;
  1142. }
  1143. ::v-deep .ql-editor ql-blank {
  1144. color: #fff !important;
  1145. }
  1146. ::v-deep .ql-snow .ql-picker-label {
  1147. position: absolute;
  1148. bottom: 5px;
  1149. }
  1150. ::v-deep .ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
  1151. margin-top: -2px;
  1152. }
  1153. ::v-deep .ql-toolbar.ql-snow {
  1154. display: flex;
  1155. justify-content: space-around;
  1156. }
  1157. /* 富文本删除功能 */
  1158. /* 富文本删除功能 */
  1159. ::v-deep .ql-blockquote {
  1160. display: none !important;
  1161. }
  1162. ::v-deep .ql-strike {
  1163. display: none !important;
  1164. }
  1165. ::v-deep .ql-script {
  1166. display: none !important;
  1167. }
  1168. ::v-deep .ql-code-block {
  1169. display: none !important;
  1170. }
  1171. ::v-deep .ql-direction {
  1172. display: none !important;
  1173. }
  1174. .ql-toolbar.ql-snow .ql-formats {
  1175. margin-right: 7px !important;
  1176. }
  1177. ::v-deep .el-input__inner {
  1178. /* height: 36px !important; */
  1179. color: white;
  1180. background-color: #00365f !important;
  1181. }
  1182. /* 文字多余部分省略 */
  1183. ::v-deep .el-table__cell .cell {
  1184. overflow: hidden;
  1185. text-overflow: ellipsis;
  1186. white-space: nowrap;
  1187. }
  1188. ::v-deep .data .el-date-editor.el-input {
  1189. width: 100%;
  1190. border: none !important;
  1191. }
  1192. ::v-deep .data .el-input__inner {
  1193. width: 100% !important;
  1194. border: none !important;
  1195. }
  1196. ::v-deep .data .el-input--medium .el-input__icon {
  1197. line-height: 36px;
  1198. position: absolute;
  1199. right: -223px;
  1200. top: 2px;
  1201. }
  1202. ::v-deep .data .el-input__inner {
  1203. background-color: transparent !important;
  1204. color: #fff;
  1205. text-align: center;
  1206. margin-top: 2px;
  1207. }
  1208. ::v-deep .data .el-input__suffix {
  1209. position: absolute;
  1210. right: 281px;
  1211. }
  1212. .app-container .box-lfet .data {
  1213. height: 40px;
  1214. background: #003156;
  1215. margin-bottom: 12px;
  1216. color: #fff;
  1217. display: flex;
  1218. font-size: 13px;
  1219. line-height: 25px;
  1220. position: relative;
  1221. }
  1222. .box-lfet .data p {
  1223. position: absolute;
  1224. top: -5px;
  1225. left: 15px;
  1226. }
  1227. .box-lfet .data .a1 {
  1228. width: 128px;
  1229. height: 26px;
  1230. background: rgba(23, 74, 112, 0.4);
  1231. border-radius: 13px;
  1232. position: absolute;
  1233. top: 7px;
  1234. left: 60px;
  1235. }
  1236. ::v-deep .data .el-date-editor.el-input {
  1237. width: 100%;
  1238. border: none;
  1239. }
  1240. ::v-deep .data .el-input__inner {
  1241. width: 100% !important;
  1242. border: none;
  1243. }
  1244. ::v-deep .data .el-input--medium .el-input__icon {
  1245. line-height: 36px;
  1246. position: absolute;
  1247. right: -223px;
  1248. top: 2px;
  1249. }
  1250. ::v-deep .data .el-input__inner {
  1251. background-color: transparent;
  1252. color: #fff;
  1253. text-align: center;
  1254. margin-top: 2px;
  1255. }
  1256. ::v-deep .data .el-input__suffix {
  1257. position: absolute;
  1258. right: 281px;
  1259. }
  1260. /* 头部样式 */
  1261. .dadui {
  1262. height: 40px;
  1263. background: #003156;
  1264. /* border-bottom: 1px solid #718A9D ; */
  1265. background-image: url(../../../images/矩形底部边框.png);
  1266. background-repeat: no-repeat;
  1267. background-position: 0px 39px;
  1268. font-size: 16px;
  1269. color: #1d96ff;
  1270. }
  1271. .dadui img {
  1272. margin: 10px 10px 0px 10px;
  1273. }
  1274. .box-lfet .data p {
  1275. position: absolute;
  1276. top: -5px;
  1277. left: 15px;
  1278. }
  1279. .box-lfet .data .a1 {
  1280. width: 128px;
  1281. height: 26px;
  1282. background: rgba(23, 74, 112, 0.4);
  1283. border-radius: 13px;
  1284. position: absolute;
  1285. top: 7px;
  1286. left: 60px;
  1287. }
  1288. /* 划过效果 */
  1289. ::v-deep .el-tree-node__content:hover {
  1290. /* color: #fff; */
  1291. background-color: #003156;
  1292. background-image: url("../../../assets/images/选中.png");
  1293. background-size: 100% 100%;
  1294. background-repeat: no-repeat;
  1295. }
  1296. .app-container {
  1297. display: flex;
  1298. }
  1299. /* 左侧树状盒子 */
  1300. .app-container .box-lfet {
  1301. width: 15%;
  1302. min-height: 740px;
  1303. /* background: #003156; */
  1304. /* padding: 10px; */
  1305. margin-right: 10px;
  1306. /* border: 1px solid white; */
  1307. }
  1308. /* 右侧内容盒子 */
  1309. .app-container .box-right {
  1310. flex: 1;
  1311. }
  1312. .app-container .box-lfet .data {
  1313. height: 40px;
  1314. background: #003156;
  1315. margin-bottom: 12px;
  1316. color: #fff;
  1317. display: flex;
  1318. font-size: 13px;
  1319. line-height: 25px;
  1320. position: relative;
  1321. }
  1322. .el-tree {
  1323. background: #003156;
  1324. color: #fff;
  1325. margin-right: 2px;
  1326. padding-top: 7px;
  1327. }
  1328. ::v-deep .el-dialog {
  1329. background-color: #004d86 !important;
  1330. }
  1331. ::v-deep .el-input__suffix {
  1332. right: 22px;
  1333. }
  1334. ::v-deep .el-tree-node__content {
  1335. height: 32px;
  1336. }
  1337. ::v-deep
  1338. .el-tree--highlight-current
  1339. .el-tree-node.is-current
  1340. > .el-tree-node__content {
  1341. height: 32px;
  1342. color: #fff !important;
  1343. background-color: #003156;
  1344. background-image: url("../../../assets/images/选中.png");
  1345. background-size: 100% 100%;
  1346. background-repeat: no-repeat;
  1347. }
  1348. ::v-deep .canjiaren .el-input__inner {
  1349. width: 560px;
  1350. }
  1351. /* 计划附件 */
  1352. ::v-deep .el-upload__tip {
  1353. color: white;
  1354. position: absolute;
  1355. top: -5px;
  1356. width: 500px;
  1357. left: 90px;
  1358. color: white;
  1359. }
  1360. ::v-deep .el-link.el-link--default {
  1361. color: white;
  1362. text-indent: 0.5em;
  1363. }
  1364. ::v-deep .el-form-item__content .el-textarea .el-textarea__inner {
  1365. color: white !important;
  1366. }
  1367. /* 卡片样式 */
  1368. .app-container {
  1369. height: calc(100vh - 108px) !important;
  1370. }
  1371. ::v-deep .el-select__input {
  1372. color: white;
  1373. }
  1374. /* doc文件样式修改 */
  1375. ::v-deep .docx {
  1376. padding: 0 !important;
  1377. }
  1378. ::v-deep .docx-wrapper > section.docx {
  1379. /* padding: 0 !important; */
  1380. margin-bottom: 0px !important;
  1381. box-shadow: none;
  1382. }
  1383. /* 预览弹框背景去除 */
  1384. ::v-deep .docx-wrapper {
  1385. padding: 0 !important;
  1386. background: none !important;
  1387. }
  1388. ::v-deep .docx {
  1389. width: 100% !important;
  1390. }
  1391. /* ::v-deep .yuedu .el-dialog__body {
  1392. padding-left: 126px !important;
  1393. } */
  1394. /* 上一页样式 */
  1395. .gopage {
  1396. width: 60px;
  1397. height: 28px;
  1398. background: #f4f4f4;
  1399. color: #60627d;
  1400. border-radius: 14px 0px 0px 14px;
  1401. }
  1402. /* 下一页样式 */
  1403. .downpage {
  1404. width: 60px;
  1405. height: 28px;
  1406. background: #f4f4f4;
  1407. border-radius: 0px 14px 14px 0px;
  1408. }
  1409. .bg {
  1410. background: #1d96ff;
  1411. color: white;
  1412. }
  1413. ::v-deep
  1414. .el-table .el-table__fixed-header-wrapper th {
  1415. background-color: #004d86 ;
  1416. color: #fff;
  1417. }
  1418. #fileinfodocx ::v-deep .el-dialog__body {
  1419. padding-right: 29px !important;
  1420. }
  1421. #fileinfopdf ::v-deep .el-dialog__body {
  1422. padding-right: 29px !important;
  1423. }
  1424. ::v-deep .docx p, p.docx_1{
  1425. line-height: 2;
  1426. }
  1427. </style>