123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <template>
- <div class="generalizationScenarioListPanel">
- <search-layout :needBox="true">
- <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
- size="small"
- clearable
- >
- <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="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="myTabsBox">
- <el-tabs v-model="activeName" type="card" @tab-click="pageControl">
- <el-tab-pane label="公有" name="1"></el-tab-pane>
- <el-tab-pane label="私有" name="2"></el-tab-pane>
- </el-tabs>
- </div>
- <tableList
- ref="table"
- style="margin: 0 30px 30px"
- :columns="columns"
- :getDataWay="getDataWay"
- :pagination="pagination"
- index
- >
- <el-table-column
- label="操作"
- slot="cgInfos"
- align="center"
- width="180"
- >
- <template v-slot="scope">
- <span @click="viewRow(scope.row)" class="elIcon">
- 查看模板
- </span>
- </template>
- </el-table-column>
- </tableList>
- <el-dialog
- v-if="generalizationVisible"
- :visible.sync="generalizationVisible"
- :title="generalizationDiaTitle"
- width="90%"
- class="generalizationDia"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :before-close="generalizationCancel"
- >
- <div>
- <generalization-detail
- ref="generalizationDetail"
- :disabled="true"
- :id="generalizationId"
- :genUrlType="1"
- ></generalization-detail>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import searchLayout from "@/components/grid/searchLayout";
- import tableList from "@/components/grid/TableList";
- import generalizationDetail from "./components/generalizationDetail";
- import { mapState } from "vuex";
- export default {
- name: "generalizationScenarioList",
- components: { searchLayout, tableList, generalizationDetail },
- data() {
- return {
- activeName: "2",
- searchParams: {
-
- sceneId: "",
- fileName: [],
- scenarioRoadType: [],
- share: "0",
-
-
- },
- fileNameList: [],
- scenarioRoadTypeList: [],
-
- 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: "cgInfos",
- template: true,
- },
- ],
- pagination: {
-
- currentPage: 1,
- pageSize: 10,
- position: "right",
- pageSizes: [10, 30, 50, 100, 200],
- layout: "sizes, total, prev, pager, next, jumper",
- },
- getDataWay: {
-
- dataType: "url",
- type: "post",
-
- data: this.$api.sceneLibrary.querySceneGeneralTemplateList,
- param: {
- share: "0",
- },
- },
- generalizationVisible: false,
- generalizationId: "",
- generalizationDiaTitle: "",
- };
- },
- computed: {
- ...mapState(["fileHost", "fileUrl"]),
- },
- methods: {
- doSearch() {
- this.searchParams.share = this.activeName === "1" ? "1" : "0";
- this.refreshList(this.searchParams);
- },
-
- refreshList(param) {
- param
- ? this.$refs["table"].loadData(param)
- : this.$refs["table"].loadData();
- },
- doReset() {
- this.searchParams = {
- sceneId: "",
- fileName: [],
- scenarioRoadType: [],
- share: this.activeName === "1" ? "1" : "0",
-
-
- };
- this.doSearch();
- },
- pageControl(data) {
- this.activeName = data.name;
- this.doSearch();
- },
- viewRow(row) {
- this.generalizationId = row.id;
- this.generalizationDiaTitle = "泛化场景 " + row.sceneId;
- this.generalizationVisible = true;
- },
- 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 || "获取功能模块列表失败");
- }
- });
- },
-
- generalizationCancel() {
- this.generalizationVisible = false;
- },
- },
- async mounted() {
- await this.$dicsListsInit({
-
- scenarioRoadTypeList: "scenarioRoadType",
- });
- this.getFileNameList();
- },
- };
- </script>
- <style lang='less' scoped>
- @import "./common/util.less";
- .generalizationScenarioListPanel {
- .inputBox {
- .label {
- min-width: 90px;
- }
- }
- .btnsPanel {
- text-align: right;
- }
- .generalizationDia {
- /deep/ .el-dialog__body {
- position: relative;
- padding: 20px 60px;
- .changeBtn {
- position: absolute;
- top: 20px;
- right: 60px;
- }
- }
- }
- }
- </style>
|