提交 e002c00b 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

随访时间列表

上级 41a0c75c
......@@ -10,7 +10,8 @@ export default {
},
groupList: [], //分组列表
residentDetail: {}, //居民详情,
planDetail: {}, // 计划详情页
planDetail: {}, // 计划详情页,
nodeTimeList: [], //随访时间节点列表
},
mutations: {
......@@ -25,6 +26,9 @@ export default {
},
GET_PLAN_DETAIL(state, payload) {
state.planDetail = payload
},
GET_NODE_TIME_LIST(state, payload) {
state.nodeTimeList = payload
}
},
actions: {
......@@ -56,6 +60,13 @@ export default {
}).then(({data}) => {
context.commit('GET_PLAN_DETAIL', data);
});
},
getNodeTimeList(context, payload) {
followApi.getNodeTimeList({}, {
urlSuffix:payload
}).then(({data}) => {
context.commit('GET_NODE_TIME_LIST', data);
});
}
},
}
......@@ -8,18 +8,25 @@ import utils from './followupUtils';
/*计划管理API*/
const planManageApi = [
{
url: '/followup/planPatient/',
url: '/plans/',
method: 'get',
params: 'params',
name: 'getResidentList',
description: '获取居民列表',
name: 'getPlanDetail',
description: '获取计划详情',
},
{
url: '/plans/',
url: '',
method: 'get',
params: 'params',
name: 'getPlanDetail',
description: '获取计划详情',
name: 'getNodeTimeList',
description: '获取随访时间节点列表',
},
{
url: '/followup/planPatient/',
method: 'get',
params: 'params',
name: 'getResidentList',
description: '获取居民列表',
},
{
url: '/followup/planPatient/group',
......@@ -91,12 +98,18 @@ apis.forEach(item => api[item.name] = (params = {}, extraConfig = {}) => {
// method: item.method,
// };
let config = {};
if(item.name == 'getBasicData'){
if (item.name == 'getBasicData') {
config = {
url: getBasicDataApi(item.url),
method: item.method,
};
}else {
} else if (item.name == 'getNodeTimeList') {
let url = `/plan/${extraConfig.urlSuffix}/time`
config = {
url: getFollowUpApi(url),
method: item.method,
};
} else {
config = {
url: getFollowUpApi(item.url),
method: item.method,
......
......@@ -8,25 +8,21 @@
center>
<div class="finish-content">
<el-table
:data="followUpTimeList"
:data="nodeTimeList"
center
style="width: 100%;margin-top: 20px;">
<el-table-column
prop="nickName"
prop="timeStr"
label="随访计划开始时间"
align="center">
</el-table-column>
<el-table-column
prop="mobilePhone"
prop="num"
label="人数"
align="center">
</el-table-column>
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button class="button-green" @click="clickClose" type="primary">取 消</el-button>
<el-button class="button-white" @click="clickClose" plain>确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -41,18 +37,26 @@
return false;
}
},
followUpTimeList: {
nodeTimeList: {
type: Array,
default: function() {
return []
}
}
},
mounted() {
if(this.planId) {
}
},
data() {
return {
showFollowTime: true
showFollowTime: true,
followUpTimeList: []
}
},
methods: {
clickClose() {
this.$emit('closeFollowTime',false)
......
......@@ -23,7 +23,7 @@
<div class="group-info base-content">
<div class="content-div">
<div class="c-title">随访居民:</div>
<div class="c-content">{{planDetail.num}}<el-button type="text" @click="goToResidentList">查看居民></el-button></div>
<div class="c-content has-operation">{{planDetail.num}}<el-button type="text" @click="goToResidentList">查看居民></el-button></div>
</div>
</div>
<div class="followup-info base-content">
......@@ -35,7 +35,7 @@
<div class="followup-info base-content">
<div class="content-div">
<div class="c-title">随访开始时间:</div>
<div class="c-content">{{planDetail.timeStr}} <el-button type="text" @click="goToFollowTime">查看全部></el-button></div>
<div class="c-content has-operation">{{planDetail.timeStr}} <el-button class="btn-text" type="text" @click="goToFollowTime">查看全部></el-button></div>
</div>
</div>
<div class="followup-info base-content">
......@@ -77,7 +77,7 @@
</div>
</div>
</div>
<follow-time :showThisPage="showFollowTime" @closeFollowTime="closeFollowTime"></follow-time>
<follow-time :showThisPage="showFollowTime" :nodeTimeList="nodeTimeList" @closeFollowTime="closeFollowTime"></follow-time>
</div>
</template>
......@@ -111,15 +111,17 @@
},
mounted() {
this.getPlanDetail(this.$route.query.planId); //获取居民详情
this.getNodeTimeList(this.planId); // 获取随访时间列表
},
computed: {
...mapState('planManage', {
residentDetail: state => state.residentDetail,
planDetail: state => state.planDetail,
nodeTimeList: state => state.nodeTimeList
})
},
methods: {
...mapActions('planManage', ['getResidentDetail', 'getPlanDetail']),
...mapActions('planManage', ['getResidentDetail', 'getPlanDetail', 'getNodeTimeList']),
goToFollowTime() {
this.showFollowTime = true
},
......@@ -172,6 +174,13 @@
width: 115px;
}
}
.has-operation {
button {
height: 19.2px;
padding: 0 0 0 15px;
}
}
}
}
.time-nodes {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册