|
@@ -9,11 +9,12 @@
|
|
|
@changeSex="changeSex"
|
|
|
@changeType="changeType"
|
|
|
@validatePass="validatePass"
|
|
|
+ :editData="editData"
|
|
|
ref="submitForm"
|
|
|
></PubIndeptTag>
|
|
|
<div class="main">
|
|
|
<p class="title" v-if="dataPub.region2==1||dataPub.region2==2||dataPub.region2==99"> <i>*</i> 标签明细:</p>
|
|
|
- <SingleSelect v-if="dataPub.region2==1" :type="dataPub.region2" @pushValues="pushValues"></SingleSelect>
|
|
|
+ <SingleSelect v-if="dataPub.region2==1" :type="dataPub.region2" @pushValues="pushValues" :options="editData.questionDetails"></SingleSelect>
|
|
|
<div class="btn">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -38,6 +39,7 @@
|
|
|
return {
|
|
|
dataPub: {}, //公用组件传的值都在这
|
|
|
itemsTypes:[1,2,99], //有明细的类型
|
|
|
+ editData:{}, //编辑数据
|
|
|
form: {
|
|
|
currentOrder: '0', //标签成文顺序
|
|
|
},
|
|
@@ -49,6 +51,12 @@
|
|
|
options: [], //标签明细右侧操作数据
|
|
|
}
|
|
|
},
|
|
|
+ beforeMount:function(){
|
|
|
+ const {params} = this.$route;
|
|
|
+ if(params.isEdit){
|
|
|
+ this.editData = params.data;
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {
|
|
|
newSign() {
|
|
|
return this.dataPub.region2;
|
|
@@ -106,8 +114,8 @@
|
|
|
"copyType": this.dataPub.region2 == 6 ? this.dataPub.region10 : (this.dataPub.region2 == 3 ? this.dataPub.region11 : ''), //是否复制
|
|
|
"showAdd": 0, //是否显示加号血压
|
|
|
"showInfo": 0,
|
|
|
- "prefix":this.dataPub.prefix, //前缀
|
|
|
- "suffix":this.dataPub.suffix, //后缀
|
|
|
+ "labelPrefix":this.dataPub.prefix, //前缀
|
|
|
+ "labelSuffix":this.dataPub.suffix, //后缀
|
|
|
"questionDetails": this.options,
|
|
|
"questionMappings": [] //映射关系,
|
|
|
}
|
|
@@ -118,7 +126,8 @@
|
|
|
this.showConfirmDialog('是否保存该标签?', () => {
|
|
|
api.saveOrUpdate(param).then((res) => {
|
|
|
if (res.data.code === '0') {
|
|
|
- this.warning(res.data.msg || '保存成功', 'success')
|
|
|
+ this.warning(res.data.msg || '保存成功', 'success');
|
|
|
+ this.$router.push("/admin/LT-YXSJWH-DLLXBQWH");
|
|
|
} else {
|
|
|
this.warning(res.data.msg)
|
|
|
}
|