修改bug

This commit is contained in:
caoyang
2022-03-18 14:32:07 +08:00
parent 3279309a01
commit 9f98d9704d
6 changed files with 35 additions and 444 deletions
@@ -87,8 +87,8 @@
export default {
name: 'dicList',
components:{
listTable,
treeTable
ListTable,
TreeTable
},
props:{
dictVal:String,
@@ -416,7 +416,6 @@
<style lang="less" scoped>
.form-tag{
.tag-content{
margin-bottom: 30px;
}
}
.tag-info{
@@ -1,108 +0,0 @@
<template>
<div class="new-tag-drawer">
<onl-cgform-tag-form ref="realForm" @ok="submitCallback" :isTagContent="isTagContent" :editData="editData" :editId=editId :submitEdit="submitEdit" :disabled="disableSubmit" normal v-if="drawerVisible"> </onl-cgform-tag-form>
<div class="drawer-footer">
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">{{$t('preservation')}}</a-button>
<a-button @click="handleCancel" style="margin-bottom: 0;">{{$t('close')}}</a-button>
</div>
</div>
</template>
<script>
import OnlCgformTagForm from './OnlCgformTagForm'
export default {
name: 'newDrawer',
components: {
OnlCgformTagForm
},
data () {
return {
width:800,
visible: false,
disableSubmit: false
}
},
props:{
drawerVisible:Boolean,
isTagContent:Boolean,
editData:Object,
editId:String,
submitEdit:String,
},
mounted() {
this.visible=this.drawerVisible
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
this.$emit('closeTag',this.visible)
},
submitCallback(){
this.$emit('ok');
this.visible = false;
this.$emit('closeTag',this.visible)
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
.new-tag-drawer{
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: 0px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
}
</style>
<style lang="less">
.new-tag-drawer{
.ant-spin-nested-loading{
.ant-spin-container{
.ant-form{
margin-bottom: 25px;
}
}
}
}
</style>
@@ -1,81 +0,0 @@
<template>
<div class="tag-form">
<a-form-model ref="form" :form="form" :rules="rules">
<div class="form-title">基本信息</div>
<a-divider dashed />
<a-form-model-item
:label-col="labelCol"
:wrapper-col="wrapperCol"
label="所属模块"
>
<a-select v-model="form.isModel" placeholder="请选择所属模块">
<a-select-option value="1">
文档库
</a-select-option>
<a-select-option value="2">
文档条款
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item
:label-col="labelCol"
:wrapper-col="wrapperCol"
label="属性名称"
>
<a-input placeholder="请输入属性名称" :maxLength="120" ></a-input>
</a-form-model-item>
<a-form-model-item>
<a-button type="primary" @click="onSubmit">
Create
</a-button>
</a-form-model-item>
</a-form-model>
</div>
</template>
<script>
export default {
name: 'tagForm',
data(){
return{
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
form:{
isModel:''
},
rules:{
isModel:[
{ required: true, message: '请输入所属模块'},
]
}
}
},
mounted() {
},
methods:{
//提交表单
onSubmit() {
this.$refs.form.validate(valid => {
if (valid) {
alert('submit!');
} else {
console.log('error submit!!');
return false;
}
});
},
}
}
</script>
<style scoped>
</style>
@@ -39,7 +39,15 @@
</div>
</div>
<a-drawer class="show-drawer" :title="titleTag" placement="right" width="1000px" @close="close" :visible="drawerVisible" :after-visible-change="afterVisibleChange" >
<new-drawer v-if="drawerVisible&&editFlag" :drawerVisible="drawerVisible" :isTagContent="isTagContent" :editData="editData" :editId="editId" :submitEdit="submitEdit" @closeTag="closeTag" ></new-drawer>
<div class="new-tag-drawer">
<tag-form v-if="drawerVisible&&editFlag" ref="realForm" @ok="closeTag" :isTagContent="isTagContent" :editData="editData" :editId=editId :submitEdit="submitEdit" :disabled="disableSubmit" normal> </tag-form>
<div class="drawer-footer" v-if="drawerVisible&&editFlag">
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">{{$t('preservation')}}</a-button>
<a-button @click="handleCancel" style="margin-bottom: 0;">{{$t('close')}}</a-button>
</div>
</div>
</a-drawer>
<a-modal class="show-area" v-model="areaVisible" :title="$t('ExhibitionAreaManagement')" :footer="null" @cancel="hideModal">
<area-manage v-if="areaVisible" @diaHide="diaHide" @submitOk="submitOk" @deleteOk="deleteOk" @updateOk="updateOk"></area-manage>
@@ -64,14 +72,14 @@
import JInput from '@/components/jero/JInput'
import TabTable from './TabTable'
import AreaManage from '../dialog/AreaManage'
import newDrawer from '../dialog/newDrawer'
import TagForm from '../dialog/TagForm'
export default {
name: 'tagItem',
components:{
JInput,
TabTable,
AreaManage,
newDrawer
TagForm
},
data(){
return{
@@ -144,23 +152,15 @@
total:0,
type:'input',
ids:[],
disableSubmit:false,
selectedRowKey:[]
}
},
mounted() {
this.loadData(1)
this.loadShowArea()
// this.getHeader()
},
methods:{
getHeader(){
// getAction(`tag/onlCgformTag/getHeader`,{flag:3}).then(res=>{
//
// })
// getAction(`tag/onlCgformTag/queryCondition`,{flag:3}).then(res=>{
//
// })
},
//获取展示区域
loadShowArea(){
let params = {};
@@ -375,20 +375,11 @@
if(val=='input'){
this.typeVisible=false
this.isTagContent=false
// this.getFormCon()
} else if(val='select'){
this.typeVisible=false
this.isTagContent=true
}
},
//获取表单内容
getFormCon(){
getAction(`tag/onlCgformTag/list`, { }).then(res=>{
if(res.success){
}
})
},
//接收查询条件
queryParams(val){
this.queryParam.pageNo=val.pageNo
@@ -399,6 +390,13 @@
this.loadData(0)
}
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.drawerVisible=false
this.close()
}
}
}
@@ -415,6 +413,20 @@
cursor: pointer;
}
}
.new-tag-drawer{
.drawer-footer{
height: 32px;
display: flex;
justify-content: center;
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
}
}
</style>
<style lang="less">