Merge branch 'qzc-dev'

master
秦子超 2024-06-19 10:15:59 +08:00
commit 264087bed6
5 changed files with 51 additions and 31 deletions

View File

@ -176,7 +176,7 @@ import moment from 'moment'
} }
try{ try{
const params = { const params = {
projectTypes:this.check1, projectTypes:this.check1.length===0?['999']:this.check1,
} }
if(this.isTime){ if(this.isTime){
params.timeSo = { params.timeSo = {
@ -184,7 +184,7 @@ import moment from 'moment'
end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'), end:moment(this.etm).format('YYYY-MM-DD HH:mm:ss'),
} }
} }
console.log('params',params) console.log('params',this.check1==[])
const res = await uni.$http.post('/gunshiApp/xfflood/xfProjectRun/list',params) const res = await uni.$http.post('/gunshiApp/xfflood/xfProjectRun/list',params)
console.log('res',res) console.log('res',res)
this.list = res.data.data this.list = res.data.data

View File

@ -189,8 +189,8 @@ import moment from 'moment'
} }
try{ try{
const params = { const params = {
severitys:this.check1, severitys:this.check1.length===0?['999']:this.check1,
projectTypes:this.check2, projectTypes:this.check2.length===0?['999']:this.check2,
} }
if(this.isTime){ if(this.isTime){
params.timeSo = { params.timeSo = {

View File

@ -148,7 +148,7 @@ import moment from 'moment'
}, },
getSearchVal() { getSearchVal() {
if(this.searchVal){ if(this.searchVal){
return this.list.filter(o => (o.projectName?.indexOf(this.searchVal)>-1 || o.address?.indexOf(this.searchVal)>-1)) return this.list.filter(o => (o.reporter?.indexOf(this.searchVal)>-1 || o.address?.indexOf(this.searchVal)>-1))
}else{ }else{
return this.list return this.list
} }
@ -178,7 +178,7 @@ import moment from 'moment'
} }
try{ try{
const params = { const params = {
severitys:this.check1, severitys:this.check1.length===0?['999']:this.check1,
} }
if(this.isTime){ if(this.isTime){
params.timeSo = { params.timeSo = {

View File

@ -21,15 +21,42 @@
type="primary" type="primary"
text="反馈" text="反馈"
customStyle="margin-top: 20px" customStyle="margin-top: 20px"
@click="submit1" @click="show1 = true"
></u-button> ></u-button>
<u-button <u-button
type="primary" type="primary"
text="反馈并结束" text="反馈并结束"
customStyle="margin-top: 10px" customStyle="margin-top: 10px"
@click="submit2" @click="show2 = true"
></u-button> ></u-button>
</div> </div>
<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>
</view> </view>
</template> </template>
@ -46,7 +73,9 @@
data() { data() {
return { return {
value:'', value:'',
list:[] list:[],
show1:false,
show2:false
}; };
}, },
created() { created() {
@ -65,6 +94,7 @@
} }
}, },
async submit1() { async submit1() {
this.show1 = false
try{ try{
if(!this.value){ if(!this.value){
this.$refs.uToast.show({ this.$refs.uToast.show({
@ -88,6 +118,7 @@
} }
}, },
async submit2() { async submit2() {
this.show2 = false
try{ try{
if(!this.value){ if(!this.value){
this.$refs.uToast.show({ this.$refs.uToast.show({

View File

@ -66,8 +66,11 @@
<u-checkbox name="0" label="水库调洪" class="checkItem"></u-checkbox> <u-checkbox name="0" label="水库调洪" class="checkItem"></u-checkbox>
<u-checkbox name="1" label="人员转移" class="checkItem"></u-checkbox> <u-checkbox name="1" label="人员转移" class="checkItem"></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
<text class="title">按时间</text> <div :style="{display:'flex',alignItems:'center'}">
<div :style="{display:'flex',marginTop:'10px'}"> <text class="title">按时间</text>
<u-switch v-model="isTime" size="20" :style="{margin:'2px 0 0 10px'}"></u-switch>
</div>
<div :style="{display:'flex',marginTop:'10px'}" v-if="isTime">
<view <view
class="tmPicker" class="tmPicker"
@click="showStmPicker = true" @click="showStmPicker = true"
@ -77,7 +80,7 @@
</view> </view>
<text :style="{width:'20%',lineHeight:'32px',textAlign:'center'}"></text> <text :style="{width:'20%',lineHeight:'32px',textAlign:'center'}"></text>
</div> </div>
<div :style="{display:'flex',marginTop:'10px'}"> <div :style="{display:'flex',marginTop:'10px'}" v-if="isTime">
<view <view
class="tmPicker" class="tmPicker"
@click="showEtmPicker = true" @click="showEtmPicker = true"
@ -150,25 +153,8 @@
showEtmPicker:false, showEtmPicker:false,
stm:Number(moment(new Date()).add(-7,'days')), stm:Number(moment(new Date()).add(-7,'days')),
etm:Number(new Date()), etm:Number(new Date()),
isTime:false,
list:[], list:[],
// {
// serial:'10',//
// year:'2023',//
// executeOrgCode:'',//
// executeOrgName:'',//
// dispatchType:'',//
// forwardOrgName:'',//
// startTm:'',//
// endTm:'',//
// content:'',//
// createTm:'',//
// createUserId:'id',//id
// createUserName:'',//
// status:'1',//0=1=2=
// createTm:'2023-10-10 12:12:10',
// dispatchId: '14'
// }
}; };
}, },
computed: { computed: {
@ -191,6 +177,7 @@
this.show = false this.show = false
}, },
reSet() { reSet() {
this.isTime = false
this.stm = Number(moment(new Date()).add(-7,'days')) this.stm = Number(moment(new Date()).add(-7,'days'))
this.etm = Number(new Date()) this.etm = Number(new Date())
this.check = ['0','1'] this.check = ['0','1']
@ -200,7 +187,9 @@
const params = { const params = {
status:this.tabVal, status:this.tabVal,
dispatchTypeList:this.check, dispatchTypeList:this.check,
dateTimeRangeSo:{ }
if(this.isTime){
params.dateTimeRangeSo = {
start:moment(this.stm).format('YYYY-MM-DD HH:mm:sss'), start:moment(this.stm).format('YYYY-MM-DD HH:mm:sss'),
end:moment(this.etm).format('YYYY-MM-DD HH:mm:sss') end:moment(this.etm).format('YYYY-MM-DD HH:mm:sss')
} }