index.vue 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219
  1. <template>
  2. <div class="app-container">
  3. <el-row>
  4. <el-col :span="1.5" class="isSubmit">
  5. <el-radio-group v-model="queryParams.type" @change="caoZuoTypefun">
  6. <el-radio-button label="null">所有值班</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="auto"
  19. >
  20. <el-form-item label="" prop="attendedTime">
  21. <el-date-picker
  22. clearable
  23. size="small"
  24. v-model="queryParams.attendedTime"
  25. type="date"
  26. value-format="yyyy-MM-dd"
  27. placeholder="请选择值班时间"
  28. @change="handleQuery"
  29. ></el-date-picker>
  30. </el-form-item>
  31. <el-form-item label="" prop="chiefDutyName">
  32. <el-select
  33. v-model="queryParams.chiefDutyName"
  34. filterable
  35. clearable
  36. placeholder="请选择值班首长"
  37. @change="handleQuery"
  38. >
  39. <el-option
  40. v-for="item in rylist"
  41. :key="item.id"
  42. :label="item.name"
  43. :value="item.id"
  44. ></el-option>
  45. </el-select>
  46. </el-form-item>
  47. <!-- <el-form-item label="值班首长ID" prop="chiefDutyId">
  48. <el-input
  49. v-model="queryParams.chiefDutyId"
  50. placeholder="请输入值班首长ID"
  51. clearable
  52. size="small"
  53. @keyup.enter.native="handleQuery"
  54. />
  55. </el-form-item>
  56. <el-form-item label="值班首长电话" prop="chiefDutyPhone">
  57. <el-input
  58. v-model="queryParams.chiefDutyPhone"
  59. placeholder="请输入值班首长电话"
  60. clearable
  61. size="small"
  62. @keyup.enter.native="handleQuery"
  63. />
  64. </el-form-item>-->
  65. <el-form-item label="" prop="combatDutyName">
  66. <el-input
  67. v-model="queryParams.combatDutyName"
  68. placeholder="请输入作战值班员"
  69. clearable
  70. size="small"
  71. @input="handleQuery"
  72. />
  73. </el-form-item>
  74. <!-- <el-form-item label="作战值班员Id" prop="combatDutyId">
  75. <el-input
  76. v-model="queryParams.combatDutyId"
  77. placeholder="请输入作战值班员Id"
  78. clearable
  79. size="small"
  80. @keyup.enter.native="handleQuery"
  81. />
  82. </el-form-item>
  83. <el-form-item label="作战值班员手机号" prop="combatDutyPhone">
  84. <el-input
  85. v-model="queryParams.combatDutyPhone"
  86. placeholder="请输入作战值班员手机号"
  87. clearable
  88. size="small"
  89. @keyup.enter.native="handleQuery"
  90. />
  91. </el-form-item>
  92. <el-form-item label="总值班员" prop="dutyOffierName">
  93. <el-input
  94. v-model="queryParams.dutyOffierName"
  95. placeholder="请输入总值班员"
  96. clearable
  97. size="small"
  98. @keyup.enter.native="handleQuery"
  99. />
  100. </el-form-item>
  101. <el-form-item label="总值班员ID" prop="dutyOffierId">
  102. <el-input
  103. v-model="queryParams.dutyOffierId"
  104. placeholder="请输入总值班员ID"
  105. clearable
  106. size="small"
  107. @keyup.enter.native="handleQuery"
  108. />
  109. </el-form-item>
  110. <el-form-item label="总值班员电话" prop="dutyOffierPhone">
  111. <el-input
  112. v-model="queryParams.dutyOffierPhone"
  113. placeholder="请输入总值班员电话"
  114. clearable
  115. size="small"
  116. @keyup.enter.native="handleQuery"
  117. />
  118. </el-form-item>
  119. <el-form-item label="值班分队1" prop="detachmentoneName">
  120. <el-input
  121. v-model="queryParams.detachmentoneName"
  122. placeholder="请输入值班分队1"
  123. clearable
  124. size="small"
  125. @keyup.enter.native="handleQuery"
  126. />
  127. </el-form-item>
  128. <el-form-item label="值班分队1ID" prop="detachmentoneId">
  129. <el-input
  130. v-model="queryParams.detachmentoneId"
  131. placeholder="请输入值班分队1ID"
  132. clearable
  133. size="small"
  134. @keyup.enter.native="handleQuery"
  135. />
  136. </el-form-item>
  137. <el-form-item label="值班分队1人数" prop="detachmentoneNumber">
  138. <el-input
  139. v-model="queryParams.detachmentoneNumber"
  140. placeholder="请输入值班分队1人数"
  141. clearable
  142. size="small"
  143. @keyup.enter.native="handleQuery"
  144. />
  145. </el-form-item>
  146. <el-form-item label="值班分队1指挥员" prop="detachmentonePeopleName">
  147. <el-input
  148. v-model="queryParams.detachmentonePeopleName"
  149. placeholder="请输入值班分队1指挥员"
  150. clearable
  151. size="small"
  152. @keyup.enter.native="handleQuery"
  153. />
  154. </el-form-item>
  155. <el-form-item label="值班分队1指挥员ID" prop="detachmentonePeopleId">
  156. <el-input
  157. v-model="queryParams.detachmentonePeopleId"
  158. placeholder="请输入值班分队1指挥员ID"
  159. clearable
  160. size="small"
  161. @keyup.enter.native="handleQuery"
  162. />
  163. </el-form-item>
  164. <el-form-item label="值班分队1指挥员电话" prop="detachmentonePeoplePhone">
  165. <el-input
  166. v-model="queryParams.detachmentonePeoplePhone"
  167. placeholder="请输入值班分队1指挥员电话"
  168. clearable
  169. size="small"
  170. @keyup.enter.native="handleQuery"
  171. />
  172. </el-form-item>
  173. <el-form-item label="值班分队2" prop="detachmentwoName">
  174. <el-input
  175. v-model="queryParams.detachmentwoName"
  176. placeholder="请输入值班分队2"
  177. clearable
  178. size="small"
  179. @keyup.enter.native="handleQuery"
  180. />
  181. </el-form-item>
  182. <el-form-item label="值班分队2ID" prop="detachmentwoId">
  183. <el-input
  184. v-model="queryParams.detachmentwoId"
  185. placeholder="请输入值班分队2ID"
  186. clearable
  187. size="small"
  188. @keyup.enter.native="handleQuery"
  189. />
  190. </el-form-item>
  191. <el-form-item label="值班分队2人数" prop="detachmentwoNumber">
  192. <el-input
  193. v-model="queryParams.detachmentwoNumber"
  194. placeholder="请输入值班分队2人数"
  195. clearable
  196. size="small"
  197. @keyup.enter.native="handleQuery"
  198. />
  199. </el-form-item>
  200. <el-form-item label="值班分队2指挥员" prop="detachmentwoPeopleName">
  201. <el-input
  202. v-model="queryParams.detachmentwoPeopleName"
  203. placeholder="请输入值班分队2指挥员"
  204. clearable
  205. size="small"
  206. @keyup.enter.native="handleQuery"
  207. />
  208. </el-form-item>
  209. <el-form-item label="值班分队2指挥员ID" prop="detachmentwoPeopleId">
  210. <el-input
  211. v-model="queryParams.detachmentwoPeopleId"
  212. placeholder="请输入值班分队2指挥员ID"
  213. clearable
  214. size="small"
  215. @keyup.enter.native="handleQuery"
  216. />
  217. </el-form-item>
  218. <el-form-item label="值班分队2指挥员电话" prop="detachmentwoPeoplePhone">
  219. <el-input
  220. v-model="queryParams.detachmentwoPeoplePhone"
  221. placeholder="请输入值班分队2指挥员电话"
  222. clearable
  223. size="small"
  224. @keyup.enter.native="handleQuery"
  225. />
  226. </el-form-item>
  227. <el-form-item label="备注" prop="remarks">
  228. <el-input
  229. v-model="queryParams.remarks"
  230. placeholder="请输入备注"
  231. clearable
  232. size="small"
  233. @keyup.enter.native="handleQuery"
  234. />
  235. </el-form-item>-->
  236. <el-form-item>
  237. <!-- <el-button type="primary" size="btn" @click="handleQuery">搜索</el-button> -->
  238. <el-button size="btr" @click="resetQuery">重置</el-button>
  239. </el-form-item>
  240. </el-form>
  241. <el-row :gutter="10" class="mb8">
  242. <el-col :span="1.5">
  243. <el-button
  244. type="primary"
  245. plain
  246. icon="el-icon-plus"
  247. size="mini"
  248. @click="handleAdd"
  249. v-hasPermi="['combatduty:basedutyinfo:add']"
  250. >新增</el-button
  251. >
  252. </el-col>
  253. <!-- <el-col :span="1.5">
  254. <el-button
  255. type="success"
  256. plain
  257. icon="el-icon-edit"
  258. size="mini"
  259. :disabled="single"
  260. @click="handleUpdate"
  261. v-hasPermi="['combatduty:basedutyinfo:edit']"
  262. >修改</el-button>
  263. </el-col>-->
  264. <el-col :span="1.5">
  265. <el-button
  266. type="danger"
  267. plain
  268. icon="el-icon-delete"
  269. size="mini"
  270. :disabled="multiple"
  271. @click="handleDelete"
  272. v-hasPermi="['combatduty:basedutyinfo:remove']"
  273. >删除</el-button
  274. >
  275. </el-col>
  276. <!-- <el-col :span="1.5">
  277. <el-button
  278. type="warning"
  279. plain
  280. icon="el-icon-download"
  281. size="mini"
  282. :loading="exportLoading"
  283. @click="handleExport"
  284. v-hasPermi="['combatduty:basedutyinfo:export']"
  285. >导出</el-button>
  286. </el-col>-->
  287. <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
  288. </el-row>
  289. <el-table
  290. v-loading="loading"
  291. :data="basedutyinfoList"
  292. :header-cell-style="{ background: '#003C69', color: 'white' }"
  293. @selection-change="handleSelectionChange"
  294. >
  295. <el-table-column type="selection" width="55" align="center" />
  296. <el-table-column label="序号" align="center" type="index" />
  297. <!-- <el-table-column label="主键ID" align="center" prop="id" /> -->
  298. <el-table-column label="值班时间" align="center" prop="attendedTime" />
  299. <el-table-column label="值班首长" align="center" prop="chiefDutyName" />
  300. <!-- <el-table-column label="值班首长" align="center" prop="chiefDutyId" :formatter="chiefDutyIdFormat" /> -->
  301. <!-- <el-table-column label="值班首长电话" align="center" prop="chiefDutyPhone" /> -->
  302. <el-table-column
  303. label="作战值班员"
  304. align="center"
  305. prop="combatDutyName"
  306. />
  307. <!-- <el-table-column label="作战值班员" align="center" prop="combatDutyId" :formatter="combatDutyIdFormat" /> -->
  308. <!-- <el-table-column label="作战值班员手机号" align="center" prop="combatDutyPhone" /> -->
  309. <el-table-column label="总值班员" align="center" prop="dutyOffierName" />
  310. <!-- <el-table-column label="总值班员" align="center" prop="dutyOffierId" :formatter="dutyOffierIdFormat" /> -->
  311. <!-- <el-table-column label="总值班员电话" align="center" prop="dutyOffierPhone" /> -->
  312. <el-table-column
  313. label="值班分队1"
  314. align="center"
  315. prop="detachmentoneName"
  316. />
  317. <!-- <el-table-column
  318. label="值班分队1"
  319. align="center"
  320. prop="detachmentoneId"
  321. :formatter="detachmentoneIdFormat"
  322. /> -->
  323. <!-- <el-table-column label="值班分队1人数" align="center" prop="detachmentoneNumber" /> -->
  324. <el-table-column
  325. label="值班分队1指挥员"
  326. align="center"
  327. prop="detachmentonePeopleName"
  328. />
  329. <!-- <el-table-column label="值班分队1指挥员" align="center" prop="detachmentonePeopleId" :formatter="detachmentonePeopleIdFormat" /> -->
  330. <!-- <el-table-column label="值班分队1指挥员电话" align="center" prop="detachmentonePeoplePhone" /> -->
  331. <el-table-column
  332. label="值班分队2"
  333. align="center"
  334. prop="detachmentwoName"
  335. />
  336. <!-- <el-table-column
  337. label="值班分队2"
  338. align="center"
  339. prop="detachmentwoId"
  340. :formatter="detachmentwoIdFormat"
  341. /> -->
  342. <!-- <el-table-column label="值班分队2人数" align="center" prop="detachmentwoNumber" /> -->
  343. <el-table-column
  344. label="值班分队2指挥员"
  345. align="center"
  346. prop="detachmentwoPeopleName"
  347. />
  348. <!-- <el-table-column label="值班分队2指挥员" align="center" prop="detachmentwoPeopleId" :formatter="detachmentwoPeopleIdFormat" /> -->
  349. <!-- <el-table-column label="值班分队2指挥员电话" align="center" prop="detachmentwoPeoplePhone" />
  350. <el-table-column label="备注" align="center" prop="remarks" />-->
  351. <el-table-column
  352. label="操作"
  353. align="center"
  354. class-name="small-padding fixed-width"
  355. width="200"
  356. >
  357. <template slot-scope="scope">
  358. <el-button
  359. size="btu"
  360. type="text"
  361. @click="handleUpdate(scope.row)"
  362. v-hasPermi="['combatduty:basedutyinfo:edit']"
  363. >修改</el-button
  364. >
  365. <el-button
  366. size="btd"
  367. type="text"
  368. @click="handleDelete(scope.row)"
  369. v-hasPermi="['combatduty:basedutyinfo:remove']"
  370. >删除</el-button
  371. >
  372. </template>
  373. </el-table-column>
  374. </el-table>
  375. <pagination
  376. v-show="total > 0"
  377. :total="total"
  378. :page.sync="queryParams.pageNum"
  379. :limit.sync="queryParams.pageSize"
  380. @pagination="getList"
  381. />
  382. <!-- 添加或修改基地值班对话框 -->
  383. <el-dialog
  384. :title="title"
  385. :visible.sync="open"
  386. width="1016px"
  387. append-to-body
  388. :close-on-click-modal="false"
  389. >
  390. <el-form
  391. ref="form"
  392. :model="form"
  393. :rules="rules"
  394. :inline="true"
  395. label-width="150px"
  396. >
  397. <div class="jiben">基本信息</div>
  398. <el-form-item label="值班时间" prop="attendedTime">
  399. <el-date-picker
  400. clearable
  401. size="small"
  402. v-model="form.attendedTime"
  403. type="date"
  404. value-format="yyyy-MM-dd"
  405. placeholder=""
  406. v-if="qdflg == 2"
  407. ></el-date-picker>
  408. <el-date-picker
  409. v-model="form.attendedTime"
  410. type="daterange"
  411. range-separator="至"
  412. start-placeholder
  413. end-placeholder
  414. value-format="yyyy-MM-dd"
  415. v-if="qdflg == 1"
  416. ></el-date-picker>
  417. </el-form-item>
  418. <el-form-item label="值班首长" prop="chiefDutyName">
  419. <el-select
  420. v-model="form.chiefDutyName"
  421. @change="chiefDutyNamefun"
  422. filterable
  423. clearable
  424. placeholder=""
  425. >
  426. <el-option
  427. v-for="item in rylist"
  428. :key="item.id"
  429. :label="item.name"
  430. :value="item"
  431. ></el-option>
  432. </el-select>
  433. </el-form-item>
  434. <!-- <el-form-item label="值班首长ID" prop="chiefDutyId">
  435. <el-input v-model="form.chiefDutyId" placeholder="请输入值班首长ID" />
  436. </el-form-item>-->
  437. <el-form-item label="值班首长电话" prop="chiefDutyPhone">
  438. <el-input v-model="form.chiefDutyPhone" placeholder="" />
  439. </el-form-item>
  440. <el-form-item label="作战值班员" prop="combatDutyName">
  441. <el-select
  442. v-model="form.combatDutyName"
  443. @change="combatDutyNamefun"
  444. filterable
  445. clearable
  446. placeholder=""
  447. >
  448. <el-option
  449. v-for="item in rylist"
  450. :key="item.id"
  451. :label="item.name"
  452. :value="item"
  453. ></el-option>
  454. </el-select>
  455. </el-form-item>
  456. <!-- <el-form-item label="作战值班员Id" prop="combatDutyId">
  457. <el-input v-model="form.combatDutyId" placeholder="请输入作战值班员Id" />
  458. </el-form-item>-->
  459. <el-form-item label="作战值班员手机" prop="combatDutyPhone">
  460. <el-input v-model="form.combatDutyPhone" placeholder="" />
  461. </el-form-item>
  462. <el-form-item label="总值班员" prop="dutyOffierName">
  463. <el-select
  464. v-model="form.dutyOffierName"
  465. @change="dutyOffierNamefun"
  466. filterable
  467. clearable
  468. placeholder=""
  469. >
  470. <el-option
  471. v-for="item in rylist"
  472. :key="item.id"
  473. :label="item.name"
  474. :value="item"
  475. ></el-option>
  476. </el-select>
  477. </el-form-item>
  478. <!-- <el-form-item label="总值班员ID" prop="dutyOffierId">
  479. <el-input v-model="form.dutyOffierId" placeholder="请输入总值班员ID" />
  480. </el-form-item>-->
  481. <el-form-item label="总值班员电话" prop="dutyOffierPhone">
  482. <el-input v-model="form.dutyOffierPhone" placeholder="" />
  483. </el-form-item>
  484. <el-form-item label="值班分队1" prop="detachmentoneName">
  485. <el-select
  486. v-model="form.detachmentoneName"
  487. @change="detachmentoneNamechange"
  488. clearable
  489. placeholder=""
  490. >
  491. <el-option
  492. v-for="dict in deptOptions"
  493. :key="dict.deptId"
  494. :label="dict.deptName"
  495. :value="dict"
  496. ></el-option>
  497. </el-select>
  498. </el-form-item>
  499. <!-- <el-form-item label="值班分队1ID" prop="detachmentoneId">
  500. <el-input v-model="form.detachmentoneId" placeholder="请输入值班分队1ID" />
  501. </el-form-item>-->
  502. <el-form-item label="值班分队1人数" prop="detachmentoneNumber">
  503. <el-input
  504. v-model="form.detachmentoneNumber"
  505. type="number"
  506. :min="0"
  507. placeholder=""
  508. />
  509. <!-- <el-input-number v-model="form.detachmentoneNumber" controls-position="right" :min="0"></el-input-number> -->
  510. <!-- <el-input-number v-model="form.detachmentoneNumber" type='Number' controls-position="right" :min="0" /> -->
  511. <!-- <el-input
  512. v-model="form.detachmentoneNumber"
  513. type="number"
  514. placeholder="请输入值班分队1人数"
  515. />-->
  516. </el-form-item>
  517. <el-form-item label="值班分队1指挥员" prop="detachmentonePeopleName">
  518. <el-select
  519. v-model="form.detachmentonePeopleName"
  520. filterable
  521. clearable
  522. placeholder=""
  523. @change="detachmentonePeopleNamefun"
  524. >
  525. <el-option
  526. v-for="item in rylist"
  527. :key="item.id"
  528. :label="item.name"
  529. :value="item"
  530. ></el-option>
  531. </el-select>
  532. </el-form-item>
  533. <!-- <el-form-item label="值班分队1指挥员ID" prop="detachmentonePeopleId">
  534. <el-input v-model="form.detachmentonePeopleId" placeholder="请输入值班分队1指挥员ID" />
  535. </el-form-item>-->
  536. <el-form-item
  537. label="值班分队1指挥员电话"
  538. prop="detachmentonePeoplePhone"
  539. >
  540. <el-input v-model="form.detachmentonePeoplePhone" placeholder="" />
  541. </el-form-item>
  542. <el-form-item label="值班分队2" prop="detachmentwoName">
  543. <el-select
  544. v-model="form.detachmentwoName"
  545. @change="detachmentwoNamechange"
  546. clearable
  547. placeholder=""
  548. >
  549. <el-option
  550. v-for="dict in deptOptions"
  551. :key="dict.deptId"
  552. :label="dict.deptName"
  553. :value="dict"
  554. ></el-option>
  555. </el-select>
  556. </el-form-item>
  557. <!-- <el-form-item label="值班分队2ID" prop="detachmentwoId">
  558. <el-input v-model="form.detachmentwoId" placeholder="请输入值班分队2ID" />
  559. </el-form-item>-->
  560. <el-form-item label="值班分队2人数" prop="detachmentwoNumber">
  561. <!-- <el-input-number v-model="form.detachmentwoNumber" controls-position="right" :min="0" /> -->
  562. <el-input
  563. v-model="form.detachmentwoNumber"
  564. type="number"
  565. :min="0"
  566. placeholder=""
  567. />
  568. <!-- <el-input
  569. v-model="form.detachmentwoNumber"
  570. type="number"
  571. placeholder="请输入值班分队2人数"
  572. />-->
  573. </el-form-item>
  574. <el-form-item label="值班分队2指挥员" prop="detachmentwoPeopleName">
  575. <el-select
  576. v-model="form.detachmentwoPeopleName"
  577. filterable
  578. clearable
  579. placeholder=""
  580. @change="detachmentwoPeopleNamefun"
  581. >
  582. <el-option
  583. v-for="item in rylist"
  584. :key="item.id"
  585. :label="item.name"
  586. :value="item"
  587. ></el-option>
  588. </el-select>
  589. </el-form-item>
  590. <!-- <el-form-item label="值班分队2指挥员ID" prop="detachmentwoPeopleId">
  591. <el-input v-model="form.detachmentwoPeopleId" placeholder="请输入值班分队2指挥员ID" />
  592. </el-form-item>-->
  593. <el-form-item
  594. label="值班分队2指挥员电话"
  595. prop="detachmentwoPeoplePhone"
  596. >
  597. <el-input v-model="form.detachmentwoPeoplePhone" placeholder="" />
  598. </el-form-item>
  599. <div class="jiben">备注</div>
  600. <el-form-item label prop="remarks">
  601. <el-input
  602. v-model="form.remarks"
  603. type="textarea"
  604. placeholder="请输入备注"
  605. />
  606. </el-form-item>
  607. </el-form>
  608. <div slot="footer" class="dialog-footer">
  609. <el-button type="primary" @click="submitForm">确 定</el-button>
  610. <el-button @click="cancel" size="btn">取 消</el-button>
  611. </div>
  612. </el-dialog>
  613. </div>
  614. </template>
  615. <script>
  616. import {
  617. listBasedutyinfo,
  618. getBasedutyinfo,
  619. delBasedutyinfo,
  620. addBasedutyinfo,
  621. updateBasedutyinfo,
  622. exportBasedutyinfo,
  623. rllist,
  624. listPeople,
  625. getDept,
  626. } from "@/api/combatduty/basedutyinfo";
  627. export default {
  628. name: "Basedutyinfo",
  629. data() {
  630. return {
  631. // 遮罩层
  632. loading: true,
  633. // 导出遮罩层
  634. exportLoading: false,
  635. // 选中数组
  636. ids: [],
  637. // 非单个禁用
  638. single: true,
  639. // 非多个禁用
  640. multiple: true,
  641. // 显示搜索条件
  642. showSearch: true,
  643. // 总条数
  644. total: 0,
  645. // 基地值班表格数据
  646. basedutyinfoList: [],
  647. // 弹出层标题
  648. title: "",
  649. // 是否显示弹出层
  650. open: false,
  651. // 查询参数
  652. queryParams: {
  653. pageNum: 1,
  654. pageSize: 10,
  655. attendedTime: null,
  656. chiefDutyName: null,
  657. chiefDutyId: null,
  658. chiefDutyPhone: null,
  659. combatDutyName: null,
  660. combatDutyId: null,
  661. combatDutyPhone: null,
  662. dutyOffierName: null,
  663. dutyOffierId: null,
  664. dutyOffierPhone: null,
  665. detachmentoneName: null,
  666. detachmentoneId: null,
  667. detachmentoneNumber: null,
  668. detachmentonePeopleName: null,
  669. detachmentonePeopleId: null,
  670. detachmentonePeoplePhone: null,
  671. detachmentwoName: null,
  672. detachmentwoId: null,
  673. detachmentwoNumber: null,
  674. detachmentwoPeopleName: null,
  675. detachmentwoPeopleId: null,
  676. detachmentwoPeoplePhone: null,
  677. remarks: null,
  678. type: null,
  679. },
  680. // 表单参数
  681. form: {},
  682. // 表单校验
  683. rules: {},
  684. //人员数据
  685. rylist: [],
  686. //单位数据
  687. deptOptions: [],
  688. qdflg: null,
  689. };
  690. },
  691. created() {
  692. this.getList();
  693. this.gettreeselect();
  694. this.getrylist();
  695. },
  696. methods: {
  697. //获取人员
  698. getrylist() {
  699. listPeople().then((res) => {
  700. if (res.code == 200) {
  701. this.rylist = res.rows;
  702. }
  703. });
  704. },
  705. gettreeselect() {
  706. getDept().then((res) => {
  707. console.log(res);
  708. if (res.code == 200) {
  709. this.deptOptions = res.data;
  710. }
  711. });
  712. },
  713. //值班一队
  714. // detachmentoneIdFormat(row, column) {
  715. // var deptName = "";
  716. // this.deptOptions.map(item => {
  717. // if (item.deptId == row.detachmentoneId) {
  718. // deptName = item.deptName;
  719. // }
  720. // });
  721. // return deptName;
  722. // },
  723. //值班二队
  724. // detachmentwoIdFormat(row, column) {
  725. // var deptName = "";
  726. // this.deptOptions.map(item => {
  727. // if (item.deptId == row.detachmentwoId) {
  728. // deptName = item.deptName;
  729. // }
  730. // });
  731. // return deptName;
  732. // },
  733. //首长
  734. chiefDutyIdFormat(row, column) {
  735. var deptName = "";
  736. this.rylist.map((item) => {
  737. if (item.id == row.chiefDutyId) {
  738. deptName = item.name;
  739. }
  740. });
  741. return deptName;
  742. },
  743. combatDutyIdFormat(row, column) {
  744. var deptName = "";
  745. this.rylist.map((item) => {
  746. if (item.id == row.combatDutyId) {
  747. deptName = item.name;
  748. }
  749. });
  750. return deptName;
  751. },
  752. detachmentonePeopleIdFormat(row, column) {
  753. var deptName = "";
  754. this.rylist.map((item) => {
  755. if (item.id == row.detachmentonePeopleId) {
  756. deptName = item.name;
  757. }
  758. });
  759. return deptName;
  760. },
  761. detachmentwoPeopleIdFormat(row, column) {
  762. var deptName = "";
  763. this.rylist.map((item) => {
  764. if (item.id == row.detachmentwoPeopleId) {
  765. deptName = item.name;
  766. }
  767. });
  768. return deptName;
  769. },
  770. dutyOffierIdFormat(row, column) {
  771. var deptName = "";
  772. this.rylist.map((item) => {
  773. if (item.id == row.chiefDutyId) {
  774. deptName = item.name;
  775. }
  776. });
  777. return deptName;
  778. },
  779. /** 查询基地值班列表 */
  780. getList() {
  781. this.loading = true;
  782. listBasedutyinfo(this.queryParams).then((response) => {
  783. this.basedutyinfoList = response.rows;
  784. this.total = response.total;
  785. this.loading = false;
  786. });
  787. },
  788. // 取消按钮
  789. cancel() {
  790. this.open = false;
  791. this.reset();
  792. },
  793. // 表单重置
  794. reset() {
  795. this.form = {
  796. id: null,
  797. attendedTime: null,
  798. chiefDutyName: null,
  799. chiefDutyId: null,
  800. chiefDutyPhone: null,
  801. combatDutyName: null,
  802. combatDutyId: null,
  803. combatDutyPhone: null,
  804. dutyOffierName: null,
  805. dutyOffierId: null,
  806. dutyOffierPhone: null,
  807. detachmentoneName: null,
  808. detachmentoneId: null,
  809. detachmentoneNumber: null,
  810. detachmentonePeopleName: null,
  811. detachmentonePeopleId: null,
  812. detachmentonePeoplePhone: null,
  813. detachmentwoName: null,
  814. detachmentwoId: null,
  815. detachmentwoNumber: null,
  816. detachmentwoPeopleName: null,
  817. detachmentwoPeopleId: null,
  818. detachmentwoPeoplePhone: null,
  819. remarks: null,
  820. };
  821. this.resetForm("form");
  822. },
  823. /** 搜索按钮操作 */
  824. handleQuery() {
  825. this.queryParams.pageNum = 1;
  826. this.getList();
  827. },
  828. /** 重置按钮操作 */
  829. resetQuery() {
  830. this.resetForm("queryForm");
  831. this.handleQuery();
  832. },
  833. // 多选框选中数据
  834. handleSelectionChange(selection) {
  835. this.ids = selection.map((item) => item.id);
  836. this.single = selection.length !== 1;
  837. this.multiple = !selection.length;
  838. },
  839. /** 新增按钮操作 */
  840. handleAdd() {
  841. this.reset();
  842. this.open = true;
  843. this.title = "添加基地值班";
  844. this.getrylist();
  845. this.gettreeselect();
  846. this.qdflg = 1;
  847. },
  848. /** 修改按钮操作 */
  849. handleUpdate(row) {
  850. this.reset();
  851. const id = row.id || this.ids;
  852. getBasedutyinfo(id).then((response) => {
  853. this.form = response.data;
  854. this.open = true;
  855. this.title = "修改基地值班";
  856. this.qdflg = 2;
  857. });
  858. },
  859. /** 提交按钮 */
  860. submitForm() {
  861. this.$refs["form"].validate((valid) => {
  862. if (valid) {
  863. if (this.form.id != null) {
  864. updateBasedutyinfo(this.form).then((response) => {
  865. this.$modal.msgSuccess("修改成功");
  866. this.open = false;
  867. this.getList();
  868. });
  869. } else {
  870. this.form.timequjian = this.form.attendedTime;
  871. this.form.attendedTime = this.form.attendedTime.join(",");
  872. addBasedutyinfo(this.form).then((response) => {
  873. this.$modal.msgSuccess("新增成功");
  874. this.open = false;
  875. this.getList();
  876. });
  877. }
  878. }
  879. });
  880. },
  881. /** 删除按钮操作 */
  882. handleDelete(row) {
  883. const ids = row.id || this.ids;
  884. this.$modal
  885. .confirm("是否确认删除该数据项?")
  886. .then(function () {
  887. return delBasedutyinfo(ids);
  888. })
  889. .then(() => {
  890. this.getList();
  891. this.$modal.msgSuccess("删除成功");
  892. })
  893. .catch(() => {});
  894. },
  895. /** 导出按钮操作 */
  896. handleExport() {
  897. const queryParams = this.queryParams;
  898. this.$modal
  899. .confirm("是否确认导出所有基地值班数据项?")
  900. .then(() => {
  901. this.exportLoading = true;
  902. return exportBasedutyinfo(queryParams);
  903. })
  904. .then((response) => {
  905. this.$download.name(response.msg);
  906. this.exportLoading = false;
  907. })
  908. .catch(() => {});
  909. },
  910. //值班分类
  911. caoZuoTypefun() {
  912. this.getList();
  913. },
  914. //首长电话
  915. chiefDutyNamefun(val) {
  916. this.form.chiefDutyId = val.id;
  917. this.form.chiefDutyName = val.name;
  918. this.form.chiefDutyPhone = val.phone;
  919. },
  920. //作战值班电话
  921. combatDutyNamefun(val) {
  922. this.form.combatDutyId = val.id;
  923. this.form.combatDutyName = val.name;
  924. this.form.combatDutyPhone = val.phone;
  925. },
  926. //总值班员
  927. dutyOffierNamefun(val) {
  928. this.form.dutyOffierId = val.id;
  929. this.form.dutyOffierName = val.name;
  930. this.form.dutyOffierPhone = val.phone;
  931. },
  932. //值班分队1指挥员
  933. detachmentonePeopleNamefun(val) {
  934. this.form.detachmentonePeopleId = val.id;
  935. this.form.detachmentonePeopleName = val.name;
  936. this.form.detachmentonePeoplePhone = val.phone;
  937. },
  938. //值班分队2指挥员
  939. detachmentwoPeopleNamefun(val) {
  940. this.form.detachmentwoPeopleId = val.id;
  941. this.form.detachmentwoPeopleName = val.name;
  942. this.form.detachmentwoPeoplePhone = val.phone;
  943. },
  944. detachmentoneNamechange(val) {
  945. this.form.detachmentoneId = val.deptId;
  946. this.form.detachmentoneName = val.deptName;
  947. },
  948. detachmentwoNamechange(val) {
  949. this.form.detachmentwoId = val.deptId;
  950. this.form.detachmentwoName = val.deptName;
  951. },
  952. },
  953. };
  954. </script>
  955. <style scoped>
  956. ::v-deep .el-dialog {
  957. width: 1150px !important;
  958. background-color: #004d86;
  959. }
  960. ::v-deep .el-dialog__header {
  961. border-bottom: 1px solid #718a9d;
  962. }
  963. ::v-deep .el-dialog__title {
  964. color: #fff;
  965. font: 18px;
  966. }
  967. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  968. color: #fff;
  969. }
  970. .el-form-item ::v-deep .el-input__inner {
  971. width: 200px;
  972. height: 36px;
  973. background: transparent;
  974. color: #fff !important;
  975. border: 1px solid #fff !important;
  976. }
  977. .el-select-dropdown__item {
  978. /* background-color: white; */
  979. color: #000 !important;
  980. }
  981. ::v-deep .el-date-editor.el-input {
  982. width: 200px;
  983. height: 36px;
  984. }
  985. .pictureUploading-img img {
  986. width: 60px;
  987. height: 210px;
  988. margin-right: 10px;
  989. }
  990. ::v-deep .el-upload--picture-card {
  991. height: 210px;
  992. width: 170px;
  993. line-height: 210px;
  994. background-image: url("../../../assets/images/头像.png");
  995. background-repeat: no-repeat;
  996. background-size: 100% 100%;
  997. }
  998. ::v-deep .el-upload--picture-card .el-icon-plus {
  999. display: none;
  1000. }
  1001. .el-upload--picture-card /deep/ .el-upload--picture-card i {
  1002. font-size: 48px;
  1003. }
  1004. ::v-deep .el-upload__tip {
  1005. display: none;
  1006. }
  1007. ::v-deep .el-textarea__inner {
  1008. width: 1070px;
  1009. height: 104px;
  1010. }
  1011. .addspan {
  1012. width: 30px;
  1013. height: 30px;
  1014. display: inline-block;
  1015. background-color: #1c86e1;
  1016. line-height: 30px;
  1017. text-align: center;
  1018. font-size: 16px;
  1019. cursor: pointer;
  1020. position: absolute;
  1021. right: 45px;
  1022. color: #fff;
  1023. }
  1024. .addspan2 {
  1025. width: 30px;
  1026. height: 30px;
  1027. display: inline-block;
  1028. background-color: #1c86e1;
  1029. line-height: 30px;
  1030. text-align: center;
  1031. font-size: 16px;
  1032. cursor: pointer;
  1033. position: absolute;
  1034. right: 10px;
  1035. color: #fff;
  1036. }
  1037. .shanchuspan {
  1038. width: 30px;
  1039. height: 30px;
  1040. display: inline-block;
  1041. background-color: #ff4949;
  1042. line-height: 30px;
  1043. text-align: center;
  1044. font-size: 14px;
  1045. cursor: pointer;
  1046. position: absolute;
  1047. right: 10px;
  1048. color: #fff;
  1049. }
  1050. .el-select-dropdown__item:hover {
  1051. color: #1c86e1;
  1052. }
  1053. .el-select-dropdown__item {
  1054. color: #fff;
  1055. }
  1056. .el-tree {
  1057. background-color: #00365f;
  1058. color: #fff;
  1059. }
  1060. ::v-deep .el-tree-node__content:hover {
  1061. color: #1c86e1;
  1062. }
  1063. ::v-deep .el-upload-list--picture-card .el-upload-list__item {
  1064. height: 210px;
  1065. width: 170px;
  1066. }
  1067. .dadui {
  1068. height: 40px;
  1069. background: #003156;
  1070. /* border-bottom: 1px solid #718A9D ; */
  1071. background-image: url(../../../images/矩形底部边框.png);
  1072. background-repeat: no-repeat;
  1073. background-position: 0px 39px;
  1074. font-size: 16px;
  1075. color: #1d96ff;
  1076. }
  1077. .dadui img {
  1078. margin: 10px 10px 0px 10px;
  1079. }
  1080. .data {
  1081. height: 40px;
  1082. background: #003156;
  1083. margin-bottom: 12px;
  1084. color: #fff;
  1085. display: flex;
  1086. font-size: 13px;
  1087. line-height: 25px;
  1088. position: relative;
  1089. }
  1090. .el-tree {
  1091. padding: 10px;
  1092. background: #003156;
  1093. color: #fff;
  1094. }
  1095. .data p {
  1096. position: absolute;
  1097. top: -5px;
  1098. left: 15px;
  1099. }
  1100. .data .a1 {
  1101. width: 128px;
  1102. height: 26px;
  1103. background: rgba(23, 74, 112, 0.4);
  1104. border-radius: 13px;
  1105. position: absolute;
  1106. top: 7px;
  1107. left: 60px;
  1108. }
  1109. ::v-deep .data .el-date-editor.el-input {
  1110. width: 100%;
  1111. border: none;
  1112. }
  1113. ::v-deep .data .el-input__inner {
  1114. width: 100% !important;
  1115. border: none;
  1116. }
  1117. ::v-deep .data .el-input--medium .el-input__icon {
  1118. line-height: 36px;
  1119. position: absolute;
  1120. right: -223px;
  1121. top: 2px;
  1122. }
  1123. ::v-deep .data .el-input__inner {
  1124. background-color: transparent;
  1125. color: #fff;
  1126. text-align: center;
  1127. margin-top: 2px;
  1128. }
  1129. ::v-deep .data .el-input__suffix {
  1130. position: absolute;
  1131. right: 281px;
  1132. }
  1133. ::v-deep
  1134. .el-tree--highlight-current
  1135. .el-tree-node.is-current
  1136. > .el-tree-node__content {
  1137. color: #00365f !important;
  1138. /* background-color: #003156 !important; */
  1139. }
  1140. ::v-deep .el-range-input {
  1141. background: #004d86;
  1142. color: #fff;
  1143. font-size: 12px;
  1144. }
  1145. ::v-deep .el-range-separator {
  1146. color: #fff;
  1147. font-size: 12px;
  1148. }
  1149. ::v-deep .el-input-number__increase {
  1150. background-color: transparent !important;
  1151. border: none;
  1152. color: #cccccc;
  1153. border-bottom: none !important;
  1154. }
  1155. ::v-deep .el-input-number__decrease {
  1156. background-color: transparent !important;
  1157. border: none !important;
  1158. color: #cccccc;
  1159. }
  1160. ::v-deep .el-dialog__body {
  1161. padding: 30px 0px 0px 40px !important;
  1162. }
  1163. ::v-deep .el-dialog__footer {
  1164. margin-right: 20px !important;
  1165. }
  1166. .isSubmit {
  1167. margin-left: 40% !important;
  1168. margin-right: 30%;
  1169. margin-bottom: 5px;
  1170. padding-bottom: 5px;
  1171. }
  1172. .el-radio-button {
  1173. width: 122px !important;
  1174. height: 30px !important;
  1175. line-height: 30px !important;
  1176. border: none !important;
  1177. }
  1178. ::v-deep .el-radio-button__inner {
  1179. width: 120px !important;
  1180. height: 30px !important;
  1181. line-height: 8px !important;
  1182. background: #196299;
  1183. border: none;
  1184. color: #fff;
  1185. line-height: 12px !important;
  1186. }
  1187. ::v-deep .el-radio-button:first-child .el-radio-button__inner {
  1188. border-left: none !important;
  1189. }
  1190. ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
  1191. color: #ffffff;
  1192. background-color: #006cff !important;
  1193. border-color: #006cff !important;
  1194. -webkit-box-shadow: -1px 0 0 0 #006cff !important;
  1195. box-shadow: -1px 0 0 0 #006cff !important;
  1196. line-height: 12px !important;
  1197. }
  1198. /* 将水平线设为红色: */
  1199. hr {
  1200. border: none;
  1201. height: 1px;
  1202. background-color: rgba(204, 204, 204, 0.5);
  1203. margin-bottom: 15px;
  1204. }
  1205. </style>