gaoshp
2024-06-02 c41e6fff7f768923ee87fc136f348f2467576dd5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!--
 * @Date: 2024-05-26 22:26:35
 * @LastEditors: Sneed
 * @LastEditTime: 2024-06-02 15:16:59
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/setting/FTP.vue
-->
<template>
    <el-container>
        <el-header>
            <el-button type="primary" @click="addFtp">创建FTP目录</el-button>
            <el-button type="primary" style="margin-right: auto;">关联工位</el-button>
        </el-header>
        <el-main>
            <el-row :gutter="20" style="width: 100%;">
                <el-col :span="12">
                    <el-table :data="tableData" style="width: 100%">
                        <el-table-column label="目录名称" prop="name" width=""></el-table-column>
                        <el-table-column label="关联工位" prop="" width="">
                            <template #default="scope">
                                <span class="">{{ scope.row.workstationDTOS.map(v => v.name).join(';') }}</span>
                            </template>
                        </el-table-column>
                        <el-table-column label="操作" prop="" width=""></el-table-column>
                    </el-table>
                </el-col>
                <el-col :span="12">
                    <h2>FTP目录</h2>
                    <div>509</div>
                </el-col>
            </el-row>
        </el-main>
        <scDialog v-model="showAdd">
            <scForm :config="config" :rules="rules">
 
            </scForm>
        </scDialog>
    </el-container>
</template>
 
<script>
 
export default {
    data() {
        return {
            tableData: [],
            showAdd: false,
            rules: {
                name: [
                    { required: true, message: '请输入姓名' }
                ]
            },
            config: {
                labelWidth: 120,
 
                formItems: [
                    {
                        component: 'input',
                        label: '名称',
                        name: 'name',
                        options: {
                            placeholder: '',
                            maxlength: 100,
                        }
                    },
                    {
                        component: 'input',
                        label: '关联工位',
                        name: 'workstationIds',
                        options: {
                            placeholder: '',
                            maxlength: 100,
                        }
                    }
                ]
            }
        }
    },
    created() {
        this.getList()
    },
    methods: {
        getList() {
            this.$HTTP.post(`/api/blade-dnc/ftp-director/ftp-workstation-list`, { name: '', workstationIds: [] }).then(res => {
                this.tableData = res.data
            })
        },
        addFtp() {
            this.showAdd = true
        }
    },
}
</script>
 
<style lang="scss" scoped></style>