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