gaoshp
2024-05-15 2fecb82051ba70d9bde4eb1a7d078191b16d8d55
src/views/console/tooling/Tray.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-05-12 20:02:31
 * @LastEditors: Sneed
 * @LastEditTime: 2024-05-13 23:27:37
 * @LastEditTime: 2024-05-15 21:53:13
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/tooling/Tray.vue
-->
<template>
@@ -173,6 +173,32 @@
                </div>
            </template>
        </el-dialog>
        <el-drawer v-model="dialog" title="托盘信息" class="demo-drawer">
            <el-container>
                <el-main>
                    <el-form :model="trayForm">
                        <el-form-item label="托盘组" prop="name">
                            <el-tree-select v-model="trayForm.groupId" @node-click="groupIdClick" node-key="id"
                                :data="treeData" filterable style="width: 240px" :props="{
                                    label: 'name',
                                }" />
                        </el-form-item>
                        <el-form-item label="Area" prop="name">
                            <el-select style="width: 240px" v-model="trayForm.region"
                                placeholder="Please select activity area">
                                <el-option label="Area1" value="shanghai" />
                                <el-option label="Area2" value="beijing" />
                            </el-select>
                        </el-form-item>
                    </el-form>
                </el-main>
                <el-footer style="text-align: right">
                    <el-button type="primary" @click="confirm">
                        确定
                    </el-button>
                </el-footer>
            </el-container>
        </el-drawer>
    </el-container>
</template>
@@ -223,6 +249,8 @@
                    { required: true, message: '必填' }
                ],
            },
            dialog: false,
            trayForm: {}
        }
    },
    watch: {
@@ -283,6 +311,20 @@
        search() {
            this.$refs.table.reload(this.params)
        },
        table_add() {
            this.trayForm = {
                groupId: this.selectNode.id
            }
            this.dialog = true
        },
        groupIdClick(node) {
            this.trayForm.groupId = node.id
        },
        confirm() {
            this.$HTTP.post(`/api/blade-cps/tray/save`, {
            })
        },
        init() {
            this.$HTTP.post(`/api/blade-cps/tray/tooling-tree`, {
                groupCategory: 1,