提交 e1c95189 编写于 作者: tao.wu's avatar tao.wu

no message

上级 773036e7
......@@ -7,6 +7,8 @@ import {getPlanList,
getResidentDetail,
getBasicData,
changePlan,
getFormOptions,
getFollowupTemplate,
createFollowPlan} from '../../utils/followup/followapis'
export default {
......@@ -27,7 +29,18 @@ export default {
setTimeNodeList: [], //新建计划设置时间节点
planList: {}, //随访计划列表
remarkOption: [], //随访计划备注常量
markOptions: [], //随访 随访时间节点单位 常量
followTypeList: [], //随访 随访方式 常量
remindOptions: [], //随访 提醒医生天数 常量
pushTimeOptions: [], //随访 推送患教提醒天数 常量
planStatusOption: [], //随访计划状态常量
formOptions: [],// 获取量表
templateOptions: [ // 获取随访计划模板
{
id: 0,
name: '目前请选择自定义模板作为测试'
}
],
},
mutations: {
GET_RESIDENT_LIST(state, payload) {
......@@ -46,6 +59,18 @@ export default {
GET_REMARK_OPTION(state, payload) {
state.remarkOption = payload.P211
},
GET_DATE_UNIT(state, payload){
state.markOptions = payload.P017
},
GET_FOLLOW_TYPE_LIST(state, payload){
state.followTypeList = payload.P212
},
GET_REMIND_OPTIONS(state, payload){
state.remindOptions = payload.P213
},
GET_PUSH_TIME_OPTIONS(state, payload){
state.pushTimeOptions = payload.P214
},
GET_PLAN_STATUS_OPTION(state, payload) {
state.planStatusOption = payload.P216
},
......@@ -64,6 +89,12 @@ export default {
GET_PLAN_LIST(state, payload) {
state.planList = payload
},
GET_FORM_OPTIONS(state, payload){
state.formOptions = payload
},
GET_FOLLOW_TEMPLATE(state, payload){
state.templateOptions = state.templateOptions.concat(payload)
}
},
actions: {
setFollowPlan(context, payload) {
......@@ -107,6 +138,50 @@ export default {
context.commit('GET_REMARK_OPTION', data);
});
},
getDateUnit(context, payload){
// 随访时间节点单位
getBasicData({
numList: 'P017'
}).then(({data})=>{
context.commit('GET_DATE_UNIT', data);
})
},
getFollowTypeList(context, payload){
// 随访方式
getBasicData({
numList: 'P212'
}).then(({data})=>{
context.commit('GET_FOLLOW_TYPE_LIST', data);
})
},
getRemindOptions(context, payload){
// 提醒医生天数
getBasicData({
numList: 'P213'
}).then(({data})=>{
context.commit('GET_REMIND_OPTIONS', data);
})
},
getPushTimeOptions(context, payload){
// 推送患教提醒天数
getBasicData({
numList: 'P214'
}).then(({data})=>{
context.commit('GET_PUSH_TIME_OPTIONS', data);
})
},
getFormOptions(context, payload){
// 获取量表
getFormOptions().then(({data})=>{
context.commit('GET_FORM_OPTIONS', data);
})
},
getFollowupTemplate(context, payload){
// 获取随访模板
getFollowupTemplate().then(({data})=>{
context.commit('GET_FOLLOW_TEMPLATE', data);
})
},
getPlanStatusOption(context, payload) {
getBasicData({
numList: 'P216'
......
......@@ -203,7 +203,6 @@ export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => {
//获取新建计划居民列表
export const getPlanPatientsList = (data) =>{
data = data || {}
return fetch({
headers:{
sysCode: 9
......@@ -215,7 +214,27 @@ export const getPlanPatientsList = (data) =>{
},)
}
// 获取随访计划模板列表
export const getFollowupTemplate = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/plans/templets`),
method: 'get',
data: data,
description: '获取随访计划模板列表',
})
}
// 获取量表列表
export const getFormOptions = (data)=>{
return fetch({
headers,
url: getFollowUpSC(`/followup/entering/scale/list`),
method: 'get',
data: data,
description: '获取量表列表',
})
}
/*常量*/
export const getBasicData = (params) => {
......
......@@ -58,6 +58,7 @@
</el-form>
<el-table
:data="patientsData"
ref="multipleTable"
center
style="width: 100%;margin-top: 20px;"
@selection-change="handleSelectionChange">
......@@ -106,7 +107,7 @@
@current-change="handleCurrentChangePre"
layout="total, sizes, prev, pager, next, jumper"
:current-page="paginationSet.pageNum"
:page-sizes="[10, 20, 50, 100]"
:page-sizes="[5,10,50,100]"
:page-size="paginationSet.pageSize"
:total="paginationSet.total">
</el-pagination>
......@@ -129,18 +130,10 @@
data() {
return {
showSelectPatient: true,
selectedPatients: [],
patientIdList: [],
patientsData: [
// {
// name: '买了',
// sex: '女',
// age: 30,
// mobilePhone: '13298073647',
// diseaseId: '高血压',
// labelId: '高危筛查项目-非高危'
// }
],
allSelects: [],
eachSelects: [],//仅仅是操作选择的总人员
// totalSelect: [],// 当前所选的人
patientsData: [],
searchData: {
sex: 'all',
ageRange: '0',
......@@ -150,7 +143,7 @@
},
paginationSet: {
pageNum: 1,
pageSize: 10,
pageSize: 5,
total: 0
},
sexOptions: [{
......@@ -205,56 +198,67 @@
}
},
props: {
isShowSelectPatient: { //是否显示model
type: Boolean,
default: function() {
return false;
}
},
// nodeTimeList: {
// type: Array,
// default: function() {
// return []
// }
// }
isShowSelectPatient: Boolean, //是否显示model,
patientIdList: Array,// 确定已经选过的居民
},
watch: {
isShowSelectPatient(val){
if(val){
getPlanPatientsList({
"pageSize":15,
"pageNo":1
}).then(res=>{
this.patientsData = res.data.patientList
})
this.getPatientsList(this.paginationSet.pageNum)
}
}
},
mounted() {
// if(this.planId) {
//
// }
},
methods: {
clickClose() {
this.$emit('closeSelectPatient',false)
getPatientsList(pageNum){
getPlanPatientsList({
pageSize: this.paginationSet.pageSize,
pageNo: pageNum
}).then(res=>{
if(res.data.patientList){
this.patientsData = res.data.patientList //接口获取的当页居民
this.paginationSet.total = res.data.totalRows
// 设置所请求的当页人员是否成为选中状态
if(this.patientIdList.length > 0){
this.patientsData.forEach((item)=>{
if(this.patientIdList.includes(item.patientId)){// 如果已经选过居民
this.$nextTick(()=>{
this.$refs.multipleTable.toggleRowSelection(item,true);
})
}
})
}
}
})
},
searchHandler() {
console.log('搜索')
},
// 对选中的居民进行去重
removeDuplicates(list){
return Array.from(new Set(list))
},
// 选择居民
handleSelectionChange(val) {
console.log('选中居民',val)
this.selectedPatients = val;
console.log('每次选中居民',val)
this.eachSelects = val
},
handleSizeChangePre() {},
handleCurrentChangePre() {},
sureClick() {
this.selectedPatients.forEach((item)=>{
this.patientIdList.push(item.patientId)
})
this.$emit('sureSelectPatient',false,this.patientIdList)
// 切换分页
handleCurrentChangePre(val) {
console.log('handleCurrentChangePre')
this.getPatientsList(val)
},
clickClose(){
this.$emit('closeSelectPatient',false)
},
sureClick(){
this.$emit('sureSelectPatient',false,this.eachSelects)
},
handleSizeChangePre(val) {
console.log('handleSizeChangePre')
this.paginationSet.pageSize = val
this.getPatientsList(this.paginationSet.pageNum)
},
}
}
</script>
......
......@@ -84,9 +84,9 @@
placeholder="请选择">
<el-option
v-for="item in formOptions"
:key="item.no"
:label="item.value"
:value="item.no">
:key="item.scaleNo"
:label="item.name"
:value="item.scaleNo">
</el-option>
</el-select>
</el-form-item>
......@@ -100,37 +100,23 @@
export default {
components: {
SelectCartoon},
SelectCartoon
},
data() {
const checkDay = (rule, value, callback)=>{
const num = parseFloat(value)
if(num < 1 || num>99){
return callback(new Error('日期不能大于99天或小于0天'));
}
callback();
}
return {
isSelectCartoon: false,
// indexOptions: [
// {
// no: 0,
// value: 0
// }, {
// no: 1,
// value: 1
// }
// ],
formOptions: [
{
no: 0,
value: '随访登记表1'
}, {
no: 1,
value: '随访登记表2'
},
{
no: 2,
value: '随访登记表3'
},
],
followResourceId: '',
pushDay: '',
remindDay: '',
timeFormRules: {
timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' },{ validator: checkDay, trigger: 'blur' }],
timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
type: [{ required: true, message: '请选择随访方式', trigger: 'change' }],
},
......@@ -145,6 +131,7 @@
followTypeList:Array,
remindOptions:Array,
pushTimeOptions:Array,
formOptions: Array
},
watch: {
valBegin(val){
......
......@@ -30,6 +30,7 @@
:remindOptions="remindOptions"
:pushTimeOptions="pushTimeOptions"
:followTypeList="followTypeList"
:formOptions="formOptions"
@checkValid="checkValid"
/>
</div>
......@@ -43,6 +44,7 @@
:remindOptions="remindOptions"
:pushTimeOptions="pushTimeOptions"
:followTypeList="followTypeList"
:formOptions="formOptions"
@checkValid="checkValid"
/>
</div>
......@@ -56,10 +58,9 @@
import _ from 'lodash';
import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon';
import SetTimeForm from '@/views/followup/plan-manage/dialog/set-time-form';
import {getFormOptions} from '@/utils/followup/followapis'
import {getBasicData} from '@/utils/followup/followapis'
import { mapState } from 'vuex'
import { mapState,mapActions } from 'vuex'
const timeFormInit = {
formRef: '',
type: '',//随访方式
......@@ -89,10 +90,6 @@
currentFormRef: 1,
showSetBtn: true,
timeForm: _.cloneDeep(timeFormInit),
markOptions: [],
followTypeList:[],
remindOptions: [],
pushTimeOptions: [],
timeFormRules: {
timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
......@@ -104,13 +101,17 @@
setTimeNodeList: Array
},
computed: {
// ...mapState('planManage',{
// setTimeNodeList: state => state.setTimeNodeList,
// }),
...mapState('planManage',{
markOptions: state => state.markOptions,
followTypeList: state => state.followTypeList,
remindOptions: state => state.remindOptions,
pushTimeOptions: state => state.pushTimeOptions,
formOptions: state => state.formOptions,
}),
setTimeNodeList1(){
return this.sortKey(this.setTimeNodeList,'timeNo')
},
followupMarkOne() {
item() {
if(this.setTimeNodeList.length == 0) {
return;
}else {
......@@ -119,6 +120,8 @@
},
},
created() {
this.getConstData()
//初始化一个随访时间节点
this.activeTab = 'setNewRef';
this.timeForm.formRef = this.getNowTime();
......@@ -126,7 +129,6 @@
this.timeForm.isDisabled = true;
this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit;
}
this.getConstdata()
},
watch: {
valBegin(val){
......@@ -150,42 +152,32 @@
});
this.setTimeNodeList1[0].isDisabled = false;
},
followupMarkOne(newVal, oldVal){
if(newVal != oldVal){
this.setTimeNodeList1.map(item=>{
item.timeUnit = this.setTimeNodeList1[0].timeUnit
});
}
}
},
methods: {
...mapActions('planManage', [
'getDateUnit',
'getFollowTypeList',
'getRemindOptions',
'getPushTimeOptions',
'getFormOptions'
]),
// 一次性获取常量接口数据
getConstdata(){
getConstData(){
// 随访时间节点单位
getBasicData({numList: 'P017'}).then(res=>{
this.markOptions = res.data['P017']
})
this.getDateUnit()
// 随访方式
getBasicData({numList: 'P212'}).then(res=>{
this.followTypeList = res.data['P212']
})
this.getFollowTypeList()
// 提醒医生天数
getBasicData({numList: 'P213'}).then(res=>{
this.remindOptions = res.data['P213']
})
this.getRemindOptions()
// 推送患教提醒天数
getBasicData({numList: 'P214'}).then(res=>{
this.pushTimeOptions = res.data['P214']
})
this.getPushTimeOptions()
// 获取量表
this.getFormOptions()
},
checkValid(val){
this.valBegin = false
if (val) {
// console.log(this.timeForm)
if(this.timeForm.remindDay.length>0){
this.timeForm.remindDay.forEach((item)=>{
this.timeForm.remindList.push({
......@@ -193,7 +185,7 @@
})
})
}
if(this.timeForm.pushContentList.length>0){
if(this.timeForm.pushDay){
this.timeForm.pushContentList.push({
startDays: this.timeForm.pushDay,
resourceId: ''
......
......@@ -44,9 +44,9 @@
clearable>
<el-option
v-for="item in templateOptions"
:key="item.no"
:label="item.value"
:value="item.no">
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
......@@ -66,7 +66,7 @@
placeholder="请选择随访种类"
clearable>
<el-option
v-for="item in kindOptions"
v-for="item in remarkOption"
:key="item.no"
:label="item.value"
:value="item.no">
......@@ -81,7 +81,12 @@
</div>
</div>
<select-patient :isShowSelectPatient="isShowSelectPatient" @closeSelectPatient="closeSelectPatient" @sureSelectPatient="sureSelectPatient(arguments)"></select-patient>
<select-patient
:isShowSelectPatient="isShowSelectPatient"
:patientIdList="hasSelectedList"
@closeSelectPatient="closeSelectPatient"
@sureSelectPatient="sureSelectPatient(arguments)"
/>
<has-selected-patient :isShowSelectedDialog="isShowSelectedDialog" :hasSelectedList="hasSelectedList" @closeSelectedDialog="closeSelectedDialog" @continueAdd="continueAdd"></has-selected-patient>
</div>
</template>
......@@ -91,7 +96,7 @@
import SelectPatient from '@/views/followup/plan-manage/dialog/select-patient';
import HasSelectedPatient from '@/views/followup/plan-manage/dialog/has-selected-patient';
import SetTimeNode from '@/views/followup/plan-manage/dialog/set-time-node';
import {createFollowPlan,getBasicData} from '@/utils/followup/followapis'
import {createFollowPlan} from '@/utils/followup/followapis'
import { mapState, mapActions } from 'vuex'
export default {
......@@ -112,7 +117,6 @@
activeTab: 'first',
noChoice: false,
baseInfo: {
name: '',//随访计划名称
patientIdList: [],//随访居民列表
......@@ -125,13 +129,6 @@
isShowSelectPatient: false,
isShowSelectedDialog: false,
hasSelectedList: [],
templateOptions: [
{
no: 0,
value: '目前请选择自定义模板作为测试'
}
],
kindOptions: [],
rules: {
name: [{ required: true, message: '请输入随访计划名称', trigger: 'blur' }],
hasSelectedNum: [{ required: true, message: '请添加随访居民', trigger: 'change' }],
......@@ -142,11 +139,9 @@
},
created() {
// 获取备注
getBasicData({
numList: 'P211'
}).then(res=>{
this.kindOptions = res.data['P211']
})
this.getRemarkOption()
// 获取随访计划模板列表
this.getFollowupTemplate()
},
mounted() {
//清理store中存的数据setTimeNodeList
......@@ -155,10 +150,12 @@
computed: {
...mapState('planManage',{
setTimeNodeList: state => state.setTimeNodeList,
remarkOption: state => state.remarkOption,
templateOptions: state => state.templateOptions,
})
},
methods: {
...mapActions('planManage', ['getTimeNodeList']),
...mapActions('planManage', ['getTimeNodeList','getRemarkOption','getFollowupTemplate']),
setTimeNodeListOnCom(val){
this.getTimeNodeList(val)
},
......@@ -177,9 +174,13 @@
sureSelectPatient() {
let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0];
this.hasSelectedList = getArguments[1];
this.baseInfo.patientIdList = getArguments[1];
this.baseInfo.hasSelectedNum = getArguments[1].length;
const selectPatients = getArguments[1]; // 每次选中获取的人
this.hasSelectedList = [];
selectPatients.forEach((item)=>{
this.hasSelectedList.push(item.patientId); // 页面中数据存储所有选择的人,没有去重
})
this.baseInfo.patientIdList = this.hasSelectedList
this.baseInfo.hasSelectedNum = this.baseInfo.patientIdList.length;
},
continueAdd(val) {
this.isShowSelectedDialog = val;
......@@ -223,11 +224,11 @@
},
saveEdit() {
this.baseInfo.fPlanTimeReqList = this.setTimeNodeList
// 提交
createFollowPlan(this.baseInfo)
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
// console.log('store中的setTimeNodeList数据为=>',JSON.stringify(this.setTimeNodeList))
// console.log('保存timeForm',this.$refs.getTimeNodeList.timeForm)
// 各种校验通过后,提交编辑内容,toast提示
this.$notify.success({
title: '',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册