explorate-two.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <!-- -->
  2. <template>
  3. <div class="explorate" :class="{ downMode }" v-if="data">
  4. <div>
  5. <h2 class="title">道路交通事故现场勘查笔录(续页)</h2>
  6. <div class="container">
  7. <div class="table-header">
  8. <p style="margin-bottom: 5px">二、现场监控设备情况</p>
  9. <div class="table-header-info">
  10. <div class="item" v-for="(i, index) in headerList.options" @click="checkOptions(headerList, index)">
  11. <ui-icon :type="data.cameraInfo.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
  12. <span>{{ i.title }}</span>
  13. <div v-if="i.id == 2" style="flex: 1">
  14. <input type="text" v-model="data.cameraInfo.value" />
  15. <div class="content-box left" style="height: 24px; border-bottom: 1px solid #000">{{ data.cameraInfo.value }}</div>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="table-body">
  21. <p style="margin-bottom: 20px; margin-top: 10px">三、现场伤亡人员基本情况及救援</p>
  22. <p style="margin-bottom: 10px">(一)伤亡人员基本情况;</p>
  23. <div class="item">
  24. <span>当场死亡:(</span>
  25. <div style="min-width: 10px">
  26. <input style="width: 30px" type="text" v-model="data.dieNum" />
  27. <div class="content-box">{{ data.dieNum }}</div>
  28. </div>
  29. <span>)人;急救、医疗人员签名确认:</span>
  30. <div style="flex: 1">
  31. <input class="under-line" type="text" v-model="data.doctorSign" />
  32. <div class="content-box left" style="border-bottom: 1px solid #000">{{ data.doctorSign }}</div>
  33. </div>
  34. </div>
  35. <div class="item">
  36. <span>受伤:(</span>
  37. <div style="min-width: 10px">
  38. <input style="width: 30px" type="text" v-model="data.hurtNum" />
  39. <div class="content-box">{{ data.hurtNum }}</div>
  40. </div>
  41. <span>)人。</span>
  42. </div>
  43. <div class="item column">
  44. <span>伤亡人员去向:</span>
  45. <div style="min-height: 60px; width: 100%">
  46. <textarea style="height: 60px" v-model="data.hurtDieGo" name="" id="" cols="30" rows="10"></textarea>
  47. <div class="content-box top-left">{{ data.hurtDieGo }}</div>
  48. </div>
  49. </div>
  50. <div class="item column">
  51. <span>其他需求说明的情况:</span>
  52. <div style="min-height: 60px; width: 100%">
  53. <textarea style="height: 60px" v-model="data.desc" name="" id="" cols="30" rows="10"></textarea>
  54. <div class="content-box top-left">{{ data.desc }}</div>
  55. </div>
  56. </div>
  57. <p>(二)救援简要情况:</p>
  58. <div class="item" style="margin-top: 10px">
  59. <span> 是否涉及危险物品:</span>
  60. <div style="margin-right: 40px" v-for="(i, index) in isnotList.options" @click="checkOptions(isnotList, index)">
  61. <ui-icon :type="data.dangerousInfo.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
  62. <span>{{ i.title }}</span>
  63. </div>
  64. <!-- <div style="margin-right: 40px">
  65. <ui-icon type="rb_n"></ui-icon>
  66. <span>是</span>
  67. </div> -->
  68. <div>名称:</div>
  69. <div style="flex: 1">
  70. <input class="under-line" type="text" v-model="data.dangerousInfo.value" />
  71. <div class="content-box left" style="border-bottom: 1px solid #000">{{ data.dangerousInfo.value }}</div>
  72. </div>
  73. </div>
  74. <p style="margin-bottom: 5px">相关部门和人员到达情况:</p>
  75. <div class="item half">
  76. <template v-for="(i, index) in reachList.options">
  77. <div v-if="index < 2" @click="checkOptions(reachList, index)">
  78. <div style="display: inline-block">
  79. <ui-icon :type="reachList.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
  80. <span>{{ i.title }}</span>
  81. </div>
  82. </div>
  83. </template>
  84. </div>
  85. <div class="item half">
  86. <template v-for="(i, index) in reachList.options">
  87. <div v-if="index >= 2" @click="checkOptions(reachList, index)">
  88. <div style="display: inline-block">
  89. <ui-icon :type="reachList.check == i.id ? 'rb_y' : 'rb_n'"></ui-icon>
  90. <span>{{ i.title }}</span>
  91. </div>
  92. </div>
  93. </template>
  94. </div>
  95. </div>
  96. <div class="table-excel">
  97. <p style="margin-bottom: 10px">四、现场事故车辆车型、牌号及车辆挡位 转向、灯光、仪表指针位置,汽车行驶记录仪、车载 事件数据记录仪、卫星定位装置等安装及使用情况</p>
  98. <table>
  99. <tr>
  100. <td rowspan="2">编号</td>
  101. <td rowspan="2">牌号</td>
  102. <td rowspan="2">车辆类型</td>
  103. <td rowspan="2">车辆档位</td>
  104. <td rowspan="2">灯光开启情况</td>
  105. <td rowspan="2">车速仪表指针位置</td>
  106. <td colspan="3">车载设备安装使用情况(有,无)</td>
  107. </tr>
  108. <tr>
  109. <td>汽车行驶记录仪</td>
  110. <td>车载事件数据记录仪</td>
  111. <td>卫星定位装置</td>
  112. </tr>
  113. <tr v-for="(i, index) in data.list">
  114. <td v-for="(j, j_index) in i">
  115. <div class="content-box">{{ data.list[index][j_index] }}</div>
  116. <input type="text" v-model="data.list[index][j_index]" />
  117. </td>
  118. </tr>
  119. </table>
  120. </div>
  121. <div class="sign-box">
  122. <div>
  123. <span>现场勘查人员签名:</span>
  124. <div>
  125. <input type="text" v-model="data.explorateSign" />
  126. <div class="content-box left">{{ data.explorateSign }}</div>
  127. </div>
  128. </div>
  129. <div>
  130. <span>记录人签名:</span>
  131. <div>
  132. <input type="text" v-model="data.reportSign" />
  133. <div class="content-box left">{{ data.reportSign }}</div>
  134. </div>
  135. </div>
  136. </div>
  137. <div class="sign-box">
  138. <div>
  139. <span>当事人签名:</span>
  140. <div>
  141. <input type="text" v-model="data.clientSign" />
  142. <div class="content-box left">{{ data.clientSign }}</div>
  143. </div>
  144. </div>
  145. <div>
  146. <span>见证人签名:</span>
  147. <div>
  148. <input type="text" v-model="data.witnessSign" />
  149. <div class="content-box left">{{ data.witnessSign }}</div>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. <div class="footer">
  155. <span>共<span>肆</span>页</span>
  156. <span>第<span>贰</span>页</span>
  157. </div>
  158. </div>
  159. </div>
  160. </template>
  161. <script setup lang="ts">
  162. import { reactive, ref, toRefs, onBeforeMount, onMounted, nextTick, defineProps } from "vue";
  163. import { tables } from "@/store/tables";
  164. import { tablesInfo, setData } from "./data";
  165. const props = defineProps({
  166. downMode: { type: Boolean, default: false },
  167. isDownloadShow: { type: Boolean, default: false },
  168. });
  169. const data = ref(null);
  170. const checkOptions = (item, index) => {
  171. item.check = item.options[index].id;
  172. data.value[item.type].check = item.check;
  173. };
  174. const headerList = ref({
  175. check: 0,
  176. type: "cameraInfo",
  177. options: [
  178. {
  179. id: 1,
  180. title: "未发现",
  181. },
  182. {
  183. id: 2,
  184. title: "发现",
  185. },
  186. ],
  187. });
  188. const isnotList = ref({
  189. check: 0,
  190. type: "dangerousInfo",
  191. options: [
  192. {
  193. id: 1,
  194. title: "否",
  195. },
  196. {
  197. id: 2,
  198. title: "是",
  199. },
  200. ],
  201. });
  202. const reachList = ref({
  203. check: 0,
  204. type: "reachs",
  205. options: [
  206. {
  207. id: 1,
  208. title: "医疗",
  209. },
  210. {
  211. id: 2,
  212. title: "消防",
  213. },
  214. {
  215. id: 3,
  216. title: "清障",
  217. },
  218. {
  219. id: 4,
  220. title: "其他",
  221. },
  222. ],
  223. });
  224. const saveHandler = () => {
  225. return { type: "explorateTwo", data: data.value };
  226. };
  227. const saveStore = () => {
  228. // return new Promise((res, rej) => {
  229. // origin["legacy"] = JSON.parse(JSON.stringify(data.value));
  230. // });
  231. };
  232. defineExpose({ saveHandler, data });
  233. onMounted(() => {
  234. if (props.isDownloadShow) {
  235. } else {
  236. setData("explorateTwo");
  237. }
  238. if (tablesInfo.explorateTwo) {
  239. data.value = tablesInfo.explorateTwo;
  240. }
  241. });
  242. </script>
  243. <style lang="scss" scoped>
  244. div[contenteditable] {
  245. outline: none;
  246. }
  247. .content-box {
  248. width: 100%;
  249. height: 100%;
  250. display: none;
  251. align-items: center;
  252. justify-content: center;
  253. &.left {
  254. justify-content: flex-start;
  255. }
  256. &.top-left {
  257. align-items: flex-start;
  258. justify-content: flex-start;
  259. }
  260. }
  261. .explorate {
  262. color: #000;
  263. width: 100%;
  264. height: 100%;
  265. // display: grid;
  266. font-family: sr, st;
  267. &.downMode {
  268. input,
  269. textarea {
  270. display: none;
  271. }
  272. .content-box {
  273. display: flex;
  274. }
  275. }
  276. // padding: 80px 0 0 0;
  277. > div {
  278. // padding: 20px 50px 30px;
  279. }
  280. &.downMode {
  281. input {
  282. display: none;
  283. }
  284. .content-box {
  285. display: flex;
  286. }
  287. }
  288. .title {
  289. text-align: center;
  290. margin-bottom: 10px;
  291. }
  292. .container {
  293. border: 1px solid #000;
  294. font-size: 20px;
  295. .table-excel {
  296. padding: 10px;
  297. table {
  298. width: 100%;
  299. border-collapse: collapse;
  300. border: 1px solid #000;
  301. tr {
  302. // border-bottom: 1px solid #000;
  303. &:last-of-type {
  304. td {
  305. border-bottom: none;
  306. }
  307. }
  308. }
  309. td {
  310. padding: 0 2px;
  311. box-sizing: border-box;
  312. text-align: center;
  313. max-width: 11%;
  314. height: 40px;
  315. border-right: 1px solid #000;
  316. border-bottom: 1px solid #000;
  317. &:last-of-type {
  318. border-right: none;
  319. }
  320. input {
  321. width: 100%;
  322. height: 100%;
  323. text-align: center;
  324. }
  325. > div {
  326. outline: none;
  327. }
  328. }
  329. }
  330. }
  331. .sign-box {
  332. padding: 0 10px;
  333. display: flex;
  334. align-items: center;
  335. justify-content: flex-start;
  336. border-top: 1px solid #000;
  337. min-height: 40px;
  338. > div {
  339. width: 50%;
  340. height: 100%;
  341. display: flex;
  342. align-items: center;
  343. justify-content: flex-start;
  344. > div {
  345. flex: 1;
  346. height: 100%;
  347. outline: none;
  348. display: flex;
  349. align-items: center;
  350. justify-content: flex-start;
  351. line-height: 40px;
  352. }
  353. }
  354. }
  355. .table-body {
  356. border-top: 1px solid #000;
  357. margin-top: 10px;
  358. padding: 0 10px 10px;
  359. border-bottom: 1px solid #000;
  360. .item {
  361. display: flex;
  362. margin-bottom: 10px;
  363. &.half {
  364. align-items: center;
  365. justify-content: space-between;
  366. > div {
  367. width: 50%;
  368. flex-flow: row wrap;
  369. }
  370. }
  371. &.column {
  372. flex-direction: column;
  373. > div {
  374. outline: none;
  375. height: 100%;
  376. textarea {
  377. height: 100%;
  378. width: 100%;
  379. resize: none;
  380. }
  381. }
  382. }
  383. > div {
  384. input {
  385. &.under-line {
  386. width: 100%;
  387. border-bottom: 1px solid #000;
  388. }
  389. // border-bottom: 1px solid #000;
  390. }
  391. }
  392. }
  393. }
  394. .table-header {
  395. padding: 0 10px;
  396. .table-header-info {
  397. padding-left: 50px;
  398. .item {
  399. display: flex;
  400. align-items: center;
  401. justify-content: flex-start;
  402. width: 100%;
  403. > div {
  404. input {
  405. width: 100%;
  406. border-bottom: 1px solid #000;
  407. }
  408. }
  409. }
  410. }
  411. }
  412. }
  413. .footer {
  414. display: flex;
  415. align-items: center;
  416. justify-content: space-between;
  417. padding: 0 60px;
  418. margin-top: 10px;
  419. > span {
  420. > span {
  421. margin: 0 24px;
  422. }
  423. }
  424. }
  425. }
  426. </style>