index.vue 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806
  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="singleTable.fileName"
  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="moreTable.fileName"
  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. console.log(this.moreTable.file);
  1114. this.moreTable.workProgresses.forEach((item) => {
  1115. this.comstatus +=
  1116. item.schedule / this.moreTable.workProgresses.length;
  1117. });
  1118. });
  1119. },
  1120. /** 查询工作任务列表 */
  1121. getList() {
  1122. this.loading = true;
  1123. listWorkTask(this.queryParams).then((response) => {
  1124. this.workTaskList = response.rows;
  1125. console.log(this.workTaskList);
  1126. this.total = response.total;
  1127. this.loading = false;
  1128. });
  1129. },
  1130. // 取消按钮
  1131. cancel() {
  1132. this.open = false;
  1133. this.comstatus = 0;
  1134. this.reset();
  1135. this.open1 = false;
  1136. this.open2 = false;
  1137. this.open3 = false;
  1138. this.open4 = false;
  1139. },
  1140. // 表单重置
  1141. reset() {
  1142. this.form = {
  1143. id: null,
  1144. name: null,
  1145. peopleId: null,
  1146. number: null,
  1147. type: null,
  1148. startTime: null,
  1149. endTime: null,
  1150. file: null,
  1151. fileName: null,
  1152. remark: null,
  1153. contents: null,
  1154. adminId: null,
  1155. unitId: null,
  1156. unitName: null,
  1157. createtime: null,
  1158. updatetime: null,
  1159. peopleName: null,
  1160. unitName2: null,
  1161. taskProgress: null,
  1162. releaseUnit: null,
  1163. executableUnit: null,
  1164. };
  1165. this.resetForm("form");
  1166. },
  1167. zidainType(item) {
  1168. // this.queryParams.type = item.dictValue;
  1169. this.getList();
  1170. // console.log(item)
  1171. },
  1172. // 发布单位选中触发
  1173. selectPeo3(val) {
  1174. getDept2().then((res) => {
  1175. this.users = res.data;
  1176. });
  1177. this.queryParams.adminId = val.id;
  1178. this.getZhuChi(this.queryParams.adminId);
  1179. this.getList();
  1180. },
  1181. /** 搜索按钮操作 */
  1182. handleQuery() {
  1183. this.queryParams.pageNum = 1;
  1184. this.getList();
  1185. },
  1186. /** 重置按钮操作 */
  1187. resetQuery() {
  1188. this.queryParams = {};
  1189. this.resetForm("queryForm");
  1190. this.handleQuery();
  1191. this.getList();
  1192. },
  1193. // 多选框选中数据
  1194. handleSelectionChange(selection) {
  1195. this.ids = selection.map((item) => item.id);
  1196. this.single = selection.length !== 1;
  1197. this.multiple = !selection.length;
  1198. },
  1199. // 获取执行人
  1200. getZhuChi(id) {
  1201. deptUser(id).then((res) => {
  1202. // this.renYuan = res.data;
  1203. this.executor = res.data;
  1204. console.log(this.executor);
  1205. });
  1206. },
  1207. // 发布单位选中触发
  1208. selectPeo(val) {
  1209. this.form.adminId = val.id;
  1210. // this.getZhuChi(this.form.adminId);
  1211. },
  1212. // 执行单位选中触发
  1213. selectPeo1(val) {
  1214. this.form.unitId = val.id;
  1215. this.form.peopleName = "";
  1216. this.getZhuChi(this.form.unitId);
  1217. },
  1218. // 查询计划类型
  1219. getdict() {
  1220. getDicts(this.dictType.dictType).then((res) => {
  1221. this.ziDian = res.data;
  1222. });
  1223. },
  1224. /** 新增按钮操作 */
  1225. handleAdd() {
  1226. this.reset();
  1227. this.open = true;
  1228. this.title = "添加工作任务";
  1229. this.form.adminId = Cookies.get("deptId");
  1230. this.form.username = Cookies.get("nickName");
  1231. this.form.userId = Cookies.get("userId");
  1232. var today = new Date();
  1233. var y = today.getFullYear();
  1234. var M = today.getMonth() + 1;
  1235. var d = today.getDate();
  1236. var h = today.getHours();
  1237. var m = today.getMinutes();
  1238. var s = today.getSeconds();
  1239. var w = today.getDay();
  1240. if (M < 10) {
  1241. M = "0" + M;
  1242. }
  1243. if (d < 10) {
  1244. d = "0" + d;
  1245. }
  1246. if (h < 10) {
  1247. h = "0" + h;
  1248. }
  1249. if (m < 10) {
  1250. m = "0" + m;
  1251. }
  1252. if (s < 10) {
  1253. s = "0" + s;
  1254. }
  1255. this.form.startTime = y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
  1256. // this.form.endTime = y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
  1257. // 获取执行单位列表
  1258. getDept2().then((res) => {
  1259. // console.log(res,2)
  1260. this.users = res.data;
  1261. console.log(this.users);
  1262. });
  1263. },
  1264. /** 修改按钮操作 */
  1265. handleUpdate(row) {
  1266. this.reset();
  1267. getDept2().then((res) => {
  1268. // console.log(res,2)
  1269. this.users = res.data;
  1270. console.log(this.users);
  1271. });
  1272. const id = row.id || this.ids;
  1273. getWorkTask(id).then((response) => {
  1274. this.form = response.data;
  1275. // this.form.type = parseInt(this.form.type);
  1276. // this.getDept2()
  1277. this.getZhuChi(this.form.unitId);
  1278. this.form.peopleName = this.form.peopleName.split(",").map(Number);
  1279. this.open = true;
  1280. this.title = "修改工作计划";
  1281. });
  1282. },
  1283. unit2Format(row, column) {
  1284. var deptName = "";
  1285. if (
  1286. parseInt(this.workTaskList[0].common) == 1 ||
  1287. this.workTaskList[0].common == 2
  1288. ) {
  1289. this.rylist.map((item) => {
  1290. row.peopleName.split(",").forEach((items, index) => {
  1291. if (item.userId == items) {
  1292. // console.log(item.nickName)
  1293. deptName += item.nickName + " ";
  1294. }
  1295. });
  1296. });
  1297. } else if (parseInt(this.workTaskList[0].common) == 0) {
  1298. this.rylist.map((item) => {
  1299. row.peopleName.split(",").forEach((items, index) => {
  1300. if (item.userId == items) {
  1301. // console.log(item.nickName)
  1302. deptName += item.nickName + " ";
  1303. }
  1304. });
  1305. });
  1306. }
  1307. return deptName;
  1308. },
  1309. unit3Format(row, column) {
  1310. var deptName = "";
  1311. if (
  1312. parseInt(this.workTaskList[0].common) == 1 ||
  1313. this.workTaskList[0].common == 2
  1314. ) {
  1315. this.getdeptList.map((item) => {
  1316. if (item.deptId == row.adminId) {
  1317. deptName = item.deptName;
  1318. }
  1319. });
  1320. } else if (parseInt(this.workTaskList[0].common) == 0) {
  1321. this.getdeptList.map((item) => {
  1322. if (item.deptId == row.adminId) {
  1323. deptName = item.deptName;
  1324. }
  1325. });
  1326. }
  1327. return deptName;
  1328. },
  1329. unit4Format(row, column) {
  1330. var deptName = "";
  1331. this.ziDian.map((item) => {
  1332. if (item.dictSort == row.type) {
  1333. deptName = item.dictLabel;
  1334. }
  1335. });
  1336. return deptName;
  1337. },
  1338. // 选择计划
  1339. chooseplan() {
  1340. this.form.type = this.queryParams.type;
  1341. },
  1342. /** 提交按钮 */
  1343. submitForm() {
  1344. if (this.form.file) {
  1345. this.form.fileName = this.form.file[0].name;
  1346. this.form.file = this.form.file[0].url;
  1347. }
  1348. this.$refs["form"].validate((valid) => {
  1349. if (valid) {
  1350. if (this.form.adminId === this.form.unitId) {
  1351. alert("发布单位和执行单位不能相同");
  1352. } else {
  1353. this.form.peopleName = this.form.peopleName.join(",");
  1354. this.form.peopleId = this.form.peopleName;
  1355. console.log(this.form);
  1356. if (this.form.id != null) {
  1357. updateWorkTask(this.form).then((response) => {
  1358. this.$modal.msgSuccess("修改成功");
  1359. this.queryParams.type = "";
  1360. this.open = false;
  1361. this.getList();
  1362. });
  1363. } else {
  1364. addWorkTask(this.form).then((response) => {
  1365. this.$modal.msgSuccess("新增成功");
  1366. this.open = false;
  1367. this.getList();
  1368. });
  1369. }
  1370. }
  1371. }
  1372. });
  1373. // this.$refs["form"].validate((valid) => {
  1374. // if (valid) {
  1375. // this.form.peopleName = this.form.peopleName.join(",");
  1376. // this.form.peopleId = this.form.peopleName;
  1377. // console.log(this.form);
  1378. // if (this.form.id != null) {
  1379. // updateWorkTask(this.form).then((response) => {
  1380. // this.$modal.msgSuccess("修改成功");
  1381. // this.open = false;
  1382. // this.getList();
  1383. // });
  1384. // } else {
  1385. // addWorkTask(this.form).then((response) => {
  1386. // this.$modal.msgSuccess("新增成功");
  1387. // this.open = false;
  1388. // this.getList();
  1389. // });
  1390. // }
  1391. // }
  1392. // });
  1393. },
  1394. submitForm1() {
  1395. // console.log(this.Progress)
  1396. this.$refs["Progress"].validate((valid) => {
  1397. if (valid) {
  1398. this.Progress.taskId = this.jinduId;
  1399. this.Progress.schedule = this.Progress.planProgress;
  1400. if (this.Progress.file) {
  1401. this.Progress.fileName = this.Progress.file[0].name;
  1402. this.Progress.file = this.Progress.file[0].url;
  1403. }
  1404. console.log(this.Progress);
  1405. uploadProgress(this.Progress).then((res1) => {
  1406. this.$modal.msgSuccess("上传成功");
  1407. // this.Progress
  1408. this.reset();
  1409. this.open1 = false;
  1410. this.getList();
  1411. });
  1412. }
  1413. });
  1414. },
  1415. submitForm2() {
  1416. this.comstatus = 0;
  1417. this.open2 = false;
  1418. this.open3 = false;
  1419. },
  1420. /** 删除按钮操作 */
  1421. handleDelete(row) {
  1422. const ids = row.id || this.ids;
  1423. this.$modal
  1424. .confirm("是否确认删除?")
  1425. .then(function () {
  1426. return delWorkTask(ids);
  1427. })
  1428. .then(() => {
  1429. this.getList();
  1430. this.$modal.msgSuccess("删除成功");
  1431. })
  1432. .catch(() => {});
  1433. },
  1434. /** 导出按钮操作 */
  1435. handleExport() {
  1436. const queryParams = this.queryParams;
  1437. this.open4 = true;
  1438. this.title = "导出工作数据";
  1439. // this.$modal
  1440. // .confirm("是否确认导出所有工作任务数据项?")
  1441. // .then(() => {
  1442. // this.exportLoading = true;
  1443. // return exportWorkTask(queryParams);
  1444. // })
  1445. // .then((response) => {
  1446. // this.$download.name(response.msg);
  1447. // this.exportLoading = false;
  1448. // })
  1449. // .catch(() => {});
  1450. },
  1451. //导出
  1452. submitForm4() {
  1453. this.$modal
  1454. .confirm("是否确认导出所有工作任务数据项?")
  1455. .then(() => {
  1456. this.exportLoading = true;
  1457. return exportWorkTask(this.daoruobj);
  1458. })
  1459. .then((response) => {
  1460. this.$download.name(response.msg);
  1461. this.exportLoading = false;
  1462. this.open4 = false;
  1463. })
  1464. .catch(() => {});
  1465. },
  1466. // 发布单位接口
  1467. getdept() {
  1468. getDept().then((res) => {
  1469. this.part = res.data;
  1470. });
  1471. },
  1472. // 获取执行单位列表
  1473. getdeptlist() {
  1474. getDeptList().then((res) => {
  1475. this.ExecutableUnit = res.data;
  1476. console.log(this.ExecutableUnit);
  1477. });
  1478. },
  1479. // 选中执行人id
  1480. // choosedeptid(id) {
  1481. // console.log(id)
  1482. // this.form.unitId = id;
  1483. // deptUser(id).then((res) => {
  1484. // this.executor = res.data;
  1485. // });
  1486. // },
  1487. // 计划编号
  1488. planName() {
  1489. let date = new Date();
  1490. let year = date.getFullYear();
  1491. let month =
  1492. date.getMonth() + 1 <= 9
  1493. ? "0" + (date.getMonth() + 1)
  1494. : date.getMonth() + 1;
  1495. let day = date.getDate();
  1496. let hour = date.getHours() <= 9 ? "0" + date.getHours() : date.getHours();
  1497. let minute =
  1498. date.getMinutes <= 9 ? "0" + date.getMinutes() : date.getMinutes();
  1499. this.form.number = year + month + day + hour + minute;
  1500. console.log(111);
  1501. console.log(this.form.number);
  1502. },
  1503. // 获取发布单位id
  1504. issueunit(id) {
  1505. this.form.adminId = id;
  1506. },
  1507. },
  1508. };
  1509. </script>
  1510. <style>
  1511. .el-input__inner {
  1512. height: 36px;
  1513. background-color: #00365f;
  1514. color: #fff;
  1515. border: 1px solid white !important;
  1516. }
  1517. .el-select-dropdown {
  1518. background-color: white;
  1519. }
  1520. .el-dialog__wrapper .el-form-item__label {
  1521. color: white !important;
  1522. }
  1523. .el-dialog {
  1524. background-color: #004d86 !important;
  1525. }
  1526. .el-form-item__label {
  1527. width: 30%;
  1528. }
  1529. .el-textarea {
  1530. width: 70%;
  1531. }
  1532. .el-dialog__title {
  1533. color: white;
  1534. }
  1535. .el-dialog__header {
  1536. border-bottom: 1px solid #718a9d;
  1537. }
  1538. .el-textarea__inner {
  1539. width: 945px;
  1540. height: 104px;
  1541. }
  1542. .el-textarea__inner {
  1543. width: 940px;
  1544. height: 104px;
  1545. }
  1546. /* 表宽度 */
  1547. .el-input {
  1548. width: 200px;
  1549. }
  1550. .el-date-editor.el-input,
  1551. .el-date-editor.el-input__inner {
  1552. width: 200px;
  1553. }
  1554. /* 执行 */
  1555. #execute {
  1556. width: 510px;
  1557. /* width: auto; */
  1558. }
  1559. .el-input--suffix {
  1560. width: auto;
  1561. }
  1562. /* 上传附件样式 */
  1563. .el-icon-document {
  1564. padding: 3px 5px;
  1565. color: white;
  1566. }
  1567. .el-upload-list__item:hover {
  1568. background-color: #00365f;
  1569. }
  1570. /* 上传附件的删除按钮样式 */
  1571. .el-link--inner {
  1572. margin-left: 3px;
  1573. }
  1574. /* 弹框背景 */
  1575. .el-dialog {
  1576. background: #00365f;
  1577. }
  1578. .el-dialog__title {
  1579. color: white;
  1580. }
  1581. .el-input .el-input__inner {
  1582. background: rgba(0, 0, 0, 0);
  1583. }
  1584. /* 下拉框样式 */
  1585. .el-select-dropdown__wrap .el-scrollbar__view {
  1586. background-color: white;
  1587. }
  1588. /* 计划附件 */
  1589. .el-upload__tip {
  1590. position: absolute;
  1591. top: -5px;
  1592. width: 500px;
  1593. left: 100px;
  1594. color: white;
  1595. }
  1596. /* 上传附件样式 */
  1597. .el-icon-document {
  1598. padding: 3px 5px;
  1599. color: white;
  1600. }
  1601. .el-upload-list__item:hover {
  1602. background-color: #00365f;
  1603. }
  1604. /* 修改编号样式 */
  1605. .ipt .el-input__inner {
  1606. background-color: #004d86 !important;
  1607. }
  1608. /* 进度查看 */
  1609. .el-button--btlook.is-active,
  1610. .el-button--btlook:active {
  1611. background: #32a5d3;
  1612. border-color: #32a5d3;
  1613. color: #ffffff;
  1614. }
  1615. .el-button--btlook:focus,
  1616. .el-button--btlook:hover {
  1617. background: #32a5d3;
  1618. border-color: #32a5d3;
  1619. color: #ffffff;
  1620. }
  1621. .el-button--btlook {
  1622. width: 70px !important;
  1623. border: 1px solid transparent;
  1624. padding: 3px 8px;
  1625. font-size: 14px;
  1626. line-height: 1.5;
  1627. border-radius: 3px;
  1628. color: #fff;
  1629. background-color: #32a5d3;
  1630. }
  1631. .big .el-input__inner {
  1632. width: 940px;
  1633. }
  1634. /* 树形 */
  1635. .threeselects {
  1636. width: 200px;
  1637. }
  1638. .threeselects .vue-treeselect__input {
  1639. background-color: #004d86;
  1640. /* color: white; */
  1641. }
  1642. .el-form-item__content {
  1643. /* color: white; */
  1644. border-bottom: 1px solid #004d86;
  1645. }
  1646. .vue-treeselect__control {
  1647. background-color: #004d86;
  1648. border-bottom: 1px solid white;
  1649. /* color: whi; */
  1650. /* color: white; */
  1651. }
  1652. .vue-treeselect__placeholder {
  1653. color: white;
  1654. }
  1655. .change_plan_type .el-input__inner {
  1656. width: 200px;
  1657. }
  1658. /* 表格样式 */
  1659. .el-table__empty-block {
  1660. background-color: #004d86;
  1661. }
  1662. .el-table {
  1663. background-color: #004d86;
  1664. }
  1665. .comtimer .el-input__inner {
  1666. width: 940px;
  1667. }
  1668. /* 备注 */
  1669. .thistext {
  1670. color: white;
  1671. width: 930px;
  1672. border: 1px solid #fff;
  1673. border-radius: 4px;
  1674. min-height: 35px;
  1675. height: auto !important;
  1676. line-height: 35px;
  1677. text-indent: 1em;
  1678. margin-bottom: 20px;
  1679. }
  1680. /* 完成进度 */
  1681. .complue .el-input__inner {
  1682. width: 940px;
  1683. }
  1684. .complue {
  1685. width: 940px;
  1686. }
  1687. /* 进度 */
  1688. .jinduProgress {
  1689. width: 740px;
  1690. position: absolute;
  1691. left: 210px;
  1692. top: 5px;
  1693. }
  1694. /* 表格 */
  1695. .tabless .el-table__row {
  1696. background-color: #004d86;
  1697. }
  1698. .has-gutter {
  1699. background-color: #004d86;
  1700. }
  1701. .el-dialog__body .el-table tr:nth-child(odd) {
  1702. background-color: #004d86 !important;
  1703. }
  1704. .el-dialog__body .el-table tr:nth-child(even) {
  1705. background-color: #004d86 !important;
  1706. }
  1707. .el-dialog__body table td {
  1708. border-bottom: 1px solid white !important;
  1709. }
  1710. .el-dialog__body .el-table th.is-leaf {
  1711. border: 1px solid white !important;
  1712. }
  1713. /* 下载按钮 */
  1714. .downloadfile {
  1715. border: 1px solid white;
  1716. display: inline-block;
  1717. width: 100px;
  1718. height: 33px;
  1719. border-radius: 5px;
  1720. line-height: 33px;
  1721. text-align: center;
  1722. }
  1723. .el-table__row {
  1724. border-bottom: 1px solid white;
  1725. }
  1726. .el-input-number__increase {
  1727. background-color: #004d86;
  1728. }
  1729. .el-input-number__decrease {
  1730. background-color: #004d86;
  1731. }
  1732. /* 进度条百分比 */
  1733. .el-progress-bar__innerText {
  1734. color: #004d86;
  1735. /* font-weight: 200; */
  1736. }
  1737. .el-progress-bar__outer {
  1738. background-color: rgba(25, 98, 153, 1);
  1739. }
  1740. /* 上下箭头 */
  1741. .el-icon-arrow-up,
  1742. .el-icon-arrow-down {
  1743. color: white;
  1744. }
  1745. .vue-treeselect__single-value {
  1746. color: white;
  1747. }
  1748. /* 文字多余部分省略 */
  1749. .el-table_1_column_8 .cell {
  1750. overflow: hidden;
  1751. text-overflow: ellipsis;
  1752. white-space: nowrap;
  1753. }
  1754. .el-table__empty-block {
  1755. border-bottom: 1px solid white;
  1756. }
  1757. .vue-treeselect__control {
  1758. background-color: transparent !important;
  1759. }
  1760. .threeselects .vue-treeselect__input {
  1761. background-color: transparent !important;
  1762. }
  1763. .el-table__body-wrapper .el-table__empty-block {
  1764. border: none !important;
  1765. }
  1766. .vue-treeselect__placeholder {
  1767. color: #ccc;
  1768. }
  1769. .el-form-item__content {
  1770. border-bottom: none !important;
  1771. }
  1772. ::v-deep .el-input__inner {
  1773. border: 1px solid white !important;
  1774. }
  1775. .el-select-dropdown__item.selected {
  1776. color: #000;
  1777. font-weight: bold;
  1778. }
  1779. .vue-treeselect__menu {
  1780. color: #606266;
  1781. }
  1782. /* 日历样式 */
  1783. .el-date-picker__editor-wrap .el-input .el-input__inner{
  1784. width:100px !important;
  1785. }
  1786. .el-date-picker__time-header{
  1787. border-bottom: none;
  1788. }
  1789. </style>