Browse Source

个性需求详情

test
mk 1 year ago
parent
commit
e7b58d0eb9
  1. 1
      .env.staging
  2. BIN
      epmet-work-h5-staging.zip
  3. 12
      src/App.vue
  4. 18
      src/assets/css/common.less
  5. 6
      src/assets/css/vant-theme.less
  6. 4
      src/config/env.staging.js
  7. 9
      src/router/router.config.js
  8. 13
      src/views/assistance/card.vue
  9. 38
      src/views/assistance/index.vue
  10. 174
      src/views/assistanceDetail/index.vue
  11. 4
      src/views/login/index.vue

1
.env.staging

@ -1,4 +1,5 @@
NODE_ENV='production' NODE_ENV='production'
# must start with VUE_APP_ # must start with VUE_APP_
VUE_APP_ENV = 'staging' VUE_APP_ENV = 'staging'
outputDir = 'epmet-work-h5-staging'

BIN
epmet-work-h5-staging.zip

Binary file not shown.

12
src/App.vue

@ -11,4 +11,14 @@ export default {
} }
} }
</script> </script>
<style lang="less"></style> <style lang="less">
.van-tabs__content {
padding: 0 10px 20px;
box-sizing: border-box;
}
.van-dialog__content {
padding: 10px;
box-sizing: border-box;
}
</style>

18
src/assets/css/common.less

@ -24,9 +24,9 @@
.card{ .card{
background-color: #fff; background-color: #fff;
border-radius: 2px; border-radius: 8px;
box-shadow: 0 1px 3px rgba(0,0,0,.3); box-shadow: 0 1px 3px rgba(0,0,0,.3);
padding: 15px; padding: 13px;
box-sizing: border-box; box-sizing: border-box;
width: auto; width: auto;
} }
@ -82,6 +82,10 @@
} }
} }
.p-18{
padding: 0 18px;
}
.font-size13{ .font-size13{
font-size: 13px; font-size: 13px;
} }
@ -107,3 +111,13 @@
width: 15px; width: 15px;
height: 17px; height: 17px;
} }
.bto_btn{
position: fixed;
bottom: 5px;
left: 0;
background: #ffffff;
width: 100%;
padding: 6px 26px;
box-sizing: border-box;
text-align: right;
}

6
src/assets/css/vant-theme.less

@ -10,7 +10,7 @@
@gray-7: #646566; @gray-7: #646566;
@gray-8: #323233; @gray-8: #323233;
@red: #ee0a24; @red: #ee0a24;
@blue: #1989fa; @blue: #3974f6;
@orange: #ff976a; @orange: #ff976a;
@orange-dark: #ed6a0c; @orange-dark: #ed6a0c;
@orange-light: #fffbe8; @orange-light: #fffbe8;
@ -170,7 +170,7 @@
@cell-line-height: 24px; @cell-line-height: 24px;
@cell-vertical-padding: 10px; @cell-vertical-padding: 10px;
@cell-horizontal-padding: @padding-md; @cell-horizontal-padding: @padding-md;
@cell-text-color: @text-color; @cell-text-color: @gray-6;
@cell-background-color: @white; @cell-background-color: @white;
@cell-border-color: @border-color; @cell-border-color: @border-color;
@cell-active-color: @active-color; @cell-active-color: @active-color;
@ -179,7 +179,7 @@
@cell-label-font-size: @font-size-sm; @cell-label-font-size: @font-size-sm;
@cell-label-line-height: 18px; @cell-label-line-height: 18px;
@cell-label-margin-top: 3px; @cell-label-margin-top: 3px;
@cell-value-color: @gray-6; @cell-value-color: @gray-8;
@cell-icon-size: 16px; @cell-icon-size: 16px;
@cell-right-icon-color: @gray-6; @cell-right-icon-color: @gray-6;
@cell-large-vertical-padding: @padding-sm; @cell-large-vertical-padding: @padding-sm;

4
src/config/env.staging.js

