|
@@ -324,21 +324,22 @@
|
|
const [register, { closeModal }] = useModalInner((data) => {
|
|
const [register, { closeModal }] = useModalInner((data) => {
|
|
data && onDataReceive(data);
|
|
data && onDataReceive(data);
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+ let tg = false
|
|
function onDataReceive(data) {
|
|
function onDataReceive(data) {
|
|
modelRef.value = data;
|
|
modelRef.value = data;
|
|
fileFlow.title = data.id ? '编辑RTK' : '新增RTK';
|
|
fileFlow.title = data.id ? '编辑RTK' : '新增RTK';
|
|
// handlertkSn(data.cameraSn ? true : false);
|
|
// handlertkSn(data.cameraSn ? true : false);
|
|
resetFields();
|
|
resetFields();
|
|
console.log('data', data);
|
|
console.log('data', data);
|
|
- handlertkuserType(data.accountType != null ? data.accountType : 0);
|
|
|
|
|
|
+ tg = data.rtkType == 1 && data.accountType == 1 ? true : false
|
|
handleCarmanType(data.cameraType != null ? data.cameraType : 1);
|
|
handleCarmanType(data.cameraType != null ? data.cameraType : 1);
|
|
|
|
+ handlertkuserType(data.accountType != null ? data.accountType : 0);
|
|
handlertkType(data.rtkType != null ? data.rtkType : 1);
|
|
handlertkType(data.rtkType != null ? data.rtkType : 1);
|
|
setFieldsValue(data);
|
|
setFieldsValue(data);
|
|
clearValidate();
|
|
clearValidate();
|
|
}
|
|
}
|
|
function handlertkType(val) {
|
|
function handlertkType(val) {
|
|
- console.log('val', val);
|
|
|
|
|
|
+ console.log('handlertkType', val);
|
|
let upload = [
|
|
let upload = [
|
|
{ field: 'accountType', ifShow: val != 0 },
|
|
{ field: 'accountType', ifShow: val != 0 },
|
|
{ field: 'failureTime', ifShow: val == 0 },
|
|
{ field: 'failureTime', ifShow: val == 0 },
|
|
@@ -346,7 +347,8 @@
|
|
setFieldsValue({
|
|
setFieldsValue({
|
|
accountType: ''
|
|
accountType: ''
|
|
})
|
|
})
|
|
- let ifShow = false
|
|
|
|
|
|
+ let ifShow = tg || false
|
|
|
|
+ // let ifShow = false
|
|
upload.push(
|
|
upload.push(
|
|
...[
|
|
...[
|
|
{ field: 'ipAddr', ifShow },
|
|
{ field: 'ipAddr', ifShow },
|
|
@@ -358,9 +360,10 @@
|
|
]
|
|
]
|
|
)
|
|
)
|
|
updateSchema(upload);
|
|
updateSchema(upload);
|
|
|
|
+ tg = false
|
|
}
|
|
}
|
|
function handlertkuserType(val) {
|
|
function handlertkuserType(val) {
|
|
- console.log('val', val);
|
|
|
|
|
|
+ console.log('handlertkuserType', val);
|
|
let ifShow = val == 1;
|
|
let ifShow = val == 1;
|
|
updateSchema([
|
|
updateSchema([
|
|
{ field: 'ipAddr', ifShow },
|
|
{ field: 'ipAddr', ifShow },
|
|
@@ -378,7 +381,6 @@
|
|
let ifShow = val == 3;
|
|
let ifShow = val == 3;
|
|
updateSchema([
|
|
updateSchema([
|
|
{ field: 'sgRtkSn', ifShow },
|
|
{ field: 'sgRtkSn', ifShow },
|
|
- // { field: 'failureTime', ifShow: val == 3 },
|
|
|
|
{ field: 'cameraSn', required: val != 3 },
|
|
{ field: 'cameraSn', required: val != 3 },
|
|
]);
|
|
]);
|
|
}
|
|
}
|