节点:添加新协议故障日志
故障录波:修改查询时间为年月日
This commit is contained in:
parent
3eb790acdb
commit
b4c5c3c028
@ -29,12 +29,12 @@
|
|||||||
<span>日期</span>
|
<span>日期</span>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="searchData.date"
|
v-model="searchData.date"
|
||||||
type="monthrange"
|
type="daterange"
|
||||||
unlink-panels
|
unlink-panels
|
||||||
start-placeholder="开始时间"
|
start-placeholder="开始时间"
|
||||||
end-placeholder="结束时间"
|
end-placeholder="结束时间"
|
||||||
format="YYYY-MM"
|
format="YYYY-MM-DD"
|
||||||
date-format="YYYY/MM"
|
date-format="YYYY/MM/DD"
|
||||||
:shortcuts="shortcuts"
|
:shortcuts="shortcuts"
|
||||||
@change="getListForAirBlower"
|
@change="getListForAirBlower"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
@ -273,7 +273,7 @@ const getTreeDataList = () => {
|
|||||||
|
|
||||||
const searchData = reactive<{ fileName: ''; date: Date[] }>({
|
const searchData = reactive<{ fileName: ''; date: Date[] }>({
|
||||||
fileName: '',
|
fileName: '',
|
||||||
date: [dayjs().toDate(), dayjs().toDate()],
|
date: [dayjs().startOf('month').toDate(), dayjs().toDate()],
|
||||||
})
|
})
|
||||||
const shortcuts = [
|
const shortcuts = [
|
||||||
{
|
{
|
||||||
@ -287,15 +287,15 @@ const shortcuts = [
|
|||||||
{
|
{
|
||||||
text: '上月',
|
text: '上月',
|
||||||
value: () => {
|
value: () => {
|
||||||
const start = dayjs().subtract(1, 'month').toDate()
|
const start = dayjs().subtract(1, 'month').startOf('month').toDate()
|
||||||
const end = dayjs().subtract(1, 'month').toDate()
|
const end = dayjs().subtract(1, 'month').endOf('month').toDate()
|
||||||
return [start, end]
|
return [start, end]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '近三月',
|
text: '近三月',
|
||||||
value: () => {
|
value: () => {
|
||||||
const start = dayjs().subtract(2, 'month').toDate()
|
const start = dayjs().subtract(2, 'month').startOf('month').toDate()
|
||||||
const end = dayjs().toDate()
|
const end = dayjs().toDate()
|
||||||
return [start, end]
|
return [start, end]
|
||||||
},
|
},
|
||||||
@ -325,8 +325,8 @@ const changePageSetting = () => {}
|
|||||||
const getListForAirBlower = () => {
|
const getListForAirBlower = () => {
|
||||||
const data = {
|
const data = {
|
||||||
deviceCode: curTreeData.value.code,
|
deviceCode: curTreeData.value.code,
|
||||||
startTime: dayjs(searchData.date[0]).format('YYYY-MM'),
|
startTime: dayjs(searchData.date[0]).format('YYYY-MM-DD'),
|
||||||
endTime: dayjs(searchData.date[1]).format('YYYY-MM'),
|
endTime: dayjs(searchData.date[1]).format('YYYY-MM-DD'),
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeName.value === 'malFunction') {
|
if (activeName.value === 'malFunction') {
|
||||||
|
@ -99,8 +99,10 @@
|
|||||||
<el-table-column fixed="right" label="操作" min-width="80" align="center">
|
<el-table-column fixed="right" label="操作" min-width="80" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div class="tableOperate">
|
<div class="tableOperate">
|
||||||
|
<template v-if="scope.row.protocol !== 79">
|
||||||
<a @click="openlinkPoint(scope.row)">测点</a>
|
<a @click="openlinkPoint(scope.row)">测点</a>
|
||||||
<a>|</a>
|
<a>|</a>
|
||||||
|
</template>
|
||||||
<a @click="editLinkList(scope.row)">编辑</a>
|
<a @click="editLinkList(scope.row)">编辑</a>
|
||||||
<a>|</a>
|
<a>|</a>
|
||||||
<el-popconfirm title="确定删除么?" @confirm="delLinkList(scope.row)">
|
<el-popconfirm title="确定删除么?" @confirm="delLinkList(scope.row)">
|
||||||
@ -383,8 +385,8 @@ const getNodeList = () => {
|
|||||||
originTreeData = res.data!
|
originTreeData = res.data!
|
||||||
clickTreeData.value = res.data![0]
|
clickTreeData.value = res.data![0]
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
nodeTreeRef.value?.setCurrentKey(route.query?.treeKey as string ?? res.data![0].id)
|
nodeTreeRef.value?.setCurrentKey((route.query?.treeKey as string) ?? res.data![0].id)
|
||||||
getLinkData(route.query?.treeKey as string ?? res.data![0].id!)
|
getLinkData((route.query?.treeKey as string) ?? res.data![0].id!)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(res.msg ?? '查询失败')
|
ElMessage.error(res.msg ?? '查询失败')
|
||||||
@ -534,7 +536,7 @@ const protocolList = [
|
|||||||
{ label: 'MODBUSTCP从 *', value: 17 },
|
{ label: 'MODBUSTCP从 *', value: 17 },
|
||||||
{ label: 'MODBUS', value: 80 },
|
{ label: 'MODBUS', value: 80 },
|
||||||
{ label: 'ADS', value: 81 },
|
{ label: 'ADS', value: 81 },
|
||||||
|
{ label: '故障日志', value: 79 },
|
||||||
]
|
]
|
||||||
|
|
||||||
const protocolPartVisible = ref(false)
|
const protocolPartVisible = ref(false)
|
||||||
@ -566,7 +568,7 @@ const openlinkPoint = (data: linkType) => {
|
|||||||
protocol: data.protocol,
|
protocol: data.protocol,
|
||||||
id: data.id,
|
id: data.id,
|
||||||
prevPath: route.path,
|
prevPath: route.path,
|
||||||
treeKey:clickTreeData.value?.id
|
treeKey: clickTreeData.value?.id,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1126,6 +1126,59 @@ const formColumnList: formColumnType[] = [
|
|||||||
otherOption: [],
|
otherOption: [],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
protocol: 79,
|
||||||
|
label: '故障日志',
|
||||||
|
cardTitle:['参数设置'],
|
||||||
|
params: {
|
||||||
|
netWorkOption: [
|
||||||
|
{
|
||||||
|
key: 'rootDir',
|
||||||
|
data: {
|
||||||
|
label: 'FTP路径',
|
||||||
|
type: 'input',
|
||||||
|
value: '',
|
||||||
|
singleRow: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'ftpUser',
|
||||||
|
data: {
|
||||||
|
label: 'FTP账号',
|
||||||
|
type: 'input',
|
||||||
|
value: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'ftpPassword',
|
||||||
|
data: {
|
||||||
|
label: 'FTP密码',
|
||||||
|
type: 'password',
|
||||||
|
value: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'ftpHost',
|
||||||
|
data: {
|
||||||
|
label: 'FTP地址',
|
||||||
|
type: 'input',
|
||||||
|
value: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'deviceCode',
|
||||||
|
data: {
|
||||||
|
label: '风机编码',
|
||||||
|
type: 'input',
|
||||||
|
value: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
timeOutOption: [],
|
||||||
|
otherOption: [],
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
]
|
]
|
||||||
const currentFormColumn = computed(() => {
|
const currentFormColumn = computed(() => {
|
||||||
const data = formColumnList.find((item) => item.protocol === props.protocol)!
|
const data = formColumnList.find((item) => item.protocol === props.protocol)!
|
||||||
|
@ -110,6 +110,8 @@ export type otherOptionType = {
|
|||||||
parity?: number
|
parity?: number
|
||||||
stop?: number
|
stop?: number
|
||||||
timeout?: number
|
timeout?: number
|
||||||
|
ftpHost?: string | number
|
||||||
|
deviceCode?: string | number
|
||||||
}
|
}
|
||||||
export type protocolFormType = netWorkOptionType & timeOutOptionType & otherOptionType
|
export type protocolFormType = netWorkOptionType & timeOutOptionType & otherOptionType
|
||||||
|
|
||||||
@ -130,7 +132,7 @@ type paramsType = {
|
|||||||
export type formColumnType = {
|
export type formColumnType = {
|
||||||
protocol: number
|
protocol: number
|
||||||
label: string
|
label: string
|
||||||
cardTitle: ['网络设置', '超时设置']
|
cardTitle: ['网络设置', '超时设置'] | ['参数设置']
|
||||||
params: {
|
params: {
|
||||||
netWorkOption: paramsType[]
|
netWorkOption: paramsType[]
|
||||||
timeOutOption: paramsType[]
|
timeOutOption: paramsType[]
|
||||||
|
Loading…
Reference in New Issue
Block a user