@ -1,8 +1,8 @@
module.exports = { module.exports = {
env: 'staging', env: 'staging',
title: 'e联社区', title: 'e联社区',
baseUrl: 'https://test.xxx.com', // 测试项目地址 baseUrl: 'http://192.168.1.144', // 测试项目地址
baseApi: 'https://test.xxx.com/api', // 测试api请求地址 baseApi: 'http://192.168.1.144/api', // 测试api请求地址
APPID: 'xxx', APPID: 'xxx',
APPSECRET: 'xxx', APPSECRET: 'xxx',
} }

9
src/router/router.config.js

@ -17,6 +17,7 @@ export const constantRouterMap = [
}, },
{ {
path: '/assistance', path: '/assistance',
name:'assistance',
component: () => import('@/views/assistance'), component: () => import('@/views/assistance'),
meta: { title: '诉求代办', keepAlive: false } meta: { title: '诉求代办', keepAlive: false }
}, },
@ -24,5 +25,11 @@ export const constantRouterMap = [
path: '/changePassword', path: '/changePassword',
component: () => import('@/views/mine/changePassword'), component: () => import('@/views/mine/changePassword'),
meta: { title: '修改密码', keepAlive: false } meta: { title: '修改密码', keepAlive: false }
} },
{
path: '/assistanceDetail',
name:'assistanceDetail',
component: () => import('@/views/assistanceDetail'),
meta: { title: '需求详情', keepAlive: false }
},
] ]

13
src/views/assistance/card.vue

@ -1,6 +1,7 @@
<template> <template>
<div class=''> <div class=''>
<div class="card rounded-corner m-top12" v-for="(item, index) in tableData"> <div class="card m-top12" v-for="(item, index) in tableData" :key="index" >
<div @click="$emit('handelTodetail',item)">
<div class="flex"> <div class="flex">
<van-tag :type="item.source % 2 === 0?'warning':'primary'">{{typeList[item.source]}}</van-tag> <van-tag :type="item.source % 2 === 0?'warning':'primary'">{{typeList[item.source]}}</van-tag>
<div class=" opacity5 m-left12 font-size13"> <div class=" opacity5 m-left12 font-size13">
@ -15,7 +16,9 @@
</div> </div>
<div class="m-top5 flex flex-center"> <div class="m-top5 flex flex-center">
<img src="@/assets/images/icon/time.png" class="small_img m-right7"> <img src="@/assets/images/icon/time.png" class="small_img m-right7">
{{ item.serviceTimeStart || '--'}} <div style="font-size: 15px;">
{{ item.serviceTimeStart || '--'}} <span v-if="item.source === 1"> {{item.serviceTimeEnd || '--'}}</span>
</div>
</div> </div>
<div class="m-top5 "> <div class="m-top5 ">
<div class="flex flex-center3"> <div class="flex flex-center3">
@ -23,11 +26,13 @@
<div class="van-multi-ellipsis--l2">{{ item.summary }}</div> <div class="van-multi-ellipsis--l2">{{ item.summary }}</div>
</div> </div>
</div> </div>
<hr class=" m-top12-right opacity5"> </div>
<hr class="m-top12-right opacity5">
<div class="flex flex-fend m-top12-right"> <div class="flex flex-fend m-top12-right">
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 10" @click="$emit('handleCLickReceive',item)">接单</van-button> <van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 10" @click="$emit('handleCLickReceive',item)">接单</van-button>
<van-button size="small" type="default" round class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 && item.source === 4 ">联系需求人</van-button> <van-button size="small" type="default" round class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 && item.source === 4 ">联系需求人</van-button>
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20" @click="$emit('handelServiceConfirm',item)">确认服务</van-button> <van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 &&!item.confirmedFlag" @click="$emit('handelServiceConfirm',item)">确认服务</van-button>
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 && item.confirmedFlag">完成服务</van-button>
</div> </div>
</div> </div>

38
src/views/assistance/index.vue

