index.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091
  1. <template>
  2. <div class="app-container">
  3. <div class="box-lfet">
  4. <div class="data">
  5. <p>日期</p>
  6. <div class="a1"></div>
  7. <el-date-picker
  8. v-model="tiem"
  9. type="date"
  10. :editable="false"
  11. placeholder="选择日期"
  12. value-format="yyyy-MM-dd"
  13. @change="shiJian"
  14. >
  15. </el-date-picker>
  16. </div>
  17. <div class="dadui">
  18. <img src="../../../images/星星.png" alt="" />
  19. 单位
  20. </div>
  21. <div class="tree">
  22. <el-tree
  23. class="userAgrees"
  24. style="height: calc(100vh - 230px); overflow: auto"
  25. :data="deptOptions"
  26. :props="defaultProps"
  27. @node-click="handleNodeClick"
  28. default-expand-all
  29. highlight-current
  30. :expand-on-click-node="false"
  31. ></el-tree>
  32. </div>
  33. </div>
  34. <div class="box-right">
  35. <!-- 搜索条件区域 -->
  36. <el-form
  37. :model="queryParams"
  38. ref="queryForm"
  39. :inline="true"
  40. v-show="showSearch"
  41. label-width="68px"
  42. >
  43. </el-form>
  44. <!-- 添加,删除 -->
  45. <el-row :gutter="10" class="mb8">
  46. <el-col :span="1.5">
  47. <el-button
  48. type="primary"
  49. plain
  50. icon="el-icon-plus"
  51. size="mini"
  52. @click="handleAdd"
  53. v-hasPermi="['grassrootsregistration:bdgldiary:add']"
  54. >新增</el-button
  55. >
  56. </el-col>
  57. <div class="shuJu" @click="dengJI">
  58. <span class="box44 public"> 当前数据为 : {{ tiems }}</span>
  59. <span class="box5 public">
  60. 已登记部门 : {{ registrationData.yiShenPi }}</span
  61. >
  62. <span class="box6">
  63. 未登记部门 : {{ registrationData.weiShenPi }}</span
  64. >
  65. </div>
  66. <!-- <el-col :span="1.5">
  67. <el-button
  68. type="success"
  69. plain
  70. icon="el-icon-edit"
  71. size="mini"
  72. :disabled="single"
  73. @click="handleUpdate"
  74. v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
  75. >修改</el-button
  76. >
  77. </el-col>
  78. <el-col :span="1.5">
  79. <el-button
  80. type="danger"
  81. plain
  82. icon="el-icon-delete"
  83. size="mini"
  84. :disabled="multiple"
  85. @click="handleDelete"
  86. v-hasPermi="['grassrootsregistration:bdgldiary:remove']"
  87. >删除</el-button
  88. >
  89. </el-col>
  90. <el-col :span="1.5">
  91. <el-button
  92. type="warning"
  93. plain
  94. icon="el-icon-download"
  95. size="mini"
  96. :loading="exportLoading"
  97. @click="handleExport"
  98. v-hasPermi="['grassrootsregistration:bdgldiary:export']"
  99. >导出</el-button
  100. >
  101. </el-col> -->
  102. </el-row>
  103. <!-- 搜索结果区域 -->
  104. <el-table
  105. v-loading="loading"
  106. :data="bdgldiaryList"
  107. @selection-change="handleSelectionChange"
  108. :header-cell-style="{ background: '#003C69', color: 'white' }"
  109. >
  110. <el-table-column type="selection" width="55" align="center" />
  111. <!-- <el-table-column label="序号" align="center" prop="id" /> -->
  112. <el-table-column label="序号" type="index" width="50" align="center">
  113. <template scope="scope">
  114. <span>{{
  115. (queryParams.pageNum - 1) * queryParams.pageSize +
  116. scope.$index +
  117. 1
  118. }}</span>
  119. </template>
  120. </el-table-column>
  121. <el-table-column label="单位" align="center" prop="unitName" />
  122. <el-table-column label="值班人员" align="center" prop="peopleName" />
  123. <el-table-column
  124. label="值班日期"
  125. align="center"
  126. prop="diaryTime"
  127. width="180"
  128. :editable="false"
  129. >
  130. <template slot-scope="scope">
  131. <span>{{ parseTime(scope.row.diaryTime, "{y}-{m}-{d}") }}</span>
  132. </template>
  133. </el-table-column>
  134. <el-table-column label="编制干部" align="center" prop="orgcadre" />
  135. <el-table-column label="编制战士" align="center" prop="orgsoldier" />
  136. <el-table-column label="编制文职" align="center" prop="orgcivilian" />
  137. <el-table-column label="审批" align="center" prop="examine">
  138. <template slot-scope="scope">
  139. <span v-if="scope.row.examine == '1'" style="color: #67c23a"
  140. >已审批</span
  141. >
  142. <span v-else style="color: #ff4949">未审批</span>
  143. </template>
  144. </el-table-column>
  145. <el-table-column
  146. width="250"
  147. label="操作"
  148. align="center"
  149. class-name="small-padding fixed-width"
  150. >
  151. <template slot-scope="scope">
  152. <el-button
  153. v-if="scope.row.common == '1'"
  154. size="btd"
  155. type="text"
  156. @click="handleChakans(scope.row)"
  157. v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
  158. ><span class="chakan">审批</span></el-button
  159. >
  160. <el-button
  161. size="btk"
  162. type="text"
  163. @click="handleChakan(scope.row)"
  164. v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
  165. ><span class="chakan">查看</span></el-button
  166. >
  167. <el-button
  168. size="btu"
  169. type="text"
  170. @click="handleUpdate(scope.row)"
  171. v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
  172. ><span class="edit">修改</span></el-button
  173. >
  174. <el-button
  175. size="btd"
  176. type="text"
  177. @click="handleDelete(scope.row)"
  178. v-hasPermi="['grassrootsregistration:bdgldiary:remove']"
  179. ><span class="delete">删除</span></el-button
  180. >
  181. </template>
  182. </el-table-column>
  183. </el-table>
  184. <pagination
  185. v-show="total > 0"
  186. :total="total"
  187. :page.sync="queryParams.pageNum"
  188. :limit.sync="queryParams.pageSize"
  189. @pagination="getList"
  190. />
  191. <!-- 添加或修改要事日记对话框 -->
  192. <el-dialog
  193. :title="title"
  194. :visible.sync="open"
  195. width="1060px"
  196. append-to-body
  197. :close-on-click-modal="false"
  198. custom-class="userDig"
  199. >
  200. <div class="userAgree">
  201. <el-form
  202. ref="form"
  203. :model="form"
  204. :rules="rules"
  205. label-width="80px"
  206. :inline="true"
  207. >
  208. <div class="jiben">基本信息</div>
  209. <el-form-item label="单位" prop="unitId">
  210. <treeselect
  211. @select="selectPeo"
  212. v-model="form.unitId"
  213. :options="rese"
  214. placeholder="请选择单位"
  215. />
  216. </el-form-item>
  217. <el-form-item label="值班人员" prop="peopleId">
  218. <el-select
  219. v-model="form.peopleName"
  220. placeholder="请输入单位"
  221. filterable
  222. clearable
  223. @change="btn"
  224. >
  225. <el-option
  226. :label="item.name"
  227. v-for="(item, i) in renYuan"
  228. :key="i"
  229. :value="item"
  230. class="input_xiala"
  231. ></el-option>
  232. </el-select>
  233. </el-form-item>
  234. <el-form-item label="值班日期" prop="blogDate">
  235. <el-date-picker
  236. clearable
  237. size="small"
  238. v-model="form.blogDate"
  239. type="datetime"
  240. placeholder="选择值班日期"
  241. class="text"
  242. @change="blogDate"
  243. >
  244. </el-date-picker>
  245. </el-form-item>
  246. <el-form-item label="天气" prop="weather">
  247. <el-input v-model="form.weather" placeholder="请输入天气" />
  248. </el-form-item>
  249. <el-form-item label="值班首长" prop="lead">
  250. <el-select
  251. v-model="form.lead"
  252. filterable
  253. placeholder="请选择首长"
  254. clearable
  255. >
  256. <el-option
  257. :label="item.nickName"
  258. v-for="(item, i) in shouZhang"
  259. :key="i"
  260. :value="item.userId"
  261. class="input_xiala"
  262. ></el-option>
  263. </el-select>
  264. </el-form-item>
  265. <div class="jiben">实力情况</div>
  266. <el-form-item label="编制干部" prop="orgcadre">
  267. <el-input-number
  268. v-model="form.orgcadre"
  269. controls-position="right"
  270. :min="0"
  271. :max="99999999"
  272. ></el-input-number>
  273. </el-form-item>
  274. <el-form-item label="编制战士" prop="orgsoldier">
  275. <!-- <el-input v-model="form.orgsoldier" placeholder="请输入编制战士" /> -->
  276. <el-input-number
  277. v-model="form.orgsoldier"
  278. controls-position="right"
  279. :min="0"
  280. :max="99999999"
  281. ></el-input-number>
  282. </el-form-item>
  283. <el-form-item label="编制文职" prop="orgcivilian">
  284. <!-- <el-input v-model="form.orgcivilian" placeholder="请输入编制文职" /> -->
  285. <el-input-number
  286. v-model="form.orgcivilian"
  287. controls-position="right"
  288. :min="0"
  289. :max="99999999"
  290. ></el-input-number>
  291. </el-form-item>
  292. <el-form-item label="现有干部" prop="nowcadre">
  293. <!-- <el-input v-model="form.nowcadre" placeholder="请输入现有干部" /> -->
  294. <el-input-number
  295. v-model="form.nowcadre"
  296. controls-position="right"
  297. :min="0"
  298. :max="99999999"
  299. ></el-input-number>
  300. </el-form-item>
  301. <el-form-item label="现有战士" prop="nowsoldier">
  302. <el-input-number
  303. v-model="form.nowsoldier"
  304. controls-position="right"
  305. :min="0"
  306. :max="99999999"
  307. ></el-input-number>
  308. </el-form-item>
  309. <el-form-item label="现有文职" prop="nowcivilian">
  310. <!-- <el-input v-model="form.nowcivilian" placeholder="请输入现有文职" /> -->
  311. <el-input-number
  312. v-model="form.nowcivilian"
  313. controls-position="right"
  314. :min="0"
  315. :max="99999999"
  316. ></el-input-number>
  317. </el-form-item>
  318. <div class="jiben">训练、教育或者执行其他任务情况</div>
  319. <div class="box" v-for="(item, i) in xunlian" :key="i">
  320. <table
  321. width="920"
  322. cellspacing="0"
  323. align="center"
  324. border="1"
  325. style="
  326. border-bottom: white;
  327. border-collapse: collapse;
  328. mso-border-left-alt: 0.5pt solid windowtext;
  329. mso-border-top-alt: 0.5pt solid windowtext;
  330. mso-border-right-alt: 0.5pt solid windowtext;
  331. mso-border-bottom-alt: 0.5pt solid windowtext;
  332. mso-border-insideh: 0.5pt solid windowtext;
  333. mso-border-insidev: 0.5pt solid windowtext;
  334. mso-padding-alt: 0pt 0pt 0pt 0pt;
  335. "
  336. bordercolor="white"
  337. >
  338. <tr align="center">
  339. <td width="200" height="40">区分</td>
  340. <td colspan="2" width="420">内容</td>
  341. <td width="100">应到人数</td>
  342. <td width="100">实到人数</td>
  343. <td width="100">到课率</td>
  344. </tr>
  345. <tr align="center">
  346. <td height="60">
  347. <el-input
  348. v-model="item.dateline"
  349. placeholder="请输入时间"
  350. ></el-input>
  351. </td>
  352. <td rowspan="2" colspan="2">
  353. <el-input
  354. type="textarea"
  355. :rows="1"
  356. placeholder="请输入内容"
  357. v-model="item.centertext"
  358. :autosize="true"
  359. resize="none"
  360. >
  361. {{ item.contents }}
  362. </el-input>
  363. </td>
  364. <td>
  365. <el-input
  366. v-model="item.shouldArrive"
  367. placeholder="应到人数"
  368. @blur="yinDao"
  369. oninput="value=value.replace(/[^\d]/g,'')"
  370. ></el-input>
  371. </td>
  372. <td>
  373. <el-input
  374. v-model="item.realTo"
  375. placeholder="实到人数"
  376. @blur="shiDao"
  377. oninput="value=value.replace(/[^\d]/g,'')"
  378. ></el-input>
  379. </td>
  380. <td>
  381. <el-input
  382. v-model="item.percentage"
  383. placeholder="到课率"
  384. readonly
  385. ></el-input>
  386. </td>
  387. </tr>
  388. </table>
  389. </div>
  390. <div class="jiben">公差勤务</div>
  391. <el-form-item prop="tolerance">
  392. <div class="box4">
  393. <el-input
  394. v-model="form.tolerance"
  395. type="textarea"
  396. placeholder="请输入内容"
  397. autosize
  398. />
  399. </div>
  400. </el-form-item>
  401. <div class="jiben">人员及装备变动</div>
  402. <el-form-item prop="transfer">
  403. <div class="box4">
  404. <el-input
  405. v-model="form.transfer"
  406. type="textarea"
  407. placeholder="请输入内容"
  408. autosize
  409. />
  410. </div>
  411. </el-form-item>
  412. <div class="jiben">装备变动</div>
  413. <el-form-item prop="equip">
  414. <div class="box4">
  415. <el-input
  416. v-model="form.equip"
  417. type="textarea"
  418. placeholder="请输入内容"
  419. autosize
  420. />
  421. </div>
  422. </el-form-item>
  423. <div class="jiben">武器装备、军容风纪、内务卫生检查情况</div>
  424. <el-form-item prop="internal">
  425. <div class="box4">
  426. <el-input
  427. v-model="form.internal"
  428. type="textarea"
  429. placeholder="请输入内容"
  430. autosize
  431. />
  432. </div>
  433. </el-form-item>
  434. <div class="jiben">配班情况</div>
  435. <el-form-item label="值班组织人" prop="dutylead">
  436. <el-select
  437. v-model="form.dutylead"
  438. clearable
  439. placeholder="请选择值班组织人"
  440. >
  441. <el-option
  442. :label="item.name"
  443. :value="item.name"
  444. v-for="(item, i) in renYuan"
  445. :key="i"
  446. class="input_xiala"
  447. ></el-option>
  448. </el-select>
  449. </el-form-item>
  450. <el-form-item label="值班交班人" prop="dutya">
  451. <!-- <el-input v-model="form.dutya" placeholder="请输入值班交班人" /> -->
  452. <el-select
  453. v-model="form.dutya"
  454. clearable
  455. placeholder="请选择值班交班人"
  456. >
  457. <el-option
  458. :label="item.name"
  459. :value="item.name"
  460. v-for="(item, i) in renYuan"
  461. :key="i"
  462. class="input_xiala"
  463. ></el-option>
  464. </el-select>
  465. </el-form-item>
  466. <el-form-item label="值班接班人" prop="dutyb">
  467. <!-- <el-input v-model="form.dutyb" placeholder="请输入值班接班人" /> -->
  468. <el-select
  469. v-model="form.dutyb"
  470. placeholder="请选择值班接班人"
  471. clearable
  472. >
  473. <el-option
  474. :label="item.name"
  475. :value="item.name"
  476. v-for="(item, i) in renYuan"
  477. :key="i"
  478. class="input_xiala"
  479. ></el-option>
  480. </el-select>
  481. </el-form-item>
  482. <el-form-item label="值日交班人" prop="dutyc">
  483. <!-- <el-input v-model="form.dutyc" placeholder="请输入值日交班人" /> -->
  484. <el-select
  485. v-model="form.dutyc"
  486. clearable
  487. placeholder="请选择值日交班人"
  488. >
  489. <el-option
  490. :label="item.name"
  491. :value="item.name"
  492. v-for="(item, i) in renYuan"
  493. :key="i"
  494. class="input_xiala"
  495. ></el-option>
  496. </el-select>
  497. </el-form-item>
  498. <el-form-item label="值日接班人" prop="dutyd">
  499. <!-- <el-input v-model="form.dutyd" placeholder="请输入值日接班人" /> -->
  500. <el-select
  501. v-model="form.dutyd"
  502. clearable
  503. placeholder="请选择值日接班人"
  504. >
  505. <el-option
  506. :label="item.name"
  507. :value="item.name"
  508. v-for="(item, i) in renYuan"
  509. :key="i"
  510. class="input_xiala"
  511. ></el-option>
  512. </el-select>
  513. </el-form-item>
  514. <el-form-item label="厨房交班人" prop="dutye">
  515. <!-- <el-input v-model="form.dutye" placeholder="请输入厨房交班人" /> -->
  516. <el-select
  517. v-model="form.dutye"
  518. clearable
  519. placeholder="请选择厨房交班人"
  520. >
  521. <el-option
  522. :label="item.name"
  523. :value="item.name"
  524. v-for="(item, i) in renYuan"
  525. :key="i"
  526. class="input_xiala"
  527. ></el-option>
  528. </el-select>
  529. </el-form-item>
  530. <el-form-item label="厨房接班人" prop="dutyf">
  531. <el-select
  532. v-model="form.dutyf"
  533. clearable
  534. placeholder="请选择厨房接班人"
  535. >
  536. <el-option
  537. :label="item.name"
  538. :value="item.name"
  539. v-for="(item, i) in renYuan"
  540. :key="i"
  541. class="input_xiala"
  542. ></el-option>
  543. </el-select>
  544. </el-form-item>
  545. <el-form-item label="交接时间" prop="dutyDate">
  546. <el-date-picker
  547. clearable
  548. size="small"
  549. v-model="form.dutyDate"
  550. type="date"
  551. value-format="yyyy-MM-dd"
  552. placeholder="请选择交接时间"
  553. >
  554. </el-date-picker>
  555. </el-form-item>
  556. <div class="jiben">值班交接情况</div>
  557. <el-form-item prop="dutyinfoA">
  558. <div class="box4">
  559. <el-input
  560. v-model="form.dutyinfoa"
  561. type="textarea"
  562. placeholder="请输入内容"
  563. autosize
  564. />
  565. </div>
  566. </el-form-item>
  567. <div class="jiben">值日交接情况</div>
  568. <el-form-item prop="dutyinfoC">
  569. <div class="box4">
  570. <el-input
  571. v-model="form.dutyinfoc"
  572. type="textarea"
  573. placeholder="请输入内容"
  574. autosize
  575. />
  576. </div>
  577. </el-form-item>
  578. <div class="jiben">厨房交接情况</div>
  579. <el-form-item prop="dutyinfoE">
  580. <div class="box4">
  581. <el-input
  582. v-model="form.dutyinfoe"
  583. type="textarea"
  584. placeholder="请输入内容"
  585. autosize
  586. />
  587. </div>
  588. </el-form-item>
  589. <div class="jiben">病号处理情况</div>
  590. <el-form-item prop="invalid">
  591. <div class="box4">
  592. <el-input
  593. v-model="form.invalid"
  594. placeholder="请输入内容"
  595. type="textarea"
  596. autosize
  597. />
  598. </div>
  599. </el-form-item>
  600. <div class="jiben">上级通知、指示及其他重要事项</div>
  601. <el-form-item prop="notice">
  602. <div class="box4">
  603. <el-input
  604. v-model="form.notice"
  605. placeholder="请输入内容"
  606. type="textarea"
  607. autosize
  608. />
  609. </div>
  610. </el-form-item>
  611. <div class="jiben">查铺查哨</div>
  612. <div class="box3">
  613. <el-form v-for="(item1, e) in checkShop" :key="e">
  614. <div>
  615. <el-form-item label="" prop="">
  616. <el-input
  617. v-model="item1.peopleName"
  618. placeholder="检查人"
  619. ></el-input>
  620. </el-form-item>
  621. <el-form-item label="" prop="">
  622. <el-input
  623. v-model="item1.foremanName"
  624. placeholder="领班员"
  625. ></el-input>
  626. </el-form-item>
  627. <el-form-item label="" prop="">
  628. <el-input
  629. v-model="item1.sentryName"
  630. placeholder="哨兵姓名"
  631. ></el-input>
  632. </el-form-item>
  633. <el-form-item label="" prop="">
  634. <!-- <el-date-picker
  635. type="datetime"
  636. v-model="item1.examineDate"
  637. :editable="false"
  638. size="mini"
  639. placeholder="选择日期"
  640. value-format="yyyy-MM-dd-HH-mm"
  641. @change="chenge"
  642. :picker-options="pickerOptions"
  643. >
  644. </el-date-picker> -->
  645. <!-- <el-date-picker
  646. v-model="item1.examineDate"
  647. type="datetime"
  648. placeholder="选择日期时间"
  649. class="sun"
  650. >
  651. </el-date-picker> -->
  652. <el-time-picker
  653. v-model="item1.examineDate"
  654. :picker-options="{
  655. selectableRange: '00:00:00 - 23:59:59',
  656. }"
  657. placeholder="选择日期时间"
  658. value-format="HH:mm:ss"
  659. >
  660. </el-time-picker>
  661. </el-form-item>
  662. <el-form-item label="" prop="">
  663. <el-input
  664. v-model="item1.dialogue"
  665. placeholder="检查情况"
  666. ></el-input>
  667. </el-form-item>
  668. <el-form-item>
  669. <el-button
  670. type="primary"
  671. icon="el-icon-plus"
  672. size="mini"
  673. @click="addForms"
  674. v-if="e == checkShop.length - 1"
  675. ></el-button>
  676. <el-button
  677. type="danger"
  678. icon="el-icon-delete"
  679. size="mini"
  680. v-if="e > 0"
  681. @click="delForms(e)"
  682. ></el-button>
  683. </el-form-item>
  684. </div>
  685. </el-form>
  686. </div>
  687. <div class="jiben">临时来队亲属</div>
  688. <div class="box3">
  689. <div class="box4">
  690. <el-form v-for="(item1, i) in relatives" :key="i">
  691. <el-form-item label="" prop="">
  692. <el-select v-model="item1.peopleId" placeholder="军人姓名">
  693. <el-option
  694. v-for="item in renYuan"
  695. :key="item.id"
  696. :label="item.name"
  697. :value="item.id"
  698. class="input_xiala"
  699. >
  700. </el-option>
  701. </el-select>
  702. </el-form-item>
  703. <el-form-item label="" prop="">
  704. <el-input
  705. v-model="item1.name"
  706. placeholder="家属姓名"
  707. ></el-input>
  708. </el-form-item>
  709. <el-form-item label="" prop="">
  710. <el-input
  711. v-model="item1.relation"
  712. placeholder="关系"
  713. ></el-input>
  714. </el-form-item>
  715. <el-form-item label="" prop="">
  716. <!-- <el-date-picker
  717. v-model="item1.comeDate"
  718. type="date"
  719. :editable="false"
  720. size="mini"
  721. placeholder="来队时间"
  722. value-format="yyyy-MM-dd"
  723. >
  724. </el-date-picker> -->
  725. <el-time-picker
  726. v-model="item1.comeDate"
  727. :picker-options="{
  728. selectableRange: '00:00:00 - 23:59:59',
  729. }"
  730. placeholder="来队时间"
  731. value-format="HH:mm:ss"
  732. >
  733. </el-time-picker>
  734. </el-form-item>
  735. <el-form-item label="" prop="">
  736. <!-- <el-date-picker
  737. v-model="item1.leaveDate"
  738. type="date"
  739. :editable="false"
  740. size="mini"
  741. placeholder="离队时间"
  742. value-format="yyyy-MM-dd"
  743. >
  744. </el-date-picker> -->
  745. <el-time-picker
  746. v-model="item1.leaveDate"
  747. :picker-options="{
  748. selectableRange: '00:00:00 - 23:59:59',
  749. }"
  750. placeholder="离队时间"
  751. value-format="HH:mm:ss"
  752. >
  753. </el-time-picker>
  754. </el-form-item>
  755. <el-form-item>
  756. <el-button
  757. type="primary"
  758. icon="el-icon-plus"
  759. size="mini"
  760. @click="addFormss"
  761. v-if="i == relatives.length - 1"
  762. ></el-button>
  763. <el-button
  764. type="danger"
  765. icon="el-icon-delete"
  766. size="mini"
  767. v-if="i > 0"
  768. @click="delFormss(i)"
  769. ></el-button>
  770. </el-form-item>
  771. </el-form>
  772. </div>
  773. </div>
  774. </el-form>
  775. </div>
  776. <div slot="footer" class="dialog-footer">
  777. <el-button type="primary" @click="submitForm(1)">确 定</el-button>
  778. <el-button @click="resertwo" size="btn">重置</el-button>
  779. </div>
  780. </el-dialog>
  781. <!-- 查看 -->
  782. <el-dialog
  783. :visible.sync="menuRoleVisible"
  784. :title="title"
  785. append-to-body
  786. id="chakan"
  787. :close-on-click-modal="false"
  788. >
  789. <bdgldiary
  790. v-if="menuRoleVisible"
  791. ref="menuRole"
  792. :message="wordInfo"
  793. ></bdgldiary>
  794. <div slot="footer" class="dialog-footer" v-if="statusShen">
  795. <el-button type="primary" @click="queDing">通过</el-button>
  796. </div>
  797. </el-dialog>
  798. <!-- 数据查看弹出层 -->
  799. <el-dialog
  800. :visible.sync="dialogVisible"
  801. title="统计详情"
  802. append-to-body
  803. id="dialoges"
  804. :close-on-click-modal="false"
  805. >
  806. <div class="zuiDa">
  807. <div class="shuJuTime">当前数据为 : {{ tiems }}</div>
  808. <div class="jiben">已登记部门:{{ yishenpi }}个</div>
  809. <div class="boxxx">
  810. <div v-for="(item, i) in cg" :key="i" class="greed">
  811. <span class="greedss"> </span><span>{{ item }}</span>
  812. </div>
  813. </div>
  814. <!-- <span v-for="(item, i) in cg" :key="i" class="greed">{{ item }}</span> -->
  815. <div class="jiben">未登记部门:{{ weishenpi }}个</div>
  816. <div class="boxxx">
  817. <div v-for="(item, i) in sb" :key="i" class="red">
  818. <span class="greeds"> </span><span>{{ item }}</span>
  819. </div>
  820. </div>
  821. </div>
  822. </el-dialog>
  823. </div>
  824. </div>
  825. </template>
  826. <script>
  827. import bdgldiary from "@/components/look_word/bdgldiary.vue";
  828. import {
  829. listBdgldiary,
  830. getBdgldiary,
  831. delBdgldiary,
  832. addBdgldiary,
  833. updateBdgldiary,
  834. exportBdgldiary,
  835. exportBdgShuju,
  836. updateBdglShenPi,
  837. } from "@/api/grassrootsregistration/bdgldiary";
  838. import {
  839. getDept,
  840. getZhuChiRen,
  841. getUser,
  842. getShiLi,
  843. getXunLian,
  844. getWeiShu,
  845. getUsers,
  846. } from "@/api/grassrootsregistration/bdglmeeting";
  847. import { getDicts } from "@/api/system/dict/data";
  848. // 导入树形结构
  849. import Treeselect from "@riophae/vue-treeselect";
  850. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  851. import Cookies from "js-cookie";
  852. export default {
  853. components: { Treeselect, bdgldiary },
  854. name: "Bdgldiary",
  855. data() {
  856. return {
  857. // 审批状态
  858. statusShen: false,
  859. //查看页面
  860. menuRoleVisible: false,
  861. wordInfo: {},
  862. //判断关闭
  863. style: "2",
  864. // 获取首长
  865. shouZhang: [],
  866. // 人员组织
  867. renYuan: [],
  868. // 添加的树形单位
  869. rese: [],
  870. // 遮罩层
  871. loading: true,
  872. // 导出遮罩层
  873. exportLoading: false,
  874. // 选中数组
  875. ids: [],
  876. // 非单个禁用
  877. single: true,
  878. // 非多个禁用
  879. multiple: true,
  880. // 显示搜索条件
  881. showSearch: true,
  882. // 总条数
  883. total: 0,
  884. // 要事日记表格数据
  885. bdgldiaryList: [],
  886. // 弹出层标题
  887. title: "",
  888. // 是否显示弹出层
  889. open: false,
  890. // 查询参数
  891. queryParams: {
  892. pageNum: 1,
  893. pageSize: 10,
  894. unitId: null,
  895. peopleId: null,
  896. blogDate: null,
  897. weather: null,
  898. orgcadre: null,
  899. orgsoldier: null,
  900. orgcivilian: null,
  901. nowcadre: null,
  902. nowsoldier: null,
  903. nowcivilian: null,
  904. tolerance: null,
  905. transfer: null,
  906. equip: null,
  907. internal: null,
  908. dutylead: null,
  909. dutya: null,
  910. dutyb: null,
  911. dutyc: null,
  912. dutyd: null,
  913. dutye: null,
  914. dutyf: null,
  915. dutyinfoa: null,
  916. dutyinfoc: null,
  917. dutyinfoe: null,
  918. dutyDate: null,
  919. invalid: null,
  920. notice: null,
  921. lead: null,
  922. weekwork: null,
  923. examine: null,
  924. peopleId1: null,
  925. contents: null,
  926. },
  927. // 表单参数
  928. form: {},
  929. // 表单校验
  930. rules: {
  931. unitId: [
  932. { required: true, message: "单位名称不能为空", trigger: "blur" },
  933. ],
  934. peopleId: [
  935. // { required: true, message: "值班人员不能为空", trigger: "blur" },
  936. ],
  937. blogDate: [
  938. { required: true, message: "值班日期不能为空", trigger: "blur" },
  939. ],
  940. weather: [{ required: true, message: "天气不能为空", trigger: "blur" }],
  941. lead: [
  942. { required: true, message: "值班首长不能为空", trigger: "change" },
  943. ],
  944. orgcadre: [
  945. { required: true, message: "编制干部不能为空", trigger: "blur" },
  946. ],
  947. orgsoldier: [
  948. { required: true, message: "编制战士不能为空", trigger: "blur" },
  949. ],
  950. orgcivilian: [
  951. { required: true, message: "编制文职不能为空", trigger: "blur" },
  952. ],
  953. nowcadre: [
  954. { required: true, message: "现有干部不能为空", trigger: "blur" },
  955. ],
  956. nowsoldier: [
  957. { required: true, message: "现有战士不能为空", trigger: "blur" },
  958. ],
  959. nowcivilian: [
  960. { required: true, message: "现有文职不能为空", trigger: "blur" },
  961. ],
  962. },
  963. BdgDay: [],
  964. // 搜索人员
  965. Renyuan: [],
  966. // 字典类型查询
  967. dictType: {
  968. dictType: "yssp",
  969. },
  970. // 字典数据
  971. ziDian: [],
  972. //左侧树状
  973. deptOptions: null,
  974. //左侧时间选择
  975. pickerOptions: {
  976. disabledDate(time) {
  977. return time.getTime() > Date.now();
  978. },
  979. },
  980. // 树形配置
  981. defaultProps: {
  982. children: "children",
  983. label: "label",
  984. },
  985. // 组织人搜索列表00
  986. list: [],
  987. // 下拉选项显示隐藏
  988. xiaLa: false,
  989. //添加对话框查铺表格为空
  990. checkShop: [
  991. {
  992. peopleName: null,
  993. foremanName: null,
  994. sentryName: null,
  995. examineDate: null,
  996. dialogue: null,
  997. },
  998. ],
  999. //添加对话框来访人员表格为空
  1000. relatives: [
  1001. {
  1002. peopleId: null,
  1003. name: null,
  1004. relation: null,
  1005. comeDate: null,
  1006. leaveDate: null,
  1007. },
  1008. ],
  1009. // 临时来队亲属
  1010. relatives: [
  1011. {
  1012. peopleId: null,
  1013. name: null,
  1014. relation: null,
  1015. comeDate: null,
  1016. leaveDate: null,
  1017. },
  1018. ],
  1019. // 搜索时间保存
  1020. tiem: null,
  1021. // 训练情况
  1022. xunlian: [
  1023. {
  1024. dateline: null,
  1025. contents: null,
  1026. shouldArrive: null,
  1027. realTo: null,
  1028. percentage: null,
  1029. organizer: null,
  1030. },
  1031. ],
  1032. // 数据时间
  1033. DataTime: "",
  1034. // 右边登记数据
  1035. registrationData: {},
  1036. // 搜索时间的保存
  1037. timeDate: "",
  1038. // 数据查看的弹出层
  1039. dialogVisible: false,
  1040. // 获取成功对象
  1041. cg: {},
  1042. // 获取失败对象
  1043. sb: {},
  1044. // 获取登记部门数量
  1045. yishenpi: "",
  1046. // 获取未登记数量
  1047. weishenpi: "",
  1048. // 数据时间的保存
  1049. tiems: "",
  1050. centertext: null,
  1051. };
  1052. },
  1053. created() {
  1054. // if (Cookies.get("shuaxin") != "true") {
  1055. // window.location.reload();
  1056. // }
  1057. // Cookies.set("shuaxin", "true");
  1058. this.getList();
  1059. // 获取单位
  1060. this.getDept();
  1061. // 获取字典通过未通过
  1062. this.getdict();
  1063. // 获取外部部门树形
  1064. this.treeselect();
  1065. // 获取数据
  1066. this.getShuJu();
  1067. },
  1068. methods: {
  1069. // 点击数据盒子
  1070. dengJI() {
  1071. this.dialogVisible = true;
  1072. },
  1073. //审批按钮操作
  1074. handleChakans(row) {
  1075. // 是否隐藏按钮
  1076. this.opens = false;
  1077. this.statusShen = true;
  1078. const id = row.id || this.ids;
  1079. getBdgldiary(id).then((response) => {
  1080. if (new Date(response.data.blogDate).getDay() == 0) {
  1081. response.data.week = "星期日";
  1082. } else if (new Date(response.data.blogDate).getDay() == 1) {
  1083. response.data.week = "星期一";
  1084. } else if (new Date(response.data.blogDate).getDay() == 2) {
  1085. response.data.week = "星期二";
  1086. } else if (new Date(response.data.blogDate).getDay() == 3) {
  1087. response.data.week = "星期三";
  1088. } else if (new Date(response.data.blogDate).getDay() == 4) {
  1089. response.data.week = "星期四";
  1090. } else if (new Date(response.data.blogDate).getDay() == 5) {
  1091. response.data.week = "星期五";
  1092. } else if (new Date(response.data.blogDate).getDay() == 6) {
  1093. response.data.week = "星期六";
  1094. }
  1095. this.wordInfo = response.data;
  1096. this.title = "审批要事日记";
  1097. this.menuRoleVisible = true;
  1098. });
  1099. },
  1100. // 审批页面确定
  1101. queDing() {
  1102. this.wordInfo.examine = "1";
  1103. if (this.wordInfo.id != null) {
  1104. updateBdglShenPi(this.wordInfo).then((response) => {
  1105. this.menuRoleVisible = false;
  1106. this.getList();
  1107. this.getShuJu(this.timeDate);
  1108. this.$forceUpdate();
  1109. });
  1110. }
  1111. },
  1112. // 获取部门数据
  1113. getShuJu(data) {
  1114. exportBdgShuju(data).then((res) => {
  1115. this.DataTime = data;
  1116. this.registrationData = res;
  1117. this.cg = res.cg;
  1118. this.sb = res.sb;
  1119. this.yishenpi = res.yiShenPi;
  1120. this.weishenpi = res.weiShenPi;
  1121. this.tiems = res.time;
  1122. });
  1123. },
  1124. // 搜索时间触发
  1125. shiJian(data) {
  1126. this.queryParams.diaryTime = data;
  1127. this.timeDate = data;
  1128. this.getList();
  1129. this.getShuJu(data);
  1130. },
  1131. // 应到人数失去焦点触发
  1132. yinDao() {
  1133. this.xunlian.forEach((item) => {
  1134. if (item.shouldArrive != null && item.realTo != null) {
  1135. var str = ((item.realTo / item.shouldArrive) * 100).toFixed(2);
  1136. str += "%";
  1137. item.percentage = str;
  1138. }
  1139. });
  1140. },
  1141. // 实到人数失去焦点触发
  1142. shiDao() {
  1143. this.xunlian.forEach((item) => {
  1144. if (item.shouldArrive != null && item.realTo != null) {
  1145. var str = ((item.realTo / item.shouldArrive) * 100).toFixed(2);
  1146. str += "%";
  1147. item.percentage = str;
  1148. }
  1149. });
  1150. },
  1151. // 获取训练
  1152. XunLian(id, tiem) {
  1153. let y = tiem.getFullYear();
  1154. let m = tiem.getMonth() + 1;
  1155. m = m < 10 ? "0" + m : m;
  1156. let d = tiem.getDate();
  1157. d = d < 10 ? "0" + d : d;
  1158. let h = tiem.getHours();
  1159. h = h < 10 ? "0" + h : h;
  1160. let M = tiem.getMinutes();
  1161. M = M < 10 ? "0" + M : M;
  1162. let s = tiem.getSeconds();
  1163. s = s < 10 ? "0" + s : s;
  1164. let dateTime = y + "-" + m + "-" + d + " " + h + ":" + M + ":" + s;
  1165. getXunLian(id, dateTime).then((res) => {
  1166. console.log(res.data);
  1167. this.xunlian = res.data;
  1168. // for (var i = 0; i < res.data.length; i++) {
  1169. // res.data[i].centertext =
  1170. // res.data[i].startTime +
  1171. // "-" +
  1172. // res.data[i].endTime +
  1173. // " " +
  1174. // this.xunlian[i].contents +
  1175. // "(" +
  1176. // this.xunlian[i].organizer +
  1177. // ")";
  1178. // }
  1179. if (this.xunlian) {
  1180. for (var i = 0; i < this.xunlian.length; i++) {
  1181. this.xunlian[i].centertext =
  1182. this.xunlian[i].startTime +
  1183. "-" +
  1184. this.xunlian[i].endTime +
  1185. " " +
  1186. this.xunlian[i].contents +
  1187. "(" +
  1188. this.xunlian[i].organizer +
  1189. ")";
  1190. }
  1191. }
  1192. });
  1193. },
  1194. // 选中军人触发
  1195. junRen(val) {
  1196. this.relatives[0].peopleId = val.id;
  1197. this.relatives[0].peopleName = val.name;
  1198. },
  1199. /** 新增查询部门下拉树结构 */
  1200. getTreeselect() {
  1201. getDept().then((response) => {
  1202. this.rese = response.data;
  1203. });
  1204. },
  1205. // 增加对话框查铺
  1206. addForms() {
  1207. this.checkShop.push({
  1208. peopleName: null,
  1209. foremanName: null,
  1210. sentryName: null,
  1211. examineDate: null,
  1212. dialogue: null,
  1213. });
  1214. },
  1215. // 删除对话框查铺
  1216. delForms(i) {
  1217. this.checkShop.splice(i, 1);
  1218. },
  1219. //增加对话框临时来访人员
  1220. addFormss() {
  1221. this.relatives.push({
  1222. peopleId: null,
  1223. name: null,
  1224. relation: null,
  1225. comeDate: null,
  1226. leaveDate: null,
  1227. });
  1228. },
  1229. //删除对话框临时来访人员
  1230. delFormss(e) {
  1231. this.relatives.splice(e, 1);
  1232. },
  1233. // 获取外面部门树形
  1234. treeselect() {
  1235. getWeiShu().then((res) => {
  1236. this.deptOptions = res.data;
  1237. });
  1238. },
  1239. //外面树形选择搜索
  1240. handleNodeClick(data) {
  1241. this.queryParams.unitId = data.id;
  1242. // this.queryParams.IsUnit = "1";
  1243. this.getList();
  1244. },
  1245. // 选择值班人触发
  1246. btn(val) {
  1247. this.form.peopleId1 = val.id;
  1248. this.form.peopleName = val.name;
  1249. },
  1250. // 当选择单位时候重置人员
  1251. chongZhi() {
  1252. (this.form = {
  1253. peopleId: null,
  1254. lead: null,
  1255. dutyA: null,
  1256. dutyB: null,
  1257. dutyC: null,
  1258. dutyD: null,
  1259. dutyE: null,
  1260. dutyF: null,
  1261. dutylead: null,
  1262. }),
  1263. (this.relatives = [
  1264. {
  1265. peopleId: null,
  1266. },
  1267. ]);
  1268. },
  1269. // 当点击完成值班时间的选择发起请求
  1270. blogDate(data) {
  1271. // 判断是否全部选择
  1272. if (this.form.unitId !== null && this.form.blogDate !== null) {
  1273. this.XunLian(this.form.unitId, this.form.blogDate);
  1274. }
  1275. },
  1276. // 获取实力情况
  1277. getShiLiRen(id) {
  1278. getShiLi(id).then((res) => {
  1279. this.form.orgcadre = res.data.ganbu;
  1280. this.form.orgsoldier = res.data.shiBin;
  1281. this.form.orgcivilian = res.data.wenZhi;
  1282. this.form.nowcadre = res.data.xianYouGanBu;
  1283. this.form.nowsoldier = res.data.xianYouShiBin;
  1284. this.form.nowcivilian = res.data.xianYouWenZhi;
  1285. });
  1286. },
  1287. // 单位选择触发
  1288. selectPeo(data) {
  1289. this.chongZhi();
  1290. this.form.unitId = data.id;
  1291. // 获取实力情况
  1292. this.form.deptId = data.id;
  1293. this.getShiLiRen(this.form.deptId);
  1294. this.getRenYuan(this.form.unitId);
  1295. this.getShou(this.form.unitId);
  1296. // 判断是否全部选择
  1297. if (this.form.unitId !== null && this.form.blogDate) {
  1298. this.XunLian(this.form.unitId, this.form.blogDate);
  1299. }
  1300. },
  1301. // 根据部门获取人员
  1302. getRenYuan(id) {
  1303. getZhuChiRen(id).then((res) => {
  1304. this.renYuan = res.data;
  1305. });
  1306. },
  1307. // 获取首长
  1308. getShou(id) {
  1309. getUser(id).then((res) => {
  1310. this.shouZhang = res.data;
  1311. });
  1312. },
  1313. // 修改里获取首长
  1314. getShous(id) {
  1315. getUsers(id).then((res) => {
  1316. this.shouZhang = res.data;
  1317. });
  1318. },
  1319. // 搜索第一个选中触发
  1320. search() {
  1321. getZhuChiRen(this.queryParams.deptId).then((res) => {
  1322. this.Renyuan = res.data;
  1323. });
  1324. this.getList();
  1325. },
  1326. // 搜索审批触发
  1327. approve(val) {
  1328. this.queryParams.examine = val * 1;
  1329. this.getList();
  1330. },
  1331. // 字典查询
  1332. getdict() {
  1333. getDicts(this.dictType.dictType).then((res) => {
  1334. // console.log(res);
  1335. this.ziDian = res.data;
  1336. });
  1337. },
  1338. /** 查询要事日记列表 */
  1339. getList() {
  1340. this.loading = true;
  1341. listBdgldiary(this.queryParams).then((response) => {
  1342. this.bdgldiaryList = response.rows;
  1343. this.total = response.total;
  1344. this.loading = false;
  1345. });
  1346. },
  1347. // 查询单位列表
  1348. async getDept() {
  1349. const res = await getDept();
  1350. this.rese = res.data;
  1351. },
  1352. // 取消按钮
  1353. cancel() {
  1354. this.open = false;
  1355. this.reset();
  1356. },
  1357. // 表单重置
  1358. reset() {
  1359. this.form = {
  1360. id: null,
  1361. unitId: null,
  1362. peopleId: null,
  1363. blogDate: null,
  1364. weather: null,
  1365. orgcadre: null,
  1366. orgsoldier: null,
  1367. orgcivilian: null,
  1368. nowcadre: null,
  1369. nowsoldier: null,
  1370. nowcivilian: null,
  1371. tolerance: null,
  1372. transfer: null,
  1373. equip: null,
  1374. internal: null,
  1375. dutylead: null,
  1376. dutya: null,
  1377. dutyb: null,
  1378. dutyc: null,
  1379. dutyd: null,
  1380. dutye: null,
  1381. dutyf: null,
  1382. dutyinfoa: null,
  1383. dutyinfoc: null,
  1384. dutyinfoe: null,
  1385. dutyDate: null,
  1386. invalid: null,
  1387. notice: null,
  1388. lead: null,
  1389. weekwork: null,
  1390. examine: null,
  1391. peopleId1: null,
  1392. contents: null,
  1393. createId: null,
  1394. createName: null,
  1395. };
  1396. (this.relatives = [
  1397. {
  1398. name: null,
  1399. relation: null,
  1400. comeDate: null,
  1401. leaveDate: null,
  1402. peopleId: null,
  1403. peopleName: null,
  1404. },
  1405. ]),
  1406. (this.checkShop = [
  1407. {
  1408. peopleName: null,
  1409. foremanName: null,
  1410. sentryName: null,
  1411. examineDate: null,
  1412. dialogue: null,
  1413. },
  1414. ]),
  1415. (this.xunlian = [
  1416. {
  1417. dateline: null,
  1418. contents: null,
  1419. shouldArrive: null,
  1420. realTo: null,
  1421. percentage: null,
  1422. organizer: null,
  1423. },
  1424. ]),
  1425. this.resetForm("form");
  1426. },
  1427. /** 对话框重置按钮操作 */
  1428. resertwo() {
  1429. this.reset();
  1430. },
  1431. /** 搜索按钮操作 */
  1432. handleQuery() {
  1433. this.queryParams.pageNum = 1;
  1434. this.getList();
  1435. },
  1436. /** 重置按钮操作 */
  1437. resetQuery() {
  1438. this.resetForm("queryForm");
  1439. this.handleQuery();
  1440. },
  1441. // 多选框选中数据
  1442. handleSelectionChange(selection) {
  1443. this.ids = selection.map((item) => item.id);
  1444. this.single = selection.length !== 1;
  1445. this.multiple = !selection.length;
  1446. },
  1447. /** 新增按钮操作 */
  1448. handleAdd(e) {
  1449. // 获取首长
  1450. (this.shouZhang = []),
  1451. // 人员组织
  1452. (this.renYuan = []),
  1453. this.getTreeselect();
  1454. this.reset();
  1455. this.open = true;
  1456. this.title = "添加要事日记";
  1457. this.style = 2;
  1458. e.preventDefault();
  1459. },
  1460. /** 修改按钮操作 */
  1461. handleUpdate(row) {
  1462. this.title = "修改要事日记";
  1463. this.getTreeselect();
  1464. this.reset();
  1465. const id = row.id || this.ids;
  1466. getBdgldiary(id).then((response) => {
  1467. this.form = response.data;
  1468. // 请求首长
  1469. this.getShous(this.form.unitId);
  1470. this.xunlian = response.data.weekworkRegisters;
  1471. if (this.xunlian) {
  1472. for (var i = 0; i < this.xunlian.length; i++) {
  1473. this.xunlian[i].centertext =
  1474. this.xunlian[i].startTime +
  1475. "-" +
  1476. this.xunlian[i].endTime +
  1477. " " +
  1478. this.xunlian[i].contents +
  1479. "(" +
  1480. this.xunlian[i].organizer +
  1481. ")";
  1482. }
  1483. } else {
  1484. this.xunlian = [
  1485. {
  1486. dateline: null,
  1487. contents: null,
  1488. shouldArrive: null,
  1489. realTo: null,
  1490. percentage: null,
  1491. organizer: null,
  1492. },
  1493. ];
  1494. }
  1495. // 请求人员
  1496. this.getRenYuan(this.form.unitId);
  1497. this.open = true;
  1498. // 临时来对
  1499. if (response.data.kinsfolk != null) {
  1500. if (response.data.kinsfolk[0].peopleId != null) {
  1501. this.relatives = response.data.kinsfolk;
  1502. }
  1503. }
  1504. // 查铺查询
  1505. if (
  1506. response.data.inspect[0].peopleName != null ||
  1507. response.data.inspect[0].foremanName != null ||
  1508. response.data.inspect[0].sentryName != null ||
  1509. response.data.inspect[0].examineDate != null ||
  1510. response.data.inspect[0].dialogue != null
  1511. ) {
  1512. this.checkShop = response.data.inspect;
  1513. }
  1514. });
  1515. },
  1516. //查看按钮操作
  1517. handleChakan(row) {
  1518. // 是否隐藏按钮
  1519. this.opens = false;
  1520. this.statusShen = false;
  1521. const id = row.id || this.ids;
  1522. getBdgldiary(id).then((response) => {
  1523. if (new Date(response.data.blogDate).getDay() == 0) {
  1524. response.data.week = "星期日";
  1525. } else if (new Date(response.data.blogDate).getDay() == 1) {
  1526. response.data.week = "星期一";
  1527. } else if (new Date(response.data.blogDate).getDay() == 2) {
  1528. response.data.week = "星期二";
  1529. } else if (new Date(response.data.blogDate).getDay() == 3) {
  1530. response.data.week = "星期三";
  1531. } else if (new Date(response.data.blogDate).getDay() == 4) {
  1532. response.data.week = "星期四";
  1533. } else if (new Date(response.data.blogDate).getDay() == 5) {
  1534. response.data.week = "星期五";
  1535. } else if (new Date(response.data.blogDate).getDay() == 6) {
  1536. response.data.week = "星期六";
  1537. }
  1538. this.wordInfo = response.data;
  1539. // response.data.blogDate
  1540. this.title = "查看要事日记";
  1541. this.menuRoleVisible = true;
  1542. });
  1543. },
  1544. /** 提交按钮 */
  1545. submitForm(style) {
  1546. this.style = style;
  1547. this.$refs["form"].validate((valid) => {
  1548. if (valid) {
  1549. if (
  1550. (this.relatives[0].name ||
  1551. this.relatives[0].peopleId ||
  1552. this.relatives[0].peopleName) != null
  1553. ) {
  1554. this.form.kinsfolk = this.relatives;
  1555. }
  1556. if (
  1557. (this.checkShop[0].peopleName ||
  1558. this.checkShop[0].foremanName ||
  1559. this.checkShop[0].sentryName ||
  1560. this.checkShop[0].examineDate ||
  1561. this.checkShop[0].dialogue) != null
  1562. ) {
  1563. this.form.inspect = this.checkShop;
  1564. }
  1565. if (this.form.id != null) {
  1566. updateBdgldiary(this.form).then((response) => {
  1567. this.$modal.msgSuccess("修改成功");
  1568. this.open = false;
  1569. this.getList();
  1570. });
  1571. } else {
  1572. // 查铺查哨
  1573. if (
  1574. this.checkShop[0].peopleName !== null ||
  1575. this.checkShop[0].sentryName !== null ||
  1576. this.checkShop[0].examineDate !== null ||
  1577. this.checkShop[0].foremanName !== null ||
  1578. this.checkShop[0].dialogue != null
  1579. ) {
  1580. this.form.inspect = this.checkShop;
  1581. }
  1582. // 来对亲属
  1583. if (this.relatives[0].peopleId !== null) {
  1584. this.form.kinsfolk = this.relatives;
  1585. }
  1586. // 训练计划
  1587. this.form.weekworkRegisters = this.xunlian;
  1588. addBdgldiary(this.form).then((response) => {
  1589. this.$modal.msgSuccess("新增成功");
  1590. this.open = false;
  1591. this.getList();
  1592. });
  1593. }
  1594. }
  1595. });
  1596. },
  1597. // 隔行变色
  1598. // changeColor() {
  1599. // var content = document.getElementsByClassName("el-tree-node__content");
  1600. // for (var i = 0; i < content.length; i++) {
  1601. // if (i % 2 === 0) {
  1602. // content[i].style.background = "#00365F ";
  1603. // } else {
  1604. // content[i].style.background = "#003C69";
  1605. // }
  1606. // }
  1607. // },
  1608. /** 删除按钮操作 */
  1609. handleDelete(row) {
  1610. const ids = row.id || this.ids;
  1611. this.$modal
  1612. // .confirm('是否确认删除要事日记编号为"' + ids + '"的数据项?')
  1613. .confirm("是否确认删除该数据?")
  1614. .then(function () {
  1615. return delBdgldiary(ids);
  1616. })
  1617. .then(() => {
  1618. this.getList();
  1619. this.$modal.msgSuccess("删除成功");
  1620. })
  1621. .catch(() => {});
  1622. },
  1623. /** 导出按钮操作 */
  1624. handleExport() {
  1625. const queryParams = this.queryParams;
  1626. this.$modal
  1627. .confirm("是否确认导出所有要事日记数据项?")
  1628. .then(() => {
  1629. this.exportLoading = true;
  1630. return exportBdgldiary(queryParams);
  1631. })
  1632. .then((response) => {
  1633. this.$download.name(response.msg);
  1634. this.exportLoading = false;
  1635. })
  1636. .catch(() => {});
  1637. },
  1638. },
  1639. };
  1640. </script>
  1641. <style scoped>
  1642. ::v-deep .el-dialog {
  1643. width: 1060px !important;
  1644. background-color: #004d86;
  1645. margin: auto;
  1646. }
  1647. ::v-deep .el-dialog__header {
  1648. border-bottom: 1px solid #718a9d;
  1649. margin: auto;
  1650. }
  1651. ::v-deep .el-dialog__title {
  1652. color: #fff;
  1653. font: 18px;
  1654. }
  1655. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  1656. color: #fff;
  1657. }
  1658. ::v-deep .el-form-item__label {
  1659. font: 16px;
  1660. color: #fff;
  1661. width: 100px !important;
  1662. }
  1663. ::v-deep .el-input--small .el-input__inner {
  1664. width: 200px !important;
  1665. height: 36px;
  1666. border: 1px solid white !important;
  1667. color: #fff !important;
  1668. }
  1669. ::v-deep .el-textarea__inner {
  1670. width: 920px;
  1671. height: 104px;
  1672. }
  1673. ::v-deep .el-select-dropdown__list {
  1674. border: none;
  1675. }
  1676. .el-date-table,
  1677. .el-select-dropdown__item {
  1678. color: #fff;
  1679. }
  1680. .el-select-dropdown__item.hover,
  1681. .el-select-dropdown__item:hover {
  1682. background-color: #196299;
  1683. }
  1684. /* .el-select-dropdown__item.hover,
  1685. .el-select-dropdown__item:hover {
  1686. color: #fff !important;
  1687. } */
  1688. ::v-deep .el-dialog__body {
  1689. margin: 10px 0px 20px 68px;
  1690. padding-top: 20px !important;
  1691. box-sizing: border-box;
  1692. /* padding: 30px 12px 30px 28px; */
  1693. }
  1694. /* 表单背景 */
  1695. ::v-deep .el-input__inner {
  1696. background-color: transparent !important;
  1697. color: #fff;
  1698. /* border: 1px solid white !important; */
  1699. border-color: #fff !important;
  1700. }
  1701. /* 调整表单间距 */
  1702. ::v-deep .el-date-editor.el-input,
  1703. .el-date-editor.el-input__inner {
  1704. width: 200px;
  1705. }
  1706. .el-dialog__body .roll-dialog {
  1707. padding: 3px, 0px;
  1708. overflow-y: auto;
  1709. }
  1710. .box {
  1711. font-size: 14px;
  1712. color: #fff;
  1713. /* padding: 0 12px 0 0; */
  1714. margin-left: -55px;
  1715. }
  1716. ::v-deep .btn {
  1717. width: 76px;
  1718. height: 36px;
  1719. color: #fff;
  1720. background-color: #1d96ff;
  1721. border-radius: 4px;
  1722. border: none;
  1723. margin-left: 20px;
  1724. font-size: 14px;
  1725. }
  1726. ::v-deep .el-icon-refresh {
  1727. font-size: 16px;
  1728. margin-left: -3px;
  1729. }
  1730. ::v-deep .el-input-number__increase {
  1731. background-color: transparent !important;
  1732. border: none;
  1733. color: #cccccc;
  1734. border-bottom: none !important;
  1735. }
  1736. ::v-deep .el-input-number__decrease {
  1737. background-color: transparent !important;
  1738. border: none !important;
  1739. color: #cccccc;
  1740. }
  1741. ::v-deep .el-form-item__content {
  1742. width: 200px;
  1743. cursor: pointer !important;
  1744. }
  1745. /* 单位框背景颜色 */
  1746. ::v-deep .vue-treeselect__control {
  1747. background: #004d86 !important;
  1748. color: #fff;
  1749. }
  1750. /* 单位下拉菜单选中字体颜色 */
  1751. ::v-deep .vue-treeselect__single-value {
  1752. color: #fff !important;
  1753. }
  1754. /* 分页按钮 */
  1755. ::v-deep .el-pagination.is-background .el-pager li {
  1756. background-color: #004d86;
  1757. color: #fff;
  1758. }
  1759. ::v-deep .el-pagination.is-background .btn-next {
  1760. background-color: #004d86;
  1761. color: #fff;
  1762. }
  1763. ::v-deep .el-pagination.is-background .btn-prev,
  1764. .el-pagination.is-background .btn-next,
  1765. .el-pagination.is-background .el-pager li {
  1766. background: #004d86 !important;
  1767. color: #fff !important;
  1768. }
  1769. .app-container {
  1770. display: flex;
  1771. }
  1772. /* 左侧树状盒子 */
  1773. .app-container .box-lfet {
  1774. width: 15%;
  1775. min-height: 740px;
  1776. /* background: #003156; */
  1777. /* padding: 10px; */
  1778. margin-right: 10px;
  1779. /* border: 1px solid white; */
  1780. }
  1781. /* 右侧内容盒子 */
  1782. .app-container .box-right {
  1783. width: 85%;
  1784. }
  1785. .app-container .box-lfet .data {
  1786. height: 40px;
  1787. background: #003156;
  1788. margin-bottom: 12px;
  1789. color: #fff;
  1790. display: flex;
  1791. font-size: 13px;
  1792. line-height: 25px;
  1793. position: relative;
  1794. }
  1795. .el-tree {
  1796. background: #003156;
  1797. color: #fff;
  1798. margin-right: 2px;
  1799. padding-top: 7px;
  1800. }
  1801. ::v-deep .el-tree-node__content {
  1802. height: 32px !important;
  1803. }
  1804. ::v-deep .el-table .el-table__header-wrapper th,
  1805. .el-table .el-table__fixed-header-wrapper th {
  1806. word-break: break-word;
  1807. background-color: #004d86 !important;
  1808. color: #fff;
  1809. }
  1810. .box-lfet .dadui {
  1811. height: 40px;
  1812. background: #003156;
  1813. /* border-bottom: 1px solid #718A9D ; */
  1814. background-image: url(../../../images/矩形底部边框.png);
  1815. background-repeat: no-repeat;
  1816. background-position: 0px 39px;
  1817. font-size: 16px;
  1818. color: #1d96ff;
  1819. }
  1820. .box-lfet .dadui img {
  1821. margin: 10px 10px 0px 10px;
  1822. }
  1823. .box-lfet .data p {
  1824. position: absolute;
  1825. top: -5px;
  1826. left: 15px;
  1827. }
  1828. .box-lfet .data .a1 {
  1829. width: 128px;
  1830. height: 26px;
  1831. background: rgba(23, 74, 112, 0.4);
  1832. border-radius: 13px;
  1833. position: absolute;
  1834. top: 7px;
  1835. left: 60px;
  1836. }
  1837. ::v-deep .data .el-date-editor.el-input {
  1838. width: 100%;
  1839. border: none;
  1840. }
  1841. ::v-deep .data .el-input__inner {
  1842. width: 100% !important;
  1843. border: none;
  1844. }
  1845. ::v-deep .data .el-input--medium .el-input__icon {
  1846. line-height: 36px;
  1847. position: absolute;
  1848. right: -223px;
  1849. top: 2px;
  1850. }
  1851. ::v-deep .data .el-input__inner {
  1852. background-color: transparent;
  1853. color: #fff;
  1854. text-align: center;
  1855. margin-top: 2px;
  1856. }
  1857. ::v-deep .data .el-input__suffix {
  1858. position: absolute;
  1859. right: 281px;
  1860. }
  1861. /* 输入框显示手指 */
  1862. ::v-deep .el-input__inner {
  1863. cursor: pointer !important;
  1864. }
  1865. /* 训练、教育或者执行其他任务情况 */
  1866. .box {
  1867. margin-bottom: 25px;
  1868. }
  1869. ::v-deep .box .el-textarea__inner {
  1870. width: 395px;
  1871. border: none;
  1872. height: 50px;
  1873. }
  1874. ::v-deep .box .el-input__inner {
  1875. width: 100%;
  1876. height: 100%;
  1877. border: none;
  1878. text-align: center;
  1879. }
  1880. /* 查铺查哨-临时来对亲属 */
  1881. .box3 {
  1882. width: 920px;
  1883. min-height: 70px;
  1884. border: 1px solid white;
  1885. border-radius: 5px;
  1886. /* background: #409eff; */
  1887. /* margin-bottom: 30px; */
  1888. padding-top: 15px;
  1889. padding-left: 15px;
  1890. margin-bottom: 20px !important;
  1891. }
  1892. /* 表单长度 */
  1893. ::v-deep .box3 .el-form-item__content {
  1894. width: 140px;
  1895. display: flex;
  1896. }
  1897. ::v-deep .box3 .el-input__inner {
  1898. width: 142px;
  1899. height: 37px;
  1900. margin-bottom: 18px;
  1901. }
  1902. ::v-deep .el-select__caret .el-input__icon .el-icon-arrow-up {
  1903. margin-top: -10px;
  1904. }
  1905. /* 添加删除按钮 */
  1906. ::v-deep .box3 .el-button {
  1907. width: 32px;
  1908. height: 32px;
  1909. text-align: center;
  1910. margin-right: 3px;
  1911. margin-top: 2px;
  1912. margin-bottom: 10px;
  1913. }
  1914. ::v-deep .box3 .el-button .el-icon-plus {
  1915. margin-left: -6px;
  1916. }
  1917. ::v-deep .box3 .el-button .el-icon-delete {
  1918. margin-left: -6px;
  1919. }
  1920. ::v-deep .el-input__prefix {
  1921. display: none;
  1922. }
  1923. ::v-deep .el-date-editor.el-input {
  1924. width: 116px;
  1925. height: 36px;
  1926. line-height: 36px;
  1927. }
  1928. ::v-deep .box3 .el-form-item__content .el-input__inner {
  1929. padding: 0px 15px;
  1930. }
  1931. .box3 .el-form-item {
  1932. margin-bottom: 0px;
  1933. }
  1934. ::v-deep .el-select__caret {
  1935. margin-top: -10px !important;
  1936. }
  1937. .el-dialog__body {
  1938. color: #fff;
  1939. }
  1940. /* ::v-deep .vue-treeselect__menu {
  1941. background: #004d86;
  1942. } */
  1943. .greedd > .el-tree-node__content:after {
  1944. content: "";
  1945. width: 10px;
  1946. height: 10px;
  1947. border-radius: 50%;
  1948. background-color: #67c23a;
  1949. margin-left: 80px;
  1950. }
  1951. /* .greedd {
  1952. background-color: #67c23a
  1953. } */
  1954. /* 底部确定取消按钮 */
  1955. ::v-deep .el-dialog__footer {
  1956. padding: 18px 50px;
  1957. margin-right: 20px;
  1958. }
  1959. /* 增加按钮弹框 */
  1960. ::v-deep .el-dialog {
  1961. width: 1060px !important;
  1962. }
  1963. ::v-deep .el-dialog__body {
  1964. padding-left: 0px !important;
  1965. padding-right: 0px !important;
  1966. padding-bottom: 0px !important;
  1967. }
  1968. ::v-deep .box4 .el-textarea__inner {
  1969. min-height: 120px !important;
  1970. }
  1971. /* 调整输入框提示文字颜色 */
  1972. ::v-deep .vue-treeselect__placeholder {
  1973. color: #bdbdbd4f !important;
  1974. }
  1975. ::v-deep input::-webkit-input-placeholder {
  1976. color: #bdbdbd4f !important;
  1977. }
  1978. ::v-deep input:-moz-placeholder {
  1979. color: #bdbdbd4f !important;
  1980. }
  1981. .mb8 {
  1982. position: static;
  1983. }
  1984. .shuJu {
  1985. height: 16px;
  1986. margin-top: 13px;
  1987. margin-right: 90px;
  1988. float: right;
  1989. /* background-color: red; */
  1990. color: #fff;
  1991. font-size: 14px;
  1992. position: absolute;
  1993. right: 10px;
  1994. }
  1995. /* .public {
  1996. margin-right: 40px;
  1997. } */
  1998. .box44::before {
  1999. display: inline-block;
  2000. content: "";
  2001. width: 8px;
  2002. height: 8px;
  2003. /* border-radius: 50%; */
  2004. background-color: #1d96ff;
  2005. margin-left: 26px;
  2006. }
  2007. .box5::before {
  2008. display: inline-block;
  2009. content: "";
  2010. width: 8px;
  2011. height: 8px;
  2012. /* border-radius: 50%; */
  2013. background-color: #67c23a;
  2014. margin-left: 26px;
  2015. }
  2016. .box6::before {
  2017. display: inline-block;
  2018. content: "";
  2019. width: 8px;
  2020. height: 8px;
  2021. /* border-radius: 50%; */
  2022. background-color: #ff4949;
  2023. margin-left: 26px;
  2024. }
  2025. /* 文本域提示文字颜色 */
  2026. ::v-deep ::-webkit-input-placeholder {
  2027. color: #bdbdbd4f !important;
  2028. }
  2029. ::v-deep .el-tree-node__content:hover {
  2030. /* color: #fff; */
  2031. background-color: #003156;
  2032. background-image: url("../../../assets/images/选中.png");
  2033. background-size: 100% 100%;
  2034. background-repeat: no-repeat;
  2035. }
  2036. ::v-deep
  2037. .el-tree--highlight-current
  2038. .el-tree-node.is-current
  2039. > .el-tree-node__content {
  2040. color: #fff !important;
  2041. background-color: #003156;
  2042. background-image: url("../../../assets/images/选中.png");
  2043. background-size: 100% 100%;
  2044. background-repeat: no-repeat;
  2045. }
  2046. ::v-deep .el-tree-node__label {
  2047. color: #fff !important;
  2048. }
  2049. ::v-deep .box table td {
  2050. border-bottom: 1px solid white !important;
  2051. }
  2052. ::v-deep .data .el-input__inner {
  2053. border: none !important;
  2054. }
  2055. ::v-deep .box .el-input__inner {
  2056. border: none !important;
  2057. }
  2058. /* 卡片样式 */
  2059. .app-container {
  2060. height: calc(100vh - 108px) !important;
  2061. }
  2062. </style>