index.vue 37 KB

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