|
@@ -13,7 +13,7 @@
|
|
|
></PubIndeptTag>
|
|
|
<div class="main">
|
|
|
<p class="title"> <i>*</i> 标签明细:</p>
|
|
|
- <SingleSelect></SingleSelect>
|
|
|
+ <SingleSelect v-if="dataPub.region2==1" :type="dataPub.region2" @pushValues="pushValues"></SingleSelect>
|
|
|
<div class="btn">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -45,7 +45,7 @@
|
|
|
{ required: true, message: '选择标签成文顺序', trigger: 'change' }
|
|
|
]
|
|
|
},
|
|
|
- sendIds: [[], [], [], [], [], []], //标签明细右侧操作数据
|
|
|
+ options: [], //标签明细右侧操作数据
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -64,37 +64,36 @@
|
|
|
back() { this.$router.go(-1) },
|
|
|
changeVal(val) { //子组件数据改变传递到父组件
|
|
|
this.dataPub = val
|
|
|
- console.log('公用组件传的值都在这', val)
|
|
|
+ //console.log('公用组件传的值都在这', val)
|
|
|
},
|
|
|
changeSex(sex) { //性别改变,清空标签明细
|
|
|
- console.log(sex)
|
|
|
+ //console.log(sex)
|
|
|
},
|
|
|
changeType(type) { //填写单类型改变,标签明细左侧更新,右侧清空
|
|
|
- console.log(type)
|
|
|
+ //console.log(type)
|
|
|
},
|
|
|
- changeActionData(arr) { //标签明细右侧数据id
|
|
|
- this.sendIds = arr
|
|
|
+ pushValues(its){
|
|
|
+ this.options = its;
|
|
|
},
|
|
|
submitForm() { // 调用子组件的方法验证公用部分
|
|
|
this.$refs.submitForm.submitForm('groups');
|
|
|
},
|
|
|
validatePass() { //验证成功回调,调取接口
|
|
|
//仍需验证标签明细是否选择
|
|
|
- if (JSON.stringify(this.sendIds) == '[[],[],[],[],[],[]]') {
|
|
|
+ if ([0,1,2].includes(+this.dataPub.region2)&&this.options.length==0) {
|
|
|
this.$message({
|
|
|
- message: '请选择标签明细',
|
|
|
+ message: '至少填一个选项',
|
|
|
type: 'warning'
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- let detailLis = utils.dataRecombination(this.sendIds, this.dataPub.region2)
|
|
|
let param = {
|
|
|
"questionWrapper": {
|
|
|
- "controlType": 0, //控件类型(0:默认值 1:下拉单选 2:下拉多选 6:文本框 7:数字键盘文本框 99:联合推送)
|
|
|
+ "controlType": this.dataPub.region2, //控件类型(0:默认值 1:下拉单选 2:下拉多选 6:文本框 7:数字键盘文本框 99:联合推送)
|
|
|
"id": "", //新增id置空
|
|
|
"type": this.dataPub.region1, //标签归属
|
|
|
- "tagType": this.dataPub.region2, //标签类型
|
|
|
+ "tagType": 1, //标签类型
|
|
|
"tagName": this.dataPub.region3, //系统名称
|
|
|
"name": this.dataPub.region4, //界面名称
|
|
|
"joint": this.dataPub.region5, //标签间的连接符
|
|
@@ -106,14 +105,14 @@
|
|
|
"copyType": this.dataPub.region2 == 6 ? this.dataPub.region10 : (this.dataPub.region2 == 3 ? this.dataPub.region11 : ''), //是否复制
|
|
|
"showAdd": 0, //是否显示加号血压
|
|
|
"showInfo": 0,
|
|
|
- "questionDetails": [],
|
|
|
- "questionMappings": detailLis //映射关系,
|
|
|
+ "questionDetails": this.options,
|
|
|
+ "questionMappings": [] //映射关系,
|
|
|
}
|
|
|
- }
|
|
|
- // this.showDelDialog(param)
|
|
|
+ };console.log(param)
|
|
|
+ //this.showSaveDialog(param);
|
|
|
},
|
|
|
- showDelDialog(param) {
|
|
|
- this.showConfirmDialog('是否保存该标签组?', () => {
|
|
|
+ showSaveDialog(param) {
|
|
|
+ this.showConfirmDialog('是否保存该标签?', () => {
|
|
|
api.saveOrUpdate(param).then((res) => {
|
|
|
if (res.data.code === '0') {
|
|
|
this.warning(res.data.msg || '保存成功', 'success')
|