Commit 67a0339f by cwq0219

子系统修改

1 parent 6aad7b33
{
"name": "blog",
"name": "services",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
......@@ -2026,17 +2026,17 @@
"dev": true
},
"axios": {
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"requires": {
"follow-redirects": "^1.10.0"
"follow-redirects": "^1.14.0"
},
"dependencies": {
"follow-redirects": {
"version": "1.14.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.2.tgz",
"integrity": "sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA=="
"version": "1.14.4",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
"integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g=="
}
}
},
......@@ -5876,9 +5876,9 @@
}
},
"glsx-common": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-1.3.7.tgz",
"integrity": "sha512-AZGkgjXsnWyI37IXf0Aj2ZvXcmNtXHp6o4BwwdbYEE/i21C0vR+G0syGhaBzVzrnumxyRTwKgsfJXWJEiGyYzQ==",
"version": "1.4.6",
"resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.6.tgz",
"integrity": "sha512-K1aH7CYbaS0CRQwwa9lzsU7aJXlly8dNAzyDwphsV/K2oeSLjY18HpZ47yyPdYZ+1kDls5GI448FdqH8sAbxFA==",
"requires": {
"axios": "^0.21.3",
"md5": "^2.3.0",
......@@ -5886,19 +5886,6 @@
"sha1": "^1.1.1"
},
"dependencies": {
"axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"requires": {
"follow-redirects": "^1.14.0"
}
},
"follow-redirects": {
"version": "1.14.4",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
"integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g=="
},
"qs": {
"version": "6.10.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz",
......@@ -5910,20 +5897,20 @@
}
},
"glsx-components": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.0.1.tgz",
"integrity": "sha512-vK2LQpGKBjSX7J8ouCm8Cfr3yYEJolX1Yo/0pX3WCgv71TebwAFZa9Pxu1VAA140LwMdSC9dHF3/DwUeISQuaQ==",
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.0.6.tgz",
"integrity": "sha512-wzgh338Ucq0XkE1CA2jym+TuLHWnLv+ZnXj3zzAgZYlEDzffOlntEYlT4jsBrMOGxX20iHDtTrXe2G0a9GPSyA==",
"requires": {
"core-js": "^3.6.5",
"element-ui": "^2.15.6",
"glsx-common": "^1.3.0",
"glsx-common": "^1.3.2",
"vue": "^2.6.11"
},
"dependencies": {
"core-js": {
"version": "3.18.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.0.tgz",
"integrity": "sha512-WJeQqq6jOYgVgg4NrXKL0KLQhi0CT4ZOCvFL+3CQ5o7I6J8HkT5wd53EadMfqTDp1so/MT1J+w2ujhWcCJtN7w=="
"version": "3.18.3",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.3.tgz",
"integrity": "sha512-tReEhtMReZaPFVw7dajMx0vlsz3oOb8ajgPoHVYGxr8ErnZ6PcYEvvmjGmXlfpnxpkYSdOQttjB+MvVbCGfvLw=="
},
"element-ui": {
"version": "2.15.6",
......@@ -5940,35 +5927,6 @@
}
}
},
"glsx-table": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/glsx-table/-/glsx-table-1.1.0.tgz",
"integrity": "sha512-2GTdGxOYFCG90TzZKxyGnz/Uaj2o+kMc2Rz44wuLwu5J1EsY07y4S1k4wn/ErpsBhK+PIzvjucJYRTlVzAyPBQ==",
"requires": {
"element-ui": "^2.13.1",
"vue": "^2.6.12"
},
"dependencies": {
"element-ui": {
"version": "2.15.6",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.6.tgz",
"integrity": "sha512-rcYXEKd/j2G0AgficAOk1Zd1AsnHRkhmrK4yLHmNOiimU2JfsywgfKUjMoFuT6pQx0luhovj8lFjpE4Fnt58Iw==",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"normalize-wheel": "^1.0.1",
"resize-observer-polyfill": "^1.5.0",
"throttle-debounce": "^1.0.1"
}
},
"vue": {
"version": "2.6.14",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz",
"integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ=="
}
}
},
"graceful-fs": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
......
{
"name": "blog",
"name": "services",
"version": "0.1.0",
"private": true,
"scripts": {
......@@ -8,13 +8,11 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.3.7",
"glsx-components": "^1.0.1",
"glsx-table": "^1.1.0",
"glsx-common": "^1.4.6",
"glsx-components": "^1.0.6",
"lodash": "^4.17.21",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
......
......@@ -6,6 +6,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- 使用CDN的CSS文件 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" />
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet" />
<% } %>
<!-- 使用CDN的JS文件 预加载 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" />
<% } %>
<title>微前端子应用:博客</title>
</head>
......@@ -16,6 +25,9 @@
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %>
</body>
</html>
\ No newline at end of file
.container {
background: #FFFFFF;
margin: 20px 40px;
padding: 15px 20px;
box-shadow: 0 1px 5px 0 rgba(38, 38, 38, 0.10);
}
.edit-container {
margin: 20px 40px 84px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
height: 64px;
text-align: center;
line-height: 64px;
background: #FFFFFF;
}
.edit-title {
font-size: 18px;
font-size: 16px;
font-weight: bold;
height: 48px;
line-height: 48px;
color: #0947C6;
// color: #0947C6;
border-bottom: 1px solid #E7EAEC;
// padding-left: 20px;
margin: 0 0;
......
......@@ -18,7 +18,8 @@ module.exports = {
},
request: {
// baseURL: 'http://192.168.3.171:7300/mock/6136bea6ceeb5a5c2bec6950/',
baseURL: 'http://192.168.2.94:8115/rop-scrm-live/router',
baseURL: 'http://scrm.test.glsx.com.cn/rop-scrm-live/router',
// baseURL: 'http://192.168.2.94:8115/rop-scrm-live/router',
// 设置超时时间
timeout: 180000,
// 携带凭证
......@@ -33,6 +34,6 @@ module.exports = {
source: ''
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
errId_logout_value: '21',
cdn: 'https://www.xxx.cn/static'
}
......@@ -23,6 +23,6 @@ module.exports = {
source: ''
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
errId_logout_value: '21',
cdn: 'https://www.xxx.cn/static'
}
......@@ -4,73 +4,17 @@
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: limin
* @LastEditTime: 2021-09-22 10:07:44
* @LastEditTime: 2021-09-24 10:41:31
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
import App from './App.vue'
import apis from './api'
import store from './store'
import { message, messageBox } from './plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { Http, utils } from 'glsx-common'
import { VueRouter, routes as staticRoutes, getRoutes } from './router'
import glsxTable from 'glsx-table'
import 'glsx-components/dist/glsx-components.css'
import './public-path'
import '@/assets/css/public.scss'
// import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup'
Vue.config.productionTip = false
let instance = null
let router = null
export async function bootstrap({ history, common, messenger, globalState }) {
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
}
async function singleRender() {
const { response, request, sign, secret } = await fetchConfig()
const http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: '1112223333444' } })
await _render(http, staticRoutes, '/')
}
async function qiankunRender(props = {}) {
const { response, request, sign, secret } = await fetchConfig()
const { name, id, globalState, routerBase, common } = props
const routes = getRoutes({ name, id, routesData: common.utils.deepClone(globalState.routers) })
const http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
await _render(http, routes, routerBase, globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'])
}
async function _render(http, routes, base, permissions) {
Vue.prototype.$http = http
Vue.prototype.$apis = apis
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.use(GLButton, { permissions })
Vue.use(glsxTable)
router = new VueRouter({
base,
routes,
mode: 'history'
})
instance = new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
}
// 独立运行时
if (!window.__POWERED_BY_QIANKUN__) {
singleRender()
}
export async function mount(props = {}) {
await qiankunRender(props)
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
}
export const http = params => instance.$http(params)
Vue.prototype.$apis = apis
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
......@@ -8,19 +8,10 @@ VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
function getRoutes({ name, id, routesData }) {
const routes = []
if (routesData && name && id) {
for (let i = 0, length = routesData.length; i < length; i += 1) {
const element = routesData[i]
if (element && element.path && element.path.includes(name) && element.meta && element.meta.id && element.meta.id.startsWith(id)) {
const path = element.path.slice(name.length + 1)
element.path = path
element.component = () => import('@/views' + path + '.vue')
routes.push(element)
}
}
}
return routes
function getRoutes(routesData) {
return routesData.reduce((routes, route) => {
routes.push({ ...route, component: () => import('@/views' + route.path + '.vue') })
return routes
}, [])
}
export { VueRouter, routes, getRoutes }
const staticRoutes = Object.freeze([
{
name: 'default',
path: '/',
redirect: { name: 'liveRoom' }
},
{
name: 'MemberList',
path: '/liveMember/memberList',
component: resolve => require([`@/views/liveMember/memberList.vue`], resolve),
......@@ -37,7 +42,7 @@ const staticRoutes = Object.freeze([
},
{
name: 'editLiveRoom',
path: '/liveRoom/EditLiveRoom',
path: '/liveRoom/editLiveRoom',
// component: () => import('@/views/liveRoom/editLiveRoom.vue'),
component: resolve => require([`@/views/liveRoom/editLiveRoom.vue`], resolve),
meta: {}
......
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-23 19:31:52
* @LastEditors: limin
* @LastEditTime: 2021-09-24 10:41:09
* @FilePath: \scrm\scrm-sub-blog\src\setup\index.js
*/
import { bootstrap, mount, unmount } from './qiankun'
import { start } from './single'
export { bootstrap, mount, unmount, start }
import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) {
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: 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 })
}
export async function mount(props) {
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
}
function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-23 19:04:32
* @LastEditors: limin
* @LastEditTime: 2021-10-14 16:30:47
* @FilePath: \scrm\scrm-sub-blog\src\setup\render.js
*/
import App from '../App.vue'
import Vue from 'vue'
import store from '@/store'
import { VueRouter } from '@/router'
const render = (base, routes) => {
const router = new VueRouter({
base,
routes,
mode: 'history'
})
const vm = new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
return { router, vm }
}
export default render
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-23 19:02:23
* @LastEditors: limin
* @LastEditTime: 2021-09-24 10:41:17
* @FilePath: \scrm\scrm-sub-blog\src\setup\single.js
*/
import Vue from 'vue'
import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { Http, utils } from 'glsx-common'
import render from './render'
import { routes } from '@/router'
export async function start() {
if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: '1112223333444' } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes)
}
......@@ -5,7 +5,7 @@
<glsx-combi-form ref="editFormRef" labelWidth="140px" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="selectSinglePro" slot-scope="item" class="select-pro">
<el-button type="text" @click="handleSinglePro(item)">请选择</el-button>
<table v-show="Object.keys(editForm.selectedProInfo).length" cellpadding='0' cellspacing='0' class="table-block">
<table v-show="Object.keys(editForm.selectedProInfo).length" cellpadding="0" cellspacing="0" class="table-block">
<tr>
<td>商品图片</td>
<td>商品名称</td>
......@@ -31,7 +31,7 @@
<script>
import _ from 'lodash'
import '@/assets/css/public.scss'
// import '@/assets/css/public.scss'
import glsxCombiForm from '@/components/glsx-combi-form'
import selectSingleProDialog from './selectSingleProDialog'
import { uploadImg } from '@/api/modules/cmmodityLibrary'
......@@ -105,7 +105,7 @@ export default {
computed: {},
mounted() { },
mounted() {},
methods: {
handleSinglePro(targetItem) {
......@@ -133,7 +133,7 @@ export default {
}
</script>
<style>
.edit-pro .select-pro{
.edit-pro .select-pro {
width: 480px;
}
.edit-pro .select-pro img {
......
<!-- 选择商品弹窗 -->
<template>
<glsx-dialog
class="muti-pro"
title="选择商品"
:isVisible.sync="isMutiSelectVisible"
width="70%"
@confirmDialog="handleMutiSelectConfirm"
@closeDialog="handleMutiSelectClose"
>
<glsx-table
ref="mutiProRef"
:tableParams="tableParams"
:tableData="tableData"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
></glsx-table>
<glsx-dialog class="muti-pro" title="选择商品" :isVisible.sync="isMutiSelectVisible" width="70%" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose">
<GLTable ref="mutiProRef" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
</glsx-dialog>
</template>
......@@ -26,13 +13,16 @@ export default {
return {
// 表格组件
getListApi: '',
tableData: [{
id: 1,
name: '商品名称1'
}, {
id: 2,
name: '商品名称2'
}],
tableData: [
{
id: 1,
name: '商品名称1'
},
{
id: 2,
name: '商品名称2'
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
......@@ -42,19 +32,24 @@ export default {
// 多选ref的名称
mutiSelectName: 'list',
tableOption: true,
tableColumns: [{
label: '商品名称',
prop: 'name'
}, {
label: '缩略图',
prop: 'title'
}, {
label: '价格(元)',
prop: 'status'
}, {
label: '来源门店',
prop: ''
}]
tableColumns: [
{
label: '商品名称',
prop: 'name'
},
{
label: '缩略图',
prop: 'title'
},
{
label: '价格(元)',
prop: 'status'
},
{
label: '来源门店',
prop: ''
}
]
}
}
},
......@@ -70,7 +65,7 @@ export default {
glsxDialog
},
mounted() { },
mounted() {},
methods: {
handleMutiSelectConfirm() {
......@@ -84,5 +79,4 @@ export default {
}
}
</script>
<style>
</style>
<style></style>
......@@ -14,7 +14,7 @@
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">添加商品</el-button>
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEditGroup(1)">添加商品组</el-button>
</div>
<glsx-table ref="warehousListRef" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable ref="warehousListRef" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="coverImgUrl" slot-scope="scope">
<img style="width: 100px; height: 100px;" :src="scope.scope.img" />
</span>
......@@ -23,7 +23,7 @@
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
</span>
</glsx-table>
</GLTable>
</div>
</template>
......
......@@ -3,7 +3,7 @@
<el-card shadow="never" slot="header">
<el-form :inline="true" :model="searchForm" class="demo-form-inline" size="small">
<el-form-item label="商品搜索:">
<el-input v-model="searchForm.proName" placeholder="请输入商品名称" clearable/>
<el-input v-model="searchForm.proName" placeholder="请输入商品名称" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" :loading="tableLoading" @click="getList()">搜索</el-button>
......@@ -15,14 +15,15 @@
</el-card>
<!-- 表格区域 开始 -->
<glsx-table ref="wareRef" :searchForm="searchForm" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable ref="wareRef" :searchForm="searchForm" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="showImg" slot-scope="scope">
<img style="width: 50px; height: 50px;" :src="scope.scope.pic" />{{scope.scope.title}}
<img style="width: 50px; height: 50px;" :src="scope.scope.pic" />
{{ scope.scope.title }}
</span>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="updatePrice(scope.scope)">修改价格</el-button>
</span>
</glsx-table>
</GLTable>
<!-- 表格区域 end -->
<!-- 修改价格弹框 开始 -->
......@@ -37,11 +38,10 @@
<el-button @click="showPriceDialog = false">取消</el-button>
</div>
</glsx-dialog>
<!-- 修改价格弹框 end -->
<!-- 修改价格弹框 end -->
</div>
</template>
<script>
// import {
// GETLISTUSERINFO,
......@@ -78,13 +78,15 @@ export default {
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableData: [{
id :1,
pic : 'https://t7.baidu.com/it/u=4162611394,4275913936&fm=193&f=GIF',
title : '商品标题',
price : 999,
merchant : 'xxx'
}],
tableData: [
{
id: 1,
pic: 'https://t7.baidu.com/it/u=4162611394,4275913936&fm=193&f=GIF',
title: '商品标题',
price: 999,
merchant: 'xxx'
}
],
tableLoading: false,
pageTotal: 0,
userInfo: {},
......@@ -92,25 +94,22 @@ export default {
pageSizes: [10, 20, 30, 40],
pageSize: 10,
tdWidth: 170,
DATEFORMATE: (str, type) => { return this.$Util.dateFormate(str, type) },
DATEFORMATE: (str, type) => {
return this.$Util.dateFormate(str, type)
},
showPriceDialog: false,
form : {},
form: {},
formRules: {
price: [
{ required: true, message: "请输入价格", trigger: "blur" }
]
},
price: [{ required: true, message: '请输入价格', trigger: 'blur' }]
}
}
},
created() {
},
created() {},
mounted: function() {
// this.getList()
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
resolve()
......@@ -125,35 +124,36 @@ export default {
const oParams = _this.getParams()
// oParams.pageNum = current || _this.currentPage
_this.tableLoading = true
let list = [{
id :1,
pic : 'https://t7.baidu.com/it/u=4162611394,4275913936&fm=193&f=GIF',
title : '商品标题',
price : 999,
merchant : 'xxx'
}]
let list = [
{
id: 1,
pic: 'https://t7.baidu.com/it/u=4162611394,4275913936&fm=193&f=GIF',
title: '商品标题',
price: 999,
merchant: 'xxx'
}
]
// GETLISTUSERINFO(oParams).then(res => {
// console.log(res)
_this.tableLoading = false
_this.tableLoading = false
// if (res.returnCode == 0) {
// const { data } = res
// const { total, list } = data
_this.tableData = list || []
_this.tableData = list || []
// _this.pageTotal = total
// }
// })
},
/**
* 获取查询参数
*/
* 获取查询参数
*/
getParams: function() {
const oParams = this.searchForm
oParams.pageSize = this.pageSize
return oParams
},
/**
* 每页展示
*/
......@@ -165,22 +165,20 @@ export default {
reset() {
this.$refs.wareRef.refreshTable()
},
updatePrice: function(){
updatePrice: function() {
this.showPriceDialog = true
},
closePriceDialog: function(){
closePriceDialog: function() {
this.showPriceDialog = false
}
}
}
</script>
<style lang="scss">
.table_box {
margin: 20px 0;
}
.table_box {
margin: 20px 0;
}
</style>
......@@ -3,7 +3,7 @@
<el-card shadow="never" slot="header">
<el-form :inline="true" :model="searchForm" class="demo-form-inline" size="small">
<el-form-item label="成员搜索:">
<el-input v-model="searchForm.userName" placeholder="请输入微信号或者昵称" clearable/>
<el-input v-model="searchForm.userName" placeholder="请输入微信号或者昵称" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" :loading="tableLoading" @click="getList()">搜索</el-button>
......@@ -15,17 +15,15 @@
</el-card>
<!-- 表格区域 开始 -->
<glsx-table ref="memberRef" :searchForm="searchForm" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<GLTable ref="memberRef" :searchForm="searchForm" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="showImg" slot-scope="scope">
<img style="width: 50px; height: 50px;" :src="scope.scope.pic" />
</span>
</glsx-table>
</GLTable>
<!-- 表格区域 end -->
</div>
</template>
<script>
// import {
// GETLISTUSERINFO,
......@@ -67,25 +65,24 @@ export default {
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableData: [{
id :1,
pic : 'https://t7.baidu.com/it/u=4162611394,4275913936&fm=193&f=GIF',
userName : '昵称',
userCode : '微信号',
roleName : '所属角色'
}],
tableData: [
{
id: 1,
pic: 'https://t7.baidu.com/it/u=4162611394,4275913936&fm=193&f=GIF',
userName: '昵称',
userCode: '微信号',
roleName: '所属角色'
}
],
tableLoading: false
}
},
created() {
},
created() {},
mounted: function() {
// this.getList()
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
resolve()
......@@ -100,35 +97,36 @@ export default {
const oParams = _this.getParams()
// oParams.pageNum = current || _this.currentPage
_this.tableLoading = true
let list = [{
id :1,
pic : 'https://t7.baidu.com/it/u=4162611394,4275913936&fm=193&f=GIF',
userName : '昵称',
userCode : '微信号',
roleName : '所属角色'
}]
let list = [
{
id: 1,
pic: 'https://t7.baidu.com/it/u=4162611394,4275913936&fm=193&f=GIF',
userName: '昵称',
userCode: '微信号',
roleName: '所属角色'
}
]
// GETLISTUSERINFO(oParams).then(res => {
// console.log(res)
_this.tableLoading = false
_this.tableLoading = false
// if (res.returnCode == 0) {
// const { data } = res
// const { total, list } = data
_this.tableData = list || []
_this.tableData = list || []
// _this.pageTotal = total
// }
// })
},
/**
* 获取查询参数
*/
* 获取查询参数
*/
getParams: function() {
const oParams = this.formInline
oParams.pageSize = this.pageSize
return oParams
},
/**
* 每页展示
*/
......@@ -142,14 +140,13 @@ export default {
*/
reset() {
this.$refs.memberRef.refreshTable()
},
}
}
}
</script>
<style lang="scss">
.table_box {
margin: 20px 0;
}
.table_box {
margin: 20px 0;
}
</style>
<!-- 编辑直播间 -->
<template>
<div>
<p class="edit-title">{{ title }}</p>
<!-- <p class="edit-sub-title" style="margin-top: 10px;">关联门店信息</p> -->
<glsx-combi-form ref="editFormRef" labelWidth="140px" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="wechatAccount" slot-scope="item">
<el-button type="text" @click="handlSelectWechat(item)">从成员中选择</el-button>
</div>
<div slot="liveRoomCof">
<el-button type="primary" size="mini" class="el-icon-plus" @click="handleRelateStoreClose">直播间配置</el-button>
</div>
<div slot="footer">
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div>
</glsx-combi-form>
<glsx-dialog title="选择成员" width="620px" :isVisible="isWechatVisible" @closeDialog="handleWechatClose" @confirmDialog="handleWechatConfirm"></glsx-dialog>
<relate-store-dialog
v-if="relateStoreVisible"
ref="relateStore"
:relateStoreVisible="relateStoreVisible"
:storeApi="storeApi"
:storeSearchForm="storeSearchForm"
:storeSelected="storeSelected"
@handleRelateStoreConfirm="handleRelateStoreConfirm"
@handleRelateStoreClose="handleRelateStoreClose"
>
<!-- <el-row>
<div class="container edit-container">
<p class="edit-title">{{ title }}</p>
<!-- <p class="edit-sub-title" style="margin-top: 10px;">关联门店信息</p> -->
<glsx-combi-form ref="editFormRef" labelWidth="140px" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="wechatAccount" slot-scope="item">
<el-button type="text" @click="handlSelectWechat(item)">从成员中选择</el-button>
</div>
<div slot="liveRoomCof">
<el-button type="primary" size="mini" class="el-icon-plus" @click="handleRelateStoreClose">直播间配置</el-button>
</div>
</glsx-combi-form>
<glsx-dialog title="选择成员" width="620px" :isVisible="isWechatVisible" @closeDialog="handleWechatClose" @confirmDialog="handleWechatConfirm"></glsx-dialog>
<relate-store-dialog v-if="relateStoreVisible" ref="relateStore" :relateStoreVisible="relateStoreVisible" :storeApi="storeApi" :storeSearchForm="storeSearchForm" :storeSelected="storeSelected" @handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose">
<!-- <el-row>
<el-form
:model="storeSearchForm"
:rules="rules"
......@@ -55,12 +43,18 @@
>搜索</el-button>
</el-form>
</el-row> -->
</relate-store-dialog>
</relate-store-dialog>
</div>
<div class="footer">
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
<script>
import '@/assets/css/public.scss'
// import '@/assets/css/public.scss'
import _ from 'lodash'
import glsxCombiForm from '@/components/glsx-combi-form'
import glsxDialog from '@/components/glsx-dialog'
......
......@@ -4,10 +4,7 @@
<div class="box">
<p class="edit-title">直播控制台</p>
<div class="head-box flex">
<img
class="head-img"
src="https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500"
/>
<img class="head-img" src="https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500" />
<div>
<p>{{ liveRoomData.title }}</p>
<p>开播时间:{{ liveRoomData.time }}</p>
......@@ -27,49 +24,20 @@
<p>商品点击次数</p>
</div>
<div class="content">
<div
class="flex"
style="justify-content: space-between;"
>
<div class="flex" style="justify-content: space-between;">
<p class="edit-sub-title">商品配置</p>
<el-button size="mini" @click="handleImportPro">导入商品</el-button>
</div>
<glsx-table
ref="liveRoomRef"
:searchForm="searchConfigForm"
:tableParams="tableParams"
:tableData="tableData"
:pageConf="pageConf"
:beforeSearchFn="beforeConfigSearchFn"
>
<span
slot="showImg"
slot-scope="scope"
>
<img
style="width: 100px; height: 100px;"
:src="scope.scope.img"
/>
<GLTable ref="liveRoomRef" :searchForm="searchConfigForm" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" :beforeSearchFn="beforeConfigSearchFn">
<span slot="showImg" slot-scope="scope">
<img style="width: 100px; height: 100px;" :src="scope.scope.img" />
</span>
<span
slot="auth-button"
slot-scope="scope"
:data="scope.scope"
>
<el-button
type="text"
@click="handlePush(scope.scope.id)"
>{{targetId === scope.scope.id ? ('已推送' + pushCountDown + 's') : '推送'}}</el-button>
<el-button
type="text"
@click="handleUpOrDown(scope.scope)"
>{{ scope.scope.status == '1' ? '下架' : '上架'}}</el-button>
<el-button
type="text"
@click="handleDelete(scope.scope)"
>删除</el-button>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handlePush(scope.scope.id)">{{ targetId === scope.scope.id ? '已推送' + pushCountDown + 's' : '推送' }}</el-button>
<el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.status == '1' ? '下架' : '上架' }}</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
</span>
</glsx-table>
</GLTable>
</div>
<div class="content">
<p class="edit-sub-title">直播设置</p>
......@@ -102,15 +70,18 @@ export default {
pushTimer: null,
pushCountDown: 0,
targetId: '',
tableData: [{
id: '1',
status: '1',
img: 'https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500'
}, {
id: '2',
status: '0',
img: 'https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500'
}],
tableData: [
{
id: '1',
status: '1',
img: 'https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500'
},
{
id: '2',
status: '0',
img: 'https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500'
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'list',
......@@ -158,8 +129,7 @@ export default {
prop: ''
}
]
},
}
}
},
......@@ -239,7 +209,6 @@ export default {
}
}
}
</script>
<style>
.live-control {
......
<!-- 直播间列表 -->
<template>
<div class="live-room">
<el-form
:inline="true"
:model="searchForm"
>
<el-form-item label="直播间搜索:">
<el-input
:size="size"
v-model="searchForm.name"
placeholder="请输入直播间名称"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
:size="size"
type="primary"
@click="handleSearch"
>查询</el-button>
</el-form-item>
</el-form>
<div>
<el-button
:size="size"
type="primary"
class="el-icon-plus"
@click="handleEdit(1)"
>新增</el-button>
<div class="container live-room">
<div class="flex">
<el-form>
<el-form-item>
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增直播</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" :model="searchForm">
<el-form-item label="直播间搜索:">
<el-input :size="size" v-model="searchForm.name" placeholder="请输入直播间名" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<glsx-table
ref="liveRoomRef"
:searchForm="searchForm"
:tableParams="tableParams"
:getListApi="getListApi"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<span
slot="shareImgUrl"
slot-scope="scope"
>
<img
style="width: 100px; height: 100px;"
:src="scope.scope.shareImgUrl"
/>
<GLTable ref="liveRoomRef" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="shareImgUrl" slot-scope="scope">
<img style="width: 60px; height: 60px;" :src="scope.scope.shareImgUrl" />
</span>
<span
slot="auth-button"
slot-scope="scope"
:data="scope.scope"
>
<el-button
type="text"
@click="handleDetail(scope.scope)"
>控制台</el-button>
<el-button
type="text"
@click="handleShare(scope.scope)"
>分享</el-button>
<el-button
type="text"
@click="handleEdit(2, scope.scope)"
>编辑</el-button>
<el-button
type="text"
@click="handleDelete(scope.scope)"
>删除</el-button>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDetail(scope.scope)">控制台</el-button>
<el-button type="text" @click="handleShare(scope.scope)">分享</el-button>
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
</span>
</glsx-table>
<glsx-dialog
title="分享"
width="620px"
:isVisible="isShareVisible"
:noCancel="noCancel"
@closeDialog="handleShareClose"
@confirmDialog="handleShareClose"
>
</GLTable>
<glsx-dialog title="分享" width="620px" :isVisible="isShareVisible" :noCancel="noCancel" @closeDialog="handleShareClose" @confirmDialog="handleShareClose">
<div class="share-dialog">
<div class="flex">
<div class="flex box poster">
......@@ -116,7 +68,7 @@ export default {
name: 'liveRoom',
data() {
return {
size: 'mini',
size: 'small',
searchForm: {
name: ''
},
......@@ -166,34 +118,36 @@ export default {
]
},
baseDataList: {
liveStatus: [{
confId: '101',
confName: '直播中'
},
{
confId: '102',
confName: '未开始'
},
{
confId: '103',
confName: '直播中'
},
{
confId: '104',
confName: '直播中'
},
{
confId: '105',
confName: '直播中'
},
{
confId: '106',
confName: '直播中'
},
{
confId: '107',
confName: '直播中'
},]
liveStatus: [
{
confId: '101',
confName: '直播中'
},
{
confId: '102',
confName: '未开始'
},
{
confId: '103',
confName: '直播中'
},
{
confId: '104',
confName: '直播中'
},
{
confId: '105',
confName: '直播中'
},
{
confId: '106',
confName: '直播中'
},
{
confId: '107',
confName: '直播中'
}
]
}
}
},
......@@ -202,7 +156,9 @@ export default {
glsxDialog
},
mounted() { },
mounted() {
console.log(this.$common.utils)
},
methods: {
beforeSearchFn() {
......@@ -235,8 +191,10 @@ export default {
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
// this.$history.push('services/liveRoom/editLiveRoom', { addOrEdit: addOrEdit, row: row || {} })
this.$router.push({
name: 'editLiveRoom',
// name: 'editLiveRoom',
path: '/liveRoom/editLiveRoom',
params: {
addOrEdit: addOrEdit,
row: row || {}
......
<!-- 关联门店弹窗 -->
<template>
<glsx-dialog
title="关联门店"
:isVisible.sync="relateStoreVisible"
width="70%"
btnOkLabel="关联"
@confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose"
class="relateStore"
>
<glsx-dialog title="关联门店" :isVisible.sync="relateStoreVisible" width="70%" btnOkLabel="关联" @confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateStore">
<slot></slot>
<el-row>
<el-col :span="12">
<el-table
ref="seletingTable"
:data="selectingData"
height="464px"
class="table"
border
@select="handleChange"
@select-all="handleAll"
>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="selectable"
></el-table-column>
<el-table-column
v-if="sourcePage != 'serviceStore'"
prop="yqMerchantName"
label="园区店名称"
align="center"
>
<el-table ref="seletingTable" :data="selectingData" height="464px" class="table" border @select="handleChange" @select-all="handleAll">
<el-table-column type="selection" width="55" align="center" :selectable="selectable"></el-table-column>
<el-table-column v-if="sourcePage != 'serviceStore'" prop="yqMerchantName" label="园区店名称" align="center">
<template slot-scope="scope">
<span :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{scope.row.yqMerchantName}}</span>
<span :class="{ red: !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage) }">{{ scope.row.yqMerchantName }}</span>
</template>
</el-table-column>
<el-table-column
prop="merchantName"
label="4S店名称"
align="center"
>
<el-table-column prop="merchantName" label="4S店名称" align="center">
<template slot-scope="scope">
<span :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{scope.row.merchantName}}</span>
<el-tooltip
v-if="!scope.row.isSetUpgradeSettleRule"
popper-class="tooltip-class"
effect="dark"
content="该门店无配置财务分润规则,无法关联!"
placement="top"
>
<span
v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)"
class="tip-icon"
>?</span>
<span :class="{ red: !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage) }">{{ scope.row.merchantName }}</span>
<el-tooltip v-if="!scope.row.isSetUpgradeSettleRule" popper-class="tooltip-class" effect="dark" content="该门店无配置财务分润规则,无法关联!" placement="top">
<span v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)" class="tip-icon">?</span>
</el-tooltip>
</template></el-table-column>
</template>
</el-table-column>
</el-table>
<el-pagination
small
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total"
></el-pagination>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pageSize" layout="total, prev, pager, next" :total="total"></el-pagination>
</el-col>
<el-col :span="12">
<el-table
:data="selectedData"
class="table"
border
height="464px"
>
<el-table-column
v-if="sourcePage != 'serviceStore'"
prop="yqMerchantName"
label="园区店名称"
align="center"
></el-table-column>
<el-table-column
prop="merchantName"
label="4S店名称"
align="center"
></el-table-column>
<el-table-column
label="删除"
align="center"
width="50px"
>
<el-table :data="selectedData" class="table" border height="464px">
<el-table-column v-if="sourcePage != 'serviceStore'" prop="yqMerchantName" label="园区店名称" align="center"></el-table-column>
<el-table-column prop="merchantName" label="4S店名称" align="center"></el-table-column>
<el-table-column label="删除" align="center" width="50px">
<template slot-scope="scope">
<el-button
class="el-icon-delete"
@click="handleDelete(scope.row)"
type="text"
>
</el-button>
<el-button class="el-icon-delete" @click="handleDelete(scope.row)" type="text"></el-button>
</template>
</el-table-column>
</el-table>
......@@ -134,7 +65,7 @@ export default {
},
storeApi: {
type: Function,
default: () => { }
default: () => {}
},
storeSelected: {
type: Array,
......@@ -142,7 +73,7 @@ export default {
},
storeSearchForm: {
type: Object,
default: () => { }
default: () => {}
}
// 去掉表格中某些字段
// noTableField: {
......@@ -189,17 +120,15 @@ export default {
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(item => item.merchantId === row.merchantId)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(item => item.merchantId !== row.merchantId))
addOrDelete ? this.selectedData.push(row) : (this.selectedData = this.selectedData.filter(item => item.merchantId !== row.merchantId))
},
handleAll(selection) {
this.selectingData.forEach(item => {
var isExit = this.selectedData.findIndex(subItem => subItem.merchantId === item.merchantId)
var isServed = item.hasOwnProperty('beServed') ? item.beServed : false
if (selection.length && (isExit === -1) && !isServed) {
if (selection.length && isExit === -1 && !isServed) {
this.selectedData.push(item)
} else if (!selection.length && (isExit !== -1)) {
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
......@@ -220,7 +149,6 @@ export default {
}
}
}
</script>
<style>
.relateStore .table {
......
<!-- 选择商品弹窗 -->
<template>
<glsx-dialog
class="muti-pro"
title="选择商品"
:isVisible.sync="isMutiSelectVisible"
width="70%"
@confirmDialog="handleMutiSelectConfirm"
@closeDialog="handleMutiSelectClose"
>
<glsx-table
ref="mutiProRef"
:searchForm="searchForm"
:tableParams="tableParams"
:tableData="tableData"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
></glsx-table>
<glsx-dialog class="muti-pro" title="选择商品" :isVisible.sync="isMutiSelectVisible" width="70%" @confirmDialog="handleMutiSelectConfirm" @closeDialog="handleMutiSelectClose">
<GLTable ref="mutiProRef" :searchForm="searchForm" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"></GLTable>
</glsx-dialog>
</template>
......@@ -27,13 +13,16 @@ export default {
return {
// 表格组件
getListApi: '',
tableData: [{
id: 1,
name: '商品名称1'
}, {
id: 2,
name: '商品名称2'
}],
tableData: [
{
id: 1,
name: '商品名称1'
},
{
id: 2,
name: '商品名称2'
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
......@@ -43,19 +32,24 @@ export default {
// 多选ref的名称
mutiSelectName: 'list',
tableOption: true,
tableColumns: [{
label: '商品名称',
prop: 'name'
}, {
label: '缩略图',
prop: 'title'
}, {
label: '价格(元)',
prop: 'status'
}, {
label: '来源门店',
prop: ''
}]
tableColumns: [
{
label: '商品名称',
prop: 'name'
},
{
label: '缩略图',
prop: 'title'
},
{
label: '价格(元)',
prop: 'status'
},
{
label: '来源门店',
prop: ''
}
]
}
}
},
......@@ -71,7 +65,7 @@ export default {
glsxDialog
},
mounted() { },
mounted() {},
methods: {
handleMutiSelectConfirm() {
......@@ -85,5 +79,4 @@ export default {
}
}
</script>
<style>
</style>
<style></style>
const path = require('path')
const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
// const baseUrl = process.env.VUE_APP_BASE_URL;
const baseUrl = '/'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcdn.net/'
const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`]
}
module.exports = {
outputDir: `dist`,
publicPath: node_env ? baseUrl : '/',
outputDir: `../dist/${packageName}`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
configureWebpack: {
resolve: {
alias: {
......@@ -21,6 +26,14 @@ module.exports = {
library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_${packageName}`
},
externals: {
vue: 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
vuex: 'Vuex',
axios: 'axios',
echarts: 'echarts'
}
},
devServer: {
......@@ -30,18 +43,14 @@ module.exports = {
port: process.env.VUE_APP_PORT,
headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
},
proxy: {
'/api': {
target: 'http://192.168.2.94:8115/rop-scrm-live',
changeOrigin: true,
pathRewrite: {
'^/api': '/router'
}
}
}
},
chainWebpack: config => {
config.plugin('html').tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
})
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
config.module
......@@ -58,4 +67,4 @@ module.exports = {
})
.end()
}
}
\ No newline at end of file
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!