Compare commits
4 Commits
6aa24fae37
...
17e72d0bd1
| Author | SHA1 | Date |
|---|---|---|
|
|
17e72d0bd1 | |
|
|
70639bedb8 | |
|
|
887286e725 | |
|
|
6fd9d88f1c |
|
|
@ -71,14 +71,12 @@
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="处理图片" prop="handlePics" borderBottom required labelPosition='top'>
|
<u-form-item label="处理图片" prop="handlePics" borderBottom required labelPosition='top'>
|
||||||
<u-upload accept="image" :fileList="queItem.handlePics || []" disabled
|
<u-upload accept="image" :fileList="queItem.handlePics || []" disabled
|
||||||
@afterRead="(e)=>afterRead(e,queItem)"
|
name="handlePics" multiple
|
||||||
@delete="(e)=>deletePic(e,queItem)" name="handlePics" multiple
|
|
||||||
:maxCount="10"></u-upload>
|
:maxCount="10"></u-upload>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="处理视频" prop="handleVideos" borderBottom labelPosition='top'>
|
<u-form-item label="处理视频" prop="handleVideos" borderBottom labelPosition='top'>
|
||||||
<u-upload accept="video" :fileList="queItem.handleVideos" disabled
|
<u-upload accept="video" :fileList="queItem.handleVideos" disabled
|
||||||
@afterRead="(e)=>afterRead(e,queItem)"
|
name="handleVideos" multiple
|
||||||
@delete="(e)=>deletePic(e,queItem)" name="handleVideos" multiple
|
|
||||||
:maxCount="10"></u-upload>
|
:maxCount="10"></u-upload>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -111,86 +109,32 @@
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.queItem = JSON.parse(options.item)
|
this.queItem = JSON.parse(options.item)
|
||||||
|
|
||||||
|
this.queItem.handleVideos?.map(item1=>{
|
||||||
|
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath
|
||||||
|
return item1
|
||||||
|
})
|
||||||
|
this.queItem.handlePics?.map(item1=>{
|
||||||
|
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath
|
||||||
|
return item1
|
||||||
|
})
|
||||||
console.log(this.queItem);
|
console.log(this.queItem);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit(){
|
previewImage(item){
|
||||||
//
|
uni.previewImage({
|
||||||
if(this.queItem.handlePics?.length < 0 || !this.queItem.handleDesc){
|
urls: [item.url],
|
||||||
console.log(this.queItem);
|
longPressActions: {
|
||||||
uni.$showMsg('请填写处理内容和上传图片');
|
itemList: ['发送给朋友', '保存图片', '收藏'],
|
||||||
return;
|
success: function(data) {
|
||||||
}else{
|
console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
|
||||||
console.log(this.queItem);
|
},
|
||||||
uni.$http.post('/gunshiApp/xyt/inspect/detail/handle', this.queItem).then(res => {
|
fail: function(err) {
|
||||||
uni.$showMsg(res.data.description);
|
console.log(err.errMsg);
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 删除图片
|
|
||||||
deletePic(event, o) {
|
|
||||||
this.queItem[event.name].splice(event.index, 1)
|
|
||||||
},
|
|
||||||
// 新增图片
|
|
||||||
async afterRead(event, o) {
|
|
||||||
// let file
|
|
||||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
|
||||||
console.log(event,'2342132');
|
|
||||||
let lists = [].concat(event.file)
|
|
||||||
|
|
||||||
if(!this.queItem[event.name]){
|
|
||||||
this.queItem[event.name]=[]
|
|
||||||
}
|
|
||||||
let fileListLen = this.queItem[event.name]?.length
|
|
||||||
console.log(this.queItem[event.name]);
|
|
||||||
lists.map((item) => {
|
|
||||||
this.queItem[event.name].push({
|
|
||||||
...item,
|
|
||||||
status: 'uploading',
|
|
||||||
message: '上传中'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
for (let i = 0; i < lists.length; i++) {
|
|
||||||
const result = await this.uploadFilePromise(lists[i].url, event.name)
|
|
||||||
console.log(result);
|
|
||||||
let item = this.queItem[event.name][fileListLen]
|
|
||||||
this.queItem[event.name].splice(fileListLen, 1, Object.assign(item, {
|
|
||||||
status: 'success',
|
|
||||||
message: '',
|
|
||||||
...result
|
|
||||||
}))
|
|
||||||
fileListLen++
|
|
||||||
}
|
|
||||||
},
|
|
||||||
uploadFilePromise(url, name) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
let a = uni.uploadFile({
|
|
||||||
url: 'http://local.gunshiiot.com:18083/gunshiApp/xyt/maintain/service/file/upload/singleSimple', // 仅为示例,非真实的接口地址
|
|
||||||
filePath: url,
|
|
||||||
name: 'file',
|
|
||||||
formData: {
|
|
||||||
user: 'test'
|
|
||||||
},
|
|
||||||
success: (res) => {
|
|
||||||
setTimeout(() => {
|
|
||||||
// this.listData[index].children[index1][name].push({...res.data.data,url:res.data.data.filePath})
|
|
||||||
console.log(res.data)
|
|
||||||
resolve(JSON.parse(res.data).data)
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// resolve(a)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
confirm(e) {
|
|
||||||
console.log(e);
|
|
||||||
this.model.stm = e[0]
|
|
||||||
this.model.etm = e[1]
|
|
||||||
this.show = false
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
this.show = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -14,46 +14,48 @@
|
||||||
<view class="xj-text" v-for="(o,i) in item.children" :key="i">
|
<view class="xj-text" v-for="(o,i) in item.children" :key="i">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<text>{{o.itemDesc}}</text>
|
<text>{{o.itemDesc}}</text>
|
||||||
<text>({{o.isNormal == 0?'异常':'正常'}}{{o.isHandle?'已处理':'未处理'}})</text>
|
<text>({{o.isNormal == 0?'异常':'正常'}}{{o.isNormal == 0?o.isHandle?'已处理':'未处理':''}})</text>
|
||||||
|
<!-- <text></text> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="o.isNormal == 0">
|
<view class="" v-if="o.isNormal == 0">
|
||||||
<view style="">
|
<view class="itemEve">
|
||||||
<text>现场图片</text>
|
<text>现场图片:</text>
|
||||||
<view class="" v-for="item in o.inspectPics">
|
<view class="" v-for="item in o.inspectPics">
|
||||||
<image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" ></image>
|
<image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" @click="previewImage(item)"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="o.inspectVideos.length">
|
<view v-if="o.inspectVideos.length" class="itemEve">
|
||||||
<text>现场视频</text>
|
<text>现场视频:</text>
|
||||||
<view class="" v-for="item in o.inspectVideos">
|
<view class="" v-for="item in o.inspectVideos">
|
||||||
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" show-fullscreen-btn :show-progress='false'></video>
|
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" show-fullscreen-btn :show-progress='false'></video>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;justify-content: space-between;">
|
<view style="display: flex;" class="itemEve">
|
||||||
<text>问题描述</text>
|
<text>问题描述:</text>
|
||||||
<text>{{o.itemProblemDesc}}</text>
|
<text>{{o.itemProblemDesc}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="o.isHandle == 1">
|
<view class="" v-if="o.isHandle == 1">
|
||||||
<view style="">
|
<view style="" class="itemEve">
|
||||||
<text>处理图片</text>
|
<text>处理图片:</text>
|
||||||
<view class="" v-for="item in o.handlePics">
|
<view class="" v-for="item in o.handlePics">
|
||||||
<image :src="item.url" style="width: 80px;height: 80px;margin: 5px;"></image>
|
<image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" @click="previewImage(item)"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="" v-if="o.handleVideos.length">
|
<view style="" v-if="o.handleVideos.length" class="itemEve">
|
||||||
<text>处理视频</text>
|
<text>处理视频:</text>
|
||||||
<view class="" v-for="item in o.handleVideos">
|
<view class="" v-for="item in o.handleVideos">
|
||||||
|
|
||||||
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" show-fullscreen-btn></video>
|
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" show-fullscreen-btn></video>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;justify-content: space-between;">
|
<view style="display: flex;" class="itemEve">
|
||||||
<text>问题描述</text <text>{{o.handleDesc}}</text>
|
<text>问题描述:</text <text>{{o.handleDesc}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="display: flex;justify-content: space-between;" v-if="o.isHandle == 0">
|
<view style="display: flex;" v-if="o.isHandle == 0" class="itemEve">
|
||||||
<text>责任人</text>
|
<text>责任人</text>
|
||||||
<text>{{o.handleUserName}}</text>
|
<text>{{o.handleUserName}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -196,6 +198,20 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
previewImage(item){
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [item.url],
|
||||||
|
longPressActions: {
|
||||||
|
itemList: ['发送给朋友', '保存图片', '收藏'],
|
||||||
|
success: function(data) {
|
||||||
|
console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
|
||||||
|
},
|
||||||
|
fail: function(err) {
|
||||||
|
console.log(err.errMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
getIsItem(arr) {
|
getIsItem(arr) {
|
||||||
return arr.filter(item1 => item1.isNormal !== 1 && item1.isNormal !== 0).length
|
return arr.filter(item1 => item1.isNormal !== 1 && item1.isNormal !== 0).length
|
||||||
},
|
},
|
||||||
|
|
@ -221,115 +237,6 @@
|
||||||
return 3
|
return 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async uploadContent() {
|
|
||||||
try {
|
|
||||||
let params = {
|
|
||||||
status: 2,
|
|
||||||
list: []
|
|
||||||
}
|
|
||||||
this.listData.map(i => {
|
|
||||||
params.list.push(i.children)
|
|
||||||
})
|
|
||||||
const {
|
|
||||||
data
|
|
||||||
} = await uni.$http.post(`/gunshiApp/xyt/inspect/task/finish`, params)
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
uni.$showMsg();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
submit() {
|
|
||||||
let tigger = true
|
|
||||||
//判断是否符合提交条件
|
|
||||||
this.listData.forEach(item => {
|
|
||||||
item.ab = item.children.filter(i => {
|
|
||||||
if (i.isNormal == 1) {
|
|
||||||
if (i.inspectPics?.length && i.itemProblemDesc) {
|
|
||||||
tigger = true
|
|
||||||
} else {
|
|
||||||
tigger = false
|
|
||||||
}
|
|
||||||
if (i.isHandle == 0) {
|
|
||||||
if (i.handlePics?.length && i.handleDesc) {
|
|
||||||
tigger = true
|
|
||||||
} else {
|
|
||||||
tigger = false
|
|
||||||
}
|
|
||||||
} else if (i.isHandle == 1) {
|
|
||||||
tigger = true
|
|
||||||
}
|
|
||||||
} else if (i.isNormal == 0) {
|
|
||||||
tigger = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return item
|
|
||||||
})
|
|
||||||
console.log(tigger, 'arr');
|
|
||||||
if (tigger) {
|
|
||||||
this.uploadContent()
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// if()
|
|
||||||
},
|
|
||||||
// 删除图片
|
|
||||||
deletePic(event, o, index, index1) {
|
|
||||||
this.listData[index].children[index1][event.name].splice(event.index, 1)
|
|
||||||
},
|
|
||||||
// 新增图片
|
|
||||||
async afterRead(event, o, index, index1) {
|
|
||||||
console.log(event, index1, this.listData[index]);
|
|
||||||
// let file
|
|
||||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
|
||||||
let lists = [].concat(event.file)
|
|
||||||
let fileListLen = this.listData[index].children[index1][event.name]?.length
|
|
||||||
lists.map((item) => {
|
|
||||||
this.listData[index].children[index1][event.name].push({
|
|
||||||
...item,
|
|
||||||
status: 'uploading',
|
|
||||||
message: '上传中'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
for (let i = 0; i < lists.length; i++) {
|
|
||||||
const result = await this.uploadFilePromise(lists[i].url, event.name, index, index1)
|
|
||||||
console.log(result);
|
|
||||||
let item = this.listData[index].children[index1][event.name][fileListLen]
|
|
||||||
this.listData[index].children[index1][event.name].splice(fileListLen, 1, Object.assign(item, {
|
|
||||||
status: 'success',
|
|
||||||
message: '',
|
|
||||||
...result
|
|
||||||
}))
|
|
||||||
fileListLen++
|
|
||||||
}
|
|
||||||
},
|
|
||||||
uploadFilePromise(url, name, index, index1) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
let a = uni.uploadFile({
|
|
||||||
url: 'http://local.gunshiiot.com:18083/gunshiApp/xyt/maintain/service/file/upload/singleSimple', // 仅为示例,非真实的接口地址
|
|
||||||
filePath: url,
|
|
||||||
name: 'file',
|
|
||||||
formData: {
|
|
||||||
user: 'test'
|
|
||||||
},
|
|
||||||
success: (res) => {
|
|
||||||
setTimeout(() => {
|
|
||||||
// this.listData[index].children[index1][name].push({...res.data.data,url:res.data.data.filePath})
|
|
||||||
console.log(res.data)
|
|
||||||
resolve(JSON.parse(res.data).data)
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// resolve(a)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
change(e, o, index, i, key) {
|
|
||||||
|
|
||||||
this.listData[index].children[i][key] = e;
|
|
||||||
this.$forceUpdate()
|
|
||||||
},
|
|
||||||
sexSelect(e) {
|
|
||||||
// this.model1.userInfo.sex = e.name
|
|
||||||
// this.$refs.uForm.validateField('userInfo.sex')
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -391,4 +298,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
.itemEve{
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="funcBar">
|
<view class="funcBar">
|
||||||
<div class="funcList" v-for="(item, index) in func" :key="index">
|
<div class="funcList" v-for="(item, index) in func" :key="index">
|
||||||
<div @click="navigateToSubPage(index)">
|
<div @click="navigateToSubPage(func,index)">
|
||||||
<div class="funcIcon">
|
<div class="funcIcon">
|
||||||
<image class="icon-left" style="width: 100%; height: 100%" :src="item.img" mode="aspectFit">
|
<image class="icon-left" style="width: 100%; height: 100%" :src="item.img" mode="aspectFit">
|
||||||
</image>
|
</image>
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<view class="" style="display: flex;">
|
<view class="" style="display: flex;">
|
||||||
|
|
||||||
<div class="funcList" v-for="(item, index) in xjxList" :key="index" >
|
<div class="funcList" v-for="(item, index) in xjxList" :key="index" >
|
||||||
<div @click="navigateToSubPage(index)">
|
<div @click="navigateToSubPage(xjxList,index)">
|
||||||
<div class="funcIcon" style="width:30px:;height:30px">
|
<div class="funcIcon" style="width:30px:;height:30px">
|
||||||
<image
|
<image
|
||||||
class="icon-left"
|
class="icon-left"
|
||||||
|
|
@ -87,9 +87,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
navigateToSubPage(index) {
|
navigateToSubPage(item,index) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: xjxList[index].url,
|
url: item[index].url,
|
||||||
animationType:'pop-in',
|
animationType:'pop-in',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
<view class="skinfo" @click="toDetail()">
|
<view class="skinfo" @click="toDetail()">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<u-icon name="file-text" color="#f59d29" size="20"></u-icon>
|
<u-icon name="file-text" color="origin"></u-icon>
|
||||||
<text style="margin-left:5px">{{dataform.resName}}</text>
|
<text>{{dataform.resName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
{{tm}}
|
{{tm}}
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<view class="" style="display: flex;">
|
<view class="" style="display: flex;">
|
||||||
<image src="../../static/c1.png" mode="" style="width:30%;height: 120px;"></image>
|
<image src="../../static/c1.png" mode="" style="width:30%;height: 120px;"></image>
|
||||||
<view class="listItem">
|
<view class="listItem">
|
||||||
<view class="item-text" v-for="(v,k) of list" :key="k">
|
<view class="item-text" v-for="(v,k) of list">
|
||||||
<text>{{v}}</text>:
|
<text>{{v}}</text>:
|
||||||
<text>{{dataform[k]}}</text>
|
<text>{{dataform[k]}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -42,16 +42,16 @@
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
list:{
|
list:{
|
||||||
"rz":'当前水位m',
|
'drp':'当前水位m',
|
||||||
"today":'今日雨量mm',
|
2:'今日雨量mm',
|
||||||
'flLowLimLev':'汛限水位m',
|
'flLowLimLev':'汛限水位m',
|
||||||
"demo":'比汛期m',
|
4:'比汛期m',
|
||||||
'wcrstel':'堰顶高程m',
|
'wcrstel':'堰顶高程m',
|
||||||
'crestElev':'坝顶高程m',
|
'crestElev':'坝顶高程m',
|
||||||
"24h":'24h预报mm',
|
7:'24h预报',
|
||||||
"yesterdayDrp":'昨日雨量mm',
|
8:'昨日雨量',
|
||||||
'totCap':'总库容m³',
|
'totCap':'总库容m³',
|
||||||
"cap":'蓄水量万m³'
|
10:'蓄水量万m³'
|
||||||
},
|
},
|
||||||
tm: moment().format('YYYY-MM-DD HH:mm:ss'),
|
tm: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
dataform:{
|
dataform:{
|
||||||
|
|
@ -97,13 +97,15 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.left{
|
.left{
|
||||||
align-items: center;
|
|
||||||
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑', sans-serif;
|
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑', sans-serif;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
.right{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.content{
|
.content{
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.queItem = JSON.parse(options.item)
|
this.queItem = JSON.parse(options.item)
|
||||||
console.log(uni.getStorageSync('value'));
|
console.log(uni.getStorageSync('value'));
|
||||||
this.queItem.handleUserName = uni.getStorageSync('value').userName
|
this.queItem.handleUserName = uni.getStorageSync('value').nickName
|
||||||
this.queItem.handleTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
this.queItem.handleTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||||
this.queItem.handleUserId = uni.getStorageSync('value').userId
|
this.queItem.handleUserId = uni.getStorageSync('value').userId
|
||||||
this.queItem.handlePics.map(item=>{
|
this.queItem.handlePics.map(item=>{
|
||||||
|
|
@ -145,6 +145,11 @@
|
||||||
console.log(this.queItem);
|
console.log(this.queItem);
|
||||||
uni.$http.post('/gunshiApp/xyt/inspect/detail/handle', this.queItem).then(res => {
|
uni.$http.post('/gunshiApp/xyt/inspect/detail/handle', this.queItem).then(res => {
|
||||||
uni.$showMsg(res.data.description);
|
uni.$showMsg(res.data.description);
|
||||||
|
if(res.data.code == 200){
|
||||||
|
uni.redirectTo({
|
||||||
|
url:'/pages/wtcl/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formData: {
|
formData: {
|
||||||
reportUserName:uni.getStorageSync('value').userName,
|
reportUserName:uni.getStorageSync('value').nickName,
|
||||||
reportTime:moment().format('YYYY-MM-DD HH:mm:ss'),
|
reportTime:moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
userId:uni.getStorageSync('value').userId
|
userId:uni.getStorageSync('value').userId
|
||||||
},
|
},
|
||||||
|
|
@ -27,7 +27,7 @@ export default {
|
||||||
onShow() {
|
onShow() {
|
||||||
const userList=uni.getStorageSync('value')
|
const userList=uni.getStorageSync('value')
|
||||||
console.log(userList,'3456789045678945678');
|
console.log(userList,'3456789045678945678');
|
||||||
this.formData.reportUserName = uni.getStorageSync('value').userName
|
this.formData.reportUserName = uni.getStorageSync('value').nickName
|
||||||
this.formData.userId = uni.getStorageSync('value').userId
|
this.formData.userId = uni.getStorageSync('value').userId
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,9 @@ export default {
|
||||||
uni.$http.post('/gunshiApp/xyt/maintain/service/insert',{...params,...this.formData}).then(res=>{
|
uni.$http.post('/gunshiApp/xyt/maintain/service/insert',{...params,...this.formData}).then(res=>{
|
||||||
if(res.data.code == 200){
|
if(res.data.code == 200){
|
||||||
uni.$u.toast('新增成功')
|
uni.$u.toast('新增成功')
|
||||||
uni.navigateBack()
|
uni.switchTab({
|
||||||
|
url: '/pages/homeIndex/index'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@
|
||||||
<view class="xj-text" v-for="(o,i) in item.children" :key="i">
|
<view class="xj-text" v-for="(o,i) in item.children" :key="i">
|
||||||
<text>{{o.itemDesc}}</text>
|
<text>{{o.itemDesc}}</text>
|
||||||
<view class="subsectioin">
|
<view class="subsectioin">
|
||||||
<u--form labelPosition="left" :model="o" ref="uForm" label-width="100px">
|
<u--form labelPosition="left" :model="o" ref="uForm" label-width="80px">
|
||||||
<u-form-item label="状态" prop="isNormal" borderBottom required >
|
<u-form-item label="状态" prop="isNormal" borderBottom required >
|
||||||
<u-subsection :list="list" :current="getNormal(o.isNormal)" mode="subsection"
|
<u-subsection :list="list" :current="getNormal(o.isNormal)" mode="subsection"
|
||||||
@change="(e)=>change(e,o,index,i,'isNormal')"
|
@change="(e)=>change(e,o,index,i,'isNormal')"
|
||||||
style="width:200px;margin-left: 10px"></u-subsection>
|
style="width:150px"></u-subsection>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view class="" v-if="o.isNormal==0">
|
<view class="" v-if="o.isNormal==0">
|
||||||
<u-form-item label="现场图片" prop="inspectPics" borderBottom required>
|
<u-form-item label="现场图片" prop="inspectPics" borderBottom required>
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
<u-form-item label="处理状态" prop="isHandle" borderBottom required>
|
<u-form-item label="处理状态" prop="isHandle" borderBottom required>
|
||||||
<u-subsection :list="listStatus" :current="getHandle(o.isHandle)"
|
<u-subsection :list="listStatus" :current="getHandle(o.isHandle)"
|
||||||
mode="subsection" @change="(e)=>change(e,o,index,i,'isHandle')"
|
mode="subsection" @change="(e)=>change(e,o,index,i,'isHandle')"
|
||||||
style="width:200px;margin-left: 10px"></u-subsection>
|
style="width:150px"></u-subsection>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view class="" v-if="o.isHandle == 1">
|
<view class="" v-if="o.isHandle == 1">
|
||||||
<u-form-item label="现场图片" prop="handlePics" borderBottom required>
|
<u-form-item label="现场图片" prop="handlePics" borderBottom required>
|
||||||
|
|
@ -63,7 +63,18 @@
|
||||||
<uni-data-picker :localdata="treeList" popup-title="请选择班级" v-model="o.handleUserId"
|
<uni-data-picker :localdata="treeList" popup-title="请选择班级" v-model="o.handleUserId"
|
||||||
:border="false"
|
:border="false"
|
||||||
:map="{'text':'title','value':'value'}"
|
:map="{'text':'title','value':'value'}"
|
||||||
></uni-data-picker>
|
v-slot:default="{data, error, options}"
|
||||||
|
>
|
||||||
|
<view v-if="error" class="error">
|
||||||
|
<text>{{error}}</text>
|
||||||
|
</view>
|
||||||
|
<view v-else-if="data.length" class="selected">
|
||||||
|
<text>{{data[data.length-1].text}}</text>
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<text>请选择</text>
|
||||||
|
</view>
|
||||||
|
</uni-data-picker>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -196,7 +207,7 @@
|
||||||
},
|
},
|
||||||
async getTreeList (){
|
async getTreeList (){
|
||||||
const res = await uni.$http.get('/gunshiApp/xyt/system/dept/list')
|
const res = await uni.$http.get('/gunshiApp/xyt/system/dept/list')
|
||||||
const resUser = await uni.$http.get('/gunshiApp/xyt/system/user/list?pageNum=1&pageSize=9999User')
|
const resUser = await uni.$http.get('/gunshiApp/xyt/system/user/list?pageNum=1&pageSize=9999')
|
||||||
this.deptUserList = resUser.data.rows
|
this.deptUserList = resUser.data.rows
|
||||||
if (res.data.data?.length > 0 && resUser.data.rows?.length > 0) {
|
if (res.data.data?.length > 0 && resUser.data.rows?.length > 0) {
|
||||||
// return this.handleTreeList(res.data.data,res.data.rows)
|
// return this.handleTreeList(res.data.data,res.data.rows)
|
||||||
|
|
@ -250,7 +261,7 @@
|
||||||
console.log(data,'2121');
|
console.log(data,'2121');
|
||||||
if(data.code==200){
|
if(data.code==200){
|
||||||
uni.$showMsg('提交成功');
|
uni.$showMsg('提交成功');
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url:'/pages/xcrw/index'
|
url:'/pages/xcrw/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -405,6 +416,7 @@
|
||||||
|
|
||||||
.xj-text {
|
.xj-text {
|
||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
|
margin-right: 10%;
|
||||||
margin-top: 2%;
|
margin-top: 2%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue