优化警告问题
This commit is contained in:
@@ -11,7 +11,6 @@ export class Many2OneRadioField extends RadioField {
|
|||||||
// 你自己的代码
|
// 你自己的代码
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onImageClick(event) {
|
onImageClick(event) {
|
||||||
// 放大图片逻辑
|
// 放大图片逻辑
|
||||||
// 获取图片元素
|
// 获取图片元素
|
||||||
@@ -47,7 +46,6 @@ export class Many2OneRadioField extends RadioField {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Many2OneRadioField.template = "jikimo_frontend.Many2OneRadioField"
|
Many2OneRadioField.template = "jikimo_frontend.Many2OneRadioField"
|
||||||
|
|||||||
@@ -15,23 +15,24 @@ export class MyCustomWidget extends Many2ManyCheckboxesField {
|
|||||||
// 放大图片逻辑
|
// 放大图片逻辑
|
||||||
// 获取图片元素
|
// 获取图片元素
|
||||||
const img = event.target;
|
const img = event.target;
|
||||||
const close = img.nextSibling
|
const close = img.nextSibling;
|
||||||
|
|
||||||
// 实现放大图片逻辑
|
// 实现放大图片逻辑
|
||||||
// 比如使用 CSS 放大
|
// 比如使用 CSS 放大
|
||||||
img.parentElement.classList.add('zoomed');
|
img.parentElement.classList.add('zoomed');
|
||||||
close.classList.add('img_close')
|
close.classList.add('img_close');
|
||||||
}
|
}
|
||||||
|
|
||||||
onCloseClick(event) {
|
onCloseClick(event) {
|
||||||
const close = event.target;
|
const close = event.target;
|
||||||
const img = close.previousSibling
|
const img = close.previousSibling;
|
||||||
img.parentElement.classList.remove('zoomed')
|
img.parentElement.classList.remove('zoomed');
|
||||||
close.classList.remove('img_close')
|
close.classList.remove('img_close');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyCustomWidget.template = "jikimo_frontend.MyCustomWidget"
|
MyCustomWidget.template = "jikimo_frontend.MyCustomWidget";
|
||||||
// MyCustomWidget.supportedTypes = ['many2many'];
|
// MyCustomWidget.supportedTypes = ['many2many'];
|
||||||
|
|
||||||
registry.category("fields").add("custom_many2many_checkboxes", MyCustomWidget);
|
registry.category("fields").add("custom_many2many_checkboxes", MyCustomWidget);
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import {patch} from '@web/core/utils/patch';
|
import {patch} from '@web/core/utils/patch';
|
||||||
// import { Dialog } from "@web/core/dialog/dialog";
|
// import { Dialog } from "@web/core/dialog/dialog";
|
||||||
import {_t} from "@web/core/l10n/translation";
|
import {_t} from "@web/core/l10n/translation";
|
||||||
import {FormStatusIndicator} from "@web/views/form/form_status_indicator/form_status_indicator"
|
import {FormStatusIndicator} from "@web/views/form/form_status_indicator/form_status_indicator";
|
||||||
|
|
||||||
var Dialog = require('web.Dialog');
|
var Dialog = require('web.Dialog');
|
||||||
// var {patch} = require("web.utils") 这句话也行
|
// var {patch} = require("web.utils") 这句话也行
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/** @odoo-module */
|
/** @odoo-module */
|
||||||
|
|
||||||
import {patch} from '@web/core/utils/patch';
|
import {patch} from '@web/core/utils/patch';
|
||||||
import {ListRenderer} from "@web/views/list/list_renderer"
|
import {ListRenderer} from "@web/views/list/list_renderer";
|
||||||
|
|
||||||
// var {patch} = require("web.utils") 这句话也行
|
// var {patch} = require("web.utils") 这句话也行
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ patch(ListRenderer.prototype, 'jikimo_frontend.ListRenderer', {
|
|||||||
|
|
||||||
const table = this.tableRef.el;
|
const table = this.tableRef.el;
|
||||||
const headers = [...table.querySelectorAll("thead th:not(.o_list_actions_header)")];
|
const headers = [...table.querySelectorAll("thead th:not(.o_list_actions_header)")];
|
||||||
const column_num = headers.length
|
const column_num = headers.length;
|
||||||
|
|
||||||
if (!this.columnWidths || !this.columnWidths.length) {
|
if (!this.columnWidths || !this.columnWidths.length) {
|
||||||
// no column widths to restore
|
// no column widths to restore
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ patch(ListRenderer.prototype, '/jikimo_frontend/static/src/views/list_nums/list_
|
|||||||
const nbCols = this._super(...arguments);
|
const nbCols = this._super(...arguments);
|
||||||
return nbCols + 1;
|
return nbCols + 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import logging
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import requests
|
import requests
|
||||||
import cpca
|
import cpca
|
||||||
from odoo.exceptions import UserError
|
# from odoo.exceptions import UserError
|
||||||
from odoo.exceptions import ValidationError
|
# from odoo.exceptions import ValidationError
|
||||||
from odoo import api, fields, models, SUPERUSER_ID, _
|
from odoo import api, fields, models
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -44,12 +44,18 @@ class JdEclp(models.Model):
|
|||||||
|
|
||||||
@api.depends('name')
|
@api.depends('name')
|
||||||
def _check_is_out(self):
|
def _check_is_out(self):
|
||||||
|
"""
|
||||||
|
判断是否为出库单
|
||||||
|
"""
|
||||||
if self.name:
|
if self.name:
|
||||||
is_check_out = self.name.split('/')
|
is_check_out = self.name.split('/')
|
||||||
self.check_out = is_check_out[1]
|
self.check_out = is_check_out[1]
|
||||||
|
|
||||||
@api.depends('carrier_tracking_ref')
|
@api.depends('carrier_tracking_ref')
|
||||||
def query_bill_pdf(self):
|
def query_bill_pdf(self):
|
||||||
|
"""
|
||||||
|
查询物流面单,并赋值给bill
|
||||||
|
"""
|
||||||
self.bill = self.env['ir.attachment'].sudo().search([('name', '=', self.carrier_tracking_ref)])
|
self.bill = self.env['ir.attachment'].sudo().search([('name', '=', self.carrier_tracking_ref)])
|
||||||
|
|
||||||
@api.depends('origin')
|
@api.depends('origin')
|
||||||
@@ -84,7 +90,6 @@ class JdEclp(models.Model):
|
|||||||
self.receiverTownName = self.receiverTownName
|
self.receiverTownName = self.receiverTownName
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error address is none: {e}")
|
print(f"Error address is none: {e}")
|
||||||
pass
|
|
||||||
|
|
||||||
def create_order(self):
|
def create_order(self):
|
||||||
# sale_order_id = self.env['sale.order'].search([('name', '=', self.origin)])
|
# sale_order_id = self.env['sale.order'].search([('name', '=', self.origin)])
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ class FinishStatusChange(models.Model):
|
|||||||
action['context'] = {'default_picking_ids': self.ids}
|
action['context'] = {'default_picking_ids': self.ids}
|
||||||
return action
|
return action
|
||||||
|
|
||||||
out_start_time = str(datetime.now())
|
# out_start_time = str(datetime.now())
|
||||||
json2 = {
|
json2 = {
|
||||||
'params': {
|
'params': {
|
||||||
'model_name': 'jikimo.process.order',
|
'model_name': 'jikimo.process.order',
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
import time
|
|
||||||
import json
|
import json
|
||||||
import base64
|
import base64
|
||||||
import shutil
|
import shutil
|
||||||
@@ -11,7 +10,7 @@ from zipfile import ZipFile
|
|||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import requests
|
import requests
|
||||||
from odoo.http import request
|
from odoo.http import request
|
||||||
from odoo import fields, models, api, _
|
from odoo import fields, models, api
|
||||||
from odoo.exceptions import UserError
|
from odoo.exceptions import UserError
|
||||||
from odoo.exceptions import MissingError
|
from odoo.exceptions import MissingError
|
||||||
from odoo.exceptions import ValidationError
|
from odoo.exceptions import ValidationError
|
||||||
@@ -470,7 +469,7 @@ class WorkCenterBarcode(models.Model):
|
|||||||
raise UserError('NC下发执行超时, 请检查下发状态')
|
raise UserError('NC下发执行超时, 请检查下发状态')
|
||||||
|
|
||||||
def get__state(self):
|
def get__state(self):
|
||||||
pay_time = str(datetime.now())
|
# pay_time = str(datetime.now())
|
||||||
json = {
|
json = {
|
||||||
'params': {
|
'params': {
|
||||||
'model_name': 'jikimo.process.order',
|
'model_name': 'jikimo.process.order',
|
||||||
|
|||||||
@@ -97,13 +97,12 @@ export class CodeField extends Component {
|
|||||||
} else {
|
} else {
|
||||||
if (records[0].state === '占用') {
|
if (records[0].state === '占用') {
|
||||||
// console.log('此托盘已占用,请检查')
|
// console.log('此托盘已占用,请检查')
|
||||||
alert('此托盘已占用,请检查')
|
alert('此托盘已占用,请检查');
|
||||||
} else {
|
} else {
|
||||||
// console.log('此托盘已损坏,请登记')
|
// console.log('此托盘已损坏,请登记')
|
||||||
alert('此托盘已损坏,请登记')
|
alert('此托盘已损坏,请登记');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
const searchInput = this.autocompleteContainerRef.el.querySelector("input");
|
const searchInput = this.autocompleteContainerRef.el.querySelector("input");
|
||||||
searchInput.value = barcode;
|
searchInput.value = barcode;
|
||||||
@@ -114,7 +113,7 @@ export class CodeField extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CodeField.template = 'sf_machine_connect.CodeField'
|
CodeField.template = 'sf_machine_connect.CodeField';
|
||||||
// Register the field in the registry
|
// Register the field in the registry
|
||||||
CodeField.props = standardFieldProps;
|
CodeField.props = standardFieldProps;
|
||||||
registry.category("fields").add("code", CodeField);
|
registry.category("fields").add("code", CodeField);
|
||||||
|
|||||||
@@ -48,4 +48,4 @@ odoo.define('my_module.barcode_handler', function (require) {
|
|||||||
return {
|
return {
|
||||||
BarcodeHandlerField: BarcodeHandlerField,
|
BarcodeHandlerField: BarcodeHandlerField,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const { Component, xml } = owl;
|
|||||||
|
|
||||||
export class BarcodeHandlerField extends Component {
|
export class BarcodeHandlerField extends Component {
|
||||||
setup() {
|
setup() {
|
||||||
this.actionService = useService("action")
|
this.actionService = useService("action");
|
||||||
const barcode = useService("barcode");
|
const barcode = useService("barcode");
|
||||||
// this.rpc = useService("rpc");
|
// this.rpc = useService("rpc");
|
||||||
// useBus(barcode.bus, "barcode_scanned", this.onBarcodeScanned.bind(this));
|
// useBus(barcode.bus, "barcode_scanned", this.onBarcodeScanned.bind(this));
|
||||||
@@ -18,7 +18,7 @@ export class BarcodeHandlerField extends Component {
|
|||||||
// const { data } = await this.env.services.rpc('/web/dataset/call_kw', params);
|
// const { data } = await this.env.services.rpc('/web/dataset/call_kw', params);
|
||||||
const response = await this.env.services.rpc('/web/dataset/call_kw', params);
|
const response = await this.env.services.rpc('/web/dataset/call_kw', params);
|
||||||
// return response
|
// return response
|
||||||
const responseObject = JSON.parse(response)
|
const responseObject = JSON.parse(response);
|
||||||
return responseObject;
|
return responseObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,8 +58,7 @@ export class BarcodeHandlerField extends Component {
|
|||||||
} else {
|
} else {
|
||||||
// console.error("Barcode not found or RPC call failed.");
|
// console.error("Barcode not found or RPC call failed.");
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BarcodeHandlerField.template = xml``;
|
BarcodeHandlerField.template = xml``;
|
||||||
|
|||||||
@@ -2,15 +2,11 @@
|
|||||||
import base64
|
import base64
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import json
|
|
||||||
import hashlib
|
|
||||||
import time
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import requests
|
from odoo import fields, models
|
||||||
from odoo import fields, models, api, _
|
# from odoo.exceptions import ValidationError
|
||||||
from odoo.exceptions import ValidationError
|
|
||||||
from odoo.exceptions import UserError
|
from odoo.exceptions import UserError
|
||||||
from odoo.addons.sf_machine_connect.models import py2opcua, ftp_operate
|
from odoo.addons.sf_machine_connect.models import ftp_operate
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
@@ -17,16 +17,10 @@ class CustomKanbanController extends KanbanController {
|
|||||||
this.workOrders = await this.getAllWorkOrders();
|
this.workOrders = await this.getAllWorkOrders();
|
||||||
// this.workOrdersNew = this.workOrders;
|
// this.workOrdersNew = this.workOrders;
|
||||||
// console.log('lines222222222', this.workOrders);
|
// console.log('lines222222222', this.workOrders);
|
||||||
//
|
|
||||||
// console.log(typeof this.workOrders);
|
// console.log(typeof this.workOrders);
|
||||||
// console.log(Array.isArray(this.workOrders));
|
// console.log(Array.isArray(this.workOrders));
|
||||||
//
|
|
||||||
// console.log(this.workOrders.every(order =>
|
// console.log(this.workOrders.every(order =>
|
||||||
// typeof order === 'object' && order.id !== undefined));
|
// typeof order === 'object' && order.id !== undefined));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// var aDiv = document.getElementsByClassName('o_kanban_record')
|
// var aDiv = document.getElementsByClassName('o_kanban_record')
|
||||||
// for (var i = 0; i < aDiv.length; i++) {
|
// for (var i = 0; i < aDiv.length; i++) {
|
||||||
// console.log(aDiv[i])
|
// console.log(aDiv[i])
|
||||||
@@ -37,7 +31,6 @@ class CustomKanbanController extends KanbanController {
|
|||||||
buttonClick(ev) {
|
buttonClick(ev) {
|
||||||
const button = ev.currentTarget;
|
const button = ev.currentTarget;
|
||||||
const id = button.getAttribute('data-id');
|
const id = button.getAttribute('data-id');
|
||||||
|
|
||||||
// console.log('true_id', id);
|
// console.log('true_id', id);
|
||||||
// const context = {production_line_show: 'shengchanxian1'}
|
// const context = {production_line_show: 'shengchanxian1'}
|
||||||
this.env.services.rpc('/web/dataset/call_kw', {
|
this.env.services.rpc('/web/dataset/call_kw', {
|
||||||
@@ -58,8 +51,8 @@ class CustomKanbanController extends KanbanController {
|
|||||||
// console.log('response', response);
|
// console.log('response', response);
|
||||||
location.reload();
|
location.reload();
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
button.classList.add('choose')
|
button.classList.add('choose');
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -82,8 +75,6 @@ class CustomKanbanController extends KanbanController {
|
|||||||
// 你可以在这里处理响应,例如将其存储在控制器的状态中
|
// 你可以在这里处理响应,例如将其存储在控制器的状态中
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomKanbanController.template = "sf_manufacturing.CustomKanbanView1";
|
CustomKanbanController.template = "sf_manufacturing.CustomKanbanView1";
|
||||||
@@ -94,4 +85,4 @@ export const customKanbanView = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Register it to the views registry
|
// Register it to the views registry
|
||||||
registry.category("views").add("custom_kanban1", customKanbanView);
|
registry.category("views").add("custom_kanban1", customKanbanView);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from odoo import models, fields, api, _
|
from odoo import models, fields
|
||||||
|
|
||||||
|
|
||||||
class SfQualityPoint(models.Model):
|
class SfQualityPoint(models.Model):
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
odoo.define('sf_warehouse.custom_kanban', function (require) {
|
odoo.define('sf_warehouse.custom_kanban', function (require) {
|
||||||
"use strict"
|
"use strict";
|
||||||
var KanbanRenderer = require('web.KanbanRenderer');
|
var KanbanRenderer = require('web.KanbanRenderer');
|
||||||
|
|
||||||
KanbanRenderer.include({
|
KanbanRenderer.include({
|
||||||
_render: function () {
|
_render: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
return this._super.apply(this, arguments).then(function () {
|
return this._super.apply(this, arguments).then(function () {
|
||||||
|
|
||||||
var colorGuide = $('<div class="color-guide"> \
|
var colorGuide = $('<div class="color-guide"> \
|
||||||
<span class="color-guide-item" style="background-color: red;"></span> \
|
<span class="color-guide-item" style="background-color: red;"></span> \
|
||||||
<span class="color-guide-item" style="background-color: green;"></span> \
|
<span class="color-guide-item" style="background-color: green;"></span> \
|
||||||
@@ -16,5 +15,4 @@ odoo.define('sf_warehouse.custom_kanban', function (require) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
});
|
||||||
});
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
/** @odoo-module **/
|
/** @odoo-module **/
|
||||||
|
|
||||||
import { registry } from "@web/core/registry";
|
import {registry} from "@web/core/registry";
|
||||||
import { CharField } from '@web/views/fields/char/char_field';
|
import {CharField} from '@web/views/fields/char/char_field';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 继承CharField组件实现自定义组件:当光标聚焦于输入框时,选中输入框内容
|
// 继承CharField组件实现自定义组件:当光标聚焦于输入框时,选中输入框内容
|
||||||
class CustomChar extends CharField {
|
class CustomChar extends CharField {
|
||||||
@@ -20,7 +18,7 @@ class CustomChar extends CharField {
|
|||||||
// 当光标聚焦于输入框时,选中输入框内容
|
// 当光标聚焦于输入框时,选中输入框内容
|
||||||
this.input.el.addEventListener('focus', function () {
|
this.input.el.addEventListener('focus', function () {
|
||||||
this.select();
|
this.select();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -72,13 +70,13 @@ class CustomChar extends CharField {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// this.$input.on('focus', function () {
|
// this.$input.on('focus', function () {
|
||||||
// $(this).select();
|
// $(this).select();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
||||||
// 当光标聚焦于输入框时,选中输入框内容
|
// 当光标聚焦于输入框时,选中输入框内容
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
registry.category("fields").add("custom_char", CustomChar);
|
registry.category("fields").add("custom_char", CustomChar);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/** @odoo-module */
|
/** @odoo-module */
|
||||||
|
|
||||||
import { KanbanController } from "@web/views/kanban/kanban_controller";
|
import {KanbanController} from "@web/views/kanban/kanban_controller";
|
||||||
import { kanbanView } from "@web/views/kanban/kanban_view";
|
import {kanbanView} from "@web/views/kanban/kanban_view";
|
||||||
import { registry } from "@web/core/registry";
|
import {registry} from "@web/core/registry";
|
||||||
|
|
||||||
// the controller usually contains the Layout and the renderer.
|
// the controller usually contains the Layout and the renderer.
|
||||||
class CustomKanbanController extends KanbanController {
|
class CustomKanbanController extends KanbanController {
|
||||||
@@ -18,4 +18,4 @@ export const customKanbanView = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Register it to the views registry
|
// Register it to the views registry
|
||||||
registry.category("views").add("custom_kanban", customKanbanView);
|
registry.category("views").add("custom_kanban", customKanbanView);
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
/** @odoo-module **/
|
/** @odoo-module **/
|
||||||
|
|
||||||
import { registry } from "@web/core/registry";
|
import {registry} from "@web/core/registry";
|
||||||
import { Many2OneField } from '@web/views/fields/many2one/many2one_field';
|
import {Many2OneField} from '@web/views/fields/many2one/many2one_field';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 继承FieldMany2One组件实现自定义组件:当光标聚焦于输入框时,选中输入框内容
|
// 继承FieldMany2One组件实现自定义组件:当光标聚焦于输入框时,选中输入框内容
|
||||||
@@ -17,12 +16,13 @@ class CustomMany2One extends Many2OneField {
|
|||||||
// console.log('CustomMany2One.setup11111111111111');
|
// console.log('CustomMany2One.setup11111111111111');
|
||||||
super.setup();
|
super.setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted() {
|
onMounted() {
|
||||||
// console.log('CustomMany2One.onMounted1');
|
// console.log('CustomMany2One.onMounted1');
|
||||||
// 当光标聚焦于输入框时,选中输入框内容
|
// 当光标聚焦于输入框时,选中输入框内容
|
||||||
this.input.el.addEventListener('focus', function () {
|
this.input.el.addEventListener('focus', function () {
|
||||||
this.select();
|
this.select();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,15 +26,15 @@ export class StepViewer extends Component {
|
|||||||
model: this.props.record.resModel,
|
model: this.props.record.resModel,
|
||||||
id: JSON.stringify(this.props.record.data['id']),
|
id: JSON.stringify(this.props.record.data['id']),
|
||||||
field: this.props.name
|
field: this.props.name
|
||||||
}
|
};
|
||||||
url = url_props['base_url'].replace('http://', 'https://') + '/web/content/' + url_props['model'] + '/' + url_props['id'] + '/' + url_props['field'] + '?download=true'
|
url = url_props['base_url'].replace('http://', 'https://') + '/web/content/' + url_props['model'] + '/' + url_props['id'] + '/' + url_props['field'] + '?download=true';
|
||||||
// url = 'http://localhost:8069'+'/web/content/'+url_props['model']+'/'+url_props['id']+'/'+url_props['field']+'?download=true'
|
// url = 'http://localhost:8069'+'/web/content/'+url_props['model']+'/'+url_props['id']+'/'+url_props['field']+'?download=true'
|
||||||
// console.log('url111111', url)
|
// console.log('url111111', url)
|
||||||
return url
|
return url;
|
||||||
} else {
|
} else {
|
||||||
url = "data:model/gltf-binary;base64," + this.props.value;
|
url = "data:model/gltf-binary;base64," + this.props.value;
|
||||||
// console.log('url2', url)
|
// console.log('url2', url)
|
||||||
return url
|
return url;
|
||||||
// localStorage.setItem('url',url)
|
// localStorage.setItem('url',url)
|
||||||
// let new_url = localStorage.getItem(('url'))
|
// let new_url = localStorage.getItem(('url'))
|
||||||
// var oViewer = document.getElementsByTagName('model-viewer')[0];
|
// var oViewer = document.getElementsByTagName('model-viewer')[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user