Commit 67a0339f by cwq0219

子系统修改

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