Browse Source

0921

master
xiaoheiiskinder 1 year ago
parent
commit
125c98ba24
10 changed files with 319 additions and 268 deletions
  1. +1
    -1
      dist/index.html
  2. +7
    -4
      src/components/houseing1.vue
  3. +4
    -1
      src/components/personLi.vue
  4. +10
    -10
      src/utils/i18n.js
  5. +1
    -0
      src/utils/index.js
  6. +1
    -0
      src/views/UnlockRecord.vue
  7. +1
    -1
      src/views/agreement.vue
  8. +235
    -234
      src/views/boYu/byRoom.vue
  9. +31
    -17
      src/views/room.vue
  10. +28
    -0
      src/views/userManagement.vue

+ 1
- 1
dist/index.html View File

@ -1 +1 @@
<!DOCTYPE html><html><head><meta http-equiv=Content-Language><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta http-equiv=Content-Type content="text/html;charset=utf-8"><title>智慧公寓管理系统</title><link href=/static/css/app.3eb8f39093d854e5965330b2168dcaed.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.43412603cc1681ec7a7c.js></script><script type=text/javascript src=/static/js/vendor.622945be597e735b1a7b.js></script><script type=text/javascript src=/static/js/app.4e6c096e3d34a6829a94.js></script></body></html>
<!DOCTYPE html><html><head><meta http-equiv=Content-Language><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta http-equiv=Content-Type content="text/html;charset=utf-8"><title>智慧公寓管理系统</title><link href=/static/css/app.8a55946efe7eb077cdd0f858060e8f85.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.c67b300ba6ba2383843d.js></script><script type=text/javascript src=/static/js/vendor.622945be597e735b1a7b.js></script><script type=text/javascript src=/static/js/app.556ad3f473288dd0de3c.js></script></body></html>

+ 7
- 4
src/components/houseing1.vue View File

@ -8,7 +8,8 @@
</div>
<div class="room-item-row2">
<div class="room-row2-item">
<div>{{ data.count.count ? data.count.count : data.count }}</div>
<div v-if="data1.count">{{ data1.count.quantityB ? data1.count.quantityB : data1.count }}</div>
<div v-else>0</div>
<div>入住</div>
</div>
<div class="room-line"></div>
@ -37,14 +38,16 @@
name: "checkInRoom",
props: {
data: {
type: Object
type: Object || {}
}
},
data() {
return {}
return {
data1: {}
}
},
mounted() {
console.log(this.data);
this.data1 = this.data
},
methods: {},
};


+ 4
- 1
src/components/personLi.vue View File

@ -30,7 +30,10 @@
export default {
name: "personLi",
props: ['data'],
methods: {}
methods: {},
mounted (){
console.log(this.data);
}
};
</script>


+ 10
- 10
src/utils/i18n.js View File

