浏览代码

场景包管理

zhangliang2 2 年之前
父节点
当前提交
909d4eeba1

+ 18 - 3
src/api/systemManagement.js

@@ -2,7 +2,7 @@ const basePart = '/simulation/resource/server'
 //账户管理
 const getUserPageList = basePart + '/user/getUserPageList'
 const saveUser = basePart + '/user/saveUser'
-const saveDefaultPassword = basePart +  '/user/saveDefaultPassword'
+const saveDefaultPassword = basePart + '/user/saveDefaultPassword'
 const saveVisible = basePart + '/user/saveVisible'
 //参数管理
 const getParameterList = basePart + '/parameter/getParameterList'
@@ -14,8 +14,16 @@ const saveCluster = basePart + '/cluster/saveCluster'
 const getClusterHistory = basePart + '/cluster/getClusterHistory'
 const getClusterNum = basePart + '/cluster/getClusterNum'
 
+//场景包管理
+const querySystemScenePackageList = basePart + '/SystemScenePackage/querySystemScenePackageList' // 场景包列表
+const saveSystemScenePackage = basePart + '/SystemScenePackage/saveSystemScenePackage' // 保存场景包详情
+const querySystemScenePackageById = basePart + '/SystemScenePackage/querySystemScenePackageById' // 编辑场景包详情
+const deleteSystemScenePackage = basePart + '/SystemScenePackage/deleteSystemScenePackage' // 删除场景包
+const saveUserByPackageId = basePart + '/SystemScenePackage/saveUserByPackageId' // 新增分配的账户
+const deleteUserByPackageId = basePart + '/SystemScenePackage/deleteUserByPackageId' // 删除分配的账户
 
