index.vue 38 KB

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