Commit 90a08f67 by 朱建香

2018/01/02

下拉更新组件优化
parent 6803065e
...@@ -190,8 +190,8 @@ ...@@ -190,8 +190,8 @@
"wifiAdd": { "wifiAdd": {
"unbindWifiTip": "当前无Wi-Fi", "unbindWifiTip": "当前无Wi-Fi",
"wifiBinding": "配网中", "wifiBinding": "配网中",
"wifiBindSuccess": "配网成功,请激活设备", "wifiBindSuccess": "Wi-Fi连接成功,正在激活设备",
"deviceActivating": "设备激活中", "deviceActivating": "Wi-Fi连接成功,正在激活设备",
"deviceActivateSuccess":"激活成功", "deviceActivateSuccess":"激活成功",
"deviceActivateFailure":"激活失败", "deviceActivateFailure":"激活失败",
"bindTimeout":"连接超时", "bindTimeout":"连接超时",
...@@ -271,10 +271,10 @@ ...@@ -271,10 +271,10 @@
}, },
"inviteBind":{ "inviteBind":{
"qrcodeExpireTip": "二维码已过期,请重新生成", "qrcodeExpireTip": "二维码已过期,请重新生成",
"title": "注意事项:", "title": "绑定方法:",
"cont1": "1.被邀请的用户选择添加设备页面中的扫二维码方式进行添加门锁", "cont1": "1.受邀用户登录“U智锁”APP",
"cont2": "2.长按二维码保存为图片,发送给被邀请用户,用户通过长按识别二维码", "cont2": "2.选择“扫描绑定设备”",
"cont3": "3.有效时间10分钟,失效后请点击“重新生成二维码" "cont3": "3.扫描上方二维码完成绑定"
}, },
"unlockInfo":{ "unlockInfo":{
"bindUnlockInfo": "已关联的开锁信息", "bindUnlockInfo": "已关联的开锁信息",
......
...@@ -13,7 +13,7 @@ iot.ready(init); ...@@ -13,7 +13,7 @@ iot.ready(init);
function init() { function init() {
//通用 dialog、loading组件 //通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading']); uPublic.componentsInit(['u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
......
...@@ -14,7 +14,7 @@ function init() { ...@@ -14,7 +14,7 @@ function init() {
console.log("init" + new Date().getTime()); console.log("init" + new Date().getTime());
//通用 dialog、loading组件 //通用 dialog、loading组件
uPublic.componentsInit(['u-dialog','u-loading']); uPublic.componentsInit(['u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
...@@ -145,7 +145,9 @@ function deviceBind(self, lockId, relId){ ...@@ -145,7 +145,9 @@ function deviceBind(self, lockId, relId){
if(data.success){ if(data.success){
uComponents.openAlert(self, Vue.t('addDevice.bindSuccess'), { uComponents.openAlert(self, Vue.t('addDevice.bindSuccess'), {
text: Vue.t('dialog.confirm'), callback: function () { text: Vue.t('dialog.confirm'), callback: function () {
iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{}); iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
needClose: true
});
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/index.html', url: '../device/index.html',
id: 'device' id: 'device'
......
...@@ -354,7 +354,9 @@ function commLoadingButtonTap(self) { ...@@ -354,7 +354,9 @@ function commLoadingButtonTap(self) {
if(self.getStatus() == 1){ if(self.getStatus() == 1){
//绑定成功 //绑定成功
uComponents.hideCommLoading(self); uComponents.hideCommLoading(self);
iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{}); iot.navigator.fire(plus.webview.getWebviewById('device'),'returnPage',{
needClose: true
});
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/index.html', url: '../device/index.html',
id: 'device' id: 'device'
......
...@@ -13,7 +13,7 @@ iot.ready(init); ...@@ -13,7 +13,7 @@ iot.ready(init);
function init() { function init() {
//通用 按钮、dialog、loading组件 //通用 按钮、dialog、loading组件
uPublic.componentsInit(['u-button','u-dialog','u-loading']); uPublic.componentsInit(['u-button','u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
......
...@@ -14,7 +14,7 @@ import {iot, uPublic, uComponents} from '../../public/public.js'; ...@@ -14,7 +14,7 @@ import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init); iot.ready(init);
function init() { function init() {
//通用 list、dialog、loading组件 //通用 list、dialog、loading组件
uPublic.componentsInit(['u-list','u-dialog','u-loading']); uPublic.componentsInit(['u-list','u-dialog','u-loading','u-refresh']);
uPublic.closeSlideBack(); uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
...@@ -23,10 +23,27 @@ function init() { ...@@ -23,10 +23,27 @@ function init() {
list:[], list:[],
startId: 0, startId: 0,
deviceId: null, deviceId: null,
flag: true flag: true,
refreshDisabled: true
}, },
mounted(){ mounted(){
resolve(this); resolve(this);
let ulistDom = this.$refs.ulist.$el;
console.log(ulistDom);
let self = this;
ulistDom.onscroll = function () {
console.log(ulistDom.offsetHeight+' '+ulistDom.offsetTop);
console.log(ulistDom.scrollTop);
console.log(ulistDom.scrollHeight);
let sum = ulistDom.offsetHeight+ulistDom.scrollTop;
console.log(sum);
//滑到底了
if(sum == ulistDom.scrollHeight){
self.refreshDisabled = false;
ulistDom.style.overflow = 'hidden';
}
}
}, },
methods:{ methods:{
getList(){ getList(){
...@@ -51,6 +68,9 @@ function init() { ...@@ -51,6 +68,9 @@ function init() {
onListLoadTap(){ onListLoadTap(){
listLoadTap(this); listLoadTap(this);
}, },
onRefreshFresh(){
refreshFresh(this);
},
//tap < //tap <
onBackTap(){ onBackTap(){
backTap(); backTap();
...@@ -67,7 +87,7 @@ function initComponentsConfig() { ...@@ -67,7 +87,7 @@ function initComponentsConfig() {
class: 'custom-list', class: 'custom-list',
list: [], list: [],
tip: Vue.t('alarmInfo.noInfoTip'), tip: Vue.t('alarmInfo.noInfoTip'),
pagesize: PAGE_SIZE // pagesize: PAGE_SIZE
} }
}, },
dialog: { dialog: {
...@@ -79,7 +99,14 @@ function initComponentsConfig() { ...@@ -79,7 +99,14 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} },
refresh: {
initParam: {
text: ['下拉刷新','松开加载','正在刷新','刷新成功'],
class: 'custom-refersh',
pullUp: false
}
}
} }
} }
...@@ -121,6 +148,16 @@ function resolve(self) { ...@@ -121,6 +148,16 @@ function resolve(self) {
self.setStartId(record[record.length-1].id); self.setStartId(record[record.length-1].id);
} }
//更新列表数据 //更新列表数据
uComponents.hideRefresh(self);
let ulistDom = self.$refs.ulist.$el;
let sum = ulistDom.offsetHeight+ulistDom.scrollTop;
//滑到底了
ulistDom.style.overflow = 'auto';
self.refreshDisabled = true;
// if(sum != ulistDom.scrollHeight){
// ulistDom.style.overflow = 'auto';
// self.refreshDisabled = true;
// }
uComponents.changeList(self, self.getList()); uComponents.changeList(self, self.getList());
}else{ }else{
} }
...@@ -151,4 +188,8 @@ mui.back = function(){ ...@@ -151,4 +188,8 @@ mui.back = function(){
//tap 点击加载更多 //tap 点击加载更多
function listLoadTap(self) { function listLoadTap(self) {
resolve(self); resolve(self);
}
function refreshFresh(self){
resolve(self);
} }
\ No newline at end of file
...@@ -15,7 +15,7 @@ import {iot, uPublic, uComponents} from '../../public/public.js'; ...@@ -15,7 +15,7 @@ import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init); iot.ready(init);
function init() { function init() {
//通用 list、dialog、loading组件 //通用 list、dialog、loading组件
uPublic.componentsInit(['u-list','u-dialog','u-loading']); uPublic.componentsInit(['u-list','u-dialog','u-loading','u-refresh']);
uPublic.closeSlideBack(); uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
...@@ -25,10 +25,27 @@ function init() { ...@@ -25,10 +25,27 @@ function init() {
startId: 0, startId: 0,
deviceId: null, deviceId: null,
userInfo: [], userInfo: [],
flag: true flag: true,
refreshDisabled: true
}, },
mounted(){ mounted(){
resolve(this); resolve(this);
let ulistDom = this.$refs.ulist.$el;
console.log(ulistDom);
let self = this;
ulistDom.onscroll = function () {
console.log(ulistDom.offsetHeight+' '+ulistDom.offsetTop);
console.log(ulistDom.scrollTop);
console.log(ulistDom.scrollHeight);
let sum = ulistDom.offsetHeight+ulistDom.scrollTop;
console.log(sum);
//滑到底了
if(sum == ulistDom.scrollHeight){
self.refreshDisabled = false;
ulistDom.style.overflow = 'hidden';
}
}
}, },
methods:{ methods:{
getList(){ getList(){
...@@ -58,6 +75,9 @@ function init() { ...@@ -58,6 +75,9 @@ function init() {
onListLoadTap(){ onListLoadTap(){
listLoadTap(this); listLoadTap(this);
}, },
onRefreshFresh(){
refreshFresh(this);
},
//tap < //tap <
onBackTap(){ onBackTap(){
backTap(); backTap();
...@@ -74,7 +94,7 @@ function initComponentsConfig() { ...@@ -74,7 +94,7 @@ function initComponentsConfig() {
class: 'custom-list', class: 'custom-list',
list: [], list: [],
tip: Vue.t('hijackRecord.noRecordTip'), tip: Vue.t('hijackRecord.noRecordTip'),
pagesize: PAGE_SIZE // pagesize: PAGE_SIZE
} }
}, },
dialog: { dialog: {
...@@ -86,7 +106,14 @@ function initComponentsConfig() { ...@@ -86,7 +106,14 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} },
refresh: {
initParam: {
text: ['下拉刷新','松开加载','正在刷新','刷新成功'],
class: 'custom-refersh',
pullUp: false
}
}
} }
} }
...@@ -140,6 +167,16 @@ function initComponentsConfig() { ...@@ -140,6 +167,16 @@ function initComponentsConfig() {
self.setStartId(record[record.length-1].id); self.setStartId(record[record.length-1].id);
} }
//更新列表数据 //更新列表数据
uComponents.hideRefresh(self);
let ulistDom = self.$refs.ulist.$el;
let sum = ulistDom.offsetHeight+ulistDom.scrollTop;
//滑到底了
ulistDom.style.overflow = 'auto';
self.refreshDisabled = true;
// if(sum != ulistDom.scrollHeight){
// ulistDom.style.overflow = 'auto';
// self.refreshDisabled = true;
// }
uComponents.changeList(self, self.getList()); uComponents.changeList(self, self.getList());
}else{ }else{
} }
...@@ -170,4 +207,8 @@ mui.back = function(){ ...@@ -170,4 +207,8 @@ mui.back = function(){
//tap 点击加载更多 //tap 点击加载更多
function listLoadTap(self) { function listLoadTap(self) {
resolve(self); resolve(self);
}
function refreshFresh(self){
resolve(self);
} }
\ No newline at end of file
...@@ -125,6 +125,9 @@ function init() { ...@@ -125,6 +125,9 @@ function init() {
getDevices(self); getDevices(self);
//注册监听上报 //注册监听上报
registerPushListener(self); registerPushListener(self);
if(event.detail.needClose){
iot.navigator.closeAllBesidesItself();
}
}); });
}, },
...@@ -635,6 +638,10 @@ async function updateHistoryMap(self, historyRecord){ ...@@ -635,6 +638,10 @@ async function updateHistoryMap(self, historyRecord){
} }
} }
console.log(oldHistory);
console.log(newHistory);
iot.storage.setMap('history', newHistory, (response) => { iot.storage.setMap('history', newHistory, (response) => {
console.log(res); console.log(res);
}, () => { }, () => {
......
...@@ -14,7 +14,7 @@ import {iot, uPublic, uComponents} from '../../public/public.js'; ...@@ -14,7 +14,7 @@ import {iot, uPublic, uComponents} from '../../public/public.js';
iot.ready(init); iot.ready(init);
function init() { function init() {
//通用 list、dialog、loading组件 //通用 list、dialog、loading组件
uPublic.componentsInit(['u-list','u-dialog','u-loading']); uPublic.componentsInit(['u-list','u-dialog','u-loading','u-refresh']);
uPublic.closeSlideBack(); uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
...@@ -24,10 +24,28 @@ function init() { ...@@ -24,10 +24,28 @@ function init() {
startId: 0, startId: 0,
deviceId: null, deviceId: null,
userInfo: [], userInfo: [],
flag: true flag: true,
refreshDisabled: false
}, },
mounted(){ mounted(){
resolve(this); resolve(this);
let ulistDom = this.$refs.ulist.$el;
console.log(ulistDom);
let self = this;
// ulistDom.onscroll = function () {
//
// console.log(ulistDom.offsetHeight+' '+ulistDom.offsetTop);
// console.log(ulistDom.scrollTop);
// console.log(ulistDom.scrollHeight);
//
// let sum = ulistDom.offsetHeight+ulistDom.scrollTop;
// console.log(sum);
// //滑到底了
// if(sum == ulistDom.scrollHeight){
// self.refreshDisabled = false;
// ulistDom.style.overflow = 'hidden';
// }
// }
}, },
methods:{ methods:{
getList(){ getList(){
...@@ -55,7 +73,10 @@ function init() { ...@@ -55,7 +73,10 @@ function init() {
this.deviceId = id; this.deviceId = id;
}, },
onListLoadTap(){ onListLoadTap(){
listLoadTap(this); // listLoadTap(this);
},
onRefreshFresh(){
refreshFresh(this);
}, },
//tap < //tap <
onBackTap(){ onBackTap(){
...@@ -73,7 +94,7 @@ function initComponentsConfig() { ...@@ -73,7 +94,7 @@ function initComponentsConfig() {
class: 'custom-list', class: 'custom-list',
list: [], list: [],
tip: Vue.t('opendoorRecord.noRecordTip'), tip: Vue.t('opendoorRecord.noRecordTip'),
pagesize: PAGE_SIZE // pagesize: PAGE_SIZE
} }
}, },
dialog: { dialog: {
...@@ -85,7 +106,14 @@ function initComponentsConfig() { ...@@ -85,7 +106,14 @@ function initComponentsConfig() {
initParam: { initParam: {
class: 'custom-loading' class: 'custom-loading'
} }
} },
refresh: {
initParam: {
text: ['下拉刷新','松开加载','正在刷新','刷新成功'],
class: 'custom-refersh',
pullUp: false
}
}
} }
} }
...@@ -186,7 +214,7 @@ function setListData(self, response){ ...@@ -186,7 +214,7 @@ function setListData(self, response){
for(let i=0; i<record.length; i++){ for(let i=0; i<record.length; i++){
list[i] = { list[i] = {
value: record[i].openId, value: record[i].openId,
title: "ID:"+record[i].openId, title: ((record[i].mode == 30 ) || (record[i].mode == 5 )) ? '':"ID:"+record[i].openId,
leftImage: '../../resources/image/green_opendoor'+record[i].mode+'_icon.png', leftImage: '../../resources/image/green_opendoor'+record[i].mode+'_icon.png',
subtitle: Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+''), subtitle: Vue.t('opendoorRecord.'+config.openDoorMode[record[i].mode]+''),
rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss") rightText: moment(record[i].time).format("YYYY.MM.DD HH:mm:ss")
...@@ -204,8 +232,23 @@ function setListData(self, response){ ...@@ -204,8 +232,23 @@ function setListData(self, response){
self.setStartId(record[record.length-1].id); self.setStartId(record[record.length-1].id);
} }
//更新列表数据 //更新列表数据
uComponents.hideRefresh(self);
self.$refs.urefresh.refreshDisabled = true;
// let ulistDom = self.$refs.ulist.$el;
// let sum = ulistDom.offsetHeight+ulistDom.scrollTop;
//滑到底了
// ulistDom.style.overflow = 'auto';
// self.refreshDisabled = true;
// if(sum != ulistDom.scrollHeight){
// ulistDom.style.overflow = 'auto';
// self.refreshDisabled = true;
// }
uComponents.changeList(self, self.getList()); uComponents.changeList(self, self.getList());
console.log("in"); console.log("in");
}else{ }else{
} }
} }
function refreshFresh(self){
resolve(self);
}
\ No newline at end of file
...@@ -284,6 +284,12 @@ function unbind(self){ ...@@ -284,6 +284,12 @@ function unbind(self){
}, },
success: (response) => { success: (response) => {
console.log(response); console.log(response);
iot.storage.delMaps(['historyId','history'], (response) => {
console.log("clearMap"+response);
}, (error) => {
console.log(error);
uPublic.openRequestErrorAlert(self);
});
self.setStateShowFlag(true); self.setStateShowFlag(true);
self.setShowMsg(Vue.t('doorlockManage.unbindSuccess')); self.setShowMsg(Vue.t('doorlockManage.unbindSuccess'));
self.setUnbindSucceess(true); self.setUnbindSucceess(true);
......
...@@ -30,6 +30,8 @@ function init() { ...@@ -30,6 +30,8 @@ function init() {
userListData: [], userListData: [],
startId: 0, startId: 0,
role: null, role: null,
//当前用户id
currentId: null
}, },
mounted(){ mounted(){
this.extras = iot.navigator.getExtras(); this.extras = iot.navigator.getExtras();
...@@ -151,9 +153,8 @@ function getUserInfoMap() { ...@@ -151,9 +153,8 @@ function getUserInfoMap() {
} }
async function sortUsers(self, data){ async function sortUsers(self, data){
let id = [];
try { try {
id = await getUserInfoMap(); self.currentId = await getUserInfoMap();
} }
catch (err) { catch (err) {
console.log(err); console.log(err);
...@@ -161,7 +162,7 @@ async function sortUsers(self, data){ ...@@ -161,7 +162,7 @@ async function sortUsers(self, data){
let users = []; let users = [];
let manage = []; let manage = [];
for(let i=0;i<data.length;i++){ for(let i=0;i<data.length;i++){
if(data[i].user_id == null ||data[i].role && data[i].user_id != id){ if(data[i].user_id == null ||data[i].role && data[i].user_id != self.currentId){
users.push(data[i]); users.push(data[i]);
}else{ }else{
manage.push(data[i]); manage.push(data[i]);
......
...@@ -177,6 +177,9 @@ function cloudsLogin(self, id){ ...@@ -177,6 +177,9 @@ function cloudsLogin(self, id){
iot.navigator.openWindow({ iot.navigator.openWindow({
url: '../device/index.html', url: '../device/index.html',
id: 'device', id: 'device',
styles: {
popGesture: 'none'
},
extras: { extras: {
needClose: true needClose: true
} }
......
...@@ -13,7 +13,7 @@ iot.ready(init); ...@@ -13,7 +13,7 @@ iot.ready(init);
function init() { function init() {
//通用 dialog、loading组件 //通用 dialog、loading组件
uPublic.componentsInit(['u-button','u-dialog','u-loading']); uPublic.componentsInit(['u-button','u-dialog','u-loading']);
uPublic.closeSlideBack(); // uPublic.closeSlideBack();
const app = new Vue({ const app = new Vue({
data:{ data:{
//配置组件 //配置组件
......
/**
* v_index.js
* Version: 0.1
* User: zjx
* Date: 2017-09-26
* Copyright(c) 2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
* 引导页面
*/
import {iot, uPublic, uComponents} from '../../public/public.js';
import unotify from '../../public/unotify.js';
import uloop from '../../public/uloop.js';
iot.ready(init);
function init() {
const app = new Vue({
data:{
},
mounted(){
unotify.getCid((response) => {
console.log(response);
},(error) => {
console.log(error);
});
mui("#refreshContainer").pullRefresh({
up:{
contentrefresh : "正在加載...",//可選,正在加載狀態時,上拉加載控件上顯示的標題內容
contentnomore:'沒 有 更 多 數 據 了',//可選,請求完畢若沒有更多數據時顯示的提醒內容;
callback: beginLoopTap()
},
down : {
height:50,//可選,默認50.觸發下拉刷新拖動距離,
auto: true,//可選,默認false.首次加載自動下拉刷新一次
contentdown : "下拉可以刷新",//可選,在下拉可刷新狀態時,下拉刷新控件上顯示的標題內容
contentover : "釋放立即刷新",//可選,在釋放可刷新狀態時,下拉刷新控件上顯示的標題內容
contentrefresh : "正在刷新...",//可選,正在刷新狀態時,下拉刷新控件上顯示的標題內容
callback : beginLoopTap()
}
});
},
methods:{
// onBeginLoopTap(){
// beginLoopTap();
// }
}
}).$mount('#app');
}
function beginLoopTap(){
console.log("innnnn");
mui('#refreshContainer').pullRefresh().endPullupToRefresh(true);
}
...@@ -479,4 +479,101 @@ ...@@ -479,4 +479,101 @@
.active .u-marquee-text { .active .u-marquee-text {
-webkit-animation: none; -webkit-animation: none;
animation: none; animation: none;
}
.u-notification{
.mask(1051,@CUSTOM-BACKDROP-BG);
.u-notification-box{
width: 335px;
height: 300px;
.transform_center();
background-color: #242635;
color: #00ffff;
border: 1px solid;/*no*/
border-radius: 5px;
.u-notification-title{
position: relative;
padding-top: 10px;
font-size: 16px;
text-align: center;
}
.u-notification-close{
position: absolute;
top: 0;
right: 0;
width: 40px;
height: 100%;
padding-top: 10px;
.iconfont(25px);
}
.u-notification-content{
.bgImgSize(100%,147px,"noticeContBg.png",center,auto 100%);
padding-top: 61px;
}
.u-notification-switch{
width: 150px;
margin: 15px auto;
padding: 10px 0;
text-align: center;
font-size: 12px;
.u-notification-switch-handle{
display: inline-block;
vertical-align: middle;
position: relative;
margin-right: 10px;
width: 17px;
height: 17px;
&:before{
position: absolute;
top: 0;
left: 0;
.iconfont(17px);
}
}
&.u-notification-switch-on .u-notification-switch-handle:before{
content: '\e6aa';
}
&.u-notification-switch-off .u-notification-switch-handle:before{
content: '\e6a9';
}
}
.u-notification-button{
li{
.button(235px);
line-height: 1;
margin: 0 auto;
text-align: center;
padding: 10px 0;
}
}
.clearfix{
overflow: hidden;
padding: 0 54px;
}
.leftCont{
float: left;
}
.rightCont{
float: right;
}
.logo{
.bgImgSize(15px,15px,"logo1.png",center,cover);
display: inline-block;
vertical-align: middle;
margin: 0 -8px 0 8px;
}
.smallFont{
color: #00b2b2;
font-size: 16px;
.transform(scale(0.5));
display: inline-block;
vertical-align: middle;
}
.tip{
text-align: center;
font-size: 12px;
margin-top: 9px;
line-height: 16px;
}
}
} }
\ No newline at end of file
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
.u-list(); .u-list();
.custom-list{ .custom-list{
position: absolute; // position: absolute;
top: 44px; // top: 44px;
bottom: 0; // bottom: 0;
left: 0; // left: 0;
height: auto; // height: auto;
.u-list-scroll .u-list-row{ .u-list-scroll .u-list-row{
height: 75px; height: 75px;
padding: 0 38px 0 41px; padding: 0 38px 0 41px;
...@@ -37,4 +37,109 @@ ...@@ -37,4 +37,109 @@
.u-list-tip{ .u-list-tip{
.listNoCont(); .listNoCont();
} }
}
.custom-refersh{
width: 100%;
height: 100%;
position: absolute;
// top: 1.173rem;
bottom: 0;
left: 0;
}
.custom-refersh .u-refresh-content{
width: 100%;
height: 100%;
/*-webkit-transform: translateY(-50px);
transform: translateY(-50px);*/
}
.custom-refersh .refreshContent{
width: 100%;
height: 100%;
background: lightblue;
}
.custom-refersh .u-refresh-pullUp-text{
width: 100%;
height: 50px;
text-align: center;
line-height: 50px;
display: inline-block;
}
.custom-refersh .u-refresh-dropDown-text{
width: 100%;
height: 50px;
text-align: center;
line-height: 50px;
display: inline-block;
}
.custom-refersh .u-refresh-icon{
/*width: 26px;
height: 26px;
display: inline-block;
-webkit-animation: uLoading 1s steps(12, end) infinite;
animation: refresh 1s steps(12, end) infinite;
background-image: url(../resources/image/loading.png);
background-size: cover;
vertical-align: middle;*/
display: none;
}
@-webkit-keyframes refresh {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
@keyframes refresh {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
.u-refresh-status-0 .u-refresh-icon{
width: 26px;
height: 26px;
display: inline-block;
/*background-image: url(../resources/image/arrow.png);*/
/*background-size: cover;
transition: transform 0.6s;*/
}
.u-refresh-status-1 .u-refresh-icon{
width: 26px;
height: 26px;
display: inline-block;
/*background-image: url(../resources/image/arrow.png);*/
/*background-size: cover;*/
/*transform: rotate(180deg);*/
/*transition: transform 0.6s;*/
}
.u-refresh-status-2 .u-refresh-icon{
width: 26px;
height: 26px;
display: inline-block;
-webkit-animation: uLoading 1s steps(12, end) infinite;
animation: refresh 1s steps(12, end) infinite;
background-image: url(../../resources/image/white_loading_icon.png);
background-size: cover;
vertical-align: middle;
}
.u-refresh-status-3 .u-refresh-icon{
display: none;
} }
\ No newline at end of file
...@@ -133,4 +133,8 @@ ...@@ -133,4 +133,8 @@
.buttonPosition(); .buttonPosition();
} }
.mediaPosition(); .mediaPosition();
\ No newline at end of file
.currentUser{
color: @CUSTOM-SWIPELIST-COMPONENT-TITLE-COLOR;
}
@import "../public/public.less";
@import "../public/header.less";
.title{
span{
.iconfont(16px);
margin-right: 12px;
}
font-size: 16px;
text-align: center;
padding-top: 28px;
}
.helpCont{
margin: 28px 35px 0;
li{
margin-bottom: 17px;
color: #91929a;
font-size: 12px;
line-height: 15px;
text-align: justify;
.contSubtitle{
font-size: 14px;
}
p{
margin-bottom: 8px;
}
}
.white{
color: #fff;
}
.contTitle{
font-size: 16px;
margin-top: 28px;
margin-bottom: 20px;
}
}
.u-button();
.custom-button{
.button();
.buttonPosition();
}
.mediaPosition();
\ No newline at end of file
...@@ -254,6 +254,7 @@ ...@@ -254,6 +254,7 @@
@CUSTOM-SWIPELIST-COMPONENT-BUTTON-COLOR: @C_BLUE_4; @CUSTOM-SWIPELIST-COMPONENT-BUTTON-COLOR: @C_BLUE_4;
@CUSTOM-SWIPELIST-COMPONENT-BUTTON-ICON-FONTSIZE: @F_SIZE_16; @CUSTOM-SWIPELIST-COMPONENT-BUTTON-ICON-FONTSIZE: @F_SIZE_16;
@CUSTOM-SWIPELIST-COMPONENT-DELETEBUTTON-BG: @BODY-BG-COLOR; @CUSTOM-SWIPELIST-COMPONENT-DELETEBUTTON-BG: @BODY-BG-COLOR;
@CUSTOM-SWIPELIST-COMPONENT-TITLE-COLOR: @C_BLUE_4;
//门锁用户列表 //门锁用户列表
@USERLIST-ROW-BG: @BODY-BG-COLOR; @USERLIST-ROW-BG: @BODY-BG-COLOR;
......
...@@ -25,7 +25,10 @@ ...@@ -25,7 +25,10 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.alarmInfo') }}</p> <p>{{ $t('title.alarmInfo') }}</p>
</div> </div>
<u-list ref="ulist" :init-param="componentsConfig.alarmInfoList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list> <u-refresh ref="urefresh" :disabled="refreshDisabled" :init-param="componentsConfig.refresh.initParam"
v-on:u-refresh-fresh = "onRefreshFresh">
<u-list ref="ulist" :init-param="componentsConfig.alarmInfoList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list>
</u-refresh>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -1631,4 +1631,154 @@ p { ...@@ -1631,4 +1631,154 @@ p {
.active .u-marquee-text { .active .u-marquee-text {
-webkit-animation: none; -webkit-animation: none;
animation: none; animation: none;
}
.u-notification {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1051;
background-color: rgba(36, 38, 53, 0.9);
}
.u-notification .u-notification-box {
width: 8.933rem;
height: 8rem;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
background-color: #242635;
color: #00ffff;
border: 1px solid;
border-radius: 0.133rem;
}
.u-notification .u-notification-box .u-notification-title {
position: relative;
padding-top: 0.267rem;
font-size: 0.427rem;
text-align: center;
}
.u-notification .u-notification-box .u-notification-close {
position: absolute;
top: 0;
right: 0;
width: 1.067rem;
height: 100%;
padding-top: 0.267rem;
font-family: iconfont;
font-size: 0.667rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
}
.u-notification .u-notification-box .u-notification-content {
width: 100%;
height: 3.92rem;
background: url("../../resources/image/noticeContBg.png") no-repeat center;
-webkit-background-size: auto 100%;
background-size: auto 100%;
padding-top: 1.627rem;
}
.u-notification .u-notification-box .u-notification-switch {
width: 4rem;
margin: 0.4rem auto;
padding: 0.267rem 0;
text-align: center;
font-size: 0.32rem;
}
.u-notification .u-notification-box .u-notification-switch .u-notification-switch-handle {
display: inline-block;
vertical-align: middle;
position: relative;
margin-right: 0.267rem;
width: 0.453rem;
height: 0.453rem;
}
.u-notification .u-notification-box .u-notification-switch .u-notification-switch-handle:before {
position: absolute;
top: 0;
left: 0;
font-family: iconfont;
font-size: 0.453rem;
-webkit-font-smoothing: antialiased;
line-height: 1;
}
.u-notification .u-notification-box .u-notification-switch.u-notification-switch-on .u-notification-switch-handle:before {
content: '\e6aa';
}
.u-notification .u-notification-box .u-notification-switch.u-notification-switch-off .u-notification-switch-handle:before {
content: '\e6a9';
}
.u-notification .u-notification-box .u-notification-button li {
width: 6.267rem;
border-radius: 0.133rem;
background-color: transparent;
border: 1px solid;
color: #00ffff;
font-size: 0.427rem;
line-height: 1;
margin: 0 auto;
text-align: center;
padding: 0.267rem 0;
}
.u-notification .u-notification-box .u-notification-button li:active {
background-color: #153D4C;
}
.u-notification .u-notification-box .u-notification-button li.disabled {
background-color: transparent;
color: #999;
}
.u-notification .u-notification-box .clearfix {
overflow: hidden;
padding: 0 1.44rem;
}
.u-notification .u-notification-box .leftCont {
float: left;
}
.u-notification .u-notification-box .rightCont {
float: right;
}
.u-notification .u-notification-box .logo {
width: 0.4rem;
height: 0.4rem;
background: url("../../resources/image/logo1.png") no-repeat center;
-webkit-background-size: cover;
background-size: cover;
display: inline-block;
vertical-align: middle;
margin: 0 -0.213rem 0 0.213rem;
}
.u-notification .u-notification-box .smallFont {
color: #00b2b2;
font-size: 0.427rem;
-webkit-transform: scale(0.5);
transform: scale(0.5);
display: inline-block;
vertical-align: middle;
}
.u-notification .u-notification-box .tip {
text-align: center;
font-size: 0.32rem;
margin-top: 0.24rem;
line-height: 0.427rem;
} }
\ No newline at end of file
...@@ -25,7 +25,10 @@ ...@@ -25,7 +25,10 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.hijackRecord') }}</p> <p>{{ $t('title.hijackRecord') }}</p>
</div> </div>
<u-list ref="ulist" :init-param="componentsConfig.hijackRecordList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list> <u-refresh ref="urefresh" :disabled="refreshDisabled" :init-param="componentsConfig.refresh.initParam"
v-on:u-refresh-fresh = "onRefreshFresh">
<u-list ref="ulist" :init-param="componentsConfig.hijackRecordList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list>
</u-refresh>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div id="app" v-cloak> <div id="app" v-cloak>
<div class="header"> <div class="header">
<v-touch tag="span" class="header-left icon" v-on:tap="onMyInfoTap">&#xe69b;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onMyInfoTap">&#xe6bf;</v-touch>
<p>{{ $t('title.device') }}</p> <p>{{ $t('title.device') }}</p>
</div> </div>
<div class="content"> <div class="content">
......
...@@ -25,7 +25,10 @@ ...@@ -25,7 +25,10 @@
<v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch> <v-touch tag="span" class="header-left icon" v-on:tap="onBackTap">&#xe611;</v-touch>
<p>{{ $t('title.opendoorRecord') }}</p> <p>{{ $t('title.opendoorRecord') }}</p>
</div> </div>
<u-list ref="ulist" :init-param="componentsConfig.opendoorRecordList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list> <u-refresh ref="urefresh" :disabled="refreshDisabled" :init-param="componentsConfig.refresh.initParam"
v-on:u-refresh-fresh = "onRefreshFresh">
<u-list ref="ulist" :init-param="componentsConfig.opendoorRecordList.initParam" v-on:u-list-load-tap="onListLoadTap()"></u-list>
</u-refresh>
<u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog> <u-dialog ref="udialog" :init-param="componentsConfig.dialog.initParam"></u-dialog>
<u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading> <u-loading ref="uloading" :init-param="componentsConfig.loading.initParam"></u-loading>
</div> </div>
......
...@@ -532,14 +532,6 @@ p { ...@@ -532,14 +532,6 @@ p {
text-align: center; text-align: center;
} }
.custom-list {
position: absolute;
top: 1.173rem;
bottom: 0;
left: 0;
height: auto;
}
.custom-list .u-list-scroll .u-list-row { .custom-list .u-list-scroll .u-list-row {
height: 2rem; height: 2rem;
padding: 0 1.013rem 0 1.093rem; padding: 0 1.013rem 0 1.093rem;
...@@ -586,4 +578,111 @@ p { ...@@ -586,4 +578,111 @@ p {
color: #91929a; color: #91929a;
font-size: 0.427rem; font-size: 0.427rem;
padding-top: 2.347rem; padding-top: 2.347rem;
}
.custom-refersh {
width: 100%;
height: 100%;
position: absolute;
bottom: 0;
left: 0;
}
.custom-refersh .u-refresh-content {
width: 100%;
height: 100%;
/*-webkit-transform: translateY(-50px);
transform: translateY(-50px);*/
}
.custom-refersh .refreshContent {
width: 100%;
height: 100%;
background: lightblue;
}
.custom-refersh .u-refresh-pullUp-text {
width: 100%;
height: 1.333rem;
text-align: center;
line-height: 1.333rem;
display: inline-block;
}
.custom-refersh .u-refresh-dropDown-text {
width: 100%;
height: 1.333rem;
text-align: center;
line-height: 1.333rem;
display: inline-block;
}
.custom-refersh .u-refresh-icon {
/*width: 26px;
height: 26px;
display: inline-block;
-webkit-animation: uLoading 1s steps(12, end) infinite;
animation: refresh 1s steps(12, end) infinite;
background-image: url(../resources/image/loading.png);
background-size: cover;
vertical-align: middle;*/
display: none;
}
@-webkit-keyframes refresh {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
@keyframes refresh {
0% {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
100% {
-webkit-transform: rotate3d(0, 0, 1, 360deg);
transform: rotate3d(0, 0, 1, 360deg);
}
}
.u-refresh-status-0 .u-refresh-icon {
width: 0.693rem;
height: 0.693rem;
display: inline-block;
/*background-image: url(../resources/image/arrow.png);*/
/*background-size: cover;
transition: transform 0.6s;*/
}
.u-refresh-status-1 .u-refresh-icon {
width: 0.693rem;
height: 0.693rem;
display: inline-block;
/*background-image: url(../resources/image/arrow.png);*/
/*background-size: cover;*/
/*transform: rotate(180deg);*/
/*transition: transform 0.6s;*/
}
.u-refresh-status-2 .u-refresh-icon {
width: 0.693rem;
height: 0.693rem;
display: inline-block;
-webkit-animation: uLoading 1s steps(12, end) infinite;
animation: refresh 1s steps(12, end) infinite;
background-image: url(../../resources/image/white_loading_icon.png);
background-size: cover;
vertical-align: middle;
}
.u-refresh-status-3 .u-refresh-icon {
display: none;
} }
\ No newline at end of file
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
</div> </div>
<div class="user-list"> <div class="user-list">
<ul class="user-list-scroll" v-show="userList.length"> <ul class="user-list-scroll" v-show="userList.length">
<v-touch tag="li" class="user-list-row" v-for="(item, index) in userList" :key="index" > <v-touch tag="li" class="user-list-row" v-for="(item, index) in userList" :key="index" >
<v-touch tag="div" class="user-list-handle" <v-touch tag="div" class="user-list-handle"
v-on:tap="onTapUserList(index)"> v-on:tap="onTapUserList(index)">
<img class="user-list-image" v-if="item.image && item.role == 0" v-bind:src="item.image"> <img class="user-list-image" v-if="item.image && item.role == 0" v-bind:src="item.image">
<div> <div>
<p class="user-list-title">{{ item.title == (null || '')? $t('userList.defaultName'):item.title}}</p> <p class="user-list-title" v-bind:class="{'currentUser': userListData[index].user_id == currentId }" >{{ item.title == (null || '')? $t('userList.defaultName'):item.title}}</p>
<p class="user-list-subtitle"> <p class="user-list-subtitle">
<img class="user-list-subimage" v-if="item.image && item.role != 0" v-bind:src="item.image"> <img class="user-list-subimage" v-if="item.image && item.role != 0" v-bind:src="item.image">
<span v-if="item.subtitle">{{ item.subtitle }}</span> <span v-if="item.subtitle">{{ item.subtitle }}</span>
......
...@@ -806,4 +806,8 @@ p { ...@@ -806,4 +806,8 @@ p {
.custom-button { .custom-button {
bottom: 1.2rem; bottom: 1.2rem;
} }
}
.currentUser {
color: #00ffff;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment