diff --git a/template/admin/.env.dev b/template/admin/.env.dev index 7fbe1d4b0..5d1837c41 100644 --- a/template/admin/.env.dev +++ b/template/admin/.env.dev @@ -5,4 +5,4 @@ VUE_APP_ENV='dev' VUE_APP_TITLE=CRMEB # 接口请求地址 -VUE_APP_API_URL='' +VUE_APP_API_URL='http://192.168.31.239/adminapi' diff --git a/template/admin/package.json b/template/admin/package.json index de7aea4a8..70b63a57e 100644 --- a/template/admin/package.json +++ b/template/admin/package.json @@ -2,7 +2,7 @@ "name": "from-crmeb-admin", "version": "5.2.1", "author": "sugar1569<763569752@qq.com>", - "private": true, + "private": false, "scripts": { "serve": "vue-cli-service serve --open --mode=dev", "dev": "vue-cli-service serve --open --mode=dev", diff --git a/template/admin/src/App.vue b/template/admin/src/App.vue index e70754c03..48a2fcf89 100644 --- a/template/admin/src/App.vue +++ b/template/admin/src/App.vue @@ -28,6 +28,35 @@ export default { isVersion: false, }; }, + watch: { + // 监听路由 控制侧边栏显示 标记当前顶栏菜单(如需要) + $route(to, from) { + const onRoutes = to.meta.activeMenu ? to.meta.activeMenu : to.meta.path; + this.$store.commit('menu/setActivePath', onRoutes); + if (to.name == 'crud_crud') { + this.$store.state.menus.oneLvRoutes.map((e) => { + if (e.path === to.path) { + to.meta.title = e.title; + } + }); + } + if ( + [ + 'product_productAdd', + 'marketing_bargainCreate', + 'marketing_storeSeckillCreate', + 'marketing_storeIntegralCreate', + ].includes(to.name) + ) { + let route = to.matched[1].path.split(':')[0]; + this.$store.state.menus.oneLvRoutes.map((e) => { + if (route.indexOf(e.path) != -1) { + to.meta.title = `${e.title} ${to.params.id ? 'ID:' + to.params.id : ''}`; + } + }); + } + }, + }, methods: { ...mapMutations('media', ['setDevice']), handleWindowResize() { diff --git a/template/admin/src/components/customerInfo/index.vue b/template/admin/src/components/customerInfo/index.vue index 2d0b4366d..5d28c7211 100644 --- a/template/admin/src/components/customerInfo/index.vue +++ b/template/admin/src/components/customerInfo/index.vue @@ -222,7 +222,7 @@ export default { width 100% height 100% .modelBox - ::v-deep + ::v-deep .ivu-table-header width 100% !important .trees-coadd diff --git a/template/admin/src/components/diyComponents/c_goods.vue b/template/admin/src/components/diyComponents/c_goods.vue index 1c5d05527..72f9b62a4 100644 --- a/template/admin/src/components/diyComponents/c_goods.vue +++ b/template/admin/src/components/diyComponents/c_goods.vue @@ -145,7 +145,7 @@ export default { diff --git a/template/admin/src/components/mobileConfigRightDiy/c_tab.vue b/template/admin/src/components/mobileConfigRightDiy/c_tab.vue index 9b7521991..8552a0f03 100644 --- a/template/admin/src/components/mobileConfigRightDiy/c_tab.vue +++ b/template/admin/src/components/mobileConfigRightDiy/c_tab.vue @@ -72,7 +72,7 @@ export default { border-left 1px solid #dcdee2 } // .radio-box -// ::v-deep.ivu-radio-group-button +// ::v-deep .ivu-radio-group-button // display flex // width 100% // flex-wrap: wrap @@ -82,7 +82,7 @@ export default { // align-items center // justify-content center // &.on -// ::v-deep.ivu-radio-group-button +// ::v-deep .ivu-radio-group-button // .ivu-radio-wrapper // flex unset // width 67px diff --git a/template/admin/src/components/newsCategory/index.vue b/template/admin/src/components/newsCategory/index.vue index 3f79e4c19..1910e4a15 100644 --- a/template/admin/src/components/newsCategory/index.vue +++ b/template/admin/src/components/newsCategory/index.vue @@ -390,7 +390,7 @@ export default { border: 1px solid #eee !important; } -.news_pic ::v-deep.ivu-btn-error:hover { +.news_pic ::v-deep .ivu-btn-error:hover { background: #FF5D5F !important; border: 1px solid #fff !important; color: #fff !important; diff --git a/template/admin/src/components/sortList/index.vue b/template/admin/src/components/sortList/index.vue index 7ea4c20fc..8b9b827d4 100644 --- a/template/admin/src/components/sortList/index.vue +++ b/template/admin/src/components/sortList/index.vue @@ -165,6 +165,6 @@ export default { margin-top 20px float right .goodList - ::v-deep table + ::v-deeptable width 100% !important diff --git a/template/admin/src/components/systemStore/index.vue b/template/admin/src/components/systemStore/index.vue index f0442d266..15f7b7926 100644 --- a/template/admin/src/components/systemStore/index.vue +++ b/template/admin/src/components/systemStore/index.vue @@ -5,6 +5,7 @@ :title="formItem.id ? '编辑提货点' : '添加提货点'" width="720px" @closed="cancel" + append-to-body >
- - + + @@ -42,7 +43,6 @@ - - - -
{{ formItem.id ? '修改' : '提交' }} + + + @@ -178,9 +170,7 @@ export default { data() { const validatePhone = (rule, value, callback) => { if (!value) { - return callback(new Error('请填写手机号')); - } else if (!/^1[3456789]\d{9}$/.test(value)) { - callback(new Error('手机号格式不正确!')); + return callback(new Error('请填写电话号码')); } else { callback(); } diff --git a/template/admin/src/components/wangEditor/monaco.vue b/template/admin/src/components/wangEditor/monaco.vue index ac96cbc15..2980cb5d5 100644 --- a/template/admin/src/components/wangEditor/monaco.vue +++ b/template/admin/src/components/wangEditor/monaco.vue @@ -52,8 +52,10 @@ export default { }, }, beforeDestroy() { - this.monacoInstance.dispose(); - this.monacoInstance = null; + if (this.monacoInstance) { + this.monacoInstance.dispose(); + this.monacoInstance = null; + } }, }; @@ -66,7 +68,7 @@ export default { .text ::v-deep .ivu-input-wrapper { min-height: 600px; } -.text ::v-deep textarea.ivu-input { +.text ::v-deeptextarea.ivu-input { min-height: 600px; } .text { diff --git a/template/admin/src/layout/component/transverseAside.vue b/template/admin/src/layout/component/transverseAside.vue index f7b1ee778..d29fce7de 100644 --- a/template/admin/src/layout/component/transverseAside.vue +++ b/template/admin/src/layout/component/transverseAside.vue @@ -230,7 +230,7 @@ export default { overflow-y: hidden !important; overflow-x: scroll !important; } - ::v-deep a { + ::v-deepa { width: 100%; } .el-menu.el-menu--horizontal { diff --git a/template/admin/src/layout/navMenu/horizontal.vue b/template/admin/src/layout/navMenu/horizontal.vue index 9f92523be..8269ba327 100644 --- a/template/admin/src/layout/navMenu/horizontal.vue +++ b/template/admin/src/layout/navMenu/horizontal.vue @@ -143,7 +143,7 @@ export default { ::v-deep .el-scrollbar__wrap { overflow-y: hidden !important; } - ::v-deep a { + ::v-deepa { width: 100%; } .el-menu.el-menu--horizontal { diff --git a/template/admin/src/layout/navMenu/vertical.vue b/template/admin/src/layout/navMenu/vertical.vue index 1ca2ed3a4..d6c05bb7c 100644 --- a/template/admin/src/layout/navMenu/vertical.vue +++ b/template/admin/src/layout/navMenu/vertical.vue @@ -89,7 +89,7 @@ export default { margin-right: 0 !important; margin-left: 5px; } -// ::v-deep.el-submenu__title { +// ::v-deep .el-submenu__title { // display: flex; // justify-content: center; // align-items: center; diff --git a/template/admin/src/main.js b/template/admin/src/main.js index 43c27ffdc..59226b88e 100644 --- a/template/admin/src/main.js +++ b/template/admin/src/main.js @@ -8,17 +8,13 @@ // | Author: CRMEB Team // +---------------------------------------------------------------------- -// The Vue build version to load with the `import` command -// (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue'; import App from './App'; import router from './router'; import store from './store'; Vue.prototype.bus = new Vue(); -import Router from 'vue-router'; import Auth from '@/libs/wechat'; import { i18n } from '@/i18n/index.js'; - import config from '@/config'; import importDirective from '@/directive'; import { directive as clickOutside } from 'v-click-outside-x'; @@ -28,16 +24,12 @@ import '@/assets/iconfont/iconfont.css'; import '@/theme/index.scss'; import Element from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; -import { globalComponentSize } from '@/utils/componentSize.js'; - import './assets/iconfontYI/iconfontYI.css'; import './plugin/emoji-awesome/css/google.min.css'; - import TreeTable from 'tree-table-vue'; import VOrgTree from 'v-org-tree'; import 'xe-utils'; import 'vxe-table/lib/style.css'; - import 'v-org-tree/dist/v-org-tree.css'; import './styles/index.scss'; import 'swiper/css/swiper.css'; @@ -45,10 +37,8 @@ import 'viewerjs/dist/viewer.css'; import 'codemirror/lib/codemirror.css'; import 'vxe-table/lib/index.css'; import 'vue-happy-scroll/docs/happy-scroll.css'; -// swiper -import VueAwesomeSwiper from 'vue-awesome-swiper'; -// 懒加载 -import VueLazyload from 'vue-lazyload'; +import VueAwesomeSwiper from 'vue-awesome-swiper'; // swiper +import VueLazyload from 'vue-lazyload'; // 懒加载 import VXETable, { t } from 'vxe-table'; import Viewer from 'v-viewer'; import VueDND from 'awe-dnd'; @@ -67,16 +57,12 @@ import * as tools from '@/libs/tools'; import VueTreeList from 'vue-tree-list'; import Pagination from '@/components/Pagination'; import pagesHeader from '@/components/pagesHeader'; +import vuescroll from 'vuescroll'; // 移动端滚动插件 +import VueClipboard from 'vue-clipboard2'; // 复制到粘贴板插件 // 全局组件挂载 Vue.component('Pagination', Pagination); Vue.component('pagesHeader', pagesHeader); -// 复制到粘贴板插件 -import VueClipboard from 'vue-clipboard2'; - -VueClipboard.config.copyText = true; -Vue.use(VueClipboard); -Vue.use(VueTreeList); //日期 import moment from 'moment'; @@ -85,28 +71,8 @@ moment.locale('zh-cn'); // 全局过滤 import * as filters from './filters'; // global filters modalTemplates - import settings from '@/setting'; - -Vue.prototype.$routeProStr = settings.routePre; - -window.Promise = Promise; -Vue.prototype.$modalForm = modalForm; -Vue.prototype.$modalSure = modalSure; -Vue.prototype.$exportExcel = exportExcel; -Vue.prototype.$videoCloud = videoCloud; -Vue.prototype.$authLapse = authLapse; -Vue.prototype.$wechat = Auth; -Vue.prototype.$dialog = dialog; -Vue.prototype.$timeOptions = timeOptions; -Vue.prototype.$scroll = scroll; -Vue.prototype.$validator = function (rule) { - return new schema(rule); -}; -Vue.prototype.$tools = tools; - const messages = ['success', 'warning', 'info', 'error']; - messages.forEach((type) => { Element.Message[type] = (options) => { if (typeof options === 'string') { @@ -121,6 +87,8 @@ messages.forEach((type) => { return Element.Message(options); }; }); + +VueClipboard.config.copyText = true; // 复制到粘贴板插件 Vue.use(Element, { i18n: (key, value) => i18n.t(key, value), size: 'small' }); Vue.use(formCreate); Vue.use(VueCodeMirror); @@ -129,6 +97,7 @@ Vue.use(TreeTable); Vue.use(VOrgTree); Vue.use(VueAwesomeSwiper); Vue.use(VXETable); +Vue.use(vuescroll); Vue.use(VueLazyload, { preLoad: 1.3, error: require('./assets/images/no.png'), @@ -141,29 +110,45 @@ Vue.use(Viewer, { zIndex: 9999, }, }); +Vue.use(VueClipboard); +Vue.use(VueTreeList); + /** * @description 注册admin内置插件 */ installPlugin(Vue); + /** * @description 生产环境关掉提示 */ Vue.config.productionTip = false; + /** * @description 全局注册应用配置 */ +window.Promise = Promise; Vue.prototype.$config = config; +Vue.prototype.$routeProStr = settings.routePre; +Vue.prototype.$modalForm = modalForm; +Vue.prototype.$modalSure = modalSure; +Vue.prototype.$exportExcel = exportExcel; +Vue.prototype.$videoCloud = videoCloud; +Vue.prototype.$authLapse = authLapse; +Vue.prototype.$wechat = Auth; +Vue.prototype.$dialog = dialog; +Vue.prototype.$timeOptions = timeOptions; +Vue.prototype.$scroll = scroll; +Vue.prototype.$tools = tools; +Vue.prototype.$validator = function (rule) { + return new schema(rule); +}; + /** * 注册指令 */ importDirective(Vue); Vue.directive('clickOutside', clickOutside); -// 移动端滚动插件 -import vuescroll from 'vuescroll'; - -Vue.use(vuescroll); - // 注册全局 过滤器 Object.keys(filters).forEach((key) => { Vue.filter(key, filters[key]); @@ -188,33 +173,4 @@ new Vue({ i18n, store, render: (h) => h(App), - watch: { - // 监听路由 控制侧边栏显示 标记当前顶栏菜单(如需要) - $route(to, from) { - const onRoutes = to.meta.activeMenu ? to.meta.activeMenu : to.meta.path; - this.$store.commit('menu/setActivePath', onRoutes); - if (to.name == 'crud_crud') { - this.$store.state.menus.oneLvRoutes.map((e) => { - if (e.path === to.path) { - to.meta.title = e.title; - } - }); - } - if ( - [ - 'product_productAdd', - 'marketing_bargainCreate', - 'marketing_storeSeckillCreate', - 'marketing_storeIntegralCreate', - ].includes(to.name) - ) { - let route = to.matched[1].path.split(':')[0]; - this.$store.state.menus.oneLvRoutes.map((e) => { - if (route.indexOf(e.path) != -1) { - to.meta.title = `${e.title} ${to.params.id ? 'ID:' + to.params.id : ''}`; - } - }); - } - }, - }, }); diff --git a/template/admin/src/pages/app/wechat/newsCategory/save.vue b/template/admin/src/pages/app/wechat/newsCategory/save.vue index ae5d5387b..ed707853f 100644 --- a/template/admin/src/pages/app/wechat/newsCategory/save.vue +++ b/template/admin/src/pages/app/wechat/newsCategory/save.vue @@ -345,7 +345,7 @@ export default { diff --git a/template/admin/src/pages/finance/billingRecords/index.vue b/template/admin/src/pages/finance/billingRecords/index.vue index 9dd288a3c..5a0f1d90d 100644 --- a/template/admin/src/pages/finance/billingRecords/index.vue +++ b/template/admin/src/pages/finance/billingRecords/index.vue @@ -228,7 +228,7 @@ export default { height: 54px !important; line-height: 54px !important; } -::v-deep.ivu-card-body { +::v-deep .ivu-card-body { padding: 0; } diff --git a/template/admin/src/pages/finance/commission/index.vue b/template/admin/src/pages/finance/commission/index.vue index 663507e5e..edf066880 100644 --- a/template/admin/src/pages/finance/commission/index.vue +++ b/template/admin/src/pages/finance/commission/index.vue @@ -102,8 +102,8 @@ export default { tabList: [], formValidate: { nickname: '', - price_max: '', - price_min: '', + price_max: undefined, + price_min: undefined, excel: 0, page: 1, // 当前页 limit: 20, // 每页显示条数 diff --git a/template/admin/src/pages/finance/userExtract/index.vue b/template/admin/src/pages/finance/userExtract/index.vue index ec23c4ecb..669f8c192 100644 --- a/template/admin/src/pages/finance/userExtract/index.vue +++ b/template/admin/src/pages/finance/userExtract/index.vue @@ -156,7 +156,7 @@ -