展示区域

This commit is contained in:
caoyang
2022-02-18 12:05:06 +08:00
parent 73ae892ea0
commit f77853ca33
2 changed files with 27 additions and 13 deletions
@@ -67,7 +67,7 @@
<a-form-model-item label="展示区域" prop="showArea">
<a-select placeholder="请选择展示区域" @change="handleChange">
<a-select-option v-for="(item,index) in areaOptions" :key="item.id" :value="item.id">
{{item.showarea}}
{{item.showArea}}
</a-select-option>
</a-select>
<!-- <j-dict-select-tag type="list" v-model="form.showArea" dictCode="" placeholder="请选择展示区域" />-->
@@ -79,7 +79,6 @@
</a-form-model-item>
</a-col>
<p class="tag-info">其它模块展示</p>
<a-divider dashed />
<a-col :span="24">
@@ -279,7 +278,7 @@
let params = {};
getAction(`tag/onlCgformTag/queryShowArea`,params).then((res)=>{
if(res.success){
this.areaOptions=res.success.records
this.areaOptions=res.result
}
});
},
@@ -102,7 +102,7 @@
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
// import tabTable from './tabTable'
import dicList from '../dialog/dicList'
export default {
@@ -176,7 +176,8 @@
typeVisible:{},
dicVisible:false,
dictVal:'',
record: { }
record: {},
isEdit:1,
}
},
computed:{
@@ -212,11 +213,12 @@
this.loadData()
},
handleAdd(){
this.isEdit=1
this.contentVisible=true
this.form={}
},
hideModal(){
// console.log('form',this.form)
let params={
...this.form,
is_tag_dict: 1,
@@ -225,13 +227,25 @@
this.$refs.ruleForm.validate((valid)=>{
// console.log('valide',valide)
if(valid){
postAction(`sys/dict/add`,params).then(res=>{
if(res.success){
this.loadData()
this.contentVisible=false
this.form={}
}
})
if(this.isEdit==1){
params.id=''
postAction(`sys/dict/add`,params).then(res=>{
if(res.success){
this.loadData()
this.contentVisible=false
this.form={}
}
})
}else if(this.isEdit==0){
putAction(`sys/dict/edit`,params).then(res=>{
if(res.success){
this.loadData()
this.contentVisible=false
this.form={}
}
})
}
}
@@ -262,6 +276,7 @@
},
//编辑
actionEdit(val){
this.isEdit=0
this.form={...val}
this.contentVisible=true
},