信号类型改成下拉
This commit is contained in:
parent
7275a66698
commit
125604daf1
@ -30,7 +30,7 @@ const channelList = ref<ChannelItem[]>([
|
|||||||
{ channel_no: 11, singal_type: '4~20mA', output_node: '', limit_low: 0, limit_high: 8, delay: 8, enabled: false },
|
{ channel_no: 11, singal_type: '4~20mA', output_node: '', limit_low: 0, limit_high: 8, delay: 8, enabled: false },
|
||||||
{ channel_no: 12, singal_type: '1~5V', output_node: '', limit_low: 0, limit_high: 8, delay: 8, enabled: false },
|
{ channel_no: 12, singal_type: '1~5V', output_node: '', limit_low: 0, limit_high: 8, delay: 8, enabled: false },
|
||||||
])
|
])
|
||||||
|
const signalTypeOptions = ref(['1~5V', '4~20mA'])
|
||||||
const nodeOptions = ref(['开出一', '开出二', '开出三', '开出四', '开出五', '开出六', '开出七', '开出八', '开出九', '开出十', '开出十一', '开出十二'])
|
const nodeOptions = ref(['开出一', '开出二', '开出三', '开出四', '开出五', '开出六', '开出七', '开出八', '开出九', '开出十', '开出十一', '开出十二'])
|
||||||
const isswitch = ref(false)
|
const isswitch = ref(false)
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
@ -111,11 +111,14 @@ onMounted(() => {
|
|||||||
<div class="row" v-for="(item, idx) in channelList" :key="idx">
|
<div class="row" v-for="(item, idx) in channelList" :key="idx">
|
||||||
<div class="cell cell-no">{{ item.channel_no }}</div>
|
<div class="cell cell-no">{{ item.channel_no }}</div>
|
||||||
<div class="cell cell-type" style="background: #ffffff;">
|
<div class="cell cell-type" style="background: #ffffff;">
|
||||||
<el-input
|
<!-- <el-input
|
||||||
v-model="item.singal_type"
|
v-model="item.singal_type"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
disabled
|
disabled
|
||||||
/>
|
/> -->
|
||||||
|
<el-select v-model="item.singal_type">
|
||||||
|
<el-option v-for="line in signalTypeOptions" :key="line" :value="line" :label="line"></el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="cell cell-line" style="background: #ffffff;">
|
<div class="cell cell-line" style="background: #ffffff;">
|
||||||
<el-input-number v-model="item.limit_low"
|
<el-input-number v-model="item.limit_low"
|
||||||
|
|||||||
@ -36,6 +36,7 @@ interface ChannelItem {
|
|||||||
limit_low: number
|
limit_low: number
|
||||||
limit_high: number
|
limit_high: number
|
||||||
}
|
}
|
||||||
|
const signalTypeOptions = ref(['1~5V', '4~20mA'])
|
||||||
const currentInputType = ref('')
|
const currentInputType = ref('')
|
||||||
const openKeyboard = (index: number, value: number, type: string) => {
|
const openKeyboard = (index: number, value: number, type: string) => {
|
||||||
currentInputType.value = type
|
currentInputType.value = type
|
||||||
@ -126,7 +127,9 @@ onMounted(() => {
|
|||||||
<div class="row" v-for="(item, idx) in channelList" :key="idx">
|
<div class="row" v-for="(item, idx) in channelList" :key="idx">
|
||||||
<div class="cell cell-no">{{ item.ch }}</div>
|
<div class="cell cell-no">{{ item.ch }}</div>
|
||||||
<div class="cell cell-type" style="background: #ffffff;">
|
<div class="cell cell-type" style="background: #ffffff;">
|
||||||
<el-input disabled v-model="item.singal_type" placeholder="" />
|
<el-select v-model="item.singal_type">
|
||||||
|
<el-option v-for="line in signalTypeOptions" :key="line" :value="line" :label="line"></el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="cell cell-line" style="background: #ffffff;">
|
<div class="cell cell-line" style="background: #ffffff;">
|
||||||
<el-select v-model="item.line_no">
|
<el-select v-model="item.line_no">
|
||||||
@ -276,30 +279,31 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-select__wrapper),
|
:deep(.el-select__wrapper),
|
||||||
:deep(.el-input__wrapper) {
|
:deep(.el-input__wrapper) {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-select__wrapper.is-hover),
|
:deep(.el-select__wrapper.is-hover),
|
||||||
:deep(.el-input__wrapper.is-hover),
|
:deep(.el-input__wrapper.is-hover),
|
||||||
:deep(.el-select__wrapper.is-focused),
|
:deep(.el-select__wrapper.is-focused),
|
||||||
:deep(.el-input__wrapper.is-focused) {
|
:deep(.el-input__wrapper.is-focused) {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
border: none !important;
|
border: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-input__inner) {
|
:deep(.el-input__inner) {
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
font-size: 14px !important;
|
font-size: 14px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-input.is-disabled .el-input__inner) {
|
:deep(.el-input.is-disabled .el-input__inner) {
|
||||||
color: #606266;
|
color: #606266;
|
||||||
-webkit-text-fill-color: #606266;
|
-webkit-text-fill-color: #606266;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 去掉所有边框 + 阴影
|
// 去掉所有边框 + 阴影
|
||||||
</style>
|
</style>
|
||||||
@ -42,7 +42,7 @@ const openKeyboard = (index: number, value: number, type: string) => {
|
|||||||
currentInputValue.value = value
|
currentInputValue.value = value
|
||||||
keyboardVisible.value = true
|
keyboardVisible.value = true
|
||||||
}
|
}
|
||||||
|
const signalTypeOptions = ref(['1~5V', '4~20mA'])
|
||||||
const handleKeyboardConfirm = (value: string) => {
|
const handleKeyboardConfirm = (value: string) => {
|
||||||
if (currentInputIndex.value >= 0) {
|
if (currentInputIndex.value >= 0) {
|
||||||
const channel = channelList.value[currentInputIndex.value]
|
const channel = channelList.value[currentInputIndex.value]
|
||||||
@ -124,7 +124,9 @@ onMounted(() => {
|
|||||||
<div class="row" v-for="(item, idx) in channelList" :key="idx">
|
<div class="row" v-for="(item, idx) in channelList" :key="idx">
|
||||||
<div class="cell cell-no">{{ item.ch }}</div>
|
<div class="cell cell-no">{{ item.ch }}</div>
|
||||||
<div class="cell cell-type" style="background: #ffffff;">
|
<div class="cell cell-type" style="background: #ffffff;">
|
||||||
<el-input v-model="item.singal_type" disabled placeholder="" />
|
<el-select v-model="item.singal_type">
|
||||||
|
<el-option v-for="line in signalTypeOptions" :key="line" :value="line" :label="line"></el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="cell cell-line" style="background: #ffffff;">
|
<div class="cell cell-line" style="background: #ffffff;">
|
||||||
<el-select v-model="item.line_no">
|
<el-select v-model="item.line_no">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user