Commit 34ab551e by cwq0219

bug修复

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