Compare commits

..

No commits in common. 'de5d8c62082bd9c26477a2056dbc5402141250d1' and '0d87c182ae09968b06aa78e8b35c1d39d5cc8bdf' have entirely different histories.

@ -9,9 +9,6 @@ interface RecIn{
STR: {
EnumType: [number, string][]
},
YX: {
EnumType: [number, string][]
},
UserPage:[string, string][]
},
EnumTypeVal: [number, string][][],
@ -36,17 +33,7 @@ Rec.Node.InTypeIn = [
[1, '遥信'],
[2, '遥测']
];
const getIndex=(num:number)=>{
switch (num)
{
case 1 :
return 100
case 2 :
return 0
default:
return -1
}
}
// 四遥基本类型
Rec.Node.TypeBase = [
[1, '遥信'],
@ -67,37 +54,19 @@ Rec.CONST.STR.EnumType = [
[14, '国网空调模式'],
[21, 'KTC空调']
];
Rec.CONST.YX.EnumType=[
[0, '颜色'],
[1, '文字'],
[2, '颜色+文字'],
]
Rec.EnumTypeVal = []; // 定值类型,用于编辑时的选择
Rec.EnumTypeValFun = []; // 转换函数,用于显示与控制
Rec.EnumTypeVal[100] = [
[0, '绿色'],
[1, '黄色'],
[2, '红色'],
];
Rec.EnumTypeVal[101] = [
[0, '开启'],
[1, '关闭'],
[2, ''],
];
// 缺省
Rec.EnumTypeVal[0] = [
[0, '关闭'],
[1, '开启']
];
Rec.EnumTypeValFun[0] = function (val:any,index:number) {
return Rec.trans!(val, Rec.EnumTypeVal![index+0])
Rec.EnumTypeValFun[0] = function (val:any) {
return Rec.trans!(val, Rec.EnumTypeVal![0])
}
//Rec.EnumTypeValFun[0](val,getIndex(btype));
// 遥控
Rec.EnumTypeVal[1] = [
@ -105,14 +74,14 @@ Rec.EnumTypeVal[1] = [
[1, '开启']
];
Rec.EnumTypeValFun[1] = function (val:any,index:number) {
return Rec.trans!(val, Rec.EnumTypeVal![index+1])
Rec.EnumTypeValFun[1] = function (val:any) {
return Rec.trans!(val, Rec.EnumTypeVal![1])
}
// 数值
Rec.EnumTypeVal[2] = [];
Rec.EnumTypeValFun[2] = function (val:any,index:number) {
return Rec.trans!(val, Rec.EnumTypeVal![index+2]);
Rec.EnumTypeValFun[2] = function (val:any) {
return [];
}
// timestamp 转换成时间
@ -192,8 +161,7 @@ Rec.EnumTypeVal[21] = [
Rec.EnumTypeValFun[21] = function (val:any) {
return Rec.trans!(val, Rec.EnumTypeVal![21])
}
//
Rec.EnumTypeValFun[21]()
// 用户的缺省界面
Rec.CONST.UserPage = [
['Admin', 'Admin'],

Loading…
Cancel
Save