@@ -1,6 +1,6 @@ | |||||
<template> | <template> | ||||
<div class="box-center"> | <div class="box-center"> | ||||
<div v-if="role==3"> | |||||
<div v-if="role==3&&info.userRoleType!=6"> | |||||
<div class="app-titel"> | <div class="app-titel"> | ||||
<div class="titel-text">时间</div> | <div class="titel-text">时间</div> | ||||
<div class="toptimeqhuan"> | <div class="toptimeqhuan"> | ||||
@@ -338,7 +338,7 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div v-if="role!=3"> | |||||
<div v-if="role!=3&&info.userRoleType!=6"> | |||||
<!-- 系统后台 --> | <!-- 系统后台 --> | ||||
<div style="margin-bottom:10px; cursor:pointer;" v-if="role!=2"> | <div style="margin-bottom:10px; cursor:pointer;" v-if="role!=2"> | ||||
<span style="font-weight:bold;font-size: 18px;">待处理</span> | <span style="font-weight:bold;font-size: 18px;">待处理</span> | ||||
@@ -887,11 +887,14 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div v-if="info.userRoleType==6" style="text-align: center;font-size: 30px; margin: 300px auto;"> | |||||
欢迎光临 | |||||
</div> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getStore, setStore } from "@/util/store"; | |||||
export default { | export default { | ||||
name: 'Wel', | name: 'Wel', | ||||
data() { | data() { | ||||
@@ -928,13 +931,15 @@ export default { | |||||
num:'', | num:'', | ||||
list:[], | list:[], | ||||
fraction:'' | fraction:'' | ||||
} | |||||
}, | |||||
info:{}, | |||||
} | } | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
// location.reload(); | // location.reload(); | ||||
this.role=localStorage.getItem("orgType"); | this.role=localStorage.getItem("orgType"); | ||||
this.info = getStore({ name: "userInfo" }); | |||||
if(this.role==3){ | if(this.role==3){ | ||||
this.houseId = localStorage.getItem("houseId"); | this.houseId = localStorage.getItem("houseId"); | ||||
@@ -28,6 +28,20 @@ | |||||
> | > | ||||
</el-date-picker> | </el-date-picker> | ||||
</div> | </div> | ||||
<el-select | |||||
v-model="houseTypes" | |||||
@change="sysChange" | |||||
style="width: 100px; margin-left: 10px" | |||||
placeholder="请选择" | |||||
> | |||||
<el-option | |||||
v-for="item in options2" | |||||
:key="item.value" | |||||
:label="item.label" | |||||
:value="item.value" | |||||
> | |||||
</el-option> | |||||
</el-select> | |||||
</div> | </div> | ||||
<!-- 表格 --> | <!-- 表格 --> | ||||
@@ -276,7 +290,18 @@ export default { | |||||
list:[], | list:[], | ||||
num:'', | num:'', | ||||
sum:'' | sum:'' | ||||
} | |||||
}, | |||||
houseTypes: "0,1", | |||||
options2: [ | |||||
{ | |||||
label: "正式数据", | |||||
value: "0,1", | |||||
}, | |||||
{ | |||||
label: "测试数据", | |||||
value: "2,3", | |||||
}, | |||||
], | |||||
}; | }; | ||||
}, | }, | ||||
@@ -287,6 +312,9 @@ export default { | |||||
this.gethouseData() | this.gethouseData() | ||||
}, | }, | ||||
methods: { | methods: { | ||||
sysChange() { | |||||
this.gethouseData() | |||||
}, | |||||
gethouseData(){ | gethouseData(){ | ||||
this.houseTable() | this.houseTable() | ||||
this.houseData1() | this.houseData1() | ||||
@@ -300,7 +328,8 @@ export default { | |||||
dateType:0, | dateType:0, | ||||
statDateStart:this.statDateStart, | statDateStart:this.statDateStart, | ||||
statDateEnd:this.statDateEnd, | statDateEnd:this.statDateEnd, | ||||
type:1 | |||||
type:1, | |||||
houseTypes: this.houseTypes, | |||||
} | } | ||||
if(this.role==3){ | if(this.role==3){ | ||||
pamaet.houseId=this.houseId | pamaet.houseId=this.houseId | ||||
@@ -335,7 +364,8 @@ export default { | |||||
dateType:0, | dateType:0, | ||||
statDateStart:this.statDateStart, | statDateStart:this.statDateStart, | ||||
statDateEnd:this.statDateEnd, | statDateEnd:this.statDateEnd, | ||||
type:2 | |||||
type:2, | |||||
houseTypes: this.houseTypes, | |||||
} | } | ||||
if(this.role==3){ | if(this.role==3){ | ||||
pamaet.houseId=this.houseId | pamaet.houseId=this.houseId | ||||
@@ -368,7 +398,8 @@ export default { | |||||
dateType:0, | dateType:0, | ||||
statDateStart:this.statDateStart, | statDateStart:this.statDateStart, | ||||
statDateEnd:this.statDateEnd, | statDateEnd:this.statDateEnd, | ||||
type:3 | |||||
type:3, | |||||
houseTypes: this.houseTypes, | |||||
} | } | ||||
if(this.role==3){ | if(this.role==3){ | ||||
pamaet.houseId=this.houseId | pamaet.houseId=this.houseId | ||||
@@ -406,7 +437,8 @@ export default { | |||||
dateType:0, | dateType:0, | ||||
statDateStart:this.statDateStart, | statDateStart:this.statDateStart, | ||||
statDateEnd:this.statDateEnd, | statDateEnd:this.statDateEnd, | ||||
type:4 | |||||
type:4, | |||||
houseTypes: this.houseTypes, | |||||
} | } | ||||
if(this.role==3){ | if(this.role==3){ | ||||
pamaet.houseId=this.houseId | pamaet.houseId=this.houseId | ||||
@@ -444,7 +476,8 @@ export default { | |||||
statDateStart:this.statDateStart, | statDateStart:this.statDateStart, | ||||
statDateEnd:this.statDateEnd, | statDateEnd:this.statDateEnd, | ||||
current:this.page, | current:this.page, | ||||
size:this.pagesize | |||||
size:this.pagesize, | |||||
houseTypes: this.houseTypes, | |||||
} | } | ||||
if(this.role==3){ | if(this.role==3){ | ||||
pamaet.houseId=this.houseId | pamaet.houseId=this.houseId | ||||
@@ -781,6 +781,7 @@ | |||||
@size-change="handleSizeChange1" | @size-change="handleSizeChange1" | ||||
@current-change="handleCurrentChange1" | @current-change="handleCurrentChange1" | ||||
:current-page.sync="page1.current" | :current-page.sync="page1.current" | ||||
layout="total, prev, pager, next, jumper" | |||||
:page-size="page1.size" | :page-size="page1.size" | ||||
:total="page1.total" | :total="page1.total" | ||||
> | > | ||||
@@ -1204,6 +1205,7 @@ export default { | |||||
{ required: true, message: "请选择角色身份", trigger: "blur" }, | { required: true, message: "请选择角色身份", trigger: "blur" }, | ||||
], | ], | ||||
}, | }, | ||||
originalList:[] | |||||
// 数据权限 | // 数据权限 | ||||
// sys_user_add:true, | // sys_user_add:true, | ||||
// sys_user_edit:true, | // sys_user_edit:true, | ||||
@@ -1577,14 +1579,18 @@ export default { | |||||
addHouse() { | addHouse() { | ||||
// 楼盘 | // 楼盘 | ||||
if (this.bindFlag == 0) { | if (this.bindFlag == 0) { | ||||
if (this.checkHouse.length == 0) { | |||||
if (this.checkHouse.length == 0&&this.originalList.length == 0) { | |||||
this.houseVisible = false; | this.houseVisible = false; | ||||
return; | return; | ||||
} | } | ||||
let arr=[] | |||||
arr.push(...this.checkHouse,...this.originalList) | |||||
// console.log(arr); | |||||
this.$api.api | this.$api.api | ||||
.saveHouse({ | .saveHouse({ | ||||
accountId: this.accountId, | accountId: this.accountId, | ||||
houseIds: this.checkHouse.join(","), | |||||
// houseIds: this.checkHouse.join(","), | |||||
houseIds: arr.join(","), | |||||
orgCode: this.code.orgCode, | orgCode: this.code.orgCode, | ||||
}) | }) | ||||
.then((res) => { | .then((res) => { | ||||
@@ -1726,6 +1732,9 @@ export default { | |||||
this.houseUserRoleType = row.userRoleType; | this.houseUserRoleType = row.userRoleType; | ||||
this.accountId = row.accountId; | this.accountId = row.accountId; | ||||
this.houseVisible = true; | this.houseVisible = true; | ||||
// 获取原始数据 | |||||
this.originalList=row.houseIds.split(',') | |||||
// console.log(this.originalList,'原始数据') | |||||
// 判断是否有绑定以及绑定方式 | // 判断是否有绑定以及绑定方式 | ||||
// console.log(row.selectHouseType) | // console.log(row.selectHouseType) | ||||
if (row.selectHouseType == 1) { | if (row.selectHouseType == 1) { | ||||
@@ -1820,18 +1829,33 @@ export default { | |||||
orgCode: this.orgCode, | orgCode: this.orgCode, | ||||
current: this.page1.current, | current: this.page1.current, | ||||
size: this.page1.size, | size: this.page1.size, | ||||
// size: 1, | |||||
...this.searchhouseMsg, | ...this.searchhouseMsg, | ||||
}) | }) | ||||
.then((res) => { | .then((res) => { | ||||
// console.log(res) | // console.log(res) | ||||
this.page1.total = res.data.total; | this.page1.total = res.data.total; | ||||
this.housedata = res.data.records; | this.housedata = res.data.records; | ||||
// console.log(this.page1.total,'总数') | |||||
let arr = []; | let arr = []; | ||||
res.data.records.map((item) => { | res.data.records.map((item) => { | ||||
if (item.isSelected == 0) { | if (item.isSelected == 0) { | ||||
// 获取到已标记的数据 然后通过findIndex 来将所有数组里面的重复内容删除 | |||||
// 当点击下一页时将将当前页面的内容重新赋值给原始数组 | |||||
// 在进行提交时,则需要吧当前选中的数组与原始数组进行合并,然后提交 | |||||
arr.push(item); | arr.push(item); | ||||
let idx=this.originalList.findIndex(item1=>item1==item.id) | |||||
// console.log(idx,'下标') | |||||
if(idx!=-1){ | |||||
this.originalList.splice(idx,1) | |||||
} | |||||
// console.log(this.originalList,'处理后的数据2') | |||||
// console.log(item,'数组项'); | |||||
} | } | ||||
}); | }); | ||||
// 数据处理,首先需要知道当前用户的楼盘数量,然后对数据进行操作 | |||||
// 生成一个数组来存储所有选中的楼盘数,同时去除当前页面的内容,当点击确认的时候没丢数据进行去重,点击下一页的同时将当前页的选中项放入原始数组 | |||||
// console.log(arr,'123'); | // console.log(arr,'123'); | ||||
if (arr.length != 0 && this.bindFlag == 0) { | if (arr.length != 0 && this.bindFlag == 0) { | ||||
setTimeout(() => { | setTimeout(() => { | ||||
@@ -2136,6 +2160,9 @@ export default { | |||||
handleCurrentChange1(val) { | handleCurrentChange1(val) { | ||||
console.log(`当前页: ${val}`); | console.log(`当前页: ${val}`); | ||||
this.page1.current = val; | this.page1.current = val; | ||||
// 将当前页面选中的数据重新赋值给原始数组 | |||||
this.originalList.push(...this.checkHouse) | |||||
// console.log(this.originalList,'处理过的数据1') | |||||
this.gethouseList(); | this.gethouseList(); | ||||
}, | }, | ||||
roleChange(e = "") { | roleChange(e = "") { | ||||
@@ -3,9 +3,9 @@ | |||||
* https://cli.vuejs.org/zh/config/ | * https://cli.vuejs.org/zh/config/ | ||||
*/ | */ | ||||
// const url = 'http://pigx-gateway' | // const url = 'http://pigx-gateway' | ||||
const url = 'http://39.97.167.65:9999' //测试 | |||||
// const url = 'http://39.97.167.65:9999' //测试 | |||||
// const url = 'http://192.168.31.169:9999' //长龙 | // const url = 'http://192.168.31.169:9999' //长龙 | ||||
// const url = 'http://192.168.31.134:9999' //嘉豪 | |||||
const url = 'http://192.168.31.134:9999' //嘉豪 | |||||
// const url = 'http://192.168.31.100:9999' //王笑 | // const url = 'http://192.168.31.100:9999' //王笑 | ||||
// const url = 'http://nitu5e.natappfree.cc' //王笑 | // const url = 'http://nitu5e.natappfree.cc' //王笑 | ||||