Commit 57515918 by yy

new

1 parent 1d895b63
......@@ -30,7 +30,7 @@ export default {
line-height: 36px;
}
#app {
background: #F4F5FA;
background: #f4f5fa;
padding: 0px 20px 20px 40px;
position: absolute;
box-sizing: border-box;
......
......@@ -74,11 +74,24 @@ const getSecret = params => {
sign: true
})
}
const getSuccess = params => {
params.method = 'scrm.api.work.wechat.config.agent.success'
params.sessionId = sessionId
return http_config({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getAccess,
getStatus,
getCheckStatus,
getQrcode,
getReportStatus,
getSecret
getSecret,
getSuccess
}
\ No newline at end of file
......@@ -8,8 +8,15 @@ VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
function getRoutes(routesData) {
return routesData.reduce((routes, route) => {
routes.push({ ...route, component: () => import('@/views' + route.compath + '.vue') })
return routesData.reduce( (routes, route) => {
// let status = await Vue.prototype.$apis.ww.getStatus({})
// console.log(status)
routes.push({
...route,
component: () => {
return import('@/views' + route.compath + '.vue')
}
})
return routes
}, [])
}
......
......@@ -69,6 +69,18 @@ const staticRoutes = Object.freeze([{
path: '/baseInfo/relevance',
meta: {},
component: resolve => require([`@/views/baseInfo/relevance.vue`], resolve)
},
{
name: 'EnterpriseWechat',
path: '/enterpriseWechat/index',
component: resolve => require([`@/views/enterpriseWechat/index.vue`], resolve),
meta: {}
},
{
name: 'FollowUp',
path: '/followUp/index',
component: resolve => require([`@/views/followUp/index.vue`], resolve),
meta: {}
}
])
export default staticRoutes
\ No newline at end of file
......@@ -2,7 +2,7 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton ,GLTable} from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
......@@ -14,43 +14,43 @@ import '@/assets/css/common.scss'
let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret, request_common, request_config, sign_common } = await fetchConfig()
console.log(request)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
console.log(globalState)
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, 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.$setGlobalState = globalState.actions.setGlobalState
// 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)
routes = getRoutes(routesData)
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase})
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, request_common, request_config, sign_common } = await fetchConfig()
console.log(request)
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
console.log(globalState)
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, 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.$setGlobalState = globalState.actions.setGlobalState
// 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)
routes = getRoutes(routesData)
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
}
export async function mount(props) {
console.log('22222', props)
console.log(routes)
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
console.log('22222', props)
console.log(routes)
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
}
function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
\ No newline at end of file
<template>
<div class="scrm-main">
<div
class="form-header"
v-if="$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1"
>
<GLButton
@click="handleContact"
icon="el-icon-link"
fn="门店账户关联企微"
type="primary"
size="small"
mode="el-button"
>门店账户关联企微</GLButton>
<div class="form-header" v-if="$globalState.session.accountLevel == 1 && $globalState.session.merchantModel == 1">
<GLButton @click="handleContact" icon="el-icon-link" fn="门店账户关联企微" type="primary" size="small" mode="el-button">门店账户关联企微</GLButton>
<!-- <el-button type="primary" @click="handleContact" size="small" icon="el-icon-link"
>门店账户关联企微</el-button
>-->
......@@ -21,24 +11,13 @@
<el-row>
<el-form-item size="small" label="关联企微">
<el-select v-model="searchForm.isRelevance" placeholder="请选择">
<el-option
v-for="item in optionsContact"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-option v-for="item in optionsContact" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item class="merchant-row" size="small">
<el-input
size="small"
v-model="searchForm.merchantLoginAccount"
placeholder="请输入"
v-if="searchForm.accountOrPhone == 1"
>
<el-input size="small" v-model="searchForm.merchantLoginAccount" placeholder="请输入" v-if="searchForm.accountOrPhone == 1">
<el-select
class="merchant-row-input"
class="merchant-row-input"
size="small"
v-model="searchForm.accountOrPhone"
@change="
......@@ -52,15 +31,9 @@
<el-option label="手机号" :value="2"></el-option>
</el-select>
</el-input>
<el-input
size="small"
v-model="searchForm.merchantLegalPersonPhone"
placeholder="请输入"
v-if="searchForm.accountOrPhone == 2"
>
<el-input size="small" v-model="searchForm.merchantLegalPersonPhone" placeholder="请输入" v-if="searchForm.accountOrPhone == 2">
<el-select
class="merchant-row-input"
class="merchant-row-input"
size="small"
v-model="searchForm.accountOrPhone"
slot="prepend"
......@@ -77,95 +50,49 @@
</el-form-item>
<el-form-item size="small" label="账户状态">
<el-select size="small" v-model="searchForm.status" placeholder="请选择">
<el-option
v-for="item in merchantStatus"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
></el-option>
<el-option v-for="item in merchantStatus" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item size="small" label="账户等级">
<el-select size="small" v-model="searchForm.merchantAccountLevel" placeholder="请选择">
<el-option
v-for="item in accountLevel"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
></el-option>
<el-option v-for="item in accountLevel" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
<el-form-item class="merchant-wx" size="small">
<el-input size="small" v-model="searchForm.merchantName" placeholder="请输入商户名称/关联的企业微信名"></el-input>
</el-form-item>
<el-form-item size="small" label="商户号">
<el-input
size="small"
v-model="searchForm.merchantNo"
onkeyup="value=value.replace(/[^\d]/g,'')"
placeholder="请输入商户号,仅限11位"
maxlength="11"
></el-input>
<el-input size="small" class="merchant-num" v-model="searchForm.merchantNo" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请输入商户号,仅限11位" maxlength="11"></el-input>
</el-form-item>
<el-form-item size="small" label="上级商户号" v-if="$globalState.session.accountLevel != 4">
<el-input size="small" v-model="searchForm.parentMerchantNo" onkeyup="value=value.replace(/[^\d]/g,'')" placeholder="请输入上级商户号,仅限11位" maxlength="11"></el-input>
</el-form-item>
<el-form-item
size="small"
style="float: right; margin-right: 0px"
v-if="$globalState.session.accountLevel == 4"
>
<el-form-item class="merchant-wx" size="small" v-if="$globalState.session.accountLevel == 4">
<el-input size="small" v-model="searchForm.merchantName" placeholder="请输入商户名称/关联的企业微信名"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right; margin-right: 0px" v-if="$globalState.session.accountLevel == 4">
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
<el-row v-if="$globalState.session.accountLevel != 4">
<el-form-item size="small" label="上级商户号">
<el-input
size="small"
v-model="searchForm.parentMerchantNo"
onkeyup="value=value.replace(/[^\d]/g,'')"
placeholder="请输入上级商户号,仅限11位"
maxlength="11"
></el-input>
<el-form-item class="merchant-wx" size="small">
<el-input size="small" v-model="searchForm.merchantName" placeholder="请输入商户名称/关联的企业微信名"></el-input>
</el-form-item>
<el-form-item :size="size" style="float: right; margin-right: 0px">
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<div slot="accountTypeNames" slot-scope="scope">
<div
class="accountType-row"
v-for="(item, index) in scope.scope.accountTypeNames.split(',')"
:key="index"
>{{ item }}</div>
<div class="accountType-row" v-for="(item, index) in scope.scope.accountTypeNames.split(',')" :key="index">{{ item }}</div>
</div>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton type="text" @click="handleLook(scope.scope)" fn="查看">查看</GLButton>
<GLButton
type="text"
@click="handleEdit(scope.scope)"
v-if="$globalState.session.merchantId != scope.scope.merchantNo"
fn="修改"
mode="el-button"
>修改</GLButton>
<GLButton
type="text"
@click="handleAdd(scope.scope)"
v-if="scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4"
fn="创建子商户/门店"
mode="el-button"
>创建子商户/门店</GLButton>
<GLButton type="text" @click="handleEdit(scope.scope)" v-if="$globalState.session.merchantId != scope.scope.merchantNo" fn="修改" mode="el-button">修改</GLButton>
<GLButton type="text" @click="handleAdd(scope.scope)" v-if="scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4" fn="创建子商户/门店" mode="el-button">创建子商户/门店</GLButton>
<!-- <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>
<el-button type="text" @click="handleAdd(scope.scope)" v-if="scope.scope.status == 2 && scope.scope.merchantAccountLevel != 4">创建子商户/门店</el-button>-->
......@@ -327,7 +254,7 @@ export default {
this.tableData = res.data
this.tableTotal = res.count
this.tableData.length ? (this.$refs.table.tableHeightValues = '') : this.$refs.table.setTableHeightFun()
this.tableData.length ? (this.$refs.table.tableHeightValues = '') : this.$refs.table.setTableHeightFun()
// if (res.data && res.data.length == []) {
// this.$refs.table.setTableHeightFun()
......@@ -391,9 +318,9 @@ export default {
margin-left: 20px;
&-input {
/deep/ {
.el-input__inner {
width: 118px!important;
}
.el-input__inner {
width: 118px !important;
}
}
}
/deep/ {
......@@ -411,7 +338,14 @@ export default {
margin-left: 20px;
/deep/ {
.el-input--small .el-input__inner {
width: 325px;
width: 285px;
}
}
}
.merchant-num {
/deep/ {
.el-input__inner {
width: 255px !important;
}
}
}
......
......@@ -270,14 +270,21 @@ export default {
})
let all = [...arrpara1, ...arrpara2, ...arrpara3]
let para = Object.assign({}, ...all)
this.$apis.baseInfo.toGL(para).then(res => {
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/account/index' })
}
this.$confirm(' 请确认是否关联当前信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$apis.baseInfo.toGL(para).then(res => {
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
this.$router.push({ path: '/account/index' })
}
})
})
},
deleteLine(row) {
......
......@@ -65,11 +65,11 @@
width: footerWidth + 'px'
}"
>
<el-button class="custtom" v-if="pageType == 'create'" type="primary" @click="toCreateRole(1)">草稿</el-button>
<el-button class="custtom" v-if="pageType == 'create'" type="primary" @click="toCreateRole(1)">草稿</el-button>
<div class="wrap_driver">
<el-button type="primary" @click="toCreateRole(0)">确定</el-button>
<el-button type="primary" @click="toCreateRole(0)">确定</el-button>
</div>
<el-button @click="toBack">取消</el-button>
<el-button @click="toBack">取消</el-button>
</div>
</div>
</div>
......@@ -108,7 +108,7 @@ export default {
treeDataList: [],
accountLevel: 1,
isHaveEdit: false,
isChangeEdit:false
isChangeEdit: false
}
},
watch: {
......@@ -121,7 +121,7 @@ export default {
},
methods: {
// 输入有变就触发提醒
changeInput(){
changeInput() {
this.isChangeEdit = true
},
// 获取角色信息
......@@ -299,20 +299,20 @@ export default {
},
insertRole(para) {
this.$apis.role.createRole(para).then(res => {
if (res) {
this.$router.push('/role/index')
}
})
if (res) {
this.$router.push('/role/index')
}
})
},
updateRole(para) {
this.$apis.role.updateRole(para).then(res => {
if (res) {
this.$router.push('/role/index')
}
})
this.$apis.role.updateRole(para).then(res => {
if (res) {
this.$router.push('/role/index')
}
})
},
toBack() {
if ((this.isHaveEdit&&this.pageType=='create') ||(this.isChangeEdit&&this.pageType=='edit')) {
if ((this.isHaveEdit && this.pageType == 'create') || (this.isChangeEdit && this.pageType == 'edit')) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......
<template>
<div class="role-home-page">
<div class="top_widget">
<GLButton size="small" fn="创建角色" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</GLButton>
<GLButton size="small" fn="创建角色" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</GLButton>
<!-- <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> -->
</div>
<div class="table_widget">
......@@ -32,7 +32,7 @@
<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">
<GLButton type="text" @click="toLookPage(scope.scope)" fn="查看">查看</GLButton>
<GLButton v-if="!scope.scope.defalutRole" fn="修改" type="text" @click="toEditPage(scope.scope)">修改</GLButton>
<GLButton v-if="!scope.scope.defalutRole" fn="修改" type="text" @click="toEditPage(scope.scope)">修改</GLButton>
<!-- <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> -->
<el-button v-if="scope.scope.delFlag" type="text" @click="todelete(scope.scope)">删除</el-button>
......@@ -145,7 +145,7 @@ export default {
this.$apis.role.roleDataList(para).then(res => {
this.tableData = res.data
this.tableTotal = res.count
this.tableData.length ? (this.$refs.table.tableHeightValues = '') : this.$refs.table.setTableHeightFun()
this.tableData.length ? (this.$refs.table.tableHeightValues = '') : this.$refs.table.setTableHeightFun()
// if (!res.data.length || !res) {
// this.$refs.table.setTableHeightFun()
// }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!