index.vue 51 KB

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