From 36148f0475f4f352150a2c99680ecbf7fb8f84cd Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Mon, 7 Mar 2022 11:45:59 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=A1=E6=A3=80=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../addInspectionPlan/addInspectionPlan.html | 29 ++++--------
.../inspectionRouteSelect2.js | 46 +++++++++----------
2 files changed, 32 insertions(+), 43 deletions(-)
diff --git a/public/components/property/addInspectionPlan/addInspectionPlan.html b/public/components/property/addInspectionPlan/addInspectionPlan.html
index c37cc316e..5915b2b98 100755
--- a/public/components/property/addInspectionPlan/addInspectionPlan.html
+++ b/public/components/property/addInspectionPlan/addInspectionPlan.html
@@ -1,5 +1,4 @@
-
+
@@ -10,17 +9,13 @@
@@ -38,15 +33,13 @@
-
+
\ No newline at end of file
diff --git a/public/components/property/inspectionRouteSelect2/inspectionRouteSelect2.js b/public/components/property/inspectionRouteSelect2/inspectionRouteSelect2.js
index b135729a6..8b4f2c9ef 100755
--- a/public/components/property/inspectionRouteSelect2/inspectionRouteSelect2.js
+++ b/public/components/property/inspectionRouteSelect2/inspectionRouteSelect2.js
@@ -1,4 +1,4 @@
-(function (vc) {
+(function(vc) {
vc.extends({
propTypes: {
parentModal: vc.propTypes.string,
@@ -16,23 +16,23 @@
watch: {
inspectionRouteSelect2Info: {
deep: true,
- handler: function () {
+ handler: function() {
vc.emit($props.callBackListener, $props.callBackFunction, this.inspectionRouteSelect2Info);
}
}
},
- _initMethod: function () {
+ _initMethod: function() {
this._initInspectionRouteSelect2();
},
- _initEvent: function () {
- vc.on('inspectionRouteSelect2', 'setInspectionRoute', function (_param) {
+ _initEvent: function() {
+ vc.on('inspectionRouteSelect2', 'setInspectionRoute', function(_param) {
vc.copyObject(_param, this.inspectionRouteSelect2Info);
- var option = new Option(_param.routeName,_param.inspectionRouteId, true, true);
- this.inspectionRouteSelect2Info.inspectionRouteSelector.append(option);
-
+ var option = new Option(_param.routeName, _param.inspectionRouteId, true, true);
+ this.inspectionRouteSelect2Info.inspectionRouteSelector.append(option);
+
});
- vc.on('inspectionRouteSelect2', 'clearInspectionRoute', function (_param) {
+ vc.on('inspectionRouteSelect2', 'clearInspectionRoute', function(_param) {
this.inspectionRouteSelect2Info = {
inspectionRoutes: [],
inspectionRouteId: '',
@@ -42,27 +42,27 @@
});
},
methods: {
- _initInspectionRouteSelect2: function () {
- $.fn.modal.Constructor.prototype.enforceFocus = function () {};
+ _initInspectionRouteSelect2: function() {
+ $.fn.modal.Constructor.prototype.enforceFocus = function() {};
$.fn.select2.defaults.set('width', '100%');
this.inspectionRouteSelect2Info.inspectionRouteSelector = $('#inspectionRouteSelector').select2({
placeholder: '必填,请选择巡检路线',
- allowClear: true,//允许清空
+ allowClear: true, //允许清空
//multiple: true,//允许多选
- escapeMarkup: function (markup) {
+ escapeMarkup: function(markup) {
return markup;
}, // 自定义格式化防止xss注入
ajax: {
url: "/callComponent/inspectionRouteManage/list",
dataType: 'json',
delay: 250,
- headers:{
+ headers: {
'APP-ID': '8000418004',
- 'TRANSACTION-ID' : vc.uuid(),
+ 'TRANSACTION-ID': vc.uuid(),
'REQ-TIME': vc.getDateYYYYMMDDHHMISS(),
- 'SIGN' : ''
+ 'SIGN': ''
},
- data: function (params) {
+ data: function(params) {
console.log("param", params);
var _term = "";
if (params.hasOwnProperty("term")) {
@@ -71,11 +71,11 @@
return {
routeName: _term,
page: 1,
- row: 10,
+ row: 300,
communityId: vc.getCurrentCommunity().communityId
};
},
- processResults: function (data) {
+ processResults: function(data) {
return {
results: this._filterInspectionRouteData(data.inspectionRoutes)
};
@@ -83,14 +83,14 @@
cache: true
}
});
- $('#inspectionRouteSelector').on("select2:select", function (evt) {
+ $('#inspectionRouteSelector').on("select2:select", function(evt) {
//这里是选中触发的事件
//evt.params.data 是选中项的信息
this.inspectionRouteSelect2Info.inspectionRouteId = evt.params.data.id;
this.inspectionRouteSelect2Info.routeName = evt.params.data.text;
});
- $('#inspectionRouteSelector').on("select2:unselect", function (evt) {
+ $('#inspectionRouteSelector').on("select2:unselect", function(evt) {
//这里是取消选中触发的事件
//如配置allowClear: true后,触发
this.inspectionRouteSelect2Info.inspectionRouteId = '';
@@ -98,7 +98,7 @@
});
},
- _filterInspectionRouteData: function (_InspectionRoute) {
+ _filterInspectionRouteData: function(_InspectionRoute) {
var _tmpInspectionRoutes = [];
for (var i = 0; i < _InspectionRoute.length; i++) {
var _tmpInspectionRoute = {
@@ -111,4 +111,4 @@
}
}
});
-})(window.vc);
+})(window.vc);
\ No newline at end of file