27 changed files with 2032 additions and 94 deletions
@ -0,0 +1,60 @@ |
|||||
|
import Layout from '@/views/layout/Layout' |
||||
|
|
||||
|
const commodityManagement = { |
||||
|
path: '/approval', |
||||
|
component: Layout, |
||||
|
meta: {title: '审批事项', icon: 'dingdan', noCache: true, affix: false}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/approval1', |
||||
|
code: '0701', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '公务用车', |
||||
|
meta: {title: '公务用车', noCache: false, affix: false} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/approval2', |
||||
|
code: '0702', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '领导干部外出报备', |
||||
|
meta: {title: '领导干部外出报备', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/approval3', |
||||
|
code: '0703', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '疫情防控', |
||||
|
meta: {title: '疫情防控', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/approval4', |
||||
|
code: '0704', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '用印申请', |
||||
|
meta: {title: '用印申请', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/approval5', |
||||
|
code: '0705', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '业务招待事项', |
||||
|
meta: {title: '业务招待事项', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/approval6', |
||||
|
code: '0706', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '会议室使用', |
||||
|
meta: {title: '会议室使用', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/approval7', |
||||
|
code: '0707', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '办公用品领用', |
||||
|
meta: {title: '办公用品领用', noCache: false, affix: false}, |
||||
|
} |
||||
|
] |
||||
|
}; |
||||
|
|
||||
|
export default commodityManagement |
@ -0,0 +1,53 @@ |
|||||
|
import Layout from '@/views/layout/Layout' |
||||
|
|
||||
|
const commodityManagement = { |
||||
|
path: '/building', |
||||
|
component: Layout, |
||||
|
meta: {title: '党的建设', icon: 'dingdan', noCache: true, affix: false}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/building1', |
||||
|
code: '0301', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '中心组学习', |
||||
|
meta: {title: '中心组学习', noCache: false, affix: false} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/building2', |
||||
|
code: '0302', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '示范党委', |
||||
|
meta: {title: '示范党委', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/building3', |
||||
|
code: '0303', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '党支部达标', |
||||
|
meta: {title: '党支部达标', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/building4', |
||||
|
code: '0304', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '群团工作', |
||||
|
meta: {title: '群团工作', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/building5', |
||||
|
code: '0305', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '党建动态', |
||||
|
meta: {title: '党建动态', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/building6', |
||||
|
code: '0306', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '党风廉政', |
||||
|
meta: {title: '党风廉政', noCache: false, affix: false}, |
||||
|
}, |
||||
|
] |
||||
|
}; |
||||
|
|
||||
|
export default commodityManagement |
@ -0,0 +1,123 @@ |
|||||
|
import Layout from '@/views/layout/Layout' |
||||
|
|
||||
|
const commodityManagement = { |
||||
|
path: '/profile', |
||||
|
component: Layout, |
||||
|
meta: {title: '部门首页', icon: 'dingdan', noCache: true, affix: false}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/profile1', |
||||
|
code: '0901', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '总经理工作部', |
||||
|
meta: {title: '总经理工作部', noCache: false, affix: false} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile2', |
||||
|
code: '0902', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '计划营销部', |
||||
|
meta: {title: '计划营销部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile3', |
||||
|
code: '0903', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '财务管理部', |
||||
|
meta: {title: '财务管理部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile4', |
||||
|
code: '0904', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '人力资源部', |
||||
|
meta: {title: '人力资源部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile5', |
||||
|
code: '0905', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '党群工作部', |
||||
|
meta: {title: '党群工作部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile6', |
||||
|
code: '0906', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '纪委办公室(审计部)', |
||||
|
meta: {title: '纪委办公室(审计部)', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile7', |
||||
|
code: '0907', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '燃料采购部', |
||||
|
meta: {title: '燃料采购部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile8', |
||||
|
code: '0908', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '物资管理部', |
||||
|
meta: {title: '物资管理部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile9', |
||||
|
code: '0909', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '项目开发部', |
||||
|
meta: {title: '项目开发部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile10', |
||||
|
code: '0910', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '燃料质量验收部', |
||||
|
meta: {title: '燃料质量验收部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile11', |
||||
|
code: '0911', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '安全监督部', |
||||
|
meta: {title: '安全监督部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile12', |
||||
|
code: '0912', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '设备部', |
||||
|
meta: {title: '设备部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile13', |
||||
|
code: '0913', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '发电部', |
||||
|
meta: {title: '发电部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile14', |
||||
|
code: '0914', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '维护部', |
||||
|
meta: {title: '维护部', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile15', |
||||
|
code: '0915', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '热工专业', |
||||
|
meta: {title: '热工专业', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile16', |
||||
|
code: '0916', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '电气专业', |
||||
|
meta: {title: '电气专业', noCache: false, affix: false}, |
||||
|
} |
||||
|
] |
||||
|
}; |
||||
|
|
||||
|
export default commodityManagement |
@ -0,0 +1,17 @@ |
|||||
|
import Layout from '@/views/layout/Layout' |
||||
|
|
||||
|
const commodityManagement = { |
||||
|
path: '/index', |
||||
|
component: Layout, |
||||
|
meta: {title: '首页', icon: 'yemian-copy', noCache: true, affix: false}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/index/index', |
||||
|
component: () => import('@/views/index/index'), |
||||
|
name: '首页', |
||||
|
meta: {title: '首页', noCache: false, affix: false} |
||||
|
}, |
||||
|
] |
||||
|
}; |
||||
|
|
||||
|
export default commodityManagement |
@ -0,0 +1,46 @@ |
|||||
|
import Layout from '@/views/layout/Layout' |
||||
|
|
||||
|
const commodityManagement = { |
||||
|
path: '/information', |
||||
|
component: Layout, |
||||
|
meta: {title: '信息公开', icon: 'dingdan', noCache: true, affix: false}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/information1', |
||||
|
code: '0601', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '基本信息', |
||||
|
meta: {title: '基本信息', noCache: false, affix: false} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/information2', |
||||
|
code: '0602', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '经营管理', |
||||
|
meta: {title: '经营管理', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/information3', |
||||
|
code: '0603', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '公司公告', |
||||
|
meta: {title: '公司公告', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/information4', |
||||
|
code: '0604', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '社会责任', |
||||
|
meta: {title: '社会责任', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/information5', |
||||
|
code: '0605', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '关于信息公开', |
||||
|
meta: {title: '关于信息公开', noCache: false, affix: false}, |
||||
|
} |
||||
|
] |
||||
|
}; |
||||
|
|
||||
|
export default commodityManagement |
@ -0,0 +1,81 @@ |
|||||
|
import Layout from '@/views/layout/Layout' |
||||
|
|
||||
|
const commodityManagement = { |
||||
|
path: '/news', |
||||
|
component: Layout, |
||||
|
meta: {title: '新闻中心', icon: 'dingdan', noCache: true, affix: false}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/news1', |
||||
|
code: '0201', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '集团新闻', |
||||
|
meta: {title: '集团新闻', noCache: false, affix: false} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/news2', |
||||
|
code: '0202', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '省公司新闻', |
||||
|
meta: {title: '省公司新闻', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/news3', |
||||
|
code: '0203', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '公司新闻', |
||||
|
meta: {title: '公司新闻', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/news4', |
||||
|
code: '0204', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '图片新闻', |
||||
|
meta: {title: '图片新闻', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/news5', |
||||
|
code: '0205', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '热点专题', |
||||
|
meta: {title: '热点专题', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/news6', |
||||
|
code: '0206', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '媒体关注', |
||||
|
meta: {title: '媒体关注', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/news7', |
||||
|
code: '0207', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '视频新闻', |
||||
|
meta: {title: '视频新闻', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/news8', |
||||
|
code: '0208', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '专题片', |
||||
|
meta: {title: '专题片', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/news9', |
||||
|
code: '0209', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '企业画册', |
||||
|
meta: {title: '企业画册', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/news10', |
||||
|
code: '0210', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '现场采风', |
||||
|
meta: {title: '现场风采', noCache: false, affix: false}, |
||||
|
} |
||||
|
] |
||||
|
}; |
||||
|
|
||||
|
export default commodityManagement |
@ -0,0 +1,46 @@ |
|||||
|
import Layout from '@/views/layout/Layout' |
||||
|
|
||||
|
const commodityManagement = { |
||||
|
path: '/notice', |
||||
|
component: Layout, |
||||
|
meta: {title: '通知公告', icon: 'dingdan', noCache: true, affix: false}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/notice1', |
||||
|
code: '0501', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '通知', |
||||
|
meta: {title: '通知', noCache: false, affix: false} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/notice2', |
||||
|
code: '0502', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '通报', |
||||
|
meta: {title: '通报', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/notice3', |
||||
|
code: '0503', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '公告', |
||||
|
meta: {title: '公告', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/notice4', |
||||
|
code: '0504', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '值班安排', |
||||
|
meta: {title: '值班安排', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/notice5', |
||||
|
code: '0505', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '浮窗', |
||||
|
meta: {title: '浮窗', noCache: false, affix: false}, |
||||
|
} |
||||
|
] |
||||
|
}; |
||||
|
|
||||
|
export default commodityManagement |
@ -0,0 +1,46 @@ |
|||||
|
import Layout from '@/views/layout/Layout' |
||||
|
|
||||
|
const commodityManagement = { |
||||
|
path: '/production', |
||||
|
component: Layout, |
||||
|
meta: {title: '安全生产', icon: 'dingdan', noCache: true, affix: false}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/production1', |
||||
|
code: '0401', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '安全会议', |
||||
|
meta: {title: '安全会议', noCache: false, affix: false} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/production2', |
||||
|
code: '0402', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '安全生产记录', |
||||
|
meta: {title: '安全生产记录', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/production3', |
||||
|
code: '0403', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '应急管理', |
||||
|
meta: {title: '应急管理', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/production4', |
||||
|
code: '0404', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '三讲一落实', |
||||
|
meta: {title: '三讲一落实', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/production5', |
||||
|
code: '0405', |
||||
|
component: () => import('@/views/lists/index'), |
||||
|
name: '曝光台', |
||||
|
meta: {title: '曝光台', noCache: false, affix: false}, |
||||
|
} |
||||
|
] |
||||
|
}; |
||||
|
|
||||
|
export default commodityManagement |
@ -0,0 +1,46 @@ |
|||||
|
import Layout from '@/views/layout/Layout' |
||||
|
|
||||
|
const commodityManagement = { |
||||
|
path: '/profile', |
||||
|
component: Layout, |
||||
|
meta: {title: '公司概况', icon: 'dingdan', noCache: true, affix: false}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/profile1', |
||||
|
code: '0101', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '公司简介', |
||||
|
meta: {title: '公司简介', noCache: false, affix: false} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile2', |
||||
|
code: '0102', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '公司领导', |
||||
|
meta: {title: '公司领导', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile3', |
||||
|
code: '0103', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '组织架构', |
||||
|
meta: {title: '组织架构', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile4', |
||||
|
code: '0104', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '企业VI', |
||||
|
meta: {title: '企业VI', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile5', |
||||
|
code: '0105', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '联系方式', |
||||
|
meta: {title: '联系方式', noCache: false, affix: false}, |
||||
|
} |
||||
|
] |
||||
|
}; |
||||
|
|
||||
|
export default commodityManagement |
@ -0,0 +1,67 @@ |
|||||
|
import Layout from '@/views/layout/Layout' |
||||
|
|
||||
|
const commodityManagement = { |
||||
|
path: '/profile', |
||||
|
component: Layout, |
||||
|
meta: {title: '制度资料', icon: 'dingdan', noCache: true, affix: false}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: '/profile1', |
||||
|
code: '0801', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '集团公司制度', |
||||
|
meta: {title: '集团公司制度', noCache: false, affix: false} |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile2', |
||||
|
code: '0802', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '山西公司制度', |
||||
|
meta: {title: '山西公司制度', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile3', |
||||
|
code: '0803', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '行业标准与制度', |
||||
|
meta: {title: '行业标准与制度', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile4', |
||||
|
code: '0804', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '公司制度', |
||||
|
meta: {title: '公司制度', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile5', |
||||
|
code: '0805', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '地方规章', |
||||
|
meta: {title: '地方规章', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile6', |
||||
|
code: '0806', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '培训课件', |
||||
|
meta: {title: '培训课件', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile7', |
||||
|
code: '0807', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '培训影像', |
||||
|
meta: {title: '培训影像', noCache: false, affix: false}, |
||||
|
}, |
||||
|
{ |
||||
|
path: '/profile8', |
||||
|
code: '0808', |
||||
|
component: () => import('@/views/richText/index'), |
||||
|
name: '科技创新', |
||||
|
meta: {title: '科技创新', noCache: false, affix: false}, |
||||
|
} |
||||
|
] |
||||
|
}; |
||||
|
|
||||
|
export default commodityManagement |
@ -0,0 +1,118 @@ |
|||||
|
<template> |
||||
|
<el-row> |
||||
|
<el-col :span="24" style="margin-bottom: 10px;"> |
||||
|
<div class="grid-content bg-purple-dark"> |
||||
|
<el-col :span="12"> |
||||
|
<div class="grid-content bg-purple">分润对象:</div> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="grid-content bg-purple-light">分润比例:</div> |
||||
|
</el-col> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="24" v-for="(item,index) in lists" style="margin-bottom: 10px;"> |
||||
|
<el-form :inline="true" class="demo-form-inline"> |
||||
|
<div class="grid-content bg-purple-dark"> |
||||
|
<el-row :gutter="15"> |
||||
|
<el-col :span="10"> |
||||
|
<div class="grid-content bg-purple"> |
||||
|
<el-select v-model="item.userId" :value="item.userId" placeholder="选择分润对象"> |
||||
|
<el-option v-for="opi in accounts" :label="opi.name" :value="opi.id"></el-option> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="10"> |
||||
|
<div class="grid-content bg-purple-light"> |
||||
|
<el-input placeholder="" @input="limitMax(item.rate,index)" v-model="item.rate" max="100" min="1"></el-input> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<div class="grid-content bg-purple-light"> |
||||
|
<el-button type="danger" @click="deleteObj(index)" icon="el-icon-delete"></el-button> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</el-col> |
||||
|
<el-button @click="addObj">添加分润对象</el-button> |
||||
|
</el-row> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {GET_ACCOUNT_LIST} from '@/api/privilegeManagement' |
||||
|
import {DETAIL_FIELD_LIST} from '@/api/distribution' |
||||
|
import Alert from "@/utils/alert"; |
||||
|
|
||||
|
export default { |
||||
|
name: "detailsOfDistribution", |
||||
|
props: ['currId'], |
||||
|
data() { |
||||
|
return { |
||||
|
lists: [], |
||||
|
accounts: [] |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
currId() { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getAccounts(); |
||||
|
this.getDetail(); |
||||
|
}, |
||||
|
methods: { |
||||
|
getDetail() { |
||||
|
let params = { |
||||
|
id: this.currId |
||||
|
}; |
||||
|
DETAIL_FIELD_LIST(params).then(res => { |
||||
|
this.lists = res |
||||
|
}) |
||||
|
}, |
||||
|
/** |
||||
|
* 添加分润对象 |
||||
|
*/ |
||||
|
addObj() { |
||||
|
let obj = { |
||||
|
userId: '', |
||||
|
rate: '' |
||||
|
}; |
||||
|
this.lists.push(obj) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 删除分润对象 |
||||
|
*/ |
||||
|
deleteObj(idx) { |
||||
|
let lists = []; |
||||
|
this.lists.map((item, index) => { |
||||
|
if (idx != index) { |
||||
|
lists.push(item) |
||||
|
} |
||||
|
return item; |
||||
|
}); |
||||
|
this.lists = lists |
||||
|
}, |
||||
|
getAccounts() { |
||||
|
GET_ACCOUNT_LIST().then(res => { |
||||
|
this.accounts = res; |
||||
|
}) |
||||
|
}, |
||||
|
limitMax(val, idx) { |
||||
|
if (val >= 100 || val <= 0) { |
||||
|
Alert.fail('值不能大于100,小于0'); |
||||
|
val = '' |
||||
|
} |
||||
|
|
||||
|
this.lists[idx].rate = val; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style rel="stylesheet/scss" lang="scss" scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,60 @@ |
|||||
|
<template> |
||||
|
<div class="form-container"> |
||||
|
<el-form :inline="true" :model="formInline" class="demo-form-inline"> |
||||
|
<el-form-item label="场地"> |
||||
|
<el-select v-model="formInline.locationId" value="" placeholder="场地"> |
||||
|
<el-option label="全部" value=""></el-option> |
||||
|
<el-option v-for="item in locationId" :label="item.name" :value="item.id"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item style="padding-left:30px"> |
||||
|
<el-button type="default" @click="resetForm1('formInline')">重置</el-button> |
||||
|
<el-button type="primary" @click="onSubmit">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {GET_LOCATIONS} from '@/api/common' |
||||
|
|
||||
|
export default { |
||||
|
name: 'form-container', |
||||
|
props: ['label'], |
||||
|
data() { |
||||
|
return { |
||||
|
formInline: { |
||||
|
locationId: '' |
||||
|
}, |
||||
|
locationId: '' |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getLocationId(); |
||||
|
}, |
||||
|
methods: { |
||||
|
getLocationId() { |
||||
|
GET_LOCATIONS().then(res => { |
||||
|
this.locationId = res |
||||
|
}) |
||||
|
}, |
||||
|
onSubmit() { |
||||
|
this.$emit('submit', this.formInline) |
||||
|
}, |
||||
|
resetForm1() { |
||||
|
this.formInline = { |
||||
|
name: '' |
||||
|
}; |
||||
|
this.$emit('resetForm'); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style rel="stylesheet/scss" lang="scss" scoped> |
||||
|
.form-container { |
||||
|
padding: 20px; |
||||
|
background: #fff; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,269 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<form-container @submit="submitForm" @resetForm="resetForm"></form-container> |
||||
|
<div class="table"> |
||||
|
<el-table |
||||
|
:data="lists" |
||||
|
style="width: 100%"> |
||||
|
<el-table-column |
||||
|
prop="name" |
||||
|
label="场地图片"> |
||||
|
<template slot-scope="lists"> |
||||
|
<img :src="lists.row.image" width="70" height="70" alt=""> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="name" |
||||
|
label="名称"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="locationName" |
||||
|
label="场地地址"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="users" |
||||
|
label="分润人数"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="stateText" |
||||
|
label="状态"> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column |
||||
|
fixed="right" |
||||
|
label="操作" |
||||
|
> |
||||
|
<template slot-scope="lists"> |
||||
|
<span |
||||
|
type="text" |
||||
|
size="small" |
||||
|
class="option-span" |
||||
|
@click="suspensionOfRelease(lists.row.id,lists.row.enabled)" |
||||
|
> |
||||
|
<span>{{lists.row.enabled==true?"暂停":"发布"}}</span> |
||||
|
</span> |
||||
|
<span |
||||
|
type="text" |
||||
|
size="small" |
||||
|
style="margin: 0 5px;" |
||||
|
class="option-span" |
||||
|
@click="editModal(lists.row.id)" |
||||
|
> |
||||
|
<span>编辑</span> |
||||
|
</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<div class="pagination"> |
||||
|
<el-pagination |
||||
|
background |
||||
|
:page-size="params.size" |
||||
|
layout="prev, pager, next" |
||||
|
:total="count" |
||||
|
@current-change="currentChange" |
||||
|
> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<el-dialog |
||||
|
width="400px" |
||||
|
:show-close="false" |
||||
|
:visible.sync="isEdit"> |
||||
|
<details-of-distribution ref="distribution" :currId="id" v-if="isEdit"></details-of-distribution> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button @click="isEdit = false">取消</el-button> |
||||
|
<el-button type="primary" @click="determine('ruleForm')">确定</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
const FormContainer = () => import('./form.vue'); |
||||
|
const DetailsOfDistribution = () => import('./detailsOfDistribution.vue'); |
||||
|
import { |
||||
|
GET_FIELD_LIST, |
||||
|
POST_FIELD_LIST, |
||||
|
ENABLE_FIELD_LIST, |
||||
|
DISABLE_FIELD_LIST, |
||||
|
COUNT_FIELD_LIST |
||||
|
} from '@/api/distribution' |
||||
|
import Alert from "@/utils/alert"; |
||||
|
import {pageSize} from '../../config'; |
||||
|
|
||||
|
export default { |
||||
|
name: "index", |
||||
|
data() { |
||||
|
return { |
||||
|
count: 0, |
||||
|
id: '', |
||||
|
isEdit: false, |
||||
|
lists: [], |
||||
|
params: { |
||||
|
from: 0, |
||||
|
size: pageSize, |
||||
|
locationId: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
components: { |
||||
|
FormContainer, |
||||
|
DetailsOfDistribution |
||||
|
}, |
||||
|
methods: { |
||||
|
submitForm(res) { |
||||
|
this.params = { |
||||
|
...this.params, |
||||
|
locationId: res.locationId, |
||||
|
}; |
||||
|
this.getList() |
||||
|
}, |
||||
|
resetForm() { |
||||
|
this.params = { |
||||
|
from: 0, |
||||
|
size: pageSize, |
||||
|
locationId: '' |
||||
|
}; |
||||
|
this.getList() |
||||
|
}, |
||||
|
getList() { |
||||
|
GET_FIELD_LIST(this.params).then(res => { |
||||
|
res.map((item) => { |
||||
|
item.stateText = item.enabled ? '生效中' : '失效中'; |
||||
|
item.locationName = item.province + item.city + item.district + item.name; |
||||
|
return item |
||||
|
}); |
||||
|
this.lists = res |
||||
|
}); |
||||
|
|
||||
|
COUNT_FIELD_LIST(this.params).then(res => { |
||||
|
this.count = res |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 分页 |
||||
|
*/ |
||||
|
currentChange(res) { |
||||
|
this.params = { |
||||
|
...this.params, |
||||
|
from: parseInt(res - 1) * this.params.size, |
||||
|
size: pageSize, |
||||
|
}; |
||||
|
this.getList() |
||||
|
}, |
||||
|
|
||||
|
editModal(id) { |
||||
|
this.isEdit = true; |
||||
|
this.id = id; |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 状态操作 |
||||
|
*/ |
||||
|
suspensionOfRelease(id, enabled) { |
||||
|
if (enabled) { |
||||
|
this.PUBLISHED(id) |
||||
|
} else { |
||||
|
this.PAUSEDANDPENDING(id) |
||||
|
} |
||||
|
}, |
||||
|
/** |
||||
|
* 已发布 |
||||
|
* @constructor |
||||
|
*/ |
||||
|
PUBLISHED(id) { |
||||
|
let params = { |
||||
|
id |
||||
|
}; |
||||
|
DISABLE_FIELD_LIST(params).then((res) => { |
||||
|
let lists = []; |
||||
|
this.lists.map((item) => { |
||||
|
if (item.id == id) { |
||||
|
item.stateText = '失效中'; |
||||
|
item.enabled = false; |
||||
|
} |
||||
|
lists.push(item); |
||||
|
return item; |
||||
|
}); |
||||
|
this.lists = lists; |
||||
|
Alert.success("已失效"); |
||||
|
}); |
||||
|
}, |
||||
|
/** |
||||
|
* 已暂停或者待发布 |
||||
|
* @constructor |
||||
|
*/ |
||||
|
PAUSEDANDPENDING(id) { |
||||
|
let params = { |
||||
|
id |
||||
|
}; |
||||
|
ENABLE_FIELD_LIST(params).then((res) => { |
||||
|
let lists = []; |
||||
|
this.lists.map((item) => { |
||||
|
if (item.id == id) { |
||||
|
item.stateText = '生效中'; |
||||
|
item.enabled = true; |
||||
|
} |
||||
|
lists.push(item); |
||||
|
return item; |
||||
|
}); |
||||
|
this.lists = lists; |
||||
|
Alert.success("已生效"); |
||||
|
}); |
||||
|
}, |
||||
|
determine() { |
||||
|
let that = this; |
||||
|
let child = this.$refs.distribution.lists; |
||||
|
let params = { |
||||
|
id: this.id, |
||||
|
items: child |
||||
|
}; |
||||
|
|
||||
|
for (let index in child) { |
||||
|
if (!child[index].rate || !child[index].userId) { |
||||
|
Alert.fail("值不能为空"); |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
for (let i = 0; i < child.length; i++) { |
||||
|
for (let j = i + 1; j < child.length; j++) { |
||||
|
if (child[i].userId == child[j].userId) { |
||||
|
Alert.fail("分润对象不能一样"); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
POST_FIELD_LIST(params).then(res => { |
||||
|
Alert.success("添加成功"); |
||||
|
that.isEdit = false; |
||||
|
that.getList(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style rel="stylesheet/scss" lang="scss" scoped> |
||||
|
.table { |
||||
|
margin-top: 20px; |
||||
|
padding: 30px; |
||||
|
background: #fff; |
||||
|
|
||||
|
.option-span { |
||||
|
color: #409EFF; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.pagination { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,118 @@ |
|||||
|
<template> |
||||
|
<el-row> |
||||
|
<el-col :span="24" style="margin-bottom: 10px;"> |
||||
|
<div class="grid-content bg-purple-dark"> |
||||
|
<el-col :span="12"> |
||||
|
<div class="grid-content bg-purple">分润对象:</div> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="grid-content bg-purple-light">分润比例:</div> |
||||
|
</el-col> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="24" v-for="(item,index) in lists" style="margin-bottom: 10px;"> |
||||
|
<el-form :inline="true" class="demo-form-inline"> |
||||
|
<div class="grid-content bg-purple-dark"> |
||||
|
<el-row :gutter="15"> |
||||
|
<el-col :span="10"> |
||||
|
<div class="grid-content bg-purple"> |
||||
|
<el-select v-model="item.userId" :value="item.userId" placeholder="选择分润对象"> |
||||
|
<el-option v-for="opi in accounts" :label="opi.name" :value="opi.id"></el-option> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="10"> |
||||
|
<div class="grid-content bg-purple-light"> |
||||
|
<el-input placeholder="" @input="limitMax(item.rate,index)" v-model="item.rate" max="100" min="1"></el-input> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<div class="grid-content bg-purple-light"> |
||||
|
<el-button type="danger" @click="deleteObj(index)" icon="el-icon-delete"></el-button> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</el-col> |
||||
|
<el-button @click="addObj">添加分润对象</el-button> |
||||
|
</el-row> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {GET_ACCOUNT_LIST} from '@/api/privilegeManagement' |
||||
|
import {DETAIL_FIELD_LIST} from '@/api/distribution' |
||||
|
import Alert from "@/utils/alert"; |
||||
|
|
||||
|
export default { |
||||
|
name: "detailsOfDistribution", |
||||
|
props: ['currId'], |
||||
|
data() { |
||||
|
return { |
||||
|
lists: [], |
||||
|
accounts: [] |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
currId() { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getAccounts(); |
||||
|
this.getDetail(); |
||||
|
}, |
||||
|
methods: { |
||||
|
getDetail() { |
||||
|
let params = { |
||||
|
id: this.currId |
||||
|
}; |
||||
|
DETAIL_FIELD_LIST(params).then(res => { |
||||
|
this.lists = res |
||||
|
}) |
||||
|
}, |
||||
|
/** |
||||
|
* 添加分润对象 |
||||
|
*/ |
||||
|
addObj() { |
||||
|
let obj = { |
||||
|
userId: '', |
||||
|
rate: '' |
||||
|
}; |
||||
|
this.lists.push(obj) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 删除分润对象 |
||||
|
*/ |
||||
|
deleteObj(idx) { |
||||
|
let lists = []; |
||||
|
this.lists.map((item, index) => { |
||||
|
if (idx != index) { |
||||
|
lists.push(item) |
||||
|
} |
||||
|
return item; |
||||
|
}); |
||||
|
this.lists = lists |
||||
|
}, |
||||
|
getAccounts() { |
||||
|
GET_ACCOUNT_LIST().then(res => { |
||||
|
this.accounts = res; |
||||
|
}) |
||||
|
}, |
||||
|
limitMax(val, idx) { |
||||
|
if (val >= 100 || val <= 0) { |
||||
|
Alert.fail('值不能大于100,小于0'); |
||||
|
val = '' |
||||
|
} |
||||
|
|
||||
|
this.lists[idx].rate = val; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style rel="stylesheet/scss" lang="scss" scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,60 @@ |
|||||
|
<template> |
||||
|
<div class="form-container"> |
||||
|
<el-form :inline="true" :model="formInline" class="demo-form-inline"> |
||||
|
<el-form-item label="场地"> |
||||
|
<el-select v-model="formInline.locationId" value="" placeholder="场地"> |
||||
|
<el-option label="全部" value=""></el-option> |
||||
|
<el-option v-for="item in locationId" :label="item.name" :value="item.id"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item style="padding-left:30px"> |
||||
|
<el-button type="default" @click="resetForm1('formInline')">重置</el-button> |
||||
|
<el-button type="primary" @click="onSubmit">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {GET_LOCATIONS} from '@/api/common' |
||||
|
|
||||
|
export default { |
||||
|
name: 'form-container', |
||||
|
props: ['label'], |
||||
|
data() { |
||||
|
return { |
||||
|
formInline: { |
||||
|
locationId: '' |
||||
|
}, |
||||
|
locationId: '' |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getLocationId(); |
||||
|
}, |
||||
|
methods: { |
||||
|
getLocationId() { |
||||
|
GET_LOCATIONS().then(res => { |
||||
|
this.locationId = res |
||||
|
}) |
||||
|
}, |
||||
|
onSubmit() { |
||||
|
this.$emit('submit', this.formInline) |
||||
|
}, |
||||
|
resetForm1() { |
||||
|
this.formInline = { |
||||
|
name: '' |
||||
|
}; |
||||
|
this.$emit('resetForm'); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style rel="stylesheet/scss" lang="scss" scoped> |
||||
|
.form-container { |
||||
|
padding: 20px; |
||||
|
background: #fff; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,269 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<form-container @submit="submitForm" @resetForm="resetForm"></form-container> |
||||
|
<div class="table"> |
||||
|
<el-table |
||||
|
:data="lists" |
||||
|
style="width: 100%"> |
||||
|
<el-table-column |
||||
|
prop="name" |
||||
|
label="场地图片"> |
||||
|
<template slot-scope="lists"> |
||||
|
<img :src="lists.row.image" width="70" height="70" alt=""> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="name" |
||||
|
label="名称"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="locationName" |
||||
|
label="场地地址"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="users" |
||||
|
label="分润人数"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="stateText" |
||||
|
label="状态"> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column |
||||
|
fixed="right" |
||||
|
label="操作" |
||||
|
> |
||||
|
<template slot-scope="lists"> |
||||
|
<span |
||||
|
type="text" |
||||
|
size="small" |
||||
|
class="option-span" |
||||
|
@click="suspensionOfRelease(lists.row.id,lists.row.enabled)" |
||||
|
> |
||||
|
<span>{{lists.row.enabled==true?"暂停":"发布"}}</span> |
||||
|
</span> |
||||
|
<span |
||||
|
type="text" |
||||
|
size="small" |
||||
|
style="margin: 0 5px;" |
||||
|
class="option-span" |
||||
|
@click="editModal(lists.row.id)" |
||||
|
> |
||||
|
<span>编辑</span> |
||||
|
</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<div class="pagination"> |
||||
|
<el-pagination |
||||
|
background |
||||
|
:page-size="params.size" |
||||
|
layout="prev, pager, next" |
||||
|
:total="count" |
||||
|
@current-change="currentChange" |
||||
|
> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<el-dialog |
||||
|
width="400px" |
||||
|
:show-close="false" |
||||
|
:visible.sync="isEdit"> |
||||
|
<details-of-distribution ref="distribution" :currId="id" v-if="isEdit"></details-of-distribution> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button @click="isEdit = false">取消</el-button> |
||||
|
<el-button type="primary" @click="determine('ruleForm')">确定</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
const FormContainer = () => import('./form.vue'); |
||||
|
const DetailsOfDistribution = () => import('./detailsOfDistribution.vue'); |
||||
|
import { |
||||
|
GET_FIELD_LIST, |
||||
|
POST_FIELD_LIST, |
||||
|
ENABLE_FIELD_LIST, |
||||
|
DISABLE_FIELD_LIST, |
||||
|
COUNT_FIELD_LIST |
||||
|
} from '@/api/distribution' |
||||
|
import Alert from "@/utils/alert"; |
||||
|
import {pageSize} from '../../config'; |
||||
|
|
||||
|
export default { |
||||
|
name: "index", |
||||
|
data() { |
||||
|
return { |
||||
|
count: 0, |
||||
|
id: '', |
||||
|
isEdit: false, |
||||
|
lists: [], |
||||
|
params: { |
||||
|
from: 0, |
||||
|
size: pageSize, |
||||
|
locationId: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
components: { |
||||
|
FormContainer, |
||||
|
DetailsOfDistribution |
||||
|
}, |
||||
|
methods: { |
||||
|
submitForm(res) { |
||||
|
this.params = { |
||||
|
...this.params, |
||||
|
locationId: res.locationId, |
||||
|
}; |
||||
|
this.getList() |
||||
|
}, |
||||
|
resetForm() { |
||||
|
this.params = { |
||||
|
from: 0, |
||||
|
size: pageSize, |
||||
|
locationId: '' |
||||
|
}; |
||||
|
this.getList() |
||||
|
}, |
||||
|
getList() { |
||||
|
GET_FIELD_LIST(this.params).then(res => { |
||||
|
res.map((item) => { |
||||
|
item.stateText = item.enabled ? '生效中' : '失效中'; |
||||
|
item.locationName = item.province + item.city + item.district + item.name; |
||||
|
return item |
||||
|
}); |
||||
|
this.lists = res |
||||
|
}); |
||||
|
|
||||
|
COUNT_FIELD_LIST(this.params).then(res => { |
||||
|
this.count = res |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 分页 |
||||
|
*/ |
||||
|
currentChange(res) { |
||||
|
this.params = { |
||||
|
...this.params, |
||||
|
from: parseInt(res - 1) * this.params.size, |
||||
|
size: pageSize, |
||||
|
}; |
||||
|
this.getList() |
||||
|
}, |
||||
|
|
||||
|
editModal(id) { |
||||
|
this.isEdit = true; |
||||
|
this.id = id; |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 状态操作 |
||||
|
*/ |
||||
|
suspensionOfRelease(id, enabled) { |
||||
|
if (enabled) { |
||||
|
this.PUBLISHED(id) |
||||
|
} else { |
||||
|
this.PAUSEDANDPENDING(id) |
||||
|
} |
||||
|
}, |
||||
|
/** |
||||
|
* 已发布 |
||||
|
* @constructor |
||||
|
*/ |
||||
|
PUBLISHED(id) { |
||||
|
let params = { |
||||
|
id |
||||
|
}; |
||||
|
DISABLE_FIELD_LIST(params).then((res) => { |
||||
|
let lists = []; |
||||
|
this.lists.map((item) => { |
||||
|
if (item.id == id) { |
||||
|
item.stateText = '失效中'; |
||||
|
item.enabled = false; |
||||
|
} |
||||
|
lists.push(item); |
||||
|
return item; |
||||
|
}); |
||||
|
this.lists = lists; |
||||
|
Alert.success("已失效"); |
||||
|
}); |
||||
|
}, |
||||
|
/** |
||||
|
* 已暂停或者待发布 |
||||
|
* @constructor |
||||
|
*/ |
||||
|
PAUSEDANDPENDING(id) { |
||||
|
let params = { |
||||
|
id |
||||
|
}; |
||||
|
ENABLE_FIELD_LIST(params).then((res) => { |
||||
|
let lists = []; |
||||
|
this.lists.map((item) => { |
||||
|
if (item.id == id) { |
||||
|
item.stateText = '生效中'; |
||||
|
item.enabled = true; |
||||
|
} |
||||
|
lists.push(item); |
||||
|
return item; |
||||
|
}); |
||||
|
this.lists = lists; |
||||
|
Alert.success("已生效"); |
||||
|
}); |
||||
|
}, |
||||
|
determine() { |
||||
|
let that = this; |
||||
|
let child = this.$refs.distribution.lists; |
||||
|
let params = { |
||||
|
id: this.id, |
||||
|
items: child |
||||
|
}; |
||||
|
|
||||
|
for (let index in child) { |
||||
|
if (!child[index].rate || !child[index].userId) { |
||||
|
Alert.fail("值不能为空"); |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
for (let i = 0; i < child.length; i++) { |
||||
|
for (let j = i + 1; j < child.length; j++) { |
||||
|
if (child[i].userId == child[j].userId) { |
||||
|
Alert.fail("分润对象不能一样"); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
POST_FIELD_LIST(params).then(res => { |
||||
|
Alert.success("添加成功"); |
||||
|
that.isEdit = false; |
||||
|
that.getList(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style rel="stylesheet/scss" lang="scss" scoped> |
||||
|
.table { |
||||
|
margin-top: 20px; |
||||
|
padding: 30px; |
||||
|
background: #fff; |
||||
|
|
||||
|
.option-span { |
||||
|
color: #409EFF; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.pagination { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,118 @@ |
|||||
|
<template> |
||||
|
<el-row> |
||||
|
<el-col :span="24" style="margin-bottom: 10px;"> |
||||
|
<div class="grid-content bg-purple-dark"> |
||||
|
<el-col :span="12"> |
||||
|
<div class="grid-content bg-purple">分润对象:</div> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="grid-content bg-purple-light">分润比例:</div> |
||||
|
</el-col> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="24" v-for="(item,index) in lists" style="margin-bottom: 10px;"> |
||||
|
<el-form :inline="true" class="demo-form-inline"> |
||||
|
<div class="grid-content bg-purple-dark"> |
||||
|
<el-row :gutter="15"> |
||||
|
<el-col :span="10"> |
||||
|
<div class="grid-content bg-purple"> |
||||
|
<el-select v-model="item.userId" :value="item.userId" placeholder="选择分润对象"> |
||||
|
<el-option v-for="opi in accounts" :label="opi.name" :value="opi.id"></el-option> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="10"> |
||||
|
<div class="grid-content bg-purple-light"> |
||||
|
<el-input placeholder="" @input="limitMax(item.rate,index)" v-model="item.rate" max="100" min="1"></el-input> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="4"> |
||||
|
<div class="grid-content bg-purple-light"> |
||||
|
<el-button type="danger" @click="deleteObj(index)" icon="el-icon-delete"></el-button> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
|
||||
|
</el-row> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</el-col> |
||||
|
<el-button @click="addObj">添加分润对象</el-button> |
||||
|
</el-row> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {GET_ACCOUNT_LIST} from '@/api/privilegeManagement' |
||||
|
import {DETAIL_FIELD_LIST} from '@/api/distribution' |
||||
|
import Alert from "@/utils/alert"; |
||||
|
|
||||
|
export default { |
||||
|
name: "detailsOfDistribution", |
||||
|
props: ['currId'], |
||||
|
data() { |
||||
|
return { |
||||
|
lists: [], |
||||
|
accounts: [] |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
currId() { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getAccounts(); |
||||
|
this.getDetail(); |
||||
|
}, |
||||
|
methods: { |
||||
|
getDetail() { |
||||
|
let params = { |
||||
|
id: this.currId |
||||
|
}; |
||||
|
DETAIL_FIELD_LIST(params).then(res => { |
||||
|
this.lists = res |
||||
|
}) |
||||
|
}, |
||||
|
/** |
||||
|
* 添加分润对象 |
||||
|
*/ |
||||
|
addObj() { |
||||
|
let obj = { |
||||
|
userId: '', |
||||
|
rate: '' |
||||
|
}; |
||||
|
this.lists.push(obj) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 删除分润对象 |
||||
|
*/ |
||||
|
deleteObj(idx) { |
||||
|
let lists = []; |
||||
|
this.lists.map((item, index) => { |
||||
|
if (idx != index) { |
||||
|
lists.push(item) |
||||
|
} |
||||
|
return item; |
||||
|
}); |
||||
|
this.lists = lists |
||||
|
}, |
||||
|
getAccounts() { |
||||
|
GET_ACCOUNT_LIST().then(res => { |
||||
|
this.accounts = res; |
||||
|
}) |
||||
|
}, |
||||
|
limitMax(val, idx) { |
||||
|
if (val >= 100 || val <= 0) { |
||||
|
Alert.fail('值不能大于100,小于0'); |
||||
|
val = '' |
||||
|
} |
||||
|
|
||||
|
this.lists[idx].rate = val; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style rel="stylesheet/scss" lang="scss" scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,60 @@ |
|||||
|
<template> |
||||
|
<div class="form-container"> |
||||
|
<el-form :inline="true" :model="formInline" class="demo-form-inline"> |
||||
|
<el-form-item label="场地"> |
||||
|
<el-select v-model="formInline.locationId" value="" placeholder="场地"> |
||||
|
<el-option label="全部" value=""></el-option> |
||||
|
<el-option v-for="item in locationId" :label="item.name" :value="item.id"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item style="padding-left:30px"> |
||||
|
<el-button type="default" @click="resetForm1('formInline')">重置</el-button> |
||||
|
<el-button type="primary" @click="onSubmit">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {GET_LOCATIONS} from '@/api/common' |
||||
|
|
||||
|
export default { |
||||
|
name: 'form-container', |
||||
|
props: ['label'], |
||||
|
data() { |
||||
|
return { |
||||
|
formInline: { |
||||
|
locationId: '' |
||||
|
}, |
||||
|
locationId: '' |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getLocationId(); |
||||
|
}, |
||||
|
methods: { |
||||
|
getLocationId() { |
||||
|
GET_LOCATIONS().then(res => { |
||||
|
this.locationId = res |
||||
|
}) |
||||
|
}, |
||||
|
onSubmit() { |
||||
|
this.$emit('submit', this.formInline) |
||||
|
}, |
||||
|
resetForm1() { |
||||
|
this.formInline = { |
||||
|
name: '' |
||||
|
}; |
||||
|
this.$emit('resetForm'); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style rel="stylesheet/scss" lang="scss" scoped> |
||||
|
.form-container { |
||||
|
padding: 20px; |
||||
|
background: #fff; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,269 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<form-container @submit="submitForm" @resetForm="resetForm"></form-container> |
||||
|
<div class="table"> |
||||
|
<el-table |
||||
|
:data="lists" |
||||
|
style="width: 100%"> |
||||
|
<el-table-column |
||||
|
prop="name" |
||||
|
label="场地图片"> |
||||
|
<template slot-scope="lists"> |
||||
|
<img :src="lists.row.image" width="70" height="70" alt=""> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="name" |
||||
|
label="名称"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="locationName" |
||||
|
label="场地地址"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="users" |
||||
|
label="分润人数"> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
prop="stateText" |
||||
|
label="状态"> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column |
||||
|
fixed="right" |
||||
|
label="操作" |
||||
|
> |
||||
|
<template slot-scope="lists"> |
||||
|
<span |
||||
|
type="text" |
||||
|
size="small" |
||||
|
class="option-span" |
||||
|
@click="suspensionOfRelease(lists.row.id,lists.row.enabled)" |
||||
|
> |
||||
|
<span>{{lists.row.enabled==true?"暂停":"发布"}}</span> |
||||
|
</span> |
||||
|
<span |
||||
|
type="text" |
||||
|
size="small" |
||||
|
style="margin: 0 5px;" |
||||
|
class="option-span" |
||||
|
@click="editModal(lists.row.id)" |
||||
|
> |
||||
|
<span>编辑</span> |
||||
|
</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<div class="pagination"> |
||||
|
<el-pagination |
||||
|
background |
||||
|
:page-size="params.size" |
||||
|
layout="prev, pager, next" |
||||
|
:total="count" |
||||
|
@current-change="currentChange" |
||||
|
> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<el-dialog |
||||
|
width="400px" |
||||
|
:show-close="false" |
||||
|
:visible.sync="isEdit"> |
||||
|
<details-of-distribution ref="distribution" :currId="id" v-if="isEdit"></details-of-distribution> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button @click="isEdit = false">取消</el-button> |
||||
|
<el-button type="primary" @click="determine('ruleForm')">确定</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
const FormContainer = () => import('./form.vue'); |
||||
|
const DetailsOfDistribution = () => import('./detailsOfDistribution.vue'); |
||||
|
import { |
||||
|
GET_FIELD_LIST, |
||||
|
POST_FIELD_LIST, |
||||
|
ENABLE_FIELD_LIST, |
||||
|
DISABLE_FIELD_LIST, |
||||
|
COUNT_FIELD_LIST |
||||
|
} from '@/api/distribution' |
||||
|
import Alert from "@/utils/alert"; |
||||
|
import {pageSize} from '../../config'; |
||||
|
|
||||
|
export default { |
||||
|
name: "index", |
||||
|
data() { |
||||
|
return { |
||||
|
count: 0, |
||||
|
id: '', |
||||
|
isEdit: false, |
||||
|
lists: [], |
||||
|
params: { |
||||
|
from: 0, |
||||
|
size: pageSize, |
||||
|
locationId: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
components: { |
||||
|
FormContainer, |
||||
|
DetailsOfDistribution |
||||
|
}, |
||||
|
methods: { |
||||
|
submitForm(res) { |
||||
|
this.params = { |
||||
|
...this.params, |
||||
|
locationId: res.locationId, |
||||
|
}; |
||||
|
this.getList() |
||||
|
}, |
||||
|
resetForm() { |
||||
|
this.params = { |
||||
|
from: 0, |
||||
|
size: pageSize, |
||||
|
locationId: '' |
||||
|
}; |
||||
|
this.getList() |
||||
|
}, |
||||
|
getList() { |
||||
|
GET_FIELD_LIST(this.params).then(res => { |
||||
|
res.map((item) => { |
||||
|
item.stateText = item.enabled ? '生效中' : '失效中'; |
||||
|
item.locationName = item.province + item.city + item.district + item.name; |
||||
|
return item |
||||
|
}); |
||||
|
this.lists = res |
||||
|
}); |
||||
|
|
||||
|
COUNT_FIELD_LIST(this.params).then(res => { |
||||
|
this.count = res |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 分页 |
||||
|
*/ |
||||
|
currentChange(res) { |
||||
|
this.params = { |
||||
|
...this.params, |
||||
|
from: parseInt(res - 1) * this.params.size, |
||||
|
size: pageSize, |
||||
|
}; |
||||
|
this.getList() |
||||
|
}, |
||||
|
|
||||
|
editModal(id) { |
||||
|
this.isEdit = true; |
||||
|
this.id = id; |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 状态操作 |
||||
|
*/ |
||||
|
suspensionOfRelease(id, enabled) { |
||||
|
if (enabled) { |
||||
|
this.PUBLISHED(id) |
||||
|
} else { |
||||
|
this.PAUSEDANDPENDING(id) |
||||
|
} |
||||
|
}, |
||||
|
/** |
||||
|
* 已发布 |
||||
|
* @constructor |
||||
|
*/ |
||||
|
PUBLISHED(id) { |
||||
|
let params = { |
||||
|
id |
||||
|
}; |
||||
|
DISABLE_FIELD_LIST(params).then((res) => { |
||||
|
let lists = []; |
||||
|
this.lists.map((item) => { |
||||
|
if (item.id == id) { |
||||
|
item.stateText = '失效中'; |
||||
|
item.enabled = false; |
||||
|
} |
||||
|
lists.push(item); |
||||
|
return item; |
||||
|
}); |
||||
|
this.lists = lists; |
||||
|
Alert.success("已失效"); |
||||
|
}); |
||||
|
}, |
||||
|
/** |
||||
|
* 已暂停或者待发布 |
||||
|
* @constructor |
||||
|
*/ |
||||
|
PAUSEDANDPENDING(id) { |
||||
|
let params = { |
||||
|
id |
||||
|
}; |
||||
|
ENABLE_FIELD_LIST(params).then((res) => { |
||||
|
let lists = []; |
||||
|
this.lists.map((item) => { |
||||
|
if (item.id == id) { |
||||
|
item.stateText = '生效中'; |
||||
|
item.enabled = true; |
||||
|
} |
||||
|
lists.push(item); |
||||
|
return item; |
||||
|
}); |
||||
|
this.lists = lists; |
||||
|
Alert.success("已生效"); |
||||
|
}); |
||||
|
}, |
||||
|
determine() { |
||||
|
let that = this; |
||||
|
let child = this.$refs.distribution.lists; |
||||
|
let params = { |
||||
|
id: this.id, |
||||
|
items: child |
||||
|
}; |
||||
|
|
||||
|
for (let index in child) { |
||||
|
if (!child[index].rate || !child[index].userId) { |
||||
|
Alert.fail("值不能为空"); |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
for (let i = 0; i < child.length; i++) { |
||||
|
for (let j = i + 1; j < child.length; j++) { |
||||
|
if (child[i].userId == child[j].userId) { |
||||
|
Alert.fail("分润对象不能一样"); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
POST_FIELD_LIST(params).then(res => { |
||||
|
Alert.success("添加成功"); |
||||
|
that.isEdit = false; |
||||
|
that.getList(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style rel="stylesheet/scss" lang="scss" scoped> |
||||
|
.table { |
||||
|
margin-top: 20px; |
||||
|
padding: 30px; |
||||
|
background: #fff; |
||||
|
|
||||
|
.option-span { |
||||
|
color: #409EFF; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.pagination { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue