Prechádzať zdrojové kódy

新增设备型号表单增加 供电类型字段

like 5 mesiacov pred
rodič
commit
58761146a1

+ 14 - 1
snowy-admin-web/src/views/biz/monitor/devicetype/form.vue

@@ -29,6 +29,18 @@
 						/>
 					</a-form-item>
 				</a-col>
+
+				<a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+					<a-form-item label="供电类型">
+						<a-select
+							ref="select"
+							v-model:value="formData.powerType"
+							:options="powerOptions"
+							placeholder="请选择供电类型"
+						/>
+					</a-form-item>
+				</a-col>
+
 				<a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
 					<a-form-item label="型号编号" name="code">
 						<a-input v-model:value="formData.code" placeholder="请输入型号编号" allow-clear />
@@ -124,7 +136,7 @@
 					</a-col>
 				</div>
 
-				<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+				<a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
 					<a-form-item label="排序:" name="sortCode">
 						<a-input-number class="xn-wd" v-model:value="formData.sortCode" :max="100" />
 					</a-form-item>
@@ -149,6 +161,7 @@
 	const formRef = ref()
 	const formData = ref({ sortCode: 99 }) // 表单数据
 	const sensorOptions = tool.dictList('SENSORTYPE') // 传感器类型
+	const powerOptions = tool.dictList('POWERTYPE') // 供电类型
 
 	// 默认要校验的
 	const formRules = {

+ 2 - 0
snowy-admin-web/src/views/biz/monitor/devicetype/index.vue

@@ -49,6 +49,7 @@
 				<template v-if="column.dataIndex === 'sensorType'">
 					{{ $TOOL.dictTypeData('SENSORTYPE', record.sensorType) }}
 				</template>
+
 				<template v-if="column.dataIndex === 'action'">
 					<a-popconfirm title="确定要删除吗?" @confirm="deleteData(record)">
 						<a-button type="link" danger size="small">删除</a-button>
@@ -90,6 +91,7 @@
 			ellipsis: true,
 			resizable: true
 		},
+
 		{
 			title: '型号编号',
 			dataIndex: 'code',