服务包管理修改
This commit is contained in:
parent
37649f4f71
commit
1563987bbf
@ -402,10 +402,11 @@
|
|||||||
:rules="rules.voList.serviceWayName"
|
:rules="rules.voList.serviceWayName"
|
||||||
:prop="`voList.${index}.serviceWayName`"
|
:prop="`voList.${index}.serviceWayName`"
|
||||||
>
|
>
|
||||||
|
<!-- 这儿的格式嵌套是不是写的有问题呢 el-form-item里面嵌套el-form-item? -->
|
||||||
<el-select
|
<el-select
|
||||||
v-model="aitem.serviceWayName"
|
v-model="aitem.serviceWayName"
|
||||||
placeholder="请选择服务方式"
|
placeholder="请选择服务方式"
|
||||||
@change="changeway"
|
@change="changeway($event,index)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in optionsway"
|
v-for="item in optionsway"
|
||||||
@ -424,10 +425,10 @@
|
|||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
v-model="aitem.serviceContent"
|
v-model="aitem.serviceContent"
|
||||||
placeholder="请选择服务内容"
|
placeholder="请选择服务内容"
|
||||||
@change="changcontent"
|
@change="changcontent($event,index)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in optionscontent"
|
v-for="item in optionscontent[index]"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.serviceContent"
|
:label="item.serviceContent"
|
||||||
:value="item.serviceContent"
|
:value="item.serviceContent"
|
||||||
@ -443,9 +444,11 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="aitem.serviceFrequencyText"
|
v-model="aitem.serviceFrequencyText"
|
||||||
placeholder="请选择服务频次"
|
placeholder="请选择服务频次"
|
||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in optionsfrequency"
|
v-for="item in optionsfrequency[index]"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.serviceFrequencyText"
|
:label="item.serviceFrequencyText"
|
||||||
:value="item.serviceFrequencyText"
|
:value="item.serviceFrequencyText"
|
||||||
@ -790,14 +793,27 @@ export default {
|
|||||||
optionsway: [],
|
optionsway: [],
|
||||||
// 服务内容
|
// 服务内容
|
||||||
|
|
||||||
optionscontent: [],
|
optionscontent: {
|
||||||
|
'0':[],
|
||||||
|
'1':[],
|
||||||
|
'2':[],
|
||||||
|
'3':[],
|
||||||
|
'4':[],
|
||||||
|
},
|
||||||
// 服务频次
|
// 服务频次
|
||||||
optionsfrequency: [
|
optionsfrequency:{
|
||||||
{
|
'0':[],
|
||||||
value: '',
|
'1':[],
|
||||||
label: ''
|
'2':[],
|
||||||
}
|
'3':[],
|
||||||
],
|
'4':[],
|
||||||
|
},
|
||||||
|
// optionsfrequency: [
|
||||||
|
// {
|
||||||
|
// value: '',
|
||||||
|
// label: ''
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
|
||||||
optionstype: [{
|
optionstype: [{
|
||||||
value: 'BLOOD_PRESSURE',
|
value: 'BLOOD_PRESSURE',
|
||||||
@ -864,13 +880,14 @@ export default {
|
|||||||
hardwareType: null,
|
hardwareType: null,
|
||||||
whetherRelease: null,
|
whetherRelease: null,
|
||||||
},
|
},
|
||||||
|
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
formdetail: {},
|
formdetail: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
departmentId: [
|
departmentId: [
|
||||||
{ required: true, message: "所属科室id不能为空", trigger: "blur" }
|
{ required: true, message: "科室名称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
packageIntroduction: [
|
packageIntroduction: [
|
||||||
{ required: true, message: "服务包简介不能为空", trigger: "blur" }
|
{ required: true, message: "服务包简介不能为空", trigger: "blur" }
|
||||||
@ -916,7 +933,9 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
},
|
||||||
|
serviceWayId:'',
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -991,6 +1010,44 @@ export default {
|
|||||||
//添加时删除item
|
//添加时删除item
|
||||||
delnurseClassifyitem(index) {
|
delnurseClassifyitem(index) {
|
||||||
this.form.voList.splice(index, 1);
|
this.form.voList.splice(index, 1);
|
||||||
|
// console.log(this.form.voList,'[[[[]]]]')
|
||||||
|
// console.log(this.optionscontent)
|
||||||
|
var optionscontentPlus = []
|
||||||
|
this.optionscontent[index] = []
|
||||||
|
for(var i = 0;i<5;i++){
|
||||||
|
if(this.optionscontent[i] != []){
|
||||||
|
optionscontentPlus.push(this.optionscontent[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log(optionscontentPlus,'打印optionscontentPlus')
|
||||||
|
// console.log(this.optionscontent,'optionscontent')
|
||||||
|
this.optionscontent = {
|
||||||
|
'0':[],
|
||||||
|
'1':[],
|
||||||
|
'2':[],
|
||||||
|
'3':[],
|
||||||
|
'4':[],
|
||||||
|
}
|
||||||
|
for(var j = 0 ; j<optionscontentPlus.length;j++){
|
||||||
|
this.optionscontent[j] = optionscontentPlus[j]
|
||||||
|
}
|
||||||
|
var optionsfrequencyPlus = []
|
||||||
|
this.optionsfrequency[index] = []
|
||||||
|
for(var i = 0;i<5;i++){
|
||||||
|
if(this.optionsfrequency[i] != []){
|
||||||
|
optionsfrequencyPlus.push(this.optionsfrequency[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.optionsfrequency = {
|
||||||
|
'0':[],
|
||||||
|
'1':[],
|
||||||
|
'2':[],
|
||||||
|
'3':[],
|
||||||
|
'4':[],
|
||||||
|
}
|
||||||
|
for(var j = 0 ; j<optionsfrequencyPlus.length;j++){
|
||||||
|
this.optionsfrequency[j] = optionsfrequencyPlus[j]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//添加时新增item
|
//添加时新增item
|
||||||
addnurseClassifyitem() {
|
addnurseClassifyitem() {
|
||||||
@ -998,13 +1055,14 @@ export default {
|
|||||||
var obj = {
|
var obj = {
|
||||||
serviceWayName: null,
|
serviceWayName: null,
|
||||||
serviceContent: null,
|
serviceContent: null,
|
||||||
|
serviceFrequencyText:null,
|
||||||
idd: this.idd
|
idd: this.idd
|
||||||
};
|
};
|
||||||
if (this.form.voList.length == 5) {
|
if (this.form.voList.length == 5) {
|
||||||
this.$message.error("最多批量添加5条");
|
this.$message.error("最多批量添加5条");
|
||||||
} else {
|
} else {
|
||||||
this.form.voList.push(obj);
|
this.form.voList.push(obj);
|
||||||
console.log(this.form)
|
// console.log(this.form)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 查询服务包基础信息列表 */
|
/** 查询服务包基础信息列表 */
|
||||||
@ -1023,25 +1081,28 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 服务方式点击事件
|
// 服务方式点击事件
|
||||||
changeway(e) {
|
changeway(e,index) {
|
||||||
var serviceWayId = null
|
this.serviceWayId = this.optionsway.find(f => f.serviceWayName == e).id
|
||||||
serviceWayId = this.optionsway.find(f => f.serviceWayName == e).id
|
serviccontent(this.serviceWayId).then(response => {
|
||||||
serviccontent(serviceWayId).then(response => {
|
this.optionscontent[index] = response.rows;
|
||||||
this.optionscontent = response.rows;
|
|
||||||
});
|
});
|
||||||
this.form.voList.serviceContent = '';
|
this.form.voList[index].serviceContent = null
|
||||||
|
this.form.voList[index].serviceFrequencyText = null
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 服务内容点击事件
|
// 服务内容点击事件
|
||||||
changcontent(e) {
|
changcontent(e,index) {
|
||||||
var id = null
|
var id = null
|
||||||
id = this.optionscontent.find(f => f.serviceContent == e).id
|
this.form.voList[index].serviceFrequencyText = null
|
||||||
this.optionsfrequency = this.optionscontent.find(f => f.id == id).serviceWayFrequencyList
|
id = this.optionscontent[index].find(f => f.serviceContent == e).id
|
||||||
this.optionsfrequency.forEach(el => {
|
this.optionsfrequency[index] = this.optionscontent[index].find(f => f.id == id).serviceWayFrequencyList
|
||||||
|
this.optionsfrequency[index].forEach(el => {
|
||||||
if (el.serviceFrequencyType == "DIGIT") {
|
if (el.serviceFrequencyType == "DIGIT") {
|
||||||
el.serviceFrequencyText = el.serviceFrequencyStart + '~' + el.serviceFrequencyEnd
|
el.serviceFrequencyText = el.serviceFrequencyStart + '~' + el.serviceFrequencyEnd
|
||||||
|
}
|
||||||
} else if (el.serviceFrequencyType == "serviceFrequencyType") {
|
else if (el.serviceFrequencyType == "serviceFrequencyType") {
|
||||||
this.optionsfrequency = this.optionscontent.find(f => f.id == e).serviceWayFrequencyList
|
this.optionsfrequency[index] = this.optionscontent[index].find(f => f.id == e).serviceWayFrequencyList
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -1184,14 +1245,28 @@ export default {
|
|||||||
this.optionsway = [],
|
this.optionsway = [],
|
||||||
// 服务内容
|
// 服务内容
|
||||||
|
|
||||||
this.optionscontent = [],
|
// this.optionscontent = [],
|
||||||
|
this.optionscontent = {
|
||||||
|
'0':[],
|
||||||
|
'1':[],
|
||||||
|
'2':[],
|
||||||
|
'3':[],
|
||||||
|
'4':[],
|
||||||
|
},
|
||||||
|
this.optionsfrequency={
|
||||||
|
'0':[],
|
||||||
|
'1':[],
|
||||||
|
'2':[],
|
||||||
|
'3':[],
|
||||||
|
'4':[],
|
||||||
|
}
|
||||||
// 服务频次
|
// 服务频次
|
||||||
this.optionsfrequency = [
|
// this.optionsfrequency = [
|
||||||
{
|
// {
|
||||||
value: '',
|
// value: '',
|
||||||
label: ''
|
// label: ''
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -1220,6 +1295,7 @@ export default {
|
|||||||
{
|
{
|
||||||
serviceWayName: null,
|
serviceWayName: null,
|
||||||
serviceContent: null,
|
serviceContent: null,
|
||||||
|
serviceFrequencyText:null,
|
||||||
serviceFrequencyStart: null,
|
serviceFrequencyStart: null,
|
||||||
serviceFrequencyEnd: null,
|
serviceFrequencyEnd: null,
|
||||||
idd: this.idd,
|
idd: this.idd,
|
||||||
@ -1323,6 +1399,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
// return
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.voList) {
|
if (this.form.voList) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user