diff --git a/app.js b/app.js
index e5172f2c6..57e94628f 100755
--- a/app.js
+++ b/app.js
@@ -36,8 +36,8 @@ let opts = {
// app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
- app.use('/callComponent',proxy('http://owner.homecommunity.cn:8008',opts));
- app.use('/app',proxy('http://owner.homecommunity.cn:8008',opts));
+app.use('/callComponent',proxy('http://proxy.homecommunity.cn:9011',opts));
+app.use('/app',proxy('http://proxy.homecommunity.cn:9011',opts));
// app.use('/callComponent',proxy('http://127.0.0.1:8008',opts));
// app.use('/app',proxy('http://127.0.0.1:8008',opts));
diff --git a/public/components/property/unlicensedCarMachineQrCode/unlicensedCarMachineQrCode.html b/public/components/property/unlicensedCarMachineQrCode/unlicensedCarMachineQrCode.html
index ee951b251..45dcbe621 100644
--- a/public/components/property/unlicensedCarMachineQrCode/unlicensedCarMachineQrCode.html
+++ b/public/components/property/unlicensedCarMachineQrCode/unlicensedCarMachineQrCode.html
@@ -8,7 +8,7 @@
diff --git a/public/components/property/unlicensedCarMachineQrCode/unlicensedCarMachineQrCode.js b/public/components/property/unlicensedCarMachineQrCode/unlicensedCarMachineQrCode.js
index a633eb081..ac3f4ba4e 100644
--- a/public/components/property/unlicensedCarMachineQrCode/unlicensedCarMachineQrCode.js
+++ b/public/components/property/unlicensedCarMachineQrCode/unlicensedCarMachineQrCode.js
@@ -12,7 +12,7 @@
}
},
_initMethod: function () {
-
+
},
_initEvent: function () {
vc.on('unlicensedCarMachineQrCode', 'open', function (_params) {
@@ -21,16 +21,17 @@
// = _params;
vc.copyObject(_params, vc.component.unlicensedCarMachineQrCodeInfo);
vc.component.unlicensedCarMachineQrCodeInfo.communityId = vc.getCurrentCommunity().communityId;
+ $that._loadUnlicensedCodeUrl();
});
},
methods: {
- _loadQrCodeUrl:function(){
+ _loadUnlicensedCodeUrl:function(){
//判断是否支付
var param = {
params: {
communityId: vc.getCurrentCommunity().communityId,
- boxId: $that.parkingAreaControlFeeInfo.boxId,
- machineId: $that.parkingAreaControlFeeInfo.machineId,
+ boxId: $that.unlicensedCarMachineQrCodeInfo.boxId,
+ machineId: $that.unlicensedCarMachineQrCodeInfo.machineId,
}
};
//发送get请求
@@ -45,8 +46,8 @@
);
},
_viewQr: function (_data) {
- document.getElementById("qrcode").innerHTML = "";
- let qrcode = new QRCode(document.getElementById("qrcode"), {
+ document.getElementById("uncode").innerHTML = "";
+ let qrcode = new QRCode(document.getElementById("uncode"), {
text: "无牌车入场二维码", //你想要填写的文本
width: 200, //生成的二维码的宽度
height: 200, //生成的二维码的高度
diff --git a/public/pages/property/parkingAreaControl/parkingAreaControl.html b/public/pages/property/parkingAreaControl/parkingAreaControl.html
index 9703ab000..9743811dd 100644
--- a/public/pages/property/parkingAreaControl/parkingAreaControl.html
+++ b/public/pages/property/parkingAreaControl/parkingAreaControl.html
@@ -84,4 +84,5 @@
+
\ No newline at end of file
diff --git a/public/vcCore/vcFramework.js b/public/vcCore/vcFramework.js
index 1f2a3e54d..45dcfccfe 100755
--- a/public/vcCore/vcFramework.js
+++ b/public/vcCore/vcFramework.js
@@ -17,7 +17,7 @@
/**
构建vcFramework对象
**/
-(function(window) {
+(function (window) {
"use strict";
let vcFramework = window.vcFramework || {};
window.vcFramework = vcFramework;
@@ -39,13 +39,13 @@
data: {},
watch: {},
methods: {},
- destroyed: function() {
- window.vcFramework.destroyedMethod.forEach(function(eventMethod) {
+ destroyed: function () {
+ window.vcFramework.destroyedMethod.forEach(function (eventMethod) {
eventMethod();
});
//清理所有定时器
- window.vcFramework.timers.forEach(function(timer) {
+ window.vcFramework.timers.forEach(function (timer) {
clearInterval(timer);
});
@@ -78,7 +78,7 @@
})(window);
-(function(vcFramework) {
+(function (vcFramework) {
let componentCache = {};
/**
@@ -87,7 +87,7 @@
* @param {*} _html 组件内容
* @param {*} _nodeLocation 组件位置 1 开始节点 -1 结束节点
*/
- let VcTree = function(_vcCreate, _html, _nodeLocation) {
+ let VcTree = function (_vcCreate, _html, _nodeLocation) {
let o = new Object();
o.treeId = vcFramework.uuid();
o.vcCreate = _vcCreate;
@@ -96,19 +96,19 @@
o.css = "";
o.vcSubTree = [];
o.nodeLocation = _nodeLocation;
- o.putSubTree = function(_vcSubTree) {
+ o.putSubTree = function (_vcSubTree) {
o.vcSubTree.push(_vcSubTree);
};
- o.setHtml = function(_html) {
+ o.setHtml = function (_html) {
o.html = _html;
};
- o.setJs = function(_js) {
+ o.setJs = function (_js) {
o.js = _js;
};
- o.setCss = function(_css) {
+ o.setCss = function (_css) {
o.css = _css;
};
- o.setLocation = function(_location) {
+ o.setLocation = function (_location) {
o.nodeLocation = _location;
};
return o;
@@ -117,7 +117,7 @@
/**
* 构建 树
*/
- vcFramework.builderVcTree = async function() {
+ vcFramework.builderVcTree = async function () {
let _componentUrl = location.hash;
//判断是否为组件页面
@@ -187,7 +187,7 @@
/**
* 页面内 组件跳转
*/
- vcFramework.reBuilderVcTree = async function() {
+ vcFramework.reBuilderVcTree = async function () {
let _componentUrl = location.hash;
//判断是否为组件页面
@@ -255,7 +255,7 @@
/**
* 从当前 HTML中找是否存在
标签
*/
- findVcLabel = async function(_tree) {
+ findVcLabel = async function (_tree) {
//查看是否存在子 vc:create
let _componentName = _tree.vcCreate.getAttribute('path');
//console.log('_componentName', _componentName, _tree);
@@ -290,7 +290,7 @@
/**
* 渲染组件 html 页面
*/
- reader = function(_treeList, _componentScript) {
+ reader = function (_treeList, _componentScript) {
//console.log('_treeList', _treeList);
let _header = document.getElementsByTagName('head');
for (let _treeIndex = 0; _treeIndex < _treeList.length; _treeIndex++) {
@@ -361,7 +361,7 @@
}
};
- vcFramework.i18n = function(_key) {
+ vcFramework.i18n = function (_key) {
if (!window.hasOwnProperty('lang')) {
return _key;
}
@@ -377,7 +377,7 @@
/**
* 解析 i18n 标签
*/
- parseVcI18N = function() {
+ parseVcI18N = function () {
let _tmpI18N = document.getElementsByTagName("vc:i18n");
for (let _vcElementIndex = 0; _vcElementIndex < _tmpI18N.length; _vcElementIndex++) {
let _vcElement = _tmpI18N[_vcElementIndex];
@@ -410,7 +410,7 @@
/**
* 手工执行js 脚本
*/
- execScript = function(_tree, _componentScript) {
+ execScript = function (_tree, _componentScript) {
//console.log('_componentScript', _componentScript);
@@ -436,7 +436,7 @@
* 加载组件
* 异步去服务端 拉去HTML 和 js
*/
- loadComponent = async function(_componentName, _tree) {
+ loadComponent = async function (_componentName, _tree) {
if (vcFramework.isNotEmpty(_componentName) && _componentName.lastIndexOf('/') > 0) {
_componentName = _componentName + '/' + _componentName.substring(_componentName.lastIndexOf('/') + 1, _componentName.length);
}
@@ -504,7 +504,7 @@
/**
* 处理 命名空间html
*/
- dealHtmlNamespace = function(_tree, _html) {
+ dealHtmlNamespace = function (_tree, _html) {
let _componentVcCreate = _tree.vcCreate;
if (!_componentVcCreate.hasAttribute('namespace')) {
@@ -522,7 +522,7 @@
/**
* 处理js
*/
- dealJs = function(_tree, _js) {
+ dealJs = function (_tree, _js) {
//在js 中检测propTypes 属性
if (_js.indexOf("propTypes") < 0) {
return _js;
@@ -582,7 +582,7 @@
return newJs;
};
- dealJsPropTypesDefault = function(typeValue) {
+ dealJsPropTypesDefault = function (typeValue) {
let startPos = typeValue.indexOf("=") + 1;
let endPos = typeValue.length;
if (typeValue.indexOf(",") > 0) {
@@ -596,7 +596,7 @@
/**
* js 处理命名
*/
- dealJsNamespace = function(_tree, _js) {
+ dealJsNamespace = function (_tree, _js) {
//在js 中检测propTypes 属性
let _componentVcCreate = _tree.vcCreate;
@@ -633,7 +633,7 @@
* @param js js文件内容
* @return js 文件内容
*/
- dealJsAddComponentCode = function(_tree, _js) {
+ dealJsAddComponentCode = function (_tree, _js) {
let _componentVcCreate = _tree.vcCreate;
if (!_componentVcCreate.hasAttribute("code")) {
@@ -648,7 +648,7 @@
/**
* 处理命名空间js
*/
- dealHtmlJs = function(_tree, _js) {
+ dealHtmlJs = function (_tree, _js) {
let _componentVcCreate = _tree.vcCreate;
if (!_componentVcCreate.hasAttribute('namespace')) {
return _js;
@@ -673,9 +673,9 @@
*
*/
-(function(vcFramework) {
+(function (vcFramework) {
- _initVcFrameworkEvent = function() {
+ _initVcFrameworkEvent = function () {
let vcFrameworkEvent = document.createEvent('Event');
// 定义事件名为'build'.
vcFrameworkEvent.initEvent('initVcFrameworkFinish', true, true);
@@ -685,7 +685,7 @@
/**
* 初始化 vue 事件
*/
- _initVueEvent = function() {
+ _initVueEvent = function () {
vcFramework.$event = new Vue();
}
@@ -699,10 +699,10 @@
/**
* vc-util
*/
-(function(vcFramework) {
+(function (vcFramework) {
//空判断 true 为非空 false 为空
- vcFramework.isNotNull = function(_paramObj) {
+ vcFramework.isNotNull = function (_paramObj) {
if (_paramObj == null || _paramObj == undefined) {
return false;
}
@@ -710,14 +710,14 @@
};
//空判断 true 为非空 false 为空
- vcFramework.isNotEmpty = function(_paramObj) {
+ vcFramework.isNotEmpty = function (_paramObj) {
if (_paramObj == null || _paramObj == undefined || _paramObj.trim() == '') {
return false;
}
return true;
};
- vcFramework.uuid = function() {
+ vcFramework.uuid = function () {
let s = [];
let hexDigits = "0123456789abcdef";
for (let i = 0; i < 36; i++) {
@@ -734,11 +734,11 @@
/**
* 深度拷贝对象
*/
- vcFramework.deepClone = function(obj) {
+ vcFramework.deepClone = function (obj) {
return JSON.parse(JSON.stringify(obj));
}
- vcFramework.changeNumMoneyToChinese = function(money) {
+ vcFramework.changeNumMoneyToChinese = function (money) {
let cnNums = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"); //汉字的数字
let cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
let cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
@@ -826,14 +826,14 @@
/**
* 封装 后端请求 代码
*/
-(function(vcFramework) {
+(function (vcFramework) {
- vcFramework.httpGet = function(url) {
+ vcFramework.httpGet = function (url) {
// XMLHttpRequest对象用于在后台与服务器交换数据
return new Promise((resolve, reject) => {
let xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
- xhr.onreadystatechange = function() {
+ xhr.onreadystatechange = function () {
// readyState == 4说明请求已完成
if (xhr.readyState == 4 && xhr.status == 200 || xhr.status == 304) {
// 从服务器获得数据
@@ -844,12 +844,12 @@
xhr.send();
});
};
- vcFramework.httpPost = function(url, data, fn) {
+ vcFramework.httpPost = function (url, data, fn) {
let xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
// 添加http头,发送信息至服务器时内容编码类型
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- xhr.onreadystatechange = function() {
+ xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 304)) {
fn.call(xhr.responseText);
}
@@ -863,19 +863,19 @@
*
* 组件缓存
*/
-(function(vcFramework) {
+(function (vcFramework) {
/**
* 组件缓存
*/
- vcFramework.putComponent = function(_componentName, _component) {
+ vcFramework.putComponent = function (_componentName, _component) {
let _componentCache = vcFramework.vueCache;
_componentCache[_componentName] = _component;
};
/**
* 组件提取
*/
- vcFramework.getComponent = function(_componentName) {
+ vcFramework.getComponent = function (_componentName) {
let _componentCache = vcFramework.vueCache;
return _componentCache[_componentName];
}
@@ -890,7 +890,7 @@
/**
常量
**/
-(function(vcFramework) {
+(function (vcFramework) {
let constant = {
REQUIRED_MSG: "不能为空",
@@ -910,17 +910,17 @@
vc 函数初始化
add by Kevin
**/
-(function(vcFramework) {
+(function (vcFramework) {
let DEFAULT_NAMESPACE = "default";
vcFramework.http = {
- post: function(componentCode, componentMethod, param, options, successCallback, errorCallback) {
+ post: function (componentCode, componentMethod, param, options, successCallback, errorCallback) {
vcFramework.loading('open');
Vue.http.headers.common['APP-ID'] = '8000418004';
Vue.http.headers.common['TRANSACTION-ID'] = vcFramework.uuid();
Vue.http.headers.common['REQ-TIME'] = vcFramework.getDateYYYYMMDDHHMISS();
Vue.http.headers.common['SIGN'] = '';
Vue.http.post('/callComponent/' + componentCode + "/" + componentMethod, param, options)
- .then(function(res) {
+ .then(function (res) {
try {
let _header = res.headers.map;
//console.log('res', res);
@@ -934,7 +934,7 @@
} finally {
vcFramework.loading('close');
}
- }, function(res) {
+ }, function (res) {
try {
if (res.status == 401 && res.headers.map["location"]) {
let _header = res.headers.map;
@@ -954,7 +954,7 @@
}
});
},
- get: function(componentCode, componentMethod, param, successCallback, errorCallback) {
+ get: function (componentCode, componentMethod, param, successCallback, errorCallback) {
//加入缓存机制
let _getPath = '/' + componentCode + '/' + componentMethod;
if (vcFramework.constant.GET_CACHE_URL.includes(_getPath)) {
@@ -971,7 +971,7 @@
Vue.http.headers.common['REQ-TIME'] = vcFramework.getDateYYYYMMDDHHMISS();
Vue.http.headers.common['SIGN'] = '';
Vue.http.get('/callComponent/' + componentCode + "/" + componentMethod, param)
- .then(function(res) {
+ .then(function (res) {
try {
successCallback(res.bodyText, res);
@@ -983,7 +983,7 @@
} finally {
vcFramework.loading('close');
}
- }, function(res) {
+ }, function (res) {
try {
if (res.status == 401 && res.headers.map["location"]) {
let _header = res.headers.map;
@@ -1004,7 +1004,7 @@
}
});
},
- apiPost: function(api, param, options, successCallback, errorCallback) {
+ apiPost: function (api, param, options, successCallback, errorCallback) {
let _api = '';
Vue.http.headers.common['APP-ID'] = '8000418004';
Vue.http.headers.common['TRANSACTION-ID'] = vcFramework.uuid();
@@ -1017,7 +1017,7 @@
}
vcFramework.loading('open');
Vue.http.post(_api, param, options)
- .then(function(res) {
+ .then(function (res) {
try {
let _header = res.headers.map;
//console.log('res', res);
@@ -1031,7 +1031,7 @@
} finally {
vcFramework.loading('close');
}
- }, function(res) {
+ }, function (res) {
try {
if (res.status == 401 && res.headers.map["location"]) {
let _header = res.headers.map;
@@ -1051,7 +1051,7 @@
}
});
},
- apiGet: function(api, param, successCallback, errorCallback) {
+ apiGet: function (api, param, successCallback, errorCallback) {
//加入缓存机制
let _getPath = '';
if (api.indexOf('/') != 0) {
@@ -1084,7 +1084,7 @@
}
Vue.http.get(_api, param)
- .then(function(res) {
+ .then(function (res) {
try {
successCallback(res.bodyText, res);
@@ -1098,7 +1098,7 @@
vcFramework.loading('close');
}
}
- }, function(res) {
+ }, function (res) {
try {
if (res.status == 401 && res.headers.map["location"]) {
let _header = res.headers.map;
@@ -1119,10 +1119,10 @@
}
});
},
- upload: function(componentCode, componentMethod, param, options, successCallback, errorCallback) {
+ upload: function (componentCode, componentMethod, param, options, successCallback, errorCallback) {
vcFramework.loading('open');
Vue.http.post('/callComponent/upload/' + componentCode + "/" + componentMethod, param, options)
- .then(function(res) {
+ .then(function (res) {
try {
successCallback(res.bodyText, res);
} catch (e) {
@@ -1130,7 +1130,7 @@
} finally {
vcFramework.loading('close');
}
- }, function(error) {
+ }, function (error) {
try {
errorCallback(error.bodyText, error);
} catch (e) {
@@ -1146,7 +1146,7 @@
//let vmOptions = vcFramework.vmOptions;
//继承方法,合并 _vmOptions 的数据到 vmOptions中
- vcFramework.extends = function(_vmOptions) {
+ vcFramework.extends = function (_vmOptions) {
let vmOptions = vcFramework.vmOptions;
if (typeof _vmOptions !== "object") {
throw "_vmOptions is not Object";
@@ -1212,7 +1212,7 @@
};
//绑定跳转函数
- vcFramework.jumpToPage = function(url) {
+ vcFramework.jumpToPage = function (url) {
//判断 url 的模板是否 和当前url 模板一个
console.log('jumpToPage', url);
if (url.indexOf('#') < 0) {
@@ -1234,20 +1234,20 @@
//vcFramework.reBuilderVcTree();
};
- refreshVcFramework = function() {
+ refreshVcFramework = function () {
$that.$destroy();
let _vmOptions = {
el: '#component',
data: {},
watch: {},
methods: {},
- destroyed: function() {
- window.vcFramework.destroyedMethod.forEach(function(eventMethod) {
+ destroyed: function () {
+ window.vcFramework.destroyedMethod.forEach(function (eventMethod) {
eventMethod();
});
//清理所有定时器
- window.vcFramework.timers.forEach(function(timer) {
+ window.vcFramework.timers.forEach(function (timer) {
clearInterval(timer);
});
@@ -1263,53 +1263,53 @@
vcFramework.namespace = [];
};
//保存菜单
- vcFramework.setCurrentMenu = function(_menuId) {
+ vcFramework.setCurrentMenu = function (_menuId) {
window.localStorage.setItem('hc_menuId', _menuId);
};
//获取菜单
- vcFramework.getCurrentMenu = function() {
+ vcFramework.getCurrentMenu = function () {
return window.localStorage.getItem('hc_menuId');
};
//保存用户菜单
- vcFramework.setMenus = function(_menus) {
+ vcFramework.setMenus = function (_menus) {
window.localStorage.setItem('hc_menus', JSON.stringify(_menus));
};
//获取用户菜单
- vcFramework.getMenus = function() {
+ vcFramework.getMenus = function () {
return JSON.parse(window.localStorage.getItem('hc_menus'));
};
//保存菜单状态
- vcFramework.setMenuState = function(_menuState) {
+ vcFramework.setMenuState = function (_menuState) {
window.localStorage.setItem('hc_menu_state', _menuState);
};
//获取菜单状态
- vcFramework.getMenuState = function() {
+ vcFramework.getMenuState = function () {
return window.localStorage.getItem('hc_menu_state');
};
//保存用户菜单
- vcFramework.saveData = function(_key, _value) {
+ vcFramework.saveData = function (_key, _value) {
window.localStorage.setItem(_key, JSON.stringify(_value));
};
//保存用户菜单
- vcFramework.removeData = function(_key) {
+ vcFramework.removeData = function (_key) {
Object.keys(localStorage).forEach(item => item.indexOf(_key) !== -1 ? localStorage.removeItem(item) : '');
};
//获取用户菜单
- vcFramework.getData = function(_key) {
+ vcFramework.getData = function (_key) {
return JSON.parse(window.localStorage.getItem(_key));
};
//保存当前小区信息 _communityInfo : {"communityId":"123213","name":"测试小区"}
- vcFramework.setCurrentCommunity = function(_currentCommunityInfo) {
+ vcFramework.setCurrentCommunity = function (_currentCommunityInfo) {
window.localStorage.setItem('hc_currentCommunityInfo', JSON.stringify(_currentCommunityInfo));
};
//获取当前小区信息
// @return {"communityId":"123213","name":"测试小区"}
- vcFramework.getCurrentCommunity = function() {
+ vcFramework.getCurrentCommunity = function () {
let _community = JSON.parse(window.localStorage.getItem('hc_currentCommunityInfo'));
// if(_community == null || _community == undefined){
@@ -1320,23 +1320,23 @@
};
//保存当前小区信息 _communityInfos : [{"communityId":"123213","name":"测试小区"}]
- vcFramework.setCommunitys = function(_communityInfos) {
+ vcFramework.setCommunitys = function (_communityInfos) {
window.localStorage.setItem('hc_communityInfos', JSON.stringify(_communityInfos));
};
//获取当前小区信息
// @return {"communityId":"123213","name":"测试小区"}
- vcFramework.getCommunitys = function() {
+ vcFramework.getCommunitys = function () {
return JSON.parse(window.localStorage.getItem('hc_communityInfos'));
};
//删除缓存数据
- vcFramework.clearCacheData = function() {
+ vcFramework.clearCacheData = function () {
window.localStorage.clear();
};
//将org 对象的属性值赋值给dst 属性名为一直的属性
- vcFramework.copyObject = function(org, dst) {
+ vcFramework.copyObject = function (org, dst) {
//for(key in Object.getOwnPropertyNames(dst)){
for (let key in dst) {
if (org.hasOwnProperty(key)) {
@@ -1345,35 +1345,35 @@
}
};
//扩展 现有的对象 没有的属性扩充上去
- vcFramework.extendObject = function(org, dst) {
+ vcFramework.extendObject = function (org, dst) {
for (let key in dst) {
if (!org.hasOwnProperty(key)) {
dst[key] = org[key]
}
}
};
- vcFramework.getComponentCode = function() {
- let _componentUrl = location.hash;
+ vcFramework.getComponentCode = function () {
+ let _componentUrl = location.hash;
- //判断是否为组件页面
- if (!vcFramework.notNull(_componentUrl)) {
- return "/";
- }
-
- if (_componentUrl.lastIndexOf('#') < 0) {
- return "/";
- }
-
- let endPos = _componentUrl.length;
- if (_componentUrl.indexOf('?') > -1) {
- endPos = _componentUrl.indexOf('?');
- }
-
- _componentUrl = _componentUrl.substring(_componentUrl.lastIndexOf('#') + 1, endPos);
- return _componentUrl;
+ //判断是否为组件页面
+ if (!vcFramework.notNull(_componentUrl)) {
+ return "/";
}
- //获取url参数
- vcFramework.getParam = function(_key) {
+
+ if (_componentUrl.lastIndexOf('#') < 0) {
+ return "/";
+ }
+
+ let endPos = _componentUrl.length;
+ if (_componentUrl.indexOf('?') > -1) {
+ endPos = _componentUrl.indexOf('?');
+ }
+
+ _componentUrl = _componentUrl.substring(_componentUrl.lastIndexOf('#') + 1, endPos);
+ return _componentUrl;
+ }
+ //获取url参数
+ vcFramework.getParam = function (_key) {
//返回当前 URL 的查询部分(问号 ? 之后的部分)。
let urlParameters = location.search;
if (!vcFramework.notNull(urlParameters)) {
@@ -1399,12 +1399,12 @@
return "";
};
//查询url
- vcFramework.getUrl = function() {
+ vcFramework.getUrl = function () {
//返回当前 URL 的查询部分(问号 ? 之后的部分)。
let urlParameters = location.pathname;
return urlParameters;
};
- vcFramework.isBack = function() {
+ vcFramework.isBack = function () {
let _back = vc.getData("JAVA110_IS_BACK");
if (_back == null) {
@@ -1419,20 +1419,20 @@
}
return false;
};
- vcFramework.getBack = function() {
+ vcFramework.getBack = function () {
//window.location.href = document.referrer;
let _date = new Date();
vc.saveData("JAVA110_IS_BACK", _date.getTime());
window.history.back(-1);
}
- vcFramework.goBack = function() {
- //window.location.href = document.referrer;
- let _date = new Date();
- vc.saveData("JAVA110_IS_BACK", _date.getTime());
- window.history.back(-1);
- }
- //对象转get参数
- vcFramework.objToGetParam = function(obj) {
+ vcFramework.goBack = function () {
+ //window.location.href = document.referrer;
+ let _date = new Date();
+ vc.saveData("JAVA110_IS_BACK", _date.getTime());
+ window.history.back(-1);
+ }
+ //对象转get参数
+ vcFramework.objToGetParam = function (obj) {
let str = [];
for (let p in obj)
if (obj.hasOwnProperty(p)) {
@@ -1441,32 +1441,32 @@
return str.join("&");
};
//空判断 true 为非空 false 为空
- vcFramework.notNull = function(_paramObj) {
+ vcFramework.notNull = function (_paramObj) {
if (_paramObj == null || _paramObj == undefined || _paramObj.trim() == '') {
return false;
}
return true;
};
- vcFramework.isEmpty = function(_paramObj) {
+ vcFramework.isEmpty = function (_paramObj) {
if (_paramObj == null || _paramObj == undefined) {
return true;
}
return false;
};
//设置debug 模式
- vcFramework.setDebug = function(_param) {
+ vcFramework.setDebug = function (_param) {
vcFramework.debug = _param;
};
//数据共享存放 主要为了组件间传递数据
- vcFramework.put = function(_key, _value) {
+ vcFramework.put = function (_key, _value) {
vcFramework.map[_key] = _value;
};
//数据共享 获取 主要为了组件间传递数据
- vcFramework.get = function(_key) {
+ vcFramework.get = function (_key) {
return vcFramework.map[_key];
};
- vcFramework.getDict = function(_name, _type, _callFun) {
+ vcFramework.getDict = function (_name, _type, _callFun) {
let param = {
params: {
name: _name,
@@ -1476,19 +1476,19 @@
//发送get请求
vcFramework.http.get('core', 'list', param,
- function(json, res) {
+ function (json, res) {
if (res.status == 200) {
let _dictInfo = JSON.parse(json);
_callFun(_dictInfo);
return;
}
},
- function(errInfo, error) {
+ function (errInfo, error) {
console.log('请求失败处理');
});
}
- vcFramework.getAttrSpec = function(_tableName, _callFun) {
+ vcFramework.getAttrSpec = function (_tableName, _callFun) {
let param = {
params: {
tableName: _tableName,
@@ -1499,7 +1499,7 @@
//发送get请求
vcFramework.http.apiGet('/attrSpec/queryAttrSpec', param,
- function(json, res) {
+ function (json, res) {
let _attrSpecInfo = JSON.parse(json);
if (_attrSpecInfo.code == 0) {
@@ -1507,13 +1507,13 @@
return;
}
},
- function(errInfo, error) {
+ function (errInfo, error) {
console.log('请求失败处理');
});
}
- vcFramework.getAttrValue = function(_specCd, _callFun) {
+ vcFramework.getAttrValue = function (_specCd, _callFun) {
let param = {
params: {
specCd: _specCd,
@@ -1524,7 +1524,7 @@
//发送get请求
vcFramework.http.apiGet('/attrValue/queryAttrValue', param,
- function(json, res) {
+ function (json, res) {
let _attrSpecInfo = JSON.parse(json);
if (_attrSpecInfo.code == 0) {
@@ -1532,7 +1532,7 @@
return;
}
},
- function(errInfo, error) {
+ function (errInfo, error) {
console.log('请求失败处理');
});
}
@@ -1543,19 +1543,19 @@
/**
vc 定时器处理
**/
-(function(w, vcFramework) {
+(function (w, vcFramework) {
/**
创建定时器
**/
- vcFramework.createTimer = function(func, sec) {
+ vcFramework.createTimer = function (func, sec) {
let _timer = w.setInterval(func, sec);
vcFramework.timers.push(_timer); //这里将所有的定时器保存起来,页面退出时清理
return _timer;
};
//清理定时器
- vcFramework.clearTimer = function(timer) {
+ vcFramework.clearTimer = function (timer) {
clearInterval(timer);
}
@@ -1566,14 +1566,14 @@
* vcFramework.toast("");
时间处理工具类
**/
-(function(vcFramework) {
+(function (vcFramework) {
function add0(m) {
return m < 10 ? '0' + m : m
}
- vcFramework.dateTimeFormat = function(shijianchuo) {
+ vcFramework.dateTimeFormat = function (shijianchuo) {
//shijianchuo是整数,否则要parseInt转换
let time = new Date(parseInt(shijianchuo));
let y = time.getFullYear();
@@ -1585,7 +1585,7 @@
return y + '-' + add0(m) + '-' + add0(d) + ' ' + add0(h) + ':' + add0(mm) + ':' + add0(s);
}
- vcFramework.dateFormat = function(_time) {
+ vcFramework.dateFormat = function (_time) {
let _date = new Date(_time);
let y = _date.getFullYear();
let m = _date.getMonth() + 1;
@@ -1593,7 +1593,7 @@
return y + '-' + add0(m) + '-' + add0(d);
}
- vcFramework.dateSubOneDay = function(_startTime, _endTime, feeFlag) {
+ vcFramework.dateSubOneDay = function (_startTime, _endTime, feeFlag) {
if (!_endTime || _endTime == '-') {
return _endTime
}
@@ -1619,7 +1619,7 @@
return dateTime;
}
- vcFramework.dateSub = function(dateTime, feeFlag) {
+ vcFramework.dateSub = function (dateTime, feeFlag) {
if (!dateTime || dateTime == '-') {
return dateTime
}
@@ -1632,7 +1632,7 @@
return dateTime;
}
- vcFramework.getDateYYYYMMDDHHMISS = function() {
+ vcFramework.getDateYYYYMMDDHHMISS = function () {
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
@@ -1664,7 +1664,7 @@
return year + "" + month + "" + day + "" + hour + "" + minute + "" + second;
};
- vcFramework.initDateTime = function(_dateStr, _callBack) {
+ vcFramework.initDateTime = function (_dateStr, _callBack) {
$('.' + _dateStr).datetimepicker({
language: 'zh-CN',
fontAwesome: 'fa',
@@ -1675,14 +1675,14 @@
todayBtn: true
});
$('.' + _dateStr).datetimepicker()
- .on('changeDate', function(ev) {
+ .on('changeDate', function (ev) {
var value = $('.' + _dateStr).val();
//vc.component.addFeeConfigInfo.startTime = value;
_callBack(value);
});
}
- vcFramework.initDate = function(_dateStr, _callBack) {
+ vcFramework.initDate = function (_dateStr, _callBack) {
$('.' + _dateStr).datetimepicker({
language: 'zh-CN',
minView: 'month',
@@ -1695,14 +1695,14 @@
});
$('.' + _dateStr).datetimepicker()
- .on('changeDate', function(ev) {
+ .on('changeDate', function (ev) {
var value = $('.' + _dateStr).val();
//vc.component.addFeeConfigInfo.startTime = value;
_callBack(value);
});
}
- vcFramework.initHourMinute = function(_dateStr, _callBack) {
+ vcFramework.initHourMinute = function (_dateStr, _callBack) {
$('.' + _dateStr).datetimepicker({
language: 'zh-CN',
fontAwesome: 'fa',
@@ -1714,14 +1714,14 @@
});
$('.' + _dateStr).datetimepicker()
- .on('changeDate', function(ev) {
+ .on('changeDate', function (ev) {
var value = $('.' + _dateStr).val();
//vc.component.addFeeConfigInfo.startTime = value;
_callBack(value);
});
}
- vcFramework.initDateMonth = function(_dateStr, _callBack) {
+ vcFramework.initDateMonth = function (_dateStr, _callBack) {
$('.' + _dateStr).datetimepicker({
language: 'zh-CN',
fontAwesome: 'fa',
@@ -1734,14 +1734,14 @@
todayBtn: true
});
$('.' + _dateStr).datetimepicker()
- .on('changeDate', function(ev) {
+ .on('changeDate', function (ev) {
let value = $('.' + _dateStr).val();
//vc.component.addFeeConfigInfo.startTime = value;
_callBack(value);
});
}
- daysInMonth = function(year, month) {
+ daysInMonth = function (year, month) {
if (month == 1) {
if (year % 4 == 0 && year % 100 != 0)
return 29;
@@ -1753,11 +1753,11 @@
return 30;
}
- vcFramework.unum = function(_money) {
+ vcFramework.unum = function (_money) {
return parseFloat(_money) * -1;
}
- vcFramework.addMonth = function(_date, _month) {
+ vcFramework.addMonth = function (_date, _month) {
let y = _date.getFullYear();
let m = _date.getMonth();
let nextY = y;
@@ -1779,7 +1779,7 @@
};
})(window.vcFramework);
-(function(vcFramework) {
+(function (vcFramework) {
vcFramework.propTypes = {
string: "string", //字符串类型
array: "array",
@@ -1791,18 +1791,18 @@
/**
toast
**/
-(function(vcFramework) {
+(function (vcFramework) {
vcFramework.toast = function Toast(msg, duration) {
duration = isNaN(duration) ? 3000 : duration;
let m = document.createElement('div');
m.innerHTML = msg;
m.style.cssText = "max-width:60%;min-width: 150px;padding:0 14px;height: 40px;color: rgb(255, 255, 255);line-height: 40px;text-align: center;border-radius: 4px;position: fixed;top: 30%;left: 50%;transform: translate(-50%, -50%);z-index: 999999;background: rgba(0, 0, 0,.7);font-size: 16px;";
document.body.appendChild(m);
- setTimeout(function() {
+ setTimeout(function () {
let d = 0.5;
m.style.webkitTransition = '-webkit-transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
m.style.opacity = '0';
- setTimeout(function() {
+ setTimeout(function () {
document.body.removeChild(m)
}, d * 1000);
}, duration);
@@ -1812,8 +1812,8 @@
/**
isNumber
**/
-(function(vcFramework) {
- vcFramework.isNumber = function(val) {
+(function (vcFramework) {
+ vcFramework.isNumber = function (val) {
var regPos = /^\d+(\.\d+)?$/; //非负浮点数
var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
@@ -1828,14 +1828,14 @@
/**
toast
**/
-(function(vcFramework) {
+(function (vcFramework) {
vcFramework.urlToBase64 = function urlToBase64(_url, _callFun) {
let imgData;
let reader = new FileReader();
- getImageBlob(_url, function(blob) {
+ getImageBlob(_url, function (blob) {
reader.readAsDataURL(blob);
});
- reader.onload = function(e) {
+ reader.onload = function (e) {
imgData = e.target.result;
_callFun(imgData);
};
@@ -1844,7 +1844,7 @@
let xhr = new XMLHttpRequest();
xhr.open("get", _url, true);
xhr.responseType = "blob";
- xhr.onload = function() {
+ xhr.onload = function () {
if (this.status == 200) {
if (cb) cb(this.response);
}
@@ -1862,8 +1862,8 @@
@param vc vue component对象
@param vmOptions Vue参数
**/
-(function(vcFramework) {
- vcFramework.initVue = function() {
+(function (vcFramework) {
+ vcFramework.initVue = function () {
let vmOptions = vcFramework.vmOptions;
//console.log("vmOptions:", vmOptions);
vcFramework.vue = new Vue(vmOptions);
@@ -1879,7 +1879,7 @@
* vcFramwork init
* 框架开始初始化
*/
-(function(vcFramework) {
+(function (vcFramework) {
//启动 框架
vcFramework.builderVcTree();
})(window.vcFramework);
@@ -1888,11 +1888,11 @@
/**
vc监听事件
**/
-(function(vcFramework) {
+(function (vcFramework) {
/**
事件监听
**/
- vcFramework.on = function() {
+ vcFramework.on = function () {
let _namespace = "";
let _componentName = "";
let _value = "";
@@ -1912,7 +1912,7 @@
}
if (vcFramework.notNull(_namespace)) {
vcFramework.vue.$on(_namespace + "_" + _componentName + '_' + _value,
- function(param) {
+ function (param) {
if (vcFramework.debug) {
console.log("监听ON事件", _namespace, _componentName, _value, param);
}
@@ -1922,7 +1922,7 @@
return;
}
vcFramework.vue.$on(_componentName + '_' + _value,
- function(param) {
+ function (param) {
if (vcFramework.debug) {
console.log("监听ON事件", _componentName, _value, param);
}
@@ -1934,7 +1934,7 @@
/**
事件触发
**/
- vcFramework.emit = function() {
+ vcFramework.emit = function () {
let _namespace = "";
let _componentName = "";
let _value = "";
@@ -1966,15 +1966,15 @@
/**
* vue对象 执行初始化方法
*/
-(function(vcFramework) {
- vcFramework.initVcComponent = function() {
- vcFramework.initEvent.forEach(function(eventMethod) {
+(function (vcFramework) {
+ vcFramework.initVcComponent = function () {
+ vcFramework.initEvent.forEach(function (eventMethod) {
eventMethod();
});
- vcFramework.initMethod.forEach(function(callback) {
+ vcFramework.initMethod.forEach(function (callback) {
callback();
});
- vcFramework.namespace.forEach(function(_param) {
+ vcFramework.namespace.forEach(function (_param) {
vcFramework[_param.namespace] = vcFramework.vue[_param.namespace];
});
}
@@ -1982,8 +1982,8 @@
/**
* 锚点变化监听
*/
-(function(vcFramework) {
- window.addEventListener("hashchange", function(e) {
+(function (vcFramework) {
+ window.addEventListener("hashchange", function (e) {
let _componentUrl = location.hash;
//判断是否为组件页面
if (!vcFramework.notNull(_componentUrl)) {
@@ -2014,11 +2014,11 @@
(16)、max:5 输入值不能大于5
(17)、min:10 输入值不能小于10
**/
-(function(vcFramework) {
+(function (vcFramework) {
let validate = {
state: true,
errInfo: '',
- setState: function(_state, _errInfo) {
+ setState: function (_state, _errInfo) {
this.state = _state;
if (!this.state) {
this.errInfo = _errInfo
@@ -2029,14 +2029,14 @@
/**
校验手机号
**/
- phone: function(text) {
+ phone: function (text) {
let regPhone = /^0?1[3|4|5|6|7|8|9][0-9]\d{8}$/;
return regPhone.test(text);
},
/**
校验邮箱
**/
- email: function(text) {
+ email: function (text) {
let regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); //正则表达式
return regEmail.test(text);
},
@@ -2044,7 +2044,7 @@
* 必填
* @param {参数} text
*/
- required: function(text) {
+ required: function (text) {
if (text == undefined || text == null || text == "") {
return false;
}
@@ -2056,7 +2056,7 @@
* @param {最小长度} minLength
* @param {最大长度} maxLength
*/
- maxin: function(text, minLength, maxLength) {
+ maxin: function (text, minLength, maxLength) {
if (text.length < minLength || text.length > maxLength) {
return false;
}
@@ -2067,7 +2067,7 @@
* @param {校验文本} text
* @param {最大长度} maxLength
*/
- maxLength: function(text, maxLength) {
+ maxLength: function (text, maxLength) {
if (text.length > maxLength) {
return false;
}
@@ -2078,7 +2078,7 @@
* @param {校验文本} text
* @param {最小长度} minLength
*/
- minLength: function(text, minLength) {
+ minLength: function (text, minLength) {
if (text.length < minLength) {
return false;
}
@@ -2088,21 +2088,21 @@
* 全是数字
* @param {校验文本} text
*/
- num: function(text) {
+ num: function (text) {
if (text == null || text == undefined) {
return true;
}
let regNum = /^[0-9][0-9]*$/;
return regNum.test(text);
},
- date: function(str) {
+ date: function (str) {
if (str == null || str == undefined) {
return true;
}
let regDate = /^(\d{4})-(\d{2})-(\d{2})$/;
return regDate.test(str);
},
- dateTime: function(str) {
+ dateTime: function (str) {
if (str == null || str == undefined) {
return true;
}
@@ -2112,7 +2112,7 @@
/**
金额校验
**/
- money: function(text) {
+ money: function (text) {
if (text == null || text == undefined) {
return true;
}
@@ -2122,14 +2122,14 @@
/**
系数校验
**/
- moneyModulus: function(text) {
+ moneyModulus: function (text) {
if (text == null || text == undefined) {
return true;
}
let regMoney = /^\d+\.?\d{0,4}$/;
return regMoney.test(text);
},
- idCard: function(num) {
+ idCard: function (num) {
if (num == null || num == undefined || num == '') {
return true;
}
@@ -2143,7 +2143,7 @@
/**
校验最小值
**/
- min: function(text, minVal) {
+ min: function (text, minVal) {
if (parseFloat(text) >= parseFloat(minVal)) {
return true;
}
@@ -2152,7 +2152,7 @@
/**
校验最大值
**/
- max: function(text, maxVal) {
+ max: function (text, maxVal) {
if (parseFloat(text) <= parseFloat(maxVal)) {
return true;
}
@@ -2166,7 +2166,7 @@
/**
* 校验 -core
*/
-(function(validate) {
+(function (validate) {
/**
* 根据配置校验
@@ -2197,7 +2197,7 @@
* }
*
*/
- validate.validate = function(dataObj, dataConfig) {
+ validate.validate = function (dataObj, dataConfig) {
try {
// 循环配置(每个字段)
for (let key in dataConfig) {
@@ -2208,7 +2208,7 @@
console.log("keys :", keys);
let tmpDataObj = dataObj;
//根据配置获取 数据值
- keys.forEach(function(tmpKey) {
+ keys.forEach(function (tmpKey) {
console.log('tmpDataObj:', tmpDataObj);
tmpDataObj = tmpDataObj[tmpKey]
});
@@ -2217,7 +2217,7 @@
// tmpDataObj = tmpDataObj[tmpKey]
// }
- tmpDataConfigValue.forEach(function(configObj) {
+ tmpDataConfigValue.forEach(function (configObj) {
if (configObj.limit == "required") {
validate.setState(validate.required(tmpDataObj), configObj.errInfo);
}
@@ -2272,8 +2272,8 @@
/**
对 validate 进行二次封装
**/
-(function(vcFramework) {
- vcFramework.check = function(dataObj, dataConfig) {
+(function (vcFramework) {
+ vcFramework.check = function (dataObj, dataConfig) {
return vcFramework.validate.validate(dataObj, dataConfig);
}
})(window.vcFramework);
@@ -2281,9 +2281,9 @@
/**
* 监听div 大小
*/
-(function(vcFramework) {
+(function (vcFramework) {
vcFramework.eleResize = {
- _handleResize: function(e) {
+ _handleResize: function (e) {
let ele = e.target || e.srcElement;
let trigger = ele.__resizeTrigger__;
if (trigger) {
@@ -2299,7 +2299,7 @@
}
}
},
- _removeHandler: function(ele, handler, context) {
+ _removeHandler: function (ele, handler, context) {
let handlers = ele.__z_resizeListeners;
if (handlers) {
let size = handlers.length;
@@ -2312,7 +2312,7 @@
}
}
},
- _createResizeTrigger: function(ele) {
+ _createResizeTrigger: function (ele) {
let obj = document.createElement('object');
obj.setAttribute('style',
'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden;opacity: 0; pointer-events: none; z-index: -1;');
@@ -2322,13 +2322,13 @@
obj.data = 'about:blank';
return obj;
},
- _handleObjectLoad: function(evt) {
+ _handleObjectLoad: function (evt) {
this.contentDocument.defaultView.__resizeTrigger__ = this.__resizeElement__;
this.contentDocument.defaultView.addEventListener('resize', vcFramework.eleResize._handleResize);
}
};
if (document.attachEvent) { //ie9-10
- vcFramework.eleResize.on = function(ele, handler, context) {
+ vcFramework.eleResize.on = function (ele, handler, context) {
let handlers = ele.__z_resizeListeners;
if (!handlers) {
handlers = [];
@@ -2341,7 +2341,7 @@
context: context
});
};
- vcFramework.eleResize.off = function(ele, handler, context) {
+ vcFramework.eleResize.off = function (ele, handler, context) {
let handlers = ele.__z_resizeListeners;
if (handlers) {
EleResize._removeHandler(ele, handler, context);
@@ -2352,7 +2352,7 @@
}
}
} else {
- vcFramework.eleResize.on = function(ele, handler, context) {
+ vcFramework.eleResize.on = function (ele, handler, context) {
let handlers = ele.__z_resizeListeners;
if (!handlers) {
handlers = [];
@@ -2369,7 +2369,7 @@
context: context
});
};
- vcFramework.eleResize.off = function(ele, handler, context) {
+ vcFramework.eleResize.off = function (ele, handler, context) {
let handlers = ele.__z_resizeListeners;
if (handlers) {
vcFramework.eleResize._removeHandler(ele, handler, context);
@@ -2388,7 +2388,7 @@
})(window.vcFramework);
//全屏处理 这个后面可以关掉
-(function(vcFramework) {
+(function (vcFramework) {
vcFramework._fix_height = (_targetDiv) => {
//只要窗口高度发生变化,就会进入这里面,在这里就可以写,回到聊天最底部的逻辑
let _vcPageHeight = document.getElementsByClassName('vc-page-height')[0];
@@ -2406,7 +2406,7 @@
/**
* 权限处理
*/
-(function(vcFramework) {
+(function (vcFramework) {
let _staffPrivilege = vc.getData('hc_staff_privilege');
if (_staffPrivilege == null) {
_staffPrivilege = [];
@@ -2420,11 +2420,11 @@
//图片压缩处理
-(function(vcFramework) {
- vcFramework.translate = function(imgSrc, callback) {
+(function (vcFramework) {
+ vcFramework.translate = function (imgSrc, callback) {
var img = new Image();
img.src = imgSrc;
- img.onload = function() {
+ img.onload = function () {
var that = this;
var h = that.height;
// 默认按比例压缩
@@ -2464,8 +2464,8 @@
* 水印处理
*/
-(function(vcFramework) {
- vcFramework.watermark = function(settings) {
+(function (vcFramework) {
+ vcFramework.watermark = function (settings) {
//默认设置
var defaultSettings = {
watermark_txt: "text",
@@ -2559,8 +2559,8 @@
})(window.vcFramework);
//解决 toFixed bug 问题
-(function(vcFramework) {
- Number.prototype.toFixed = function(d) {
+(function (vcFramework) {
+ Number.prototype.toFixed = function (d) {
var s = this + "";
if (!d) d = 0;
if (s.indexOf(".") == -1) s += ".";
@@ -2582,20 +2582,8 @@
}
}
s = a.join("").replace(new RegExp("(\\d+)(\\d{" + d + "})\\d$"), "$1.$2");
-<<<<<<< HEAD
-=======
- }
- if (b) s = s.substr(1);
- return (pm + s).replace(/\.$/, "");
- }
- return this + "";
- }
-})(window.vcFramework);
-
->>>>>>> c6f99a4136d2a6450c08d47bb328ee07cf4bdb68
-
}
if (b) s = s.substr(1);
return (pm + s).replace(/\.$/, "");