123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416 |
- <template>
- <view>
- <image src="https://cczdsz.cn/app/images//background.png" mode="" class="background"></image>
- <view class="" style="padding-top: 0rpx;">
- <!-- <back></back> -->
- </view>
- <view >
- <u-grid :col="3" style="font-size: 12px;">
- <u-grid-item @click="getProjectList(index1)" v-for="(item, index1) in viewList" :bg-color="index1==index ? '#6aabff':''" :index="index1">
- <image :src="item.src" mode="" style="height: 80rpx;width: 80rpx;"></image>
- <view class="grid-text">{{item.name}}</view>
- </u-grid-item>
- </u-grid>
- <view>
- <u-search placeholder="请输入搜索内容" v-model="value1" shape="square" :show-action="false" :action-style="{'font-size':'40rpx'}" @search="gethosList()"></u-search>
- </view>
- <view v-for="(item,index) in list" :key="index" >
- <view class="project-content" @click="gotoindex(item)">
- <view>
- <view class="font-forty-eight blue">
- 项目名称:{{item.name}}
- </view>
- <view class="font-forty-eight blue">
- 审核状态: {{item.processStatus == '0' ? '队长审批通过,处事未审批' : (item.processStatus == '1' ? '通过' : (item.processStatus == '2' ? '不通过' : '未审批' ) ) }}
- </view>
- <view class="font-forty-eight blue">
- 项目时间:{{item.time || item.createTime}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import service from '@/api/index.js'
- export default {
- data() {
- return {
- list:[],
- value:'',
- value1:'',
- nameValue:'',
- civilPower:'',
- userId:'',
- index:-1,
- ReachBottom:true,
- page:1,
- viewList:[{name:'抢险维修',src:'https://cczdsz.cn/app/images/qxwx.png'},{name:'调压箱管理',src:'https://cczdsz.cn/app/images/xxdy.png'},{name:'庭院网管',src:'https://cczdsz.cn/app/images/tywg.png'},{name:'路段巡查',src:'https://cczdsz.cn/app/images/luduan.png'},{name:'阀井巡查',src:'https://cczdsz.cn/app/images/fajing.png'},{name:'输配站',src:'https://cczdsz.cn/app/images/spzxc.png'},{name:'巡检车队',src:'https://cczdsz.cn/app/images/xjcd.png'},{name:'调压箱维护',src:'https://cczdsz.cn/app/images/xxdy.png'},{name:'非居民巡查',src:'https://cczdsz.cn/app/images/fjm.png'}]
- }
- },
- onLoad(e) {
- console.log(e)
- this.nameValue = e.nameValue
- //this.getProjectList();
- this.getUserName();
- uni.setNavigationBarTitle({
- title: '历史记录',
- });
- uni.setNavigationBarColor({
- frontColor: '#ffffff',
- backgroundColor: '#2d95f4',
- })
- },
- onTabItemTap(e)
- {
- console.log(e)
- uni.removeStorageSync('type')
- },
- onReachBottom(){
- console.log('触底')
- this.getReachBottom()
- },
- onPullDownRefresh()
- {
- console.log('下拉刷新')
- this.getvalueproject()
- },
- methods: {
- getReachBottom()
- {
- if (this.ReachBottom) {
- this.page+=1
- this.getvalueproject()
- }else
- {
- this.page=1
- this.ReachBottom=false
- }
- },
- gotoindex(item){
- console.log(item)
- if(this.index==1)
- {//调压箱
- console.log(item)
- uni.navigateTo({
- url: `/pages/noLogin/PressureRegulatingBox/PressureRegulatingBox?type=1&id=${item.id}`
- })
- }else if(this.index==2)
- {//庭院管理
- uni.navigateTo({
- url: `/pages/noLogin/CourtyardNetworkManagement/CourtyardNetworkManagement?type=1&id=${item.id}`
- })
- }else if(this.index==0)
- {//抢险维修
- uni.navigateTo({
- url: `/pages/noLogin/emergencyRepairOrder/emergencyRepairOrder?type=1&id=${item.id}`
- })
- }else if(this.index==3)
- {//路段
- console.log(item)
- let url1= `/pages/noLogin/roadSection/roadSection?type=1&id=${item.id}`
- uni.navigateTo({
- url: url1
- })
- }
- else if(this.index==4)
- {//警示桩
- console.log(item)
- let url1= `/pages/noLogin/valveWellInspection/valveWellInspection?type=1&id=${item.id}`
- uni.navigateTo({
- url: url1
- })
- }else if(this.index==5)
- {//输配
- console.log(item)
- let url1= `/pages/noLogin/LNGStation/LNGStation?type=1&id=${item.id}`
- uni.navigateTo({
- url: url1
- })
- }
- else if(this.index==6)
- {//输配
- console.log(item)
- let url1= `/pages/noLogin/patrolFleet/patrolFleet?type=1&id=${item.id}&name=${item.name}`
- uni.navigateTo({
- url: url1
- })
- }
- else if(this.index==7)
- {//输配
- console.log(item)
- let url1= `/pages/noLogin/GRegulatingBoxMaintenance/GRegulatingBoxMaintenance?type=1&id=${item.id}`
- uni.navigateTo({
- url: url1
- })
- }
- else if(this.index==8)
- {//非居民
- console.log(item)
-
- let url1= `/pages/noLogin/PipelineGasUser/PipelineGasUser?type=1&id=${item.id}`
- uni.navigateTo({
- url: url1
- })
- }
- // uni.switchTab({
- // url:'/pages/index/index'
- // })
- },
- topage(url){
- uni.navigateTo({
- url
- })
- },
- getvalueproject()
- {
- service.getSearch({type:this.index,userId:this.userId,page:this.page,size:10,value:this.value1}).then(res=>{
- console.log('getProjectType', res)
- if(null==res){
- //this.$UTILS.showPrompt('暂无历史记录!')
- return
- }
- let list1=[]
- list1=res
- this.list.push(...list1)
- // list1.forEach(item=>{
- // this.list.push(item)
- // })
- //this.list = res;
- })
- },
- gethosList()
- {
- service.getSearch({type:this.index,userId:this.userId,page:this.page,size:10,value:this.value1}).then(res=>{
- console.log('getProjectType', res)
- if(res.length == 0){
- this.list=[]
- this.$UTILS.showPrompt('暂无历史记录!')
- return
- }
- let list1=[]
- list1=res
- list1.forEach(item=>{
- this.list.push(item)
- })
- this.list = res;
- })
- },
- getProjectList(val) {
- this.page=1
- this.value1=''
- this.ReachBottom=true
- console.log(val,'11111111')
- if(val==this.index)
- {
- this.index=-1
- return
- }
- this.index=val
- this.list=[]
- if(val==3)
- {
- service.getroadSectionInspectionList({discoverProblems:this.value1,userId:this.userId,createBy:this.userId}).then(res=>{
- console.log('getProjectType', res)
- if(res.length == 0){
- this.$UTILS.showPrompt('暂无历史记录!')
- return
- }
- let list1=[]
- list1=res
- list1.forEach(item=>{
- item.type=3
- item.name=item.sectionName
- item.time=item.findTime
- this.list.push(item)
- })
- })
- }else if(val==4)
- {
- service.getvalveWellPositionList({discoverProblems:this.value1,userId:this.userId,createBy:this.userId,pageNum:this.page,pageSize:10}).then(res=>{
- console.log('getProjectType', res)
- if(res.length == 0){
- this.$UTILS.showPrompt('暂无历史记录!')
- return
- }
- let list1=[]
- list1=res
- list1.forEach(item=>{
- item.type=4
- item.name=item.valveWellName
- item.time=item.createTime
- this.list.push(item)
- })
-
- })
- }
- else if(val==5)
- {
- service.gettransmissionStationList({name:this.value1,userId:this.userId,createBy:this.userId}).then(res=>{
- console.log('getProjectType', res)
- if(res.length == 0){
- this.$UTILS.showPrompt('暂无历史记录!')
- return
- }
- let list1=[]
- list1=res.rows
- list1.forEach(item=>{
- item.type=5
- item.name=item.name
- item.time=item.createTime
- this.list.push(item)
- })
- })
- }else if(val==6)
- {
-
- service.getpatrolTeamList({name:this.value1,userId:this.userId,createBy:this.userId}).then(res=>{
- console.log('getProjectType', res)
- if(res.length == 0){
- this.$UTILS.showPrompt('暂无历史记录!')
- return
- }
- let list1=[]
- list1=res.rows
- service.getDictInfoList({
- type: ['team']
- }).then(res2 => {
- let teamName=[]
- teamName=res2.team
- list1.forEach(item=>{
- item.type=6
- item.name=teamName.filter(item2=>item2.dictValue==item.team)[0].dictLabel
- item.time=item.createTime
- this.list.push(item)
- })
- })
- })
- }
- else if(val==7)
- {
- service.getregulatingBoxMaintenanceList({name:this.value1,userId:this.userId,createBy:this.userId}).then(res=>{
- console.log('getProjectType', res)
- if(res.length == 0){
- this.$UTILS.showPrompt('暂无历史记录!')
- return
- }
- let list1=[]
- list1=res.rows
- list1.forEach(item=>{
- item.type=7
- item.name=item.name
- item.time=item.createTime
- this.list.push(item)
- })
- })
- }
- else if(val==8)
- {
- service.getpipelineGasUserList({name:this.value1,userId:this.userId,createBy:this.userId}).then(res=>{
- console.log('getProjectType', res)
- if(res.length == 0){
- this.$UTILS.showPrompt('暂无历史记录!')
- return
- }
- let list1=[]
- list1=res.rows
- list1.forEach(item=>{
- item.type=8
- item.name=item.userName
- item.time=item.securityCheckTime
- this.list.push(item)
- })
- })
-
- }
- else
- {
- service.getSearch({type:val,userId:this.userId,page:this.page,size:10,value:this.value1}).then(res=>{
- console.log('getProjectType', res)
- if(res.length == 0){
- this.$UTILS.showPrompt('暂无历史记录!')
- return
- }
- 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(){
- service.getUserName().then(res=>{
- this.userId=res.id
- this.civilPower = res.civilPower;
- })
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .background {
- z-index: -1;
- position: fixed;
- width: 100%;
- height: 100%;
- background-size: 100% 100%;
- }
- .project {
- border-radius: 72rpx;
- padding: 25rpx 0;
- text-align: center;
- margin: 170rpx 55rpx 0;
- }
- .project-content {
- border: 4rpx solid #3857F3;
- margin: 40rpx 55rpx 0;
- padding: 30rpx 20rpx;
- border-radius: 48rpx;
- }
- .position{
- position: absolute;
- bottom: 100rpx;
- right: 50rpx;
- .arrow{
- width: 152rpx;
- height: 152rpx;
- border-radius: 50%;
- padding: 25rpx;
- margin-left: 20rpx;
- }
- }
- </style>
|