Merge branch 'main' of https://git.jsspisoft.com/ry-das
This commit is contained in:
commit
ab64bf4ee3
@ -379,14 +379,14 @@ static void* ryftp_process(void* param)
|
||||
|
||||
//获取此协议配置里面的ftp信息
|
||||
char remote[512];
|
||||
char name[512];
|
||||
//char name[512];
|
||||
|
||||
//默认参数,或是通过协议配置获取
|
||||
char user[128] = "administrator";
|
||||
char password[128] = "123456";
|
||||
char ipaddress[128] = "127.0.0.1";
|
||||
char remotePath[128] = "Hard Disk2/data/rtdatalog";
|
||||
char pathName[128] = "./";
|
||||
//char pathName[128] = "./";
|
||||
|
||||
char processName[128];
|
||||
snprintf(processName, sizeof(processName), "%s", mbt->GetCurProcessName());
|
||||
@ -826,25 +826,12 @@ BOOLEAN CHostADSBFProcess::OnPreCreate(int id)
|
||||
//SetLocalAmsNetId(AmsNetId(m_localNetId));
|
||||
try {
|
||||
SetLocalAddress(AmsNetId(m_localNetId));
|
||||
|
||||
//192.168.0.231 addroute --addr=192.168.0.1 --netid=192.168.0.1.1.1 --password=1 --username=guest --routename=Testroute
|
||||
//AddRemoteRoute(m_remoteIp, m_localNetId, m_localIp, std::string("isoftstone"), std::string("guest"), std::string("1"));
|
||||
//m_remotePort
|
||||
//m_turbine = new AdsDevice{m_remoteIp, AmsNetId(m_remoteNetId), AMSPORT_R0_PLC_RTS1};
|
||||
|
||||
m_turbine = new AdsDevice{m_remoteIp, AmsNetId(m_remoteNetId), m_remotePort};
|
||||
//if (m_turbine->IsConnected())
|
||||
{
|
||||
if (!readDeviceState(*m_turbine))
|
||||
{
|
||||
// delete m_turbine;
|
||||
// m_turbine = NULL;
|
||||
// m_turbine = new AdsDevice{m_remoteIp, AmsNetId(m_remoteNetId), m_remotePort};
|
||||
}
|
||||
}
|
||||
} catch (const AdsException& ex) {
|
||||
vLog(LOG_ERROR, "Error: %d\n", ex.errorCode);
|
||||
vLog(LOG_ERROR, "AdsException message: %s\n", ex.what());
|
||||
vLog(LOG_DEBUG, "try to add a route to remote device.\n");
|
||||
AddRemoteRoute(m_remoteIp, m_localNetId, m_localIp, std::string("isoftstone"), std::string("guest"), std::string("1"));
|
||||
} catch (const std::runtime_error& ex) {
|
||||
vLog(LOG_ERROR, "%s\n", ex.what());
|
||||
}
|
||||
|
@ -406,14 +406,14 @@ static void* ryftp_process(void* param)
|
||||
|
||||
//获取此协议配置里面的ftp信息
|
||||
char remote[512];
|
||||
char name[512];
|
||||
//char name[512];
|
||||
|
||||
//默认参数,或是通过协议配置获取
|
||||
char user[128] = "administrator";
|
||||
char password[128] = "123456";
|
||||
char ipaddress[128] = "127.0.0.1";
|
||||
char remotePath[128] = "/data/rtdatalog";
|
||||
char pathName[128] = "./";
|
||||
//char pathName[128] = "./";
|
||||
|
||||
char processName[128];
|
||||
snprintf(processName, sizeof(processName), "%s", mbt->GetCurProcessName());
|
||||
|
@ -1,7 +1,7 @@
|
||||
export default {
|
||||
PowerCurveAnalysis: '功率曲线分析',
|
||||
trendAnalysis: '趋势分析',
|
||||
trendComparison: '趋势对比',
|
||||
trendAnalysis: '单机分析',
|
||||
trendComparison: '多机对比',
|
||||
deviceId: '风机',
|
||||
attributes: '测点名称',
|
||||
interval: '间隔',
|
||||
|
@ -118,12 +118,15 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="生产厂家:">
|
||||
<el-input v-model="editDeviceData.madeinFactory" placeholder="请输入生产厂家" clearable />
|
||||
<el-input disabled v-model="editDeviceData.madeinFactory" placeholder="请选择规格型号" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格型号:">
|
||||
<el-input v-model="editDeviceData.model" style="width: 200px" placeholder="请输入规格型号" clearable />
|
||||
<!-- <el-input v-model="editDeviceData.model" style="width: 200px" placeholder="请输入规格型号" clearable /> -->
|
||||
<el-select v-model="editDeviceData.model" placeholder="请选择规格型号" style="width: 200px" @change="selectEditModel">
|
||||
<el-option v-for="item in modelList" :key="item.model" :value="item.model"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -241,7 +244,7 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="saveData">保存</el-button>
|
||||
<el-button @click="editDeviceDialog = false">取消</el-button>
|
||||
<el-button @click="editDeviceDialog = false">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@ -284,12 +287,14 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="生产厂家:">
|
||||
<el-input v-model="editAddDeviceData.madeinFactory" placeholder="请输入生产厂家" clearable />
|
||||
<el-input disabled v-model="editAddDeviceData.madeinFactory" placeholder="请选择规格型号" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="规格型号:">
|
||||
<el-input v-model="editAddDeviceData.model" style="width: 200px" placeholder="请输入规格型号" clearable />
|
||||
<el-select v-model="editAddDeviceData.model" placeholder="请选择规格型号" style="width: 200px" @change="selectAddModel">
|
||||
<el-option v-for="item in modelList" :key="item.model" :value="item.model"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -412,7 +417,7 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="saveAddData">保存</el-button>
|
||||
<el-button @click="editAddDeviceDialog = false">取消</el-button>
|
||||
<el-button @click="editAddDeviceDialog = false">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@ -486,6 +491,7 @@ import { encrypt_aes, generateRandomNumber } from '/@/utils/crypto'
|
||||
import ControlPage from './control.vue'
|
||||
import MeasurementPage from './measurement.vue'
|
||||
import { ModelAttributeType } from '/@/views/backend/auth/model/type'
|
||||
import { theoreticalpowerCurveList } from '/@/api/backend/theoreticalpowerCurve/request'
|
||||
|
||||
const adminInfo = useAdminInfo()
|
||||
interface Tree {
|
||||
@ -728,6 +734,28 @@ const editDeviceData = reactive({
|
||||
nominalCapacity: null,
|
||||
})
|
||||
|
||||
const modelList = ref<{ model: string; madeinFactory: string }[]>([])
|
||||
|
||||
const getModelList = () => {
|
||||
theoreticalpowerCurveList().then((res) => {
|
||||
if (res.rows) {
|
||||
console.log(res);
|
||||
|
||||
modelList.value = (res.rows as any[]).map((item: any) => {
|
||||
return {
|
||||
model: item.model,
|
||||
madeinFactory: item.madeinfactory,
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const selectEditModel = (value:string)=>{
|
||||
editDeviceData.madeinFactory = modelList.value.find((item) => item.model == value)?.madeinFactory || ''
|
||||
}
|
||||
const selectAddModel = (value:string)=>{
|
||||
editAddDeviceData.madeinFactory = modelList.value.find((item) => item.model == value)?.madeinFactory || ''
|
||||
}
|
||||
const size = ref<'default' | 'large' | 'small'>('default')
|
||||
|
||||
const handleCloseEditDevice = () => {
|
||||
@ -1026,6 +1054,8 @@ const openMeasure = (data: any) => {
|
||||
watch(showMeasure, (newVal: boolean) => {
|
||||
!newVal && (measureData.autoUpdate = false)
|
||||
})
|
||||
|
||||
getModelList()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
@ -121,6 +121,7 @@
|
||||
background
|
||||
:pager-count="7"
|
||||
layout="prev, pager, next, jumper,sizes,total"
|
||||
@change="changePage"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
@ -503,6 +504,10 @@ const paginationOptions = reactive({
|
||||
pageSizes: [20, 50, 100],
|
||||
})
|
||||
|
||||
const changePage = ()=>{
|
||||
getLinkData(clickTreeData.value!.id!)
|
||||
}
|
||||
|
||||
const getLinkData = (nodeId: string, linkName?: string) => {
|
||||
getLinkListReq({ nodeId, linkName, pageNum: paginationOptions.current, pageSize: paginationOptions.pageSize })
|
||||
.then((res) => {
|
||||
|
Loading…
Reference in New Issue
Block a user