index.vue 48 KB

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