2024-06-06 15:25:18 +08:00
|
|
|
<template>
|
2024-06-07 11:22:13 +08:00
|
|
|
<view :style="{height:'99%',position:'relative'}">
|
2024-06-07 15:41:32 +08:00
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
|
|
<div class="row" v-if="!record.isDisabled">
|
2024-06-07 11:22:13 +08:00
|
|
|
<text class="lf">指令内容:</text>
|
|
|
|
|
<div class="rf">
|
|
|
|
|
<u--textarea
|
|
|
|
|
v-model="value"
|
|
|
|
|
height=100
|
|
|
|
|
></u--textarea>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div :style="{margin:'0 10px'}"><u-divider></u-divider></div>
|
|
|
|
|
<div class="mybody">
|
|
|
|
|
<div class="row2" v-for="(item,index) in list">
|
2024-06-07 15:41:32 +08:00
|
|
|
<text>{{item.tm+' '+item.content}}</text>
|
2024-06-07 11:22:13 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-06-07 15:41:32 +08:00
|
|
|
<div :style="{width:'100%',position:'absolute',bottom:'40px'}" v-if="!record.isDisabled">
|
2024-06-07 11:22:13 +08:00
|
|
|
<u-button
|
|
|
|
|
type="primary"
|
|
|
|
|
text="反馈"
|
|
|
|
|
customStyle="margin-top: 20px"
|
2024-06-19 10:15:33 +08:00
|
|
|
@click="show1 = true"
|
2024-06-07 11:22:13 +08:00
|
|
|
></u-button>
|
|
|
|
|
<u-button
|
|
|
|
|
type="primary"
|
|
|
|
|
text="反馈并结束"
|
|
|
|
|
customStyle="margin-top: 10px"
|
2024-06-19 10:15:33 +08:00
|
|
|
@click="show2 = true"
|
2024-06-07 11:22:13 +08:00
|
|
|
></u-button>
|
|
|
|
|
</div>
|
2024-06-19 10:15:33 +08:00
|
|
|
|
|
|
|
|
<u-modal
|
|
|
|
|
width="250"
|
|
|
|
|
:show="show1"
|
|
|
|
|
showCancelButton
|
|
|
|
|
closeOnClickOverlay
|
|
|
|
|
@confirm="submit1"
|
|
|
|
|
@cancel="() => show1 = false"
|
|
|
|
|
@close="() => show1 = false"
|
|
|
|
|
>
|
|
|
|
|
<view class="slot-content">
|
|
|
|
|
<rich-text :nodes="'确认反馈?'" :style="{fontSize:'16px'}"></rich-text>
|
|
|
|
|
</view>
|
|
|
|
|
</u-modal>
|
|
|
|
|
<u-modal
|
|
|
|
|
width="250"
|
|
|
|
|
:show="show2"
|
|
|
|
|
showCancelButton
|
|
|
|
|
closeOnClickOverlay
|
|
|
|
|
@confirm="submit2"
|
|
|
|
|
@cancel="() => show2 = false"
|
|
|
|
|
@close="() => show2 = false"
|
|
|
|
|
>
|
|
|
|
|
<view class="slot-content">
|
|
|
|
|
<rich-text :nodes="'确认反馈并结束?'" :style="{fontSize:'16px'}"></rich-text>
|
|
|
|
|
</view>
|
|
|
|
|
</u-modal>
|
2024-06-06 15:25:18 +08:00
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import moment from 'moment'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
props:{
|
|
|
|
|
record:{
|
2024-06-07 15:41:32 +08:00
|
|
|
type: Object,
|
2024-06-06 15:25:18 +08:00
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2024-06-07 11:22:13 +08:00
|
|
|
value:'',
|
2024-06-19 10:15:33 +08:00
|
|
|
list:[],
|
|
|
|
|
show1:false,
|
|
|
|
|
show2:false
|
2024-06-06 15:25:18 +08:00
|
|
|
};
|
|
|
|
|
},
|
2024-06-07 15:41:32 +08:00
|
|
|
created() {
|
|
|
|
|
this.getData()
|
|
|
|
|
},
|
2024-06-06 15:25:18 +08:00
|
|
|
methods: {
|
|
|
|
|
tabsChange(item) {
|
|
|
|
|
},
|
2024-06-07 15:41:32 +08:00
|
|
|
async getData() {
|
|
|
|
|
try{
|
|
|
|
|
const res = await uni.$http.get('/gunshiApp/xfflood/xfEmerDispatchR/getFeedbackById/'+this.record.id)
|
|
|
|
|
console.log('res',res)
|
|
|
|
|
this.list = res.data.data
|
|
|
|
|
}catch(e){
|
|
|
|
|
uni.$showMsg()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async submit1() {
|
2024-06-19 10:15:33 +08:00
|
|
|
this.show1 = false
|
2024-06-07 15:41:32 +08:00
|
|
|
try{
|
|
|
|
|
if(!this.value){
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
type: 'error',
|
|
|
|
|
title: '失败主题',
|
|
|
|
|
message: "请输入指令内容",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const params = {
|
|
|
|
|
dispatchId:this.record.id,
|
|
|
|
|
content:this.value,
|
|
|
|
|
}
|
|
|
|
|
console.log('params',params)
|
|
|
|
|
const res = await uni.$http.post('/gunshiApp/xfflood/xfEmerDispatchR/feedback',params)
|
|
|
|
|
console.log('res',res)
|
|
|
|
|
this.value = ''
|
|
|
|
|
this.getData()
|
|
|
|
|
}catch(e){
|
|
|
|
|
uni.$showMsg()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async submit2() {
|
2024-06-19 10:15:33 +08:00
|
|
|
this.show2 = false
|
2024-06-07 15:41:32 +08:00
|
|
|
try{
|
|
|
|
|
if(!this.value){
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
type: 'error',
|
|
|
|
|
title: '失败主题',
|
|
|
|
|
message: "请输入指令内容",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const params = {
|
|
|
|
|
dispatchId:this.record.id,
|
|
|
|
|
content:this.value,
|
|
|
|
|
}
|
|
|
|
|
const res = await uni.$http.post('/gunshiApp/xfflood/xfEmerDispatchR/feedbackAndEnd',params)
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
}catch(e){
|
|
|
|
|
uni.$showMsg()
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-06-06 15:25:18 +08:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2024-06-07 11:22:13 +08:00
|
|
|
.row{
|
|
|
|
|
display: flex;
|
|
|
|
|
margin-top: 5px;
|
|
|
|
|
}
|
|
|
|
|
.lf{
|
|
|
|
|
width: 25%;
|
|
|
|
|
min-height: 40px;
|
|
|
|
|
text-align: right;
|
|
|
|
|
line-height: 38px;
|
|
|
|
|
padding-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
.rf{
|
|
|
|
|
width: 75%;
|
|
|
|
|
min-height: 40px;
|
|
|
|
|
padding-right: 20px;
|
|
|
|
|
padding-top: 1px;
|
|
|
|
|
}
|
|
|
|
|
.mybody{
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
margin: 5px 5px;
|
|
|
|
|
padding: 5px 10px;
|
|
|
|
|
height: calc( 100vh - 410px );
|
|
|
|
|
overflow: scroll;
|
|
|
|
|
}
|
|
|
|
|
.row2{
|
|
|
|
|
background-color: rgba(217, 217, 217, 1);
|
|
|
|
|
margin: 10px 0;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
}
|
2024-06-06 15:25:18 +08:00
|
|
|
</style>
|