generalizationScene.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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="searchBtn1">
  71. <el-button type="primary" @click="doSearch">查询</el-button>
  72. </template>
  73. <template slot="searchBtn2">
  74. <el-button type="primary" @click="doReset">重置</el-button>
  75. </template>
  76. </search-layout>
  77. <div class="myTabsBox myTabsBoxThreeTabs">
  78. <el-button
  79. v-bind:class="{ addBtn: true}"
  80. icon="el-icon-circle-plus-outline"
  81. @click="addOne"
  82. type="primary"
  83. >数据导入</el-button
  84. >
  85. </div>
  86. <tableList
  87. ref="table"
  88. style="margin: 0 30px"
  89. :columns="columns"
  90. :getDataWay="getDataWay"
  91. :pagination="pagination"
  92. index
  93. >
  94. <el-table-column label="操作" slot="cgInfos" align="center">
  95. <template v-slot="scope">
  96. <i
  97. @click="editRow(scope.row)"
  98. class="el-icon-edit-outline elIcon"
  99. title="编辑"
  100. ></i>
  101. <i
  102. @click="delOne(scope.row)"
  103. class="el-icon-delete elIcon"
  104. title="删除"
  105. ></i>
  106. </template>
  107. </el-table-column>
  108. </tableList>
  109. </div>
  110. </template>
  111. <script>
  112. import searchLayout from "@/components/grid/searchLayout";
  113. import tableList from "@/components/grid/TableList";
  114. export default{
  115. name:"generalizationScene",
  116. components:{searchLayout, tableList},
  117. data(){
  118. return {
  119. searchParams: {
  120. //搜索参数
  121. },
  122. getDataWay:{
  123. //dataType: "url",
  124. dataType: "data",
  125. type: "post",
  126. // firstRequest: false,
  127. // data: this.$api.algorithmsLibrary.selectSharedAlgorithmList,
  128. data:[{a1:'1',a2:'2',a3:'3',a4:'4',a5:'5',a6:'6'}],
  129. param: {},
  130. },
  131. columns: [
  132. //表格列
  133. {
  134. label: "场景名称",
  135. prop: "a1",
  136. },
  137. {
  138. label: "场景分类",
  139. prop: "a2",
  140. },
  141. {
  142. label: "适用功能",
  143. prop: "a3",
  144. },
  145. {
  146. label: "道路类型",
  147. prop: "a4",
  148. },
  149. {
  150. label: "昼夜情况",
  151. prop: "a5",
  152. },
  153. {
  154. label: "天气",
  155. prop: "a6",
  156. },
  157. {
  158. label: "操作",
  159. prop: "cgInfos",
  160. template: true
  161. }
  162. ],
  163. pagination: {
  164. //分页使用
  165. currentPage: 1,
  166. pageSize: 10,
  167. position: "right",
  168. pageSizes: [10, 30, 50, 100, 200],
  169. layout: "sizes, total, prev, pager, next, jumper",
  170. },
  171. }
  172. },
  173. methods:{
  174. doSearch() {
  175. this.$nextTick(() => {
  176. this.refreshList(this.searchParams);
  177. });
  178. },
  179. refreshList(param) {
  180. param
  181. ? this.$refs["table"].loadData(param)
  182. : this.$refs["table"].loadData();
  183. },
  184. doReset() {
  185. this.searchParams = {
  186. };
  187. this.doSearch();
  188. },
  189. addOne() {
  190. },
  191. editRow(row) {
  192. },
  193. delOne(row) {
  194. this.$confirm("确认是否删除?", "提示", {
  195. confirmButtonText: "确定",
  196. cancelButtonText: "取消",
  197. type: "warning",
  198. }).then(() => {
  199. });
  200. },
  201. }
  202. }
  203. </script>
  204. <style scope lang="less">
  205. .myTabsBox{
  206. min-height:99px;
  207. }
  208. </style>