Commit e63e8c47 by ym

mock

1 parent bdb3a6a6
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
"core-js": "^3.4.4", "core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-table": "^1.0.9" "glsx-table": "^1.0.9",
"vue-amap": "^0.5.10"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0", "@vue/cli-plugin-babel": "^4.1.0",
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %> <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" /> <link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" />
<% } %> <% } %>
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.8&key=bd290dc27d0945959280753215ddda71&plugin=AMap.Geocoder"></script> <!-- <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.8&key=bd290dc27d0945959280753215ddda71&plugin=AMap.Geocoder"></script> -->
<title>微前端子应用:博客</title> <title>微前端子应用:博客</title>
</head> </head>
......
...@@ -12,12 +12,12 @@ let cfg = require('./conf.js') ...@@ -12,12 +12,12 @@ let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function(isEnv = true) {
if (isEnv) { // if (isEnv) {
let { request } = cfg // let { request } = cfg
Object.assign(request, { timeout }) // Object.assign(request, { timeout })
return Promise.resolve(cfg) // return Promise.resolve(cfg)
} // }
return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -12,9 +12,19 @@ import apis from './api' ...@@ -12,9 +12,19 @@ import apis from './api'
import './public-path' import './public-path'
// import 'glsx-components/dist/glsx-components.css' // import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup' import { start } from '@/setup'
import VueAMap from "vue-amap";
Vue.use(VueAMap);
// 初始化vue-amap
VueAMap.initAMapApiLoader({
key: "bd290dc27d0945959280753215ddda71", // 这里写你申请的高德地图的key
plugin: ["AMap.Autocomplete", "AMap.Geocoder", "AMap.Geolocation"],
v: "1.4.15",
uiVersion: "1.1"
});
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
start() start()
export { bootstrap, mount, unmount } export { bootstrap, mount, unmount }
from '@/setup' from '@/setup'
export const http = params => Vue.prototype.$http(params)
\ No newline at end of file \ No newline at end of file
export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
\ No newline at end of file \ No newline at end of file
const staticRoutes = Object.freeze([ const staticRoutes = Object.freeze([{
{ name: 'account',
name: 'account', path: '/account/index',
path: '/account/index', meta: {},
meta: {}, component: resolve => require([`@/views/account/index.vue`], resolve)
component: resolve => require([`@/views/account/index.vue`], resolve) },
}, {
{ name: 'addAccount',
name: 'addAccount', path: '/account/addAccount/:id',
path: '/account/addAccount', meta: {},
meta: {}, component: resolve => require([`@/views/account/addAccount.vue`], resolve)
component: resolve => require([`@/views/account/addAccount.vue`], resolve) },
}, {
{ name: 'editAccount',
name: 'editAccount', path: '/account/editAccount/:id',
path: '/account/editAccount', meta: {},
meta: {}, component: resolve => require([`@/views/account/editAccount.vue`], resolve)
component: resolve => require([`@/views/account/editAccount.vue`], resolve) },
}, {
{ name: 'detailAccount',
name: 'role', path: '/account/detailAccount/:id',
path: '/role/index/index', meta: {},
component: resolve => require([`@/views/role/index/index.vue`], resolve), component: resolve => require([`@/views/account/detailAccount.vue`], resolve)
meta: {} },
}, {
{ name: 'role',
name: 'role', path: '/role/index/index',
path: '/role/create/index', component: resolve => require([`@/views/role/index/index.vue`], resolve),
component: resolve => require([`@/views/role/create/index.vue`], resolve), meta: {}
meta: {} },
}, {
{ name: 'role',
name: 'role', path: '/role/create/index',
path: '/role/index/look', component: resolve => require([`@/views/role/create/index.vue`], resolve),
component: resolve => require([`@/views/role/index/look.vue`], resolve), meta: {}
meta: {} },
}, {
{ name: 'role',
name: 'baseInfo', path: '/role/index/look',
path: '/baseInfo/index', component: resolve => require([`@/views/role/index/look.vue`], resolve),
component: resolve => require([`@/views/baseInfo/index.vue`], resolve), meta: {}
meta: {} },
}, {
{ name: 'employee',
name: 'baseInfo', path: '/employee/editEmployee',
path: '/baseInfo/relevance', meta: {},
component: resolve => require([`@/views/baseInfo/relevance.vue`], resolve), component: resolve => require([`@/views/employee/editEmployee.vue`], resolve)
meta: {} }
},
{
name: 'employeeList',
path: '/employee/index',
meta: {},
component: resolve => require([`@/views/employee/index.vue`], resolve)
},
{
name: 'employee',
path: '/employee/editEmployee',
meta: {},
component: resolve => require([`@/views/employee/editEmployee.vue`], resolve)
},
{
name: 'detailAccount',
path: "/account/detailAccount",
component: resolve => require([`@/views/account/detailAccount.vue`], resolve),
meta: {}
},
]) ])
export default staticRoutes export default staticRoutes
\ No newline at end of file \ No newline at end of file
...@@ -13,14 +13,15 @@ let routes = [] ...@@ -13,14 +13,15 @@ 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 }) {
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret, request_common } = await fetchConfig()
console.log(request) console.log(request)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
console.log(globalState) console.log(globalState)
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) 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, request: request_common, sign, secret, alert: ElementUI.Message.error, headers: { TGT: 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)
......
...@@ -17,7 +17,7 @@ import { routes } from '@/router' ...@@ -17,7 +17,7 @@ import { routes } from '@/router'
export async function start() { export async function start() {
if (window.__POWERED_BY_QIANKUN__) return if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: '1112223333444' } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { TGT: 'scrm-base-d476ca63-6084-4428-a690-d4475451dd9f-rop' } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes) render('/', routes)
} }
\ No newline at end of file \ No newline at end of file
...@@ -10,9 +10,23 @@ util.cloneText = function(message) { ...@@ -10,9 +10,23 @@ util.cloneText = function(message) {
Message.success('复制成功') Message.success('复制成功')
} }
util.getBeforeDate = function(sign = '-') { util.getBeforeDate = function(sign = '-') {
let day = new Date(); let day = new Date();
day.setTime(day.getTime() - 24 * 60 * 60 * 1000); day.setTime(day.getTime() - 24 * 60 * 60 * 1000);
var s = day.getFullYear() + sign + (day.getMonth() + 1) + sign + day.getDate(); var s = day.getFullYear() + sign + (day.getMonth() + 1) + sign + day.getDate();
return s; return s;
}
/**
* 校验手机号码格式
*/
util.checkPhone = function(mobile) {
let myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/;
return myreg.test(mobile);
}
/**
* 校验手机号码格式
*/
util.checkisCard = function(card) {
let myreg = /^(^\d{15}$)|(^\d{17}([0-9]|X)$)/;
return myreg.test(card);
} }
export default util export default util
\ No newline at end of file \ No newline at end of file
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
</el-input> </el-input>
<el-input <el-input
size="small" size="small"
maxlength="18"
v-model="accountAddForm.merchantOrgcode" v-model="accountAddForm.merchantOrgcode"
placeholder="请输入正确的身份证号" placeholder="请输入正确的身份证号"
v-if="accountAddForm.merchantType == 1" v-if="accountAddForm.merchantType == 1"
...@@ -124,6 +125,7 @@ ...@@ -124,6 +125,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="驻店电话"> <el-form-item label="驻店电话">
<el-input <el-input
maxlength="11"
size="small" size="small"
v-model="accountAddForm.residentPhone" v-model="accountAddForm.residentPhone"
placeholder="请输入驻店电话" placeholder="请输入驻店电话"
...@@ -168,7 +170,7 @@ ...@@ -168,7 +170,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="营业时间"> <el-form-item label="营业时间" class="open-time">
<el-time-picker <el-time-picker
size="small" size="small"
value-format="HH:mm:ss" value-format="HH:mm:ss"
...@@ -285,6 +287,7 @@ ...@@ -285,6 +287,7 @@
<el-input <el-input
:disabled="nextStatus" :disabled="nextStatus"
size="small" size="small"
maxlength="15"
v-model="accountInfoForm.merchantLoginAccount" v-model="accountInfoForm.merchantLoginAccount"
placeholder="请输入登录账户名" placeholder="请输入登录账户名"
></el-input> ></el-input>
...@@ -293,6 +296,7 @@ ...@@ -293,6 +296,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="登录密码" prop="merchantLoginPassword"> <el-form-item label="登录密码" prop="merchantLoginPassword">
<el-input <el-input
maxlength="15"
:disabled="nextStatus" :disabled="nextStatus"
size="small" size="small"
type="password" type="password"
...@@ -304,16 +308,29 @@ ...@@ -304,16 +308,29 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="账户类型"> <div data-v-995a4ff0="" class="el-form-item is-required">
<auto-button <label
v-for="(item, index) in accountDetail.accountTypes" for="merchantLoginAccount"
:key="index" class="el-form-item__label"
:btnLabel="item.accounttypeName" style="width: 120px"
:btnValue="item.accounttypeId" >账户类型</label
:stopClick="nextStatus" >
@getBtnStatus="getBtnStatus" <div class="el-form-item__content" style="margin-left: 120px">
></auto-button> <div data-v-995a4ff0="" class="el-input el-input--small">
</el-form-item> <auto-button
v-for="(item, index) in accountDetail.accountTypes"
:key="index"
:btnLabel="item.accounttypeName"
:btnValue="item.accounttypeId"
:stopClick="nextStatus"
@getBtnStatus="getBtnStatus"
></auto-button>
</div>
<div class="el-form-item__error" v-if="accountTypesRule">
请选择账户类型
</div>
</div>
</div>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
...@@ -326,7 +343,13 @@ ...@@ -326,7 +343,13 @@
:pid="accountAddForm.parentId" :pid="accountAddForm.parentId"
:accountlevel="accountDetail.merchantAccountLevel" :accountlevel="accountDetail.merchantAccountLevel"
></select-product> ></select-product>
<div class="footer-panel"> <div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px',
}"
>
<el-button type="primary" @click="handleNext" v-show="step == 1">下一步</el-button> <el-button type="primary" @click="handleNext" v-show="step == 1">下一步</el-button>
<el-button type="primary" @click="handleSave(1)" v-show="step == 2" <el-button type="primary" @click="handleSave(1)" v-show="step == 2"
>存草稿</el-button >存草稿</el-button
...@@ -346,6 +369,7 @@ ...@@ -346,6 +369,7 @@
</template> </template>
<script> <script>
import util from "@/utils/util";
import mapView from "@/components/mapView/index"; import mapView from "@/components/mapView/index";
import autoButton from "@/components/auto-button/index"; import autoButton from "@/components/auto-button/index";
import selectProduct from "./components/selectProduct"; import selectProduct from "./components/selectProduct";
...@@ -357,8 +381,16 @@ export default { ...@@ -357,8 +381,16 @@ export default {
selectProduct, selectProduct,
}, },
data() { data() {
const validatePhone = (rule, value, callback) => {
if (!util.checkPhone(value)) {
callback(new Error("请输入正确的手机号"));
} else {
callback();
}
};
return { return {
nextStatus: false, nextStatus: false,
accountTypesRule: false,
filterText: "", filterText: "",
brandData: [], brandData: [],
defaultProps: { defaultProps: {
...@@ -389,14 +421,17 @@ export default { ...@@ -389,14 +421,17 @@ export default {
merchantName: [{ required: true, message: "请输入商户名称", trigger: "blur" }], merchantName: [{ required: true, message: "请输入商户名称", trigger: "blur" }],
merchantLegalPersonPhone: [ merchantLegalPersonPhone: [
{ required: true, message: "请输入联系电话", trigger: "blur" }, { required: true, message: "请输入联系电话", trigger: "blur" },
{ validator: validatePhone, trigger: "blur" },
], ],
}, },
accountInfoRules: { accountInfoRules: {
merchantLoginAccount: [ merchantLoginAccount: [
{ required: true, message: "请输入登录账户名", trigger: "blur" }, { required: true, message: "请输入登录账户名", trigger: "blur" },
{ min: 3, max: 15, message: "长度在 3 到 15 个字符", trigger: "blur" },
], ],
merchantLoginPassword: [ merchantLoginPassword: [
{ required: true, message: "请输入登录账户名", trigger: "blur" }, { required: true, message: "请输入登录账户名", trigger: "blur" },
{ min: 6, max: 15, message: "长度在 6 到 15 个字符", trigger: "blur" },
], ],
}, },
}; };
...@@ -416,6 +451,7 @@ export default { ...@@ -416,6 +451,7 @@ export default {
this.accountAddForm.merchantAddress = this.$refs.mapForm.address; this.accountAddForm.merchantAddress = this.$refs.mapForm.address;
}, },
getBtnStatus(status, value) { getBtnStatus(status, value) {
this.accountTypesRule = false;
if (status) { if (status) {
this.accounttypeId.push(value); this.accounttypeId.push(value);
} else { } else {
...@@ -458,20 +494,25 @@ export default { ...@@ -458,20 +494,25 @@ export default {
} }
}, },
handleSave(status) { handleSave(status) {
let accountTypes = this.$refs.productForm.accountTypes; if (this.$refs.productForm.getSelectInfo().length == 0) {
if (!accountTypes.every((item) => item.products)) {
this.$message.error("请选择产品"); this.$message.error("请选择产品");
return;
} }
let accountTypes = JSON.stringify(this.$refs.productForm.getSelectInfo());
let params = { let params = {
accountTypes,
status, status,
merchantId: this.parentId, merchantId: this.parentId,
accountTypes: this.$refs.productForm.accountTypes,
}; };
this.$apis.store.updatePermissions(params).then((res) => { this.$apis.store.updatePermissions(params).then((res) => {
console.log(res); if (res) {
this.$router.push("/account/index");
}
}); });
}, },
handleCancel() {}, handleCancel() {
this.$router.push("/account/index");
},
handlePrev() { handlePrev() {
this.step = 1; this.step = 1;
}, },
...@@ -487,6 +528,18 @@ export default { ...@@ -487,6 +528,18 @@ export default {
if (valid) resolve(); if (valid) resolve();
}); });
}); });
if (this.accounttypeId.length == 0) {
this.accountTypesRule = true;
return;
}
if (
this.accountAddForm.merchantType == 1 &&
this.accountAddForm.merchantOrgcode &&
!util.checkisCard(this.accountAddForm.merchantOrgcode)
) {
this.$message.error("请输入正确的身份证号码");
return;
}
let params = Object.assign({}, this.accountAddForm, this.accountInfoForm); let params = Object.assign({}, this.accountAddForm, this.accountInfoForm);
if (params.bussinessTime) { if (params.bussinessTime) {
params.bussinessBegintime = params.bussinessTime[0]; params.bussinessBegintime = params.bussinessTime[0];
...@@ -515,6 +568,7 @@ export default { ...@@ -515,6 +568,7 @@ export default {
this.nextStatus = true; this.nextStatus = true;
if (typeof res == "number") { if (typeof res == "number") {
this.parentId = res; this.parentId = res;
this.findMenuFunTreeByMerId();
} }
this.twoMerchantDetail(this.parentId); this.twoMerchantDetail(this.parentId);
} }
...@@ -564,7 +618,9 @@ export default { ...@@ -564,7 +618,9 @@ export default {
}, },
mounted() { mounted() {
this.accountAddForm.parentId = this.$route.query.id; this.footerLeft = document.querySelector(".base-container-right").offsetLeft;
this.footerWidth = document.documentElement.clientWidth - this.footerLeft;
this.accountAddForm.parentId = this.$route.params.id;
this.findMerchantDetail(); this.findMerchantDetail();
this.getCarbrandTree(); this.getCarbrandTree();
this.findAllDictData("account_level"); this.findAllDictData("account_level");
...@@ -659,6 +715,13 @@ export default { ...@@ -659,6 +715,13 @@ export default {
height: 300px; height: 300px;
overflow-y: auto; overflow-y: auto;
} }
.open-time {
/deep/ {
.el-range-editor--small.el-input__inner {
width: 100%;
}
}
}
.el-icon-btn { .el-icon-btn {
color: #5850ff; color: #5850ff;
font-size: 16px; font-size: 16px;
......
...@@ -81,9 +81,9 @@ export default { ...@@ -81,9 +81,9 @@ export default {
// 获取当前的所有权限 // 获取当前的所有权限
findMenuFunTreeByMerId() { findMenuFunTreeByMerId() {
let params = { let params = {
accountlevel: 4, accountlevel: this.accountlevel,
parentId: 41380, parentId: this.parentId,
id: 41588 id: this.pid
} }
this.$apis.store.findMenuFunTreeByMerId(params).then(res => { this.$apis.store.findMenuFunTreeByMerId(params).then(res => {
this.tabMenu = res.map(item => { this.tabMenu = res.map(item => {
...@@ -273,16 +273,17 @@ export default { ...@@ -273,16 +273,17 @@ export default {
products products
} }
}) })
console.log(this.accountTypes)
return this.accountTypes
} }
}, },
mounted() { mounted() {
this.findMenuFunTreeByMerId() // this.findMenuFunTreeByMerId()
this.findPermissionsByMerId() // this.findPermissionsByMerId()
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.account-body { .account-body {
...@@ -346,4 +347,4 @@ export default { ...@@ -346,4 +347,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
</el-row> </el-row>
</div> </div>
</div> </div>
<div class="MsgWrap powerlimt"> <div class="MsgWrap powerlimt">
<span class="content-title">功能权限</span> <span class="content-title">功能权限</span>
<div class="powerTreeWrap"></div> <div class="powerTreeWrap"></div>
...@@ -121,7 +120,6 @@ ...@@ -121,7 +120,6 @@
<el-tooltip effect="dark" :content="secondPageObj.merchantName" placement="top"> <el-tooltip effect="dark" :content="secondPageObj.merchantName" placement="top">
<div id="secondmerchantName">{{ secondPageObj.merchantName }}</div> <div id="secondmerchantName">{{ secondPageObj.merchantName }}</div>
</el-tooltip> </el-tooltip>
<div> <div>
商户号: 商户号:
<span id="secondmerchantId">{{ secondPageObj.merchantNo }}</span> <span id="secondmerchantId">{{ secondPageObj.merchantNo }}</span>
...@@ -155,7 +153,6 @@ ...@@ -155,7 +153,6 @@
<el-tooltip effect="dark" :content="secondPageObj.merchantName" placement="top"> <el-tooltip effect="dark" :content="secondPageObj.merchantName" placement="top">
<span id="companyName" class="companyName">{{ secondPageObj.merchantName }}</span> <span id="companyName" class="companyName">{{ secondPageObj.merchantName }}</span>
</el-tooltip> </el-tooltip>
<span class="emloyeeListText">员工列表</span> <span class="emloyeeListText">员工列表</span>
</div> </div>
<div> <div>
...@@ -176,11 +173,11 @@ ...@@ -176,11 +173,11 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getThirdTable } from '@/api/modules/merchant' import { getThirdTable } from '@/api/modules/merchant'
export default { export default {
name: 'detailAccount', name: 'detailAccount',
data() { data() {
return { return {
//第一页数据 //第一页数据
...@@ -218,7 +215,6 @@ export default { ...@@ -218,7 +215,6 @@ export default {
} }
] ]
}, },
subMerchantTableTotal: 0, subMerchantTableTotal: 0,
//第三页表 //第三页表
searchTableForm: {}, searchTableForm: {},
...@@ -257,25 +253,10 @@ export default { ...@@ -257,25 +253,10 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
// layout: 'sizes, prev, pager, next, jumper, ->, total', // layout: 'sizes, prev, pager, next, jumper, ->, total',
tableTotal: 0, tableTotal: 0,
merchantId: this.$route.query.id //需要从外面传进来 merchantId: this.$route.params.id //需要从外面传进来
} }
}, },
created() {
//请求商户信息, 上下级商户 修改纪录
this.searchTableForm = {
bussinessId: this.merchantId,
moduleName: '商户模块'
}
this.getFirstInfo()
// this.findMenuFunTreeByMerId()
this.getSecondInfo()
// this.getSecondTree()
},
mounted() {
this.getThirdTable()
this.getSecondTable()
},
methods: { methods: {
tabClick(index) { tabClick(index) {
this.curIndex = index this.curIndex = index
...@@ -285,11 +266,9 @@ export default { ...@@ -285,11 +266,9 @@ export default {
break break
case 1: case 1:
// this.currentType = "new"; // this.currentType = "new";
break break
case 2: case 2:
// this.getThirdTable() // this.getThirdTable()
break break
} }
}, },
...@@ -334,7 +313,6 @@ export default { ...@@ -334,7 +313,6 @@ export default {
pageSize: this.$refs.updateRecord.page.pageSize, pageSize: this.$refs.updateRecord.page.pageSize,
pageNum: this.$refs.updateRecord.page.pageNum pageNum: this.$refs.updateRecord.page.pageNum
} }
// this.$apis.merchant.getThirdTable // this.$apis.merchant.getThirdTable
getThirdTable(params).then(res => { getThirdTable(params).then(res => {
if (res) { if (res) {
...@@ -346,21 +324,36 @@ export default { ...@@ -346,21 +324,36 @@ export default {
} }
}) })
} }
},
created() {
//请求商户信息, 上下级商户 修改纪录
this.searchTableForm = {
bussinessId: this.merchantId,
moduleName: '商户模块'
}
this.getFirstInfo()
// this.findMenuFunTreeByMerId()
this.getSecondInfo()
// this.getSecondTree()
},
mounted() {
this.getThirdTable()
this.getSecondTable()
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.merchantDetail { .merchantDetail {
.titles { .titles {
display: flex; display: flex;
.itemTitle { .itemTitle {
margin-right: 20px; margin-right: 20px;
list-style-type: none; list-style-type: none;
height: 20px; height: 20px;
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 20px; line-height: 20px;
...@@ -413,7 +406,6 @@ export default { ...@@ -413,7 +406,6 @@ export default {
text-align: right; text-align: right;
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
...@@ -421,7 +413,6 @@ export default { ...@@ -421,7 +413,6 @@ export default {
.itemValue { .itemValue {
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 20px; line-height: 20px;
...@@ -455,7 +446,6 @@ export default { ...@@ -455,7 +446,6 @@ export default {
overflow: auto; overflow: auto;
.merchant-headerMsg { .merchant-headerMsg {
display: flex; display: flex;
.merchantImg { .merchantImg {
width: 64px; width: 64px;
height: 64px; height: 64px;
...@@ -490,7 +480,6 @@ export default { ...@@ -490,7 +480,6 @@ export default {
} }
} }
} }
.searchTreeInputWrap { .searchTreeInputWrap {
display: flex; display: flex;
margin-top: 20px; margin-top: 20px;
...@@ -517,13 +506,11 @@ export default { ...@@ -517,13 +506,11 @@ export default {
// .detail .wrapper-tree { // .detail .wrapper-tree {
// margin-left: 0; // margin-left: 0;
// } // }
.merchant-right { .merchant-right {
padding-top: 15px; padding-top: 15px;
padding-bottom: 20px; padding-bottom: 20px;
width: calc(100vw - 340px - 20px); width: calc(100vw - 340px - 20px);
overflow-x: auto; overflow-x: auto;
background-color: #fff; background-color: #fff;
padding-left: 20px; padding-left: 20px;
padding-right: 20px; padding-right: 20px;
...@@ -542,10 +529,8 @@ export default { ...@@ -542,10 +529,8 @@ export default {
max-width: 300px; max-width: 300px;
height: 36px; height: 36px;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
...@@ -564,7 +549,6 @@ export default { ...@@ -564,7 +549,6 @@ export default {
} }
} }
} }
.pageThree { .pageThree {
.pageContent { .pageContent {
background-color: #fff; background-color: #fff;
...@@ -572,4 +556,4 @@ export default { ...@@ -572,4 +556,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -305,9 +305,12 @@ ...@@ -305,9 +305,12 @@
<div v-show="step == 'first'"> <div v-show="step == 'first'">
<select-product></select-product> <select-product></select-product>
</div> </div>
<div class="footer-panel"> <div class="footer-panel" :style="{
left: footerLeft + 'px',
width: footerWidth+ 'px'
}">
<el-button type="primary" @click="handleNext">确定</el-button> <el-button type="primary" @click="handleNext">确定</el-button>
<el-button type="primary">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
</div> </div>
<el-dialog :visible.sync="dialogMapVisible" width="60%"> <el-dialog :visible.sync="dialogMapVisible" width="60%">
<map-view ref="mapForm" :mapHeight="mapHeight"></map-view> <map-view ref="mapForm" :mapHeight="mapHeight"></map-view>
...@@ -440,6 +443,9 @@ export default { ...@@ -440,6 +443,9 @@ export default {
}; };
} }
}, },
handleCancel() {
this.$router.push("/account/index");
},
//下一步 //下一步
handleNext() { handleNext() {
const pm1 = new Promise((resolve, reject) => { const pm1 = new Promise((resolve, reject) => {
...@@ -545,7 +551,9 @@ export default { ...@@ -545,7 +551,9 @@ export default {
}, },
mounted() { mounted() {
this.accountAddForm.parentId = this.$route.query.id; this.footerLeft = document.querySelector(".base-container-right").offsetLeft;
this.footerWidth = document.documentElement.clientWidth - this.footerLeft;
this.accountAddForm.parentId = this.$route.params.id;
this.getCarbrandTree(); this.getCarbrandTree();
this.findAllDictData(); this.findAllDictData();
}, },
......
...@@ -52,18 +52,7 @@ module.exports = { ...@@ -52,18 +52,7 @@ module.exports = {
port: process.env.VUE_APP_PORT, port: process.env.VUE_APP_PORT,
headers: { headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头 'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
}, }
proxy: {    
'/api': {        
target: 'http://rop-merchant.test.glsx.com.cn',
        
changeOrigin: true,
        
pathRewrite: {            
'^/api': '/'        
}    
},
},
}, },
chainWebpack: config => { chainWebpack: config => {
config.plugin('html') config.plugin('html')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!