-export default{
+
+export default {
     getUserPageList,
     saveUser,
     saveDefaultPassword,
@@ -26,5 +34,12 @@ export default{
     getClusterList,
     saveCluster,
     getClusterHistory,
-    getClusterNum
+    getClusterNum,
+
+    querySystemScenePackageList,
+    saveSystemScenePackage,
+    querySystemScenePackageById,
+    deleteSystemScenePackage,
+    saveUserByPackageId,
+    deleteUserByPackageId
 }

+ 18 - 0
src/router/systemManagement.js

@@ -70,6 +70,24 @@ export default [{
     },
     component: () => import("@/views/systemManagement/sceneLibraryManagement/sceneLibraryManagement")
 },
+{
+    path: "/scenePacketListManagement",
+    name: "scenePacketListManagement",
+    meta: {
+        tabname: "场景包管理",
+        menuKind: "systemManagement"
+    },
+    component: () => import("@/views/systemManagement/scenePacketListManagement/index")
+},
+{
+    path: "/scenePacketDetail",
+    name: "scenePacketDetail",
+    meta: {
+        tabname: "场景包详情",
+        menuKind: "systemManagement"
+    },
+    component: () => import("@/views/systemManagement/scenePacketListManagement/detail")
+},
 {
     path: "/reportTemplateManagement",
     name: "reportTemplateManagement",

+ 4 - 0
src/views/page/pageMenu.vue

@@ -70,6 +70,10 @@
                         <i class="my-icon-home"></i>
                         <span>首页</span>
                     </el-menu-item>
+                    <el-menu-item index="scenePacketListManagement" class="indexMenu">
+                        <i class="my-icon-home"></i>
+                        <span>场景包管理</span>
+                    </el-menu-item>
                     
                     <!--
                     <el-submenu :index="menus[1]">

+ 114 - 0
src/views/systemManagement/scenePacketListManagement/common/tool.js

@@ -0,0 +1,114 @@
+import searchLayout from "@/components/grid/searchLayout";
+import tableList from "@/components/grid/TableList";
+
+export default {
+    components: {
+        searchLayout,
+        tableList
+    },
+    data() {
+        return {
+            pagination: {
+                //分页使用
+                currentPage: 1,
+                pageSize: 10,
+                position: "right",
+                pageSizes: [10, 30, 50, 100, 200],
+                layout: "sizes, total, prev, pager, next, jumper",
+            },
+            selected: false, // 是否选中展示已选择项
+            checkedArr: [], // 列表当前页已选
+            checkedNames: [], // 列表所有已选
+        };
+    },
+    props: {
+        sceneType: {
+            type: String,
+            default: "",
+        },
+        nameType: {
+            type: String,
+            default: "",
+        },
+    },
+    methods: {
+        doSearch() {
+            let data = {
+                ...this.searchParams
+            };
+            if (this.selected) {
+                data.allSceneNames = this.checkedNames;
+            } else {
+                data.allSceneNames = null;
+            }
+
+            this.refreshList(data);
+        },
+        //刷新table
+        refreshList(param) {
+            param
+                ?
+                this.$refs["table"].loadData(param) :
+                this.$refs["table"].loadData();
+        },
+        // 数据加载后的回调
+        loadedCallBack() {
+            this.checkedArr = [];
+            this.$refs.table.tableData.forEach((i) => {
+                if (this.checkedNames.includes(i[this.sceneType])) {
+                    // 显示已选中的项
+                    this.$refs.table.$refs.ListTable.toggleRowSelection(
+                        i,
+                        true
+                    );
+                    this.checkedArr.push(i);
+                }
+            });
+        },
+        // 用户勾选完执行函数后的回调
+        selectedCallBack(row, type) {
+            if (type === 1) {
+                if (!this.checkedNames.includes(row[this.sceneType])) {
+                    this.checkedNames.push(row[this.sceneType]);
+                }
+            } else {
+                let index = this.checkedNames.indexOf(row[this.sceneType]);
+                if (index > -1) {
+                    this.checkedNames.splice(index, 1);
+                }
+            }
+
+            if (this.sceneType === "sceneName") {
+                this.$emit("selectedData", this.sceneType, this.checkedNames, this.nameType);
+            } else {
+                this.$emit("selectedData", this.sceneType, this.checkedNames);
+            }
+        },
+        // 用户勾选全选执行函数后的回调
+        selectedAllCallBack(selection, type) {
+            if (type === 1) {
+                selection.forEach((i) => {
+                    if (!this.checkedNames.includes(i[this.sceneType])) {
+                        this.checkedNames.push(i[this.sceneType]);
+                    }
+                });
+            } else {
+                this.$refs.table.tableData.forEach((i) => {
+                    let index = this.checkedNames.indexOf(i[this.sceneType]);
+                    if (index > -1) {
+                        this.checkedNames.splice(index, 1);
+                    }
+                });
+            }
+
+            if (this.sceneType === "sceneName") {
+                this.$emit("selectedData", this.sceneType, this.checkedNames, this.nameType);
+            } else {
+                this.$emit("selectedData", this.sceneType, this.checkedNames);
+            }
+        },
+        selectedShow() {
+            this.doSearch();
+        },
+    },
+}

+ 343 - 0
src/views/systemManagement/scenePacketListManagement/detail.vue

@@ -0,0 +1,343 @@
+<template>
+    <div class="scenePacketDetailPanel">
+        <el-form ref="form" :model="form" :rules="rules" label-width="108px">
+            <el-form-item label="场景包名称:" prop="packageName">
+                <el-input
+                    placeholder="请输入"
+                    maxlength="50"
+                    v-autoTrim="{ obj: form, key: 'packageName' }"
+                    v-model="form.packageName"
+                >
+                </el-input>
+            </el-form-item>
+
+            <el-form-item label="场景包描述:" prop="sceneDescribe">
+                <el-input
+                    placeholder="请输入"
+                    maxlength="300"
+                    v-autoTrim="{ obj: form, key: 'sceneDescribe' }"
+                    v-model="form.sceneDescribe"
+                    type="textarea"
+                    :autosize="{ minRows: 4, maxRows: 4 }"
+                >
+                </el-input>
+            </el-form-item>
+        </el-form>
+
+        <div class="flexBox summaryBox">
+            <div class="num">
+                场景总数:
+                {{
+                    form.jtSceneNames.length +
+                    form.zrSceneNames.length +
+                    form.bzSceneNames.length +
+                    form.fhSceneNames.length
+                }}
+            </div>
+            <div class="numA">交通事故场景: {{ form.jtSceneNames.length }}</div>
+            <div class="numA">自然驾驶场景: {{ form.zrSceneNames.length }}</div>
+            <div class="numA">标准法规场景: {{ form.bzSceneNames.length }}</div>
+            <div class="num">泛化场景: {{ form.fhSceneNames.length }}</div>
+        </div>
+
+        <div class="myTabsBox myTabsBoxThreeTabs">
+            <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-tab-pane label="标准法规场景" name="3"></el-tab-pane>
+                <el-tab-pane label="泛化场景" name="4"></el-tab-pane>
+            </el-tabs>
+        </div>
+
+        <div class="listBox">
+            <traffic-accident-simulation-list
+                v-show="activeName === '1'"
+                ref="listA"
+                :sceneType="types[0]"
+                nameType="1"
+                @selectedData="selectedData"
+                :selfDrivingList="selfDrivingList"
+                :targetDrivingList="targetDrivingList"
+                :selfReactionList="selfReactionList"
+                :conflictBehaviorList="conflictBehaviorList"
+                :conflictTypeList="conflictTypeList"
+            ></traffic-accident-simulation-list>
+            <natural-driving-list
+                v-show="activeName === '2'"
+                ref="listB"
+                :sceneType="types[1]"
+                nameType="2"
+                @selectedData="selectedData"
+                :roadList="roadList"
+                :infrastructureList="infrastructureList"
+                :trafficConditionList="trafficConditionList"
+                :selfBehaviorList="selfBehaviorList"
+                :targetBehaviorList="targetBehaviorList"
+                :naturalEnvironmentList="naturalEnvironmentList"
+                :temporaryOperationList="temporaryOperationList"
+            ></natural-driving-list>
+            <standard-regulation-simulation-list
+                v-show="activeName === '3'"
+                ref="listC"
+                :sceneType="types[2]"
+                @selectedData="selectedData"
+                :regulationTypeList="regulationTypeList"
+            ></standard-regulation-simulation-list>
+            <generalization-list
+                v-show="activeName === '4'"
+                ref="listD"
+                :sceneType="types[3]"
+                @selectedData="selectedData"
+                :scenarioWeatherList="scenarioWeatherList"
+            ></generalization-list>
+        </div>
+
+        <div class="btns">
+            <el-button type="primary" @click="save">确定</el-button>
+            <el-button type="primary" plain @click="cancel">取消</el-button>
+        </div>
+    </div>
+</template>
+
+<script>
+import trafficAccidentSimulationList from "./trafficAccidentSimulationList";
+import naturalDrivingList from "./naturalDrivingList";
+import standardRegulationSimulationList from "./standardRegulationSimulationList";
+import generalizationList from "./generalizationList";
+
+export default {
+    name: "scenePacketDetail", // 场景包详情
+    components: {
+        trafficAccidentSimulationList,
+        naturalDrivingList,
+        standardRegulationSimulationList,
+        generalizationList,
+    },
+    data() {
+        return {
+            activeName: "1",
+            form: {
+                id: "",
+                packageName: "", // 场景包名称
+                sceneDescribe: "", // 场景包描述
+                jtSceneNames: [], // 交通事故自然场景ids
+                zrSceneNames: [], // 自然场景ids
+                bzSceneNames: [], // 标准法规场景ids
+                fhSceneNames: [], // 泛化模板场景ids
+            },
+            rules: {
+                packageName: [
+                    { required: true, message: "请输入", trigger: "blur" },
+                ],
+                sceneDescribe: [
+                    { required: true, message: "请输入", trigger: "blur" },
+                ],
+            },
+            types: ["sceneName", "naturalName", "sceneName", "sceneId"],
+            selfDrivingList: [],
+            targetDrivingList: [],
+            selfReactionList: [],
+            conflictBehaviorList: [],
+            conflictTypeList: [],
+            roadList: [],
+            infrastructureList: [],
+            trafficConditionList: [],
+            selfBehaviorList: [],
+            targetBehaviorList: [],
+            naturalEnvironmentList: [],
+            temporaryOperationList: [],
+            regulationTypeList: [],
+            fileNameList: [],
+            scenarioWeatherList: [],
+        };
+    },
+
+    methods: {
+        pageControl() {},
+        selectedData(sceneType, arr, nameType) {
+            switch (sceneType) {
+                case this.types[0]:
+                    if (nameType === "1") {
+                        this.form.jtSceneNames = arr;
+                    } else {
+                        this.form.bzSceneNames = arr;
+                    }
+                    break;
+                case this.types[1]:
+                    this.form.zrSceneNames = arr;
+                    break;
+                // case this.types[2]:
+                //     this.form.bzSceneNames = arr;
+                //     break;
+                case this.types[3]:
+                    this.form.fhSceneNames = arr;
+                    break;
+                default:
+                    break;
+            }
+        },
+        save() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    if (
+                        this.form.jtSceneNames.length === 0 &&
+                        this.form.zrSceneNames.length === 0 &&
+                        this.form.bzSceneNames.length === 0 &&
+                        this.form.fhSceneNames.length === 0
+                    ) {
+                        this.$message.error("请先选择场景");
+                        return;
+                    }
+
+                    this.$axios({
+                        method: "post",
+                        url: this.$api.systemManagement.saveSystemScenePackage,
+                        data: { ...this.form },
+                    }).then((res) => {
+                        if (res.code == 200) {
+                            this.$message.success("保存成功");
+                            this.cancel();
+                        } else {
+                            this.$message.error(res.message || "保存失败");
+                        }
+                    });
+                }
+            });
+        },
+        cancel() {
+            this.$router.replace({ path: "/scenePacketListManagement" });
+        },
+    },
+
+    async mounted() {
+        await this.$dicsListsInit({
+            selfDrivingList: "selfDriving",
+            targetDrivingList: "targetDriving",
+            selfReactionList: "selfReaction",
+            conflictBehaviorList: "conflictBehavior",
+            conflictTypeList: "conflictType",
+            regulationTypeList: "regulationType",
+            scenarioWeatherList: "scenarioWeather",
+        });
+
+        await this.$dicsTreesInit({
+            roadList: "road",
+            infrastructureList: "infrastructure",
+            trafficConditionList: "trafficCondition",
+            selfBehaviorList: "selfBehavior",
+            targetBehaviorList: "targetBehavior",
+            naturalEnvironmentList: "naturalEnvironment",
+            temporaryOperationList: "temporaryOperation",
+        });
+
+        if (this.$route.query.id) {
+            this.$axios({
+                method: "post",
+                url: this.$api.systemManagement.querySystemScenePackageById,
+                data: { id: this.$route.query.id },
+            }).then((res) => {
+                if (res.code == 200 && res.info) {
+                    this.form = res.info;
+                    this.$refs.listA.checkedNames = res.info.jtSceneNames;
+                    this.$refs.listB.checkedNames = res.info.zrSceneNames;
+                    this.$refs.listC.checkedNames = res.info.bzSceneNames;
+                    this.$refs.listD.checkedNames = res.info.fhSceneNames;
+
+                    this.$refs.listA.loadedCallBack();
+                    this.$refs.listB.loadedCallBack();
+                    this.$refs.listC.loadedCallBack();
+                    this.$refs.listD.loadedCallBack();
+                } else {
+                    this.$message.error(res.message || "获取信息失败");
+                }
+            });
+        }
+    },
+};
+</script>
+
+<style lang='less' scoped>
+.scenePacketDetailPanel {
+    padding: 30px 30px 0;
+
+    .el-form {
+        .el-form-item {
+            width: 60%;
+        }
+
+        .el-input {
+            width: 100%;
+        }
+    }
+
+    .summaryBox {
+        padding: 20px 20px 30px 0;
+        color: @themeColor;
+        font-size: 18px;
+        font-weight: bold;
+
+        > div {
+            margin-right: 30px;
+        }
+
+        .num {
+            min-width: 120px;
+        }
+
+        .numA {
+            min-width: 156px;
+        }
+    }
+
+    .listBox {
+        /deep/ .searchLayout .el-input,
+        .el-select {
+            width: 230px;
+        }
+
+        /deep/ .label {
+            min-width: 90px;
+        }
+
+        /deep/ .isSelected {
+            padding: 0 0 10px 10px;
+        }
+    }
+
+    .myTabsBox {
+        padding-top: 10px;
+        /deep/ .el-tabs__nav-scroll {
+            &:after {
+                width: 100%;
+            }
+        }
+
+        &.myTabsBoxThreeTabs {
+            /deep/ .el-tabs {
+                width: auto;
+                margin: 0;
+            }
+
+            /deep/ .el-tabs__item {
+                width: 120px;
+            }
+        }
+
+        /deep/
+            .el-tabs--top.el-tabs--card
+            > .el-tabs__header
+            .el-tabs__item:nth-child(2) {
+            border-left-color: @gray;
+
+            &.is-active {
+                border-left-color: @themeColor;
+            }
+        }
+    }
+
+    .btns {
+        padding-top: 30px;
+        text-align: center;
+    }
+}
+</style>

