|
@@ -13,7 +13,7 @@
|
|
ref="submitForm"
|
|
ref="submitForm"
|
|
></PubIndeptTag>
|
|
></PubIndeptTag>
|
|
<div class="main">
|
|
<div class="main">
|
|
- <p class="title" v-if="dataPub.region2==1||dataPub.region2==2"> <i>*</i> 标签明细:</p>
|
|
|
|
|
|
+ <p class="title" v-if="dataPub.region2==1||dataPub.region2==2"> <i>*</i> 标签明细:<i style="margin-left: 70px">所有选项必须都有或者都没有同“伴”/“无”标记</i></p>
|
|
<SingleSelect v-if="dataPub.region2==1 || dataPub.region2==2" :ascription="dataPub.region1" :sexType="dataPub.region7" :type="dataPub.region2" @pushValues="pushValues" :options="editData.questionDetailList"></SingleSelect>
|
|
<SingleSelect v-if="dataPub.region2==1 || dataPub.region2==2" :ascription="dataPub.region1" :sexType="dataPub.region7" :type="dataPub.region2" @pushValues="pushValues" :options="editData.questionDetailList"></SingleSelect>
|
|
<div class="btn">
|
|
<div class="btn">
|
|
<el-button
|
|
<el-button
|
|
@@ -91,13 +91,31 @@
|
|
},
|
|
},
|
|
validatePass() { //验证成功回调,调取接口
|
|
validatePass() { //验证成功回调,调取接口
|
|
//仍需验证标签明细是否选择
|
|
//仍需验证标签明细是否选择
|
|
- if (this.itemsTypes.includes(+this.dataPub.region2)&&this.options.length==0) {
|
|
|
|
|
|
+ const opts = this.options;
|
|
|
|
+ if (this.itemsTypes.includes(+this.dataPub.region2)&&opts.length==0) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '至少填一个选项',
|
|
message: '至少填一个选项',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
});
|
|
});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ let flag=true;
|
|
|
|
+ if(opts[0].code){
|
|
|
|
+ flag=opts.findIndex((it)=>{
|
|
|
|
+ return !it.code;
|
|
|
|
+ })==-1;
|
|
|
|
+ }else{
|
|
|
|
+ flag=opts.findIndex((it)=>{
|
|
|
|
+ return it.code;
|
|
|
|
+ })==-1;
|
|
|
|
+ }
|
|
|
|
+ if(!flag){
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '所有选项必须都有或者都没有同“伴”/“无”标记',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
const {isEdit,data} = this.$route.params;
|
|
const {isEdit,data} = this.$route.params;
|
|
let param = {
|
|
let param = {
|
|
"questionWrapper": {
|
|
"questionWrapper": {
|