@ -451,16 +451,16 @@ export default {
status: 0,
ChildrenStatus: false
},
// {
// icon: "iconfont httpicon-xitongguanli",
// index: "byRoom",
// title: "泊寓对接",
// pid:33,
// id:33,
// key: 'BOYU_Room',
// status: 0,
// ChildrenStatus: false
// }
{
icon: "iconfont httpicon-xitongguanli",
index: "byRoom",
title: "泊寓对接",
pid:33,
id:33,
key: 'BOYU_Room',
status: 0,
ChildrenStatus: false
}
],
},
i18n1: {


+ 1
- 0
src/utils/index.js View File

@ -178,6 +178,7 @@ export function ztreeToElementTree(data, config) {
if (idMap[item.pid] != idMap[item.id] && idMap[item.pid]) { // 该item项有爸爸,放到对应的父节点下
!idMap[item.pid].hasOwnProperty(children) && (idMap[item.pid][children] = [])
idMap[item.pid][children].push(item)
idMap[item.pid][children].sort((a,b) => { return a.index - b.index })
} else { // 根节点
elementTree.push(item)
}


+ 1
- 0
src/views/UnlockRecord.vue View File

@ -391,6 +391,7 @@
var str = this.getOpenType(li.openType);
var compli = this.comparison(li.deviceNum);
var name = utils.findIndexArray(this.options, li.roomId, [])
console.log(name, this.options, li.roomId);
var path = ''
if (name) {
path = name.join('/')


+ 1
- 1
src/views/agreement.vue View File

@ -1974,7 +1974,7 @@ export default {
q: JSON.stringify(q),
type: 0,
pageNum: 1,
pageSize: 10
pageSize: 10,
};
httpGet(data, this.$api.getSiteList).then(res => {
if (res.success) {


+ 235
- 234
src/views/boYu/byRoom.vue View File

@ -1,93 +1,84 @@
<template>
<div class="my-2 mx-2">
<el-cascader :options="optionsOne" size="small" :props="{ checkStrictly: true }" class="width-200-px my-2 mr-2"
@change="checkNode" :clearable="true" ref="cascader">
</el-cascader>
<el-select v-model="search.buildingId" @change="searchRoom($event,'unit')" size="small" clearable placeholder="请选择楼栋">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="search.unitId" @change="searchRoom($event,'floor')" size="small" clearable placeholder="请选择单元">
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="search.floorId" size="small" placeholder="请选择楼层" clearable>
<el-option
v-for="item in options3"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-input v-model="search.roomName" size="small" placeholder="房间名称" clearable class="width-200-px my-2 mr-2"></el-input>
<el-button type="primary" size="small" @click="getBYRoom"> </el-button>
<el-button type="primary" size="small" @click="resetSearch">重置搜索</el-button>
<!-- <el-button type="primary" size="small" @click="pushDeviceMethods">推送设备</el-button>-->
<el-button type="primary" size="small" @click="byListRoomMethods">同步房源</el-button>
<div class="my-2 mx-2">
<el-cascader :options="optionsOne" size="small" :props="{ checkStrictly: true }" class="width-200-px my-2 mr-2"
@change="checkNode" :clearable="true" ref="cascader">
</el-cascader>
<el-select v-model="search.buildingId" @change="searchRoom($event, 'unit')" size="small" clearable
placeholder="请选择楼栋">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-select v-model="search.unitId" @change="searchRoom($event, 'floor')" size="small" clearable placeholder="请选择单元">
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-select v-model="search.floorId" size="small" placeholder="请选择楼层" clearable>
<el-option v-for="item in options3" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-input v-model="search.roomName" size="small" placeholder="房间名称" clearable
class="width-200-px my-2 mr-2"></el-input>
<el-button type="primary" size="small" @click="getBYRoom"> </el-button>
<el-button type="primary" size="small" @click="resetSearch">重置搜索</el-button>
<!-- <el-button type="primary" size="small" @click="pushDeviceMethods">推送设备</el-button>-->
<el-button type="primary" size="small" @click="byListRoomMethods">同步房源</el-button>
<el-table :data="tableData" border stripe class="table" ref="multipleTable" height="600" header-cell-class-name="table-header"
@selection-change="handleSelectionChange" empty-text="无">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="storeName" label="门店名称"></el-table-column>
<el-table-column prop="buildingName" label="楼栋名称"></el-table-column>
<el-table-column prop="unitName" label="单元名称" ></el-table-column>
<el-table-column prop="floorName" label="楼层名称" ></el-table-column>
<el-table-column prop="roomName" label="房间名称" ></el-table-column>
<el-table-column label="操作" align="center">
<template #default="scope">
<!-- <el-button type="text" @click="pushDeviceMethods(scope.$index, scope.row)">推送设备</el-button>-->
<el-button type="text" @click="addDevice(scope.$index, scope.row)">绑定设备</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @size-change="handleSizeChange" @current-change="handlePageChange"
:current-page="pageNum" :page-sizes="[100,200,300,400,500]" :page-size="pageSize"
:layout="paginationConfig" :total="pageTotal">
</el-pagination>
</div>
<!-- 添加设备弹窗-->
<el-dialog title="编辑" :visible.sync="editVisible" width="30%">
<el-form ref="form" :model="form" label-width="100px">
<el-form-item label="设备">
<el-select v-model="form.did" size="middle" placeholder="请选择设备" @change="selectDevice">
<el-option v-for="item in deviceList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="选择房间">
<el-cascader :options="options" size="middle" :props="{ checkStrictly: true }" @change="checkNodeOne"
v-model="form.roomId" clearable>
</el-cascader>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="editVisible = false" size="small"> </el-button>
<el-button type="primary" @click="addDeviceMethods" size="small"> </el-button>
</span>
<el-table :data="tableData" border stripe class="table" ref="multipleTable" height="600"
header-cell-class-name="table-header" @selection-change="handleSelectionChange" empty-text="无">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="storeName" label="门店名称"></el-table-column>
<el-table-column prop="buildingName" label="楼栋名称"></el-table-column>
<el-table-column prop="unitName" label="单元名称"></el-table-column>
<el-table-column prop="floorName" label="楼层名称"></el-table-column>
<el-table-column prop="roomName" label="房间名称"></el-table-column>
<el-table-column label="操作" align="center">
<template #default="scope">
<!-- <el-button type="text" @click="pushDeviceMethods(scope.$index, scope.row)">推送设备</el-button>-->
<el-button type="text" @click="addDevice(scope.$index, scope.row)">绑定设备</el-button>
</template>
</el-dialog>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @size-change="handleSizeChange" @current-change="handlePageChange" :current-page="pageNum"
:page-sizes="[100, 200, 300, 400, 500]" :page-size="pageSize" :layout="paginationConfig" :total="pageTotal">
</el-pagination>
</div>
<!-- 添加设备弹窗-->
<el-dialog title="编辑" :visible.sync="editVisible" width="30%">
<el-form ref="form" :model="form" label-width="100px">
<el-form-item label="设备">
<el-autocomplete class="inline-input" v-model="form.did" :fetch-suggestions="querySearch" placeholder="请选择设备"
@select="selectDevice"></el-autocomplete>
<!-- <el-select v-model="form.did" size="middle" placeholder="请选择设备" @change="selectDevice">
<el-option v-for="item in deviceList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select> -->
</el-form-item>
<el-form-item label="选择房间">
<el-cascader :options="options" size="middle" :props="{ checkStrictly: true }" @change="checkNodeOne"
v-model="form.roomId" clearable>
</el-cascader>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="editVisible = false" size="small"> </el-button>
<el-button type="primary" @click="addDeviceMethods" size="small"> </el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import {httpPost} from "../../api";
import { httpPost } from "../../api";
import utils from "../../utils/util";
export default {
name: "byRoom",
data(){
return{
manufacturerList:[{//
data() {
return {
manufacturerList: [{//
"label": "GX1000_lock",
"productID": "GX1000_LOCK",
"value": 101
@ -95,91 +86,102 @@ export default {
"label": "ZG_lock",
"productID": "ZG_LOCK",
"value": 201
},{
}, {
"label": "ZG_ble_lock",
"productID": "ZG_LOCK",
"value": 221
}, {
}, {
"label": "YS_LOCK",
"productID": "YS_LOCK",
"value": 701
}],
editVisible:false,//
paginationConfig:'total, sizes, prev, pager, next, jumper',
pageNum:1,//
pageSize:100,//
pageTotal:0,//
tableData:[],//
editVisible: false,//
paginationConfig: 'total, sizes, prev, pager, next, jumper',
pageNum: 1,//
pageSize: 100,//
pageTotal: 0,//
tableData: [],//
options: [],
options2: [],
options3: [],
search:{
deviceNum:'',//
roomName:'',//
storeId:'s202201280338',
unitId:'',
floorId:'',
buildingId:''
search: {
deviceNum: '',//
roomName: '',//
storeId: 's202201280338',
unitId: '',
floorId: '',
buildingId: ''
},
form:{//
did:'',//id
roomId:'',//id
form: {//
did: '',//id
roomId: '',//id
},
deviceList:[],
roomList:[],
selctRoom:{roomId:''},
updateStstus:false,
optionsOne:[]
deviceList: [],
roomList: [],
selctRoom: { roomId: '' },
updateStstus: false,
optionsOne: []
}
},
mounted() {
this.searchRoom('','building')
this.searchRoom('', 'building')
this.getBYRoom()
this.getDeviceList()
},
methods:{
methods: {
//
resetSearch(){
resetSearch() {
this.search = {
deviceNum:'',//
roomName:'',//
storeId:'s202201280338',
unitId:'',
floorId:'',
buildingId:''
deviceNum: '',//
roomName: '',//
storeId: 's202201280338',
unitId: '',
floorId: '',
buildingId: ''
}
},
querySearch(queryString, cb) {
var deviceList = this.deviceList;
var results = queryString ? deviceList.filter(this.createFilter(queryString)) : deviceList;
// callback
cb(results);
},
createFilter(queryString) {
return (deviceList) => {
return (deviceList.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1);
};
},
//
searchRoom(e,key){
console.log(e,key)
searchRoom(e, key) {
console.log(e, key)
let data = {
code: "by/roomField",
data:{
field:key
data: {
field: key
}
}
httpPost(data,this.$api.sendCommand).then(res=>{
if(res.success){
if(key=='store'){
httpPost(data, this.$api.sendCommand).then(res => {
if (res.success) {
if (key == 'store') {
// res.data.map(li=>{
// li.label = li.storeName
// li.value = li.storeId
// })
// this.options = res.data
}else if(key=='building'){
res.data.map(li=>{
} else if (key == 'building') {
res.data.map(li => {
li.label = li.buildingName
li.value = li.buildingId
})
this.options = res.data
}else if(key=='unit'){
res.data.map(li=>{
} else if (key == 'unit') {
res.data.map(li => {
li.label = li.unitName
li.value = li.unitId
})
this.options2 = res.data
}else if(key=='floor'){
res.data.map(li=>{
} else if (key == 'floor') {
res.data.map(li => {
li.label = li.floorName
li.value = li.floorId
})
@ -189,32 +191,32 @@ export default {
})
},
//
byListRoomMethods(){
byListRoomMethods() {
let data = {
code: "by/byListRoom",
data:{
pageNum:this.pageNum,
data: {
pageNum: this.pageNum,
pageSize: 500
}
}
httpPost(data,this.$api.sendCommand).then(res=>{
if(res.success){
httpPost(data, this.$api.sendCommand).then(res => {
if (res.success) {
this.getBYRoom()
}
})
},
//
async getDeviceList(){
async getDeviceList() {
let data = {
code: "lockDevice/list",
data:{
pageNum:this.pageNum,
data: {
pageNum: this.pageNum,
pageSize: 500
}
}
httpPost(data,this.$api.sendCommand).then(res=>{
if(res.success){
res.data.list.map(li=>{
httpPost(data, this.$api.sendCommand).then(res => {
if (res.success) {
res.data.list.map(li => {
li.label = li.deviceNum
li.value = li.deviceNum
})
@ -223,30 +225,30 @@ export default {
})
},
//
selectDevice(e){
selectDevice(e) {
// this.determineMethods('did',e)
},
//
addDevice(index,row){
addDevice(index, row) {
this.selctRoom = row
this.editVisible = true
this.determineMethods('roomId',row.roomId)
this.determineMethods('roomId', row.roomId)
},
//
determineMethods(key,id){
determineMethods(key, id) {
let data = {
code: "by/roomLockList",
data:{
pageNum:1,
data: {
pageNum: 1,
pageSize: 500,
para:{
[key]:id
para: {
[key]: id
}
}
}
httpPost(data,this.$api.sendCommand).then(res=>{
if(res.success){
if(res.data.list.length>0){
httpPost(data, this.$api.sendCommand).then(res => {
if (res.success) {
if (res.data.list.length > 0) {
this.form.did = res.data.list[0].did
this.form.roomId = res.data.list[0].roomId
this.updateStstus = true
@ -256,85 +258,85 @@ export default {
})
},
//
async getBYRoom(){
let content=[]
async getBYRoom() {
let content = []
console.log(this.form)
let results=await this.getRoomList();
let results = await this.getRoomList();
this.pageTotal = results.total
this.tableData = results.list
content=content.concat(results.list);
if(results){
content=content.concat(results.list);
content = content.concat(results.list);
if (results) {
content = content.concat(results.list);
let total = results.total;//
let page = Math.ceil(total/this.pageSize);//
if(page>1){
for(let i = 2;i<=page;i++){
let page = Math.ceil(total / this.pageSize);//
if (page > 1) {
for (let i = 2; i <= page; i++) {
this.pageNum = i;//
let newResults = await this.getRoomList();
//234...content
content=content.concat(newResults.list);
content = content.concat(newResults.list);
}
}
await this.processingData(content)
}
},
async getRoomList(){
async getRoomList() {
let para = {
storeId:this.search.storeId,
buildingId:this.search.buildingId,
unitId:this.search.unitId,
floorId:this.search.floorId,
roomName:this.search.roomName,
storeId: this.search.storeId,
buildingId: this.search.buildingId,
unitId: this.search.unitId,
floorId: this.search.floorId,
roomName: this.search.roomName,
}
let paraObject = utils.validObject(para)
let data = {
code: "by/listRoom",
data:{
pageNum:this.pageNum,
data: {
pageNum: this.pageNum,
pageSize: this.pageSize,
para:paraObject
para: paraObject
}
}
return httpPost(data,this.$api.sendCommand).then(res=>{
if(res.success){
return httpPost(data, this.$api.sendCommand).then(res => {
if (res.success) {
return res.data
}
})
},
async processingData(data){
async processingData(data) {
this.roomList = data
data.map(li=>{
data.map(li => {
li.label = li.roomName
li.value = li.roomId
})
let arr = await this.unique(data,'storeId')
let arr1 = await this.unique(data,'buildingId')
let arr2 = await this.unique(data,'unitId')
let arr3 = await this.unique(data,'floorId')
let result = await this.mergeData(arr3,data,'floorId','floorName')
let result1 = await this.mergeData(arr2,result,'unitId','unitName')
let result2 = await this.mergeData(arr1,result1,'buildingId','buildingName')
let result3 = await this.mergeData(arr,result2,'storeId','storeName')
let arr = await this.unique(data, 'storeId')
let arr1 = await this.unique(data, 'buildingId')
let arr2 = await this.unique(data, 'unitId')
let arr3 = await this.unique(data, 'floorId')
let result = await this.mergeData(arr3, data, 'floorId', 'floorName')
let result1 = await this.mergeData(arr2, result, 'unitId', 'unitName')
let result2 = await this.mergeData(arr1, result1, 'buildingId', 'buildingName')
let result3 = await this.mergeData(arr, result2, 'storeId', 'storeName')
this.optionsOne = result3
},
async mergeData(arr, arr1,key,label) {
async mergeData(arr, arr1, key, label) {
let result = []
arr.map(li=>{
let result1 = arr1.filter(item=>item[key] == li[key])
let obj={
label:li[label],
value:li[key],
buildingId:li.buildingId,
buildingName:li.buildingName,
floorId:li.floorId,
floorName:li.floorName,
roomId:li.roomId,
roomName:li.roomName,
storeId:li.storeId,
storeName:li.storeName,
unitId:li.unitId,
unitName:li.unitName,
children:result1
arr.map(li => {
let result1 = arr1.filter(item => item[key] == li[key])
let obj = {
label: li[label],
value: li[key],
buildingId: li.buildingId,
buildingName: li.buildingName,
floorId: li.floorId,
floorName: li.floorName,
roomId: li.roomId,
roomName: li.roomName,
storeId: li.storeId,
storeName: li.storeName,
unitId: li.unitId,
unitName: li.unitName,
children: result1
}
result.push(obj)
})
@ -344,7 +346,7 @@ export default {
const res = new Map();
return arr.filter((a) => !res.has(a[attrName]) && res.set(a[attrName], 1));
},
async check (data, list) {
async check(data, list) {
data.forEach((item) => {
if (item.children && item.children.length > 0) {
this.check(item.children, list);
@ -356,22 +358,22 @@ export default {
},
//
async checkNode(e) {
if(e.length<4){
if (e.length < 4) {
this.$message.error('请选择到楼层')
}
if(e.length == 4){
if (e.length == 4) {
let tableData = []
this.roomList.map(li=>{
if(li.floorId == e[e.length-1]){
this.roomList.map(li => {
if (li.floorId == e[e.length - 1]) {
tableData.push(li)
}
})
this.tableData = tableData
}
if(e.length == 5){
if (e.length == 5) {
let tableData = []
this.roomList.map(li=>{
if(li.roomId == e[e.length-1] ){
this.roomList.map(li => {
if (li.roomId == e[e.length - 1]) {
tableData.push(li)
}
})
@ -379,67 +381,67 @@ export default {
}
},
//
checkNodeOne(e){
if(e.length<5){
checkNodeOne(e) {
if (e.length < 5) {
this.$message.error('请选择房间')
}else{
this.form.roomId = e[e.length-1]
} else {
this.form.roomId = e[e.length - 1]
// this.determineMethods('roomId',e[e.length-1])
}
},
//
searchMethods(){
searchMethods() {
},
//
pushDeviceMethods(){},
pushDeviceMethods() { },
//
addDeviceMethods(){
if(this.form.did == ''){
addDeviceMethods() {
if (this.form.did == '') {
this.$message.error('请选择设备')
}else if(this.form.roomId == ''){
} else if (this.form.roomId == '') {
this.$message.error('请选择房间')
}else{
if(!this.updateStstus){
} else {
if (!this.updateStstus) {
let data = {
code: "by/addDevice",
data:{
did:this.form.did,
data: {
did: this.form.did,
roomId: this.form.roomId
}
}
httpPost(data,this.$api.sendCommand).then(res=>{
if(res.success){
httpPost(data, this.$api.sendCommand).then(res => {
if (res.success) {
this.editVisible = false
this.$message.success('添加成功')
this.form={
this.form = {
did: '',
roomId: ''
}
this.updateStstus = false
}else{
let message = res.msg?res.msg:res.message
} else {
let message = res.msg ? res.msg : res.message
this.$message.error(`更新失败: ${message}`)
}
})
}else{
} else {
let data = {
code: "by/updateDevice",
data:{
did:this.form.did,
data: {
did: this.form.did,
roomId: this.form.roomId
}
}
httpPost(data,this.$api.sendCommand).then(res=>{
if(res.success){
httpPost(data, this.$api.sendCommand).then(res => {
if (res.success) {
this.editVisible = false
this.$message.success('更新成功')
this.form={
this.form = {
did: '',
roomId: ''
}
this.updateStstus = false
}else{
let message = res.msg?res.msg:res.message
} else {
let message = res.msg ? res.msg : res.message
this.$message.error(`更新失败: ${message}`)
}
})
@ -447,16 +449,16 @@ export default {
}
},
//
handleSelectionChange(val){
handleSelectionChange(val) {
console.log(val)
},
//
handleSizeChange(val){
handleSizeChange(val) {
this.pageSize = val
this.getBYRoom()
},
//
handlePageChange(val){
handlePageChange(val) {
this.pageNum = val
this.getBYRoom()
}
@ -465,8 +467,7 @@ export default {
</script>
<style scoped>
.width-200-px{
.width-200-px {
width: 200px;
}
</style>

+ 31
- 17
src/views/room.vue View File

@ -1005,8 +1005,7 @@ export default {
});
},
addressChange(arr) {
console.log(arr);
console.log(CodeToText[arr[0]], CodeToText[arr[1]], CodeToText[arr[2]]);
},
onSelected1(data) {
this.dataProvince1 = data
@ -1016,15 +1015,15 @@ export default {
},
onChangeProvince(data) {
this.selectaddress2.province = data
console.log(this.selectaddress2, data)
},
onChangeCity(data) {
this.selectaddress2.city = data
console.log(this.selectaddress2, data)
},
onChangeArea(data) {
this.selectaddress2.area = data
console.log(this.selectaddress2, data)
},
handleChange() {
var loc = "";
@ -1244,7 +1243,7 @@ export default {
this.isRoom = true
this.onetypeget(data.id, function (data) {
that.addrow = data;
console.log(that.addrow)
});
this.editVisible1 = true;
},
@ -1256,6 +1255,7 @@ export default {
q: JSON.stringify(q),
};
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
res.data.list.list.map(li => {
let countNum = res.data.tenants.filter(item => item.id == li.id)[0]
if (countNum) {
@ -1508,7 +1508,7 @@ export default {
};
await this.getcount(data)
httpGet(data, this.$api.getSiteList).then(res => {
console.log(res)
console.log(res);
this.projectNum = res.data.list.total
var schoollist = res.data.list.list;
this.schoollist = schoollist
@ -1536,6 +1536,7 @@ export default {
q: JSON.stringify(q),
};
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
this.Building = res.data.list.total;
});
},
@ -1587,7 +1588,7 @@ export default {
this.buildingNum = buildingNum
this.checkin = checkin
this.unboundNum = unboundNum
this.emptyroomNum = roomNum - unboundNum - checkin
this.emptyroomNum = roomNum - checkin
})
},
//
@ -1657,6 +1658,7 @@ export default {
q: JSON.stringify(q),
};
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
var pageuserlist = [],
userlist = [];
res.data.list.list.map((li, index) => {
@ -1740,6 +1742,7 @@ export default {
q: JSON.stringify(q),
};
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
var userlist = [];
res.data.list.list.map((li, index) => {
let countNum = res.data.tenants.filter(item => item.id == li.id)[0]
@ -1782,6 +1785,7 @@ export default {
q: JSON.stringify(q),
};
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
var userlist = [];
res.data.list.list.map((li, index) => {
let countNum = res.data.tenants.filter(item => item.id == li.id)[0]
@ -1824,6 +1828,7 @@ export default {
q: JSON.stringify(q),
};
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
var userlist = [];
res.data.list.list.map((li, index) => {
let countNum = res.data.tenants.filter(item => item.id == li.id)[0]
@ -1865,6 +1870,7 @@ export default {
q: JSON.stringify(q),
};
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
var userlist = [];
res.data.list.list.map((li, index) => {
let countNum = res.data.tenants.filter(item => item.id == li.id)[0]
@ -1904,6 +1910,7 @@ export default {
q: JSON.stringify(q),
};
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
var userlist = [],
pageuserlist = [];
res.data.list.list.map((li, index) => {
@ -1949,7 +1956,7 @@ export default {
handleClick(tab, event) { },
handleClick1(tab, event) {
console.log(tab, event);
},
getalllist() {
var data = {};
@ -1975,6 +1982,7 @@ export default {
var arrdata = uniqueArray(list, "id")
this.allRoomList = arrdata
this.zNodes = ztreeToElementTree(arrdata, {});
console.log(this.zNodes);
});
},
getalllist1(row) {
@ -1988,6 +1996,7 @@ export default {
q: JSON.stringify(q),
};
httpGet(data, this.$api.getTree).then((res) => {
console.log(res);
var userlist = [];
var temp = {},
arr = [];
@ -2064,6 +2073,7 @@ export default {
};
}
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
var pageuserlist = [],
userlist = [];
res.data.list.list.map((li, index) => {
@ -2116,6 +2126,7 @@ export default {
};
this.getalllist1(row);
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
var pageuserlist = [],
userlist = [];
res.data.list.list.map((li, index) => {
@ -2192,6 +2203,7 @@ export default {
q: JSON.stringify(q),
};
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
let newArr = []
res.data.list.list.map(li => {
let countNum = res.data.tenants.filter(item => item.id == li.id)[0]
@ -2236,7 +2248,6 @@ export default {
}
str += '\n'
});
// console.log(str)
// encodeURIComponent
const uri = 'data:text/xlsx;charset=utf-8,\ufeff' + encodeURIComponent(str);
// a
@ -2262,11 +2273,14 @@ export default {
};
var data = {
q: JSON.stringify(q),
orderBy: 'index'
};
this.getalllist1(row);
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
var pageuserlist = [],
userlist = [];
res.data.list.list.sort((a, b) => { return a.index - b.index })
res.data.list.list.map((li, index) => {
let countNum = res.data.tenants.filter(item => item.id == li.id)[0]
if (countNum) {
@ -2366,7 +2380,6 @@ export default {
li.count = 0
}
});
console.log(pageuserlist);
this.pageuserlist = pageuserlist;
var userlist = []
pageuserlist.map((li, index) => {
@ -2374,7 +2387,6 @@ export default {
userlist.push(li);
}
});
console.log(userlist);
this.userlist = userlist;
this.total = pageuserlist.length;
});
@ -2465,7 +2477,6 @@ export default {
//
dbing() {
var list = this.multipleSelection;
console.log(this.multipleSelection);
if (list.length == 0) {
this.$message.error("请勾选需要删除的数据");
} else {
@ -2691,6 +2702,7 @@ export default {
},
//
saveEdit2() {
console.log(this.addrow);
var info = localStorage.getItem("info");
var expand = {
type: "0",
@ -2701,7 +2713,6 @@ export default {
} else {
isRoom = 0
}
console.log(this.addrow)
var data = {
acreage: parseInt(this.form.acreage),
ancestor: this.addid,
@ -2711,12 +2722,13 @@ export default {
isRoom: isRoom,
type: parseInt(this.addrow.type) + 1,
enterpriseId: JSON.parse(info).enterpriseId,
orderBy: JSON.stringify({ index: this.addrow.index })
};
console.log("123")
if (this.form.name == "") {
this.$message.error("公寓名称不能为空");
} else {
httpPost(data, this.$api.sitAddChild).then((res) => {
console.log(res);
this.editVisible1 = false;
this.getlistChildren1();
this.getlist();
@ -2765,7 +2777,7 @@ export default {
this.activeiconfont2 = t;
},
handleSizeChange(val) {
console.log(`每页 ${val}`);
},
handleSizeChangeSearch(val) {
this.pageSizeSearch = val
@ -2800,6 +2812,7 @@ export default {
pageSize: 10
};
httpGet(data, this.$api.getSiteList).then((res) => {
console.log(res);
var schoollist = res.data.list.list;
this.schoollist = schoollist
this.setSchoolTotal()
@ -3266,4 +3279,5 @@ export default {
.h700 {
height: 300px;
}
}</style>
}
</style>

+ 28
- 0
src/views/userManagement.vue View File

@ -2544,7 +2544,21 @@ export default {
};
httpPost(data, this.$api.getlistNum).then((res1) => {
console.log(res1)
// res1.data.list.map((li, index) => {
// li['rommNameText'] = this.screenRoomName(li.id)
// });
let para = [];
res1.data.list.map((li, index) => {
let userTelephone = JSON.parse(li.info) ? JSON.parse(li.info).userTelephone : ''
let str = {
imei: li.imei,
userTelephone: userTelephone,
password: "",
operateMode: 1,
};
para.push(str);
this.$store.commit("increment", 1);
li.status = 3;
li['rommNameText'] = this.screenRoomName(li.id)
});
this.userlist = res1.data.list;
@ -6205,6 +6219,19 @@ export default {
let roomAbout = this.$store.state.roomAbout
httpPost(data, this.$api.getlistNum).then((res1) => {
if (res1.success) {
// let para = [];
// res1.data.list.map((li, index) => {
// let userTelephone = JSON.parse(li.info) ? JSON.parse(li.info).userTelephone : ''
// let str = {
// imei: li.imei,
// userTelephone: userTelephone,
// password: "",
// operateMode: 1,
// };
// para.push(str);
// li.status = 3;
// li['rommNameText'] = this.screenRoomName(li.id)
// });
let para = [];
res1.data.list.map((li, index) => {
let userTelephone = JSON.parse(li.info) ? JSON.parse(li.info).userTelephone : ''
@ -6215,6 +6242,7 @@ export default {
operateMode: 1,
};
para.push(str);
this.$store.commit("increment", 1);
li.status = 3;
li['rommNameText'] = this.screenRoomName(li.id)
});


Loading…
Cancel
Save