+ 191 - 0
src/views/systemManagement/scenePacketListManagement/generalizationList.vue

@@ -0,0 +1,191 @@
+<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.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"
+            :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: [], // 功能模块
+                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: "scenarioTime",
+                },
+                {
+                    label: "天气",
+                    prop: "scenarioWeather",
+                },
+            ],
+            getDataWay: {
+                //加载表格数据
+                dataType: "url",
+                type: "post",
+                // firstRequest: false,
+                data: this.$api.sceneLibrary.querySceneGeneralTemplateList,
+                param: {},
+            },
+        };
+    },
+
+    props: {
+        scenarioWeatherList: {
+            type: Array,
+            default: [],
+        },
+    },
+
+    methods: {
+        doReset() {
+            this.searchParams = {
+                sceneId: "",
+                fileName: [],
+                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>

+ 423 - 0
src/views/systemManagement/scenePacketListManagement/index.vue

@@ -0,0 +1,423 @@
+<template>
+    <div>
+        <search-layout :needBox="true">
+            <template slot="searchItem1">
+                <span class="label">场景包名称</span>
+                <el-input
+                    v-model="searchParams.packageName"
+                    size="small"
+                    clearable
+                    placeholder="请输入"
+                    maxlength="60"
+                    @keyup.enter.native="doSearch"
+                >
+                </el-input>
+            </template>
+            <template slot="searchItem2">
+                <span class="label">创建时间</span>
+                <el-date-picker
+                    v-model="createDate"
+                    type="daterange"
+                    format="yyyy-MM-dd"
+                    value-format="yyyy-MM-dd"
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                >
+                </el-date-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="btnsPanel">
+            <el-button
+                type="primary"
+                icon="el-icon-circle-plus-outline"
+                @click="addOne"
+                >创建</el-button
+            >
+        </div>
+
+        <tableList
+            ref="table"
+            style="margin: 0 30px"
+            :columns="columns"
+            :getDataWay="getDataWay"
+            :pagination="pagination"
+            index
+        >
+            <el-table-column label="操作" slot="cgInfos" align="center">
+                <template v-slot="scope">
+                    <i
+                        @click="editRow(scope.row)"
+                        class="el-icon-edit-outline elIcon"
+                        title="编辑"
+                    ></i>
+                    <i
+                        @click="delRow(scope.row.id, scope.row.packageName)"
+                        class="el-icon-delete elIcon"
+                        title="删除"
+                    ></i>
+                    <i
+                        @click="handleRow(scope.row)"
+                        class="el-icon-setting elIcon"
+                        title="配置账户"
+                    ></i>
+                </template>
+            </el-table-column>
+        </tableList>
+
+        <el-dialog
+            title="账户分配"
+            :visible.sync="dialogVisible"
+            width="780px"
+            :close-on-click-modal="false"
+            :close-on-press-escape="false"
+            :before-close="cancelDown"
+        >
+            <div class="infoBox">
+                <div class="info">
+                    <span>场景包名称:</span>
+                    <b>{{ packetInfo.packageName }}</b>
+                </div>
+                <div class="info">
+                    <span>场景包描述:</span>
+                    <b>{{ packetInfo.sceneDescribe }}</b>
+                </div>
+                <div class="boxA">
+                    <div class="info">
+                        <span>自然驾驶场景:</span>
+                        <b>{{
+                            packetInfo.zrSceneNames
+                                ? packetInfo.zrSceneNames.length
+                                : 0
+                        }}</b>
+                    </div>
+                    <div class="info">
+                        <span>交通事故场景:</span>
+                        <b>{{
+                            packetInfo.jtSceneNames
+                                ? packetInfo.jtSceneNames.length
+                                : 0
+                        }}</b>
+                    </div>
+                </div>
+                <div class="boxA">
+                    <div class="info">
+                        <span>标准法规场景:</span>
+                        <b>{{
+                            packetInfo.bzSceneNames
+                                ? packetInfo.bzSceneNames.length
+                                : 0
+                        }}</b>
+                    </div>
+                    <div class="info">
+                        <span>泛化场景:</span>
+                        <b>{{
+                            packetInfo.fhSceneNames
+                                ? packetInfo.fhSceneNames.length
+                                : 0
+                        }}</b>
+                    </div>
+                </div>
+                <div class="transferBox">
+                    <el-transfer
+                        v-model="transferValue"
+                        :data="transferData"
+                        :titles="['未分配', '已分配']"
+                        @change="selectUserChange"
+                    ></el-transfer>
+                </div>
+            </div>
+            <span slot="footer">
+                <el-button type="primary" @click="cancelDown">关 闭</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import searchLayout from "@/components/grid/searchLayout";
+import tableList from "@/components/grid/TableList";
+
+export default {
+    name: "scenePacketListManagement", // 场景包管理
+    components: { searchLayout, tableList },
+    data() {
+        return {
+            searchParams: {
+                //搜索参数
+                packageName: "", //场景包名称
+                yearMin: "", //创建时间起
+                yearMax: "", //创建时间止
+            },
+            createDate: "",
+            columns: [
+                {
+                    label: "场景包名称",
+                    prop: "packageName",
+                },
+                {
+                    label: "描述",
+                    prop: "sceneDescribe",
+                },
+                {
+                    label: "自然驾驶场景",
+                    prop: "zrCount",
+                },
+                {
+                    label: "交通事故场景",
+                    prop: "jtCount",
+                },
+                {
+                    label: "标准法规场景",
+                    prop: "bzCount",
+                },
+                {
+                    label: "泛化场景",
+                    prop: "fhCount",
+                },
+                {
+                    label: "创建时间",
+                    prop: "asd",
+                    template: true,
+                },
+                {
+                    label: "已配置账户",
+                    prop: "userCount",
+                },
+                {
+                    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",
+                // firstRequest: false,
+                data: this.$api.systemManagement.querySystemScenePackageList,
+                param: {},
+            },
+            dialogVisible: false,
+            packetInfo: {}, // 场景包信息
+            transferData: [], // 穿梭框data
+            transferValue: [], // 穿梭框value
+            userList: [], // 用户数据
+            curRow: "", // 当前操作row
+        };
+    },
+    methods: {
+        doSearch() {
+            if (this.createDate) {
+                this.searchParams.yearMin = `${this.createDate[0]}`;
+                this.searchParams.yearMax = `${this.createDate[1]}`;
+            } else {
+                this.searchParams.yearMin = "";
+                this.searchParams.yearMax = "";
+            }
+
+            let pageMap = {
+                packageName: this.searchParams.packageName,
+                yearMin: this.searchParams.yearMin,
+                yearMax: this.searchParams.yearMax,
+            };
+            this.refreshList(pageMap);
+        },
+        //刷新table
+        refreshList(param) {
+            param
+                ? this.$refs["table"].loadData(param)
+                : this.$refs["table"].loadData();
+        },
+        doReset() {
+            this.searchParams = {
+                packageName: "",
+                yearMin: "",
+                yearMax: "",
+            };
+            this.createDate = "";
+            this.doSearch();
+        },
+        addOne() {
+            this.$router.push({ path: "/scenePacketDetail" });
+        },
+        editRow(row) {
+            this.$router.push({
+                path: "/scenePacketDetail",
+                query: {
+                    id: row.id,
+                },
+            });
+        },
+        delRow(id, packageName) {
+            this.$confirm("确认是否删除?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+            }).then(() => {
+                this.$axios({
+                    method: "post",
+                    url: this.$api.systemManagement.deleteSystemScenePackage,
+                    data: { id, packageName },
+                }).then((res) => {
+                    if (res.code == 200) {
+                        this.$message.success("删除成功");
+                    } else {
+                        this.$message.error(res.message || "删除失败");
+                    }
+                    this.doSearch();
+                });
+            });
+        },
+        async handleRow(row) {
+            this.curRow = row;
+            this.dialogVisible = true;
+            this.transferData = [];
+            this.userList = [];
+            this.transferValue = [];
+
+            await this.$axios({
+                method: "post",
+                url: this.$api.systemManagement.getUserPageList,
+                data: { currentPage: 1, pageNum: 1, pageSize: 100000 },
+            }).then((res) => {
+                if (res.code == 200 && res.info) {
+                    this.userList = res.info.list;
+                    res.info.list.forEach((i) => {
+                        this.transferData.push({
+                            key: i.id,
+                            label: i.username,
+                        });
+                    });
+                } else {
+                    this.$message.error(res.message || "获取信息失败");
+                }
+            });
+
+            await this.$axios({
+                method: "post",
+                url: this.$api.systemManagement.querySystemScenePackageById,
+                data: { id: row.id },
+            }).then((res) => {
+                if (res.code == 200 && res.info) {
+                    this.packetInfo = res.info;
+                    res.info.userIds.forEach((i) => {
+                        this.transferValue.push(i.userId);
+                    });
+                } else {
+                    this.$message.error(res.message || "获取信息失败");
+                }
+            });
+        },
+        /**
+         * 当前值、数据移动的方向('left' / 'right')、发生移动的数据 key 数组
+         */
+        selectUserChange(value, direction, movedKeys) {
+            let ids = [];
+            movedKeys.forEach((i) => {
+                let user = this.userList.find((u) => i === u.id);
+                if (user)
+                    ids.push({ userId: user.id, userName: user.username });
+            });
+
+            let data = {
+                packageId: this.curRow.id,
+                packageName: this.curRow.packageName,
+                userIds: ids,
+            };
+
+            // add
+            if (direction === "right") {
+                this.$axios({
+                    method: "post",
+                    url: this.$api.systemManagement.saveUserByPackageId,
+                    data,
+                }).then((res) => {
+                    if (res.code == 200) {
+                        this.$message.success("增加成功");
+                    } else {
+                        this.$message.error(res.message || "增加失败");
+                    }
+                });
+            } else {
+                // del
+                this.$axios({
+                    method: "post",
+                    url: this.$api.systemManagement.deleteUserByPackageId,
+                    data,
+                }).then((res) => {
+                    if (res.code == 200) {
+                        this.$message.success("删除成功");
+                    } else {
+                        this.$message.error(res.message || "删除失败");
+                    }
+                });
+            }
+        },
+        cancelDown() {
+            this.dialogVisible = false;
+        },
+    },
+
+    mounted() {},
+};
+</script>
+
+<style lang='less' scoped>
+.btnsPanel {
+    margin: 45px 40px 15px;
+    text-align: right;
+}
+
+.infoBox {
+    padding: 0 10px;
+    .info {
+        display: flex;
+        padding-bottom: 10px;
+        word-break: break-all;
+
+        span {
+            display: block;
+            width: 100px;
+        }
+
+        b {
+            flex: 1;
+            font-weight: normal;
+        }
+    }
+
+    .boxA {
+        display: flex;
+
+        .info {
+            flex: 1;
+        }
+    }
+
+    .transferBox {
+        padding-top: 10px;
+        text-align: center;
+
+        /deep/ .el-transfer-panel {
+            text-align: start;
+        }
+    }
+}
+</style>

+ 219 - 0
src/views/systemManagement/scenePacketListManagement/naturalDrivingList.vue

@@ -0,0 +1,219 @@
+<template>
+    <div>
+        <search-layout>
+            <template slot="searchItem1">
+                <span class="label">场景编号</span>
+                <el-input
+                    v-model="searchParams.naturalName"
+                    size="small"
+                    clearable
+                    placeholder="请输入"
+                    maxlength="60"
+                    @keyup.enter.native="doSearch"
+                >
+                </el-input>
+            </template>
+            <template slot="searchItem2">
+                <span class="label">道路</span>
+                <el-cascader
+                    v-model="searchParams.road"
+                    :options="roadList"
+                    :props="props"
+                    clearable
+                    size="small"
+                ></el-cascader>
+            </template>
+            <template slot="searchItem3">
+                <span class="label">基础设施</span>
+                <el-cascader
+                    v-model="searchParams.infrastructure"
+                    :options="infrastructureList"
+                    :props="props"
+                    clearable
+                    size="small"
+                ></el-cascader>
+            </template>
+            <template slot="searchItem4">
+                <span class="label">交通情况</span>
+                <el-cascader
+                    v-model="searchParams.trafficCondition"
+                    :options="trafficConditionList"
+                    :props="props"
+                    clearable
+                    size="small"
+                ></el-cascader>
+            </template>
+            <template slot="searchItem5">
+                <span class="label">自车行为</span>
+                <el-cascader
+                    v-model="searchParams.selfBehavior"
+                    :options="selfBehaviorList"
+                    :props="props"
+                    clearable
+                    size="small"
+                ></el-cascader>
+            </template>
+            <template slot="searchItem6">
+                <span class="label">目标行为</span>
+                <el-cascader
+                    v-model="searchParams.targetBehavior"
+                    :options="targetBehaviorList"
+                    :props="props"
+                    clearable
+                    size="small"
+                ></el-cascader>
+            </template>
+            <template slot="searchItem7">
+                <span class="label">自然环境</span>
+                <el-cascader
+                    v-model="searchParams.naturalEnvironment"
+                    :options="naturalEnvironmentList"
+                    :props="props"
+                    clearable
+                    size="small"
+                ></el-cascader>
+            </template>
+            <template slot="searchItem8">
+                <span class="label">临时性操纵</span>
+                <el-cascader
+                    v-model="searchParams.temporaryOperation"
+                    :options="temporaryOperationList"
+                    :props="props"
+                    clearable
+                    size="small"
+                ></el-cascader>
+            </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"
+            :needSelectedCallBack="true"
+            :selectedCallBack="selectedCallBack"
+            :selectedAllCallBack="selectedAllCallBack"
+            index
+            selection
+        >
+        </tableList>
+    </div>
+</template>
+
+<script>
+import tool from "./common/tool.js";
+
+export default {
+    name: "naturalDrivingList", // 自然驾驶场景
+    mixins: [tool],
+    data() {
+        return {
+            searchParams: {
+                //搜索参数
+                naturalName: "", // 场景编号
+                road: [], // 道路
+                infrastructure: [], // 基础设施
+                trafficCondition: [], // 交通情况
+                selfBehavior: [], // 自车行为
+                targetBehavior: [], // 目标行为
+                naturalEnvironment: [], // 自然环境
+            },
+            props: {
+                multiple: true,
+                label: "dictName",
+                value: "dictCode",
+            },
+            columns: [
+                //表格列
+                {
+                    label: "场景编号",
+                    prop: "naturalName",
+                },
+                {
+                    label: "天气",
+                    prop: "weather",
+                },
+                {
+                    label: "自车行为",
+                    prop: "selfBehavior",
+                },
+                {
+                    label: "目标行为",
+                    prop: "targetBehavior",
+                },
+            ],
+            getDataWay: {
+                //加载表格数据
+                dataType: "url",
+                type: "post",
+                // firstRequest: false,
+                data: this.$api.sceneLibrary.querySceneNaturalList,
+                param: {},
+            },
+        };
+    },
+
+    props: {
+        roadList: {
+            type: Array,
+            default: [],
+        },
+        infrastructureList: {
+            type: Array,
+            default: [],
+        },
+        trafficConditionList: {
+            type: Array,
+            default: [],
+        },
+        selfBehaviorList: {
+            type: Array,
+            default: [],
+        },
+        targetBehaviorList: {
+            type: Array,
+            default: [],
+        },
+        naturalEnvironmentList: {
+            type: Array,
+            default: [],
+        },
+        temporaryOperationList: {
+            type: Array,
+            default: [],
+        },
+    },
+
+    methods: {
+        doReset() {
+            this.searchParams = {
+                naturalName: "",
+                road: [],
+                infrastructure: [],
+                trafficCondition: [],
+                selfBehavior: [],
+                targetBehavior: [],
+                naturalEnvironment: [],
+                temporaryOperation: [],
+            };
+            this.doSearch();
+        },
+    },
+
+    mounted() {},
+};
+</script>
+
+<style lang='less' scoped>
+</style>

+ 135 - 0
src/views/systemManagement/scenePacketListManagement/standardRegulationSimulationList.vue

@@ -0,0 +1,135 @@
+<template>
+    <div>
+        <search-layout>
+            <template slot="searchItem1">
+                <span class="label">场景名称</span>
+                <el-input
+                    v-model="searchParams.sceneName"
+                    size="small"
+                    maxlength="60"
+                    clearable
+                    placeholder="请输入"
+                    @keyup.enter.native="doSearch"
+                >
+                </el-input>
+            </template>
+            <template slot="searchItem2">
+                <span class="label">法规类型</span>
+                <el-select
+                    v-model="searchParams.regulationType"
+                    multiple
+                    clearable
+                    size="small"
+                >
+                    <el-option
+                        v-for="item in regulationTypeList"
+                        :label="item.caption"
+                        :value="item.code"
+                        :key="item.code"
+                    ></el-option>
+                </el-select>
+            </template>
+            <template slot="searchItem3">
+                <span class="label">标准类型</span>
+                <el-input
+                    v-model="searchParams.standardType"
+                    size="small"
+                    maxlength="60"
+                    clearable
+                    placeholder="请输入"
+                    @keyup.enter.native="doSearch"
+                >
+                </el-input>
+            </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"
+            :needSelectedCallBack="true"
+            :selectedCallBack="selectedCallBack"
+            :selectedAllCallBack="selectedAllCallBack"
+            index
+            selection
+        >
+        </tableList>
+    </div>
+</template>
+
+<script>
+import tool from "./common/tool.js";
+
+export default {
+    name: "standardRegulationSimulationList", // 标准法规场景
+    mixins: [tool],
+    data() {
+        return {
+            searchParams: {
+                //搜索参数
+                sceneName: "", //场景名称
+                regulationType: [], //法规类型
+                standardType: "", //标准类型
+            },
+            columns: [
+                //表格列
+                {
+                    label: "场景名称",
+                    prop: "sceneName",
+                },
+                {
+                    label: "法规类型",
+                    prop: "regulationType",
+                },
+                {
+                    label: "标准类型",
+                    prop: "standardType",
+                },
+            ],
+            getDataWay: {
+                //加载表格数据
+                dataType: "url",
+                type: "post",
+                // firstRequest: false,
+                data: this.$api.sceneLibrary.queryStandardsRegulationsList,
+                param: {},
+            },
+        };
+    },
+
+    props: {
+        regulationTypeList: {
+            type: Array,
+            default: [],
+        },
+    },
+
+    methods: {
+        doReset() {
+            this.searchParams = {
+                sceneName: "",
+                regulationType: [],
+                standardType: "",
+            };
+            this.doSearch();
+        },
+    },
+
+    mounted() {},
+};
+</script>
+
+<style lang='less' scoped>
+</style>

+ 216 - 0
src/views/systemManagement/scenePacketListManagement/trafficAccidentSimulationList.vue

@@ -0,0 +1,216 @@
+<template>
+    <div>
+        <search-layout>
+            <template slot="searchItem1">
+                <span class="label">场景名称</span>
+                <el-input
+                    v-model="searchParams.sceneName"
+                    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.selfDriving"
+                    multiple
+                    clearable
+                >
+                    <el-option
+                        v-for="item in selfDrivingList"
+                        :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.targetDriving"
+                    multiple
+                    clearable
+                >
+                    <el-option
+                        v-for="item in targetDrivingList"
+                        :label="item.caption"
+                        :value="item.code"
+                        :key="item.code"
+                    ></el-option>
+                </el-select>
+            </template>
+            <template slot="searchItem4">
+                <span class="label">自车反应行为</span>
+                <el-select
+                    v-model="searchParams.selfReaction"
+                    multiple
+                    clearable
+                >
+                    <el-option
+                        v-for="item in selfReactionList"
+                        :label="item.caption"
+                        :value="item.code"
+                        :key="item.code"
+                    ></el-option>
+                </el-select>
+            </template>
+            <template slot="searchItem5">
+                <span class="label">冲突行为</span>
+                <el-select
+                    v-model="searchParams.conflictBehavior"
+                    multiple
+                    clearable
+                >
+                    <el-option
+                        v-for="item in conflictBehaviorList"
+                        :label="item.caption"
+                        :value="item.code"
+                        :key="item.code"
+                    ></el-option>
+                </el-select>
+            </template>
+            <template slot="searchItem6">
+                <span class="label">冲突类型</span>
+                <el-select
+                    v-model="searchParams.conflictType"
+                    multiple
+                    clearable
+                >
+                    <el-option
+                        v-for="item in conflictTypeList"
+                        :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="isSelected">
+            <el-checkbox v-model="selected" @change="selectedShow"
+                >已选择</el-checkbox
+            >
+        </div>
+        <tableList
+            ref="table"
+            :columns="columns"
+            :getDataWay="getDataWay"
+            :pagination="pagination"
+            :checkedData="checkedArr"
+            :needSelectedCallBack="true"
+            :selectedCallBack="selectedCallBack"
+            :selectedAllCallBack="selectedAllCallBack"
+            index
+            selection
+        >
+        </tableList>
+    </div>
+</template>
+
+<script>
+import tool from "./common/tool.js";
+
+export default {
+    name: "trafficAccidentSimulationList", // 交通事故场景
+    mixins: [tool],
+    data() {
+        return {
+            searchParams: {
+                //搜索参数
+                sceneName: "", //场景名称
+                selfDriving: [], //自车驾驶行为
+                targetDriving: [], //目标驾驶行为
+                selfReaction: [], //自车反应行为
+                conflictBehavior: [], //冲突行为
+                conflictType: [], //冲突类型
+            },
+            columns: [
+                //表格列
+                {
+                    label: "场景名称",
+                    prop: "sceneName",
+                },
+                {
+                    label: "自车驾驶行为",
+                    prop: "selfDriving",
+                },
+                {
+                    label: "目标驾驶行为",
+                    prop: "targetDriving",
+                },
+                {
+                    label: "自车反应行为",
+                    prop: "selfReaction",
+                },
+                {
+                    label: "冲突行为",
+                    prop: "conflictBehavior",
+                },
+                {
+                    label: "冲突类型",
+                    prop: "conflictType",
+                },
+            ],
+            getDataWay: {
+                //加载表格数据
+                dataType: "url",
+                type: "post",
+                // firstRequest: false,
+                data: this.$api.sceneLibrary.querySceneAccidentList,
+                param: {},
+            },
+        };
+    },
+
+    props: {
+        selfDrivingList: {
+            type: Array,
+            default: [],
+        },
+        targetDrivingList: {
+            type: Array,
+            default: [],
+        },
+        selfReactionList: {
+            type: Array,
+            default: [],
+        },
+        conflictBehaviorList: {
+            type: Array,
+            default: [],
+        },
+        conflictTypeList: {
+            type: Array,
+            default: [],
+        },
+    },
+
+    methods: {
+        doReset() {
+            this.searchParams = {
+                sceneName: "",
+                selfDriving: [],
+                targetDriving: [],
+                selfReaction: [],
+                conflictBehavior: [],
+                conflictType: [],
+            };
+            this.doSearch();
+        },
+    },
+
+    mounted() {},
+};
+</script>
+
+<style lang='less' scoped>
+</style>

+ 4 - 4
vue.config.js

@@ -88,8 +88,8 @@ module.exports = {
                 // target: 'http://10.10.83.145:6888/user-center',
                 // target: 'http://10.12.10.70/simulation',
                 // target: 'http://10.12.10.70:7001', // 登录
-                // target: 'http://10.12.10.73:7003',  // 王志强
-                target: 'http://10.12.10.70', // windowstest
+                target: 'http://10.12.10.73:7003',  // 王志强
+                // target: 'http://10.12.10.70', // windowstest
                 // target: 'http://10.12.10.87:8001',  // 赵艳
                 // target: 'http://10.12.10.72:8001',  // 王晓峰
                 // target: 'http://192.168.30.75',  // gq
@@ -103,11 +103,11 @@ module.exports = {
                 }
             },
             '/simulation/resource/server': {
-                // target: 'http://10.12.10.73:7003', // 王志强
+                target: 'http://10.12.10.73:7003', // 王志强
                 // target: 'http://10.12.10.88:7003', // 王耀栋
                 // target: 'http://10.12.10.72:7003',  // 王晓峰
                 // target: 'http://10.12.10.87:7003',  // 赵艳
-                target: 'http://10.12.10.70',  // windowstest
+                // target: 'http://10.12.10.70',  // windowstest
                 // target: 'http://192.168.30.75',  // gq
                 // target: 'http://47.94.105.148',  // aliyun
                 // target: 'http://47.93.217.159',  // aliyun-dev