|
@@ -9,63 +9,16 @@
|
|
<u-search placeholder="请输入搜索内容" v-model="nameValue" :action-style="{'font-size':'40rpx'}" @custom="getProjectList()"></u-search>
|
|
<u-search placeholder="请输入搜索内容" v-model="nameValue" :action-style="{'font-size':'40rpx'}" @custom="getProjectList()"></u-search>
|
|
</view>
|
|
</view>
|
|
<view v-for="(item,index) in list" :key="index" >
|
|
<view v-for="(item,index) in list" :key="index" >
|
|
- <view class="project-content" v-if="item.name == '灶管阀改造' && civilPower.includes('pu1')" @click="gotoindex()">
|
|
|
|
|
|
+ <view class="project-content" @click="gotoindex(item)">
|
|
<view>
|
|
<view>
|
|
<view class="font-forty-eight blue">
|
|
<view class="font-forty-eight blue">
|
|
- 项目名称:{{item.name}}
|
|
|
|
- </view>
|
|
|
|
- <view class="font-forty-eight blue">
|
|
|
|
- 项目地址:{{item.address}}
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="project-content" v-else-if="item.name == '安检' && civilPower.includes('pu2')" @click="topage(`/pages/noLogin/data?id=${item.id}&name=${item.name}&address=${item.address}`)">
|
|
|
|
- <view >
|
|
|
|
- <view class="font-forty-eight blue">
|
|
|
|
- 项目名称:{{item.name}}
|
|
|
|
- </view>
|
|
|
|
- <view class="font-forty-eight blue">
|
|
|
|
- 项目地址:{{item.address}}
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="project-content" v-else-if="item.name == '维修' && civilPower.includes('pu3')" @click="topage(`/pages/noLogin/data?id=${item.id}&name=${item.name}&address=${item.address}`)">
|
|
|
|
- <view >
|
|
|
|
- <view class="font-forty-eight blue">
|
|
|
|
- 项目名称:{{item.name}}
|
|
|
|
|
|
+ 项目类型:{{item.typeValue}}
|
|
</view>
|
|
</view>
|
|
<view class="font-forty-eight blue">
|
|
<view class="font-forty-eight blue">
|
|
- 项目地址:{{item.address}}
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="project-content" v-else-if="item.name == '开栓' && civilPower.includes('pu4')" @click="topage(`/pages/noLogin/data?id=${item.id}&name=${item.name}&address=${item.address}`)">
|
|
|
|
- <view >
|
|
|
|
- <view class="font-forty-eight blue">
|
|
|
|
项目名称:{{item.name}}
|
|
项目名称:{{item.name}}
|
|
</view>
|
|
</view>
|
|
- <view class="font-forty-eight blue">
|
|
|
|
- 项目地址:{{item.address}}
|
|
|
|
- </view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="project-content" v-else-if="
|
|
|
|
- item.name != '灶管阀改造' &&
|
|
|
|
- item.name != '安检' &&
|
|
|
|
- item.name != '维修' &&
|
|
|
|
- item.name != '开栓' &&
|
|
|
|
- civilPower.includes('pu5')"
|
|
|
|
- @click="topage(`/pages/noLogin/uploadProject?id=${item.id}&name=${item.name}&address=${item.address}`)">
|
|
|
|
- <view>
|
|
|
|
- <view class="font-forty-eight blue">
|
|
|
|
- 项目名称:{{item.name}}
|
|
|
|
- </view>
|
|
|
|
- <view class="font-forty-eight blue">
|
|
|
|
- 项目地址:{{item.address}}
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view v-else></view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -84,15 +37,40 @@
|
|
},
|
|
},
|
|
onLoad(e) {
|
|
onLoad(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
- this.value = e.value
|
|
|
|
|
|
+ this.nameValue = e.nameValue
|
|
this.getProjectList();
|
|
this.getProjectList();
|
|
this.getUserName();
|
|
this.getUserName();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- gotoindex(){
|
|
|
|
- uni.switchTab({
|
|
|
|
- url:'/pages/index/index'
|
|
|
|
- })
|
|
|
|
|
|
+ gotoindex(item){
|
|
|
|
+ console.log(item)
|
|
|
|
+ if(item.type==1)
|
|
|
|
+ {//调压箱
|
|
|
|
+ console.log(item)
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/noLogin/PressureRegulatingBox/PressureRegulatingBox?type=1&id=${item.id}`
|
|
|
|
+ })
|
|
|
|
+ }else if(item.type==2)
|
|
|
|
+ {//庭院管理
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement?type=1&id=${item.id}`
|
|
|
|
+ })
|
|
|
|
+ }else if(item.type==3)
|
|
|
|
+ {//抢险维修
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/noLogin/emergencyRepairOrder/emergencyRepairOrder?type=1&id=${item.id}`
|
|
|
|
+ })
|
|
|
|
+ }else if(item.type==4)
|
|
|
|
+ {//警示桩
|
|
|
|
+ console.log(item)
|
|
|
|
+ let url1= `/pages/noLogin/WarningPileForm/WarningPileForm?type=1&id=${item.id}`
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: url1
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ // uni.switchTab({
|
|
|
|
+ // url:'/pages/index/index'
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
topage(url){
|
|
topage(url){
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -100,12 +78,33 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getProjectList() {
|
|
getProjectList() {
|
|
- service.getProjectList({engineType:this.value,name:this.nameValue}).then(res=>{
|
|
|
|
|
|
+ service.getSearch({value:this.nameValue}).then(res=>{
|
|
console.log('getProjectType', res)
|
|
console.log('getProjectType', res)
|
|
if(res.length == 0){
|
|
if(res.length == 0){
|
|
- this.$UTILS.showPrompt('暂无项目!')
|
|
|
|
|
|
+ this.$UTILS.showPrompt('暂无历史记录!')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- this.list = res;
|
|
|
|
|
|
+ let list1=[]
|
|
|
|
+ list1=res
|
|
|
|
+ list1.forEach(item=>{
|
|
|
|
+ if(item.type==1)
|
|
|
|
+ {
|
|
|
|
+ item.typeValue='调压箱'
|
|
|
|
+ }else if(item.type==2)
|
|
|
|
+ {
|
|
|
|
+ item.typeValue='庭院管网'
|
|
|
|
+ }
|
|
|
|
+ else if(item.type==3)
|
|
|
|
+ {
|
|
|
|
+ item.typeValue='抢险维修'
|
|
|
|
+ }else if(item.type==4)
|
|
|
|
+ {
|
|
|
|
+ item.typeValue='警示桩'
|
|
|
|
+ }
|
|
|
|
+ this.list.push(item)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ //this.list = res;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getUserName(){
|
|
getUserName(){
|