generalizationList.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <div>
  3. <search-layout>
  4. <template slot="searchItem1">
  5. <span class="label">场景类型编号</span>
  6. <el-input
  7. v-model="searchParams.sceneId"
  8. size="small"
  9. clearable
  10. placeholder="请输入"
  11. maxlength="60"
  12. @keyup.enter.native="doSearch"
  13. >
  14. </el-input>
  15. </template>
  16. <template slot="searchItem2">
  17. <span class="label">功能模块</span>
  18. <el-select
  19. v-model="searchParams.fileName"
  20. multiple
  21. clearable
  22. size="small"
  23. >
  24. <el-option
  25. v-for="item in fileNameList"
  26. :label="item.caption"
  27. :value="item.code"
  28. :key="item.code"
  29. ></el-option>
  30. </el-select>
  31. </template>
  32. <template slot="searchItem3">
  33. <span class="label">道路类型</span>
  34. <el-select
  35. v-model="searchParams.scenarioRoadType"
  36. multiple
  37. size="small"
  38. clearable
  39. >
  40. <el-option
  41. v-for="item in scenarioRoadTypeList"
  42. :label="item.caption"
  43. :value="item.code"
  44. :key="item.code"
  45. ></el-option>
  46. </el-select>
  47. </template>
  48. <!-- <template slot="searchItem3">
  49. <span class="label">天气</span>
  50. <el-select
  51. v-model="searchParams.scenarioWeather"
  52. multiple
  53. clearable
  54. size="small"
  55. >
  56. <el-option
  57. v-for="item in scenarioWeatherList"
  58. :label="item.caption"
  59. :value="item.code"
  60. :key="item.code"
  61. ></el-option>
  62. </el-select>
  63. </template>
  64. <template slot="searchItem4">
  65. <span class="label">时间</span>
  66. <el-time-picker
  67. v-model="searchParams.scenarioTime"
  68. value-format="HH:mm:ss"
  69. placeholder="时间"
  70. >
  71. </el-time-picker>
  72. </template> -->
  73. <template slot="searchBtn1">
  74. <el-button type="primary" @click="doSearch">查询</el-button>
  75. </template>
  76. <template slot="searchBtn2">
  77. <el-button type="primary" @click="doReset">重置</el-button>
  78. </template>
  79. </search-layout>
  80. <div class="isSelected">
  81. <el-checkbox v-model="selected" @change="selectedShow"
  82. >已选择</el-checkbox
  83. >
  84. </div>
  85. <tableList
  86. ref="table"
  87. :columns="columns"
  88. :getDataWay="getDataWay"
  89. :pagination="pagination"
  90. :checkedData="checkedArr"
  91. :needLoadedCallBack="true"
  92. :loadedCallBack="loadedCallBack"
  93. :needSelectedCallBack="true"
  94. :selectedCallBack="selectedCallBack"
  95. :selectedAllCallBack="selectedAllCallBack"
  96. index
  97. selection
  98. >
  99. </tableList>
  100. </div>
  101. </template>
  102. <script>
  103. import tool from "./common/tool.js";
  104. export default {
  105. name: "generalizationList", // 泛化场景模板
  106. mixins: [tool],
  107. data() {
  108. return {
  109. searchParams: {
  110. //搜索参数
  111. sceneId: "", // 场景类型编号
  112. fileName: [], // 功能模块
  113. scenarioRoadType: [], // 道路类型
  114. share: "0",
  115. // scenarioWeather: [], // 天气
  116. // scenarioTime: "", // 时间
  117. },
  118. labels: [],
  119. fileNameList: [],
  120. props: {
  121. multiple: true,
  122. label: "dictName",
  123. value: "dictCode",
  124. },
  125. columns: [
  126. //表格列
  127. {
  128. label: "编号",
  129. prop: "sceneId",
  130. },
  131. {
  132. label: "场景名称",
  133. prop: "scenarioName",
  134. },
  135. {
  136. label: "功能模块",
  137. prop: "fileName",
  138. },
  139. {
  140. label: "道路类型",
  141. prop: "scenarioRoadType",
  142. },
  143. {
  144. label: "场景简述",
  145. prop: "scenarioResume",
  146. },
  147. // {
  148. // label: "时间",
  149. // prop: "scenarioTime",
  150. // },
  151. // {
  152. // label: "天气",
  153. // prop: "scenarioWeather",
  154. // },
  155. ],
  156. getDataWay: {
  157. //加载表格数据
  158. dataType: "url",
  159. type: "post",
  160. // firstRequest: false,
  161. data: this.$api.sceneLibrary.querySceneGeneralTemplateList,
  162. param: {
  163. share: "0",
  164. },
  165. },
  166. };
  167. },
  168. props: {
  169. scenarioWeatherList: {
  170. type: Array,
  171. default: [],
  172. },
  173. scenarioRoadTypeList: {
  174. type: Array,
  175. default: [],
  176. },
  177. },
  178. methods: {
  179. doReset() {
  180. this.searchParams = {
  181. sceneId: "",
  182. fileName: [],
  183. scenarioRoadType: [],
  184. share: "0",
  185. // scenarioWeather: [],
  186. // scenarioTime: "",
  187. };
  188. this.doSearch();
  189. },
  190. getFileNameList() {
  191. this.$axios({
  192. method: "post",
  193. url: this.$api.sceneLibrary.queryType,
  194. data: {},
  195. }).then((res) => {
  196. if (res.code == 200 && res.info) {
  197. let arr = [];
  198. res.info.forEach((item, i) => {
  199. arr[i] = {
  200. code: item,
  201. caption: item,
  202. };
  203. });
  204. this.fileNameList = arr;
  205. } else {
  206. this.$message.error(res.message || "获取功能模块列表失败");
  207. }
  208. });
  209. },
  210. },
  211. mounted() {
  212. this.getFileNameList();
  213. },
  214. };
  215. </script>
  216. <style lang='less' scoped>
  217. </style>