Commit 8d94b757 by 王志慧

功能按钮添加

1 parent 14e67f5a
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.2.2", "glsx-components": "^1.2.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-amap": "^0.5.10", "vue-amap": "^0.5.10",
......
...@@ -29,6 +29,7 @@ from '@/setup' ...@@ -29,6 +29,7 @@ from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
export const http_config = params => Vue.prototype.$http_config(params) export const http_config = params => Vue.prototype.$http_config(params)
console.log(http_config)
Object.keys(filters).forEach(key => { Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key]); Vue.filter(key, filters[key]);
}); });
\ No newline at end of file \ No newline at end of file
...@@ -14,7 +14,7 @@ import '@/assets/css/common.scss' ...@@ -14,7 +14,7 @@ import '@/assets/css/common.scss'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState }) { export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret, request_common, request_config, sign_common } = await fetchConfig() const { response, request, sign, secret, request_common, request_config, sign_common } = await fetchConfig()
console.log(request) console.log(request)
Vue.prototype.$history = history Vue.prototype.$history = history
...@@ -26,13 +26,17 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -26,13 +26,17 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_config = new common.Http({ response, request: request_config, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http_config = new common.Http({ response, request: request_config, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase})
} }
export async function mount(props) { export async function mount(props) {
console.log('11111', props) console.log('22222', props)
console.log(routes)
const insts = render(props.routerBase, routes) const insts = render(props.routerBase, routes)
router = insts.router router = insts.router
instance = insts.vm instance = insts.vm
......
...@@ -15,6 +15,19 @@ ...@@ -15,6 +15,19 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话" prop="merchantLegalPersonPhone">
<el-input maxlength="11" size="small" v-model="accountAddForm.merchantLegalPersonPhone" placeholder="请输入联系电话"></el-input>
<el-checkbox v-model="accountAddForm.isloginName">联系电话同时作为登录账户名</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人">
<el-input size="small" v-model="accountAddForm.merchantLegalPerson" placeholder="请输入联系人"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="12">
<el-form-item size="small" label="商户类型" class="merchant-row"> <el-form-item size="small" label="商户类型" class="merchant-row">
<el-input v-model="accountAddForm.merchantOrgcode" placeholder="请输入组织机构号码" v-if="accountAddForm.merchantType == 2" maxlength="50"> <el-input v-model="accountAddForm.merchantOrgcode" placeholder="请输入组织机构号码" v-if="accountAddForm.merchantType == 2" maxlength="50">
<el-select v-model="accountAddForm.merchantType" slot="prepend" placeholder="请选择"> <el-select v-model="accountAddForm.merchantType" slot="prepend" placeholder="请选择">
...@@ -30,7 +43,7 @@ ...@@ -30,7 +43,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row> -->
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item size="small" label="商户地址" class="form-row"> <el-form-item size="small" label="商户地址" class="form-row">
...@@ -39,7 +52,7 @@ ...@@ -39,7 +52,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话" prop="merchantLegalPersonPhone"> <el-form-item label="联系电话" prop="merchantLegalPersonPhone">
<el-input maxlength="11" size="small" v-model="accountAddForm.merchantLegalPersonPhone" placeholder="请输入联系电话"></el-input> <el-input maxlength="11" size="small" v-model="accountAddForm.merchantLegalPersonPhone" placeholder="请输入联系电话"></el-input>
...@@ -51,7 +64,7 @@ ...@@ -51,7 +64,7 @@
<el-input size="small" v-model="accountAddForm.merchantLegalPerson" placeholder="请输入联系人"></el-input> <el-input size="small" v-model="accountAddForm.merchantLegalPerson" placeholder="请输入联系人"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row> -->
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="驻店联系人"> <el-form-item label="驻店联系人">
......
<template> <template>
<div class="scrm-main"> <div class="scrm-main">
<div class="form-header" v-if="$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1"> <div class="form-header" v-if="$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1">
<el-button type="primary" @click="handleContact" size="small" icon="el-icon-link" <GLButton @click="handleContact" icon="el-icon-link" fn="门店账户关联企微" type="primary" size="small" display="disabled" mode="el-button">门店账户关联企微</GLButton>
<!-- <el-button type="primary" @click="handleContact" size="small" icon="el-icon-link"
>门店账户关联企微</el-button >门店账户关联企微</el-button
> > -->
</div> </div>
<div class="follow-form"> <div class="follow-form">
<el-form :inline="true" :model="searchForm" class="follow-form-item" label-width="80px"> <el-form :inline="true" :model="searchForm" class="follow-form-item" label-width="80px">
...@@ -14,16 +15,14 @@ ...@@ -14,16 +15,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="merchant-row" size="small"> <el-form-item class="merchant-row" size="small">
<el-input <el-input size="small" v-model="searchForm.merchantLoginAccount" placeholder="请输入" v-if="searchForm.accountOrPhone == 1">
size="small"
v-model="searchForm.merchantLoginAccount"
placeholder="请输入"
v-if="searchForm.accountOrPhone == 1"
>
<el-select <el-select
size="small" size="small"
v-model="searchForm.accountOrPhone" v-model="searchForm.accountOrPhone"
@change="searchForm.merchantLoginAccount = '';searchForm.merchantLegalPersonPhone = ''" @change="
searchForm.merchantLoginAccount = ''
searchForm.merchantLegalPersonPhone = ''
"
slot="prepend" slot="prepend"
placeholder="请选择" placeholder="请选择"
> >
...@@ -31,17 +30,15 @@ ...@@ -31,17 +30,15 @@
<el-option label="手机号" :value="2"></el-option> <el-option label="手机号" :value="2"></el-option>
</el-select> </el-select>
</el-input> </el-input>
<el-input <el-input size="small" v-model="searchForm.merchantLegalPersonPhone" placeholder="请输入" v-if="searchForm.accountOrPhone == 2">
size="small"
v-model="searchForm.merchantLegalPersonPhone"
placeholder="请输入"
v-if="searchForm.accountOrPhone == 2"
>
<el-select <el-select
size="small" size="small"
v-model="searchForm.accountOrPhone" v-model="searchForm.accountOrPhone"
slot="prepend" slot="prepend"
@change="searchForm.merchantLoginAccount = '';searchForm.merchantLegalPersonPhone = ''" @change="
searchForm.merchantLoginAccount = ''
searchForm.merchantLegalPersonPhone = ''
"
placeholder="请选择" placeholder="请选择"
> >
<el-option label="登录账户名" :value="1"></el-option> <el-option label="登录账户名" :value="1"></el-option>
...@@ -77,8 +74,10 @@ ...@@ -77,8 +74,10 @@
</div> </div>
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleLook(scope.scope)">查看</el-button> <el-button type="text" @click="handleLook(scope.scope)">查看</el-button>
<el-button type="text" @click="handleEdit(scope.scope)" v-if="$globalState.session.merchantId != scope.scope.merchantNo">修改</el-button> <GLButton type="text" @click="handleEdit(scope.scope)" v-if="$globalState.session.merchantId != scope.scope.merchantNo" fn="修改" display="disabled" mode="el-button">修改</GLButton>
<el-button type="text" @click="handleAdd(scope.scope)" v-if="scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4">创建子商户/门店</el-button> <GLButton type="text" @click="handleAdd(scope.scope)" v-if="scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4" fn="创建子商户/门店" display="disabled" mode="el-button">创建子商户/门店</GLButton>
<!-- <el-button type="text" @click="handleEdit(scope.scope)" v-if="$globalState.session.merchantId != scope.scope.merchantNo">修改</el-button>
<el-button type="text" @click="handleAdd(scope.scope)" v-if="scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4">创建子商户/门店</el-button> -->
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -132,11 +131,11 @@ export default { ...@@ -132,11 +131,11 @@ export default {
prop: 'merchantName' prop: 'merchantName'
}, },
{ {
label: "关联的企业微信", label: '关联的企业微信',
prop: "entmicroName", prop: 'entmicroName',
formatter: (cellValue) => { formatter: cellValue => {
return cellValue.entmicroName ? cellValue.entmicroName : "-"; return cellValue.entmicroName ? cellValue.entmicroName : '-'
}, }
}, },
{ {
label: '账户类型', label: '账户类型',
...@@ -153,11 +152,11 @@ export default { ...@@ -153,11 +152,11 @@ export default {
width: '80px' width: '80px'
}, },
{ {
label: "上级商户", label: '上级商户',
prop: "parentMerchant", prop: 'parentMerchant',
formatter: (cellValue) => { formatter: cellValue => {
return cellValue.parentMerchant ? cellValue.parentMerchant : "-"; return cellValue.parentMerchant ? cellValue.parentMerchant : '-'
}, }
}, },
{ {
label: '账户状态', label: '账户状态',
...@@ -165,11 +164,11 @@ export default { ...@@ -165,11 +164,11 @@ export default {
width: '80px' width: '80px'
}, },
{ {
label: "联系人", label: '联系人',
prop: "merchantLegalPerson", prop: 'merchantLegalPerson',
formatter: (cellValue) => { formatter: cellValue => {
return cellValue.merchantLegalPerson ? cellValue.merchantLegalPerson : "-"; return cellValue.merchantLegalPerson ? cellValue.merchantLegalPerson : '-'
}, }
}, },
{ {
label: '手机号', label: '手机号',
...@@ -177,10 +176,10 @@ export default { ...@@ -177,10 +176,10 @@ export default {
width: '120px' width: '120px'
}, },
{ {
label: "更新时间", label: '更新时间',
prop: "updatedTime", prop: 'updatedTime'
}, }
], ]
}, },
layout: 'sizes, prev, pager, next, jumper, ->, total', layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [], tableData: [],
...@@ -206,14 +205,14 @@ export default { ...@@ -206,14 +205,14 @@ export default {
} }
this.$apis.store.findAllDictData(params).then(res => { this.$apis.store.findAllDictData(params).then(res => {
if (res) { if (res) {
if (dictType == "account_level") { if (dictType == 'account_level') {
this.accountLevel = [{ dictValue: "", dictLabel: "全部" }].concat(res); this.accountLevel = [{ dictValue: '', dictLabel: '全部' }].concat(res)
} }
if (dictType == 'account_type') { if (dictType == 'account_type') {
this.accountType = res this.accountType = res
} }
if (dictType == "merchant_status") { if (dictType == 'merchant_status') {
this.merchantStatus = [{ dictValue: "", dictLabel: "全部" }].concat(res); this.merchantStatus = [{ dictValue: '', dictLabel: '全部' }].concat(res)
} }
} }
}) })
......
<!-- 员工管理 --> <!-- 员工管理 -->
<template> <template>
<div class="config-employee employee-list"> <div class="config-employee employee-list">
<div style="margin-bottom: 20px;"> <div style="margin-bottom: 20px">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">创建员工</el-button> <GLButton @click="handleEdit(1)" :size="size" class="el-icon-plus" fn="创建员工" type="primary" display="disabled" mode="el-button">创建员工</GLButton>
<!-- <el-button :size="size" type="primary" class="el-icon-plus" >创建员工</el-button> -->
</div> </div>
<div class="container"> <div class="container">
<div> <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData"></glsx-combi-form>
</glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData2"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData2">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button> <GLButton @click="handleExport" fn="导出" :size="size" type="primary" display="disabled" mode="el-button">导出</GLButton>
<!-- <el-button :size="size" type="primary" @click="handleExport">导出</el-button> -->
</span> </span>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -20,17 +21,27 @@ ...@@ -20,17 +21,27 @@
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button> <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
<el-button type="text" @click="handleEdit(2, scope.scope)">修改</el-button> <GLButton type="text" @click="handleEdit(2, scope.scope)" fn="修改" display="disabled" mode="el-button">修改</GLButton>
<!-- <el-button type="text" @click="handleEdit(2, scope.scope)">修改</el-button> -->
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
</div> </div>
<template slot="otherOptions" slot-scope="scope"> <template slot="otherOptions" slot-scope="scope">
<!-- <el-popover v-if="scope.scope.statusName == '禁用'" placement="top" width="180" trigger="hover">
<p>启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:</p>
<p>1. 角色管理-创建角色</p>
<p>2. 选择员工账户-修改角色</p>
<GLButton mode="el-switch" fn="开关" display="disabled" :size="size" slot="reference" v-model="scope.scope.statusName" active-value="启用" inactive-value="禁用" @change="e => handleSwitchChange(e, scope.scope)"></GLButton>
</el-popover> -->
<GLButton mode="div" fn="开关" display="disabled">
<el-popover v-if="scope.scope.statusName == '禁用'" placement="top" width="180" trigger="hover"> <el-popover v-if="scope.scope.statusName == '禁用'" placement="top" width="180" trigger="hover">
<p>启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:</p> <p>启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:</p>
<p>1. 角色管理-创建角色</p> <p>1. 角色管理-创建角色</p>
<p>2. 选择员工账户-修改角色</p> <p>2. 选择员工账户-修改角色</p>
<el-switch :size="size" slot="reference" v-model="scope.scope.statusName" active-value="启用" inactive-value="禁用" @change="e => handleSwitchChange(e, scope.scope)"></el-switch> <GLButton mode="el-switch" fn="开关" display="disabled" :size="size" slot="reference" v-model="scope.scope.statusName" active-value="启用" inactive-value="禁用" @change="e => handleSwitchChange(e, scope.scope)"></GLButton>
</el-popover> </el-popover>
<el-switch v-else :size="size" slot="reference" v-model="scope.scope.statusName" active-value="启用" inactive-value="禁用" @change="e => handleSwitchChange(e, scope.scope)"></el-switch> <GLButton mode="el-switch" fn="开关" display="disabled" v-else :size="size" slot="reference" v-model="scope.scope.statusName" active-value="启用" inactive-value="禁用" @change="e => handleSwitchChange(e, scope.scope)"></GLButton>
</GLButton>
</template> </template>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
......
<template> <template>
<div class="role-home-page"> <div class="role-home-page">
<div class="top_widget"> <div class="top_widget">
<el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> <GLButton size="small" fn="创建角色" icon="el-icon-plus" type="primary" display="disabled" @click="toCreatePage">创建角色</GLButton>
<!-- <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> -->
</div> </div>
<div class="table_widget"> <div class="table_widget">
<div class="search_widget"> <div class="search_widget">
...@@ -31,7 +32,8 @@ ...@@ -31,7 +32,8 @@
<GLTable v-if="distoryTable" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="getTableData"> <GLTable v-if="distoryTable" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="getTableData">
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="toLookPage(scope.scope)">查看</el-button> <el-button type="text" @click="toLookPage(scope.scope)">查看</el-button>
<el-button v-if="scope.scope.roleName!='超级管理员'" type="text" @click="toEditPage(scope.scope)">修改</el-button> <GLButton v-if="scope.scope.roleName != '超级管理员'" fn="修改" type="text" display="disabled" @click="toEditPage(scope.scope)">修改</GLButton>
<!-- <el-button v-if="scope.scope.roleName!='超级管理员'" type="text" @click="toEditPage(scope.scope)">修改</el-button> -->
<el-button v-if="scope.scope.delFlag" type="text" @click="todelete(scope.scope)">删除</el-button> <el-button v-if="scope.scope.delFlag" type="text" @click="todelete(scope.scope)">删除</el-button>
</template> </template>
</GLTable> </GLTable>
...@@ -118,7 +120,8 @@ export default { ...@@ -118,7 +120,8 @@ export default {
let { delFlag, roleName, merchantId } = this.searchForm let { delFlag, roleName, merchantId } = this.searchForm
let para = {} let para = {}
console.log(merchantId) console.log(merchantId)
if (!this.distoryTable) {//代表重置 if (!this.distoryTable) {
//代表重置
para = { para = {
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!