Commit 4e93fcc3 by cwq0219

样式修改

1 parent a52b6f8f
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:model="formObj" :model="formObj"
:label-width="labelWidth" :label-width="labelWidth"
:rules="formRules" :rules="formRules"
size="small" size="mini"
class="glsx-combi-form-block" class="glsx-combi-form-block"
> >
<template v-for="(item, index) in formData"> <template v-for="(item, index) in formData">
...@@ -240,11 +240,11 @@ export default { ...@@ -240,11 +240,11 @@ export default {
/* .glsx-combi-form .el-form-item { /* .glsx-combi-form .el-form-item {
width: 65%; width: 65%;
} */ } */
.glsx-combi-form .no-label.el-form-item--small .el-form-item__content, .glsx-combi-form .no-label.el-form-item--mini .el-form-item__content,
.el-form-item--small .el-form-item__label { .el-form-item--mini .el-form-item__label {
width: 100%; width: 100%;
} }
/* .glsx-combi-form .el-form-item--small .el-form-item__content { /* .glsx-combi-form .el-form-item--mini .el-form-item__content {
width: calc(100% - 85px); width: calc(100% - 85px);
} */ } */
.glsx-combi-form .el-col { .glsx-combi-form .el-col {
......
...@@ -20,10 +20,12 @@ ...@@ -20,10 +20,12 @@
<slot name="btn-start"></slot> <slot name="btn-start"></slot>
<el-button <el-button
type="primary" type="primary"
:size="btn_size"
@click="handleConfirm" @click="handleConfirm"
>{{btnOkLabel}}</el-button> >{{btnOkLabel}}</el-button>
<el-button <el-button
v-if="!noCancel" v-if="!noCancel"
:size="btn_size"
@click="handleClose" @click="handleClose"
>取消</el-button> >取消</el-button>
<slot name="btn-middle"></slot> <slot name="btn-middle"></slot>
......
<!-- 功能列表 --> <!-- 功能列表 -->
<template> <template>
<div> <div>
<el-button <el-row>
icon="el-icon-plus" <el-col
@click="handleAdd" :span="2"
>创建功能</el-button> style="padding-top: 16px;"
<glsx-combi-form
ref="showSearch"
labelWidth="120px"
:formObj="searchForm"
:searchSelectObj="searchSelectObj"
:formData="searchFormData"
>
<template
slot="menuTree"
slot-scope="scope"
> >
<select-tree <el-button
:form="searchForm" icon="el-icon-plus"
:targetItem="scope.scope" :size="btn_size"
:treeData="baseData.searchMenuTreeList" type="primary"
:defaultProps="treeDefaultProps" @click="handleAdd"
@selected="handleTreeSelect" >创建功能</el-button>
></select-tree> </el-col>
</template> <el-col
<template style="text-align: right;"
slot="ownCusCom" :span="22"
slot-scope="scope"
> >
<own-cus-com <glsx-combi-form
:targetItem="scope.scope" ref="showSearch"
:form="searchForm" labelWidth="120px"
:optionList="baseData.searchOwnCusList" :formObj="searchForm"
:baseData="baseData" :searchSelectObj="searchSelectObj"
@changeSecond="changeOwnSecond" :formData="searchFormData"
></own-cus-com> >
</template> <template
<el-button slot="menuTree"
size="small" slot-scope="scope"
type="primary" >
:id="tableParams.btnId" <select-tree
>查询</el-button> :form="searchForm"
</glsx-combi-form> :targetItem="scope.scope"
:treeData="baseData.searchMenuTreeList"
:defaultProps="treeDefaultProps"
@selected="handleTreeSelect"
></select-tree>
</template>
<template
slot="ownCusCom"
slot-scope="scope"
>
<own-cus-com
:targetItem="scope.scope"
:form="searchForm"
:optionList="baseData.searchOwnCusList"
:baseData="baseData"
@changeSecond="changeOwnSecond"
></own-cus-com>
</template>
<el-button
:size="btn_size"
type="primary"
:id="tableParams.btnId"
>查询</el-button>
</glsx-combi-form>
</el-col>
</el-row>
<glsx-table <glsx-table
ref="functionTable" ref="functionTable"
:searchForm="tableSearchForm" :searchForm="tableSearchForm"
...@@ -488,6 +502,7 @@ export default { ...@@ -488,6 +502,7 @@ export default {
}, },
handleFunEdit(row) { handleFunEdit(row) {
this.editForm = _.cloneDeep(row) this.editForm = _.cloneDeep(row)
console.log(row)
if (this.editForm.ownedCusgroupValue) { if (this.editForm.ownedCusgroupValue) {
this.editForm.ownedCusgroupValue = this.editForm.ownedCusgroupValue.split(',').map(item => +item) this.editForm.ownedCusgroupValue = this.editForm.ownedCusgroupValue.split(',').map(item => +item)
} }
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
> >
<el-button <el-button
icon="el-icon-plus" icon="el-icon-plus"
:size="btn_size"
type="primary"
@click="handleAdd" @click="handleAdd"
>创建菜单</el-button> >创建菜单</el-button>
</el-col> </el-col>
...@@ -21,7 +23,7 @@ ...@@ -21,7 +23,7 @@
:formData="searchFormData" :formData="searchFormData"
> >
<el-button <el-button
size="small" :size="btn_size"
type="primary" type="primary"
@click="keyDowmGetList" @click="keyDowmGetList"
>查询</el-button> >查询</el-button>
...@@ -437,7 +439,7 @@ export default { ...@@ -437,7 +439,7 @@ export default {
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
this.editDisable() this.editDisable()
!isEdit && this.isMenuSpecial(false) !isEdit && this.isMenuSpecial(false)
this.$refs.editFormRef && (this.$refs.editFormRef.$refs[this.editChildRef].clearValidate()) this.$refs.editFormRef.$refs[this.editChildRef] && (this.$refs.editFormRef.$refs[this.editChildRef].clearValidate())
}, },
handleConfirm() { handleConfirm() {
// console.log(this.editForm) // console.log(this.editForm)
......
...@@ -2,9 +2,14 @@ ...@@ -2,9 +2,14 @@
<template> <template>
<div class="prodect-list"> <div class="prodect-list">
<el-row> <el-row>
<el-col :span="12"> <el-col
:span="12"
style="padding-top: 16px;"
>
<el-button <el-button
icon="el-icon-plus" icon="el-icon-plus"
:size="btn_size"
type="primary"
@click="handleAdd" @click="handleAdd"
>创建产品</el-button> >创建产品</el-button>
</el-col> </el-col>
...@@ -18,7 +23,7 @@ ...@@ -18,7 +23,7 @@
:formData="searchFormData" :formData="searchFormData"
> >
<el-button <el-button
size="small" :size="btn_size"
type="primary" type="primary"
:id="tableParams.btnId" :id="tableParams.btnId"
>查询</el-button> >查询</el-button>
...@@ -144,6 +149,7 @@ export default { ...@@ -144,6 +149,7 @@ export default {
label: '产品地址', label: '产品地址',
name: 'productAddress', name: 'productAddress',
type: 'input', type: 'input',
maxlength: 50,
width: '300px' width: '300px'
}], }],
// 基本数据 // 基本数据
...@@ -181,11 +187,13 @@ export default { ...@@ -181,11 +187,13 @@ export default {
}) })
}, },
handleAdd() { handleAdd() {
this.editFormData[this.editFormData.findIndex(item => item.name === 'productType')].isDisabled = !!this.editForm.id
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
this.$refs.editFormRef.$refs[this.editChildRef] && this.$refs.editFormRef.$refs[this.editChildRef].clearValidate()
}, },
handleProEdit(row) { handleProEdit(row) {
this.editForm = _.clone(row) this.editForm = _.clone(row)
console.log(row) // console.log(row)
this.handleAdd() this.handleAdd()
}, },
handleEditClose() { handleEditClose() {
...@@ -195,13 +203,11 @@ export default { ...@@ -195,13 +203,11 @@ export default {
productDetail: '', productDetail: '',
productAddress: '' productAddress: ''
} }
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate()
this.handleAdd() this.handleAdd()
}, },
handleEditConfirm() { handleEditConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
// productApi.saveProApi({ productCode: '123', ...this.editForm }).then(res => {
console.log(this.editForm) console.log(this.editForm)
var apiName = this.editForm.productCode ? 'updateProApi' : 'saveProApi' var apiName = this.editForm.productCode ? 'updateProApi' : 'saveProApi'
productApi[apiName](this.editForm).then(res => { productApi[apiName](this.editForm).then(res => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!