优化代码

This commit is contained in:
wuxw 2025-03-25 11:35:21 +08:00
parent c71ec2bcc2
commit 3a7eb296b6
4 changed files with 13 additions and 5 deletions

View File

@ -58,9 +58,10 @@
},
methods: {
_initFloorSelect2: function() {
console.log("调用_initFloorSelect2 方法");
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
$.fn.select2.defaults.set('width', '100%');
let _accessToken = vcFramework.getData('hc_accessToken');
this.floorSelect2Info.floorSelector = $('#floorSelector').select2({
placeholder: '必填,请选择楼栋',
allowClear: true, //允许清空
@ -75,7 +76,8 @@
'APP-ID': '8000418004',
'TRANSACTION-ID': vc.uuid(),
'REQ-TIME': vc.getDateYYYYMMDDHHMISS(),
'SIGN': ''
'SIGN': '',
'Authorization':'Bearer '+_accessToken.token
},
data: function(params) {
console.log("param", params);

View File

@ -81,6 +81,7 @@
_initRoomSelect2: function() {
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
$.fn.select2.defaults.set('width', '100%');
let _accessToken = vcFramework.getData('hc_accessToken');
this.roomSelect2Info.roomSelector = $('#roomSelector').select2({
placeholder: '必填,请选择房屋',
allowClear: true, //允许清空
@ -95,7 +96,8 @@
'APP-ID': '8000418004',
'TRANSACTION-ID': vc.uuid(),
'REQ-TIME': vc.getDateYYYYMMDDHHMISS(),
'SIGN': ''
'SIGN': '',
'Authorization':'Bearer '+_accessToken.token
},
data: function(params) {
let _term = "";

View File

@ -65,6 +65,7 @@
console.log("调用_initUnitSelect2 方法");
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
$.fn.select2.defaults.set('width', '100%');
let _accessToken = vcFramework.getData('hc_accessToken');
this.unitSelect2Info.unitSelector = $('#unitSelector').select2({
placeholder: '必填,请选择单元',
allowClear: true, //允许清空
@ -79,7 +80,8 @@
'APP-ID': '8000418004',
'TRANSACTION-ID': vc.uuid(),
'REQ-TIME': vc.getDateYYYYMMDDHHMISS(),
'SIGN': ''
'SIGN': '',
'Authorization':'Bearer '+_accessToken.token
},
data: function(params) {
console.log("param", params);

View File

@ -65,6 +65,7 @@
console.log("调用_initUnitSelect2 方法");
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
$.fn.select2.defaults.set('width', '100%');
let _accessToken = vcFramework.getData('hc_accessToken');
this.unitSelect2Info.unitSelector = $('#unitSelector').select2({
placeholder: '必填,请选择单元',
allowClear: true, //允许清空
@ -79,7 +80,8 @@
'APP-ID': '8000418004',
'TRANSACTION-ID': vc.uuid(),
'REQ-TIME': vc.getDateYYYYMMDDHHMISS(),
'SIGN': ''
'SIGN': '',
'Authorization':'Bearer '+_accessToken.token
},
data: function(params) {
console.log("param", params);