123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- <template>
- <div>
- <search-layout>
- <template slot="searchItem1">
- <span class="label">场景类型编号</span>
- <el-input
- v-model="searchParams.sceneId"
- size="small"
- clearable
- placeholder="请输入"
- maxlength="60"
- @keyup.enter.native="doSearch"
- >
- </el-input>
- </template>
- <template slot="searchItem2">
- <span class="label">功能模块</span>
- <el-select
- v-model="searchParams.fileName"
- multiple
- clearable
- size="small"
- >
- <el-option
- v-for="item in fileNameList"
- :label="item.caption"
- :value="item.code"
- :key="item.code"
- ></el-option>
- </el-select>
- </template>
- <template slot="searchItem3">
- <span class="label">道路类型</span>
- <el-select
- v-model="searchParams.scenarioRoadType"
- multiple
- size="small"
- clearable
- >
- <el-option
- v-for="item in scenarioRoadTypeList"
- :label="item.caption"
- :value="item.code"
- :key="item.code"
- ></el-option>
- </el-select>
- </template>
- <!-- <template slot="searchItem3">
- <span class="label">天气</span>
- <el-select
- v-model="searchParams.scenarioWeather"
- multiple
- clearable
- size="small"
- >
- <el-option
- v-for="item in scenarioWeatherList"
- :label="item.caption"
- :value="item.code"
- :key="item.code"
- ></el-option>
- </el-select>
- </template>
- <template slot="searchItem4">
- <span class="label">时间</span>
- <el-time-picker
- v-model="searchParams.scenarioTime"
- value-format="HH:mm:ss"
- placeholder="时间"
- >
- </el-time-picker>
- </template> -->
- <template slot="searchBtn1">
- <el-button type="primary" @click="doSearch">查询</el-button>
- </template>
- <template slot="searchBtn2">
- <el-button type="primary" @click="doReset">重置</el-button>
- </template>
- </search-layout>
- <div class="isSelected">
- <el-checkbox v-model="selected" @change="selectedShow"
- >已选择</el-checkbox
- >
- </div>
- <tableList
- ref="table"
- :columns="columns"
- :getDataWay="getDataWay"
- :pagination="pagination"
- :checkedData="checkedArr"
- :needLoadedCallBack="true"
- :loadedCallBack="loadedCallBack"
- :needSelectedCallBack="true"
- :selectedCallBack="selectedCallBack"
- :selectedAllCallBack="selectedAllCallBack"
- index
- selection
- >
- </tableList>
- </div>
- </template>
- <script>
- import tool from "./common/tool.js";
- export default {
- name: "generalizationList", // 泛化场景模板
- mixins: [tool],
- data() {
- return {
- searchParams: {
- //搜索参数
- sceneId: "", // 场景类型编号
- fileName: [], // 功能模块
- scenarioRoadType: [], // 道路类型
- share: "0",
- // scenarioWeather: [], // 天气
- // scenarioTime: "", // 时间
- },
- labels: [],
- fileNameList: [],
- props: {
- multiple: true,
- label: "dictName",
- value: "dictCode",
- },
- columns: [
- //表格列
- {
- label: "编号",
- prop: "sceneId",
- },
- {
- label: "场景名称",
- prop: "scenarioName",
- },
- {
- label: "功能模块",
- prop: "fileName",
- },
- {
- label: "道路类型",
- prop: "scenarioRoadType",
- },
- {
- label: "场景简述",
- prop: "scenarioResume",
- },
- // {
- // label: "时间",
- // prop: "scenarioTime",
- // },
- // {
- // label: "天气",
- // prop: "scenarioWeather",
- // },
- ],
- getDataWay: {
- //加载表格数据
- dataType: "url",
- type: "post",
- // firstRequest: false,
- data: this.$api.sceneLibrary.querySceneGeneralTemplateList,
- param: {
- share: "0",
- },
- },
- };
- },
- props: {
- scenarioWeatherList: {
- type: Array,
- default: [],
- },
- scenarioRoadTypeList: {
- type: Array,
- default: [],
- },
- },
- methods: {
- doReset() {
- this.searchParams = {
- sceneId: "",
- fileName: [],
- scenarioRoadType: [],
- share: "0",
- // scenarioWeather: [],
- // scenarioTime: "",
- };
- this.doSearch();
- },
- getFileNameList() {
- this.$axios({
- method: "post",
- url: this.$api.sceneLibrary.queryType,
- data: {},
- }).then((res) => {
- if (res.code == 200 && res.info) {
- let arr = [];
- res.info.forEach((item, i) => {
- arr[i] = {
- code: item,
- caption: item,
- };
- });
- this.fileNameList = arr;
- } else {
- this.$message.error(res.message || "获取功能模块列表失败");
- }
- });
- },
- },
- mounted() {
- this.getFileNameList();
- },
- };
- </script>
- <style lang='less' scoped>
- </style>
|