index.vue 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827
  1. <template>
  2. <div class="app-container planTask">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="120px"
  9. >
  10. <el-form-item prop="type" class="plantypes" label-width="80px">
  11. <el-select v-model="queryParams.types" placeholder="请选择计划类型">
  12. <el-option
  13. v-for="(item, i) in ziDian"
  14. :key="i"
  15. :label="item.dictLabel"
  16. :value="item.dictLabel"
  17. @click.native="zidainType(item)"
  18. >
  19. </el-option>
  20. </el-select>
  21. </el-form-item>
  22. <el-form-item prop="unitId" class="plantypes" label-width="80px">
  23. <treeselect
  24. v-model="queryParams.unitId"
  25. :options="users"
  26. placeholder="请选择发布单位"
  27. class="threeselects"
  28. @select="selectPeo3"
  29. />
  30. </el-form-item>
  31. <el-form-item>
  32. <!-- <el-button type="primary" icon="el-icon-search" size="btn" @click="handleQuery">搜索</el-button> -->
  33. <el-button
  34. type="btr"
  35. icon="el-icon-refresh"
  36. size="mini"
  37. @click="resetQuery"
  38. >重置</el-button
  39. >
  40. </el-form-item>
  41. </el-form>
  42. <el-row :gutter="10" class="mb8">
  43. <el-col :span="1.5">
  44. <el-button
  45. type="primary"
  46. plain
  47. icon="el-icon-plus"
  48. size="mini"
  49. @click="handleAdd"
  50. v-hasPermi="['workingArrangements:planTask:add']"
  51. >新增</el-button
  52. >
  53. </el-col>
  54. <el-col :span="1.5">
  55. <el-button
  56. type="warning"
  57. plain
  58. icon="el-icon-download"
  59. size="mini"
  60. :loading="exportLoading"
  61. @click="handleExport"
  62. v-hasPermi="['workingArrangements:planTask:export']"
  63. >导出</el-button
  64. >
  65. </el-col>
  66. <!-- <el-col :span="1.5">
  67. <el-button
  68. type="success"
  69. plain
  70. icon="el-icon-edit"
  71. size="mini"
  72. :disabled="single"
  73. @click="handleUpdate"
  74. v-hasPermi="['workingArrangements:planTask:edit']"
  75. >修改</el-button
  76. >
  77. </el-col>
  78. <el-col :span="1.5">
  79. <el-button
  80. type="danger"
  81. plain
  82. icon="el-icon-delete"
  83. size="mini"
  84. :disabled="multiple"
  85. @click="handleDelete"
  86. v-hasPermi="['workingArrangements:planTask:remove']"
  87. >删除</el-button
  88. >
  89. </el-col> -->
  90. <!-- <el-col :span="1.5">
  91. <el-button
  92. type="warning"
  93. plain
  94. icon="el-icon-download"
  95. size="mini"
  96. :loading="exportLoading"
  97. @click="handleExport"
  98. v-hasPermi="['workingArrangements:planTask:export']"
  99. >导出</el-button
  100. >
  101. </el-col> -->
  102. <!-- <right-toolbar
  103. :showSearch.sync="showSearch"
  104. @queryTable="getList"
  105. ></right-toolbar> -->
  106. </el-row>
  107. <!-- 渲染table表格 -->
  108. <el-table
  109. v-loading="loading"
  110. :data="planTaskList"
  111. @selection-change="handleSelectionChange"
  112. :header-cell-style="{ background: '#003C69', color: 'white' }"
  113. >
  114. <el-table-column type="selection" width="55" align="center" />
  115. <el-table-column label="名称" align="center" prop="name" />
  116. <!-- <el-table-column
  117. label="发布单位"
  118. align="center"
  119. prop="unitName"
  120. :formatter="unit3Format"
  121. /> -->
  122. <el-table-column label="发布人" align="center" prop="username" />
  123. <el-table-column
  124. label="计划类型"
  125. align="center"
  126. prop="type"
  127. :formatter="unit4Format"
  128. />
  129. <el-table-column
  130. label="执行人"
  131. align="center"
  132. prop="peopleId"
  133. :formatter="unit2Format"
  134. show-overflow-tooltip
  135. />
  136. <el-table-column
  137. label="计划开始时间"
  138. align="center"
  139. prop="startTime"
  140. width="180"
  141. >
  142. <template slot-scope="scope">
  143. <span>{{ parseTime(scope.row.startTime) }}</span>
  144. </template>
  145. </el-table-column>
  146. <el-table-column
  147. label="计划结束时间"
  148. align="center"
  149. prop="endTime"
  150. width="180"
  151. >
  152. <template slot-scope="scope">
  153. <span>{{ parseTime(scope.row.endTime) }}</span>
  154. </template>
  155. </el-table-column>
  156. <el-table-column
  157. label="计划描述"
  158. align="center"
  159. prop="contents"
  160. class="discrible"
  161. show-overflow-tooltip
  162. />
  163. <el-table-column
  164. label="操作"
  165. align="center"
  166. class-name="small-padding fixed-width"
  167. width="300"
  168. >
  169. <template slot-scope="scope">
  170. <el-button
  171. size="btlook"
  172. type="text"
  173. @click="ViewProgress(scope.row)"
  174. v-if="scope.row.common == 1 && scope.row.taskProgress != '100'"
  175. >
  176. <span>进度录入</span>
  177. </el-button>
  178. <el-button
  179. size="btk"
  180. type="text"
  181. @click="handleChakan(scope.row)"
  182. v-if="scope.row.common == 1"
  183. >
  184. <!-- 单人进度 -->
  185. <span class="chakan">查看</span>
  186. </el-button>
  187. <el-button
  188. size="btk"
  189. type="text"
  190. @click="handleChakan1(scope.row)"
  191. v-if="scope.row.common == 2 || scope.row.common == 0"
  192. >
  193. <!-- 多人进度 -->
  194. <span class="chakan">查看</span>
  195. </el-button>
  196. <el-button
  197. size="btu"
  198. type="text"
  199. @click="handleUpdate(scope.row)"
  200. v-hasPermi="['workingArrangements:planTask:edit']"
  201. v-if="scope.row.common == 2"
  202. >修改</el-button
  203. >
  204. <el-button
  205. size="btd"
  206. type="text"
  207. @click="handleDelete(scope.row)"
  208. v-if="scope.row.common == 2"
  209. v-hasPermi="['workingArrangements:planTask:remove']"
  210. >删除</el-button
  211. >
  212. </template>
  213. </el-table-column>
  214. </el-table>
  215. <!-- 分页器 -->
  216. <pagination
  217. v-show="total > 0"
  218. :total="total"
  219. :page.sync="queryParams.pageNum"
  220. :limit.sync="queryParams.pageSize"
  221. @pagination="getList"
  222. />
  223. <!-- 添加或修改工作计划对话框 -->
  224. <el-dialog
  225. :title="title"
  226. :visible.sync="open"
  227. width="990px"
  228. append-to-body
  229. class="el-dialog__header"
  230. :close-on-click-modal="false"
  231. >
  232. <el-form
  233. ref="form"
  234. :model="form"
  235. :rules="rules"
  236. label-width="100px"
  237. :inline="true"
  238. >
  239. <div class="jiben">基本信息</div>
  240. <el-form-item label="计划名称" prop="name">
  241. <el-input
  242. placeholder="请输入计划名称"
  243. label="计划名称"
  244. v-model="form.name"
  245. @click.native="planName"
  246. />
  247. </el-form-item>
  248. <el-form-item label="任务编号" prop="number">
  249. <el-input
  250. placeholder="请选择任务编号"
  251. label="任务编号"
  252. v-model="form.number"
  253. :disabled="true"
  254. class="ipt"
  255. >
  256. </el-input>
  257. </el-form-item>
  258. <el-form-item label="发布单位" prop="adminId">
  259. <treeselect
  260. placeholder="请选择发布单位"
  261. v-model="form.adminId"
  262. :options="part"
  263. @select="selectPeo"
  264. class="threeselects"
  265. disabled
  266. />
  267. </el-form-item>
  268. <!-- <el-form-item label="执行单位" prop="unitId">
  269. <treeselect
  270. v-model="form.unitId"
  271. :options="users"
  272. placeholder="请选择执行单位"
  273. class="threeselects"
  274. @select="selectPeo1"
  275. />
  276. </el-form-item> -->
  277. <el-form-item label="计划类型" prop="type" class="change_plan_type">
  278. <el-select
  279. v-model="form.type"
  280. placeholder="请选择计划类型"
  281. ref="dict"
  282. clearable
  283. size="small"
  284. >
  285. <el-option
  286. v-for="(item, i) in ziDian"
  287. :key="i"
  288. :label="item.dictLabel"
  289. :value="parseInt(item.dictSort)"
  290. >
  291. </el-option>
  292. </el-select>
  293. </el-form-item>
  294. <el-form-item label="发布人" prop="username">
  295. <el-input
  296. placeholder="请输入发布人"
  297. v-model="form.username"
  298. :disabled="true"
  299. class="ipt"
  300. >
  301. </el-input>
  302. </el-form-item>
  303. <div>
  304. <el-form-item label="执行单位" prop="unitId" label-width="100px">
  305. <div>
  306. <el-select
  307. multiple
  308. filterable
  309. v-model="form.unitId"
  310. id="execute"
  311. ref="peoplenames"
  312. placeholder="请选择执行单位"
  313. @remove-tag="selent"
  314. >
  315. <el-option
  316. v-for="(item, i) in danWeisList"
  317. :label="item.deptName"
  318. :value="item.deptId"
  319. id="execute"
  320. @click.native="danFn()"
  321. />
  322. </el-select>
  323. </div>
  324. </el-form-item>
  325. </div>
  326. <div>
  327. <el-form-item label="执行人" prop="peopleName" label-width="100px">
  328. <div>
  329. <el-select
  330. multiple
  331. v-model="form.peopleName"
  332. placeholder="请选择执行人"
  333. id="execute"
  334. ref="peoplenames"
  335. >
  336. <el-option
  337. v-for="item in executor"
  338. :label="item.nickName"
  339. :value="item.userId"
  340. id="execute"
  341. @click.native="returnExecutor(item.deptId, item.nickName)"
  342. />
  343. </el-select>
  344. </div>
  345. </el-form-item>
  346. </div>
  347. <el-form-item label="开始时间" prop="startTime">
  348. <el-date-picker
  349. clearable
  350. size="small"
  351. v-model="form.startTime"
  352. type="datetime"
  353. placeholder="请选择开始时间"
  354. value-format="yyyy-MM-dd HH:mm:ss"
  355. >
  356. </el-date-picker>
  357. </el-form-item>
  358. <el-form-item label="结束时间" prop="endTime">
  359. <el-date-picker
  360. clearable
  361. size="small"
  362. v-model="form.endTime"
  363. type="datetime"
  364. placeholder="请选择结束时间"
  365. default-time="00:00:00"
  366. value-format="yyyy-MM-dd HH:mm:ss"
  367. >
  368. </el-date-picker>
  369. </el-form-item>
  370. <div class="jiben">计划附件</div>
  371. <el-form-item style="margin-left: 30px">
  372. <fileUpload v-model="form.file" :limit="1" />
  373. </el-form-item>
  374. <div class="jiben">计划描述</div>
  375. <el-form-item prop="contents">
  376. <el-input
  377. v-model="form.contents"
  378. type="textarea"
  379. placeholder="请输入内容"
  380. />
  381. </el-form-item>
  382. <div class="jiben">备注</div>
  383. <el-form-item prop="remark">
  384. <el-input
  385. v-model="form.remark"
  386. type="textarea"
  387. placeholder="请输入内容"
  388. />
  389. </el-form-item>
  390. </el-form>
  391. <div slot="footer" class="dialog-footer">
  392. <el-button type="primary" @click="submitForm">确 定</el-button>
  393. <el-button @click="cancel" size="btn">取 消</el-button>
  394. </div>
  395. </el-dialog>
  396. <!-- 进度录入弹框 -->
  397. <el-dialog
  398. :title="title"
  399. :visible.sync="open1"
  400. width="980px"
  401. append-to-body
  402. class="el-dialog__header"
  403. :close-on-click-modal="false"
  404. >
  405. <el-form
  406. ref="Progress"
  407. :model="Progress"
  408. :rules="rules1"
  409. label-width="100px"
  410. :inline="true"
  411. >
  412. <div class="jiben">完成进度</div>
  413. <el-form-item prop="planProgress">
  414. <!-- <el-input
  415. label="计划名称"
  416. v-model="Progress.comPlan"
  417. class="big"
  418. @change="comPlan"
  419. /> -->
  420. <div>
  421. <el-input-number
  422. v-model="Progress.planProgress"
  423. controls-position="right"
  424. :min="0"
  425. :max="100"
  426. ></el-input-number>
  427. <el-progress
  428. :text-inside="true"
  429. :stroke-width="24"
  430. :percentage="Progress.planProgress"
  431. color="rgba(41, 231, 205, 1)"
  432. class="jinduProgress"
  433. ></el-progress>
  434. </div>
  435. </el-form-item>
  436. <!-- <div class="jiben">任务周期</div>
  437. <el-form-item prop="comWeek">
  438. <el-input label="计划名称" v-model="Progress.comWeek" class="big" />
  439. </el-form-item> -->
  440. <!-- <div class="jiben">任务完成状态</div>
  441. <el-progress
  442. :text-inside="true"
  443. :stroke-width="30"
  444. :percentage="Progress.statu"
  445. style="height: 50px"
  446. ></el-progress> -->
  447. <!-- <div class="jiben">附件文档</div>
  448. <el-form-item prop="file">
  449. <el-input label="计划名称" v-model="Progress.file" class="big" />
  450. </el-form-item> -->
  451. <div class="jiben">附件</div>
  452. <el-form-item>
  453. <fileUpload v-model="Progress.file" />
  454. </el-form-item>
  455. <div class="jiben">备注</div>
  456. <el-form-item prop="remark">
  457. <el-input
  458. v-model="Progress.remark"
  459. type="textarea"
  460. placeholder="请输入内容"
  461. />
  462. </el-form-item>
  463. <!-- <div class="jiben">计划描述</div>
  464. <el-form-item prop="contents">
  465. <el-input
  466. v-model="Progress.contents"
  467. type="textarea"
  468. placeholder="请输入内容"
  469. />
  470. </el-form-item> -->
  471. <div class="jiben">完成时间</div>
  472. <el-form-item prop="accomplishTime">
  473. <el-date-picker
  474. class="comtimer"
  475. clearable
  476. size="small"
  477. v-model="Progress.accomplishTime"
  478. type="date"
  479. value-format="yyyy-MM-dd"
  480. placeholder="选择完成时间"
  481. >
  482. </el-date-picker>
  483. </el-form-item>
  484. </el-form>
  485. <div slot="footer" class="dialog-footer">
  486. <el-button type="primary" @click="submitForm1">确 定</el-button>
  487. <el-button @click="cancel" size="btn">取 消</el-button>
  488. </div>
  489. </el-dialog>
  490. <!-- 单人进度查看弹框 -->
  491. <el-dialog
  492. :title="title"
  493. :visible.sync="open2"
  494. width="980px"
  495. append-to-body
  496. class="el-dialog__header"
  497. :close-on-click-modal="false"
  498. >
  499. <el-form
  500. ref="singleTable"
  501. :model="singleTable"
  502. :rules="rules"
  503. label-width="100px"
  504. :inline="true"
  505. >
  506. <div class="jiben">完成进度</div>
  507. <!-- <el-form-item prop="comPlan"> -->
  508. <!-- <el-input
  509. label="计划名称"
  510. v-model="ProgressLook.comPlan"
  511. class="big"
  512. /> -->
  513. <!-- </el-form-item> -->
  514. <el-progress
  515. :text-inside="true"
  516. :stroke-width="24"
  517. :percentage="singleTable.planProgresses"
  518. style="margin-bottom: 20px"
  519. color="rgba(41, 231, 205, 1)"
  520. ></el-progress>
  521. <div class="jiben">任务信息</div>
  522. <el-form-item label="发布人" prop="username" label-width="auto">
  523. <el-input
  524. placeholder="请输入发布人"
  525. v-model="singleTable.username"
  526. :disabled="true"
  527. class="ipt"
  528. style="color: #fff; width: 350px"
  529. >
  530. </el-input>
  531. </el-form-item>
  532. <el-form-item prop="comWeek" label="任务周期" label-width="100px">
  533. <!-- <el-input
  534. v-model="singleTable."
  535. class="big"
  536. /> -->
  537. <div
  538. style="
  539. width: 350px;
  540. border: 1px solid #fff;
  541. border-radius: 4px;
  542. min-height: 35px;
  543. height: auto !important;
  544. line-height: 35px;
  545. text-indent: 1em;
  546. margin-bottom: 20px;
  547. color: #fff;
  548. "
  549. >
  550. {{ singleTable.startTime }} 至 {{ singleTable.endTime }}
  551. </div>
  552. </el-form-item>
  553. <!-- <div class="thistext"></div> -->
  554. <div class="jiben">附件文档</div>
  555. <el-form-item prop="file">
  556. <el-input
  557. label="附件名称"
  558. v-model="singleTable.fileName"
  559. style="width: 820px"
  560. />
  561. <!-- <div>{{singleTableb.fileName}}</div> -->
  562. <a
  563. :href="singleTable.file"
  564. :download="singleTable.fileName"
  565. title="下载"
  566. style="color: white; margin-left: 10px"
  567. class="downloadfile"
  568. >下载附件</a
  569. >
  570. </el-form-item>
  571. <!-- <a :href="singleTable.planProgress.file" style="color:white">下载附件</a> -->
  572. <div class="jiben">任务描述</div>
  573. <!-- <el-form-item prop="contents">
  574. <el-input
  575. v-model="ProgressLook.contents"
  576. type="textarea"
  577. placeholder="请输入内容"
  578. />
  579. </el-form-item> -->
  580. <div class="thistext">{{ singleTable.contents }}</div>
  581. <div class="jiben">备注</div>
  582. <!-- <el-form-item prop="remark">
  583. <el-input
  584. v-model="ProgressLook.remark"
  585. type="textarea"
  586. placeholder="请输入内容"
  587. />
  588. </el-form-item> -->
  589. <div class="thistext">{{ singleTable.remark }}</div>
  590. </el-form>
  591. <div slot="footer" class="dialog-footer">
  592. <el-button type="primary" @click="submitForm2">确 定</el-button>
  593. <el-button @click="cancel" size="btn">取 消</el-button>
  594. </div>
  595. </el-dialog>
  596. <!-- 多人进度查看弹框 -->
  597. <el-dialog
  598. :title="title"
  599. :visible.sync="open3"
  600. width="980px"
  601. append-to-body
  602. class="el-dialog__header jinduchakan"
  603. :close-on-click-modal="false"
  604. >
  605. <el-form
  606. ref="moreTable"
  607. :model="moreTable"
  608. :rules="rules"
  609. label-width="100px"
  610. :inline="true"
  611. >
  612. <div class="jiben">完成进度</div>
  613. <el-progress
  614. :text-inside="true"
  615. :stroke-width="24"
  616. :percentage="comstatus"
  617. style="margin-bottom: 20px"
  618. color="rgba(41, 231, 205, 1)"
  619. ></el-progress>
  620. <div class="jiben">任务信息</div>
  621. <el-form-item label="发布人" prop="username" label-width="auto">
  622. <el-input
  623. placeholder="请输入发布人"
  624. v-model="moreTable.username"
  625. :disabled="true"
  626. class="ipt"
  627. style="color: #fff; width: 350px"
  628. >
  629. </el-input>
  630. </el-form-item>
  631. <el-form-item prop="comWeek" label="任务周期" label-width="100px">
  632. <!-- <el-input
  633. v-model="singleTable."
  634. class="big"
  635. /> -->
  636. <div
  637. style="
  638. width: 350px;
  639. border: 1px solid #fff;
  640. border-radius: 4px;
  641. min-height: 35px;
  642. height: auto !important;
  643. line-height: 35px;
  644. text-indent: 1em;
  645. margin-bottom: 20px;
  646. color: #fff;
  647. "
  648. >
  649. {{ moreTable.startTime }} 至 {{ moreTable.endTime }}
  650. </div>
  651. </el-form-item>
  652. <!-- <div class="thistext"></div> -->
  653. <div class="jiben">附件文档</div>
  654. <el-form-item prop="file">
  655. <!-- <el-input label="计划名称" v-model="ProgressLook.file" class="big" /> -->
  656. <!-- <a :href="moreTable.file" download title="下载" style="color:white;margin-left:10px">下载附件</a> -->
  657. <el-input
  658. label="附件名称"
  659. v-model="moreTable.fileName"
  660. style="width: 820px"
  661. />
  662. <!-- <div>{{singleTableb.fileName}}</div> -->
  663. <a
  664. :href="moreTable.file"
  665. :download="moreTable.fileName"
  666. title="下载"
  667. style="color: white; margin-left: 10px"
  668. class="downloadfile"
  669. >下载附件</a
  670. >
  671. </el-form-item>
  672. <div class="jiben">任务描述</div>
  673. <!-- <el-form-item prop="contents">
  674. <el-input
  675. v-model="ProgressLook.contents"
  676. type="textarea"
  677. placeholder="请输入内容"
  678. />
  679. </el-form-item> -->
  680. <div class="thistext">{{ moreTable.contents }}</div>
  681. <div class="jiben">备注</div>
  682. <!-- <el-form-item prop="remark">
  683. <el-input
  684. v-model="ProgressLook.remark"
  685. type="textarea"
  686. placeholder="请输入内容"
  687. />
  688. </el-form-item> -->
  689. <div class="thistext">{{ moreTable.remark }}</div>
  690. <div class="jiben">执行人信息</div>
  691. <el-table
  692. :data="moreTable.planProgresses"
  693. border
  694. style="width: 100%; background: #004d86"
  695. class="tabless"
  696. >
  697. <el-table-column prop="peopleName" label="执行人" width="180">
  698. </el-table-column>
  699. <el-table-column label="任务周期" width="190">
  700. <template slot-scope="scope">
  701. <div>{{ scope.row.taskCycle }}</div>
  702. </template>
  703. </el-table-column>
  704. <el-table-column prop="schedule" label="进度">
  705. <template slot-scope="scope">
  706. <el-progress
  707. :text-inside="true"
  708. :stroke-width="24"
  709. :percentage="scope.row.schedule"
  710. style="margin-bottom: 20px"
  711. color="rgba(41, 231, 205, 1)"
  712. ></el-progress>
  713. </template>
  714. </el-table-column>
  715. <el-table-column prop="accomplishTime" label="完成时间" width="180">
  716. </el-table-column>
  717. <el-table-column label="状态" width="180">
  718. <template slot-scope="scope">
  719. <div>{{ scope.row.schedule == 100 ? "完成" : "未完成" }}</div>
  720. </template>
  721. </el-table-column>
  722. <el-table-column prop="address" label="下载">
  723. <template slot-scope="scope">
  724. <a :href="scope.row.file" download>下载附件</a>
  725. </template>
  726. </el-table-column>
  727. </el-table>
  728. </el-form>
  729. <div slot="footer" class="dialog-footer">
  730. <el-button type="primary" @click="submitForm2">确 定</el-button>
  731. <el-button @click="cancel" size="btn">取 消</el-button>
  732. </div>
  733. </el-dialog>
  734. <!-- 导出弹框 -->
  735. <el-dialog
  736. :title="title"
  737. :visible.sync="open5"
  738. width="450px"
  739. append-to-body
  740. class="el-dialog__header jinduchakan"
  741. :close-on-click-modal="false"
  742. >
  743. <el-form
  744. ref="queryParamsTime"
  745. :model="queryParamsTime"
  746. :rules="queryParamsRules"
  747. label-width="100px"
  748. :inline="true"
  749. >
  750. <div>
  751. <el-form-item label="请选择类型">
  752. <el-select
  753. v-model="category"
  754. placeholder="请选择类型"
  755. @change="leixingchange"
  756. id="leixing"
  757. >
  758. <el-option value="时间">时间</el-option>
  759. <el-option value="年">年</el-option>
  760. <el-option value="月">月</el-option>
  761. </el-select>
  762. </el-form-item>
  763. </div>
  764. <el-form-item label="开始时间" prop="startTime" v-if="shijian">
  765. <el-date-picker
  766. placeholder="请选择开始时间"
  767. clearable
  768. size="small"
  769. v-model="queryParamsTime.startTime"
  770. type="date"
  771. value-format="yyyy-MM-dd"
  772. style="width: 200px"
  773. ></el-date-picker>
  774. </el-form-item>
  775. <el-form-item
  776. label="结束时间"
  777. label-width="100px"
  778. prop="endTime"
  779. v-if="shijian"
  780. >
  781. <el-date-picker
  782. placeholder="请选择结束时间"
  783. clearable
  784. size="small"
  785. v-model="queryParamsTime.endTime"
  786. type="date"
  787. value-format="yyyy-MM-dd"
  788. ></el-date-picker>
  789. </el-form-item>
  790. <el-form-item label="年份" prop="createtime" v-if="nian">
  791. <el-date-picker
  792. placeholder="请选择年份"
  793. clearable
  794. size="small"
  795. v-model="queryParamsTime.createtime"
  796. type="year"
  797. value-format="yyyy"
  798. style="width: 200px"
  799. ></el-date-picker>
  800. </el-form-item>
  801. <el-form-item label="月份" label-width="100px" prop="yue" v-if="yue">
  802. <el-date-picker
  803. placeholder="请选择月份"
  804. clearable
  805. size="small"
  806. v-model="queryParamsTime.yue"
  807. type="month"
  808. value-format="yyyy-MM"
  809. ></el-date-picker>
  810. </el-form-item>
  811. </el-form>
  812. <div slot="footer" class="dialog-footer">
  813. <el-button type="primary" @click="submitForm4">导 出</el-button>
  814. <el-button @click="cancel">取 消</el-button>
  815. </div>
  816. </el-dialog>
  817. </div>
  818. </template>
  819. <script>
  820. import {
  821. listPlanTask,
  822. getPlanTask,
  823. delPlanTask,
  824. addPlanTask,
  825. updatePlanTask,
  826. exportPlanTask,
  827. singProgress,
  828. moreProgress,
  829. uploadProgress,
  830. } from "@/api/workingArrangements/planTask";
  831. import { getDicts } from "@/api/system/dict/data";
  832. import {
  833. deptUser,
  834. allUser,
  835. getDept,
  836. getDeptList,
  837. getUnitUsers,
  838. } from "@/api/workingArrangements/workTask";
  839. import Treeselect from "@riophae/vue-treeselect";
  840. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  841. import { getDept2 } from "@/api/grassrootsregistration/bdglmeeting";
  842. import Cookies from "js-cookie";
  843. import { listDept } from "@/api/system/dept";
  844. export default {
  845. name: "PlanTask",
  846. dicts: ["plan_type"],
  847. components: { Treeselect },
  848. data() {
  849. return {
  850. // 遮罩层
  851. loading: true,
  852. // 导出遮罩层
  853. exportLoading: false,
  854. // 选中数组
  855. ids: [],
  856. // 非单个禁用
  857. single: true,
  858. // 非多个禁用
  859. multiple: true,
  860. // 显示搜索条件
  861. showSearch: true,
  862. // 总条数
  863. total: 0,
  864. // 工作计划表格数据
  865. planTaskList: [],
  866. // 弹出层标题
  867. title: "",
  868. // 是否显示弹出层
  869. open: false,
  870. // 显示进度录入框
  871. open1: false,
  872. // 显示进度查看框
  873. open2: false,
  874. // 显示多人进度查看框
  875. open3: false,
  876. // 查询参数
  877. queryParams: {
  878. pageNum: 1,
  879. pageSize: 10,
  880. name: null,
  881. peopleId: null,
  882. number: null,
  883. startTime: null,
  884. endTime: null,
  885. file: null,
  886. fileName: null,
  887. contents: null,
  888. adminId: null,
  889. unitId: null,
  890. unitName: null,
  891. createtime: null,
  892. updatetime: null,
  893. type: null,
  894. peopleName: null,
  895. unitName2: null,
  896. taskProgress: null,
  897. releaseUnit: null,
  898. executableUnit: null,
  899. },
  900. // 表单参数
  901. form: {},
  902. // 表单校验
  903. rules: {
  904. number: [{ required: true, message: "编号不能为空", trigger: "blur" }],
  905. peopleName: [
  906. { required: true, message: "执行人不能为空", trigger: "blur" },
  907. ],
  908. name: [{ required: true, message: "不能为空", trigger: "blur" }],
  909. adminId: {
  910. required: true,
  911. message: "发布单位不能为空",
  912. trigger: "blur",
  913. },
  914. unitId: {
  915. required: true,
  916. message: "执行单位不能为空",
  917. trigger: "blur",
  918. },
  919. type: { required: true, message: "计划类型不能为空", trigger: "blur" },
  920. startTime: {
  921. required: true,
  922. message: "开始时间不能为空",
  923. trigger: "blur",
  924. },
  925. endTime: {
  926. required: true,
  927. message: "结束时间不能为空",
  928. trigger: "blur",
  929. },
  930. },
  931. rules1: {
  932. // planProgress: [
  933. // { required: true, message: "请输入完成进度", trigger: "blur" }
  934. // ],
  935. },
  936. // 获取部门列表
  937. part: [],
  938. // 获取执行单位
  939. ExecutableUnit: [],
  940. // 执行人
  941. executor: [],
  942. // 发布单位id
  943. issueUnit: [],
  944. // 执行人姓名
  945. executorName: [],
  946. // 执行单位id
  947. executableUnitId: [],
  948. rylist: [],
  949. // 部门列表
  950. getdeptList: [],
  951. // 进度录入参数
  952. Progress: {
  953. schedule: "",
  954. file: "",
  955. remark: "",
  956. accomplishTime: "",
  957. },
  958. // 进度查看参数
  959. ProgressLook: {},
  960. // 查询字典
  961. dictType: {
  962. dictType: "plan_type",
  963. },
  964. // 执行单位列表
  965. users: [],
  966. // 字典
  967. ziDian: [],
  968. // 进度查看
  969. tableData: [],
  970. // 单人进度查看列表
  971. singleTable: [],
  972. // 多人进度查看列表
  973. moreTable: [],
  974. // 进度录入id
  975. jinduId: "",
  976. // 进度表格
  977. jinduTable: [],
  978. partsp: null,
  979. comstatus: 0,
  980. // 导出弹出层的显示与隐藏
  981. open5: false,
  982. shijian: true,
  983. nian: false,
  984. yue: false,
  985. category: "时间",
  986. queryParamsRules: {
  987. startTime: [
  988. { required: true, message: "开始时间不能为空", trigger: "blur" },
  989. ],
  990. endTime: [
  991. { required: true, message: "结束时间不能为空", trigger: "blur" },
  992. ],
  993. createtime: {
  994. required: true,
  995. message: "年份不能为空",
  996. trigger: "blur",
  997. },
  998. yue: {
  999. required: true,
  1000. message: "月份不能为空",
  1001. trigger: "blur",
  1002. },
  1003. },
  1004. queryParamsTime: {
  1005. startTime: null,
  1006. endTime: null,
  1007. createtime: null,
  1008. yue: null,
  1009. },
  1010. //获取单位所有不是树形结构
  1011. danWeisList: [],
  1012. };
  1013. },
  1014. created() {
  1015. this.getList();
  1016. this.getdept();
  1017. allUser().then((res) => {
  1018. this.rylist = res.rows;
  1019. });
  1020. getDept2().then((res) => {
  1021. this.users = res.data;
  1022. });
  1023. getDeptList().then((res) => {
  1024. this.getdeptList = res.data;
  1025. });
  1026. this.getdict();
  1027. // this.chooseplan();
  1028. // this.selectPeo3();
  1029. getDept2().then((res) => {
  1030. this.users = res.data;
  1031. });
  1032. },
  1033. methods: {
  1034. //删除所有单位的某一个触发
  1035. selent() {
  1036. this.renyuanEs();
  1037. this.form.peopleName = [];
  1038. },
  1039. //点击多选单位
  1040. danFn() {
  1041. this.renyuanEs();
  1042. },
  1043. //获取多选单位下的人员
  1044. renyuanEs() {
  1045. if (this.form.unitId.length > 0) {
  1046. var ids = this.form.unitId.join(",");
  1047. getUnitUsers(ids).then((res) => {
  1048. this.executor = res.data;
  1049. });
  1050. } else {
  1051. this.executor = [];
  1052. }
  1053. },
  1054. //获取所有单位
  1055. danWeis() {
  1056. listDept().then((res) => {
  1057. this.danWeisList = res.data;
  1058. });
  1059. },
  1060. // 导出重置
  1061. resets() {
  1062. this.queryParamsTime = {
  1063. startTime: null,
  1064. endTime: null,
  1065. createtime: null,
  1066. yue: null,
  1067. };
  1068. this.resetForm("queryParamsTime");
  1069. },
  1070. // 点击类型触发
  1071. leixingchange(value) {
  1072. if (value == "时间") {
  1073. this.resets();
  1074. this.shijian = true;
  1075. this.nian = false;
  1076. this.yue = false;
  1077. } else if (value == "年") {
  1078. this.resets();
  1079. this.shijian = false;
  1080. this.nian = true;
  1081. this.yue = false;
  1082. } else {
  1083. this.resets();
  1084. this.shijian = false;
  1085. this.nian = false;
  1086. this.yue = true;
  1087. }
  1088. },
  1089. comPlan() {
  1090. if (this.Progress.comPlan > 100) {
  1091. this.Progress.comPlan = 0;
  1092. alert("完成进度不能大于100");
  1093. return;
  1094. } else {
  1095. this.Progress.statu = this.Progress.comPlan;
  1096. }
  1097. },
  1098. // 获取执行人
  1099. getZhuChi(id) {
  1100. deptUser(id).then((res) => {
  1101. // this.renYuan = res.data;
  1102. this.executor = res.data;
  1103. });
  1104. },
  1105. // 到访单位选中触发
  1106. selectPeo2(val) {
  1107. // 获取执行单位列表
  1108. getDept2().then((res) => {
  1109. this.users = res.data;
  1110. });
  1111. this.queryParams.unitId = val.id;
  1112. this.queryParams.name = "";
  1113. this.queryParams.unitName = val.label;
  1114. this.getZhuChi(this.queryParams.unitId);
  1115. },
  1116. // 发布单位选中触发
  1117. selectPeo(val) {
  1118. this.form.adminId = val.id;
  1119. // this.getZhuChi(this.form.adminId);
  1120. },
  1121. // 发布单位选中触发
  1122. selectPeo3(val) {
  1123. this.queryParams.unitId = val.id;
  1124. this.getZhuChi(this.queryParams.unitId);
  1125. this.getList();
  1126. },
  1127. // 执行单位选中触发
  1128. selectPeo1(val) {
  1129. this.form.unitId = val.id;
  1130. this.form.peopleName = "";
  1131. this.getZhuChi(this.form.unitId);
  1132. },
  1133. // 查询计划类型
  1134. getdict() {
  1135. getDicts(this.dictType.dictType).then((res) => {
  1136. this.ziDian = res.data;
  1137. });
  1138. },
  1139. /** 查询工作计划列表 */
  1140. getList() {
  1141. this.loading = true;
  1142. listPlanTask(this.queryParams).then((response) => {
  1143. this.planTaskList = response.rows;
  1144. this.total = response.total;
  1145. this.loading = false;
  1146. });
  1147. },
  1148. // 取消按钮
  1149. cancel() {
  1150. this.open = false;
  1151. this.comstatus = 0;
  1152. this.reset();
  1153. this.open1 = false;
  1154. this.open2 = false;
  1155. this.open3 = false;
  1156. this.open5 = false;
  1157. },
  1158. // 表单重置
  1159. reset() {
  1160. this.form = {
  1161. id: null,
  1162. name: null,
  1163. peopleId: null,
  1164. number: null,
  1165. startTime: null,
  1166. endTime: null,
  1167. file: null,
  1168. fileName: null,
  1169. remark: null,
  1170. contents: null,
  1171. adminId: null,
  1172. unitId: null,
  1173. unitName: null,
  1174. createtime: null,
  1175. updatetime: null,
  1176. type: null,
  1177. peopleName: null,
  1178. unitName2: null,
  1179. taskProgress: null,
  1180. releaseUnit: null,
  1181. executableUnit: null,
  1182. comstatus: null,
  1183. };
  1184. this.Progress = {
  1185. schedule: "",
  1186. file: "",
  1187. remark: "",
  1188. accomplishTime: "",
  1189. };
  1190. this.resetForm("form");
  1191. },
  1192. /** 搜索按钮操作 */
  1193. handleQuery() {
  1194. this.queryParams.pageNum = 1;
  1195. this.getList();
  1196. },
  1197. /** 重置按钮操作 */
  1198. resetQuery() {
  1199. this.queryParams = {};
  1200. this.resetForm("queryForm");
  1201. this.handleQuery();
  1202. this.getList();
  1203. },
  1204. // 多选框选中数据
  1205. handleSelectionChange(selection) {
  1206. this.ids = selection.map((item) => item.id);
  1207. this.single = selection.length !== 1;
  1208. this.multiple = !selection.length;
  1209. },
  1210. /** 新增按钮操作 */
  1211. handleAdd() {
  1212. this.reset();
  1213. this.open = true;
  1214. this.title = "添加工作计划";
  1215. this.danWeis();
  1216. this.form.adminId = Cookies.get("deptId");
  1217. this.form.username = Cookies.get("nickName");
  1218. this.form.userId = Cookies.get("userId");
  1219. var today = new Date();
  1220. var y = today.getFullYear();
  1221. var M = today.getMonth() + 1;
  1222. var d = today.getDate();
  1223. var h = today.getHours();
  1224. var m = today.getMinutes();
  1225. var s = today.getSeconds();
  1226. var w = today.getDay();
  1227. if (M < 10) {
  1228. M = "0" + M;
  1229. }
  1230. if (d < 10) {
  1231. d = "0" + d;
  1232. }
  1233. if (h < 10) {
  1234. h = "0" + h;
  1235. }
  1236. if (m < 10) {
  1237. m = "0" + m;
  1238. }
  1239. if (s < 10) {
  1240. s = "0" + s;
  1241. }
  1242. this.form.startTime = y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
  1243. // 获取执行单位列表
  1244. getDept2().then((res) => {
  1245. this.users = res.data;
  1246. });
  1247. this.getdict();
  1248. },
  1249. /** 进度录入按钮操作 */
  1250. ViewProgress(row) {
  1251. // this.reset();
  1252. this.open1 = true;
  1253. this.title = "进度录入";
  1254. this.jinduId = row.id;
  1255. singProgress(this.jinduId).then((res) => {
  1256. this.Progress.id = res.data.planProgress.id;
  1257. this.Progress.taskId = res.data.id;
  1258. this.Progress.planProgress = res.data.planProgress.schedule;
  1259. this.Progress.peopleId = res.data.workProgress.peopleId;
  1260. // this.Progress.fileName = res.data.fileName;
  1261. });
  1262. },
  1263. // 进度查看单人进度
  1264. handleChakan(row) {
  1265. this.reset();
  1266. this.open2 = true;
  1267. this.title = "进度查看";
  1268. // 获取当前行的id
  1269. singProgress(row.id).then((res) => {
  1270. this.singleTable = res.data;
  1271. this.singleTable.planProgresses =
  1272. this.singleTable.planProgress.schedule;
  1273. this.singleTable.peopleName = res.data.peopleName
  1274. .split(",")
  1275. .map(Number);
  1276. this.singleTable.file =
  1277. process.env.VUE_APP_BASE_API + this.singleTable.file;
  1278. // this.getZhuChi(res.data.unitId);
  1279. });
  1280. },
  1281. // 多人进度查看
  1282. handleChakan1(row) {
  1283. this.reset();
  1284. this.open3 = true;
  1285. this.title = "进度查看";
  1286. // 获取当前行的id
  1287. moreProgress(row.id).then((res) => {
  1288. this.comstatus = 0;
  1289. this.moreTable = res.data;
  1290. this.moreTable.planProgresses.map((item) => {
  1291. item.file = process.env.VUE_APP_BASE_API + item.file;
  1292. });
  1293. this.moreTable.file =
  1294. process.env.VUE_APP_BASE_API + this.moreTable.file;
  1295. this.moreTable.planProgresses.forEach((item) => {
  1296. this.comstatus += parseInt(
  1297. item.schedule / this.moreTable.planProgresses.length
  1298. );
  1299. });
  1300. });
  1301. },
  1302. /** 修改按钮操作 */
  1303. handleUpdate(row) {
  1304. this.reset();
  1305. getDept2().then((res) => {
  1306. this.users = res.data;
  1307. });
  1308. const id = row.id || this.ids;
  1309. getPlanTask(id).then((response) => {
  1310. this.form = response.data;
  1311. this.form.type = parseInt(this.form.type);
  1312. this.form.unitId = this.form.unitId.split(",").map(Number);
  1313. this.danWeis();
  1314. this.renyuanEs();
  1315. // this.form.type=this.form.type+""
  1316. this.form.peopleName = this.form.peopleName.split(",").map(Number);
  1317. this.open = true;
  1318. this.title = "修改工作计划";
  1319. });
  1320. },
  1321. unit2Format(row, column) {
  1322. var deptName = "";
  1323. if (
  1324. parseInt(this.planTaskList[0].common) == 1 ||
  1325. this.planTaskList[0].common == 2
  1326. ) {
  1327. this.rylist.map((item) => {
  1328. row.peopleName.split(",").forEach((items, index) => {
  1329. if (item.userId == items) {
  1330. deptName += item.nickName + " ";
  1331. }
  1332. });
  1333. });
  1334. } else if (parseInt(this.planTaskList[0].common) == 0) {
  1335. this.rylist.map((item) => {
  1336. row.peopleName.split(",").forEach((items, index) => {
  1337. if (item.userId == items) {
  1338. deptName += item.nickName + " ";
  1339. }
  1340. });
  1341. });
  1342. }
  1343. return deptName;
  1344. },
  1345. unit3Format(row, column) {
  1346. var deptName = "";
  1347. if (
  1348. parseInt(this.planTaskList[0].common) == 1 ||
  1349. this.planTaskList[0].common == 2
  1350. ) {
  1351. this.getdeptList.map((item) => {
  1352. if (item.deptId == row.adminId) {
  1353. deptName = item.deptName;
  1354. }
  1355. });
  1356. } else if (parseInt(this.planTaskList[0].common) == 0) {
  1357. this.getdeptList.map((item) => {
  1358. if (item.deptId == row.adminId) {
  1359. deptName = item.deptName;
  1360. }
  1361. });
  1362. // this.part[0].children.map((item) => {
  1363. // if (item.id == row.adminId) {
  1364. // deptName = item.label;
  1365. // }
  1366. // });
  1367. }
  1368. return deptName;
  1369. },
  1370. unit4Format(row, column) {
  1371. var deptName = "";
  1372. this.ziDian.map((item) => {
  1373. if (item.dictValue == row.type) {
  1374. deptName = item.dictLabel;
  1375. }
  1376. });
  1377. return deptName;
  1378. },
  1379. zidainType(item) {
  1380. this.queryParams.type = item.dictValue;
  1381. this.getList();
  1382. },
  1383. /** 提交按钮 */
  1384. submitForm() {
  1385. if (this.form.file) {
  1386. this.form.fileName = this.form.file[0].name;
  1387. this.form.file = this.form.file[0].url;
  1388. }
  1389. this.$refs["form"].validate((valid) => {
  1390. if (valid) {
  1391. if (this.form.adminId === this.form.unitId) {
  1392. alert("发布单位和执行单位不能相同");
  1393. } else {
  1394. this.form.peopleName = this.form.peopleName.join(",");
  1395. this.form.peopleId = this.form.peopleName;
  1396. if (this.form.id != null) {
  1397. if (this.form.unitId.length > 0) {
  1398. this.form.unitId = this.form.unitId.join(",");
  1399. }
  1400. updatePlanTask(this.form).then((response) => {
  1401. this.$modal.msgSuccess("修改成功");
  1402. this.open = false;
  1403. this.getList();
  1404. });
  1405. } else {
  1406. if (this.form.unitId.length > 0) {
  1407. this.form.unitId = this.form.unitId.join(",");
  1408. }
  1409. addPlanTask(this.form).then((response) => {
  1410. this.$modal.msgSuccess("新增成功");
  1411. this.open = false;
  1412. this.getList();
  1413. });
  1414. }
  1415. }
  1416. }
  1417. });
  1418. },
  1419. submitForm1() {
  1420. if (this.Progress.file) {
  1421. this.Progress.fileName = this.Progress.file[0].name;
  1422. this.Progress.file = this.Progress.file[0].url;
  1423. }
  1424. // this.Progress.fileName=this.Progress.file[0].name
  1425. // this.Progress.file=this.Progress.file[0].url
  1426. this.$refs["Progress"].validate((valid) => {
  1427. if (valid) {
  1428. this.Progress.schedule = this.Progress.planProgress;
  1429. uploadProgress(this.Progress).then((res1) => {
  1430. this.$modal.msgSuccess("上传成功");
  1431. // this.Progress
  1432. this.reset();
  1433. this.open1 = false;
  1434. this.getList();
  1435. });
  1436. }
  1437. });
  1438. },
  1439. submitForm2() {
  1440. this.comstatus = 0;
  1441. this.open2 = false;
  1442. this.open3 = false;
  1443. },
  1444. /** 删除按钮操作 */
  1445. handleDelete(row) {
  1446. const ids = row.id || this.ids;
  1447. this.$modal
  1448. .confirm("是否确认删除?")
  1449. .then(function () {
  1450. return delPlanTask(ids);
  1451. })
  1452. .then(() => {
  1453. this.getList();
  1454. this.$modal.msgSuccess("删除成功");
  1455. })
  1456. .catch(() => {});
  1457. },
  1458. /** 导出按钮操作 */
  1459. handleExport() {
  1460. this.open5 = true;
  1461. this.title = "导出工作数据";
  1462. this.resets();
  1463. },
  1464. //导出
  1465. submitForm4() {
  1466. this.$refs["queryParamsTime"].validate((valid) => {
  1467. if (valid) {
  1468. if (this.category == "月") {
  1469. this.queryParamsTime.createtime = this.queryParamsTime.yue;
  1470. }
  1471. this.$modal
  1472. .confirm("是否确认导出数据项?")
  1473. .then(() => {
  1474. this.exportLoading = true;
  1475. return exportPlanTask(this.queryParamsTime);
  1476. })
  1477. .then((response) => {
  1478. this.$download.name(response.msg);
  1479. this.exportLoading = false;
  1480. this.open5 = false;
  1481. })
  1482. .catch(() => {});
  1483. }
  1484. });
  1485. },
  1486. // 发布单位接口
  1487. getdept() {
  1488. getDept().then((res) => {
  1489. this.part = res.data;
  1490. });
  1491. },
  1492. // 发送执行人列表
  1493. returnExecutor(id, name) {},
  1494. // 计划编号
  1495. planName() {
  1496. let date = new Date();
  1497. let year = date.getFullYear();
  1498. let month =
  1499. date.getMonth() + 1 <= 9
  1500. ? "0" + (date.getMonth() + 1)
  1501. : date.getMonth() + 1;
  1502. let day = date.getDate();
  1503. let hour = date.getHours() <= 9 ? "0" + date.getHours() : date.getHours();
  1504. let minute =
  1505. date.getMinutes <= 9 ? "0" + date.getMinutes() : date.getMinutes();
  1506. this.form.number = year + month + day + hour + minute;
  1507. },
  1508. // 获取发布单位id
  1509. issueunit(id) {
  1510. this.form.adminId = id;
  1511. },
  1512. // 选择计划
  1513. chooseplan(item) {
  1514. this.form.type = item.dictValue;
  1515. },
  1516. },
  1517. };
  1518. </script>
  1519. <style>
  1520. .el-input__inner {
  1521. height: 36px;
  1522. line-height: 36px;
  1523. background-color: #00365f;
  1524. color: #fff;
  1525. border: 1px solid white !important;
  1526. }
  1527. .el-select-dropdown {
  1528. background-color: white;
  1529. }
  1530. .el-dialog__wrapper .el-form-item__label {
  1531. color: white !important;
  1532. }
  1533. .el-dialog {
  1534. background-color: #004d86 !important;
  1535. }
  1536. .el-form-item__label {
  1537. width: 30%;
  1538. }
  1539. .el-textarea {
  1540. width: 70%;
  1541. }
  1542. .el-dialog__title {
  1543. color: white;
  1544. }
  1545. .el-dialog__header {
  1546. border-bottom: 1px solid #718a9d;
  1547. }
  1548. .el-textarea__inner {
  1549. width: 945px;
  1550. height: 104px;
  1551. }
  1552. /* 表宽度 */
  1553. .el-input {
  1554. width: 200px;
  1555. }
  1556. .serialNumber {
  1557. border: 1px solid white;
  1558. border-radius: 5px;
  1559. width: 200px;
  1560. text-indent: 1em;
  1561. color: white;
  1562. line-height: 36px;
  1563. }
  1564. .el-date-editor.el-input,
  1565. .el-date-editor {
  1566. width: 200px;
  1567. }
  1568. /* 执行 */
  1569. #execute {
  1570. width: 510px;
  1571. /* width: auto; */
  1572. }
  1573. .el-input--suffix {
  1574. width: auto;
  1575. }
  1576. /* 计划附件 */
  1577. .el-upload__tip {
  1578. position: absolute;
  1579. top: -5px;
  1580. width: 500px;
  1581. left: 100px;
  1582. color: white;
  1583. }
  1584. /* 上传附件样式 */
  1585. .el-icon-document {
  1586. padding: 3px 5px;
  1587. color: white;
  1588. }
  1589. .el-upload-list__item:hover {
  1590. background-color: #00365f;
  1591. }
  1592. /* 上传附件的删除按钮样式 */
  1593. .el-link--inner {
  1594. margin-left: 3px;
  1595. }
  1596. .el-select-dropdown__item:hover {
  1597. color: #1890ff !important;
  1598. }
  1599. /* 下拉框的颜色 */
  1600. .el-scrollbar li {
  1601. background-color: white;
  1602. color: black;
  1603. }
  1604. .el-scrollbar li:hover {
  1605. background-color: #00365f;
  1606. color: white;
  1607. }
  1608. .el-select-dropdown__wrap .el-scrollbar__view {
  1609. background-color: white;
  1610. }
  1611. /* 修改计划类型样式 */
  1612. .el-input--small .el-input__inner {
  1613. height: 36px;
  1614. line-height: 36px;
  1615. }
  1616. .el-input--medium .el-input__inner {
  1617. background-color: rgba(0, 0, 0, 0);
  1618. }
  1619. /* 修改编号样式 */
  1620. .ipt .el-input__inner {
  1621. background-color: #004d86 !important;
  1622. }
  1623. /* 进度查看 */
  1624. .el-button--btlook.is-active,
  1625. .el-button--btlook:active {
  1626. background: #32a5d3;
  1627. border-color: #32a5d3;
  1628. color: #ffffff;
  1629. }
  1630. .el-button--btlook:focus,
  1631. .el-button--btlook:hover {
  1632. background: #32a5d3;
  1633. border-color: #32a5d3;
  1634. color: #ffffff;
  1635. }
  1636. .el-button--btlook {
  1637. width: 70px !important;
  1638. border: 1px solid transparent;
  1639. padding: 3px 8px;
  1640. font-size: 14px;
  1641. line-height: 1.5;
  1642. border-radius: 3px;
  1643. color: #fff;
  1644. background-color: #32a5d3;
  1645. }
  1646. .big .el-input__inner {
  1647. width: 940px;
  1648. }
  1649. /* 树形 */
  1650. .threeselects {
  1651. width: 200px;
  1652. }
  1653. .threeselects .vue-treeselect__input {
  1654. background-color: #004d86;
  1655. /* color: white; */
  1656. }
  1657. .el-form-item__content {
  1658. /* color: white; */
  1659. border-bottom: 1px solid #004d86;
  1660. }
  1661. .vue-treeselect__control {
  1662. background-color: #004d86;
  1663. border-bottom: 1px solid white;
  1664. /* color: whi; */
  1665. /* color: white; */
  1666. }
  1667. .vue-treeselect__placeholder {
  1668. color: white;
  1669. }
  1670. .change_plan_type .el-input__inner {
  1671. width: 200px;
  1672. }
  1673. /* 表格样式 */
  1674. .el-table__empty-block {
  1675. background-color: #004d86;
  1676. }
  1677. .el-table {
  1678. background-color: #004d86;
  1679. }
  1680. .comtimer .el-input__inner {
  1681. width: 940px;
  1682. }
  1683. /* 备注 */
  1684. .thistext {
  1685. color: white;
  1686. width: 930px;
  1687. border: 1px solid #fff;
  1688. border-radius: 4px;
  1689. height: auto;
  1690. min-height: 35px;
  1691. text-indent: 1em;
  1692. line-height: 35px;
  1693. margin-bottom: 20px;
  1694. /* margin: auto; */
  1695. }
  1696. /* 完成进度 */
  1697. .complue .el-input__inner {
  1698. width: 940px;
  1699. }
  1700. .complue {
  1701. width: 940px;
  1702. }
  1703. /* 进度 */
  1704. .jinduProgress {
  1705. width: 740px;
  1706. position: absolute;
  1707. left: 210px;
  1708. top: 5px;
  1709. }
  1710. /* 表格 */
  1711. .tabless .el-table__row {
  1712. background-color: #004d86;
  1713. }
  1714. .has-gutter {
  1715. background-color: #004d86;
  1716. }
  1717. .el-dialog__body .el-table tr:nth-child(odd) {
  1718. background-color: #004d86 !important;
  1719. }
  1720. .el-dialog__body .el-table tr:nth-child(even) {
  1721. background-color: #004d86 !important;
  1722. }
  1723. .el-dialog__body table td {
  1724. border-bottom: 1px solid white !important;
  1725. }
  1726. .el-dialog__body .el-table th.is-leaf {
  1727. border: 1px solid white ;
  1728. }
  1729. /* 下载按钮 */
  1730. .downloadfile {
  1731. border: 1px solid white;
  1732. display: inline-block;
  1733. width: 100px;
  1734. height: 33px;
  1735. border-radius: 5px;
  1736. line-height: 33px;
  1737. text-align: center;
  1738. }
  1739. .el-table__row {
  1740. border-bottom: 1px solid white;
  1741. }
  1742. .el-input-number__increase {
  1743. background-color: #004d86;
  1744. }
  1745. .el-input-number__decrease {
  1746. background-color: #004d86;
  1747. }
  1748. /* 进度条百分比 */
  1749. .el-progress-bar__innerText {
  1750. color: #004d86;
  1751. /* font-weight: 200; */
  1752. }
  1753. .el-progress-bar__outer {
  1754. background-color: rgba(25, 98, 153, 1);
  1755. }
  1756. /* 上下箭头 */
  1757. .el-icon-arrow-up,
  1758. .el-icon-arrow-down {
  1759. color: white;
  1760. }
  1761. .vue-treeselect__single-value {
  1762. color: white;
  1763. }
  1764. /* table表格 */
  1765. ::v-deep .el-table th.el-table__cell {
  1766. background-color: pink !important;
  1767. }
  1768. .el-table__empty-block {
  1769. border-bottom: 1px solid white;
  1770. }
  1771. .vue-treeselect__control {
  1772. background-color: transparent !important;
  1773. }
  1774. .threeselects .vue-treeselect__input {
  1775. background-color: transparent !important;
  1776. }
  1777. .el-table__body-wrapper .el-table__empty-block {
  1778. border: none !important;
  1779. }
  1780. .plantypes .el-form-item__label {
  1781. text-align: center;
  1782. }
  1783. .vue-treeselect__placeholder {
  1784. color: #ccc;
  1785. }
  1786. .el-form-item__content {
  1787. border-bottom: none !important;
  1788. }
  1789. .jinduchakan .el-table__body-wrapper .el-table__empty-block {
  1790. border-bottom: 2px solid white !important;
  1791. border-left: 2px solid white !important;
  1792. border-right: 2px solid white !important;
  1793. }
  1794. /* 去除默认字体 */
  1795. /* .el-select .el-input__inner */
  1796. .el-select-dropdown__item.selected {
  1797. color: #000;
  1798. font-weight: bold;
  1799. }
  1800. .vue-treeselect__menu {
  1801. color: #606266;
  1802. }
  1803. .el-scrollbar li:hover {
  1804. color: black;
  1805. }
  1806. </style>