指令desc详情修改,风机批量任务提交

This commit is contained in:
高云鹏 2024-11-04 10:28:09 +08:00
parent 299afbabe7
commit 56e76adb02
4 changed files with 10 additions and 6 deletions

View File

@ -15,7 +15,7 @@ export const getBelongLineListReq = () => {
} }
export const runAirBlowerReq = (data: (CommandReqType & { measType: 199 | 147 | 146 | 138 | 139 | 140 })[]) => { export const runAirBlowerReq = (data: (CommandReqType & { measType: 199 | 147 | 146 | 138 | 139 | 140 })[]) => {
return createAxios({ return createAxios<unknown,Promise<{code:number,msg:string,success:boolean}>>({
url: '/api/page/turbines/windTurbinesControl', url: '/api/page/turbines/windTurbinesControl',
method: 'post', method: 'post',
data: data data: data

View File

@ -1375,7 +1375,7 @@ const sendCommand = (type: 'setTurbineFastStart' | 'setTurbineStop' | 'setTurbin
type: 'warning', type: 'warning',
}).then(() => { }).then(() => {
const serviceName = sendTypeEnum[type] const serviceName = sendTypeEnum[type]
const optDesc = serviceName + 1 const optDesc = serviceName + ',设定值为1'
sendCommandReq({ sendCommandReq({
deviceId: route.query.irn as string, deviceId: route.query.irn as string,
serviceCode: type, serviceCode: type,
@ -1403,7 +1403,7 @@ const sendManualCommand = (type: 1 | 0) => {
deviceId: route.query.irn as string, deviceId: route.query.irn as string,
serviceCode: 'Locked', serviceCode: 'Locked',
serviceName, serviceName,
optDesc: serviceName + type, optDesc: serviceName +',设定值为:'+ type,
opValue: type, opValue: type,
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {

View File

@ -246,7 +246,7 @@ const airBlowerOperate = (type: 'setTurbineFastStart' | 'setTurbineStop' | 'setT
deviceId: item, deviceId: item,
serviceName: sendTypeEnum[type], serviceName: sendTypeEnum[type],
serviceCode: type, serviceCode: type,
optDesc: sendTypeEnum[type] + 1, optDesc: sendTypeEnum[type] +',设定值为:'+ 1,
opValue: 1 as const, opValue: 1 as const,
measType: 147 as const, measType: 147 as const,
} }
@ -255,8 +255,12 @@ const airBlowerOperate = (type: 'setTurbineFastStart' | 'setTurbineStop' | 'setT
runAirBlowerReq(data).then((res) => { runAirBlowerReq(data).then((res) => {
console.log(res); console.log(res);
if(res.success){
ElMessage.success('指令发送成功')
}
// ElMessage.success('') // ElMessage.success('')
}).catch(()=>{
ElMessage.error('操作失败')
}) })
} }

View File

@ -192,7 +192,7 @@ const sendValue = (data: { serviceCode: string; opValue: number }, type: 146 | 1
type === 146 type === 146
? deviceServiceType146List.value.find((item) => item.value === val.serviceCode)?.label ? deviceServiceType146List.value.find((item) => item.value === val.serviceCode)?.label
: deviceServiceType147List.value.find((item) => item.value === val.serviceCode)?.label : deviceServiceType147List.value.find((item) => item.value === val.serviceCode)?.label
val.optDesc = val.serviceName + val.opValue val.optDesc = val.serviceName +',设定值为:'+ val.opValue
sendCommandReq(val) sendCommandReq(val)
.then((res) => { .then((res) => {
console.log(res) console.log(res)