Browse Source

版本3.8.0 ljd 2024-2-19

1、修复租客列表和设备列表分页器不管输入多少页都是第一页的问题
2、修复租客列表搜索时会二次搜索的问题
3、修改租客列表加载时的文字信息
master
xiaohei 11 months ago
parent
commit
c7cf8e94cb
6 changed files with 75 additions and 69 deletions
  1. +9
    -4
      src/components/DeviceFeedbackLog.vue
  2. +11
    -4
      src/views/DeviceFeedbackLog.vue
  3. +8
    -3
      src/views/doorLock.vue
  4. +4
    -3
      src/views/getFinger.vue
  5. +30
    -3
      src/views/room.vue
  6. +13
    -52
      src/views/userManagement.vue

+ 9
- 4
src/components/DeviceFeedbackLog.vue View File

@ -34,7 +34,8 @@
<el-table-column prop="cardName" label="锁用户"></el-table-column>
<el-table-column prop="operateName" label="操作员"></el-table-column>
<el-table-column prop="serial" label="流水号"></el-table-column>
<el-table-column prop="createTime" label="生效时间"></el-table-column>
<el-table-column prop="updateTime" label="生效时间"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<!-- <el-table-column prop="createTime" label="操作" v-if="userInfo.type==0">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="cancelDistribution(scope.$index,scope.row)"
@ -57,6 +58,7 @@
httpPost
} from "../api";
import utils from "../utils/util.js";
import moment from "moment/moment";
export default {
inject: ['reload'],
name: "warningLog",
@ -189,7 +191,8 @@
var AboutDevice = this.AboutDevice
let datalist=utils.zlib_unzip(res.data)
datalist.map((li) => {
li.createTime = this.time(+new Date(li.createTime));
li.createTime = moment(li.createTime).format('YYYY-MM-DD HH:mm:ss')
li.updateTime = moment(li.updateTime).format('YYYY-MM-DD HH:mm:ss')
var resultArr = AboutDevice.filter(_item => _item.imei == li.imei)[0]
li['statusText'] = utils.statusCode(li.result)
if (resultArr) {
@ -240,7 +243,8 @@
datalist.map((li) => {
li['statusText'] = utils.statusCode(li.result)
var resultArr = AboutDevice.filter(_item => _item.imei == li.imei)[0]
li.createTime = this.time(+new Date(li.createTime));
li.createTime = moment(li.createTime).format('YYYY-MM-DD HH:mm:ss')
li.updateTime = moment(li.updateTime).format('YYYY-MM-DD HH:mm:ss')
if (resultArr) {
li.roomId = resultArr.id
li.roomName = resultArr.roomName
@ -281,7 +285,8 @@
datalist.map((li) => {
li['statusText'] = utils.statusCode(li.result)
var resultArr = AboutDevice.filter(_item => _item.imei == li.imei)[0]
li.createTime = this.time(+new Date(li.createTime));
li.createTime = moment(li.createTime).format('YYYY-MM-DD HH:mm:ss')
li.updateTime = moment(li.updateTime).format('YYYY-MM-DD HH:mm:ss')
if (resultArr) {
li.roomId = resultArr.id
li.roomName = resultArr.roomName


+ 11
- 4
src/views/DeviceFeedbackLog.vue View File

@ -42,7 +42,8 @@
<el-table-column prop="cardName" label="锁用户"></el-table-column>
<el-table-column prop="operateName" label="操作员"></el-table-column>
<el-table-column prop="serial" label="流水号"></el-table-column>
<el-table-column prop="createTime" label="生效时间"></el-table-column>
<el-table-column prop="updateTime" label="生效时间"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column prop="createTime" label="操作" v-if="userInfo.type==0">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="cancelDistribution(scope.$index,scope.row)"
@ -696,7 +697,9 @@
} else {
li['reStatus'] = false
}
li.createTime = this.time(+new Date(li.createTime));
// li.createTime = this.time(+new Date(li.createTime));
li.createTime = moment(li.createTime).format('YYYY-MM-DD HH:mm:ss')
li.updateTime = moment(li.updateTime).format('YYYY-MM-DD HH:mm:ss')
var resultArr = this.AboutDevice.filter(_item => _item.imei == li.imei)[0]
li['operationType'] = ''
var operationType = this.DeviceFeedbackLog.filter(item => item.code == li.command)[
@ -763,7 +766,9 @@
}
}
li['statusText'] = utils.statusCode(li.result)
li.createTime = this.time(+new Date(li.createTime));
// li.createTime = this.time(+new Date(li.createTime));
li.createTime = moment(li.createTime).format('YYYY-MM-DD HH:mm:ss')
li.updateTime = moment(li.updateTime).format('YYYY-MM-DD HH:mm:ss')
var resultArr = AboutDevice.filter(_item => _item.imei == li.imei)[0]
if (resultArr) {
li.roomId = resultArr.id
@ -798,7 +803,9 @@
dataOne.map((li) => {
li['statusText'] = utils.statusCode(li.result)
var resultArr = AboutDevice.filter(_item => _item.imei == li.imei)[0]
li.createTime = this.time(+new Date(li.createTime));
// li.createTime = this.time(+new Date(li.createTime));
li.createTime = moment(li.createTime).format('YYYY-MM-DD HH:mm:ss')
li.updateTime = moment(li.updateTime).format('YYYY-MM-DD HH:mm:ss')
if ((li.command == 6204 || li.command == 6207 || li.command == 6210 || li
.command == 6213) && li.result == 702) {
li['reStatus'] = true


+ 8
- 3
src/views/doorLock.vue View File

@ -330,7 +330,7 @@
</el-table>
<div class="pagination">
<el-pagination @size-change="handleSizeChange" @current-change="handlePageChange"
:current-page="$store.state.currentPage" :page-sizes="[10, 20, 100]" :page-size="pageSize"
:current-page="normallyPageNum" :page-sizes="[10, 20, 100]" :page-size="pageSize"
:layout="paginationConfig" :total="pageTotal">
</el-pagination>
</div>
@ -3076,6 +3076,8 @@ restSearch() {
}
this.checkNodeId = ''
this.searchRoom = ''
this.normallyPageNum = 1
this.pageSize = 10
this.handleSearch()
},
//
@ -3104,6 +3106,7 @@ screenStatisticsItemsMethods(data) {
},
//
handleSearch() {
this.normallyPageNum = 1
var deviceNum = this.search.deviceNum.replace(/\s*/g, "");
var imei = this.search.imei.replace(/\s*/g, "");
if (this.search.isOnline == 2) {
@ -3394,7 +3397,7 @@ saveEdit() {
this.editVisible = false;
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.normallyPageNum = 1
this.$router.replace({
path: this.$route.path,
query: {
@ -3403,7 +3406,8 @@ handleSizeChange(val) {
},
});
this.pageSize = val
this.getlistNum(0, val);
// this.getlistNum(1, val);
this.handleSearch()
},
getlistNum(val, size) {
var deviceNum = this.search.deviceNum.replace(/\s*/g, "");
@ -3472,6 +3476,7 @@ handlePageChange(val) {
// },
// });
this.pageNum = val
this.normallyPageNum = val
this.$store.commit("increment", val);
var q = {
deviceNum: this.search.deviceNum,


+ 4
- 3
src/views/getFinger.vue View File

@ -438,9 +438,10 @@ function getLocalIp(cb){
openFullScreen() {
this.loading = this.$loading({
lock: true,
text: this.text,
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
text: 'Loading...'
// text: this.text,
// spinner: 'el-icon-loading',
// background: 'rgba(0, 0, 0, 0.7)'
});
}


+ 30
- 3
src/views/room.vue View File

@ -1224,7 +1224,7 @@ export default {
}
})
},
resetInput() {
async resetInput() {
this.input5 = ''
this.input6 = ''
this.searchSelectStatus = ''
@ -1235,8 +1235,35 @@ export default {
address: '',
area: ''
}
this.queryfirstall();
this.getlistChildren(this.selectrow);
this.selectedOptionsData1 = []
this.input5 = ''
this.searchAddress1.address = ''
this.searchAddress1.area = ''
// this.queryfirstall();
// this.getlistChildren(this.selectrow);
var q = {
type: 0,
name: this.input5,
address: this.searchAddress1.address,
area: this.searchAddress1.area
};
var data = {
q: JSON.stringify(q),
type: 0,
pageNum: 1,
pageSize: 10
};
console.log(1254)
// await this.getcount(data)
httpGet(data, this.$api.getSiteList).then(res => {
console.log(res);
this.projectNum = res.data.list.total
var schoollist = res.data.list.list;
this.schoollist = schoollist
this.setSchoolTotal()
this.schooltotal = res.data.list.total;
});
},
//
cz(row) {


+ 13
- 52
src/views/userManagement.vue View File

@ -236,7 +236,7 @@
</div>
</div>
<div class="paging">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage4"
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum"
:page-sizes="[10, 20, 100, 200, 500, 1000]" :page-size="pageSize" :layout="paginationConfig" :total="total">
</el-pagination>
</div>
@ -2934,7 +2934,7 @@ export default {
}
});
this.searchCardIds = searchCardIds
this.getAboutRoom()
// this.getAboutRoom()
let list = res1.data.list
setTimeout(()=>{
list.map(li=>{
@ -2944,10 +2944,6 @@ export default {
this.userlist = list;
this.total = res1.data.total;
},500)
// this.getallstatus(para);
// console.log(res1.data.list);
// this.userlist = res1.data.list;
// this.total = res1.data.total;
});
},
//
@ -4550,6 +4546,7 @@ export default {
//
getcertificate() {
if (this.credentialSearch.roomId) {
console.log(123)
var t = {
roomIds: [this.credentialSearch.roomId],
lockType: 1
@ -4558,6 +4555,7 @@ export default {
q: JSON.stringify(t),
};
httpPost(data, this.$api.getDeviceItems).then((res) => {
console.log(res)
if (res.success) {
var data = {
pageNum: 0,
@ -4578,6 +4576,7 @@ export default {
}
})
} else {
console.log(234)
var data = {
pageNum: 0,
pageSize: 0,
@ -6882,59 +6881,21 @@ export default {
},
handleSizeChange(val) {
// console.log(` ${val} `);
this.getlistNum(0, val);
// this.getlistNum(0, val);
this.pageSize = val
this.pageNum = 1
this.handleSearch()
},
handleCurrentChange(val) {
this.pageNum =val
// console.log(`: ${val}`);
this.getlistNum(val, 10);
// this.getlistNum(val, 10);
this.$store.commit("increment", val);
},
//
handleSizeChange2(val) {
this.pageSize2 = val
this.getlistNum2(0, val);
},
handleCurrentChange2(val) {
this.currentPage2 = val
// console.log(`: ${val}`);
this.getlistNum2(val, 10);
},
getlistNum2(val, size) {
var data = {
pageNum: this.currentPage2,
pageSize: this.pageSize2,
orderBy: "create_at desc",
q: {
cardId: this.drawerRow.id,
},
};
httpGet(data, this.$api.getCertificates).then((res) => {
var certiflist = utils.zlib_unzip(res.data)
var AboutDevice = this.allAboutDevice;
certiflist.map((li) => {
li.createAt = this.time(+new Date(li.createAt));
li.userTelephone = JSON.parse(li.content).userTelephone;
li.pzname = JSON.parse(li.content).pzname;
li['statusText'] = utils.statusCode(li.status)
li['startTimeText'] = utils.formatTime(li.startTime)
li['endTimeText'] = utils.formatTime(li.endTime)
var resultArr = AboutDevice.filter(
(_item) => _item.imei == li.imei
)[0];
if (resultArr) {
li.roomId = resultArr.id;
li.roomName = resultArr.roomName;
} else {
li.roomId = "";
li.roomName = "";
}
});
this.roomtable2 = certiflist;
this.total2 = res.data.total;
});
this.handleSearch()
},
getlistNum(val, size) {
console.log(val)
var q = {
// type: 0,
name: this.query.name,


Loading…
Cancel
Save