@@ -139,7 +171,13 @@
data() {
return {
item: {},
- dealFilesList: []
+ dealFilesList: [],
+ askImgs:[],
+ askVideos:[],
+ askAudios:[],
+ dealImgs:[],
+ dealVideos:[],
+ dealAudios:[]
}
},
onReady() {
@@ -161,22 +199,40 @@
id: id
},
utilSuccess: function(res) {
- that.item = res
+ that.item = res
+ // console.log(that.fileListObj)
+ // for(var m in that.fileListObj){
+ // console.log("m",m,res[m])
+ // for(var k of res[m]){
+ // console.log("k",k)
+ // that.fileListObj[m]['arr'].push(k.uploads[0].url)
+ // }
+ // }
+ // console.log(that.fileListObj)
+ for(var m of res.ask_images){
+ that.askImgs.push(m.uploads[0].url)
+ }
+ for(var m of res.ask_videos){
+ that.askVideos.push(m.uploads[0].url)
+ }
+ for(var m of res.ask_voice){
+ that.askAudios.push(m.uploads[0].url)
+ }
+ for(var m of res.deal_images){
+ that.dealImgs.push(m.uploads[0].url)
+ }
+ for(var m of res.deal_videos){
+ that.dealVideos.push(m.uploads[0].url)
+ }
+ for(var m of res.deal_voice){
+ that.dealAudios.push(m.uploads[0].url)
+ }
},
utilFail: function(res) {
that.util.alert(res);
}
});
- },
- imgListPreview(item) {
- var urlList = []
- urlList.push(item) //push中的参数为 :src="item.img_url" 中的图片地址
- uni.previewImage({
- indicator: "number",
- loop: true,
- urls: urlList
- })
- },
+ }
}
}
diff --git a/inspect/inspect.vue b/inspect/inspect.vue
index a1a63c2..2dbd92d 100644
--- a/inspect/inspect.vue
+++ b/inspect/inspect.vue
@@ -71,7 +71,7 @@
:action="action">
-
+
提交
@@ -257,43 +257,56 @@
},
// 文件上传
- onprogress(res) {
- // uni.showToast({
- // icon: "none",
- // title: "上传中",
- // duration: 2000
- // })
- uni.showLoading({
- title: '上传中'
- });
- },
- tosuccess() {
- // uni.showToast({
- // icon: "none",
- // title: "上传成功",
- // duration: 2000
- // })
+ uploadSuccess(res,type){
+ console.log(type)
uni.showLoading({
- title: '上传成功'
- });
- },
- toremove(index, lists, name, whatfile) {
- if (whatfile == "picFileList") {
- this.picFileList.splice(index, 1)
+ title:"上传成功"
+ })
+ let obj = {}
+ let data = JSON.parse(res.data)
+ obj.id = data.id
+ obj.url = data.url
+ if(type=="pic"){
+ obj.type=0
+ }else{
+ obj.type=1
}
- if (whatfile == "dealFilesList") {
- this.dealFilesList.splice(index, 1)
+
+ switch (type){
+ case 'video':
+ this.videoFileList.push(obj)
+ break;
+ case 'audio':
+ this.audioFileList.push(obj)
+ break;
+ case 'pic':
+ this.picFileList.push(obj)
+ break;
+ default:
+ break;
}
},
- toupload(lists, name, whatfile) {
- var that = this;
- if (whatfile == "picFileList") {
- that.picFileList = lists
- }
- if (whatfile == "dealFilesList") {
- that.dealFilesList = lists;
+ imgDelete(res,type){
+ console.log("imgDelete",res)
+ let list = []
+ list = res.tempFilePaths
+ switch (type){
+ case 'video':
+ this.videoFileList = list
+ break;
+ case 'audio':
+ this.audioFileList= list
+ break;
+ case 'pic':
+ this.picFileList= list
+ break;
+ default:
+ break;
}
},
+ uploadFail(res){
+ console.log("uploadFail",res)
+ },
submit(){
var that = this;
let pic = []
@@ -314,7 +327,7 @@
for(var m in fileListObj){
for(var k of fileListObj[m]['arr']){
pic.push({
- id:k.id,
+ upload_id:k.id,
type:fileListObj[m]['type']
})
}
@@ -351,50 +364,7 @@
url: "../inspect/list"
})
},
- uploadSuccess(res,type){
- console.log(type)
- uni.showLoading({
- title:"上传成功"
- })
- let obj = {}
- let data = JSON.parse(res.data)
- obj.id = data.id
- obj.url = data.url
- switch (type){
- case 'video':
- this.videoFileList.push(obj)
- break;
- case 'audio':
- this.audioFileList.push(obj)
- break;
- case 'pic':
- this.picFileList.push(obj)
- break;
- default:
- break;
- }
- },
- imgDelete(res,type){
- console.log("imgDelete",res)
- let list = []
- list = res.tempFilePaths
- switch (type){
- case 'video':
- this.videoFileList = list
- break;
- case 'audio':
- this.audioFileList= list
- break;
- case 'pic':
- this.picFileList= list
- break;
- default:
- break;
- }
- },
- uploadFail(res){
- console.log("uploadFail",res)
- }
+
}
}
diff --git a/inspect/list.vue b/inspect/list.vue
index 36af6cb..2a950af 100644
--- a/inspect/list.vue
+++ b/inspect/list.vue
@@ -1,7 +1,7 @@
-
-
+
@@ -61,11 +61,12 @@
method: "get",
data: {
page: that.pages.page,
- page_size: that.pages.page_size
+ page_size: that.pages.page_size,
+ myself:1
},
utilSuccess: function(res) {
console.log(res)
- if (res.last_page == 0) {
+ if (res.total == 0) {
that.isEmpty = true
return
}
diff --git a/pages.json b/pages.json
index 5aa7d7e..e81b4b0 100644
--- a/pages.json
+++ b/pages.json
@@ -38,6 +38,11 @@
"style": {
"navigationBarTitleText": "问题处理"
}
+ },{
+ "path": "solve/solve",
+ "style": {
+ "navigationBarTitleText": "问题处理"
+ }
}
],
"globalStyle": {
diff --git a/solve/index.vue b/solve/index.vue
index 02409e3..89199ec 100644
--- a/solve/index.vue
+++ b/solve/index.vue
@@ -1,8 +1,167 @@
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+ {{index+1}}
+
+
+
+ 区域:{{item.area_detail?item.area_detail.value:''}}
+ 河道:{{item.river?item.river.name:''}}
+ 地址:{{item.address}}
+ 问题类型:{{item.ask_type?item.ask_type.name:''}}
+ 问题状态:{{item.ask_status_text}}
+ 上报时间:{{item.created_at}}
+
+
+ 处理
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/solve/solve.vue b/solve/solve.vue
new file mode 100644
index 0000000..a615d96
--- /dev/null
+++ b/solve/solve.vue
@@ -0,0 +1,368 @@
+
+
+
+
+
+
+ 区域:
+
+
+ {{item.area_detail?item.area_detail.value:''}}
+
+
+
+
+ 河道:
+
+
+ {{item.river?item.river.name:''}}
+
+
+
+
+ 问题类型:
+
+
+ {{item.ask_type?item.ask_type.name:''}}
+
+
+
+
+ 上报时间:
+
+
+ {{item.created_at}}
+
+
+
+
+ 地址:
+
+
+ {{item.address}}
+
+
+
+
+ 上报人:
+
+
+ {{item.user?item.user.name:''}}
+
+
+
+
+ 问题描述:
+
+
+ {{item.ask_content}}
+
+
+
+
+ 驳回原因:
+
+
+
+
+
+
+
+ 照片:
+
+
+
+
+
+
+
+ 视频:
+
+
+
+
+
+
+
+ 音频:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 退回
+ 提交
+
+
+
+
+
+
+
+
+
+
+