scenePacketList.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <template>
  2. <div class="scenePacketListPanel">
  3. <div class="viewBox">
  4. <el-button icon="el-icon-view" @click="view" type="primary"
  5. >模板预览</el-button
  6. >
  7. </div>
  8. <tableList
  9. ref="table"
  10. :columns="columns"
  11. :getDataWay="getDataWay"
  12. :pagination="pagination"
  13. >
  14. <el-table-column label="操作" slot="cgInfos" align="center">
  15. <template v-slot="scope">
  16. <i
  17. @click="addIndicators(scope.row)"
  18. class="el-icon-plus elIcon"
  19. ></i>
  20. <i
  21. @click="addIndicators(scope.row)"
  22. class="el-icon-edit-outline elIcon"
  23. ></i>
  24. <i
  25. @click="addMarkDia(scope.row)"
  26. class="el-icon-delete elIcon"
  27. ></i>
  28. <i
  29. @click="addScenario(scope.row)"
  30. class="el-icon-document-add elIcon"
  31. ></i>
  32. </template>
  33. </el-table-column>
  34. </tableList>
  35. <el-dialog
  36. :title="diaTitle"
  37. :visible.sync="indicatorsVisible"
  38. width="690px"
  39. :close-on-click-modal="false"
  40. :close-on-press-escape="false"
  41. >
  42. <el-form
  43. ref="form"
  44. :model="form"
  45. :rules="rules"
  46. label-width="108px"
  47. >
  48. <el-form-item label="指标名称:" prop="name">
  49. <el-input
  50. placeholder="请输入"
  51. maxlength="30"
  52. v-autoTrim="{ obj: form, key: 'name' }"
  53. v-model="form.name"
  54. >
  55. </el-input>
  56. </el-form-item>
  57. <el-form-item label="权重:" prop="x">
  58. <el-input
  59. placeholder="请输入"
  60. maxlength="30"
  61. v-autoTrim="{ obj: form, key: 'x' }"
  62. v-model="form.x"
  63. >
  64. </el-input>
  65. </el-form-item>
  66. <el-form-item label="评分规则:" prop="x">
  67. <el-select v-model="form.y">
  68. <el-option
  69. v-for="item in list"
  70. :label="item.caption"
  71. :value="item.code"
  72. :key="item.code"
  73. ></el-option>
  74. </el-select>
  75. </el-form-item>
  76. <el-form-item label="备注:" prop="des">
  77. <el-input
  78. v-autoTrim="{
  79. obj: form,
  80. key: 'des',
  81. }"
  82. v-model="form.des"
  83. type="textarea"
  84. placeholder="请输入"
  85. :autosize="{ minRows: 4, maxRows: 4 }"
  86. maxlength="200"
  87. ></el-input>
  88. </el-form-item>
  89. </el-form>
  90. <span slot="footer">
  91. <el-button type="primary" @click="indicatorsConfirm"
  92. >确 定</el-button
  93. >
  94. <el-button @click="indicatorsVisible = false">取 消</el-button>
  95. </span>
  96. </el-dialog>
  97. <el-dialog
  98. title="场景分类"
  99. :visible.sync="scenarioVisible"
  100. width="690px"
  101. :close-on-click-modal="false"
  102. :close-on-press-escape="false"
  103. >
  104. <el-form
  105. ref="formA"
  106. :model="formA"
  107. :rules="rulesA"
  108. label-width="108px"
  109. >
  110. <el-form-item label="场景分类:" prop="x">
  111. <el-select v-model="formA.y">
  112. <el-option
  113. v-for="item in listA"
  114. :label="item.caption"
  115. :value="item.code"
  116. :key="item.code"
  117. ></el-option>
  118. </el-select>
  119. </el-form-item>
  120. </el-form>
  121. <div class="tips">
  122. 解释:基于不同环境要素,在前述主题场景及两条路径的框架下进行场景的精确细分。细分维度包括天气、季节、温度、路况、车况等多种元素,所采纳元素的广度和深度既与需求有关,也与汽车智能化程度(感知能力)相关
  123. </div>
  124. <span slot="footer">
  125. <el-button type="primary" @click="scenarioConfirm"
  126. >确 定</el-button
  127. >
  128. <el-button @click="scenarioVisible = false">取 消</el-button>
  129. </span>
  130. </el-dialog>
  131. <el-dialog
  132. title="真实场景"
  133. :visible.sync="scenarioListsVisible"
  134. width="90%"
  135. :close-on-click-modal="false"
  136. :close-on-press-escape="false"
  137. >
  138. <div class="tabsBox">
  139. <toolbarTab
  140. :isConnect="true"
  141. position="top"
  142. :subPageActiveName="subPageActiveName"
  143. :toolbarItem="pageBtnList"
  144. @toolbarClick="pageControl"
  145. class="toolbarTab"
  146. >
  147. </toolbarTab>
  148. <div v-show="activitedPageNum === 1">
  149. <search-layout>
  150. <template slot="searchItem1">
  151. <span class="label">场景名称</span>
  152. <el-input
  153. v-model="searchParamsA.id"
  154. size="small"
  155. clearable
  156. placeholder="请输入"
  157. >
  158. </el-input>
  159. </template>
  160. <template slot="searchItem2">
  161. <span class="label">自车驾驶行为</span>
  162. <el-select v-model="searchParamsA.status" multiple>
  163. <el-option
  164. v-for="item in list"
  165. :label="item.caption"
  166. :value="item.code"
  167. :key="item.code"
  168. ></el-option>
  169. </el-select>
  170. </template>
  171. <template slot="searchItem3">
  172. <span class="label">目标驾驶行为</span>
  173. <el-select v-model="searchParamsA.status" multiple>
  174. <el-option
  175. v-for="item in list"
  176. :label="item.caption"
  177. :value="item.code"
  178. :key="item.code"
  179. ></el-option>
  180. </el-select>
  181. </template>
  182. <template slot="searchItem4">
  183. <span class="label">自车反应行为</span>
  184. <el-select v-model="searchParamsA.status" multiple>
  185. <el-option
  186. v-for="item in list"
  187. :label="item.caption"
  188. :value="item.code"
  189. :key="item.code"
  190. ></el-option>
  191. </el-select>
  192. </template>
  193. <template slot="searchItem5">
  194. <span class="label">冲突行为</span>
  195. <el-select v-model="searchParamsA.status" multiple>
  196. <el-option
  197. v-for="item in list"
  198. :label="item.caption"
  199. :value="item.code"
  200. :key="item.code"
  201. ></el-option>
  202. </el-select>
  203. </template>
  204. <template slot="searchItem6">
  205. <span class="label">冲突类型</span>
  206. <el-select v-model="searchParamsA.status" multiple>
  207. <el-option
  208. v-for="item in list"
  209. :label="item.caption"
  210. :value="item.code"
  211. :key="item.code"
  212. ></el-option>
  213. </el-select>
  214. </template>
  215. <template slot="searchBtn1">
  216. <el-button type="primary">查询</el-button>
  217. </template>
  218. <template slot="searchBtn2">
  219. <el-button type="primary">重置</el-button>
  220. </template>
  221. </search-layout>
  222. <div class="isSelected">
  223. <el-checkbox v-model="selectedA">已选择</el-checkbox>
  224. </div>
  225. <tableList
  226. ref="tableA"
  227. :columns="columnsA"
  228. :getDataWay="getDataWayA"
  229. :pagination="paginationA"
  230. index
  231. selection
  232. >
  233. </tableList>
  234. </div>
  235. <div v-show="activitedPageNum === 2">
  236. <search-layout>
  237. <template slot="searchItem1">
  238. <span class="label">道路</span>
  239. <el-select v-model="searchParamsB.status">
  240. <el-option
  241. v-for="item in list"
  242. :label="item.caption"
  243. :value="item.code"
  244. :key="item.code"
  245. ></el-option>
  246. </el-select>
  247. </template>
  248. <template slot="searchItem2">
  249. <span class="label">基础设施</span>
  250. <el-select v-model="searchParamsB.status">
  251. <el-option
  252. v-for="item in list"
  253. :label="item.caption"
  254. :value="item.code"
  255. :key="item.code"
  256. ></el-option>
  257. </el-select>
  258. </template>
  259. <template slot="searchItem3">
  260. <span class="label">交通情况</span>
  261. <el-select v-model="searchParamsB.status">
  262. <el-option
  263. v-for="item in list"
  264. :label="item.caption"
  265. :value="item.code"
  266. :key="item.code"
  267. ></el-option>
  268. </el-select>
  269. </template>
  270. <template slot="searchItem4">
  271. <span class="label">自车行为</span>
  272. <el-select v-model="searchParamsB.status">
  273. <el-option
  274. v-for="item in list"
  275. :label="item.caption"
  276. :value="item.code"
  277. :key="item.code"
  278. ></el-option>
  279. </el-select>
  280. </template>
  281. <template slot="searchItem5">
  282. <span class="label">目标行为</span>
  283. <el-select v-model="searchParamsB.status">
  284. <el-option
  285. v-for="item in list"
  286. :label="item.caption"
  287. :value="item.code"
  288. :key="item.code"
  289. ></el-option>
  290. </el-select>
  291. </template>
  292. <template slot="searchItem6">
  293. <span class="label">自然环境</span>
  294. <el-select v-model="searchParamsB.status">
  295. <el-option
  296. v-for="item in list"
  297. :label="item.caption"
  298. :value="item.code"
  299. :key="item.code"
  300. ></el-option>
  301. </el-select>
  302. </template>
  303. <template slot="searchBtn1">
  304. <el-button type="primary">查询</el-button>
  305. </template>
  306. <template slot="searchBtn2">
  307. <el-button type="primary">重置</el-button>
  308. </template>
  309. </search-layout>
  310. <div class="isSelected">
  311. <el-checkbox v-model="selectedB">已选择</el-checkbox>
  312. </div>
  313. <tableList
  314. ref="tableB"
  315. :columns="columnsB"
  316. :getDataWay="getDataWayB"
  317. :pagination="paginationB"
  318. index
  319. selection
  320. >
  321. </tableList>
  322. </div>
  323. <div v-show="activitedPageNum === 3">
  324. <search-layout>
  325. <template slot="searchItem1">
  326. <span class="label">场景名称</span>
  327. <el-input
  328. v-model="searchParamsC.id"
  329. size="small"
  330. clearable
  331. placeholder="请输入"
  332. >
  333. </el-input>
  334. </template>
  335. <template slot="searchItem2">
  336. <span class="label">法规类型</span>
  337. <el-select v-model="searchParamsC.status" multiple>
  338. <el-option
  339. v-for="item in list"
  340. :label="item.caption"
  341. :value="item.code"
  342. :key="item.code"
  343. ></el-option>
  344. </el-select>
  345. </template>
  346. <template slot="searchItem3">
  347. <span class="label">标准类型</span>
  348. <el-input
  349. v-model="searchParamsC.id"
  350. size="small"
  351. clearable
  352. placeholder="请输入"
  353. >
  354. </el-input>
  355. </template>
  356. <template slot="searchBtn1">
  357. <el-button type="primary">查询</el-button>
  358. </template>
  359. <template slot="searchBtn2">
  360. <el-button type="primary">重置</el-button>
  361. </template>
  362. </search-layout>
  363. <div class="isSelected">
  364. <el-checkbox v-model="selectedC">已选择</el-checkbox>
  365. </div>
  366. <tableList
  367. ref="tableC"
  368. :columns="columnsC"
  369. :getDataWay="getDataWayC"
  370. :pagination="paginationC"
  371. index
  372. selection
  373. >
  374. </tableList>
  375. </div>
  376. </div>
  377. <div class="flexBox summaryBox">
  378. <div>场景总数: {{ sceneTotal }}</div>
  379. <div>交通事故场景: {{ sceneA }}</div>
  380. <div>自然驾驶场景: {{ sceneB }}</div>
  381. <div>标准法规场景: {{ sceneC }}</div>
  382. </div>
  383. <span slot="footer">
  384. <el-button type="primary" @click="scenarioListsConfirm"
  385. >确 定</el-button
  386. >
  387. <el-button @click="scenarioListsVisible = false"
  388. >取 消</el-button
  389. >
  390. </span>
  391. </el-dialog>
  392. </div>
  393. </template>
  394. <script>
  395. import searchLayout from "@/components/grid/searchLayout";
  396. import tableList from "@/components/grid/TableList";
  397. import toolbarTab from "@/components/toolbar/toolbarTab";
  398. export default {
  399. name: "scenePacketList", // 场景数据包
  400. components: { searchLayout, tableList, toolbarTab },
  401. data() {
  402. return {
  403. searchParams: {
  404. //搜索参数
  405. id: "", //ID
  406. clientOrgName: "", //车辆名称
  407. clientOrgName1: "", //配置名称
  408. clientOrgName2: "", //配置描述
  409. },
  410. activitedPageNum: 1,
  411. subPageActiveName: 1,
  412. pageBtnList: [
  413. {
  414. type: "primary",
  415. title: "交通事故场景",
  416. key: "all",
  417. fromId: 1,
  418. method: "showAll",
  419. plain: true,
  420. disabled: false,
  421. },
  422. {
  423. type: "primary",
  424. title: "自然驾驶场景",
  425. key: "notRead",
  426. fromId: 2,
  427. method: "showNotRead",
  428. plain: true,
  429. disabled: false,
  430. },
  431. {
  432. type: "primary",
  433. title: "标准法规场景",
  434. key: "notRead1",
  435. fromId: 3,
  436. method: "showNotRead1",
  437. plain: true,
  438. disabled: false,
  439. },
  440. ],
  441. columns: [
  442. {
  443. label: "操作",
  444. prop: "cgInfos",
  445. template: true,
  446. },
  447. {
  448. label: "指标名称",
  449. prop: "id",
  450. },
  451. {
  452. label: "权重",
  453. prop: "ktName",
  454. },
  455. {
  456. label: "场景数量",
  457. prop: "jbSource",
  458. },
  459. {
  460. label: "规则名称",
  461. prop: "startDateStr",
  462. },
  463. {
  464. label: "备注",
  465. prop: "startDateStr",
  466. },
  467. ],
  468. pagination: {
  469. //分页使用
  470. currentPage: 1,
  471. pageSize: 10,
  472. position: "right",
  473. pageSizes: [10, 30, 50, 100, 200],
  474. layout: "sizes, total, prev, pager, next, jumper",
  475. },
  476. getDataWay: {
  477. //加载表格数据
  478. dataType: "data",
  479. type: "post",
  480. firstRequest: false,
  481. data: [
  482. {
  483. id: 1,
  484. ktName: "kjdhfkjsdhfkjsjhdfksdjhfkhwoieyrhfisdhfksjhdf",
  485. jbSource: "收到就好付款时间的回复可见收到货覅无痕",
  486. },
  487. { id: 2 },
  488. { id: 3 },
  489. { id: 4 },
  490. { id: 5 },
  491. { id: 6 },
  492. ],
  493. param: {},
  494. },
  495. diaTitle: "",
  496. indicatorsVisible: false, // 编辑指标
  497. scenarioVisible: false, // 选择场景
  498. scenarioListsVisible: false, // 真实场景列表
  499. form: {
  500. name: "",
  501. des: "",
  502. x: "",
  503. y: "",
  504. },
  505. rules: {
  506. name: [{ required: true, message: "请输入", trigger: "blur" }],
  507. x: [{ required: true, message: "请输入", trigger: "blur" }],
  508. y: [{ required: true, message: "请选择", trigger: "change" }],
  509. },
  510. list: [],
  511. formA: {
  512. x: "",
  513. },
  514. rulesA: {
  515. x: [{ required: true, message: "请选择", trigger: "change" }],
  516. },
  517. listA: [],
  518. searchParamsA: {
  519. //搜索参数
  520. id: "", //ID
  521. clientOrgName: "", //车辆名称
  522. clientOrgName1: "", //配置名称
  523. clientOrgName2: "", //配置描述
  524. status: "",
  525. x: "1",
  526. c: [],
  527. },
  528. columnsA: [
  529. //表格列
  530. {
  531. label: "场景名称",
  532. prop: "id",
  533. },
  534. {
  535. label: "自车驾驶行为",
  536. prop: "aid1",
  537. },
  538. {
  539. label: "目标驾驶行为",
  540. prop: "ktName",
  541. },
  542. {
  543. label: "自车反应行为",
  544. prop: "jbSource",
  545. },
  546. {
  547. label: "冲突行为",
  548. prop: "jbSource",
  549. },
  550. {
  551. label: "冲突类型",
  552. prop: "jbSource",
  553. },
  554. {
  555. label: "标签",
  556. prop: "asd",
  557. template: true,
  558. },
  559. {
  560. label: "操作",
  561. prop: "cgInfos",
  562. template: true,
  563. },
  564. ],
  565. paginationA: {
  566. //分页使用
  567. currentPage: 1,
  568. pageSize: 10,
  569. position: "right",
  570. pageSizes: [10, 30, 50, 100, 200],
  571. layout: "sizes, total, prev, pager, next, jumper",
  572. },
  573. getDataWayA: {
  574. //加载表格数据
  575. dataType: "data",
  576. type: "post",
  577. firstRequest: false,
  578. data: [
  579. {
  580. id: 1,
  581. ktName: "kjdhfkjsdhfkjsjhdfksdjhfkhwoieyrhfisdhfksjhdf",
  582. jbSource: "收到就好付款时间的回复可见收到货覅无痕",
  583. },
  584. { id: 2 },
  585. { id: 3 },
  586. { id: 4 },
  587. { id: 51 },
  588. { id: 6 },
  589. ],
  590. // data: this.$api.scientificStatistics.typeProjectStatistics,
  591. param: {},
  592. },
  593. selectedA: false,
  594. searchParamsB: {
  595. //搜索参数
  596. id: "", //ID
  597. clientOrgName: "", //车辆名称
  598. clientOrgName1: "", //配置名称
  599. clientOrgName2: "", //配置描述
  600. status: "",
  601. c: [],
  602. },
  603. columnsB: [
  604. //表格列
  605. {
  606. label: "场景名称",
  607. prop: "aid1",
  608. },
  609. {
  610. label: "天气",
  611. prop: "ktName",
  612. },
  613. {
  614. label: "自车行为",
  615. prop: "jbSource",
  616. },
  617. {
  618. label: "目标行为",
  619. prop: "jbSource",
  620. },
  621. {
  622. label: "标签",
  623. prop: "asd",
  624. template: true,
  625. },
  626. {
  627. label: "操作",
  628. prop: "cgInfos",
  629. template: true,
  630. },
  631. ],
  632. paginationB: {
  633. //分页使用
  634. currentPage: 1,
  635. pageSize: 10,
  636. position: "right",
  637. pageSizes: [10, 30, 50, 100, 200],
  638. layout: "sizes, total, prev, pager, next, jumper",
  639. },
  640. getDataWayB: {
  641. //加载表格数据
  642. dataType: "data",
  643. type: "post",
  644. firstRequest: false,
  645. data: [
  646. {
  647. id: 1,
  648. ktName: "kjdhfkjsdhfkjsjhdfksdjhfkhwoieyrhfisdhfksjhdf",
  649. jbSource: "收到就好付款时间的回复可见收到货覅无痕",
  650. },
  651. { id: 2 },
  652. { id: 3 },
  653. { id: 4 },
  654. { id: 51 },
  655. { id: 6 },
  656. ],
  657. param: {},
  658. },
  659. selectedB: false,
  660. searchParamsC: {
  661. //搜索参数
  662. id: "", //ID
  663. clientOrgName: "", //车辆名称
  664. clientOrgName1: "", //配置名称
  665. clientOrgName2: "", //配置描述
  666. status: "",
  667. c: [],
  668. },
  669. columnsC: [
  670. //表格列
  671. {
  672. label: "场景名称",
  673. prop: "id",
  674. },
  675. {
  676. label: "法规类型",
  677. prop: "aid1",
  678. },
  679. {
  680. label: "标准类型",
  681. prop: "ktName",
  682. },
  683. {
  684. label: "标签",
  685. prop: "asd",
  686. template: true,
  687. },
  688. {
  689. label: "操作",
  690. prop: "cgInfos",
  691. template: true,
  692. },
  693. ],
  694. paginationC: {
  695. //分页使用
  696. currentPage: 1,
  697. pageSize: 10,
  698. position: "right",
  699. pageSizes: [10, 30, 50, 100, 200],
  700. layout: "sizes, total, prev, pager, next, jumper",
  701. },
  702. getDataWayC: {
  703. //加载表格数据
  704. dataType: "data",
  705. type: "post",
  706. firstRequest: false,
  707. data: [
  708. {
  709. id: 1,
  710. ktName: "kjdhfkjsdhfkjsjhdfksdjhfkhwoieyrhfisdhfksjhdf",
  711. jbSource: "收到就好付款时间的回复可见收到货覅无痕",
  712. },
  713. { id: 2 },
  714. { id: 3 },
  715. { id: 4 },
  716. { id: 51 },
  717. { id: 6 },
  718. ],
  719. // data: this.$api.scientificStatistics.typeProjectStatistics,
  720. param: {},
  721. },
  722. selectedC: false,
  723. sceneTotal: 0,
  724. sceneA: 0,
  725. sceneB: 0,
  726. sceneC: 0,
  727. };
  728. },
  729. computed: {},
  730. methods: {
  731. view() {},
  732. addIndicators(row) {
  733. this.diaTitle = "添加指标";
  734. this.indicatorsVisible = true;
  735. },
  736. addScenario(row) {
  737. this.scenarioVisible = true;
  738. },
  739. indicatorsConfirm() {
  740. this.indicatorsVisible = false;
  741. },
  742. scenarioConfirm() {
  743. this.scenarioVisible = false;
  744. this.scenarioListsVisible = true;
  745. },
  746. scenarioListsConfirm() {
  747. this.scenarioListsVisible = false;
  748. },
  749. pageControl(data) {
  750. this.activitedPageNum = data.fromId;
  751. },
  752. },
  753. // mounted() {},
  754. };
  755. </script>
  756. <style lang='less' scoped>
  757. .scenePacketListPanel {
  758. padding: 30px;
  759. .viewBox {
  760. padding: 0 10px 10px;
  761. }
  762. .tips {
  763. padding: 10px 0 10px 18px;
  764. font-size: 12px;
  765. color: @gray;
  766. }
  767. .tabsBox {
  768. .el-input,
  769. .el-select {
  770. width: 230px;
  771. }
  772. .label {
  773. min-width: 90px;
  774. }
  775. .isSelected {
  776. padding: 10px 0 10px 30px;
  777. }
  778. }
  779. .summaryBox {
  780. padding: 20px 20px 0;
  781. margin-top: 20px;
  782. border-top: 1px dotted @themeColor;
  783. color: @themeColor;
  784. font-size: 18px;
  785. font-weight: bold;
  786. > div {
  787. margin-right: 30px;
  788. }
  789. }
  790. }
  791. </style>