trafficAccidentSimulationScene.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <div>
  3. <search-layout :needBox="true">
  4. <template slot="searchItem1">
  5. <span class="label">场景来源</span>
  6. <el-input
  7. v-model="searchParams.a1"
  8. size="small"
  9. clearable
  10. placeholder="请输入"
  11. maxlength="60"
  12. >
  13. </el-input>
  14. </template>
  15. <template slot="searchItem2">
  16. <span class="label">事故类型</span>
  17. <el-select v-model="searchParams.a2">
  18. <!--<el-option
  19. v-for="item in list"
  20. :label="item.caption"
  21. :value="item.code"
  22. :key="item.code"
  23. ></el-option>-->
  24. </el-select>
  25. </template>
  26. <template slot="searchItem3">
  27. <span class="label">道路类型</span>
  28. <el-select v-model="searchParams.a3">
  29. <!--<el-option
  30. v-for="item in list"
  31. :label="item.caption"
  32. :value="item.code"
  33. :key="item.code"
  34. ></el-option>-->
  35. </el-select>
  36. </template>
  37. <template slot="searchItem4">
  38. <span class="label">地区</span>
  39. <el-select v-model="searchParams.a4">
  40. <!--<el-option
  41. v-for="item in list"
  42. :label="item.caption"
  43. :value="item.code"
  44. :key="item.code"
  45. ></el-option>-->
  46. </el-select>
  47. </template>
  48. <template slot="searchItem5">
  49. <span class="label">适用功能</span>
  50. <el-select v-model="searchParams.a5">
  51. <!--<el-option
  52. v-for="item in list"
  53. :label="item.caption"
  54. :value="item.code"
  55. :key="item.code"
  56. ></el-option>-->
  57. </el-select>
  58. </template>
  59. <template slot="searchItem6">
  60. <span class="label">目标类型</span>
  61. <el-select v-model="searchParams.a6">
  62. <!--<el-option
  63. v-for="item in list"
  64. :label="item.caption"
  65. :value="item.code"
  66. :key="item.code"
  67. ></el-option>-->
  68. </el-select>
  69. </template>
  70. <template slot="searchItem7">
  71. <span class="label">是否存在盲区</span>
  72. <el-radio v-model="searchParams.a7" label="1"
  73. >是</el-radio
  74. >
  75. <el-radio v-model="searchParams.a7" label="0"
  76. >否</el-radio
  77. >
  78. </template>
  79. <template slot="searchItem8">
  80. <span class="label">是否发生碰撞</span>
  81. <el-radio v-model="searchParams.a8" label="1"
  82. >是</el-radio
  83. >
  84. <el-radio v-model="searchParams.a8" label="0"
  85. >否</el-radio
  86. >
  87. </template>
  88. <template slot="searchBtn1">
  89. <el-button type="primary" @click="doSearch">查询</el-button>
  90. </template>
  91. <template slot="searchBtn2">
  92. <el-button type="primary" @click="doReset">重置</el-button>
  93. </template>
  94. </search-layout>
  95. <div class="myTabsBox myTabsBoxThreeTabs">
  96. <el-button
  97. v-bind:class="{ addBtn: true}"
  98. icon="el-icon-circle-plus-outline"
  99. @click="addOne"
  100. type="primary"
  101. >数据导入</el-button
  102. >
  103. </div>
  104. <tableList
  105. ref="table"
  106. style="margin: 0 30px"
  107. :columns="columns"
  108. :getDataWay="getDataWay"
  109. :pagination="pagination"
  110. index
  111. >
  112. <el-table-column label="操作" slot="cgInfos" align="center">
  113. <template v-slot="scope">
  114. <i
  115. @click="editRow(scope.row)"
  116. class="el-icon-edit-outline elIcon"
  117. title="编辑"
  118. ></i>
  119. <i
  120. @click="delOne(scope.row)"
  121. class="el-icon-delete elIcon"
  122. title="删除"
  123. ></i>
  124. </template>
  125. </el-table-column>
  126. </tableList>
  127. </div>
  128. </template>
  129. <script>
  130. import searchLayout from "@/components/grid/searchLayout";
  131. import tableList from "@/components/grid/TableList";
  132. export default{
  133. name:"trafficAccidentSimulationScene",
  134. components:{searchLayout, tableList},
  135. data(){
  136. return {
  137. searchParams: {
  138. //搜索参数
  139. },
  140. getDataWay:{
  141. //dataType: "url",
  142. dataType: "data",
  143. type: "post",
  144. // firstRequest: false,
  145. // data: this.$api.algorithmsLibrary.selectSharedAlgorithmList,
  146. data:[{a1:'1',a2:'2',a3:'3',a4:'4',a5:'5',a6:'6'}],
  147. param: {},
  148. },
  149. columns: [
  150. //表格列
  151. {
  152. label: "场景名称",
  153. prop: "a1",
  154. },
  155. {
  156. label: "场景来源",
  157. prop: "a2",
  158. },
  159. {
  160. label: "事故类型",
  161. prop: "a3",
  162. },
  163. {
  164. label: "道路类型",
  165. prop: "a4",
  166. },
  167. {
  168. label: "时间",
  169. prop: "a5",
  170. },
  171. {
  172. label: "天气",
  173. prop: "a6",
  174. },
  175. {
  176. label: "操作",
  177. prop: "cgInfos",
  178. template: true
  179. }
  180. ],
  181. pagination: {
  182. //分页使用
  183. currentPage: 1,
  184. pageSize: 10,
  185. position: "right",
  186. pageSizes: [10, 30, 50, 100, 200],
  187. layout: "sizes, total, prev, pager, next, jumper",
  188. },
  189. }
  190. },
  191. methods:{
  192. doSearch() {
  193. this.$nextTick(() => {
  194. this.refreshList(this.searchParams);
  195. });
  196. },
  197. refreshList(param) {
  198. param
  199. ? this.$refs["table"].loadData(param)
  200. : this.$refs["table"].loadData();
  201. },
  202. doReset() {
  203. this.searchParams = {
  204. };
  205. this.doSearch();
  206. },
  207. addOne() {
  208. },
  209. editRow(row) {
  210. },
  211. delOne(row) {
  212. this.$confirm("确认是否删除?", "提示", {
  213. confirmButtonText: "确定",
  214. cancelButtonText: "取消",
  215. type: "warning",
  216. }).then(() => {
  217. });
  218. },
  219. }
  220. }
  221. </script>
  222. <style scope lang="less">
  223. .myTabsBox{
  224. min-height:99px;
  225. }
  226. </style>