|
|
|
|
@ -8,40 +8,41 @@
|
|
|
|
|
:action-style="{color: '#fff'}">
|
|
|
|
|
</u-search>
|
|
|
|
|
</view>
|
|
|
|
|
<u-dropdown ref="uDropdown" :close-on-click-mask="mask">
|
|
|
|
|
<u-dropdown-item title="问题类型">
|
|
|
|
|
<view class="slot-content">
|
|
|
|
|
<view class="item-box">
|
|
|
|
|
<view class="item" :class="[item.active ? 'active' : '']" @tap="tagClick(index)"
|
|
|
|
|
v-for="(item, index) in options1" :key="index">
|
|
|
|
|
{{item.label}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-button type="primary" @click="tosearch">确定</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</u-dropdown-item>
|
|
|
|
|
<u-dropdown-item v-model="value3" :title="value3==''?'工单状态':value3" @change="toChangeStatus()"
|
|
|
|
|
:options="options3">
|
|
|
|
|
</u-dropdown-item>
|
|
|
|
|
</u-dropdown>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="list" style="padding-top: 188rpx;">
|
|
|
|
|
<view class="list" style="padding-top: 100rpx;">
|
|
|
|
|
<u-dropdown ref="uDropdown" @open="openmask" @close="closemask" :class="mask?'':'overflowmask'" >
|
|
|
|
|
<u-dropdown-item title="问题类型">
|
|
|
|
|
<view class="slot-content">
|
|
|
|
|
<view class="item-box">
|
|
|
|
|
<view class="item" :class="[item.active ? 'active' : '']" @tap="tagClick(index)"
|
|
|
|
|
v-for="(item, index) in options1" :key="index">
|
|
|
|
|
{{item.label}}
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-button type="primary" @click="tosearch">确定</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</u-dropdown-item>
|
|
|
|
|
<u-dropdown-item v-model="value3" :title="value3==''?'工单状态':value3" @change="toChangeStatus()"
|
|
|
|
|
:options="options3">
|
|
|
|
|
</u-dropdown-item>
|
|
|
|
|
</u-dropdown>
|
|
|
|
|
<block v-for="(item, index) in dataList">
|
|
|
|
|
<u-card :title="item.created_at" @click="todetail(item.id)" padding="20" margin="20rpx" :border="true"
|
|
|
|
|
:sub-title="item.created_at" :thumb="thumb" thumb-width="36">
|
|
|
|
|
<view class="" slot="body">
|
|
|
|
|
<u-card :title="item.created_at" padding="20" margin="20rpx" :border="true"
|
|
|
|
|
:sub-title="item.statusName" :thumb="thumb" thumb-width="36">
|
|
|
|
|
<view class="" slot="body" @click="todetail(item.id)">
|
|
|
|
|
<u-row gutter="16">
|
|
|
|
|
<u-col span="3">
|
|
|
|
|
<view class="demo-layout bg-purple">问题类别:</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="3">
|
|
|
|
|
<view class="demo-layout bg-purple-light">{{item.feedback_department.name}}</view>
|
|
|
|
|
<view class="demo-layout bg-purple-light">{{item.ask_type_detail.value}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="3">
|
|
|
|
|
<view class="demo-layout bg-purple">问题内容:</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="3">
|
|
|
|
|
<view class="demo-layout bg-purple-light">{{item.created_at}}</view>
|
|
|
|
|
<view class="demo-layout bg-purple-light">{{item.ask_content_detail.value}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
<u-row gutter="16">
|
|
|
|
|
@ -51,38 +52,38 @@
|
|
|
|
|
<u-col span="3">
|
|
|
|
|
<view class="demo-layout bg-purple-light">{{item.feedback_department.name}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="3">
|
|
|
|
|
<!-- <u-col span="3">
|
|
|
|
|
<view class="demo-layout bg-purple">提交日期:</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="3">
|
|
|
|
|
<view class="demo-layout bg-purple-light">{{item.created_at}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-col> -->
|
|
|
|
|
</u-row>
|
|
|
|
|
<u-row gutter="16">
|
|
|
|
|
<u-col span="3">
|
|
|
|
|
<view class="demo-layout bg-purple">描述:</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="9">
|
|
|
|
|
<u-col span="12">
|
|
|
|
|
<view class="demo-layout bg-purple-light">{{item.content}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="footer" slot="foot">
|
|
|
|
|
<block >
|
|
|
|
|
<u-button type="primary" size="mini"
|
|
|
|
|
@click="toOperate(item.id)" :ripple="true">工单处理
|
|
|
|
|
</u-button>
|
|
|
|
|
</block>
|
|
|
|
|
<block >
|
|
|
|
|
<u-button type="primary" size="mini" @click="toAssin(item.id)"
|
|
|
|
|
:custom-style="customStyle" :ripple="true">工单分配
|
|
|
|
|
</u-button>
|
|
|
|
|
</block>
|
|
|
|
|
<view class="footer" slot="foot">
|
|
|
|
|
<block >
|
|
|
|
|
<u-button :custom-style="editStyle" type="primary" size="medium"
|
|
|
|
|
@click="toedit(item.id)" :ripple="true">编辑
|
|
|
|
|
</u-button>
|
|
|
|
|
</block>
|
|
|
|
|
<block >
|
|
|
|
|
<u-button type="error" size="medium" @click="del(item.id)"
|
|
|
|
|
:custom-style="customStyle" :ripple="true">删除
|
|
|
|
|
</u-button>
|
|
|
|
|
</block>
|
|
|
|
|
</view>
|
|
|
|
|
</u-card>
|
|
|
|
|
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
<u-loadmore class="loadmore" :status="loadStatus" :load-text="loadText"/>
|
|
|
|
|
<u-empty text="暂无数据" margin-top="200" v-if="dataList.length==0" mode="list"></u-empty>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -97,12 +98,22 @@
|
|
|
|
|
background: {
|
|
|
|
|
backgroundColor: '#007AFF'
|
|
|
|
|
},
|
|
|
|
|
mask: true,
|
|
|
|
|
mask: false,
|
|
|
|
|
loadStatus:"loadmore",
|
|
|
|
|
loadText:{
|
|
|
|
|
loadmore:"加载更多",
|
|
|
|
|
nomore:"已经到底了"
|
|
|
|
|
},
|
|
|
|
|
dataList: [],
|
|
|
|
|
thumb: "/static/img/location.png",
|
|
|
|
|
currentPage: 0,
|
|
|
|
|
customStyle: {
|
|
|
|
|
marginLeft: '20px'
|
|
|
|
|
currentPage: 0,
|
|
|
|
|
lastPage:0,
|
|
|
|
|
editStyle:{
|
|
|
|
|
fontSize:'30rpx'
|
|
|
|
|
},
|
|
|
|
|
customStyle: {
|
|
|
|
|
marginLeft: '20px',
|
|
|
|
|
fontSize:'30rpx'
|
|
|
|
|
},
|
|
|
|
|
currentRole: "inspector", //前端用户角色:inspector巡查员,manager管理员,operator现场处置人员
|
|
|
|
|
value1Arr: [],
|
|
|
|
|
@ -135,6 +146,10 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onReachBottom: function(e) {
|
|
|
|
|
if(this.currentPage>=this.lastPage){
|
|
|
|
|
this.loadStatus = "nomore"
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.loadPage(this.currentPage + 1);
|
|
|
|
|
},
|
|
|
|
|
onPullDownRefresh: function(e) {
|
|
|
|
|
@ -146,7 +161,15 @@
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
this.loadPage(1);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
methods: {
|
|
|
|
|
openmask(){
|
|
|
|
|
this.mask=true
|
|
|
|
|
// this.isPullDown(false);
|
|
|
|
|
},
|
|
|
|
|
closemask(){
|
|
|
|
|
this.mask=false
|
|
|
|
|
// this.isPullDown(true);
|
|
|
|
|
},
|
|
|
|
|
toChangeStatus: function(value) {
|
|
|
|
|
var jsonSearch = this.options3.filter(function(e) {
|
|
|
|
|
return e.value == value;
|
|
|
|
|
@ -169,46 +192,19 @@
|
|
|
|
|
tagClick(index) {
|
|
|
|
|
this.options1[index].active = !this.options1[index].active;
|
|
|
|
|
},
|
|
|
|
|
loadAreaList: function() {
|
|
|
|
|
var that = this;
|
|
|
|
|
that.options1 = [];
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: 'worker/get-zones',
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
for (var m of res) {
|
|
|
|
|
that.options1.push({
|
|
|
|
|
label: m.name,
|
|
|
|
|
value: m.id,
|
|
|
|
|
active: false
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
console.log(res)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
toAssin: function(id) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "../assign/assign?id=" + id
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
toOperate: function(id) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "../operate/operate?id=" + id
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
add: function() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "../addPatrol/addPatrol"
|
|
|
|
|
})
|
|
|
|
|
toedit(id){
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url:"../generalPatrol/generalPatrol?id="+id
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
todetail: function(id) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "../patrolInfo/info?id=" + id
|
|
|
|
|
url: "../generalPatrol/viewPatrol?id=" + id
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
loadPage: function(page) {
|
|
|
|
|
uni.hideKeyboard()
|
|
|
|
|
var that = this;
|
|
|
|
|
@ -218,16 +214,20 @@
|
|
|
|
|
customLoading: false,
|
|
|
|
|
data: {
|
|
|
|
|
page: page,
|
|
|
|
|
page_size: 5,
|
|
|
|
|
page_size: 4,
|
|
|
|
|
keyword: that.keyword
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(r) {
|
|
|
|
|
var res = r.data;
|
|
|
|
|
that.lastPage = r.last_page;
|
|
|
|
|
uni.stopPullDownRefresh(); // 服务器总条数 < 每页条数, 会将第一页的条数重新返回
|
|
|
|
|
|
|
|
|
|
var hasNoMore = that.dataList.length < 5 && page > 1;
|
|
|
|
|
if(r.total<5){
|
|
|
|
|
that.loadStatus = "nomore";
|
|
|
|
|
}
|
|
|
|
|
var hasNoMore = that.dataList.length < 4 && page > 1;
|
|
|
|
|
if (hasNoMore || res.length == 0 && page > 1) {
|
|
|
|
|
// 已加载到最后一页
|
|
|
|
|
// 已加载到最后一页
|
|
|
|
|
that.loadStatus = "nomore";
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '已加载到最后一页',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
@ -243,7 +243,25 @@
|
|
|
|
|
dataList.push(...res);
|
|
|
|
|
}
|
|
|
|
|
for (var m of dataList) {
|
|
|
|
|
m.created_at = m.created_at.split("T")[0]
|
|
|
|
|
m.created_at = m.created_at.split("T")[0]
|
|
|
|
|
switch(m.status){
|
|
|
|
|
case 1:
|
|
|
|
|
m.statusName = "已提交"
|
|
|
|
|
break
|
|
|
|
|
case 2:
|
|
|
|
|
m.statusName = "已复核"
|
|
|
|
|
break
|
|
|
|
|
case 3:
|
|
|
|
|
m.statusName = "已处理"
|
|
|
|
|
break
|
|
|
|
|
case 4:
|
|
|
|
|
m.statusName = "已办结"
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(dataList)
|
|
|
|
|
|
|
|
|
|
@ -261,6 +279,44 @@
|
|
|
|
|
this.util.alert(res);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
del(id){
|
|
|
|
|
var that = this;
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '是否确定删除?',
|
|
|
|
|
success(res) {
|
|
|
|
|
if(res.confirm){
|
|
|
|
|
that.util.request({
|
|
|
|
|
api: '/api/mobile/common-inspection/destroy',
|
|
|
|
|
customLoading: false,
|
|
|
|
|
method:"get",
|
|
|
|
|
data: {
|
|
|
|
|
id:id
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(r) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: "提交成功",
|
|
|
|
|
complete() {
|
|
|
|
|
that.loadPage(1)
|
|
|
|
|
},
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
utilFail:function(r) {
|
|
|
|
|
this.util.alert(res);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}else if(res.cancel){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -301,6 +357,12 @@
|
|
|
|
|
.search-wrap {
|
|
|
|
|
background: #007AFF;
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
.overflowmask{
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
.loadmore{
|
|
|
|
|
padding:24rpx!important
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.u-config-wrap {
|
|
|
|
|
|