<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>
|