index.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273
  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="queryParams.chaxunType" @change="handleQuery">
  6. <el-radio-button label="0">所有</el-radio-button>
  7. <el-radio-button label="1">今日</el-radio-button>
  8. <el-radio-button label="2">明日</el-radio-button>
  9. </el-radio-group>
  10. </el-col>
  11. </el-row>
  12. <hr />
  13. <el-form
  14. :model="queryParams"
  15. ref="queryForm"
  16. :inline="true"
  17. v-show="showSearch"
  18. label-width="68px"
  19. >
  20. <el-form-item prop="unitName">
  21. <el-input
  22. v-model="queryParams.unitName"
  23. placeholder="请输入单位"
  24. @input="handleQuery"
  25. clearable
  26. >
  27. </el-input>
  28. </el-form-item>
  29. <el-form-item>
  30. <!-- <el-button
  31. type="primary"
  32. icon="el-icon-search"
  33. size="mini"
  34. @click="handleQuery"
  35. >搜索</el-button
  36. > -->
  37. <el-button size="btr" @click="resetQuery">重置</el-button>
  38. </el-form-item>
  39. </el-form>
  40. <el-row :gutter="10" class="mb8">
  41. <el-col :span="1.5">
  42. <el-button
  43. type="primary"
  44. plain
  45. icon="el-icon-plus"
  46. size="mini"
  47. @click="handleAdds"
  48. v-hasPermi="['militaryvehicleManagement:thebusApply:add']"
  49. >新增</el-button
  50. >
  51. </el-col>
  52. </el-row>
  53. <!-- 列表选项 -->
  54. <el-table
  55. v-loading="loading"
  56. :data="thebusApplyList"
  57. @selection-change="handleSelectionChange"
  58. :header-cell-style="{ background: '#003C69', color: 'white' }"
  59. >
  60. <el-table-column type="selection" width="55" align="center" />
  61. <el-table-column label="序号" align="center" prop="id">
  62. <template scope="scope">
  63. <span>{{
  64. (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
  65. }}</span>
  66. </template>
  67. </el-table-column>
  68. <el-table-column
  69. label="车辆型号"
  70. align="center"
  71. prop="vehiclecolor"
  72. :formatter="vehiclecolor"
  73. />
  74. <el-table-column label="用车人员单位" align="center" prop="unitName" />
  75. <el-table-column label="用车人员姓名" align="center" prop="peopleName" />
  76. <el-table-column label="联系方式" align="center" prop="contact" />
  77. <!-- <el-table-column label="事由" align="center" prop="cause" /> -->
  78. <el-table-column label="出车路线" align="center" prop="route" />
  79. <el-table-column label="出车状态" align="center" prop="">
  80. <template slot-scope="scope">
  81. <el-col v-if="scope.row.outstatus == 0" style="color: #ffba00"
  82. >未出车</el-col
  83. >
  84. <el-col v-if="scope.row.outstatus == 1" style="color: #13ce66"
  85. >已出车</el-col
  86. >
  87. </template>
  88. </el-table-column>
  89. <el-table-column
  90. label="出车时间"
  91. align="center"
  92. prop="authStime"
  93. width="200"
  94. >
  95. <template slot-scope="scope">
  96. <span>{{
  97. parseTime(scope.row.authStime, "{y}-{m}-{d} {h}:{m}:{s}")
  98. }}</span>
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="流程" align="center" prop="outtime">
  102. <template slot-scope="scope">
  103. <span v-if="scope.row.isTeshuYongChe == '0'" style="color: #ffba00"
  104. >正常</span
  105. >
  106. <span
  107. v-if="scope.row.isTeshuYongChe == '1'"
  108. style="color: #13ce66"
  109. :title="scope.row.bdglDepartureYuanyin"
  110. >特殊</span
  111. >
  112. </template>
  113. </el-table-column>
  114. <el-table-column label="是否归队" align="center" prop="placeState">
  115. <template slot-scope="scope">
  116. <span v-if="scope.row.placeState == '1'" style="color: #13ce66"
  117. >已归队</span
  118. >
  119. <span v-if="scope.row.placeState != '1'" style="color: red"
  120. >未归队</span
  121. >
  122. </template>
  123. </el-table-column>
  124. <el-table-column
  125. label="操作"
  126. align="center"
  127. class-name="small-padding fixed-width"
  128. width="200"
  129. >
  130. <template slot-scope="scope">
  131. <el-button
  132. v-if="scope.row.outstatus == 0"
  133. size="btu"
  134. type="text"
  135. @click="handleAdd(scope.row)"
  136. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  137. >出车</el-button
  138. >
  139. <el-button
  140. class="a1"
  141. v-else
  142. size=""
  143. type="text"
  144. @click="singles(scope.row)"
  145. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  146. >查看</el-button
  147. >
  148. <el-button
  149. v-if="scope.row.placeState == 2"
  150. class="a1"
  151. size=""
  152. type="text"
  153. @click="returnCar(scope.row)"
  154. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  155. >归队</el-button
  156. >
  157. </template>
  158. </el-table-column>
  159. </el-table>
  160. <pagination
  161. v-show="total > 0"
  162. :total="total"
  163. :page.sync="queryParams.pageNum"
  164. :limit.sync="queryParams.pageSize"
  165. @pagination="getList"
  166. />
  167. <!-- 新增出车会话框 -->
  168. <el-dialog
  169. title="添加可出车列表"
  170. :visible.sync="openes"
  171. width="500px"
  172. append-to-body
  173. :close-on-click-modal="false"
  174. >
  175. <el-form
  176. ref="form1"
  177. :model="fomr1"
  178. :rules="rules1"
  179. label-width="80px"
  180. inline
  181. >
  182. <el-form-item label="单位" prop="unitId">
  183. <treeselect
  184. v-model="fomr1.unitId"
  185. :options="treeList"
  186. placeholder="选择单位"
  187. @select="selectPeo"
  188. />
  189. </el-form-item>
  190. <el-form-item label="人数" prop="peopleCount">
  191. <el-input v-model="fomr1.peopleCount" placeholder="请输入人数" />
  192. </el-form-item>
  193. <el-form-item label="人员名称" prop="peopleId">
  194. <el-select
  195. v-model="fomr1.peopleId"
  196. placeholder="请选择人员名称"
  197. filterable
  198. >
  199. <el-option
  200. v-for="(item, i) in renYuan"
  201. :key="i"
  202. :label="item.name"
  203. :value="item.id"
  204. @click.native="cheRen(item.name)"
  205. class="input_xiala"
  206. >
  207. </el-option>
  208. </el-select>
  209. </el-form-item>
  210. <el-form-item label="联系方式" prop="contact">
  211. <el-input v-model="fomr1.contact" placeholder="请输入联系方式" />
  212. </el-form-item>
  213. <el-form-item label="外出事由" prop="cause">
  214. <el-input v-model="fomr1.cause" placeholder="请输入外出事由" />
  215. </el-form-item>
  216. <el-form-item label="用车开始时间" prop="authStime">
  217. <el-date-picker
  218. clearable
  219. size="small"
  220. v-model="fomr1.authStime"
  221. type="datetime"
  222. placeholder="用车开始时间"
  223. value-format="yyyy-MM-dd HH:mm:ss"
  224. >
  225. </el-date-picker>
  226. </el-form-item>
  227. <el-form-item label="用车结束时间" prop="authEtime">
  228. <el-date-picker
  229. clearable
  230. size="small"
  231. v-model="fomr1.authEtime"
  232. type="datetime"
  233. default-time="00:00:00"
  234. value-format="yyyy-MM-dd HH:mm:ss"
  235. placeholder="用车结束时间"
  236. >
  237. </el-date-picker>
  238. </el-form-item>
  239. <div class="box3">
  240. <el-form v-for="(item1, e) in checkShops" :key="e">
  241. <el-form-item label="" prop="bdglThebusId">
  242. <el-select
  243. v-model="item1.bdglThebusId"
  244. placeholder="请选择车辆车牌"
  245. filterable
  246. >
  247. <el-option
  248. v-for="(item, i) in chucarlist"
  249. :key="i"
  250. :label="item.vehiclenumber"
  251. :value="item.id"
  252. >
  253. </el-option>
  254. </el-select>
  255. </el-form-item>
  256. <el-form-item label="" prop="twoshenpirenid">
  257. <el-select
  258. v-model="item1.driverId"
  259. placeholder="请选择司机"
  260. filterable
  261. >
  262. <el-option
  263. v-for="(item, i) in driverList"
  264. :key="i"
  265. :label="item.peopleName"
  266. :value="item.id"
  267. >
  268. </el-option>
  269. </el-select>
  270. </el-form-item>
  271. <el-form-item>
  272. <el-button
  273. type="primary"
  274. icon="el-icon-plus"
  275. size="btc"
  276. @click="addFormss"
  277. v-if="e == checkShop.length - 1"
  278. ></el-button>
  279. <el-button
  280. type="primary"
  281. icon="el-icon-delete"
  282. size="btd"
  283. v-if="e > 0"
  284. @click="delFormss(e)"
  285. ></el-button>
  286. </el-form-item>
  287. </el-form>
  288. </div>
  289. <div class="jiben">出车路线</div>
  290. <el-form-item prop="route">
  291. <el-input
  292. v-model="fomr1.route"
  293. type="textarea"
  294. placeholder="请输入出车路线"
  295. />
  296. </el-form-item>
  297. <div class="jiben">出车原因</div>
  298. <el-form-item prop="bdglDepartureYuanyin">
  299. <el-input
  300. v-model="fomr1.bdglDepartureYuanyin"
  301. type="textarea"
  302. placeholder="请输入出车原因"
  303. />
  304. </el-form-item>
  305. </el-form>
  306. <div slot="footer" class="dialog-footer">
  307. <el-button type="primary" @click="submitForm1">确 定</el-button>
  308. <el-button @click="cancel" size="btn">取 消</el-button>
  309. </div>
  310. </el-dialog>
  311. <!-- 出车会话框 -->
  312. <el-dialog
  313. :title="title"
  314. :visible.sync="open"
  315. width="500px"
  316. append-to-body
  317. :close-on-click-modal="false"
  318. >
  319. <el-form
  320. ref="form"
  321. :model="form"
  322. :rules="rules"
  323. label-width="80px"
  324. inline
  325. >
  326. <el-form-item label="单位" prop="unitId">
  327. <el-input
  328. placeholder="选择单位"
  329. v-model="form.unitName"
  330. readonly
  331. ></el-input>
  332. </el-form-item>
  333. <el-form-item label="人员名称" prop="peopleId">
  334. <el-input
  335. placeholder="请选择人员名称"
  336. v-model="form.peopleName"
  337. readonly
  338. ></el-input>
  339. </el-form-item>
  340. <el-form-item label="人数" prop="peopleCount">
  341. <el-input
  342. v-model="form.peopleCount"
  343. placeholder="请输入人数"
  344. readonly
  345. />
  346. </el-form-item>
  347. <el-form-item label="联系方式" prop="contact">
  348. <el-input
  349. v-model="form.contact"
  350. placeholder="请输入联系方式"
  351. readonly
  352. />
  353. </el-form-item>
  354. <el-form-item label="外出事由" prop="cause">
  355. <el-input
  356. v-model="form.cause"
  357. placeholder="请输入外出事由"
  358. readonly
  359. />
  360. </el-form-item>
  361. <div class="box6">
  362. <el-form v-for="(item1, e) in chuchEList" :key="e">
  363. <el-form-item label="指定出车" prop="carUnitId">
  364. <treeselect
  365. :options="treeList"
  366. placeholder="选择出车单位"
  367. v-model="item1.carUnitId"
  368. disabled
  369. />
  370. </el-form-item>
  371. <el-form-item label="" prop="bdglThebusId">
  372. <el-select
  373. placeholder="请选择车辆车牌"
  374. filterable
  375. v-model="item1.bdglThebusId"
  376. disabled
  377. >
  378. <el-option
  379. v-for="(item, i) in chePaiList"
  380. :key="i"
  381. :label="item.vehiclenumber"
  382. :value="item.id"
  383. >
  384. </el-option>
  385. </el-select>
  386. </el-form-item>
  387. <el-form-item label="" prop="driverId">
  388. <el-select
  389. placeholder="请选择司机"
  390. filterable
  391. v-model="item1.driverId"
  392. disabled
  393. >
  394. <el-option
  395. v-for="(item, i) in driverLists"
  396. :key="i"
  397. :label="item.peopleName"
  398. :value="item.id"
  399. >
  400. </el-option>
  401. </el-select>
  402. </el-form-item>
  403. <el-form-item>
  404. <el-button
  405. type="primary"
  406. icon="el-icon-delete"
  407. size="btd"
  408. @click="delForms(e)"
  409. ></el-button>
  410. </el-form-item>
  411. </el-form>
  412. </div>
  413. <div class="box3">
  414. <el-form v-for="(item1, e) in checkShop" :key="e">
  415. <el-form-item label="" prop="carUnitId">
  416. <treeselect
  417. v-model="item1.carUnitId"
  418. :options="treeList"
  419. placeholder="选择出车单位"
  420. @input="treeselectss"
  421. />
  422. </el-form-item>
  423. <el-form-item label="" prop="bdglThebusId">
  424. <el-select
  425. v-model="item1.bdglThebusId"
  426. placeholder="请选择车辆车牌"
  427. filterable
  428. >
  429. <el-option
  430. v-for="(item, i) in chucarlist"
  431. :key="i"
  432. :label="item.vehiclenumber"
  433. :value="item.id"
  434. >
  435. </el-option>
  436. </el-select>
  437. </el-form-item>
  438. <el-form-item label="" prop="driverId">
  439. <el-select
  440. v-model="item1.driverId"
  441. placeholder="请选择司机"
  442. filterable
  443. >
  444. <el-option
  445. v-for="(item, i) in driverList"
  446. :key="i"
  447. :label="item.peopleName"
  448. :value="item.id"
  449. >
  450. </el-option>
  451. </el-select>
  452. </el-form-item>
  453. <el-form-item>
  454. <el-button
  455. type="primary"
  456. icon="el-icon-check"
  457. size="btc"
  458. @click="addForms"
  459. v-if="e == checkShop.length - 1"
  460. ></el-button>
  461. </el-form-item>
  462. </el-form>
  463. </div>
  464. <div class="jiben">出车路线</div>
  465. <el-form-item prop="route">
  466. <el-input
  467. v-model="form.route"
  468. type="textarea"
  469. placeholder="请输入出车路线"
  470. disabled
  471. />
  472. </el-form-item>
  473. <div class="jiben">备注</div>
  474. <el-form-item prop="route">
  475. <el-input v-model="form.remarkInfo" type="textarea" placeholder="" />
  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" size="btn">取 消</el-button>
  481. </div>
  482. </el-dialog>
  483. <!-- 查看会话框 -->
  484. <el-dialog
  485. title="查看可出车列表"
  486. :visible.sync="opens"
  487. width="500px"
  488. append-to-body
  489. :close-on-click-modal="false"
  490. >
  491. <el-form
  492. ref="form"
  493. :model="forms"
  494. :rules="rules"
  495. label-width="80px"
  496. inline
  497. >
  498. <el-form-item label="单位" prop="unitId">
  499. <el-input v-model="forms.unitName" disabled></el-input>
  500. </el-form-item>
  501. <el-form-item label="人员名称" prop="peopleId">
  502. <el-input v-model="forms.peopleName" disabled></el-input>
  503. </el-form-item>
  504. <el-form-item label="人数" prop="peopleCount">
  505. <el-input v-model="forms.peopleCount" disabled />
  506. </el-form-item>
  507. <el-form-item label="联系方式" prop="contact">
  508. <el-input v-model="forms.contact" disabled />
  509. </el-form-item>
  510. <el-form-item label="外出事由" prop="cause">
  511. <el-input v-model="forms.cause" disabled />
  512. </el-form-item>
  513. <div class="box4">
  514. <table
  515. border="1"
  516. style="
  517. border-collapse: collapse;
  518. border: none;
  519. mso-border-left-alt: 0.5pt solid windowtext;
  520. mso-border-top-alt: 0.5pt solid windowtext;
  521. mso-border-right-alt: 0.5pt solid windowtext;
  522. mso-border-bottom-alt: 0.5pt solid windowtext;
  523. mso-border-insideh: 0.5pt solid windowtext;
  524. mso-border-insidev: 0.5pt solid windowtext;
  525. mso-padding-alt: 0pt 0pt 0pt 0pt;
  526. "
  527. width="907px"
  528. >
  529. <tbody style="">
  530. <tr align="center" class="tr">
  531. <td width="220" height="40">车牌型号</td>
  532. <td width="220" height="40">号牌号码</td>
  533. <td width="220" height="40">司机</td>
  534. <td width="220" height="40">司机联系方式</td>
  535. </tr>
  536. <tr
  537. align="center"
  538. class="tr"
  539. v-for="(item, i) in chaCarLists"
  540. :key="i"
  541. >
  542. <td width="220" height="40" class="tds">
  543. <el-select
  544. v-model="item.vehiclemodel"
  545. placeholder=""
  546. disabled
  547. >
  548. <el-option
  549. v-for="(item1, i) in brand"
  550. :key="i"
  551. :label="item1.dictLabel"
  552. :value="item1.dictValue"
  553. >
  554. </el-option>
  555. </el-select>
  556. </td>
  557. <td width="220" height="40">{{ item.vehiclenumber }}</td>
  558. <td width="220" height="40">{{ item.driverName }}</td>
  559. <td width="220" height="40">{{ item.driverPhone }}</td>
  560. </tr>
  561. </tbody>
  562. </table>
  563. </div>
  564. </el-form>
  565. </el-dialog>
  566. </div>
  567. </template>
  568. <script>
  569. import {
  570. getThebusApply,
  571. delThebusApply,
  572. exportThebusApply,
  573. exportThebusCar,
  574. exportThebusCha,
  575. zaiweiCar,
  576. chuCarList,
  577. addKeChuChe,
  578. sb,
  579. guiDui,
  580. } from "@/api/militaryvehicleManagement/thebusApply";
  581. // 查询字典
  582. import { getDicts } from "@/api/system/dict/data";
  583. import { listDriver } from "@/api/militaryvehicleManagement/driver";
  584. import { getAll } from "@/api/grassrootsregistration/bdglmeeting";
  585. // 导入树形结构
  586. import Treeselect from "@riophae/vue-treeselect";
  587. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  588. import {
  589. getZhuChiRen,
  590. getDept,
  591. listThebus,
  592. } from "@/api/militaryvehicleManagement/thebus";
  593. export default {
  594. name: "ThebusList",
  595. dicts: ["brand"],
  596. components: {
  597. Treeselect,
  598. },
  599. data() {
  600. return {
  601. // 遮罩层
  602. loading: true,
  603. // 导出遮罩层
  604. exportLoading: false,
  605. // 选中数组
  606. ids: [],
  607. // 非单个禁用
  608. single: true,
  609. // 非多个禁用
  610. multiple: true,
  611. // 显示搜索条件
  612. showSearch: true,
  613. // 总条数
  614. total: 0,
  615. // 用车申请表格数据
  616. thebusApplyList: [],
  617. // 弹出层标题
  618. title: "",
  619. // 是否显示弹出层
  620. open: false,
  621. // 查询参数
  622. queryParams: {
  623. pageNum: 1,
  624. pageSize: 10,
  625. chaxunType: "0",
  626. },
  627. // 表单参数
  628. form: {},
  629. // 表单校验
  630. rules: {},
  631. // 人员列表
  632. renYuan: [],
  633. //出车对话框司机
  634. checkShop: [
  635. {
  636. bdglThebusId: null,
  637. driverId: null,
  638. carUnitId: null,
  639. },
  640. ],
  641. // 新增出车对话框
  642. checkShops: [
  643. {
  644. bdglThebusId: null,
  645. driverId: null,
  646. },
  647. ],
  648. // 车牌型号
  649. brand: [],
  650. // 司机
  651. driverList: [],
  652. // 查看
  653. forms: {},
  654. // 查看框显示
  655. opens: false,
  656. // 外面的人员
  657. renYuans: [],
  658. // 查看司机,车辆列表
  659. chaCarLists: [],
  660. // 出车获取车辆列表
  661. chucarlist: [],
  662. // 车牌型号的保存
  663. names: "",
  664. // 新增弹出层的显示与隐藏
  665. openes: false,
  666. // 树形列表
  667. treeList: [],
  668. // 新增参数
  669. fomr1: {},
  670. arr: [],
  671. rules1: {
  672. bdglDepartureYuanyin: [
  673. { required: true, message: "请填写原因", trigger: "blur" },
  674. ],
  675. },
  676. // 出车数据
  677. chuchEList: [],
  678. // 出车获取车辆列表
  679. driverLists: [],
  680. // 出车获取车辆列表
  681. chePaiList: [],
  682. };
  683. },
  684. created() {
  685. this.getList();
  686. this.getSuo();
  687. getDicts("brand").then((response) => {
  688. this.brand = response.data;
  689. });
  690. this.getCar;
  691. this.siJI();
  692. this.chePai();
  693. },
  694. methods: {
  695. // 获取车牌号翻译
  696. chePai() {
  697. listThebus().then((res) => {
  698. this.chePaiList = res.rows;
  699. });
  700. },
  701. // 获取司机翻译
  702. siJI() {
  703. listDriver().then((res) => {
  704. this.driverLists = res.rows;
  705. });
  706. },
  707. // 选择出车单位触发
  708. treeselectss(i) {
  709. this.getSi(i);
  710. this.getCar(i);
  711. },
  712. // 归队按钮触发
  713. returnCar(row) {
  714. this.form = row;
  715. this.$confirm("是否确认归队", "提示", {
  716. confirmButtonText: "确定",
  717. cancelButtonText: "取消",
  718. type: "warning",
  719. })
  720. .then(() => {
  721. this.form.placeState = "1";
  722. guiDui(this.form).then((res) => {
  723. this.$modal.msgSuccess("归队成功");
  724. this.getList();
  725. });
  726. })
  727. .catch(() => {});
  728. },
  729. // 获取人
  730. getRen(id) {
  731. getZhuChiRen(id).then((res) => {
  732. this.renYuan = res.data;
  733. });
  734. },
  735. // 选择人员触发
  736. cheRen(name) {
  737. this.fomr1.peopleName = name;
  738. },
  739. // 选择部门单位触发
  740. selectPeo(data) {
  741. this.fomr1.unitName = data.label;
  742. this.getRen(data.id);
  743. },
  744. // 获取单位列表
  745. getTreeList() {
  746. getDept().then((res) => {
  747. this.treeList = res.data;
  748. });
  749. },
  750. // 今日,明日按钮触发
  751. caoZuoTypefun(data) {
  752. if (data == "0") {
  753. this.getList();
  754. } else if (data == "1") {
  755. this.queryParams.chaxunType = "1";
  756. this.getList();
  757. } else if (data == "2") {
  758. this.queryParams.chaxunType = "2";
  759. this.getList();
  760. }
  761. },
  762. // 翻译车牌型号
  763. car(value) {
  764. this.brand.map((item) => {
  765. if (item.dictValue == value) {
  766. this.names = item.dictLabel;
  767. }
  768. });
  769. },
  770. // 翻译车信息
  771. vehiclecolor(row) {
  772. var vehiclecolor = "";
  773. this.brand.map((item) => {
  774. if (row.bdglDepartureInfos) {
  775. row.bdglDepartureInfos.forEach((items, index) => {
  776. if (item.dictValue == items.vehiclemodel) {
  777. vehiclecolor += item.dictLabel + " ";
  778. }
  779. });
  780. } else {
  781. vehiclecolor = "";
  782. }
  783. });
  784. return vehiclecolor;
  785. },
  786. // 获取搜索所有人
  787. getSuo() {
  788. getAll().then((res) => {
  789. this.renYuans = res.rows;
  790. });
  791. },
  792. // 查看
  793. singles(row) {
  794. let id = row.id;
  795. exportThebusCha(id).then((res) => {
  796. this.forms = res.data;
  797. this.opens = true;
  798. this.chaCarLists = res.data.bdglDepartureInfos;
  799. });
  800. },
  801. // 获取司机
  802. getSi(id) {
  803. listDriver({ unitId: id }).then((response) => {
  804. this.driverList = response.rows;
  805. });
  806. },
  807. // 获取在位车辆型号
  808. getCar(id) {
  809. zaiweiCar({ unitId: id }).then((res) => {
  810. this.chucarlist = res.rows;
  811. });
  812. },
  813. // 删除出车对话框选择司机
  814. delForms(i) {
  815. this.chuchEList.splice(i, 1);
  816. },
  817. // 删除出车对话框选择司机
  818. delFormss(i) {
  819. this.checkShops.splice(i, 1);
  820. },
  821. // 出车对话框选择司机
  822. addForms() {
  823. this.chuchEList.push(this.checkShop[0]);
  824. this.checkShop = [
  825. {
  826. driverId: null,
  827. bdglThebusId: null,
  828. carUnitId: null,
  829. },
  830. ];
  831. },
  832. // 增加对话框选择司机
  833. addFormss() {
  834. this.checkShops.push({
  835. driverId: null,
  836. bdglThebusId: null,
  837. });
  838. },
  839. /** 查询出车申请列表 */
  840. getList() {
  841. this.loading = true;
  842. chuCarList(this.queryParams).then((response) => {
  843. this.thebusApplyList = response.rows;
  844. this.total = response.total;
  845. this.loading = false;
  846. });
  847. },
  848. // 取消按钮
  849. cancel() {
  850. this.open = false;
  851. this.openes = false;
  852. this.reset();
  853. },
  854. // 表单重置
  855. reset() {
  856. this.form.remarkInfo = null;
  857. this.form = {};
  858. this.form1 = {};
  859. this.checkShop = [
  860. {
  861. bdglThebusId: null,
  862. driverId: null,
  863. carUnitId: null,
  864. },
  865. ];
  866. this.chuchEList = [];
  867. this.resetForm("form");
  868. this.resetForm("form1");
  869. this.resetForm("checkShop");
  870. this.resetForm("chuchEList");
  871. },
  872. /** 搜索按钮操作 */
  873. handleQuery() {
  874. this.queryParams.pageNum = 1;
  875. this.getList();
  876. },
  877. /** 重置按钮操作 */
  878. resetQuery() {
  879. this.queryParams.peopleId = null;
  880. this.resetForm("queryForm");
  881. this.handleQuery();
  882. },
  883. // 多选框选中数据
  884. handleSelectionChange(selection) {
  885. this.ids = selection.map((item) => item.id);
  886. this.single = selection.length !== 1;
  887. this.multiple = !selection.length;
  888. },
  889. /** 出车按钮操作 */
  890. handleAdd(row) {
  891. this.form.id = row.id;
  892. this.form = row;
  893. this.getCar();
  894. this.getSi();
  895. this.getTreeList();
  896. this.open = true;
  897. this.title = "选择司机";
  898. },
  899. /** 新增按钮操作 */
  900. handleAdds() {
  901. this.reset();
  902. this.getCar();
  903. this.getSi();
  904. this.openes = true;
  905. var today = new Date();
  906. var y = today.getFullYear();
  907. var M = today.getMonth() + 1;
  908. var d = today.getDate();
  909. var h = today.getHours();
  910. var m = today.getMinutes();
  911. var s = today.getSeconds();
  912. if (M < 10) {
  913. M = "0" + M;
  914. }
  915. if (d < 10) {
  916. d = "0" + d;
  917. }
  918. if (h < 10) {
  919. h = "0" + h;
  920. }
  921. if (m < 10) {
  922. m = "0" + m;
  923. }
  924. if (s < 10) {
  925. s = "0" + s;
  926. }
  927. // this.fomr1.authStime =
  928. // y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
  929. // this.fomr1.authEtime =
  930. // y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
  931. this.getTreeList();
  932. },
  933. /** 修改按钮操作 */
  934. handleUpdate(row) {
  935. this.reset();
  936. this.getTreeList();
  937. const id = row.id || this.ids;
  938. getThebusApply(id).then((response) => {
  939. this.form = response.data;
  940. this.getRen(this.form.unitId);
  941. this.open = true;
  942. this.title = "修改可出车列表";
  943. });
  944. },
  945. /** 出车提交按钮 */
  946. submitForm() {
  947. if (this.chuchEList.length) {
  948. this.form.bdglDepartureInfos = this.chuchEList;
  949. this.chuchEList.forEach((item) => {
  950. this.arr.push(item.bdglThebusId);
  951. });
  952. }
  953. if (this.arr.length) {
  954. this.form.thebusId = this.arr.join(",");
  955. }
  956. this.form.outstatus = "1";
  957. exportThebusCar(this.form).then((response) => {
  958. this.$modal.msgSuccess("新增成功");
  959. this.open = false;
  960. this.getList();
  961. this.arr = [];
  962. });
  963. },
  964. // 新增提交按钮
  965. submitForm1() {
  966. this.$refs["form1"].validate((valid) => {
  967. if (valid) {
  968. if (this.checkShop.length) {
  969. this.fomr1.bdglDepartureInfos = this.checkShops;
  970. this.checkShops.forEach((item) => {
  971. this.arr.push(item.bdglThebusId);
  972. });
  973. }
  974. if (this.arr.length) {
  975. this.fomr1.thebusId = this.arr.join(",");
  976. }
  977. this.fomr1.outstatus = "1";
  978. addKeChuChe(this.fomr1).then((response) => {
  979. this.$modal.msgSuccess("新增成功");
  980. this.openes = false;
  981. this.getList();
  982. this.arr = [];
  983. });
  984. }
  985. });
  986. },
  987. /** 删除按钮操作 */
  988. handleDelete(row) {
  989. const ids = row.id || this.ids;
  990. this.$modal
  991. .confirm("是否确认删除可出车列表的数据项?")
  992. .then(function () {
  993. return delThebusApply(ids);
  994. })
  995. .then(() => {
  996. this.getList();
  997. this.$modal.msgSuccess("删除成功");
  998. })
  999. .catch(() => {});
  1000. },
  1001. /** 导出按钮操作 */
  1002. handleExport() {
  1003. const queryParams = this.queryParams;
  1004. this.$modal
  1005. .confirm("是否确认导出所有可出车列表数据项?")
  1006. .then(() => {
  1007. this.exportLoading = true;
  1008. return exportThebusApply(queryParams);
  1009. })
  1010. .then((response) => {
  1011. this.$download.name(response.msg);
  1012. this.exportLoading = false;
  1013. })
  1014. .catch(() => {});
  1015. },
  1016. },
  1017. };
  1018. </script>
  1019. <style scoped>
  1020. /* 对话框背景颜色 */
  1021. ::v-deep .el-dialog {
  1022. background: #004d86 !important;
  1023. width: 800px !important;
  1024. }
  1025. ::v-deep .el-textarea__inner {
  1026. width: 920px;
  1027. height: 104px;
  1028. margin: auto;
  1029. }
  1030. ::v-deep .el-dialog__header {
  1031. border-bottom: 1px solid #718a9d;
  1032. }
  1033. ::v-deep .el-dialog__title {
  1034. color: #fff;
  1035. font: 18px;
  1036. }
  1037. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  1038. color: #fff;
  1039. }
  1040. ::v-deep .el-form-item__label {
  1041. font: 16px;
  1042. color: #fff;
  1043. width: 100px !important;
  1044. }
  1045. ::v-deep .el-input__inner {
  1046. /* width: 200px !important;
  1047. height: 36px; */
  1048. background: transparent;
  1049. color: #fff;
  1050. border: 1px solid white !important;
  1051. }
  1052. /* 单位框背景颜色 */
  1053. ::v-deep .vue-treeselect__control {
  1054. background: #004d86 !important;
  1055. }
  1056. /* 基本信息背景 */
  1057. .jiben {
  1058. width: 920px;
  1059. height: 32px;
  1060. background-image: url(../../../images/小标题底.png);
  1061. margin-bottom: 25px;
  1062. color: #fff;
  1063. padding-left: 16px;
  1064. line-height: 32px;
  1065. }
  1066. /*调整表单间距 */
  1067. ::v-deep .el-form-item__content {
  1068. width: 200px;
  1069. }
  1070. ::v-deep .el-input__inner {
  1071. cursor: pointer !important;
  1072. }
  1073. /* 底部确定取消按钮 */
  1074. ::v-deep .el-dialog__footer {
  1075. padding: 30px 50px;
  1076. }
  1077. ::v-deep .el-dialog__body {
  1078. margin: 10px 24px 20px 30px;
  1079. padding-top: 20px !important;
  1080. box-sizing: border-box;
  1081. /* padding: 30px 12px 30px 28px; */
  1082. }
  1083. .contents {
  1084. padding: 0px 40px !important;
  1085. }
  1086. /* 下拉菜单 */
  1087. .el-dropdown-link {
  1088. cursor: pointer;
  1089. color: #409eff;
  1090. }
  1091. .el-icon-arrow-down {
  1092. font-size: 12px;
  1093. }
  1094. /* 下拉菜单字体/背景颜色 */
  1095. .el-select-dropdown__item.hover,
  1096. .el-select-dropdown__item:hover {
  1097. background-color: #004d86;
  1098. color: #111;
  1099. }
  1100. .el-select-dropdown__item {
  1101. color: #111;
  1102. }
  1103. /* 时间选择 */
  1104. ::v-deep .el-input--small .el-input__inner {
  1105. width: 200px;
  1106. height: 36px;
  1107. line-height: 36px;
  1108. }
  1109. .el-date-editor.el-input {
  1110. width: 200px;
  1111. height: 36px;
  1112. line-height: 36px;
  1113. }
  1114. ::v-deep .el-date-editor.el-input .el-input__inner {
  1115. height: 36px;
  1116. line-height: 36px;
  1117. }
  1118. /* 单位框背景颜色 */
  1119. ::v-deep .vue-treeselect__control {
  1120. background: #004d86 !important;
  1121. color: #fff;
  1122. }
  1123. /* 单位下拉菜单选中字体颜色 */
  1124. ::v-deep .vue-treeselect__single-value {
  1125. color: #fff !important;
  1126. }
  1127. /* 分页按钮 */
  1128. ::v-deep .el-pagination.is-background .el-pager li {
  1129. background-color: #004d86;
  1130. color: #fff;
  1131. }
  1132. ::v-deep .el-pagination.is-background .btn-next {
  1133. background-color: #004d86;
  1134. color: #fff;
  1135. }
  1136. /* 底部确定取消按钮 */
  1137. ::v-deep .el-dialog__footer {
  1138. padding: 18px 50px;
  1139. margin-right: 28px;
  1140. }
  1141. /* 增加按钮弹框 */
  1142. ::v-deep .el-dialog {
  1143. width: 1060px !important;
  1144. }
  1145. ::v-deep .el-dialog__body {
  1146. padding: 30px 35px;
  1147. }
  1148. /* 小手样式 */
  1149. ::v-deep .el-table__cell {
  1150. cursor: pointer;
  1151. }
  1152. .el-button--mini {
  1153. width: 80px !important;
  1154. border: 1px solid transparent;
  1155. padding: 3px 8px;
  1156. font-size: 14px;
  1157. line-height: 1.5;
  1158. border-radius: 3px;
  1159. color: #fff;
  1160. background-color: #1890ff;
  1161. }
  1162. .box3 {
  1163. width: 920px;
  1164. min-height: 70px;
  1165. border: 1px solid white;
  1166. border-radius: 5px;
  1167. /* background: #409eff; */
  1168. margin-bottom: 30px;
  1169. padding-top: 15px;
  1170. padding-left: 15px;
  1171. }
  1172. /* 调整输入框提示文字颜色 */
  1173. ::v-deep .vue-treeselect__placeholder {
  1174. color: #bdbdbd4f !important;
  1175. }
  1176. ::v-deep input::-webkit-input-placeholder {
  1177. color: #bdbdbd4f !important;
  1178. }
  1179. ::v-deep input:-moz-placeholder {
  1180. color: #bdbdbd4f !important;
  1181. }
  1182. /* 查看表格 */
  1183. .box4 {
  1184. width: 923px;
  1185. min-height: 70px;
  1186. border-radius: 5px;
  1187. /* background: #409eff; */
  1188. margin-bottom: 30px;
  1189. padding-top: 15px;
  1190. padding-left: 15px;
  1191. }
  1192. .box4 tr {
  1193. color: #fff;
  1194. }
  1195. .box4 .tr td {
  1196. border-bottom: 1px solid #fff;
  1197. }
  1198. .box4 table {
  1199. border-color: #fff;
  1200. }
  1201. ::v-deep .box4 table td {
  1202. border-bottom: 1px solid white !important;
  1203. }
  1204. .a1 {
  1205. width: 46px !important;
  1206. border: 1px solid transparent;
  1207. padding: 3px 8px;
  1208. font-size: 14px;
  1209. line-height: 1.5;
  1210. border-radius: 3px;
  1211. color: #fff;
  1212. background-color: #1890ff;
  1213. }
  1214. /* 今日明日按钮 */
  1215. .isSubmit {
  1216. margin-left: 42% !important;
  1217. }
  1218. .el-radio-button {
  1219. width: 122px !important;
  1220. height: 30px !important;
  1221. line-height: 30px !important;
  1222. border: none !important;
  1223. }
  1224. ::v-deep .el-radio-button__inner {
  1225. width: 120px !important;
  1226. height: 30px !important;
  1227. line-height: 8px !important;
  1228. background: #196299;
  1229. border: none;
  1230. color: #fff;
  1231. }
  1232. ::v-deep .el-radio-button:first-child .el-radio-button__inner {
  1233. border-left: none !important;
  1234. }
  1235. ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
  1236. color: #ffffff;
  1237. background-color: #006cff !important;
  1238. border-color: #006cff !important;
  1239. -webkit-box-shadow: -1px 0 0 0 #006cff !important;
  1240. box-shadow: -1px 0 0 0 #006cff !important;
  1241. }
  1242. hr {
  1243. border: none;
  1244. height: 1px;
  1245. background-color: rgba(204, 204, 204, 0.5);
  1246. }
  1247. ::v-deep .tds .el-input__inner {
  1248. border: none !important;
  1249. }
  1250. ::v-deep .el-input.is-disabled .el-input__inner {
  1251. background: transparent;
  1252. color: #fff;
  1253. }
  1254. ::v-deep .box6 .el-form .el-form-item {
  1255. margin-right: 9px !important ;
  1256. }
  1257. </style>