@ -3,20 +3,22 @@
<div class="scroll-box" ref="scroll-content"> <div class="scroll-box" ref="scroll-content">
<van-tabs :active="active" sticky @change="hadelChangeTab"> <van-tabs :active="active" sticky @change="hadelChangeTab">
<van-tab title="待接单"> <van-tab title="待接单">
<card :tableData="list" @handleCLickReceive="handleCLickReceive"> <card :tableData="list" @handleCLickReceive="handleCLickReceive" @handelTodetail="handelTodetail">
</card> </card>
</van-tab> </van-tab>
<van-tab title="待处理"> <van-tab title="待处理">
<card :tableData="list" @handelServiceConfirm="handelServiceConfirm"></card> <card :tableData="list" @handelServiceConfirm="handelServiceConfirm"
@handelTodetail="handelTodetail"></card>
</van-tab> </van-tab>
<van-tab title="已完成"> <van-tab title="已完成">
<card :tableData="list"></card> <card :tableData="list" @handelTodetail="handelTodetail"></card>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
<van-dialog v-model="showRole" title="请选择接单身份" show-cancel-button @confirm="receiveService"> <van-dialog v-model="showRole" title="请选择接单身份" show-cancel-button @confirm="receiveService">
<van-radio-group v-model="serviceOrgType"> <van-radio-group v-model="serviceOrgType">
<van-radio :name="item.serviceOrgType" v-for="(item) in roleList" :key="item.id">{{ item.serviceOrgName <van-radio :name="item.serviceOrgType" v-for="(item) in roleList" :key="item.id"
@click="handelChangeRole(item.serviceOrgId)">{{ item.serviceOrgName
}}</van-radio> }}</van-radio>
</van-radio-group> </van-radio-group>
</van-dialog> </van-dialog>
@ -35,7 +37,6 @@
}}</van-radio> }}</van-radio>
</van-radio-group> </van-radio-group>
</van-dialog> </van-dialog>
<van-popup v-model="showPopup" position="bottom"> <van-popup v-model="showPopup" position="bottom">
<van-datetime-picker v-if="showStart" v-model="serviceTimeStart" type="datetime" title="开始时间" <van-datetime-picker v-if="showStart" v-model="serviceTimeStart" type="datetime" title="开始时间"
@confirm="handelCLickConfirmStart" @cancel="showPopup = false" :min-date="minDate" /> @confirm="handelCLickConfirmStart" @cancel="showPopup = false" :min-date="minDate" />
@ -76,7 +77,8 @@ export default {
minDate: new Date(), minDate: new Date(),
treeOptions: null, treeOptions: null,
cascaderValue: null, cascaderValue: null,
serviceScopeName: null serviceScopeName: null,
formData:{},
}; };
}, },
created() { created() {
@ -93,6 +95,15 @@ export default {
}) })
}, },
methods: { methods: {
async handelTodetail(item){
this.serverId = item.id;
if (item.source === 4) {
await this.getMeasureDetail()
} else {
await this.getCommonalityDetail()
}
this.$router.push({name:'assistanceDetail',params:{detail:this.formData,selfObj:item}})
},
onFinish(value) { onFinish(value) {
this.showTree = false; this.showTree = false;
this.showPopup = false; this.showPopup = false;
@ -130,7 +141,9 @@ export default {
if (code === 0) { if (code === 0) {
this.$toast.success('接单成功') this.$toast.success('接单成功')
this.showRole = false; this.showRole = false;
this.showScope = false;
this.pageNo = 1; this.pageNo = 1;
this.requestFlag = true;
this.list = []; this.list = [];
this.getTableData(); this.getTableData();
} }
@ -237,8 +250,7 @@ export default {
}).then(res => { }).then(res => {
this.total = res.total; this.total = res.total;
this.requestFlag = res.data.list.length === this.pageSize; this.requestFlag = res.data.list.length === this.pageSize;
this.list = res.data.list; this.list = this.list.concat(res.data.list)
}).catch(err => { }).catch(err => {
}) })
}, },
@ -250,7 +262,7 @@ export default {
}).then(res => { }).then(res => {
this.total = res.total; this.total = res.total;
this.requestFlag = res.data.list === this.pageSize; this.requestFlag = res.data.list === this.pageSize;
this.list = this.list.concat(...this.list, ...res.list); this.list = this.list.concat(res.data.list)
}).catch(err => { }).catch(err => {
}) })
} }
@ -265,13 +277,5 @@ export default {
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
:deep(.van-tabs__content) {
padding: 0 10px 20px;
box-sizing: border-box;
}
:deep(.van-dialog__content) {
padding: 10px;
box-sizing: border-box;
}
</style> </style>

174
src/views/assistanceDetail/index.vue

@ -0,0 +1,174 @@
<template>
<div class='pages'>
<section>
<div class="card m-top12">
<div class="m-top5 flex flex-center">
<img src="@/assets/images/icon/address.png" class="small_img m-right7">
{{ detail.serviceTargetName || '--' }} {{ detail.serviceTargetMobile }}<br>
</div>
<div class="opacity5 font-size13 m-top5" style="margin-left: 29px;">{{ detail.serviceTargetAddress }}
</div>
<div class="m-top5 flex flex-center">
<img src="@/assets/images/icon/time.png" class="small_img m-right7">
<div>
{{ detail.serviceStartTime || '--' }}
</div>
</div>
<div class="m-top5 ">
<div class="flex flex-center3">
<img src="@/assets/images/icon/content.png" style="vertical-align: top;"
class="small_img m-right7">
<div class="van-multi-ellipsis--l2">{{ detail.content }}</div>
</div>
</div>
</div>
<div class="card m-top12" style="padding: 5px;">
<van-cell title="服务类型" :value="sourceName" />
<van-cell title="需求分类" :value="detail.categoryName" />
<van-cell title="上报人" :value="detail.serviceTargetName + detail.serviceTargetMobile" />
<van-cell title="上报时间" :value="detail.reportTime" />
</div>
</section>
<div class="bto_btn">
<van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="selfObj.processStatus === 10" @click="showRole = true">接单</van-button>
</div>
<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"
@click="handelChangeRole(item.serviceOrgId)">{{ item.serviceOrgName
}}</van-radio>
</van-radio-group>
</van-dialog>
<van-dialog v-model="showScope" title="" show-cancel-button @confirm="receiveService">
<p>服务时间</p>
<span @click="showStart = true, showPopup = true" class="font-size13">{{ serviceTimeStart || '开始时间'
}}</span><span class="tag-date"></span><span @click="showEnd = true, showPopup = true"
class="font-size13">{{ serviceTimeEnd || '结束时间' }}</span>
<p>服务范围</p>
<span class="font-size13" @click="showTree = true, showPopup = true">{{ serviceScopeName || '请选择范围'
}}</span>
<p>接单身份</p>
<van-radio-group v-model="serviceOrgType">
<van-radio :name="item.serviceOrgType" v-for="(item) in roleList" :key="item.id"
@click="handelChangeRole(item.serviceOrgId)">{{ item.serviceOrgName
}}</van-radio>
</van-radio-group>
</van-dialog>
<van-popup v-model="showPopup" position="bottom">
<van-datetime-picker v-if="showStart" v-model="serviceTimeStart" type="datetime" title="开始时间"
@confirm="handelCLickConfirmStart" @cancel="showPopup = false" :min-date="minDate" />
<van-datetime-picker v-if="showEnd" v-model="serviceTimeEnd" @confirm="handelCLickConfirmEnd"
@cancel="showPopup = false" type="datetime" title="结束时间" :min-date="minDate" />
<van-cascader v-if="showTree" v-model="cascaderValue" title="请选择范围" :options="treeOptions"
@close="showTree = false, showPopup = false" @finish="onFinish"
:field-names="{ text: 'objectName', value: 'objectId' }" />
</van-popup>
</div>
</template>
<script>
import {receiveService,getListMyIdentities,getServiceScopeTree } from '@/api/service'
export default {
data() {
return {
detail: null,
typeList:['公共服务','共性需求','政策找人','服务找人','个性需求','温暖找人','技能找人','岗位找人'],
id:null,
showPopup: false,
showStart: false,
showEnd: false,
showTree: false,
showScope: false,
minDate: new Date(),
treeOptions: null,
cascaderValue: null,
serviceScopeName: null,
serviceTimeStart: null,
serviceTimeEnd: null,
roleList: [],
serviceOrgType: null,
serviceOrgId: null,
showRole: false,
};
},
created() {
this.getListMyIdentities()
this.getServiceScopeTree()
},
mounted() {
this.detail = this.$route.params.detail;
this.selfObj = this.$route.params.selfObj;
this.source = this.selfObj.source;
this.id = this.selfObj.id;
this.sourceName = this.typeList[this.source]
},
methods: {
handelChangeRole(val) {
this.serviceOrgId = val;
},
onFinish(value) {
this.showTree = false;
this.showPopup = false;
this.serviceScopeList = value.selectedOptions.map(item => ({ objectType: item.objectType, objectId: item.objectId, objectName: item.objectName }))
this.serviceScopeName = value.selectedOptions.map(item => item.objectName).join('-')
},
//
async receiveService() {
let parm = {
...this.selfObj,
id: this.id,
}
if (this.showScope) {
parm.serviceScopeList = this.serviceScopeList;
parm.serviceTimeStart = this.serviceTimeStart;
parm.serviceTimeEnd = this.serviceTimeEnd;
parm.serviceOrgType = this.serviceOrgType;
parm.serviceOrgId = this.serviceOrgId;
} else if (this.showRole) {
parm.serviceOrgType = this.serviceOrgType;
parm.serviceOrgId = this.serviceOrgId;
}
console.log(parm);
let { data, code, msg } = await receiveService(parm)
if (code === 0) {
this.$toast.success('接单成功')
this.showRole = false;
this.showScope = false;
this.$router.back()
}
},
async getListMyIdentities() {
let { data, code, msg } = await getListMyIdentities()
if (code === 0) {
this.roleList = data;
}
},
async getServiceScopeTree() {
let { data, code, msg } = await getServiceScopeTree({ id: this.serverId })
if (code === 0) {
this.treeOptions = [data];
}
},
},
components: {},
computed: {},
watch: {},
}
</script>
<style lang='less' scoped>
.pages{
padding: 0 10px;
box-sizing: border-box;
}
:deep(.van-cell__value){
text-align:left;
}
:deep(.van-cell__title){
max-width: 80px;
}
:deep(.van-button--small){
padding: 12px 30px;
}
</style>

4
src/views/login/index.vue

@ -11,7 +11,7 @@
</div> </div>
<van-button type="info" round block style="margin-top: 35px;" native-type="submit">登录</van-button> <van-button type="info" round block style="margin-top: 35px;" native-type="submit">登录</van-button>
</van-form> </van-form>
<div class="flex flex-end flex-center1 m-"> <div class="flex flex-end flex-center1 m-top12 p-18 font-size13">
<van-checkbox v-model="autoLogin" shape="square">下次自动登录</van-checkbox> <van-checkbox v-model="autoLogin" shape="square">下次自动登录</van-checkbox>
<span class="text-blue">忘记密码?</span> <span class="text-blue">忘记密码?</span>
</div> </div>
@ -67,7 +67,7 @@ export default {
let { data, code, msg } = await login(parms) let { data, code, msg } = await login(parms)
if (code === 0) { if (code === 0) {
localStorage.setItem("token", data.token); localStorage.setItem("token", data.token);
this.$router.replace({name:'mine'}) this.$router.replace({name:'assistance'})
} else { } else {
console.log(msg); console.log(msg);
} }

Loading…
Cancel
Save