Commit 34ab551e by cwq0219

bug修复

1 parent cc98787f
......@@ -125,7 +125,7 @@ export default {
// 搜索条件
searchForm: {
type: Object,
default: () => []
default: () => {}
},
// 表格数据-外部传入
tableData: {
......
......@@ -56,7 +56,7 @@
</glsx-combi-form>
</el-col>
</el-row>
<glsx-table
<d2-table
ref="functionTable"
:searchForm="tableSearchForm"
:tableParams="tableParams"
......@@ -70,7 +70,7 @@
type="text"
@click="handleFunEdit(scope.scope)"
>编辑</el-button>
</glsx-table>
</d2-table>
<glsx-dialog
:title="editForm.id ? '编辑功能' : '创建功能'"
width="760px"
......@@ -147,6 +147,7 @@ export default {
label: '产品',
name: 'productId',
type: 'select',
width: '280px',
// multiple: true,
optionList: [],
optionId: 'dictValue',
......@@ -155,10 +156,12 @@ export default {
changeAttr: (value, targetItem) => {
this.searchForm.menuIds = ''
this.searchForm.parentName = ''
value && baseApi.getMenuTree({ productId: value }).then(res => {
this.baseData.searchMenuTreeList = res.data
this.getOptionsList('searchFormData')
})
value
? baseApi.getMenuTree({ productId: value }).then(res => {
this.baseData.searchMenuTreeList = res.data
})
: (this.baseData.searchMenuTreeList = [])
this.getOptionsList('searchFormData')
// if (value.includes('')) {
// this.searchForm[targetItem.name] = !this.oldVal[targetItem.name].includes('') ? targetItem.optionList.map(item => item[targetItem.optionId]) : this.searchForm[targetItem.name].filter(item => item !== '')
// } else {
......@@ -336,20 +339,7 @@ export default {
optionId: 'dictValue',
optionLabel: 'dictLabel',
optionsName: 'cusGroupList'
},
// {
// label: '所属客户群体',
// name: 'ownedCusgroupType',
// firstVal: 'ownedCusgroupType',
// secondVal: 'ownedCusgroupValue',
// // 下一级是否多选
// multiple: true,
// addHtml: 'ownCusCom',
// optionId: 'dictValue',
// optionLabel: 'dictLabel',
// formName: 'editForm'
// },
{
}, {
label: '商户/门店ID',
name: 'ownedMerchant',
width: '400px',
......@@ -391,10 +381,10 @@ export default {
cusGroupList: [],
accountLevelList: [],
accountRoleList: [{
dictValue: '1',
dictValue: 1,
dictLabel: '商户'
}, {
dictValue: '2',
dictValue: 2,
dictLabel: '门店'
}]
}
......@@ -540,7 +530,7 @@ export default {
if (this.editForm.id && this.editForm.newFunValue) {
params.functionValue = params.functionValue + ';' + this.editForm.newFunValue
}
params.ownedCusgroupValue = params.ownedCusgroupValue.join(',')
params.ownedCusgroupValue && (params.ownedCusgroupValue = this.editForm.ownedCusgroupValue.join(','))
functionApi[apiName](params).then(res => {
if (res.code === '0') {
this.notice.okTips()
......
......@@ -25,12 +25,12 @@
<el-button
:size="btn_size"
type="primary"
@click="keyDowmGetList"
:id="tableParams.btnId"
>查询</el-button>
</glsx-combi-form>
</el-col>
</el-row>
<glsx-table
<d2-table
ref="menuTable"
:searchForm="tableSearchForm"
:pageConf="pageConf"
......@@ -51,10 +51,11 @@
@click="handleDelete(scope.scope)"
>删除</el-button>
</span>
</glsx-table>
</d2-table>
<glsx-dialog
:title="editForm.menuCode ? '编辑菜单' : '创建菜单'"
:isVisible="editVisible"
width="650px"
@closeDialog="handleClose"
@confirmDialog="handleConfirm"
>
......@@ -73,7 +74,7 @@
<select-tree
v-if="editVisible"
:form="editForm"
:width="'300'"
:width="'400'"
:targetItem="scope.scope"
:treeData="baseData.menuTreeList"
:defaultProps="treeDefaultProps"
......@@ -87,7 +88,7 @@
<el-select
v-model="editForm[scope.scope.name]"
placeholder="请选择icon"
style="width: 300px"
style="width: 400px"
>
<el-option
v-for="item in scope.scope.optionList"
......@@ -122,7 +123,8 @@ export default {
menuName: ''
},
tableSearchForm: {
productIds: []
productIds: [],
menuName: ''
},
oldVal: {
productIds: []
......@@ -131,6 +133,7 @@ export default {
label: '产品',
name: 'productIds',
type: 'select',
width: '300px',
multiple: true,
optionList: [],
optionId: 'dictValue',
......@@ -179,6 +182,15 @@ export default {
label: '父级菜单名',
prop: 'parentName'
}, {
label: '菜单类型',
prop: 'isSpecial',
formatter: cellValue => {
return {
0: '普通菜单',
1: '特殊菜单'
}[cellValue.isSpecial]
}
}, {
label: '产品名称',
prop: 'productName'
}, {
......@@ -206,8 +218,8 @@ export default {
menuUrl: [{ required: true, message: '请输入菜单地址', trigger: 'change' }],
iconId: [{ required: true, message: '请上传菜单ICON', trigger: 'change' }],
sort: [{ required: true, message: '请选择产品排序值', trigger: 'change' }],
ownedCusgroupType: [{ required: true, message: '请输入所属客户群体', trigger: 'change' }],
ownedCusgroupValue: [{ required: true, message: '请输入所属客户群体2', trigger: 'change' }],
ownedCusgroupType: [{ required: true, message: '请选择所属客户群体', trigger: 'change' }],
ownedCusgroupValue: [{ required: true, message: '请选择', trigger: 'change' }],
menuPosition: [{ required: true, message: '请输入菜单位置', trigger: 'change' }]
},
treeDefaultProps: {
......@@ -225,7 +237,7 @@ export default {
editFormData: [{
label: '产品',
name: 'productId',
width: '300px',
width: '400px',
type: 'select',
isDisabled: false,
optionList: [],
......@@ -264,12 +276,12 @@ export default {
label: '菜单名称',
name: 'menuName',
type: 'input',
width: '300px',
width: '400px',
maxlength: 15
}, {
label: '菜单地址',
name: 'menuUrl',
width: '300px',
width: '400px',
type: 'input'
}, {
label: '菜单ICON',
......@@ -283,7 +295,7 @@ export default {
}, {
label: '菜单排序值',
name: 'sort',
width: '100px',
width: '190px',
type: 'select',
optionList: [],
optionId: 'dictValue',
......@@ -299,7 +311,7 @@ export default {
}, {
label: '所属客户群体',
name: 'ownedCusgroupType',
width: '150px',
width: '190px',
type: 'select',
isHide: true,
optionList: [],
......@@ -320,7 +332,7 @@ export default {
}, {
label: '',
name: 'ownedCusgroupValue',
width: '150px',
width: '200px',
type: 'select',
isHide: true,
multiple: true,
......@@ -332,10 +344,11 @@ export default {
}, {
label: '商户/门店ID',
name: 'ownedMerchant',
width: '300px',
width: '400px',
type: 'input',
isHide: true,
inputType: 'textarea'
inputType: 'textarea',
placeholder: '请输入商户/门店ID,多商户或者门店时,用“,”隔开。'
}],
// 基本数据
baseData: {
......@@ -347,10 +360,10 @@ export default {
accounTypetList: [],
accountLevelList: [],
accountRoleList: [{
dictValue: '1',
dictValue: 1,
dictLabel: '商户'
}, {
dictValue: '2',
dictValue: 2,
dictLabel: '门店'
}]
}
......@@ -399,8 +412,10 @@ export default {
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = _.cloneDeep(this.searchForm)
resolve(this.tableSearchForm)
this.$nextTick(() => {
this.tableSearchForm = _.cloneDeep(this.searchForm)
resolve(this.tableSearchForm)
})
})
},
getMenuTree(productId, fn) {
......
......@@ -30,7 +30,7 @@
</glsx-combi-form>
</el-col>
</el-row>
<glsx-table
<d2-table
ref="productTable"
:searchForm="searchForm"
:pageConf="pageConf"
......@@ -43,7 +43,7 @@
type="text"
@click="handleProEdit(scope.scope)"
>修改</el-button>
</glsx-table>
</d2-table>
<glsx-dialog
:title="editForm.productCode ? '编辑产品' : '创建产品'"
:isVisible="editVisible"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!