Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
987b6cd57f | ||
|
|
3b6a7d9d5b | ||
|
|
0379e5cf2e | ||
|
|
bc474fe17c | ||
|
|
b50ca36024 | ||
|
|
38d834170a | ||
|
|
f5f22f9635 |
@@ -54,13 +54,13 @@ webSocket:
|
||||
port: 7778
|
||||
|
||||
#源参数下发,暂态数据默认值
|
||||
#Dip:
|
||||
# 暂态前时间(s)
|
||||
# fPreTime: 2f
|
||||
Dip:
|
||||
# 暂态前时间(s)
|
||||
# fPreTime: 2f
|
||||
#写入时间(s)
|
||||
# fRampIn: 0.001f
|
||||
fRampIn: 0.001f
|
||||
#写出时间(s)
|
||||
# fRampOut: 0.001f
|
||||
fRampOut: 0.001f
|
||||
# 暂态后时间(s)
|
||||
# fAfterTime: 3f
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo44
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo44
Normal file
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo45
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo45
Normal file
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo46
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo46
Normal file
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo47
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo47
Normal file
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo48
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo48
Normal file
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo49
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo49
Normal file
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo50
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo50
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
51248
|
||||
55936
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -17,4 +17,3 @@
|
||||
.\binlog.000039
|
||||
.\binlog.000040
|
||||
.\binlog.000041
|
||||
.\binlog.000042
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,8 +13,8 @@ VITE_REPORT=false
|
||||
# 浏览器是否显示vue的告警信息
|
||||
VUE_APP_SILENCE_WARNINGS=true
|
||||
|
||||
VITE_COMPANY_WEBSITE=http://www.shining-electric.com/
|
||||
VITE_COMPANY_NAME=南京灿能电力自动化股份有限公司
|
||||
VITE_COMPANY_WEBSITE=https://baike.baidu.com/item/%E4%BA%91%E5%8D%97%E7%94%B5%E5%8A%9B%E6%8A%80%E6%9C%AF%E6%9C%89%E9%99%90%E8%B4%A3%E4%BB%BB%E5%85%AC%E5%8F%B8/20071982
|
||||
VITE_COMPANY_NAME=云南电力技术有限责任公司
|
||||
|
||||
VITE_IS_SHOW_RAW_DATA=true
|
||||
# 开启激活验证
|
||||
|
||||
@@ -19,6 +19,6 @@ VITE_API_URL=/api
|
||||
|
||||
# 开发环境跨域代理,支持配置多个
|
||||
|
||||
VITE_PROXY=[["/api","http://127.0.0.1:18092/"]]
|
||||
VITE_PROXY=[["/api","http://127.0.0.1:18093/"]]
|
||||
#VITE_PROXY=[["/api","http://192.168.1.124:18092/"]]
|
||||
#VITE_PROXY=[["/api","http://192.168.2.125:18092/"]]
|
||||
|
||||
@@ -23,5 +23,5 @@ VITE_PWA=true
|
||||
|
||||
# 线上环境接口地址
|
||||
#VITE_API_URL="/api" # 打包时用
|
||||
VITE_API_URL="http://127.0.0.1:18092/"
|
||||
VITE_API_URL="http://127.0.0.1:18093/"
|
||||
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
import type { Device } from '@/api/device/interface/device'
|
||||
import type { Monitor } from '@/api/device/interface/monitor'
|
||||
|
||||
const DEVICE_FIELD_NAMES = [
|
||||
'id',
|
||||
'name',
|
||||
'pattern',
|
||||
'devType',
|
||||
'manufacturer',
|
||||
'createDate',
|
||||
'createId',
|
||||
'hardwareVersion',
|
||||
'softwareVersion',
|
||||
'protocol',
|
||||
'ip',
|
||||
'port',
|
||||
'encryptionFlag',
|
||||
'series',
|
||||
'devKey',
|
||||
'sampleId',
|
||||
'arrivedDate',
|
||||
'cityName',
|
||||
'gdName',
|
||||
'subName',
|
||||
'reportPath',
|
||||
'icdId',
|
||||
'planId',
|
||||
'factorFlag',
|
||||
'preinvestmentPlan',
|
||||
'delegate',
|
||||
'inspectChannel',
|
||||
'inspectDate',
|
||||
'harmSysId',
|
||||
'importFlag'
|
||||
] as const
|
||||
|
||||
const MONITOR_FIELD_NAMES = [
|
||||
'id',
|
||||
'devId',
|
||||
'busbar',
|
||||
'name',
|
||||
'num',
|
||||
'pt',
|
||||
'ct',
|
||||
'connection',
|
||||
'statInterval',
|
||||
'harmSysId',
|
||||
'checkFlag'
|
||||
] as const
|
||||
|
||||
function appendIfPresent(formData: FormData, key: string, value: unknown) {
|
||||
if (value === null || value === undefined || value === '') {
|
||||
return
|
||||
}
|
||||
formData.append(key, String(value))
|
||||
}
|
||||
|
||||
function appendMonitorFields(formData: FormData, monitorList: Monitor.ResPqMon[]) {
|
||||
monitorList.forEach((monitor, index) => {
|
||||
MONITOR_FIELD_NAMES.forEach(fieldName => {
|
||||
appendIfPresent(formData, `monitorList[${index}].${fieldName}`, monitor[fieldName])
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export function buildPqDevFormData(device: Device.ResPqDev, imageFile?: File | null) {
|
||||
const formData = new FormData()
|
||||
|
||||
DEVICE_FIELD_NAMES.forEach(fieldName => {
|
||||
appendIfPresent(formData, fieldName, device[fieldName])
|
||||
})
|
||||
|
||||
appendMonitorFields(formData, device.monitorList ?? [])
|
||||
|
||||
if (imageFile) {
|
||||
formData.append('image', imageFile)
|
||||
}
|
||||
|
||||
return formData
|
||||
}
|
||||
|
||||
export function buildDeviceImagePreviewSrc(
|
||||
hasImage?: boolean,
|
||||
imageBase64?: string | null,
|
||||
imageContentType?: string | null
|
||||
) {
|
||||
if (!hasImage || !imageBase64 || !imageContentType) {
|
||||
return null
|
||||
}
|
||||
return `data:${imageContentType};base64,${imageBase64}`
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import type {Device} from '@/api/device/interface/device'
|
||||
import http from '@/api'
|
||||
import { buildPqDevFormData } from './formData'
|
||||
|
||||
/**
|
||||
* @name 被检设备管理模块
|
||||
@@ -12,13 +11,13 @@ export const getPqDevList = (params: Device.ReqPqDevParams) => {
|
||||
}
|
||||
|
||||
//添加被检设备
|
||||
export const addPqDev = (params: Device.ResPqDev, imageFile?: File | null) => {
|
||||
return http.upload(`/pqDev/add`, buildPqDevFormData(params, imageFile))
|
||||
export const addPqDev = (params: Device.ResPqDev) => {
|
||||
return http.post(`/pqDev/add`, params)
|
||||
}
|
||||
|
||||
//编辑被检设备
|
||||
export const updatePqDev = (params: Device.ResPqDev, imageFile?: File | null) => {
|
||||
return http.upload(`/pqDev/update`, buildPqDevFormData(params, imageFile))
|
||||
export const updatePqDev = (params: Device.ResPqDev) => {
|
||||
return http.post(`/pqDev/update`, params)
|
||||
}
|
||||
|
||||
//删除被检设备
|
||||
@@ -72,7 +71,3 @@ export const getPqDev = () => {
|
||||
export const getSelectOptions = (params:{ pattern: string }) => {
|
||||
return http.get(`/pqDev/getSelectOptions`, params)
|
||||
}
|
||||
|
||||
export const downloadDeviceImage = (id: string) => {
|
||||
return http.downloadGetWithHeaders(`/pqDev/image/download?id=${id}`)
|
||||
}
|
||||
|
||||
@@ -91,9 +91,6 @@ export namespace Device {
|
||||
monitorList: Monitor.ResPqMon[]
|
||||
checked?: boolean // 是否已选择
|
||||
disabled?: boolean // 是否禁用
|
||||
hasImage?: boolean // 是否存在设备图片
|
||||
imageBase64?: string | null // 设备图片 Base64,用于详情回显
|
||||
imageContentType?: string | null // 设备图片 MIME 类型
|
||||
}
|
||||
|
||||
export interface SelectOption {
|
||||
@@ -119,4 +116,4 @@ export namespace Device {
|
||||
* 被检设备表格查询分页返回的对象;
|
||||
*/
|
||||
export interface ResPqDevPage extends ResPage<ResPqDev> {}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 112 KiB |
@@ -10,7 +10,7 @@
|
||||
padding: 0 15px 0 0;
|
||||
border-bottom: 1px solid var(--el-header-border-color);
|
||||
// background-color: var(--el-header-bg-color);
|
||||
background-color: var(--el-color-primary); //默认蓝色风格背景
|
||||
background-color: #fff; //默认蓝色风格背景
|
||||
.logo {
|
||||
padding:0 10px 0 15px;
|
||||
margin-right: 30px;
|
||||
@@ -23,7 +23,7 @@
|
||||
font-size: 21.5px;
|
||||
font-weight: bold;
|
||||
// color: var(--el-header-logo-text-color);
|
||||
color: #fff; // logo文字颜色
|
||||
color: var(--el-color-primary); // logo文字颜色
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
@@ -33,15 +33,14 @@
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
border-bottom: none;
|
||||
background-color: var(--el-color-primary); //导航蓝色背景
|
||||
background-color: #fff; //导航蓝色背景
|
||||
.el-menu-item {
|
||||
color: #fff;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
.el-menu-item:hover {
|
||||
color: #fff; //一级导航划过颜色
|
||||
//background-color: #5274a5 !important; //一级导航划过背景色
|
||||
background-color:var(--el-color-primary-light-3) !important;
|
||||
|
||||
background-color:var(--el-color-primary-light-4) !important;
|
||||
}
|
||||
.el-sub-menu__hide-arrow {
|
||||
width: 65px;
|
||||
@@ -50,15 +49,19 @@
|
||||
.el-menu-item.is-active {
|
||||
color: #fff !important; //一级导航文字选中颜色
|
||||
//background-color: #5274a5 !important; //一级导航选中背景色
|
||||
background-color: var(--el-color-primary-light-3) !important;
|
||||
background-color: var(--el-color-primary-light-4) !important;
|
||||
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
.el-sub-menu__title:hover {
|
||||
color: #fff !important;
|
||||
background-color: var(--el-color-primary-light-4) !important;
|
||||
}
|
||||
.el-sub-menu__title {
|
||||
color: #fff;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
.is-opened:hover {
|
||||
color: #fff;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
.is-active {
|
||||
background-color: var(--el-color-primary) !important;
|
||||
@@ -68,12 +71,12 @@
|
||||
width: 0;
|
||||
}
|
||||
.el-sub-menu__title {
|
||||
color: #fff !important; //二级导航文字选中颜色
|
||||
color: var(--el-color-primary) !important; //二级导航文字选中颜色
|
||||
// background-color: var(--el-color-primary) !important;
|
||||
// background-color: #5274a5 !important;//二级导航选中背景色
|
||||
|
||||
//background-color: #7588e5 !important;
|
||||
background-color: var(--el-color-primary-light-3) !important;
|
||||
background-color: var(--el-color-primary-light-4) !important;
|
||||
border-bottom-color: var(--el-color-primary) !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,10 +109,6 @@ import {
|
||||
shouldHandleConnectionTerminalMessage,
|
||||
} from "./connectionState";
|
||||
|
||||
defineOptions({
|
||||
name: "controlSource",
|
||||
});
|
||||
|
||||
const show = ref(false);
|
||||
const router = useRouter();
|
||||
const modeId = ref();
|
||||
|
||||
@@ -95,33 +95,6 @@
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备图片" class="device-image-form-item">
|
||||
<div class="device-image-field">
|
||||
<input
|
||||
ref="imageInputRef"
|
||||
type="file"
|
||||
accept=".jpg,.jpeg,.png,image/jpeg,image/png"
|
||||
style="display: none"
|
||||
@change="handleImageChange"
|
||||
/>
|
||||
<div v-if="imagePreviewUrl" class="device-image-preview">
|
||||
<img :src="imagePreviewUrl" alt="device image preview" />
|
||||
</div>
|
||||
<div v-else class="device-image-empty">暂无图片</div>
|
||||
<div class="device-image-actions">
|
||||
<el-button size="small" @click="triggerImageSelect">
|
||||
{{ hasPersistedImage || selectedImageFile ? '更换图片' : '上传图片' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="formContent.id && hasPersistedImage"
|
||||
size="small"
|
||||
@click="handleImageDownload"
|
||||
>
|
||||
下载图片
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-divider>参数信息</el-divider>
|
||||
<el-form-item label="通道数" prop="devChns" v-if="DevIsShow">
|
||||
<el-input v-model="formContent.devChns" :disabled="true" />
|
||||
@@ -286,8 +259,7 @@
|
||||
import { dialogBig } from '@/utils/elementBind'
|
||||
import { type Device } from '@/api/device/interface/device'
|
||||
import { ElMessage, type FormItemRule } from 'element-plus'
|
||||
import { addPqDev, downloadDeviceImage, getSelectOptions, updatePqDev } from '@/api/device/device'
|
||||
import { buildDeviceImagePreviewSrc } from '@/api/device/device/formData'
|
||||
import { addPqDev, getSelectOptions, updatePqDev } from '@/api/device/device'
|
||||
import { computed, reactive, ref } from 'vue'
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
// 使用 dayjs 库格式化
|
||||
@@ -314,11 +286,6 @@ const activeTab = ref('0') // '0' 对应第一个 tab
|
||||
const monitorTableHeight = ref(375) // 默认高度
|
||||
|
||||
const selectOptions = ref<Record<string, Device.SelectOption[]>>({})
|
||||
const imageInputRef = ref<HTMLInputElement>()
|
||||
const selectedImageFile = ref<File | null>(null)
|
||||
const imagePreviewUrl = ref<string | null>(null)
|
||||
const imagePreviewObjectUrl = ref<string | null>(null)
|
||||
const hasPersistedImage = ref(false)
|
||||
|
||||
const pqChannelArray = ref([
|
||||
{
|
||||
@@ -338,85 +305,6 @@ const onTabChange = (tabName: string | number) => {
|
||||
}
|
||||
}
|
||||
|
||||
const revokeImageObjectUrl = () => {
|
||||
if (imagePreviewObjectUrl.value) {
|
||||
URL.revokeObjectURL(imagePreviewObjectUrl.value)
|
||||
imagePreviewObjectUrl.value = null
|
||||
}
|
||||
}
|
||||
|
||||
const resetImageState = () => {
|
||||
revokeImageObjectUrl()
|
||||
selectedImageFile.value = null
|
||||
imagePreviewUrl.value = null
|
||||
hasPersistedImage.value = false
|
||||
if (imageInputRef.value) {
|
||||
imageInputRef.value.value = ''
|
||||
}
|
||||
}
|
||||
|
||||
const validateImageFile = (file: File) => {
|
||||
const allowedTypes = ['image/jpeg', 'image/png']
|
||||
const isAllowedType = allowedTypes.includes(file.type) || /\.(jpe?g|png)$/i.test(file.name)
|
||||
if (!isAllowedType) {
|
||||
ElMessage.warning({ message: '仅支持 JPG、JPEG、PNG 图片' })
|
||||
return false
|
||||
}
|
||||
if (file.size > 10 * 1024 * 1024) {
|
||||
ElMessage.warning({ message: '图片大小不能超过 10MB' })
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
const triggerImageSelect = () => {
|
||||
imageInputRef.value?.click()
|
||||
}
|
||||
|
||||
const handleImageChange = (event: Event) => {
|
||||
const input = event.target as HTMLInputElement
|
||||
const file = input.files?.[0]
|
||||
if (!file) {
|
||||
return
|
||||
}
|
||||
if (!validateImageFile(file)) {
|
||||
input.value = ''
|
||||
return
|
||||
}
|
||||
revokeImageObjectUrl()
|
||||
selectedImageFile.value = file
|
||||
imagePreviewObjectUrl.value = URL.createObjectURL(file)
|
||||
imagePreviewUrl.value = imagePreviewObjectUrl.value
|
||||
}
|
||||
|
||||
const updateImageEchoState = (device: Partial<Device.ResPqDev>) => {
|
||||
revokeImageObjectUrl()
|
||||
selectedImageFile.value = null
|
||||
hasPersistedImage.value = Boolean(device.hasImage)
|
||||
imagePreviewUrl.value = buildDeviceImagePreviewSrc(device.hasImage, device.imageBase64, device.imageContentType)
|
||||
if (imageInputRef.value) {
|
||||
imageInputRef.value.value = ''
|
||||
}
|
||||
}
|
||||
|
||||
const getDownloadFileName = (contentDisposition?: string | null) => {
|
||||
const match = contentDisposition?.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i)
|
||||
return decodeURIComponent(match?.[1] ?? match?.[2] ?? 'device-image')
|
||||
}
|
||||
|
||||
const handleImageDownload = async () => {
|
||||
if (!formContent.id || !hasPersistedImage.value) {
|
||||
return
|
||||
}
|
||||
const response = await downloadDeviceImage(formContent.id)
|
||||
const blobUrl = URL.createObjectURL(response.data)
|
||||
const link = document.createElement('a')
|
||||
link.href = blobUrl
|
||||
link.download = getDownloadFileName(response.headers['content-disposition'])
|
||||
link.click()
|
||||
URL.revokeObjectURL(blobUrl)
|
||||
}
|
||||
|
||||
function useMetaInfo() {
|
||||
const dialogVisible = ref(false)
|
||||
const titleType = ref('add')
|
||||
@@ -585,7 +473,6 @@ const close = () => {
|
||||
dialogVisible.value = false
|
||||
// 清空dialogForm中的值
|
||||
resetFormContent()
|
||||
resetImageState()
|
||||
// 重置表单
|
||||
dialogFormRef.value?.resetFields()
|
||||
}
|
||||
@@ -648,7 +535,7 @@ const save = () => {
|
||||
formContent.monitorList = monitor.value
|
||||
|
||||
if (titleType.value != 'add') {
|
||||
await updatePqDev(formContent, selectedImageFile.value)
|
||||
await updatePqDev(formContent)
|
||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||
} else {
|
||||
// 新增需要把设备模式转成字典ID
|
||||
@@ -663,7 +550,7 @@ const save = () => {
|
||||
if (protocolItem) {
|
||||
formContent.protocol = protocolItem.id
|
||||
}
|
||||
await addPqDev(formContent, selectedImageFile.value)
|
||||
await addPqDev(formContent)
|
||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||
}
|
||||
|
||||
@@ -730,11 +617,9 @@ const open = async (
|
||||
formContent.inspectChannel = formContent.inspectChannel.split(',').filter(Boolean)
|
||||
}
|
||||
monitor.value = data.monitorList
|
||||
updateImageEchoState(data)
|
||||
} else {
|
||||
monitor.value = []
|
||||
resetFormContent()
|
||||
resetImageState()
|
||||
//只有比对式设备ID由前端传
|
||||
if (currentMode === '比对式') formContent.id = generateUUID().replaceAll('-', '')
|
||||
|
||||
@@ -809,54 +694,4 @@ defineExpose({ open })
|
||||
const props = defineProps<{
|
||||
refreshTable: (() => Promise<void>) | undefined
|
||||
}>()
|
||||
</script>
|
||||
<style scoped>
|
||||
.form-three {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.device-image-field {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.device-image-preview {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
background: #f5f7fa;
|
||||
}
|
||||
|
||||
.device-image-preview img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.device-image-empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
border: 1px dashed #dcdfe6;
|
||||
border-radius: 6px;
|
||||
color: #909399;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.device-image-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.device-image-actions :deep(.el-button + .el-button) {
|
||||
margin-left: 0;
|
||||
}
|
||||
</style>
|
||||
</script>
|
||||
@@ -39,9 +39,7 @@ let scriptForm: any = {
|
||||
ftransValue: '', // 暂态幅值
|
||||
retainTime: '', // 暂态持续时间
|
||||
fpreTime:2.0,
|
||||
fafterTime:3.0,
|
||||
frampIn:0.001, //写入时间
|
||||
frampOut:0.001 //写出时间
|
||||
fafterTime:3.0
|
||||
} //暂态
|
||||
},
|
||||
{
|
||||
@@ -73,9 +71,7 @@ let scriptForm: any = {
|
||||
ftransValue: '', // 暂态幅值
|
||||
retainTime: '', // 暂态持续时间
|
||||
fpreTime:2.0,
|
||||
fafterTime:3.0,
|
||||
frampIn:0.001, //写入时间
|
||||
frampOut:0.001 //写出时间
|
||||
fafterTime:3.0
|
||||
} //暂态
|
||||
},
|
||||
{
|
||||
@@ -107,9 +103,7 @@ let scriptForm: any = {
|
||||
ftransValue: '', // 暂态幅值
|
||||
retainTime: '', // 暂态持续时间
|
||||
fpreTime:2.0,
|
||||
fafterTime:3.0,
|
||||
frampIn:0.001, //写入时间
|
||||
frampOut:0.001 //写出时间
|
||||
fafterTime:3.0
|
||||
} //暂态
|
||||
},
|
||||
{
|
||||
@@ -141,9 +135,7 @@ let scriptForm: any = {
|
||||
ftransValue: '', // 暂态幅值
|
||||
retainTime: '', // 暂态持续时间
|
||||
fpreTime:2.0,
|
||||
fafterTime:3.0,
|
||||
frampIn:0.001, //写入时间
|
||||
frampOut:0.001 //写出时间
|
||||
fafterTime:3.0
|
||||
} //暂态
|
||||
},
|
||||
{
|
||||
@@ -175,9 +167,7 @@ let scriptForm: any = {
|
||||
ftransValue: '', // 暂态幅值
|
||||
retainTime: '', // 暂态持续时间
|
||||
fpreTime:2.0,
|
||||
fafterTime:3.0,
|
||||
frampIn:0.001, //写入时间
|
||||
frampOut:0.001 //写出时间
|
||||
fafterTime:3.0
|
||||
} //暂态
|
||||
},
|
||||
{
|
||||
@@ -209,9 +199,7 @@ let scriptForm: any = {
|
||||
ftransValue: '', // 暂态幅值
|
||||
retainTime: '', // 暂态持续时间
|
||||
fpreTime:2.0,
|
||||
fafterTime:3.0,
|
||||
frampIn:0.001, //写入时间
|
||||
frampOut:0.001 //写出时间
|
||||
fafterTime:3.0
|
||||
} //暂态
|
||||
}
|
||||
]
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
<!-- 全局设置菜单内容 -->
|
||||
<div class="test-pane-scroll">
|
||||
<el-radio-group v-model="form.subType" class="test-radio-group">
|
||||
<el-radio
|
||||
v-for="item in tabChildren"
|
||||
:key="item"
|
||||
:label="item.label"
|
||||
:value="item.code"
|
||||
border
|
||||
class="test-radio-item"
|
||||
/>
|
||||
<el-radio
|
||||
v-for="item in tabChildren"
|
||||
:key="item"
|
||||
:label="item.label"
|
||||
:value="item.code"
|
||||
border
|
||||
class="test-radio-item"
|
||||
/>
|
||||
<!-- <el-radio v-for="item in tabChildren" :value="item.value" border>{{ item.label }}</el-radio> -->
|
||||
</el-radio-group>
|
||||
</div>
|
||||
@@ -162,7 +162,7 @@
|
||||
<TestScriptFlickerTab :childForm="childForm" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="暂态编辑" v-if="childForm[0].dipFlag || childForm[1].dipFlag">
|
||||
<TestScriptDipTab :childForm="childForm" @setRetainTime="setRetainTime" @setFPreTime="setFPreTime" @setFAfterTime="setFAfterTime" @setFRampIn="setFRampIn" @setFRampOut="setFRampOut"/>
|
||||
<TestScriptDipTab :childForm="childForm" @setRetainTime="setRetainTime" @setFPreTime="setFPreTime" @setFAfterTime="setFAfterTime" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@@ -314,16 +314,6 @@ const setFAfterTime = (val: any) => {
|
||||
item.dipData.fafterTime = val
|
||||
})
|
||||
}
|
||||
const setFRampIn = (val: any) => {
|
||||
form.value.channelList.forEach((item: any) => {
|
||||
item.dipData.frampIn = val
|
||||
})
|
||||
}
|
||||
const setFRampOut = (val: any) => {
|
||||
form.value.channelList.forEach((item: any) => {
|
||||
item.dipData.frampOut = val
|
||||
})
|
||||
}
|
||||
|
||||
// 保存数据
|
||||
const save = () => {
|
||||
@@ -755,37 +745,37 @@ defineExpose({ open })
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.test-pane-scroll {
|
||||
height: 295px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.test-radio-group {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
min-width: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
.test-pane-scroll {
|
||||
height: 295px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.test-radio-group {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
min-width: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.left-tabs {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
:deep(.test-radio-group .el-radio) {
|
||||
width: max-content;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
:deep(.test-radio-group .test-radio-item) {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
:deep(.test-radio-group .el-radio__label) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
:deep(.test-radio-group .el-radio) {
|
||||
width: max-content;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
:deep(.test-radio-group .test-radio-item) {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
:deep(.test-radio-group .el-radio__label) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<el-input
|
||||
type="number"
|
||||
@input="handleInput"
|
||||
v-model.number="form[0].dipData.ftransValue"
|
||||
v-model="form[0].dipData.ftransValue"
|
||||
:disabled="!form[0].dipFlag"
|
||||
onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"
|
||||
/>
|
||||
@@ -39,7 +39,7 @@
|
||||
<el-form-item label="持续时间(周波)">
|
||||
<el-input
|
||||
type="number"
|
||||
v-model.number="form[0].dipData.retainTime"
|
||||
v-model="form[0].dipData.retainTime"
|
||||
@input="handleInputRetainTime"
|
||||
:disabled="!form[0].dipFlag"
|
||||
onkeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
|
||||
@@ -48,7 +48,7 @@
|
||||
<el-form-item label="前延时间(S)">
|
||||
<el-input
|
||||
type="number"
|
||||
v-model.number="form[0].dipData.fpreTime"
|
||||
v-model="form[0].dipData.fpreTime"
|
||||
@input="validateFPreTime"
|
||||
:disabled="!form[0].dipFlag"
|
||||
onkeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
|
||||
@@ -57,30 +57,12 @@
|
||||
<el-form-item label="后延时间(S)">
|
||||
<el-input
|
||||
type="number"
|
||||
v-model.number="form[0].dipData.fafterTime"
|
||||
v-model="form[0].dipData.fafterTime"
|
||||
@input="validateFAfterTime"
|
||||
:disabled="!form[0].dipFlag"
|
||||
onkeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="写入时间(S)">
|
||||
<el-input
|
||||
type="number"
|
||||
v-model.number="form[0].dipData.frampIn"
|
||||
@input="validateFRampIn"
|
||||
:disabled="!form[0].dipFlag"
|
||||
onkeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="写出时间(S)">
|
||||
<el-input
|
||||
type="number"
|
||||
v-model.number="form[0].dipData.frampOut"
|
||||
@input="validateFRampOut"
|
||||
:disabled="!form[0].dipFlag"
|
||||
onkeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -153,20 +135,6 @@ const validateFAfterTime = value => {
|
||||
emit('setFAfterTime', value )
|
||||
}
|
||||
}
|
||||
const validateFRampIn = value => {
|
||||
if (value <= 0) {
|
||||
ElMessage.warning('写入时间不能小于等于0S!')
|
||||
props.childForm[0].dipData.frampIn = 0.001
|
||||
emit('setFRampIn', 0.001)
|
||||
}
|
||||
}
|
||||
const validateFRampOut = value => {
|
||||
if (value <= 0) {
|
||||
ElMessage.warning('写出时间不能小于等于0S!')
|
||||
props.childForm[0].dipData.frampOut = 0.001
|
||||
emit('setFRampOut', 0.001)
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user