|
|
@ -11,18 +11,35 @@ |
|
|
|
<van-tab title="已完成">内容 3</van-tab> |
|
|
|
</van-tabs> |
|
|
|
</div> |
|
|
|
<van-dialog v-model="showRole" title="请选择接单身份" show-cancel-button> |
|
|
|
<van-radio-group v-model="radio"> |
|
|
|
<van-radio name="1">单选框 1</van-radio> |
|
|
|
<van-radio name="2">单选框 2</van-radio> |
|
|
|
<van-dialog v-model="showRole" title="请选择接单身份" show-cancel-button @confirm="receiveService"> |
|
|
|
<van-radio-group v-model="serviceOrgType"> |
|
|
|
<van-radio :name="item.serviceOrgType" v-for="(item) in roleList" :key="item.id">{{item.serviceOrgName}}</van-radio> |
|
|
|
</van-radio-group> |
|
|
|
</van-dialog> |
|
|
|
<van-dialog v-model="showScope" title="" show-cancel-button @confirm="receiveService"> |
|
|
|
<van-datetime-picker |
|
|
|
v-model="serviceTimeStart" |
|
|
|
type="datetime" |
|
|
|
title="开始时间" |
|
|
|
:min-date="minDate" |
|
|
|
:max-date="maxDate" |
|
|
|
/> |
|
|
|
至 |
|
|
|
<van-datetime-picker |
|
|
|
v-model="serviceTimeStart" |
|
|
|
type="datetime" |
|
|
|
title="结束时间" |
|
|
|
:min-date="minDate" |
|
|
|
:max-date="maxDate" |
|
|
|
/> |
|
|
|
</van-dialog> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import card from './card.vue' |
|
|
|
import throttle from 'lodash/debounce' |
|
|
|
import { getServiceListRcv, getServiceListProcess , getServiceListCompleted,getCommonality,getMeasureDetail} from '@/api/service' |
|
|
|
import { getServiceListRcv, getServiceListProcess , getServiceListCompleted,getCommonalityDetail,getMeasureDetail, getListMyIdentities,receiveService} from '@/api/service' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -35,13 +52,14 @@ export default { |
|
|
|
total: 0, |
|
|
|
requestFlag:false, |
|
|
|
showRole:false, |
|
|
|
roleList:[ |
|
|
|
"公益岗-马魁1", |
|
|
|
"志愿者-马魁1" |
|
|
|
] |
|
|
|
roleList:[], |
|
|
|
serviceOrgType:null, |
|
|
|
serviceOrgId:null, |
|
|
|
showScope:null |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getListMyIdentities() |
|
|
|
this.getServiceListRcv() |
|
|
|
}, |
|
|
|
mounted() { |
|
|
@ -53,26 +71,51 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//提交接单 |
|
|
|
async receiveService(){ |
|
|
|
let parm = { |
|
|
|
...this.formData, |
|
|
|
serviceOrgType:this.serviceOrgType, |
|
|
|
serviceOrgId:this.serviceOrgId, |
|
|
|
id:this.serverId |
|
|
|
} |
|
|
|
console.log(parm); |
|
|
|
// let {data,code,msg} = await receiveService(parm) |
|
|
|
// if(code === 0){ |
|
|
|
// this.$toast.success('接单成功') |
|
|
|
// this.showRole = false; |
|
|
|
// this.pageNo = 1; |
|
|
|
// this.getTableData(); |
|
|
|
// } |
|
|
|
}, |
|
|
|
handleCLickReceive(item){ |
|
|
|
this.showRole = true; |
|
|
|
this.showRole = item.source === 4; |
|
|
|
this.showScope = item.source === 0; |
|
|
|
this.serverId = item.id; |
|
|
|
if(item.source === 4){ |
|
|
|
this.getMeasureDetail() |
|
|
|
}else { |
|
|
|
this.getCommonality() |
|
|
|
this.getCommonalityDetail() |
|
|
|
} |
|
|
|
console.log(item) |
|
|
|
}, |
|
|
|
async getListMyIdentities(){ |
|
|
|
let {data,code,msg} = await getListMyIdentities() |
|
|
|
if(code === 0){ |
|
|
|
this.roleList = data; |
|
|
|
this.serviceOrgId = data[0].id; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async getMeasureDetail(){ |
|
|
|
let {data,code,msg} = await getMeasureDetail() |
|
|
|
let {data,code,msg} = await getMeasureDetail({id:this.serverId}) |
|
|
|
if(code === 0){ |
|
|
|
console.log(data); |
|
|
|
this.formData = data; |
|
|
|
} |
|
|
|
}, |
|
|
|
async getCommonality(){ |
|
|
|
let {data,code,msg} = await getCommonality() |
|
|
|
async getCommonalityDetail(){ |
|
|
|
let {data,code,msg} = await getCommonalityDetail({id:this.serverId}) |
|
|
|
if(code === 0){ |
|
|
|
console.log(data); |
|
|
|
this.formData = data; |
|
|
|
} |
|
|
|
}, |
|
|
|
hadelChangeTab(e){ |
|
|
@ -158,11 +201,11 @@ export default { |
|
|
|
|
|
|
|
<style lang='less' scoped> |
|
|
|
:deep(.van-tabs__content){ |
|
|
|
padding: 0 10px; |
|
|
|
padding: 0 10px 20px; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
:deep(.van-dialog__content){ |
|
|
|
padding: 0 10px; |
|
|
|
padding:10px; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
</style> |
|
|
|