|
@@ -28,14 +28,14 @@ const OnlineFormMixins = {
|
|
|
}
|
|
|
},
|
|
|
mixins: [uploadMixin],
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
isLoading: true,
|
|
|
formData: {},
|
|
|
rules: {},
|
|
|
components_json: {},
|
|
|
- blueunit:[],
|
|
|
- redunit:[],
|
|
|
+ blueunit: [],
|
|
|
+ redunit: [],
|
|
|
component_movementjson: {},
|
|
|
formConfig: {
|
|
|
formType: undefined,
|
|
@@ -62,13 +62,13 @@ const OnlineFormMixins = {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getFormData() {
|
|
|
+ getFormData () {
|
|
|
return this.formData;
|
|
|
},
|
|
|
- getPermCode(widget, operation) {
|
|
|
+ getPermCode (widget, operation) {
|
|
|
return getOperationPermCode(widget, operation);
|
|
|
},
|
|
|
- loadOnlineFormData() {
|
|
|
+ loadOnlineFormData () {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
OnlineFormController.render(this, {
|
|
|
formId: this.formId
|
|
@@ -178,7 +178,7 @@ const OnlineFormMixins = {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- initWidget(widget, formConfig) {
|
|
|
+ initWidget (widget, formConfig) {
|
|
|
if (widget != null) {
|
|
|
if (widget.datasourceId) widget.datasource = this.datasourceMap.get(widget.datasourceId);
|
|
|
if (widget.relationId) {
|
|
@@ -339,7 +339,7 @@ const OnlineFormMixins = {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- initFormWidgetList(formConfig) {
|
|
|
+ initFormWidgetList (formConfig) {
|
|
|
this.errorMessage = [];
|
|
|
if (Array.isArray(formConfig.formWidgetList)) {
|
|
|
formConfig.formWidgetList.forEach(widget => {
|
|
@@ -353,7 +353,7 @@ const OnlineFormMixins = {
|
|
|
console.error(this.errorMessage);
|
|
|
}
|
|
|
},
|
|
|
- buildRuleItem(widget, rule) {
|
|
|
+ buildRuleItem (widget, rule) {
|
|
|
if (rule.propDataJson) rule.data = JSON.parse(rule.propDataJson);
|
|
|
if (widget != null && rule != null) {
|
|
|
switch (rule.onlineRule.ruleType) {
|
|
@@ -378,7 +378,7 @@ const OnlineFormMixins = {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- buildWidgetRule(widget, rules) {
|
|
|
+ buildWidgetRule (widget, rules) {
|
|
|
if (widget != null && widget.column != null) {
|
|
|
let widgetRuleKey = (widget.relation ? widget.relation.variableName + '__' : '') + widget.column.columnName;
|
|
|
// 必填字段以及设置了验证规则的字段
|
|
@@ -400,7 +400,7 @@ const OnlineFormMixins = {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- initWidgetRule(formConfig) {
|
|
|
+ initWidgetRule (formConfig) {
|
|
|
if (Array.isArray(formConfig.formWidgetList)) {
|
|
|
let rules = {};
|
|
|
formConfig.formWidgetList.forEach(widget => {
|
|
@@ -412,9 +412,9 @@ const OnlineFormMixins = {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- initFormDatasourceData(formConfig) {
|
|
|
+ initFormDatasourceData (formConfig) {
|
|
|
let that = this;
|
|
|
- function addFormDataByColumn(retObj, column, relation) {
|
|
|
+ function addFormDataByColumn (retObj, column, relation) {
|
|
|
let fieldName = (relation ? relation.variableName + '__' : '') + column.columnName;
|
|
|
if (retObj == null) retObj = {};
|
|
|
if (formConfig.formType === that.SysOnlineFormType.QUERY) {
|
|
@@ -455,7 +455,7 @@ const OnlineFormMixins = {
|
|
|
}
|
|
|
this.$set(this, 'formData', datasourceFormData);
|
|
|
},
|
|
|
- initWidgetLinkage(formConfig) {
|
|
|
+ initWidgetLinkage (formConfig) {
|
|
|
this.linkageMap.forEach((widgetList, key) => {
|
|
|
let column = this.columnMap.get(key);
|
|
|
let watchKey = null;
|
|
@@ -479,7 +479,7 @@ const OnlineFormMixins = {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- initFormData(formConfig) {
|
|
|
+ initFormData (formConfig) {
|
|
|
this.masterTable = this.tableMap.get(formConfig.masterTableId);
|
|
|
// 初始化表单数据
|
|
|
this.initFormDatasourceData(formConfig);
|
|
@@ -489,32 +489,32 @@ const OnlineFormMixins = {
|
|
|
// 初始化校验信息
|
|
|
this.initWidgetRule(formConfig);
|
|
|
},
|
|
|
- getParamValue(valueType, valueData) {
|
|
|
+ getParamValue (valueType, valueData) {
|
|
|
switch (valueType) {
|
|
|
case this.SysOnlineParamValueType.FORM_PARAM:
|
|
|
return this.params ? this.params[valueData] : undefined;
|
|
|
case this.SysOnlineParamValueType.TABLE_COLUMN:
|
|
|
- {
|
|
|
- let column = this.columnMap.get(valueData);
|
|
|
- let columnValue = null;
|
|
|
- if (this.formConfig.formType === this.SysOnlineFormType.QUERY) {
|
|
|
- columnValue = this.formData.formFilterCopy[column.columnName];
|
|
|
- } else {
|
|
|
- columnValue = this.formData[column.columnName];
|
|
|
- }
|
|
|
- if (column == null || columnValue == null || columnValue === '') {
|
|
|
- return null;
|
|
|
- } else {
|
|
|
- return columnValue;
|
|
|
- }
|
|
|
+ {
|
|
|
+ let column = this.columnMap.get(valueData);
|
|
|
+ let columnValue = null;
|
|
|
+ if (this.formConfig.formType === this.SysOnlineFormType.QUERY) {
|
|
|
+ columnValue = this.formData.formFilterCopy[column.columnName];
|
|
|
+ } else {
|
|
|
+ columnValue = this.formData[column.columnName];
|
|
|
}
|
|
|
+ if (column == null || columnValue == null || columnValue === '') {
|
|
|
+ return null;
|
|
|
+ } else {
|
|
|
+ return columnValue;
|
|
|
+ }
|
|
|
+ }
|
|
|
case this.SysOnlineParamValueType.STATIC_DICT:
|
|
|
return Array.isArray(valueData) ? valueData[1] : undefined;
|
|
|
case this.SysOnlineParamValueType.INPUT_VALUE:
|
|
|
return valueData;
|
|
|
}
|
|
|
},
|
|
|
- getParamValueObj(paramName, valueType, valueData, retObj) {
|
|
|
+ getParamValueObj (paramName, valueType, valueData, retObj) {
|
|
|
try {
|
|
|
if (retObj == null) retObj = {};
|
|
|
retObj[paramName] = this.getParamValue(valueType, valueData);
|
|
@@ -524,14 +524,14 @@ const OnlineFormMixins = {
|
|
|
console.log(e);
|
|
|
}
|
|
|
},
|
|
|
- clean() {
|
|
|
+ clean () {
|
|
|
this.datasourceMap = null;
|
|
|
this.relationMap = null;
|
|
|
this.tableMap = null;
|
|
|
this.columnMap = null;
|
|
|
this.dictMap = null;
|
|
|
},
|
|
|
- loadAllDropdownData() {
|
|
|
+ loadAllDropdownData () {
|
|
|
if (Array.isArray(this.dropdownWidgetList)) {
|
|
|
this.dropdownWidgetList.forEach(dropdownWidget => {
|
|
|
let dropdownWidgetImpl = this.$refs[dropdownWidget.variableName][0];
|
|
@@ -541,12 +541,11 @@ const OnlineFormMixins = {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- reload() {
|
|
|
+ reload () {
|
|
|
this.loadOnlineFormData().then(res => {
|
|
|
this.isLoading = false;
|
|
|
if (this.formConfig.formType === this.SysOnlineFormType.FORM) {
|
|
|
if (Number.parseInt(this.operationType) === this.SysCustomWidgetOperationType.EDIT && this.saveOnClose === '1') {
|
|
|
-
|
|
|
// 编辑操作页面,初始化页面数据
|
|
|
let httpCall = null;
|
|
|
if (this.saveOnClose === '0') {
|
|
@@ -604,8 +603,8 @@ const OnlineFormMixins = {
|
|
|
console.log(e);
|
|
|
});
|
|
|
},
|
|
|
- onResume() { },
|
|
|
- getPrimaryKeyColumnParam(table, row) {
|
|
|
+ onResume () { },
|
|
|
+ getPrimaryKeyColumnParam (table, row) {
|
|
|
if (table && Array.isArray(table.columnList)) {
|
|
|
return table.columnList.reduce((retObj, column) => {
|
|
|
let fieldName = (table.relation ? table.relation.variableName + '__' : '') + column.columnName;
|
|
@@ -618,7 +617,7 @@ const OnlineFormMixins = {
|
|
|
|
|
|
return null;
|
|
|
},
|
|
|
- buildSubFormParams(operation, subFormInfo, row) {
|
|
|
+ buildSubFormParams (operation, subFormInfo, row) {
|
|
|
let subFormMasterTable = this.tableMap.get(subFormInfo.masterTableId);
|
|
|
if (subFormMasterTable == null) return null;
|
|
|
if (subFormMasterTable.relation == null) {
|
|
@@ -653,7 +652,7 @@ const OnlineFormMixins = {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- async handlerOperation(operation, row, widget) {
|
|
|
+ async handlerOperation (operation, row, widget) {
|
|
|
if (this.preview()) return;
|
|
|
if (operation.formId != null) {
|
|
|
OnlineFormController.view(this, {
|
|
@@ -779,41 +778,44 @@ const OnlineFormMixins = {
|
|
|
}
|
|
|
}).catch(e => { });
|
|
|
} else if (operation.type === this.SysCustomWidgetOperationType.EXPORT) {
|
|
|
+ console.log('this.formId :>> ', this.formId);
|
|
|
if (this.formId == 1657932361767063552) {
|
|
|
-
|
|
|
let fileInfoStr = row.component_movementjson;
|
|
|
- let fileInfoArr = JSON.parse(fileInfoStr);
|
|
|
- let fileInfo = fileInfoArr[0]; // 假设只有一个文件
|
|
|
- await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/mainUnit', {
|
|
|
- params: {
|
|
|
- datasourceId: '1657931215497334784',
|
|
|
- fieldName: 'component_movementjson',
|
|
|
- asImage: false,
|
|
|
- dataId: row.id,
|
|
|
- filename: fileInfo.filename,
|
|
|
- Authorization: getToken(),
|
|
|
- MenuId: '1657932967709773824'
|
|
|
- }
|
|
|
- })
|
|
|
- .then(response => {
|
|
|
- // 处理成功的响应
|
|
|
- this.component_movementjson = response.data;
|
|
|
+ console.log('fileInfoStr :>> ', fileInfoStr);
|
|
|
+ if (fileInfoStr != undefined) {
|
|
|
+ let fileInfoArr = JSON.parse(fileInfoStr);
|
|
|
+ let fileInfo = fileInfoArr[0]; // 假设只有一个文件
|
|
|
+ await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/mainUnit', {
|
|
|
+ params: {
|
|
|
+ datasourceId: '1657931215497334784',
|
|
|
+ fieldName: 'component_movementjson',
|
|
|
+ asImage: false,
|
|
|
+ dataId: row.id,
|
|
|
+ filename: fileInfo.filename,
|
|
|
+ Authorization: getToken(),
|
|
|
+ MenuId: '1657932967709773824'
|
|
|
+ }
|
|
|
})
|
|
|
- .catch(error => {
|
|
|
- // 处理错误
|
|
|
- console.error(error);
|
|
|
- });
|
|
|
+ .then(response => {
|
|
|
+ // 处理成功的响应
|
|
|
+ this.component_movementjson = response.data;
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ // 处理错误
|
|
|
+ console.error(error);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
fileInfoStr = row.components_json;
|
|
|
- fileInfoArr = JSON.parse(fileInfoStr);
|
|
|
- fileInfo = fileInfoArr[0]; // 假设只有一个文件
|
|
|
+ let fileInfoArr1 = JSON.parse(fileInfoStr);
|
|
|
+ let fileInfo1 = fileInfoArr1[0]; // 假设只有一个文件
|
|
|
await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/mainUnit', {
|
|
|
params: {
|
|
|
datasourceId: '1657931215497334784',
|
|
|
fieldName: 'components_json',
|
|
|
asImage: false,
|
|
|
dataId: row.id,
|
|
|
- filename: fileInfo.filename,
|
|
|
+ filename: fileInfo1.filename,
|
|
|
Authorization: getToken(),
|
|
|
MenuId: '1657932967709773824'
|
|
|
}
|
|
@@ -837,7 +839,7 @@ const OnlineFormMixins = {
|
|
|
target: row.target,
|
|
|
team: row.team,
|
|
|
task: row.task,
|
|
|
- pos:{
|
|
|
+ pos: {
|
|
|
lat: row.lat,
|
|
|
lon: row.lon,
|
|
|
height: row.height
|
|
@@ -858,19 +860,18 @@ const OnlineFormMixins = {
|
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
|
document.body.removeChild(link);
|
|
|
- }
|
|
|
- else if(this.formId == 1675055217952952320){
|
|
|
+ } else if (this.formId == 1675055217952952320) {
|
|
|
console.log('row :>> ', row);
|
|
|
let number = row.number
|
|
|
const data = {};
|
|
|
data[number] = {
|
|
|
type: row.type,
|
|
|
- properties:{
|
|
|
+ properties: {
|
|
|
id: row.id,
|
|
|
lon: row.lon,
|
|
|
lat: row.lat,
|
|
|
h: row.h,
|
|
|
- picture: row.picture,
|
|
|
+ picture: row.picture
|
|
|
}
|
|
|
}
|
|
|
const jsonData = JSON.stringify(data);
|
|
@@ -883,28 +884,27 @@ const OnlineFormMixins = {
|
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
|
document.body.removeChild(link);
|
|
|
- }
|
|
|
- else if(this.formId == 1675055674104483840){
|
|
|
+ } else if (this.formId == 1675055674104483840) {
|
|
|
console.log('row :>> ', row);
|
|
|
let name = row.name
|
|
|
const data = {};
|
|
|
data[name] = {
|
|
|
- id:row.id,
|
|
|
- name: row.name,
|
|
|
- BW: row.BW,
|
|
|
- PW: row.PW,
|
|
|
- fc: row.fc,
|
|
|
- fs: row.fs,
|
|
|
- h: row.h,
|
|
|
- lat: row.lat,
|
|
|
- lon: row.lon,
|
|
|
- modulation: row.modulation,
|
|
|
- prf: row.prf,
|
|
|
- prf_mode: row.prf_mode,
|
|
|
- type: row.type,
|
|
|
- style: row.style,
|
|
|
- url: row.url,
|
|
|
- picture: row.picture,
|
|
|
+ id: row.id,
|
|
|
+ name: row.name,
|
|
|
+ BW: row.BW,
|
|
|
+ PW: row.PW,
|
|
|
+ fc: row.fc,
|
|
|
+ fs: row.fs,
|
|
|
+ h: row.h,
|
|
|
+ lat: row.lat,
|
|
|
+ lon: row.lon,
|
|
|
+ modulation: row.modulation,
|
|
|
+ prf: row.prf,
|
|
|
+ prf_mode: row.prf_mode,
|
|
|
+ type: row.type,
|
|
|
+ style: row.style,
|
|
|
+ url: row.url,
|
|
|
+ picture: row.picture
|
|
|
}
|
|
|
const jsonData = JSON.stringify(data);
|
|
|
const blob = new Blob([jsonData], { type: 'application/json' });
|
|
@@ -916,13 +916,12 @@ const OnlineFormMixins = {
|
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
|
document.body.removeChild(link);
|
|
|
- }
|
|
|
- else if(this.formId == 1675056214280507392){
|
|
|
+ } else if (this.formId == 1675056214280507392) {
|
|
|
let number = row.number
|
|
|
const data = {};
|
|
|
data[number] = {
|
|
|
type: row.type,
|
|
|
- properties:{
|
|
|
+ properties: {
|
|
|
id: row.id,
|
|
|
CSV_starttime: row.CSV_starttime,
|
|
|
CSV_endtime: row.CSV_endtime,
|
|
@@ -937,7 +936,7 @@ const OnlineFormMixins = {
|
|
|
common_trueanomaly: row.common_trueanomaly,
|
|
|
config_type: row.config_type,
|
|
|
mark: row.mark,
|
|
|
- picture: row.picture,
|
|
|
+ picture: row.picture
|
|
|
}
|
|
|
}
|
|
|
const jsonData = JSON.stringify(data);
|
|
@@ -950,15 +949,13 @@ const OnlineFormMixins = {
|
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
|
document.body.removeChild(link);
|
|
|
- }
|
|
|
- else if(this.formId == 1675048581024714752)
|
|
|
- {
|
|
|
+ } else if (this.formId == 1675048581024714752) {
|
|
|
console.log('row :>> ', row);
|
|
|
let number = row.number
|
|
|
const data = {};
|
|
|
data[number] = {
|
|
|
type: row.type,
|
|
|
- properties:{
|
|
|
+ properties: {
|
|
|
id: row.id,
|
|
|
launch_lon: row.launch_lon,
|
|
|
launch_lat: row.launch_lat,
|
|
@@ -982,14 +979,12 @@ const OnlineFormMixins = {
|
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
|
document.body.removeChild(link);
|
|
|
- }
|
|
|
- else if(this.formId == 1674960384441716736){
|
|
|
-
|
|
|
+ } else if (this.formId == 1674960384441716736) {
|
|
|
let number = row.number
|
|
|
const data = {};
|
|
|
data[number] = {
|
|
|
type: row.type,
|
|
|
- properties:{
|
|
|
+ properties: {
|
|
|
id: row.id,
|
|
|
N: row.N,
|
|
|
f0: row.fo,
|
|
@@ -998,7 +993,7 @@ const OnlineFormMixins = {
|
|
|
tr: row.tr,
|
|
|
ts: row.ts,
|
|
|
url: row.url,
|
|
|
- method: row.method,
|
|
|
+ method: row.method
|
|
|
}
|
|
|
}
|
|
|
const jsonData = JSON.stringify(data);
|
|
@@ -1011,15 +1006,14 @@ const OnlineFormMixins = {
|
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
|
document.body.removeChild(link);
|
|
|
- }
|
|
|
- else if(this.formId == 1674971627114205184){
|
|
|
+ } else if (this.formId == 1674971627114205184) {
|
|
|
console.log('row :>> ', row);
|
|
|
let number = row.number
|
|
|
const data = {};
|
|
|
data[number] = {
|
|
|
type: row.type,
|
|
|
creator: row.creator,
|
|
|
- properties:{
|
|
|
+ properties: {
|
|
|
id: row.id,
|
|
|
f0: row.fo,
|
|
|
number: row.number,
|
|
@@ -1030,7 +1024,7 @@ const OnlineFormMixins = {
|
|
|
t_r: row.t_r,
|
|
|
ts: row.ts,
|
|
|
url: row.url,
|
|
|
- method: row.method,
|
|
|
+ method: row.method
|
|
|
}
|
|
|
}
|
|
|
const jsonData = JSON.stringify(data);
|
|
@@ -1043,60 +1037,59 @@ const OnlineFormMixins = {
|
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
|
document.body.removeChild(link);
|
|
|
- }
|
|
|
- else {
|
|
|
- //todo 场景想定json导出
|
|
|
+ } else {
|
|
|
+ // todo 场景想定json导出
|
|
|
|
|
|
let fileInfoStr = row.blueunit;
|
|
|
let fileInfoArr = JSON.parse(fileInfoStr);
|
|
|
|
|
|
let fileInfo = fileInfoArr[0]; // 假设只有一个文件
|
|
|
- for(let i = 0;i<fileInfoArr.length;i++){
|
|
|
- await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/main', {
|
|
|
- params: {
|
|
|
- datasourceId: '1656243335922192384',
|
|
|
- fieldName: 'blueunit',
|
|
|
- asImage: false,
|
|
|
- dataId: row.id,
|
|
|
- filename: fileInfoArr[i].filename,
|
|
|
- Authorization: getToken(),
|
|
|
- MenuId: '1656244747347431424'
|
|
|
- }
|
|
|
- })
|
|
|
- .then(response => {
|
|
|
- // 处理成功的响应
|
|
|
- this.blueunit.push(response.data) ;
|
|
|
+ for (let i = 0; i < fileInfoArr.length; i++) {
|
|
|
+ await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/main', {
|
|
|
+ params: {
|
|
|
+ datasourceId: '1656243335922192384',
|
|
|
+ fieldName: 'blueunit',
|
|
|
+ asImage: false,
|
|
|
+ dataId: row.id,
|
|
|
+ filename: fileInfoArr[i].filename,
|
|
|
+ Authorization: getToken(),
|
|
|
+ MenuId: '1656244747347431424'
|
|
|
+ }
|
|
|
})
|
|
|
- .catch(error => {
|
|
|
+ .then(response => {
|
|
|
+ // 处理成功的响应
|
|
|
+ this.blueunit.push(response.data);
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
// 处理错误
|
|
|
- console.error(error);
|
|
|
- });
|
|
|
+ console.error(error);
|
|
|
+ });
|
|
|
}
|
|
|
console.log('this.blueunit :>> ', this.blueunit);
|
|
|
- fileInfoStr = row.redunit;
|
|
|
- fileInfoArr = JSON.parse(fileInfoStr);
|
|
|
+ fileInfoStr = row.redunit;
|
|
|
+ fileInfoArr = JSON.parse(fileInfoStr);
|
|
|
console.log('fileInfoArr :>> ', fileInfoArr);
|
|
|
|
|
|
- for(let i = 0;i<fileInfoArr.length;i++){
|
|
|
- await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/main', {
|
|
|
- params: {
|
|
|
- datasourceId: '1656243335922192384',
|
|
|
- fieldName: 'redunit',
|
|
|
- asImage: false,
|
|
|
- dataId: row.id,
|
|
|
- filename: fileInfoArr[i].filename,
|
|
|
- Authorization: getToken(),
|
|
|
- MenuId: '1656244747347431424'
|
|
|
- }
|
|
|
- })
|
|
|
- .then(response => {
|
|
|
- // 处理成功的响应
|
|
|
- this.redunit.push(response.data) ;
|
|
|
+ for (let i = 0; i < fileInfoArr.length; i++) {
|
|
|
+ await axios.get('http://localhost:8084/admin/online/onlineOperation/downloadDatasource/main', {
|
|
|
+ params: {
|
|
|
+ datasourceId: '1656243335922192384',
|
|
|
+ fieldName: 'redunit',
|
|
|
+ asImage: false,
|
|
|
+ dataId: row.id,
|
|
|
+ filename: fileInfoArr[i].filename,
|
|
|
+ Authorization: getToken(),
|
|
|
+ MenuId: '1656244747347431424'
|
|
|
+ }
|
|
|
})
|
|
|
- .catch(error => {
|
|
|
+ .then(response => {
|
|
|
+ // 处理成功的响应
|
|
|
+ this.redunit.push(response.data);
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
// 处理错误
|
|
|
- console.error(error);
|
|
|
- });
|
|
|
+ console.error(error);
|
|
|
+ });
|
|
|
}
|
|
|
const data = {
|
|
|
id: row.id,
|
|
@@ -1108,9 +1101,9 @@ const OnlineFormMixins = {
|
|
|
bluecnt: row.bluecnt,
|
|
|
target: row.target,
|
|
|
starttime: row.starttime,
|
|
|
- steptime: row.steptime ,
|
|
|
+ steptime: row.steptime,
|
|
|
blueunit: this.blueunit,
|
|
|
- redunit: this.redunit,
|
|
|
+ redunit: this.redunit
|
|
|
};
|
|
|
const jsonData = JSON.stringify(data);
|
|
|
const blob = new Blob([jsonData], { type: 'application/json' });
|
|
@@ -1122,12 +1115,7 @@ const OnlineFormMixins = {
|
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
|
document.body.removeChild(link);
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
httpCall.then(res => {
|
|
@@ -1139,7 +1127,7 @@ const OnlineFormMixins = {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- getRelationTableData(tableWidget) {
|
|
|
+ getRelationTableData (tableWidget) {
|
|
|
if (tableWidget.widgetType === this.SysCustomWidgetType.Table) {
|
|
|
let table = tableWidget.table;
|
|
|
let temp = this.$refs[tableWidget.variableName];
|
|
@@ -1156,7 +1144,7 @@ const OnlineFormMixins = {
|
|
|
}
|
|
|
return null;
|
|
|
},
|
|
|
- getWidgetPrimaryColumnId(widget) {
|
|
|
+ getWidgetPrimaryColumnId (widget) {
|
|
|
let columnList = null;
|
|
|
if (widget.relationId == null) {
|
|
|
columnList = widget.datasource.masterTable.columnList;
|
|
@@ -1177,16 +1165,15 @@ const OnlineFormMixins = {
|
|
|
},
|
|
|
...mapMutations(['addOnlineFormCache'])
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.reload();
|
|
|
-
|
|
|
},
|
|
|
- destoryed() {
|
|
|
+ destoryed () {
|
|
|
this.clean();
|
|
|
},
|
|
|
watch: {
|
|
|
formId: {
|
|
|
- handler(newValue) {
|
|
|
+ handler (newValue) {
|
|
|
this.reload();
|
|
|
}
|
|
|
}
|