通用巡查

master
lion 4 years ago
parent 8a0d748efe
commit 1d715a2fa6

@ -2,6 +2,10 @@
// launchtypelocalremote, localremote // launchtypelocalremote, localremote
"version": "0.0", "version": "0.0",
"configurations": [{ "configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" : "default" :
{ {
"launchtype" : "local" "launchtype" : "local"

@ -27,3 +27,6 @@ import uView from "uview-ui";
Vue.use(uView); Vue.use(uView);
import util from "@/utils/util"; import util from "@/utils/util";
Vue.prototype.util = util; Vue.prototype.util = util;
import {VueJsonp} from 'vue-jsonp' //中间有忘记大括号出现install undefind问题
Vue.use(VueJsonp)

@ -1,5 +1,6 @@
{ {
"dependencies": { "dependencies": {
"uview-ui": "^1.8.4" "uview-ui": "^1.8.4",
"vue-jsonp": "^2.0.0"
} }
} }

@ -8,40 +8,41 @@
:action-style="{color: '#fff'}"> :action-style="{color: '#fff'}">
</u-search> </u-search>
</view> </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>
<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"> <block v-for="(item, index) in dataList">
<u-card :title="item.created_at" @click="todetail(item.id)" padding="20" margin="20rpx" :border="true" <u-card :title="item.created_at" padding="20" margin="20rpx" :border="true"
:sub-title="item.created_at" :thumb="thumb" thumb-width="36"> :sub-title="item.statusName" :thumb="thumb" thumb-width="36">
<view class="" slot="body"> <view class="" slot="body" @click="todetail(item.id)">
<u-row gutter="16"> <u-row gutter="16">
<u-col span="3"> <u-col span="3">
<view class="demo-layout bg-purple">问题类别</view> <view class="demo-layout bg-purple">问题类别</view>
</u-col> </u-col>
<u-col span="3"> <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>
<u-col span="3"> <u-col span="3">
<view class="demo-layout bg-purple">问题内容</view> <view class="demo-layout bg-purple">问题内容</view>
</u-col> </u-col>
<u-col span="3"> <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-col>
</u-row> </u-row>
<u-row gutter="16"> <u-row gutter="16">
@ -51,38 +52,38 @@
<u-col span="3"> <u-col span="3">
<view class="demo-layout bg-purple-light">{{item.feedback_department.name}}</view> <view class="demo-layout bg-purple-light">{{item.feedback_department.name}}</view>
</u-col> </u-col>
<u-col span="3"> <!-- <u-col span="3">
<view class="demo-layout bg-purple">提交日期</view> <view class="demo-layout bg-purple">提交日期</view>
</u-col> </u-col>
<u-col span="3"> <u-col span="3">
<view class="demo-layout bg-purple-light">{{item.created_at}}</view> <view class="demo-layout bg-purple-light">{{item.created_at}}</view>
</u-col> </u-col> -->
</u-row> </u-row>
<u-row gutter="16"> <u-row gutter="16">
<u-col span="3"> <u-col span="3">
<view class="demo-layout bg-purple">描述</view> <view class="demo-layout bg-purple">描述</view>
</u-col> </u-col>
<u-col span="9"> <u-col span="12">
<view class="demo-layout bg-purple-light">{{item.content}}</view> <view class="demo-layout bg-purple-light">{{item.content}}</view>
</u-col> </u-col>
</u-row> </u-row>
</view> </view>
<view class="footer" slot="foot"> <view class="footer" slot="foot">
<block > <block >
<u-button type="primary" size="mini" <u-button :custom-style="editStyle" type="primary" size="medium"
@click="toOperate(item.id)" :ripple="true">工单处理 @click="toedit(item.id)" :ripple="true">编辑
</u-button> </u-button>
</block> </block>
<block > <block >
<u-button type="primary" size="mini" @click="toAssin(item.id)" <u-button type="error" size="medium" @click="del(item.id)"
:custom-style="customStyle" :ripple="true">工单分配 :custom-style="customStyle" :ripple="true">删除
</u-button> </u-button>
</block> </block>
</view> </view>
</u-card> </u-card>
</block> </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> <u-empty text="暂无数据" margin-top="200" v-if="dataList.length==0" mode="list"></u-empty>
</view> </view>
</view> </view>
@ -97,12 +98,22 @@
background: { background: {
backgroundColor: '#007AFF' backgroundColor: '#007AFF'
}, },
mask: true, mask: false,
loadStatus:"loadmore",
loadText:{
loadmore:"加载更多",
nomore:"已经到底了"
},
dataList: [], dataList: [],
thumb: "/static/img/location.png", thumb: "/static/img/location.png",
currentPage: 0, currentPage: 0,
customStyle: { lastPage:0,
marginLeft: '20px' editStyle:{
fontSize:'30rpx'
},
customStyle: {
marginLeft: '20px',
fontSize:'30rpx'
}, },
currentRole: "inspector", //inspectormanageroperator currentRole: "inspector", //inspectormanageroperator
value1Arr: [], value1Arr: [],
@ -135,6 +146,10 @@
} }
}, },
onReachBottom: function(e) { onReachBottom: function(e) {
if(this.currentPage>=this.lastPage){
this.loadStatus = "nomore"
return;
}
this.loadPage(this.currentPage + 1); this.loadPage(this.currentPage + 1);
}, },
onPullDownRefresh: function(e) { onPullDownRefresh: function(e) {
@ -146,7 +161,15 @@
onLoad(options) { onLoad(options) {
this.loadPage(1); this.loadPage(1);
}, },
methods: { methods: {
openmask(){
this.mask=true
// this.isPullDown(false);
},
closemask(){
this.mask=false
// this.isPullDown(true);
},
toChangeStatus: function(value) { toChangeStatus: function(value) {
var jsonSearch = this.options3.filter(function(e) { var jsonSearch = this.options3.filter(function(e) {
return e.value == value; return e.value == value;
@ -169,46 +192,19 @@
tagClick(index) { tagClick(index) {
this.options1[index].active = !this.options1[index].active; 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) { toedit(id){
uni.navigateTo({ uni.navigateTo({
url: "../assign/assign?id=" + id url:"../generalPatrol/generalPatrol?id="+id
}) })
},
toOperate: function(id) {
uni.navigateTo({
url: "../operate/operate?id=" + id
})
},
add: function() {
uni.navigateTo({
url: "../addPatrol/addPatrol"
})
}, },
todetail: function(id) { todetail: function(id) {
uni.navigateTo({ uni.navigateTo({
url: "../patrolInfo/info?id=" + id url: "../generalPatrol/viewPatrol?id=" + id
}) })
}, },
loadPage: function(page) { loadPage: function(page) {
uni.hideKeyboard() uni.hideKeyboard()
var that = this; var that = this;
@ -218,16 +214,20 @@
customLoading: false, customLoading: false,
data: { data: {
page: page, page: page,
page_size: 5, page_size: 4,
keyword: that.keyword keyword: that.keyword
}, },
utilSuccess: function(r) { utilSuccess: function(r) {
var res = r.data; var res = r.data;
that.lastPage = r.last_page;
uni.stopPullDownRefresh(); // < , uni.stopPullDownRefresh(); // < ,
if(r.total<5){
var hasNoMore = that.dataList.length < 5 && page > 1; that.loadStatus = "nomore";
}
var hasNoMore = that.dataList.length < 4 && page > 1;
if (hasNoMore || res.length == 0 && page > 1) { if (hasNoMore || res.length == 0 && page > 1) {
// //
that.loadStatus = "nomore";
uni.showToast({ uni.showToast({
title: '已加载到最后一页', title: '已加载到最后一页',
icon: 'none' icon: 'none'
@ -243,7 +243,25 @@
dataList.push(...res); dataList.push(...res);
} }
for (var m of dataList) { 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) console.log(dataList)
@ -261,6 +279,44 @@
this.util.alert(res); 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 { .search-wrap {
background: #007AFF; background: #007AFF;
padding: 20rpx; padding: 20rpx;
}
.overflowmask{
overflow: hidden;
}
.loadmore{
padding:24rpx!important
} }
.u-config-wrap { .u-config-wrap {

@ -12,15 +12,15 @@
@confirm="confirmContent"></u-select> @confirm="confirmContent"></u-select>
</u-form-item> </u-form-item>
<u-form-item label="位置" label-position="top" required> <u-form-item label="位置" label-position="top" required>
<text>江苏省苏州市通园路66号</text> <u-input v-model="form.address" disabled type='text'/>
<u-button shape="square" slot='right' size="mini" @click="toshowMap" type="info">重新获取</u-button> <u-button shape="square" slot='right' size="mini" @click="chooseLocation" type="info">重新获取</u-button>
</u-form-item> </u-form-item>
<u-form-item label-position="top" label="描述" prop="content"> <u-form-item label-position="top" label="描述" prop="content">
<u-input v-model="form.content" type='textarea' height='100' :border="true" /> <u-input v-model="form.content" type='textarea' height='100' :border="true" />
</u-form-item> </u-form-item>
<u-form-item label-position="top" label="附件上传"> <u-form-item label-position="top" label="附件上传">
<u-upload ref="uUpload" multiple :maxCount="10" :action="action" upload-text="" <u-upload ref="uUpload" multiple :maxCount="10" :action="action" upload-text=""
:previewFullImage="true" :form-data="otherData" :show-tips="false" @on-uploaded="toupload" :previewFullImage="true" @on-progress="onprogress" @on-success="tosuccess" :file-list="filesList" :form-data="otherData" :show-tips="false" @on-uploaded="toupload"
@on-remove="toremove"> @on-remove="toremove">
</u-upload> </u-upload>
</u-form-item> </u-form-item>
@ -33,17 +33,6 @@
</u-form-item> </u-form-item>
</u-form> </u-form>
<u-button type="primary" @click="submit"></u-button> <u-button type="primary" @click="submit"></u-button>
<u-popup v-model="showMap" mode="center" closeable close-icon-color="#ffffff" border-radius="14">
<view>
<view class="popuptitle">选择位置</view>
<map :style="{width:width+'px',height:height+ 'px'}" :latitude="location.latitude"
:longitude="location.longitude" id="map">
</map>
<view>
<u-button type="primary" shape="square">确认选择</u-button>
</view>
</view>
</u-popup>
</view> </view>
</template> </template>
@ -55,14 +44,15 @@
token: "" token: ""
}, },
unitshow: false, unitshow: false,
showMap: false,
typeshow: false, typeshow: false,
contentshow: false, contentshow: false,
action: "", action: "",
location: {}, location: {},
plist: [], plist: [],
list: [], list: [],
listUnit: [], listUnit: [],
filesList:[],
infoId:"",
form: { form: {
unitName: "", unitName: "",
ask_type_id: "", ask_type_id: "",
@ -95,27 +85,36 @@
} }
} }
}, },
onLoad() { onLoad(options) {
var that = this; var that = this;
this.loadType({ this.loadType({
'number': "general_type", 'number': "general_type",
}, function(res) { }, function(res) {
that.plist = res; that.plist = res;
}); });
if(options.id){
this.infoId = options.id;
this.showInfo(this.infoId);
}
this.action = this.util.HOST + "/api/mobile/upload-file"; this.action = this.util.HOST + "/api/mobile/upload-file";
this.otherData.token = uni.getStorageSync("userInfo_token").access_token; this.otherData.token = uni.getStorageSync("userInfo_token").access_token;
this.loadUnit(); this.loadUnit();
}, },
onReady() { onReady() {
this.$refs.uForm.setRules(this.rules); this.$refs.uForm.setRules(this.rules);
this._mapContext = uni.createMapContext("map", this);
let that = this; let that = this;
uni.getLocation({ uni.getLocation({
type: "gcj02", type: "gcj02",
success(res) { success(res) {
that.location = res; that.location = res;
that.form.latitude = res.latitude; that.form.latitude = res.latitude;
that.form.longitude = res.longitude; that.form.longitude = res.longitude;
const url = "https://apis.map.qq.com/ws/geocoder/v1/?key=EUQBZ-MJALU-WZFVR-2HFNW-TIK2K-TNBJI&location="+res.latitude+","+res.longitude+"&output=jsonp"
that.$jsonp(
url
).then(re => {
that.form.address = re.result.formatted_addresses.recommend
})
} }
}) })
uni.getSystemInfo({ uni.getSystemInfo({
@ -126,26 +125,35 @@
}) })
}, },
methods: { methods: {
onprogress(res){
uni.showToast({
icon: "none",
title: "上传中",
duration: 2000
})
},
tosuccess(){
uni.showToast({
icon: "none",
title: "上传成功",
duration: 2000
})
},
toremove(index, lists, nam) { toremove(index, lists, nam) {
console.log(lists); console.log(lists);
let list = []; let list = [];
for (var m of lists) { this.filesList.splice(index,1)
list.push({
upload_id: m.response.id
})
}
this.form.files_list = list;
}, },
toupload(lists, name) { toupload(lists, name) {
console.log(lists) console.log(lists)
let list = []; let list = [];
for (var m of lists) { for (var m of lists) {
list.push({ if(m.response){
upload_id: m.response.id this.filesList.push(m)
}) }
} }
this.form.files_list = list; // this.form.files_list = list;
}, },
confirmUnit(e) { confirmUnit(e) {
var that = this; var that = this;
@ -177,34 +185,97 @@
} }
}); });
},
showInfo(id){
var that = this;
that.util.request({
api: '/api/mobile/common-inspection/show',
method: "get",
data: {
id:id
},
utilSuccess: function(result) {
that.form = result;
that.form.typeName = result.ask_type_detail.value;
that.form.contentName = result.ask_content_detail.value;
that.form.unitName = result.feedback_department.name
let _files = [];
for (var mod of result.common_inspection_files) {
let m = Object.assign({}, mod);
m.url = mod.files.url;
m.id = mod.files.id;
m.name = mod.files.original_name;
_files.push(m);
}
that.filesList = _files
// that.form.files_list = _upfiles;
},
utilFail: function(res) {
that.util.alert(res);
}
});
}, },
toshowMap() {
this.showMap = true;
this.addMaker();
},
submit() { submit() {
let that = this; let that = this;
let list = [];
for(var mod of that.filesList){
if( mod.response){
list.push({
upload_id: mod.response.id
})
}else{
list.push({
upload_id:mod.id
})
}
}
this.form.files_list = list
// console.log(that.form);
// return;
this.$refs.uForm.validate(valid => { this.$refs.uForm.validate(valid => {
if (valid) { if (valid) {
console.log('验证通过'); console.log('验证通过');
that.util.request({ if(that.infoId){
api: '/api/mobile/common-inspection/store', that.util.request({
method: "POST", api: '/api/mobile/common-inspection/save',
data: that.form, method: "POST",
utilSuccess: function(res) { data: that.form,
uni.showToast({ utilSuccess: function(res) {
icon: "none", uni.showToast({
title: "提交成功", icon: "none",
complete() { title: "提交成功",
that.afterSubmit(res); complete() {
}, that.afterSubmit(res);
duration: 2000 },
}) duration: 2000
}, })
utilFail: function(res) { },
this.util.alert(res); utilFail: function(res) {
} this.util.alert(res);
}); }
});
}else{
that.util.request({
api: '/api/mobile/common-inspection/store',
method: "POST",
data: that.form,
utilSuccess: function(res) {
uni.showToast({
icon: "none",
title: "提交成功",
complete() {
that.afterSubmit(res);
},
duration: 2000
})
},
utilFail: function(res) {
this.util.alert(res);
}
});
}
} else { } else {
console.log('验证失败'); console.log('验证失败');
} }
@ -222,41 +293,28 @@
this.loadType({ this.loadType({
pid: e[0].value pid: e[0].value
}, function(res) { }, function(res) {
that.list = res; that.list = res;
that.form.ask_content_id =""
that.form.contentName =""
}) })
}, },
confirmContent(e) { confirmContent(e) {
this.form.ask_content_id = e[0].value this.form.ask_content_id = e[0].value
this.form.contentName = e[0].label this.form.contentName = e[0].label
}, },
addMaker() {
let img = "../../../static/img/location.png" chooseLocation(e) { //
const marker = { var that = this;
id: 1, uni.chooseLocation({
iconPath: img, longitude : that.form.longitude,
width: 50, latitude : that.form.latitude,
height: 50, success: res => {
label: { that.form.address = res.name;
width: 50, that.form.longitude = res.longitude;
height: 30, that.form.latitude = res.latitude;
borderWidth: 1, }
borderRadius: 10, });
bgColor: '#ffffff' },
},
latitude: this.location.latitude,
longitude: this.location.longitude
};
this._mapContext.addMarkers({
marker,
clear: true,
complete(res) {
console.log('addMarkers', res)
},
fail(res) {
console.log('fail', res)
}
});
}
} }
} }

@ -1,8 +1,192 @@
<template> <template>
</template> <view class="boxContent">
<view class="box-header">
</view>
<view class="list" style="padding-top: 20rpx;">
<block>
<u-card :title="lists.created_at" padding="20" margin="20rpx" :border="true">
<view class="" slot="body" @click="todetail(lists.id)">
<u-row gutter="16">
<u-col span="3">
<view class="demo-layout bg-purple">问题类型</view>
</u-col>
<u-col span="9">
<view class="demo-layout bg-purple-light">{{lists.ask_type_detail.value}}</view>
</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">
<view class="demo-layout bg-purple-light">{{lists.ask_content_detail.value}}</view>
</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">
<view class="demo-layout bg-purple-light">{{lists.feedback_department.name}}</view>
</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">
<view class="demo-layout bg-purple-light">{{lists.address}}</view>
</u-col>
</u-row>
<u-row gutter="16">
<u-col span="3">
<view class="demo-layout bg-purple">描述</view>
</u-col>
<u-col span="12">
<view class="demo-layout bg-purple-light">{{lists.content}}</view>
</u-col>
</u-row>
<u-row gutter="16">
<u-col span="3">
<view class="demo-layout bg-purple">现场图片</view>
</u-col>
<u-col span="12" v-for="(item,index) in lists.common_inspection_files">
<u-image style="margin:20rpx 0" width="100%" height="300rpx" :src="item.files.url"></u-image>
</u-col>
</u-row>
</view>
</u-card>
</block>
</view>
<script>
</script>
</view>
<style>
</style>
</template>
<script>
export default {
data() {
return {
lists:{}
}
},
onLoad(options) {
if(options.id){
this.loadInfo(options.id)
}
},
methods: {
loadInfo: function(id) {
var that = this;
this.util.request({
method:"get",
api: '/api/mobile/common-inspection/show',
customLoading: false,
data: {
id:id
},
utilSuccess: function(r) {
that.lists = r
},
utilFail: function(res) {
this.util.alert(res);
}
});
}
}
}
</script>
<style>
.boxContent {
background: #f3f4f6;
min-height: 100vh;
}
.footer {
display: flex;
justify-content: flex-end;
}
.box-header {
position: fixed;
top: 0;
width: 100%;
z-index: 99;
}
.u-row {
margin: 10rpx 0;
font-size: 28rpx;
}
.u-card{
z-index: 1;
}
</style>
<style scoped lang="scss">
.overflowmask{
overflow: hidden;
}
.loadmore{
padding:24rpx!important
}
.search-wrap {
background: #007AFF;
padding: 20rpx;
}
.u-config-wrap {
padding: 30rpx;
}
.bg-purple {
font-weight: bold;
}
.slot-content {
background-color: #FFFFFF;
padding: 24rpx;
.item-box {
margin-bottom: 50rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.item {
border: 1px solid $u-type-primary;
color: $u-type-primary;
padding: 8rpx 40rpx;
border-radius: 100rpx;
margin-top: 30rpx;
}
.active {
color: #FFFFFF;
background-color: $u-type-primary;
}
}
}
</style>

@ -13,7 +13,7 @@
@on-remove="function(index, lists, name) {return toremove(index, lists, name,'filesList')}"> @on-remove="function(index, lists, name) {return toremove(index, lists, name,'filesList')}">
</u-upload> </u-upload>
</u-form-item> </u-form-item>
<u-form-item label-position="top" label="状态"> <u-form-item label-position="top" label="处理方式">
<u-radio-group v-model="normalstatus"> <u-radio-group v-model="normalstatus">
<u-radio <u-radio
@change="radioChange" @change="radioChange"
@ -38,7 +38,7 @@
<u-form-item label-position="top" label="处理后照片"> <u-form-item label-position="top" label="处理后照片">
<u-upload ref="uUpload" multiple :maxCount="10" :action="action" upload-text="" <u-upload ref="uUpload" multiple :maxCount="10" :action="action" upload-text=""
:previewFullImage="true" :file-list="dealFilesList" :form-data="otherData" :show-tips="false" @on-uploaded="function(lists, name) {return toupload(lists, name,'dealFilesList')}" :previewFullImage="true" @on-progress="onprogress" @on-success="tosuccess" :file-list="dealFilesList" :form-data="otherData" :show-tips="false" @on-uploaded="function(lists, name) {return toupload(lists, name,'dealFilesList')}"
@on-remove="function(index, lists, name) {return toremove(index, lists, name,'dealFilesList')}"> @on-remove="function(index, lists, name) {return toremove(index, lists, name,'dealFilesList')}">
</u-upload> </u-upload>
</u-form-item> </u-form-item>
@ -102,7 +102,8 @@
address:"", address:"",
files_list:"", files_list:"",
deal_files_list:"" deal_files_list:""
}, },
qqmapsdk:"",
width: 300, width: 300,
height: 300, height: 300,
rules: { rules: {
@ -133,8 +134,15 @@
geocode:true, geocode:true,
success(res) { success(res) {
that.form.deal_latitude = res.latitude; that.form.deal_latitude = res.latitude;
that.form.deal_longitude = res.longitude; that.form.deal_longitude = res.longitude;
} const url = "https://apis.map.qq.com/ws/geocoder/v1/?key=EUQBZ-MJALU-WZFVR-2HFNW-TIK2K-TNBJI&location="+res.latitude+","+res.longitude+"&output=jsonp"
that.$jsonp(
url
).then(re => {
that.form.address = re.result.formatted_addresses.recommend
})
}
}) })
uni.getSystemInfo({ uni.getSystemInfo({
complete(res) { complete(res) {
@ -202,6 +210,7 @@
that.form.status = that.normalstatus; that.form.status = that.normalstatus;
that.form.deal_latitude = ""; that.form.deal_latitude = "";
that.form.deal_longitude = ""; that.form.deal_longitude = "";
that.form.address = "";
} }
let list = []; let list = [];
let deallist=[]; let deallist=[];

@ -13,9 +13,13 @@
<view class="list" style="padding-top: 100rpx;"> <view class="list" style="padding-top: 100rpx;">
<u-dropdown @open="openmask" @close="closemask" :class="mask?'':'overflowmask'" ref="uDropdown"> <u-dropdown @open="openmask" @close="closemask" :class="mask?'':'overflowmask'" ref="uDropdown">
<u-dropdown-item v-model="proStatusId" :title="proStatus==''?'项目状态':proStatus" @change="toChangeStatus" <u-dropdown-item v-model="proStatusId" :title="proStatus==''?'处理方式':proStatus" @change="toChangeStatus"
:options="prostatusList"> :options="prostatusList">
</u-dropdown-item> </u-dropdown-item>
<u-dropdown-item v-model="lzStatusId" :title="lzStatus==''?'状态':lzStatus" @change="toChangelzStatus"
:options="lzstatusList">
</u-dropdown-item>
</u-dropdown> </u-dropdown>
<block v-for="(item, index) in dataList"> <block v-for="(item, index) in dataList">
<u-card :title="item.created_at" padding="20" margin="20rpx" :border="true" <u-card :title="item.created_at" padding="20" margin="20rpx" :border="true"
@ -31,7 +35,7 @@
</u-row> </u-row>
<u-row gutter="16"> <u-row gutter="16">
<u-col span="3"> <u-col span="3">
<view class="demo-layout bg-purple">项目状态</view> <view class="demo-layout bg-purple">处理方式</view>
</u-col> </u-col>
<u-col span="9"> <u-col span="9">
<u-tag v-if="item.status==1" text="无异常" type="primary" /> <u-tag v-if="item.status==1" text="无异常" type="primary" />
@ -102,7 +106,9 @@
}, },
currentRole: "inspector", //inspectormanageroperator currentRole: "inspector", //inspectormanageroperator
proStatus: '', proStatus: '',
proStatusId: '', proStatusId: '',
lzStatus: '',
lzStatusId: '',
keyword: "", keyword: "",
title: "", title: "",
prostatusList: [{ prostatusList: [{
@ -118,6 +124,20 @@
}, { }, {
label: "不可现场处理", label: "不可现场处理",
value: 3 value: 3
}],
lzstatusList: [{
label: "所有",
value: "",
id: ""
}, {
label: "已提交",
value: 1,
}, {
label: "已处理",
value: 2,
}, {
label: "未处理",
value: 3
}] }]
} }
}, },
@ -145,11 +165,11 @@
methods: { methods: {
openmask(){ openmask(){
this.mask=true this.mask=true
this.isPullDown(false); // this.isPullDown(false);
}, },
closemask(){ closemask(){
this.mask=false this.mask=false
this.isPullDown(true); // this.isPullDown(true);
}, },
toChangeStatus: function(value) { toChangeStatus: function(value) {
for(var m of this.prostatusList){ for(var m of this.prostatusList){
@ -159,6 +179,15 @@
} }
this.loadPage(1); this.loadPage(1);
this.$refs.uDropdown.close(); this.$refs.uDropdown.close();
},
toChangelzStatus: function(value) {
for(var m of this.lzstatusList){
if(value == m.value){
this.lzStatus = m.label
}
}
this.loadPage(1);
this.$refs.lzuDropdown.close();
}, },
tosearch() { tosearch() {
@ -186,7 +215,8 @@
page: page, page: page,
page_size: 5, page_size: 5,
keyword: that.keyword, keyword: that.keyword,
status:that.proStatusId status:that.proStatusId,
lzstatus:that.lzStatusId
}, },
utilSuccess: function(r) { utilSuccess: function(r) {

@ -51,8 +51,8 @@
"path": "generalPatrol/viewPatrol", "path": "generalPatrol/viewPatrol",
"style": { "style": {
"navigationBarTitleText": "通用巡查", "navigationBarTitleText": "通用巡查",
"enablePullDownRefresh": false, "enablePullDownRefresh": false
"navigationStyle": "custom"
} }
}] }]

@ -529,7 +529,8 @@ var Base64 = {
return this.UTF8ToUTF16(res.join('')); return this.UTF8ToUTF16(res.join(''));
} }
}; };
module.exports = { module.exports = {
HOST: HOST, HOST: HOST,
formatTime: formatTime, formatTime: formatTime,
@ -552,6 +553,6 @@ module.exports = {
getUserProfile: getUserProfile, getUserProfile: getUserProfile,
getUserInfo: getUserInfo, getUserInfo: getUserInfo,
toast: toast, toast: toast,
isValidCardID:isValidCardID isValidCardID:isValidCardID,
}; };

Loading…
Cancel
Save