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