Your Name
2022-07-04 41b20b89eb03e1a7e52e7e31ce3fd3f240f67c46
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
<template>
    <div class="system-add-menu-container">
        <el-dialog :title="title" v-model="isShowProductionDeviceDialog" width="769px">
            <el-form :model="ruleForm" size="default" label-width="80px">
                <el-row :gutter="35">
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="生产装置名称">
                            <el-input v-model="roleForm.produceDeviceName" placeholder="请输入生产装置名称" clearable></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="所属部门">
                            <el-select v-model="roleForm.depName" placeholder="请选择所属部门" clearable filterable></el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="风险等级">
                            <el-select v-model="roleForm.riskLevel" placeholder="请选择风险等级"clearable filterable></el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="区域位置">
                            <el-input v-model="roleForm.location" type="textarea" placeholder="请输入区域位置" maxlength="150"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="onCancel" size="default">取 消</el-button>
                    <el-button type="primary" @click="onSubmit" size="default">确 实</el-button>
                </span>
            </template>
        </el-dialog>
    </div>
</template>
 
<script lang="ts">
    interface stateType{
        isShowProductionDeviceDialog:Boolean,
        productionDeviceForm:{
            produceDeviceName: string,
            depName: number | null,
            riskLevel: number | null,
            location: string,
        }
    }
    import { reactive, toRefs } from 'vue'
    export default {
        name: "productionDeviceDialog",
        setup() {
            const state = reactive<stateType>({
                isShowProductionDeviceDialog: false,
                productionDeviceForm: {
                    produceDeviceName: '',
                    depName: null,
                    riskLevel: null,
                    location: '',
                },
            });
 
            const openProductionDeviceDialog = () => {
                state.isShowProductionDeviceDialog = true;
            };
 
            return{
                ...toRefs(state),
                openProductionDeviceDialog,
            };
        }
    }
</script>
 
<style scoped>
 
</style>