123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- <template>
- <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
- <cus-header title='故障工单'></cus-header>
- <div class="status">
- <div class="pre" :class="{'active':sidx===0}" @tap="changeStatus('',0)">全部</div>
- <div class="pre" :class="{'active':sidx===1}" @tap="changeStatus(1,1)">待解决</div>
- <div class="pre" :class="{'active':sidx===2}" @tap="changeStatus(0,2)">已解决</div>
- </div>
- <div class="query">
- <div class="pre" @tap="selectQuery(1)">
- <span>{{typeText}}</span>
- <u-icon name="arrow-down-fill" color="#C0C4CC" size="20rpx"></u-icon>
- </div>
- <div class="pre" @tap="selectQuery(2)">
- <span>{{timeText}}</span>
- <u-icon name="arrow-down-fill" color="#C0C4CC" size="20rpx"></u-icon>
- </div>
- <div class="pre" @tap="selectQuery(3)">
- <span>{{placeText}}</span>
- <u-icon name="arrow-down-fill" color="#C0C4CC" size="20rpx"></u-icon>
- </div>
- </div>
- <div class="boxs" v-if="list.length">
- <div class="item" v-for="(item,index) in [1,2]" :key="index">
- <div class="left">
- <div class="name">长鑫科技集团股份有限公司</div>
- <p>故障类型<span>{{'类型1'}}</span></p>
- <p>故障描述<span>{{'巡检任务'}}</span></p>
- <p>故障时间<span>{{'2025-03-28 13:00'}}</span></p>
- </div>
- <div class="right">
- <div class="top" :class="{'djj':index===0,'yjj':index===1}">{{index===0?'待解决':'已解决'}}</div>
- <div class="bottom" @tap="toDetail(item)">查看</div>
- </div>
- </div>
- </div>
- <template v-else>
- <page-empty :height="'calc(100vh - 140px)'"></page-empty>
- </template>
- <u-picker :itemHeight="88" :show="show1" :columns="columns1" keyName="label" title="故障类型"
- @cancel="show1=false" @confirm="e=>confirm(e,1)" :immediateChange="true"></u-picker>
- <u-datetime-picker :itemHeight="88" :show="show2" v-model="queryParams.month" mode="year-month" title="巡检时间"
- @cancel="show2=false" @confirm="e=>confirm(e,2)" :immediateChange="true" :minDate="minDate" :maxDate="maxDate"></u-datetime-picker>
- <u-picker :itemHeight="88" :show="show3" :columns="columns3" keyName="label" title="巡检地点"
- @cancel="show3=false" @confirm="e=>confirm(e,3)" :immediateChange="true"></u-picker>
- </view>
- </template>
- <script>
- import pageEmpty from '@/components/pageEmpty/index.vue'
- export default {
- components:{
- pageEmpty
- },
- data(){
- return {
- sidx:0,
- typeText:'故障类型',
- timeText:'巡检时间',
- placeText:'巡检地点',
- queryParams:{
- type:'',
- month:'',
- place:'',
- status:''
- },
- show1:false,
- show2:false,
- show3:false,
- columns1:[[
- {value:0,label:'类型1'},
- {value:1,label:'类型2'}
- ]],
- columns3:[[
- {value:1,label:'长鑫科技集团股份有限公司'},
- {value:2,label:'峻凌电子(合肥)有限公司'}
- ]],
- minDate:'',
- maxDate:'',
- page:1,
- limit:10,
- isOver:false,
- list:[]
- }
- },
- onReachBottom() {
- if(this.isOver) return
- this.getList();
- },
- onLoad() {
- let d = new Date();
- this.minDate = new Date(d.getFullYear()-3,d.getMonth()+1,d.getDate()).getTime();
- this.maxDate = new Date().getTime();
- this.getList();
- },
- methods:{
- changeStatus(status,idx){
- this.queryParams.status = status;
- this.sidx = idx;
- this.getList();
- },
- getList(){
- this.list = [1,2]
- },
- selectQuery(type){
- if(type==1) this.show1 = true;
- else if(type==2) this.show2 = true;
- else if(type==3) this.show3 = true;
- },
- toDetail(item){
- uni.navigateTo({
- url:'/pagesOperation/workorder/detail?id='+item?.id
- })
- },
- confirm(e,type){
- if(type==1){
- this.typeText = e.value[0].label;
- this.queryParams.type = e.value[0].value;
- this.show1 = false;
- }else if(type==2){
- this.timeText = new Date(e.value).Format('yyyy-MM');
- this.queryParams.month = new Date(e.value).Format('yyyy-MM');
- this.show2 = false;
- }else if(type==3){
- this.placeText = e.value[0].label;
- this.queryParams.place = e.value[0].value;
- this.show3 = false;
- }
- }
- }
- }
- </script>
- <style scoped lang="less">
- .page{
- padding-bottom: 40rpx;
- background: #F4F8FB;
-
- .status{
- width: 100%;
- height: 90rpx;
- background: #FFFFFF;
- box-shadow: inset 0rpx -1rpx 0rpx 0rpx #ECEEF5;
- display: flex;
- .pre{
- width: calc(100% / 3);
- height: 90rpx;
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 30rpx;
- color: #1D2129;
- line-height: 90rpx;
- text-align: center;
- position: relative;
- &.active{
- font-weight: bold;
- font-size: 32rpx;
- color: #2E69EB;
- &::after{
- content: '';
- width: 59rpx;
- height: 5rpx;
- background: #2E69EB;
- position: absolute;
- bottom: 0;
- left: 50%;
- margin-left: -30rpx;
- }
- }
- }
- }
-
- .query{
- width: 100%;
- height: 88rpx;
- background: #FFFFFF;
- display: flex;
- .pre{
- width: calc(100% / 3);
- height: 88rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- span{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 26rpx;
- color: #86909C;
- line-height: 26rpx;
- margin-right: 12rpx;
- }
- }
- }
-
- .boxs{
- padding: 0 24rpx;
- margin-top: 20rpx;
- .item{
- background: #FFFFFF;
- box-shadow: inset 0rpx -1rpx 0rpx 0rpx #ECEEF5;
- padding: 36rpx 27rpx;
- display: flex;
- .left{
- width: calc(100% - 115rpx);
- padding-right: 20rpx;
- box-sizing: border-box;
- .name{
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 30rpx;
- color: #1D2129;
- line-height: 42rpx;
- text-align: left;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- p{
- margin-top: 36rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 26rpx;
- color: #86909C;
- line-height: 26rpx;
- span{
- color: #1D2129;
- margin-left: 64rpx;
- }
- }
- }
- .right{
- width: 115rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .top{
- width: 104rpx;
- height: 48rpx;
- border-radius: 6rpx;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 26rpx;
- line-height: 48rpx;
- text-align: center;
- &.djj{
- color: #FEA400;
- background: rgba(254,164,0,0.08);
- }
- &.yjj{
- color: #05C17F;
- background: rgba(20,204,140,0.08);
- }
- }
- .bottom{
- width: 115rpx;
- height: 64rpx;
- background: #2E69EB;
- border-radius: 16rpx;
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 28rpx;
- color: #FFFFFF;
- line-height: 64rpx;
- text-align: center;
- }
- }
- }
- }
-
- }
- </style>
|