Commit d94870db by ym

init

0 parents
Showing 93 changed files with 7312 additions and 0 deletions
NODE_ENV='development'
# must start with VUE_APP_
VUE_APP_ENV = 'development'
VUE_APP_PORT = 6654
NODE_ENV='production'
# must start with VUE_APP_
VUE_APP_ENV = 'production'
\ No newline at end of file
{
"root": true,
"env": {
"node": true
},
"extends": ["plugin:vue/essential", "@vue/prettier"],
"rules": {
"no-console": "off",
"no-unused-vars":"off",
"prettier.endOfLine": "crlf",
"endOfLine":"auto"
},
"parserOptions": {
"parser": "babel-eslint"
}
}
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
{
"printWidth": 800,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"semi": false,
"wrap_line_length": 820,
"wrap_attributes": "auto",
"proseWrap": "always",
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "ignore",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"jsxBracketSameLine": true,
"files.insertFinalNewline": true,
"useTabs": false,
"eslintIntegration": true,
"overrides": [
{
"files": ".prettierrc",
"options": {
"parser": "json"
}
}
],
"endOfLine": "auto"
}
# subapp-blog
微前端博客子应用
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
};
\ No newline at end of file
/* Element Chalk Variables */
// Special comment for theme configurator
// type|skipAutoTranslation|Category|Order
// skipAutoTranslation 1
/* Transition
-------------------------- */
$--all-transition: all .3s cubic-bezier(.645,.045,.355,1) !default;
$--fade-transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) !default;
$--fade-linear-transition: opacity 200ms linear !default;
$--md-fade-transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) !default;
$--border-transition-base: border-color .2s cubic-bezier(.645,.045,.355,1) !default;
$--color-transition-base: color .2s cubic-bezier(.645,.045,.355,1) !default;
/* Color
-------------------------- */
/// color|1|Brand Color|0
$--color-primary: #5850FF !default;
/// color|1|Background Color|4
$--color-white: #FFFFFF !default;
/// color|1|Background Color|4
$--color-black: #000000 !default;
$--color-primary-light-1: mix($--color-white, $--color-primary, 10%) !default; /* 53a8ff */
$--color-primary-light-2: mix($--color-white, $--color-primary, 20%) !default; /* 66b1ff */
$--color-primary-light-3: mix($--color-white, $--color-primary, 30%) !default; /* 79bbff */
$--color-primary-light-4: mix($--color-white, $--color-primary, 40%) !default; /* 8cc5ff */
$--color-primary-light-5: mix($--color-white, $--color-primary, 50%) !default; /* a0cfff */
$--color-primary-light-6: mix($--color-white, $--color-primary, 60%) !default; /* b3d8ff */
$--color-primary-light-7: mix($--color-white, $--color-primary, 70%) !default; /* c6e2ff */
$--color-primary-light-8: mix($--color-white, $--color-primary, 80%) !default; /* d9ecff */
$--color-primary-light-9: mix($--color-white, $--color-primary, 90%) !default; /* ecf5ff */
/// color|1|Functional Color|1
$--color-success: #67C23A !default;
/// color|1|Functional Color|1
$--color-warning: #E6A23C !default;
/// color|1|Functional Color|1
$--color-danger: #F56C6C !default;
/// color|1|Functional Color|1
$--color-info: #909399 !default;
$--color-success-light: mix($--color-white, $--color-success, 80%) !default;
$--color-warning-light: mix($--color-white, $--color-warning, 80%) !default;
$--color-danger-light: mix($--color-white, $--color-danger, 80%) !default;
$--color-info-light: mix($--color-white, $--color-info, 80%) !default;
$--color-success-lighter: mix($--color-white, $--color-success, 90%) !default;
$--color-warning-lighter: mix($--color-white, $--color-warning, 90%) !default;
$--color-danger-lighter: mix($--color-white, $--color-danger, 90%) !default;
$--color-info-lighter: mix($--color-white, $--color-info, 90%) !default;
/// color|1|Font Color|2
$--color-text-primary: #303133 !default;
/// color|1|Font Color|2
$--color-text-regular: #606266 !default;
/// color|1|Font Color|2
$--color-text-secondary: #909399 !default;
/// color|1|Font Color|2
$--color-text-placeholder: #C0C4CC !default;
/// color|1|Border Color|3
$--border-color-base: #DCDFE6 !default;
/// color|1|Border Color|3
$--border-color-light: #E4E7ED !default;
/// color|1|Border Color|3
$--border-color-lighter: #EBEEF5 !default;
/// color|1|Border Color|3
$--border-color-extra-light: #F2F6FC !default;
// Background
/// color|1|Background Color|4
$--background-color-base: #F5F7FA !default;
/* Link
-------------------------- */
$--link-color: $--color-primary-light-2 !default;
$--link-hover-color: $--color-primary !default;
/* Border
-------------------------- */
$--border-width-base: 1px !default;
$--border-style-base: solid !default;
$--border-color-hover: $--color-text-placeholder !default;
$--border-base: $--border-width-base $--border-style-base $--border-color-base !default;
/// borderRadius|1|Radius|0
$--border-radius-base: 4px !default;
/// borderRadius|1|Radius|0
$--border-radius-small: 2px !default;
/// borderRadius|1|Radius|0
$--border-radius-circle: 100% !default;
/// borderRadius|1|Radius|0
$--border-radius-zero: 0 !default;
// Box-shadow
/// boxShadow|1|Shadow|1
$--box-shadow-base: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04) !default;
// boxShadow|1|Shadow|1
$--box-shadow-dark: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .12) !default;
/// boxShadow|1|Shadow|1
$--box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1) !default;
/* Fill
-------------------------- */
$--fill-base: $--color-white !default;
/* Typography
-------------------------- */
$--font-path: 'fonts' !default;
$--font-display: 'auto' !default;
/// fontSize|1|Font Size|0
$--font-size-extra-large: 20px !default;
/// fontSize|1|Font Size|0
$--font-size-large: 18px !default;
/// fontSize|1|Font Size|0
$--font-size-medium: 16px !default;
/// fontSize|1|Font Size|0
$--font-size-base: 14px !default;
/// fontSize|1|Font Size|0
$--font-size-small: 13px !default;
/// fontSize|1|Font Size|0
$--font-size-extra-small: 12px !default;
/// fontWeight|1|Font Weight|1
$--font-weight-primary: 500 !default;
/// fontWeight|1|Font Weight|1
$--font-weight-secondary: 100 !default;
/// fontLineHeight|1|Line Height|2
$--font-line-height-primary: 24px !default;
/// fontLineHeight|1|Line Height|2
$--font-line-height-secondary: 16px !default;
$--font-color-disabled-base: #bbb !default;
/* Size
-------------------------- */
$--size-base: 14px !default;
/* z-index
-------------------------- */
$--index-normal: 1 !default;
$--index-top: 1000 !default;
$--index-popper: 2000 !default;
/* Disable base
-------------------------- */
$--disabled-fill-base: $--background-color-base !default;
$--disabled-color-base: $--color-text-placeholder !default;
$--disabled-border-base: $--border-color-light !default;
/* Icon
-------------------------- */
$--icon-color: #666 !default;
$--icon-color-base: $--color-info !default;
/* Checkbox
-------------------------- */
/// fontSize||Font|1
$--checkbox-font-size: 14px !default;
/// fontWeight||Font|1
$--checkbox-font-weight: $--font-weight-primary !default;
/// color||Color|0
$--checkbox-font-color: $--color-text-regular !default;
$--checkbox-input-height: 14px !default;
$--checkbox-input-width: 14px !default;
/// borderRadius||Border|2
$--checkbox-border-radius: $--border-radius-small !default;
/// color||Color|0
$--checkbox-background-color: $--color-white !default;
$--checkbox-input-border: $--border-base !default;
/// color||Color|0
$--checkbox-disabled-border-color: $--border-color-base !default;
$--checkbox-disabled-input-fill: #edf2fc !default;
$--checkbox-disabled-icon-color: $--color-text-placeholder !default;
$--checkbox-disabled-checked-input-fill: $--border-color-extra-light !default;
$--checkbox-disabled-checked-input-border-color: $--border-color-base !default;
$--checkbox-disabled-checked-icon-color: $--color-text-placeholder !default;
/// color||Color|0
$--checkbox-checked-font-color: $--color-primary !default;
$--checkbox-checked-input-border-color: $--color-primary !default;
/// color||Color|0
$--checkbox-checked-background-color: $--color-primary !default;
$--checkbox-checked-icon-color: $--fill-base !default;
$--checkbox-input-border-color-hover: $--color-primary !default;
/// height||Other|4
$--checkbox-bordered-height: 40px !default;
/// padding||Spacing|3
$--checkbox-bordered-padding: 9px 20px 9px 10px !default;
/// padding||Spacing|3
$--checkbox-bordered-medium-padding: 7px 20px 7px 10px !default;
/// padding||Spacing|3
$--checkbox-bordered-small-padding: 5px 15px 5px 10px !default;
/// padding||Spacing|3
$--checkbox-bordered-mini-padding: 3px 15px 3px 10px !default;
$--checkbox-bordered-medium-input-height: 14px !default;
$--checkbox-bordered-medium-input-width: 14px !default;
/// height||Other|4
$--checkbox-bordered-medium-height: 36px !default;
$--checkbox-bordered-small-input-height: 12px !default;
$--checkbox-bordered-small-input-width: 12px !default;
/// height||Other|4
$--checkbox-bordered-small-height: 32px !default;
$--checkbox-bordered-mini-input-height: 12px !default;
$--checkbox-bordered-mini-input-width: 12px !default;
/// height||Other|4
$--checkbox-bordered-mini-height: 28px !default;
/// color||Color|0
$--checkbox-button-checked-background-color: $--color-primary !default;
/// color||Color|0
$--checkbox-button-checked-font-color: $--color-white !default;
/// color||Color|0
$--checkbox-button-checked-border-color: $--color-primary !default;
/* Radio
-------------------------- */
/// fontSize||Font|1
$--radio-font-size: $--font-size-base !default;
/// fontWeight||Font|1
$--radio-font-weight: $--font-weight-primary !default;
/// color||Color|0
$--radio-font-color: $--color-text-regular !default;
$--radio-input-height: 14px !default;
$--radio-input-width: 14px !default;
/// borderRadius||Border|2
$--radio-input-border-radius: $--border-radius-circle !default;
/// color||Color|0
$--radio-input-background-color: $--color-white !default;
$--radio-input-border: $--border-base !default;
/// color||Color|0
$--radio-input-border-color: $--border-color-base !default;
/// color||Color|0
$--radio-icon-color: $--color-white !default;
$--radio-disabled-input-border-color: $--disabled-border-base !default;
$--radio-disabled-input-fill: $--disabled-fill-base !default;
$--radio-disabled-icon-color: $--disabled-fill-base !default;
$--radio-disabled-checked-input-border-color: $--disabled-border-base !default;
$--radio-disabled-checked-input-fill: $--disabled-fill-base !default;
$--radio-disabled-checked-icon-color: $--color-text-placeholder !default;
/// color||Color|0
$--radio-checked-font-color: $--color-primary !default;
/// color||Color|0
$--radio-checked-input-border-color: $--color-primary !default;
/// color||Color|0
$--radio-checked-input-background-color: $--color-white !default;
/// color||Color|0
$--radio-checked-icon-color: $--color-primary !default;
$--radio-input-border-color-hover: $--color-primary !default;
$--radio-bordered-height: 40px !default;
$--radio-bordered-padding: 12px 20px 0 10px !default;
$--radio-bordered-medium-padding: 10px 20px 0 10px !default;
$--radio-bordered-small-padding: 8px 15px 0 10px !default;
$--radio-bordered-mini-padding: 6px 15px 0 10px !default;
$--radio-bordered-medium-input-height: 14px !default;
$--radio-bordered-medium-input-width: 14px !default;
$--radio-bordered-medium-height: 36px !default;
$--radio-bordered-small-input-height: 12px !default;
$--radio-bordered-small-input-width: 12px !default;
$--radio-bordered-small-height: 32px !default;
$--radio-bordered-mini-input-height: 12px !default;
$--radio-bordered-mini-input-width: 12px !default;
$--radio-bordered-mini-height: 28px !default;
/// fontSize||Font|1
$--radio-button-font-size: $--font-size-base !default;
/// color||Color|0
$--radio-button-checked-background-color: $--color-primary !default;
/// color||Color|0
$--radio-button-checked-font-color: $--color-white !default;
/// color||Color|0
$--radio-button-checked-border-color: $--color-primary !default;
$--radio-button-disabled-checked-fill: $--border-color-extra-light !default;
/* Select
-------------------------- */
$--select-border-color-hover: $--border-color-hover !default;
$--select-disabled-border: $--disabled-border-base !default;
/// fontSize||Font|1
$--select-font-size: $--font-size-base !default;
$--select-close-hover-color: $--color-text-secondary !default;
$--select-input-color: $--color-text-placeholder !default;
$--select-multiple-input-color: #666 !default;
/// color||Color|0
$--select-input-focus-border-color: $--color-primary !default;
/// fontSize||Font|1
$--select-input-font-size: 14px !default;
$--select-option-color: $--color-text-regular !default;
$--select-option-disabled-color: $--color-text-placeholder !default;
$--select-option-disabled-background: $--color-white !default;
/// height||Other|4
$--select-option-height: 34px !default;
$--select-option-hover-background: $--background-color-base !default;
/// color||Color|0
$--select-option-selected-font-color: $--color-primary !default;
$--select-option-selected-hover: $--background-color-base !default;
$--select-group-color: $--color-info !default;
$--select-group-height: 30px !default;
$--select-group-font-size: 12px !default;
$--select-dropdown-background: $--color-white !default;
$--select-dropdown-shadow: $--box-shadow-light !default;
$--select-dropdown-empty-color: #999 !default;
/// height||Other|4
$--select-dropdown-max-height: 274px !default;
$--select-dropdown-padding: 6px 0 !default;
$--select-dropdown-empty-padding: 10px 0 !default;
$--select-dropdown-border: solid 1px $--border-color-light !default;
/* Alert
-------------------------- */
$--alert-padding: 8px 16px !default;
/// borderRadius||Border|2
$--alert-border-radius: $--border-radius-base !default;
/// fontSize||Font|1
$--alert-title-font-size: 13px !default;
/// fontSize||Font|1
$--alert-description-font-size: 12px !default;
/// fontSize||Font|1
$--alert-close-font-size: 12px !default;
/// fontSize||Font|1
$--alert-close-customed-font-size: 13px !default;
$--alert-success-color: $--color-success-lighter !default;
$--alert-info-color: $--color-info-lighter !default;
$--alert-warning-color: $--color-warning-lighter !default;
$--alert-danger-color: $--color-danger-lighter !default;
/// height||Other|4
$--alert-icon-size: 16px !default;
/// height||Other|4
$--alert-icon-large-size: 28px !default;
/* MessageBox
-------------------------- */
/// color||Color|0
$--messagebox-title-color: $--color-text-primary !default;
$--msgbox-width: 420px !default;
$--msgbox-border-radius: 4px !default;
/// fontSize||Font|1
$--messagebox-font-size: $--font-size-large !default;
/// fontSize||Font|1
$--messagebox-content-font-size: $--font-size-base !default;
/// color||Color|0
$--messagebox-content-color: $--color-text-regular !default;
/// fontSize||Font|1
$--messagebox-error-font-size: 12px !default;
$--msgbox-padding-primary: 15px !default;
/// color||Color|0
$--messagebox-success-color: $--color-success !default;
/// color||Color|0
$--messagebox-info-color: $--color-info !default;
/// color||Color|0
$--messagebox-warning-color: $--color-warning !default;
/// color||Color|0
$--messagebox-danger-color: $--color-danger !default;
/* Message
-------------------------- */
$--message-shadow: $--box-shadow-base !default;
$--message-min-width: 380px !default;
$--message-background-color: #edf2fc !default;
$--message-padding: 15px 15px 15px 20px !default;
/// color||Color|0
$--message-close-icon-color: $--color-text-placeholder !default;
/// height||Other|4
$--message-close-size: 16px !default;
/// color||Color|0
$--message-close-hover-color: $--color-text-secondary !default;
/// color||Color|0
$--message-success-font-color: $--color-success !default;
/// color||Color|0
$--message-info-font-color: $--color-info !default;
/// color||Color|0
$--message-warning-font-color: $--color-warning !default;
/// color||Color|0
$--message-danger-font-color: $--color-danger !default;
/* Notification
-------------------------- */
$--notification-width: 330px !default;
/// padding||Spacing|3
$--notification-padding: 14px 26px 14px 13px !default;
$--notification-radius: 8px !default;
$--notification-shadow: $--box-shadow-light !default;
/// color||Color|0
$--notification-border-color: $--border-color-lighter !default;
$--notification-icon-size: 24px !default;
$--notification-close-font-size: $--message-close-size !default;
$--notification-group-margin-left: 13px !default;
$--notification-group-margin-right: 8px !default;
/// fontSize||Font|1
$--notification-content-font-size: $--font-size-base !default;
/// color||Color|0
$--notification-content-color: $--color-text-regular !default;
/// fontSize||Font|1
$--notification-title-font-size: 16px !default;
/// color||Color|0
$--notification-title-color: $--color-text-primary !default;
/// color||Color|0
$--notification-close-color: $--color-text-secondary !default;
/// color||Color|0
$--notification-close-hover-color: $--color-text-regular !default;
/// color||Color|0
$--notification-success-icon-color: $--color-success !default;
/// color||Color|0
$--notification-info-icon-color: $--color-info !default;
/// color||Color|0
$--notification-warning-icon-color: $--color-warning !default;
/// color||Color|0
$--notification-danger-icon-color: $--color-danger !default;
/* Input
-------------------------- */
$--input-font-size: $--font-size-base !default;
/// color||Color|0
$--input-font-color: $--color-text-regular !default;
/// height||Other|4
$--input-width: 140px !default;
/// height||Other|4
$--input-height: 40px !default;
$--input-border: $--border-base !default;
$--input-border-color: $--border-color-base !default;
/// borderRadius||Border|2
$--input-border-radius: $--border-radius-base !default;
$--input-border-color-hover: $--border-color-hover !default;
/// color||Color|0
$--input-background-color: $--color-white !default;
$--input-fill-disabled: $--disabled-fill-base !default;
$--input-color-disabled: $--font-color-disabled-base !default;
/// color||Color|0
$--input-icon-color: $--color-text-placeholder !default;
/// color||Color|0
$--input-placeholder-color: $--color-text-placeholder !default;
$--input-max-width: 314px !default;
$--input-hover-border: $--border-color-hover !default;
$--input-clear-hover-color: $--color-text-secondary !default;
$--input-focus-border: $--color-primary !default;
$--input-focus-fill: $--color-white !default;
$--input-disabled-fill: $--disabled-fill-base !default;
$--input-disabled-border: $--disabled-border-base !default;
$--input-disabled-color: $--disabled-color-base !default;
$--input-disabled-placeholder-color: $--color-text-placeholder !default;
/// fontSize||Font|1
$--input-medium-font-size: 14px !default;
/// height||Other|4
$--input-medium-height: 36px !default;
/// fontSize||Font|1
$--input-small-font-size: 13px !default;
/// height||Other|4
$--input-small-height: 32px !default;
/// fontSize||Font|1
$--input-mini-font-size: 12px !default;
/// height||Other|4
$--input-mini-height: 28px !default;
/* Cascader
-------------------------- */
/// color||Color|0
$--cascader-menu-font-color: $--color-text-regular !default;
/// color||Color|0
$--cascader-menu-selected-font-color: $--color-primary !default;
$--cascader-menu-fill: $--fill-base !default;
$--cascader-menu-font-size: $--font-size-base !default;
$--cascader-menu-radius: $--border-radius-base !default;
$--cascader-menu-border: solid 1px $--border-color-light !default;
$--cascader-menu-shadow: $--box-shadow-light !default;
$--cascader-node-background-hover: $--background-color-base !default;
$--cascader-node-color-disabled:$--color-text-placeholder !default;
$--cascader-color-empty:$--color-text-placeholder !default;
$--cascader-tag-background: #f0f2f5;
/* Group
-------------------------- */
$--group-option-flex: 0 0 (1/5) * 100% !default;
$--group-option-offset-bottom: 12px !default;
$--group-option-fill-hover: rgba($--color-black, 0.06) !default;
$--group-title-color: $--color-black !default;
$--group-title-font-size: $--font-size-base !default;
$--group-title-width: 66px !default;
/* Tab
-------------------------- */
$--tab-font-size: $--font-size-base !default;
$--tab-border-line: 1px solid #e4e4e4 !default;
$--tab-header-color-active: $--color-text-secondary !default;
$--tab-header-color-hover: $--color-text-regular !default;
$--tab-header-color: $--color-text-regular !default;
$--tab-header-fill-active: rgba($--color-black, 0.06) !default;
$--tab-header-fill-hover: rgba($--color-black, 0.06) !default;
$--tab-vertical-header-width: 90px !default;
$--tab-vertical-header-count-color: $--color-white !default;
$--tab-vertical-header-count-fill: $--color-text-secondary !default;
/* Button
-------------------------- */
/// fontSize||Font|1
$--button-font-size: $--font-size-base !default;
/// fontWeight||Font|1
$--button-font-weight: $--font-weight-primary !default;
/// borderRadius||Border|2
$--button-border-radius: $--border-radius-base !default;
/// padding||Spacing|3
$--button-padding-vertical: 12px !default;
/// padding||Spacing|3
$--button-padding-horizontal: 20px !default;
/// fontSize||Font|1
$--button-medium-font-size: $--font-size-base !default;
/// borderRadius||Border|2
$--button-medium-border-radius: $--border-radius-base !default;
/// padding||Spacing|3
$--button-medium-padding-vertical: 10px !default;
/// padding||Spacing|3
$--button-medium-padding-horizontal: 20px !default;
/// fontSize||Font|1
$--button-small-font-size: 12px !default;
$--button-small-border-radius: #{$--border-radius-base - 1} !default;
/// padding||Spacing|3
$--button-small-padding-vertical: 9px !default;
/// padding||Spacing|3
$--button-small-padding-horizontal: 15px !default;
/// fontSize||Font|1
$--button-mini-font-size: 12px !default;
$--button-mini-border-radius: #{$--border-radius-base - 1} !default;
/// padding||Spacing|3
$--button-mini-padding-vertical: 7px !default;
/// padding||Spacing|3
$--button-mini-padding-horizontal: 15px !default;
/// color||Color|0
$--button-default-font-color: $--color-text-regular !default;
/// color||Color|0
$--button-default-background-color: $--color-white !default;
/// color||Color|0
$--button-default-border-color: $--border-color-base !default;
/// color||Color|0
$--button-disabled-font-color: $--color-text-placeholder !default;
/// color||Color|0
$--button-disabled-background-color: $--color-white !default;
/// color||Color|0
$--button-disabled-border-color: $--border-color-lighter !default;
/// color||Color|0
$--button-primary-border-color: $--color-primary !default;
/// color||Color|0
$--button-primary-font-color: $--color-white !default;
/// color||Color|0
$--button-primary-background-color: $--color-primary !default;
/// color||Color|0
$--button-success-border-color: $--color-success !default;
/// color||Color|0
$--button-success-font-color: $--color-white !default;
/// color||Color|0
$--button-success-background-color: $--color-success !default;
/// color||Color|0
$--button-warning-border-color: $--color-warning !default;
/// color||Color|0
$--button-warning-font-color: $--color-white !default;
/// color||Color|0
$--button-warning-background-color: $--color-warning !default;
/// color||Color|0
$--button-danger-border-color: $--color-danger !default;
/// color||Color|0
$--button-danger-font-color: $--color-white !default;
/// color||Color|0
$--button-danger-background-color: $--color-danger !default;
/// color||Color|0
$--button-info-border-color: $--color-info !default;
/// color||Color|0
$--button-info-font-color: $--color-white !default;
/// color||Color|0
$--button-info-background-color: $--color-info !default;
$--button-hover-tint-percent: 20% !default;
$--button-active-shade-percent: 10% !default;
/* cascader
-------------------------- */
$--cascader-height: 200px !default;
/* Switch
-------------------------- */
/// color||Color|0
$--switch-on-color: $--color-primary !default;
/// color||Color|0
$--switch-off-color: $--border-color-base !default;
/// fontSize||Font|1
$--switch-font-size: $--font-size-base !default;
$--switch-core-border-radius: 10px !default;
// height||Other|4 TODO: width 代码写死的40px 所以下面这三个属性都没意义
$--switch-width: 40px !default;
// height||Other|4
$--switch-height: 20px !default;
// height||Other|4
$--switch-button-size: 16px !default;
/* Dialog
-------------------------- */
$--dialog-background-color: $--color-white !default;
$--dialog-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !default;
/// fontSize||Font|1
$--dialog-title-font-size: $--font-size-large !default;
/// fontSize||Font|1
$--dialog-content-font-size: 14px !default;
/// fontLineHeight||LineHeight|2
$--dialog-font-line-height: $--font-line-height-primary !default;
/// padding||Spacing|3
$--dialog-padding-primary: 20px !default;
/* Table
-------------------------- */
/// color||Color|0
$--table-border-color: $--border-color-lighter !default;
$--table-border: 1px solid $--table-border-color !default;
/// color||Color|0
$--table-font-color: $--color-text-regular !default;
/// color||Color|0
$--table-header-font-color: $--color-text-secondary !default;
/// color||Color|0
$--table-row-hover-background-color: $--background-color-base !default;
$--table-current-row-background-color: $--color-primary-light-9 !default;
/// color||Color|0
$--table-header-background-color: $--color-white !default;
$--table-fixed-box-shadow: 0 0 10px rgba(0, 0, 0, .12) !default;
/* Pagination
-------------------------- */
/// fontSize||Font|1
$--pagination-font-size: 13px !default;
/// color||Color|0
$--pagination-background-color: $--color-white !default;
/// color||Color|0
$--pagination-font-color: $--color-text-primary !default;
$--pagination-border-radius: 3px !default;
/// color||Color|0
$--pagination-button-color: $--color-text-primary !default;
/// height||Other|4
$--pagination-button-width: 35.5px !default;
/// height||Other|4
$--pagination-button-height: 28px !default;
/// color||Color|0
$--pagination-button-disabled-color: $--color-text-placeholder !default;
/// color||Color|0
$--pagination-button-disabled-background-color: $--color-white !default;
/// color||Color|0
$--pagination-hover-color: $--color-primary !default;
/* Popup
-------------------------- */
/// color||Color|0
$--popup-modal-background-color: $--color-black !default;
/// opacity||Other|1
$--popup-modal-opacity: 0.5 !default;
/* Popover
-------------------------- */
/// color||Color|0
$--popover-background-color: $--color-white !default;
/// fontSize||Font|1
$--popover-font-size: $--font-size-base !default;
/// color||Color|0
$--popover-border-color: $--border-color-lighter !default;
$--popover-arrow-size: 6px !default;
/// padding||Spacing|3
$--popover-padding: 12px !default;
$--popover-padding-large: 18px 20px !default;
/// fontSize||Font|1
$--popover-title-font-size: 16px !default;
/// color||Color|0
$--popover-title-font-color: $--color-text-primary !default;
/* Tooltip
-------------------------- */
/// color|1|Color|0
$--tooltip-fill: $--color-text-primary !default;
/// color|1|Color|0
$--tooltip-color: $--color-white !default;
/// fontSize||Font|1
$--tooltip-font-size: 12px !default;
/// color||Color|0
$--tooltip-border-color: $--color-text-primary !default;
$--tooltip-arrow-size: 6px !default;
/// padding||Spacing|3
$--tooltip-padding: 10px !default;
/* Tag
-------------------------- */
/// color||Color|0
$--tag-info-color: $--color-info !default;
/// color||Color|0
$--tag-primary-color: $--color-primary !default;
/// color||Color|0
$--tag-success-color: $--color-success !default;
/// color||Color|0
$--tag-warning-color: $--color-warning !default;
/// color||Color|0
$--tag-danger-color: $--color-danger !default;
/// fontSize||Font|1
$--tag-font-size: 12px !default;
$--tag-border-radius: 4px !default;
$--tag-padding: 0 10px !default;
/* Tree
-------------------------- */
/// color||Color|0
$--tree-node-hover-background-color: $--background-color-base !default;
/// color||Color|0
$--tree-font-color: $--color-text-regular !default;
/// color||Color|0
$--tree-expand-icon-color: $--color-text-placeholder !default;
/* Dropdown
-------------------------- */
$--dropdown-menu-box-shadow: $--box-shadow-light !default;
$--dropdown-menuItem-hover-fill: $--color-primary-light-9 !default;
$--dropdown-menuItem-hover-color: $--link-color !default;
/* Badge
-------------------------- */
/// color||Color|0
$--badge-background-color: $--color-danger !default;
$--badge-radius: 10px !default;
/// fontSize||Font|1
$--badge-font-size: 12px !default;
/// padding||Spacing|3
$--badge-padding: 6px !default;
/// height||Other|4
$--badge-size: 18px !default;
/* Card
--------------------------*/
/// color||Color|0
$--card-border-color: $--border-color-lighter !default;
$--card-border-radius: 4px !default;
/// padding||Spacing|3
$--card-padding: 20px !default;
/* Slider
--------------------------*/
/// color||Color|0
$--slider-main-background-color: $--color-primary !default;
/// color||Color|0
$--slider-runway-background-color: $--border-color-light !default;
$--slider-button-hover-color: mix($--color-primary, black, 97%) !default;
$--slider-stop-background-color: $--color-white !default;
$--slider-disable-color: $--color-text-placeholder !default;
$--slider-margin: 16px 0 !default;
$--slider-border-radius: 3px !default;
/// height|1|Other|4
$--slider-height: 6px !default;
/// height||Other|4
$--slider-button-size: 16px !default;
$--slider-button-wrapper-size: 36px !default;
$--slider-button-wrapper-offset: -15px !default;
/* Steps
--------------------------*/
$--steps-border-color: $--disabled-border-base !default;
$--steps-border-radius: 4px !default;
$--steps-padding: 20px !default;
/* Menu
--------------------------*/
/// fontSize||Font|1
$--menu-item-font-size: $--font-size-base !default;
/// color||Color|0
$--menu-item-font-color: $--color-text-primary !default;
/// color||Color|0
$--menu-background-color: $--color-white !default;
$--menu-item-hover-fill: $--color-primary-light-9 !default;
/* Rate
--------------------------*/
$--rate-height: 20px !default;
/// fontSize||Font|1
$--rate-font-size: $--font-size-base !default;
/// height||Other|3
$--rate-icon-size: 18px !default;
/// margin||Spacing|2
$--rate-icon-margin: 6px !default;
$--rate-icon-color: $--color-text-placeholder !default;
/* DatePicker
--------------------------*/
$--datepicker-font-color: $--color-text-regular !default;
/// color|1|Color|0
$--datepicker-off-font-color: $--color-text-placeholder !default;
/// color||Color|0
$--datepicker-header-font-color: $--color-text-regular !default;
$--datepicker-icon-color: $--color-text-primary !default;
$--datepicker-border-color: $--disabled-border-base !default;
$--datepicker-inner-border-color: #e4e4e4 !default;
/// color||Color|0
$--datepicker-inrange-background-color: $--border-color-extra-light !default;
/// color||Color|0
$--datepicker-inrange-hover-background-color: $--border-color-extra-light !default;
/// color||Color|0
$--datepicker-active-color: $--color-primary !default;
/// color||Color|0
$--datepicker-hover-font-color: $--color-primary !default;
$--datepicker-cell-hover-color: #fff !default;
/* Loading
--------------------------*/
/// height||Other|4
$--loading-spinner-size: 42px !default;
/// height||Other|4
$--loading-fullscreen-spinner-size: 50px !default;
/* Scrollbar
--------------------------*/
$--scrollbar-background-color: rgba($--color-text-secondary, .3) !default;
$--scrollbar-hover-background-color: rgba($--color-text-secondary, .5) !default;
/* Carousel
--------------------------*/
/// fontSize||Font|1
$--carousel-arrow-font-size: 12px !default;
$--carousel-arrow-size: 36px !default;
$--carousel-arrow-background: rgba(31, 45, 61, 0.11) !default;
$--carousel-arrow-hover-background: rgba(31, 45, 61, 0.23) !default;
/// width||Other|4
$--carousel-indicator-width: 30px !default;
/// height||Other|4
$--carousel-indicator-height: 2px !default;
$--carousel-indicator-padding-horizontal: 4px !default;
$--carousel-indicator-padding-vertical: 12px !default;
$--carousel-indicator-out-color: $--border-color-hover !default;
/* Collapse
--------------------------*/
/// color||Color|0
$--collapse-border-color: $--border-color-lighter !default;
/// height||Other|4
$--collapse-header-height: 48px !default;
/// color||Color|0
$--collapse-header-background-color: $--color-white !default;
/// color||Color|0
$--collapse-header-font-color: $--color-text-primary !default;
/// fontSize||Font|1
$--collapse-header-font-size: 13px !default;
/// color||Color|0
$--collapse-content-background-color: $--color-white !default;
/// fontSize||Font|1
$--collapse-content-font-size: 13px !default;
/// color||Color|0
$--collapse-content-font-color: $--color-text-primary !default;
/* Transfer
--------------------------*/
$--transfer-border-color: $--border-color-lighter !default;
$--transfer-border-radius: $--border-radius-base !default;
/// height||Other|4
$--transfer-panel-width: 200px !default;
/// height||Other|4
$--transfer-panel-header-height: 40px !default;
/// color||Color|0
$--transfer-panel-header-background-color: $--background-color-base !default;
/// height||Other|4
$--transfer-panel-footer-height: 40px !default;
/// height||Other|4
$--transfer-panel-body-height: 246px !default;
/// height||Other|4
$--transfer-item-height: 30px !default;
/// height||Other|4
$--transfer-filter-height: 32px !default;
/* Header
--------------------------*/
$--header-padding: 0 20px !default;
/* Footer
--------------------------*/
$--footer-padding: 0 20px !default;
/* Main
--------------------------*/
$--main-padding: 20px !default;
/* Timeline
--------------------------*/
$--timeline-node-size-normal: 12px !default;
$--timeline-node-size-large: 14px !default;
$--timeline-node-color: $--border-color-light !default;
/* Backtop
--------------------------*/
/// color||Color|0
$--backtop-background-color: $--color-white !default;
/// color||Color|0
$--backtop-font-color: $--color-primary !default;
/// color||Color|0
$--backtop-hover-background-color: $--border-color-extra-light !default;
/* Link
--------------------------*/
/// fontSize||Font|1
$--link-font-size: $--font-size-base !default;
/// fontWeight||Font|1
$--link-font-weight: $--font-weight-primary !default;
/// color||Color|0
$--link-default-font-color: $--color-text-regular !default;
/// color||Color|0
$--link-default-active-color: $--color-primary !default;
/// color||Color|0
$--link-disabled-font-color: $--color-text-placeholder !default;
/// color||Color|0
$--link-primary-font-color: $--color-primary !default;
/// color||Color|0
$--link-success-font-color: $--color-success !default;
/// color||Color|0
$--link-warning-font-color: $--color-warning !default;
/// color||Color|0
$--link-danger-font-color: $--color-danger !default;
/// color||Color|0
$--link-info-font-color: $--color-info !default;
/* Calendar
--------------------------*/
/// border||Other|4
$--calendar-border: $--table-border !default;
/// color||Other|4
$--calendar-selected-background-color: #F2F8FE !default;
$--calendar-cell-width: 85px !default;
/* Form
-------------------------- */
/// fontSize||Font|1
$--form-label-font-size: $--font-size-base !default;
/* Avatar
--------------------------*/
/// color||Color|0
$--avatar-font-color: #fff !default;
/// color||Color|0
$--avatar-background-color: #C0C4CC !default;
/// fontSize||Font Size|1
$--avatar-text-font-size: 14px !default;
/// fontSize||Font Size|1
$--avatar-icon-font-size: 18px !default;
/// borderRadius||Border|2
$--avatar-border-radius: $--border-radius-base !default;
/// size|1|Avatar Size|3
$--avatar-large-size: 40px !default;
/// size|1|Avatar Size|3
$--avatar-medium-size: 36px !default;
/// size|1|Avatar Size|3
$--avatar-small-size: 28px !default;
/* Empty
-------------------------- */
$--empty-padding: 40px 0 !default;
$--empty-image-width: 160px !default;
$--empty-description-margin-top: 20px !default;
$--empty-bottom-margin-top: 20px !default;
/* Descriptions
-------------------------- */
$--descriptions-header-margin-bottom: 20px !default;
$--descriptions-title-font-size: 16px !default;
$--descriptions-table-border: 1px solid $--border-color-lighter !default;
$--descriptions-item-bordered-label-background: #fafafa !default;
/* Skeleton
--------------------------*/
$--skeleton-color: #f2f2f2 !default;
$--skeleton-to-color: #e6e6e6 !default;
/* Svg
--------------- */
$--svg-monochrome-grey: #DCDDE0 !default;
/* Result
-------------------------- */
$--result-padding: 40px 30px !default;
$--result-icon-font-size: 64px !default;
$--result-title-font-size: 20px !default;
$--result-title-margin-top: 20px !default;
$--result-subtitle-margin-top: 10px !default;
$--result-extra-margin-top: 30px !default;
$--result-info-color: $--color-info !default;
$--result-success-color: $--color-success !default;
$--result-warning-color: $--color-warning !default;
$--result-danger-color: $--color-danger !default;
/* Break-point
--------------------------*/
$--sm: 768px !default;
$--md: 992px !default;
$--lg: 1200px !default;
$--xl: 1920px !default;
$--breakpoints: (
'xs' : (max-width: $--sm - 1),
'sm' : (min-width: $--sm),
'md' : (min-width: $--md),
'lg' : (min-width: $--lg),
'xl' : (min-width: $--xl)
);
$--breakpoints-spec: (
'xs-only' : (max-width: $--sm - 1),
'sm-and-up' : (min-width: $--sm),
'sm-only': "(min-width: #{$--sm}) and (max-width: #{$--md - 1})",
'sm-and-down': (max-width: $--md - 1),
'md-and-up' : (min-width: $--md),
'md-only': "(min-width: #{$--md}) and (max-width: #{$--lg - 1})",
'md-and-down': (max-width: $--lg - 1),
'lg-and-up' : (min-width: $--lg),
'lg-only': "(min-width: #{$--lg}) and (max-width: #{$--xl - 1})",
'lg-and-down': (max-width: $--xl - 1),
'xl-only' : (min-width: $--xl),
);
This diff could not be displayed because it is too large.
{
"name": "drainage",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6",
"glsx-components": "^1.1.1",
"glsx-table": "^1.0.9",
"vue-draggable-resizable": "^2.3.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-prettier": "^5.0.0",
"autoprefixer": "^8.0.0",
"babel-eslint": "^10.0.3",
"babel-plugin-component": "^1.1.1",
"element-theme-chalk": "^2.15.6",
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.14.1",
"postcss-loader": "^6.2.0",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-template-compiler": "^2.6.10"
},
"browserslist": [
"> 1%",
"last 3 versions",
"not ie <= 8",
"chrome >= 14",
"safari >= 3"
]
}
module.exports = {
plugins: {
autoprefixer: {}
}
}
\ No newline at end of file
No preview for this file type
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="referrer" content="no-referrer">
<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>
<body>
<noscript>
<strong>We're sorry but module-report doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</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
var express = require('express')
// var history = require('connect-history-api-fallback')
var cors = require('cors')
var app = express()
// app.use(history())
app.use(cors())
app.use(express.static('./dist'))
app.get('/', function(req, res) {
res.send('Hello jq')
})
const port = 6654
app.listen(port)
console.log(`服务已运行:\r\n http://127.0.0.1:${port}`)
\ No newline at end of file
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'report-app',
props: {
msg: String,
message: String
},
data() {
return {
myMsg: '',
gs: ''
}
},
created() {
this.myMsg = this.msg
this.myMessage = this.message
}
}
</script>
<style lang="scss">
.parent-child-communication {
padding: 20px 0;
line-height: 36px;
}
#app {
background: #F4F5FA;
padding: 0px 20px 20px 40px;
position: absolute;
box-sizing: border-box;
width: 100%;
top: 0px;
left: 0px;
overflow-y: auto;
height: 100%;
}
</style>
\ No newline at end of file
/*
所有模块都定义在 modules
|-modules
|----demo.js
|----demo1.js
|----...
|-index.js ---动态对外暴露所有模块 无须手动添加
参考demo.js 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
*/
const modulesFiles = require.context('./modules', true, /\.js$/)
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
modules[moduleName] = value.default
return modules
}, {})
export default modules
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const getListApi = params => {
params.method = 'cn.com.glsx.entmicro.staff.listFollowerStaffByPage'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getListApi,
}
\ No newline at end of file
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const pictureUpload = params => {
params.method = "glsx.accounts.biz.common.pictureUpload"
return http({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default {
pictureUpload
}
\ No newline at end of file
img {
width: 100%;
height: 100%;
vertical-align: top;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-hide-2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.scrm-textRight {
position: relative;
text-align: right;
}
.scrm-textCenter {
text-align: center;
}
.scrm-c3 {
color: #333333;
}
.scrm-f12 {
font-size: 12px;
}
.scrm-f13 {
font-size: 13px;
}
.scrm-f14 {
font-size: 14px;
}
.scrm-f15 {
font-size: 15px;
}
.scrm-f16 {
font-size: 16px;
}
.scrm-f18 {
font-size: 18px;
}
.scrm-f20 {
font-size: 20px;
}
.scrm-f22 {
font-size: 22px;
}
.scrm-f24 {
font-size: 24px;
}
.scrm-m10 {
margin: 10px;
}
.scrm-m20 {
margin: 20px;
}
.scrm-ml10 {
margin-left: 10px;
}
.scrm-ml20 {
margin-left: 20px;
}
.scrm-mr10 {
margin-right: 10px;
}
.scrm-mr20 {
margin-right: 20px;
}
.scrm-p10 {
padding: 10px;
}
.scrm-p20 {
padding: 20px;
}
.scrm-box-f {
background: #FFFFFF;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.10);
}
.scrm-flex {
display: flex;
}
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 6px;
height: 4px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 4px;
background-color: rgba(144, 147, 153, .3);
}
.glsx-table .line-ellipsis {
display: inline;
}
\ No newline at end of file
.left {
float: left;
}
.right {
float: right;
}
.align-right {
text-align: right;
}
.left{float:left}.right{float:right}.align-right{text-align:right}
.left {
float: left;
}
.right {
float: right;
}
.align-right {
text-align: right;
}
/**
* 根据路由匹配地址
* @param {*} data 路由数据
* @param {*} base 路由前缀
* @param {*} options 粗略的配置项
*/
function routeMatch(data, base, options = { url: 'url', name: 'name', id: 'id', permissions: 'permissions' }) {
if (!Array.isArray(data)) return []
// 主视图路由 正式项目需要区分登陆注册等
/* let userRouter = {
path: "/layout",
name: "layout",
component: () => import('@/views/layout/index.vue'),
redirect: '/index',
children: []
}; */
// 创建路由盒子
let routerBox = []
// 将菜单数据处理为一维函数 如果有多级菜单
// let menu = flattenDeep(data, 'children');
let menu = data
// 遍历处理路由
menu.forEach(item => {
if (!item[options.url]) return
let _url = item[options.url].replace(base, '')
try {
let routerItem = {
path: _url, // 路由路径名
name: item[options.name] || item[options.id], // 命名路由 用于配合菜单简洁跳转
meta: {
purview: item[options.permissions]
}, // 路由元信息 定义路由时即可携带的参数,可用来管理每个路由的按钮操作权限
component: () => import(`@/views${_url}/index.vue`) // 路由映射真实视图路径
}
routerBox.push(routerItem)
} catch (err) {
item[options.url] = '/err-404'
}
})
// 推入需要授权后等异步加载的,非服务端获取的功能性页面
// routerBox.push(...nextRouter);
let errorBox = {
path: '*',
redirect: '/err-404'
}
routerBox.push(errorBox)
return routerBox
}
export default routeMatch
/**
* type : primary,success,default,error,danger
* size: 按钮大小,参照elementui
* id: 权限判断id
* mode:按钮类型 是a标签还是button,可选值为:button、link
*/
import { Button, Link } from 'element-ui'
// 权限校验
function judgePermissions(options) {
if (!options) {
return false
}
let _list = options.parent.permissions || []
let _o = options.props
let idx = _list.findIndex(k => k == _o.id)
// 如果没有权限,则返回空标签
if (idx < 0) {
return ''
}
if (_o.mode == 'link') {
return 'a'
}
return 'button'
}
// 获取class
function getClass(context) {
let o = context.props
let _class = []
_class.push('el-' + o.mode)
_class.push('el-' + o.mode + '--' + o.type)
if (o.size) {
_class.push('el-' + o.mode + '--' + o.size)
}
if (o.class) {
_class.push(o.class)
}
return _class
}
export default {
functional: true,
props: {
type: {
type: String,
default: 'default'
},
size: {
type: String,
default: 'medium'
},
id: {
type: [String, Number]
},
mode: {
type: String,
default: 'button'
},
class: {
type: String,
default: ''
}
},
render: function(createElement, context) {
let _props = context.props
let options = {
props: _props,
attrs: context.props,
class: getClass(context),
on: {
click: event => {
context.listeners.click('click', event)
}
}
}
return createElement(judgePermissions(context), options, context.children)
}
}
<template>
<div class="glsx-table">
<el-table style="width: 100%" id="initTable" :ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'" :data="getListApi ? data : tableData" :row-key="tableParams.mutiSelectUniqueKey || ''" v-loading="loading" :height="tableHeightValues" :border="border" :tableId="tableId" :highlight-current-row="true" :stripe="true" @sort-change="sortChange" @selection-change="handleSelect" :size="size" :header-cell-style="headerStyle">
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" type="selection" width="55" :selectable="checkSelectable" :reserve-selection="true"></el-table-column>
<el-table-column v-if="hasNum" align="center" width="60px" label="序号" type="index" :index="index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"></el-table-column>
<el-table-column v-for="(item, index) in tableColumns" :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :align="item.align || 'center'" :sortable="item.sortable">
<template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="item.formatter(scope.row)" v-text="item.formatter(scope.row)"></span>
</template>
<template v-else-if="getListApi">
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="scope.row[item.prop]" v-text="scope.row[item.prop]"></span>
</template>
<template v-else>
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="tableData[scope.$index][item.prop]" v-text="tableData[scope.$index][item.prop]"></span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
</el-table-column>
<el-table-column v-if="tableParams.tableOption" label="操作" :align="tableParams.tableOption.align || 'center'" :width="tableParams.tableOption.width || '200'" fixed="right">
<template slot-scope="scope">
<slot name="auth-button" :scope="scope.row"></slot>
</template>
</el-table-column>
<template slot="empty" class="emptyBg">
<img class="noDataImg" :src="noDataImg" v-if="noDataImg" alt="" />
<div>{{ noDataText }}</div>
<slot name="additionalContent"></slot>
</template>
</el-table>
<el-pagination v-if="hasPage" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page[this.pageConf.pageNum]" :page-sizes="[10, 20, 30, 40]" :page-size="page[this.pageConf.pageSize]" :total="getListApi ? total : tableTotal" :layout="layout"></el-pagination>
</div>
</template>
<script>
import { Table, TableColumn, Pagination } from 'element-ui'
export default {
name: 'GLTable',
components: {
[Table.name]: Table,
[TableColumn.name]: TableColumn,
[Pagination.name]: Pagination
},
props: {
size: {
type: String,
default: 'medium'
},
height: {
type: String,
default: ''
},
// maxHeight:{
// type:String,
// default:'3000'
// },
noDataImg: {
type: String,
default: ''
},
noDataText: {
type: String,
default: '暂无数据'
},
border: {
type: Boolean,
default: false
},
headerStyle: {
type: Object,
default: () => {}
},
//表格需要多传入一个id的情况
tableId: {
type: String,
default: ''
},
// 搜索条件
searchForm: {
type: Object,
default: () => {}
},
// 是否定制表头
isCustomHead: {
type: Boolean,
default: false
},
// 表头展示
customHeadShowList: {
type: Array,
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
tableTotal: {
type: Number,
default: 0
},
// 获取列表接口
getListApi: {
type: Function,
default: null
},
// 搜索前操作
beforeSearchFn: {
type: Function,
default: () => {
return new Promise((resolve, reject) => {
resolve()
})
}
},
// 分页,默认有
hasPage: {
type: Boolean,
default: true
},
pageConf: {
type: Object,
default: () => ({
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'totalCount'
})
},
// 分页组件配置
layout: {
type: String,
default: 'sizes,total,->,prev,pager,next,jumper'
},
// 序号,默认有
hasNum: {
type: Boolean,
default: true
},
tableParams: {
type: Object,
default: () => {
return {
// 多选-判断来自哪个页面
// mutiSelectName: {
// type: String,
// default: ''
// },
// 多选-唯一标识-行数据的key
// mutiSelectUniqueKey: {
// type: String,
// default: ''
// },
// 设置禁止选中的行数据
checkSelectKey: {
type: String,
default: ''
},
// 设置禁止选中的值
checkSelectVal: {
type: Array,
default: () => []
},
// 后端返回列表参数名
listName: {
type: String,
default: ''
},
// 表格操作,默认没有
// tableOption: {
// type: Object,
// default: null
// },
// 表格栏
tableColumns: {
type: Array,
default: () => []
}
}
}
}
},
data() {
return {
loading: false,
data: [],
// 页码
page: {},
total: 10,
// 多选数组
mutiSelectArr: {},
tableColumns: [],
showClass: false,
tableHeightValues: null
}
},
watch: {
customHeadShowList(val) {
this.isCustomHead && this.findShowHeadCol()
}
// data: {
// immediate: true,
// handler(val) {
// this.showClass = val.length > 0 ? true : false
// },
// deep: true
// }
},
methods: {
findShowHeadCol() {
this.tableColumns = []
this.tableParams.tableColumns.forEach(item => {
let isCustomCol = item.hasOwnProperty('isCustomCol')
if (!isCustomCol || (isCustomCol && this.customHeadShowList.includes(item.label))) {
this.tableColumns.push(item)
}
})
},
// 设置禁止选中的行数据
checkSelectable(row) {
if (this.tableParams.checkSelectKey && this.tableParams.checkSelectVal.length > 0) {
return this.tableParams.checkSelectVal.indexOf(row[this.tableParams.checkSelectKey]) == -1
} else {
return true
}
},
// 排序
sortChange({ column, prop, order }) {
this.$emit('sortChange', { column, prop, order })
},
// 多选
handleSelect(val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val;
this.$emit('selectionTable', val)
},
// 清空多选
clearMutiSelect() {
this.mutiSelectArr[this.tableParams.mutiSelectName] = []
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].clearSelection()
},
//设置表格高度
setTableHeightFun(navHeight = 0) {
//navHeight 传值底部高度
var baseNavEle = document.querySelector('.scrm-base-nav')
var baseSubNavEle = document.querySelector('.scrm-base-sub-nav')
var baseNavEleHeight = baseNavEle?baseNavEle.clientHeight : 0;
var baseSubNavEleHeight = baseSubNavEle?baseSubNavEle.clientHeight : 0
let paginationHeight
if (document.querySelector('.el-pagination')) {
paginationHeight = document.querySelector('.el-pagination').clientHeight + 20
} else {
paginationHeight = 0
}
let offsettop = document.getElementById('initTable').offsetTop
let clientHeight = document.documentElement.clientHeight
// document.getElementById('initTable').style.height = clientHeight - offsettop - paginationHeight - navHeight + 'px'
// document.querySelector('.el-table__empty-block').style.height=(clientHeight - offsettop - paginationHeight - navHeight)+'px';
this.tableHeightValues = clientHeight - offsettop - paginationHeight - baseNavEleHeight - baseSubNavEleHeight - 10 - 30 - 20 + 'px'
},
refreshTable(isResetPageNum = true, isClearMuti = true) {
this.beforeSearchFn().then(res => {
// 清空多选
isClearMuti && this.clearMutiSelect()
this.loading = true
isResetPageNum && (this.page[this.pageConf.pageNum] = 1)
var params = {
...this.page,
...this.searchForm
}
if (this.tableId) {
params.id = this.tableId
}
this.getListApi(params)
.then(res => {
console.log(res)
this.data = this.findVal(res, this.tableParams.listName)
this.total = this.findVal(res, this.pageConf.totalCount)
this.loading = false
if (this.data.length) {
this.$emit('setTableFinishFun', this.data) //表格请求到数据
}
})
.catch(() => {
this.loading = false
})
})
},
// 找返回值
findVal(res, rankStr) {
var rankList = rankStr.split('.')
if (!rankStr) {
return res
}
return this.findVal(res[rankList[0]], rankList.splice(1).join('.'))
},
// 每页条数
handleSizeChange(value) {
let offsettop = document.getElementById('initTable').offsetTop
console.log('表格距离顶部1', offsettop)
this.page[this.pageConf.pageSize] = value
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
},
// 页码
handleCurrentChange(value) {
this.page[this.pageConf.pageNum] = value
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
}
},
mounted() {
this.isCustomHead ? this.findShowHeadCol() : (this.tableColumns = this.tableParams.tableColumns)
this.page = {}
this.page[this.pageConf.pageSize] = 10
this.page[this.pageConf.pageNum] = 1
this.getListApi && this.refreshTable()
}
}
</script>
<style>
.a-click {
cursor: pointer;
}
.el-table .cell {
line-height: 14px;
}
.glsx-table p {
margin: 10px 0;
}
.glsx-table .line-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
/* -webkit-line-clamp: 2; */
-webkit-box-orient: vertical;
}
.el-table-column--selection .cell {
padding-left: 14px !important;
padding-right: 14px !important;
}
.glsx-table .emptyBg {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
}
.el-table__body-wrapper::-webkit-scrollbar {
width: 10px;
height: 10px;
/* display: none; */
}
/*正常情况下滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
/* background-color: rgba(0, 0, 0, 0.2); */
background: #e9e8ff;
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
/* &::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
} */
/*正常时候的主干部分*/
.el-table__body-wrapper::-webkit-scrollbar-track {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
/*鼠标悬浮在滚动条上的主干部分*/
/* .el-table__body-wrapper::-webkit-scrollbar-track:hover {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.01);
} */
/* .hasTableContent .el-table__body{
height: 100%;
} */
/* .hasTableContent .el-table__body-wrapper{
height: 100%;
} */
</style>
\ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-06 10:10:44
* @LastEditors: limin
* @LastEditTime: 2021-09-06 10:11:49
* @FilePath: \scrm\scrm-sub-blog\src\components\index.js
*/
import Vue from 'vue'
// 导入权限按钮
import _button from '@/components/glsx-button/index'
import glsxTable from '@/components/glsx-table/index.vue'
Vue.component('glsx-button', _button)
// Vue.component('glsx-table', glsxTable)
\ No newline at end of file
.vdr {
touch-action: none;
position: absolute;
box-sizing: border-box;
border: 1px dashed black;
}
.handle {
box-sizing: border-box;
position: absolute;
width: 10px;
height: 10px;
background: #EEE;
border: 1px solid #333;
}
.handle-tl {
top: -10px;
left: -10px;
cursor: nw-resize;
}
.handle-tm {
top: -10px;
left: 50%;
margin-left: -5px;
cursor: n-resize;
}
.handle-tr {
top: -10px;
right: -10px;
cursor: ne-resize;
}
.handle-ml {
top: 50%;
margin-top: -5px;
left: -10px;
cursor: w-resize;
}
.handle-mr {
top: 50%;
margin-top: -5px;
right: -10px;
cursor: e-resize;
}
.handle-bl {
bottom: -10px;
left: -10px;
cursor: sw-resize;
}
.handle-bm {
bottom: -10px;
left: 50%;
margin-left: -5px;
cursor: s-resize;
}
.handle-br {
bottom: -10px;
right: -10px;
cursor: se-resize;
}
@media only screen and (max-width: 768px) {
[class*="handle-"]:before {
content: '';
left: -10px;
right: -10px;
bottom: -10px;
top: -10px;
position: absolute;
}
}
<template>
<div
:style="style"
:class="[{
[classNameActive]: enabled,
[classNameDragging]: dragging,
[classNameResizing]: resizing,
[classNameDraggable]: draggable,
[classNameResizable]: resizable
}, className]"
@mousedown="elementMouseDown"
@touchstart="elementTouchDown"
>
<div
v-for="handle in actualHandles"
:key="handle"
:class="[classNameHandle, classNameHandle + '-' + handle]"
:style="{display: enabled ? 'block' : 'none'}"
@mousedown.stop.prevent="handleDown(handle, $event)"
@touchstart.stop.prevent="handleTouchDown(handle, $event)"
>
<slot :name="handle"></slot>
</div>
<slot></slot>
</div>
</template>
<script>
import { matchesSelectorToParentElements, getComputedSize, addEvent, removeEvent } from '../utils/dom'
import { computeWidth, computeHeight, restrictToBounds, snapToGrid } from '../utils/fns'
const events = {
mouse: {
start: 'mousedown',
move: 'mousemove',
stop: 'mouseup'
},
touch: {
start: 'touchstart',
move: 'touchmove',
stop: 'touchend'
}
}
const userSelectNone = {
userSelect: 'none',
MozUserSelect: 'none',
WebkitUserSelect: 'none',
MsUserSelect: 'none'
}
const userSelectAuto = {
userSelect: 'auto',
MozUserSelect: 'auto',
WebkitUserSelect: 'auto',
MsUserSelect: 'auto'
}
let eventsFor = events.mouse
export default {
replace: true,
name: 'vue-draggable-resizable',
props: {
className: {
type: String,
default: 'vdr'
},
classNameDraggable: {
type: String,
default: 'draggable'
},
classNameResizable: {
type: String,
default: 'resizable'
},
classNameDragging: {
type: String,
default: 'dragging'
},
classNameResizing: {
type: String,
default: 'resizing'
},
classNameActive: {
type: String,
default: 'active'
},
classNameHandle: {
type: String,
default: 'handle'
},
disableUserSelect: {
type: Boolean,
default: true
},
enableNativeDrag: {
type: Boolean,
default: false
},
preventDeactivation: {
type: Boolean,
default: false
},
active: {
type: Boolean,
default: false
},
draggable: {
type: Boolean,
default: true
},
resizable: {
type: Boolean,
default: true
},
lockAspectRatio: {
type: Boolean,
default: false
},
w: {
type: [Number, String],
default: 200,
validator: (val) => {
if (typeof val === 'number') {
return val > 0
}
return val === 'auto'
}
},
h: {
type: [Number, String],
default: 200,
validator: (val) => {
if (typeof val === 'number') {
return val > 0
}
return val === 'auto'
}
},
minWidth: {
type: Number,
default: 0,
validator: (val) => val >= 0
},
minHeight: {
type: Number,
default: 0,
validator: (val) => val >= 0
},
maxWidth: {
type: Number,
default: null,
validator: (val) => val >= 0
},
maxHeight: {
type: Number,
default: null,
validator: (val) => val >= 0
},
x: {
type: Number,
default: 0
},
y: {
type: Number,
default: 0
},
z: {
type: [String, Number],
default: 'auto',
validator: (val) => (typeof val === 'string' ? val === 'auto' : val >= 0)
},
handles: {
type: Array,
default: () => ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'],
validator: (val) => {
const s = new Set(['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'])
return new Set(val.filter(h => s.has(h))).size === val.length
}
},
dragHandle: {
type: String,
default: null
},
dragCancel: {
type: String,
default: null
},
axis: {
type: String,
default: 'both',
validator: (val) => ['x', 'y', 'both'].includes(val)
},
grid: {
type: Array,
default: () => [1, 1]
},
customId: {
type: [String,Number],
default: ''
},
parent: {
type: Boolean,
default: false
},
scale: {
type: [Number, Array],
default: 1,
validator: (val) => {
if (typeof val === 'number') {
return val > 0
}
return val.length === 2 && val[0] > 0 && val[1] > 0
}
},
onDragStart: {
type: Function,
default: () => true
},
onDrag: {
type: Function,
default: () => true
},
onResizeStart: {
type: Function,
default: () => true
},
onResize: {
type: Function,
default: () => true
}
},
data: function () {
return {
left: this.x,
top: this.y,
right: null,
bottom: null,
width: null,
height: null,
widthTouched: false,
heightTouched: false,
aspectFactor: null,
parentWidth: null,
parentHeight: null,
minW: this.minWidth,
minH: this.minHeight,
maxW: this.maxWidth,
maxH: this.maxHeight,
handle: null,
enabled: this.active,
resizing: false,
dragging: false,
dragEnable: false,
resizeEnable: false,
zIndex: this.z
}
},
created: function () {
// eslint-disable-next-line
if (this.maxWidth && this.minWidth > this.maxWidth) console.warn('[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth')
// eslint-disable-next-line
if (this.maxWidth && this.minHeight > this.maxHeight) console.warn('[Vdr warn]: Invalid prop: minHeight cannot be greater than maxHeight')
this.resetBoundsAndMouseState()
},
mounted: function () {
if (!this.enableNativeDrag) {
this.$el.ondragstart = () => false
}
const [parentWidth, parentHeight] = this.getParentSize()
this.parentWidth = parentWidth
this.parentHeight = parentHeight
const [width, height] = getComputedSize(this.$el)
this.aspectFactor = (this.w !== 'auto' ? this.w : width) / (this.h !== 'auto' ? this.h : height)
this.width = this.w !== 'auto' ? this.w : width
this.height = this.h !== 'auto' ? this.h : height
this.right = this.parentWidth - this.width - this.left
this.bottom = this.parentHeight - this.height - this.top
if (this.active) {
this.$emit('activated')
}
addEvent(document.documentElement, 'mousedown', this.deselect)
addEvent(document.documentElement, 'touchend touchcancel', this.deselect)
addEvent(window, 'resize', this.checkParentSize)
},
beforeDestroy: function () {
removeEvent(document.documentElement, 'mousedown', this.deselect)
removeEvent(document.documentElement, 'touchstart', this.handleUp)
removeEvent(document.documentElement, 'mousemove', this.move)
removeEvent(document.documentElement, 'touchmove', this.move)
removeEvent(document.documentElement, 'mouseup', this.handleUp)
removeEvent(document.documentElement, 'touchend touchcancel', this.deselect)
removeEvent(window, 'resize', this.checkParentSize)
},
methods: {
resetBoundsAndMouseState () {
this.mouseClickPosition = { mouseX: 0, mouseY: 0, x: 0, y: 0, w: 0, h: 0 }
this.bounds = {
minLeft: null,
maxLeft: null,
minRight: null,
maxRight: null,
minTop: null,
maxTop: null,
minBottom: null,
maxBottom: null
}
},
checkParentSize () {
if (this.parent) {
const [newParentWidth, newParentHeight] = this.getParentSize()
this.parentWidth = newParentWidth
this.parentHeight = newParentHeight
this.right = this.parentWidth - this.width - this.left
this.bottom = this.parentHeight - this.height - this.top
}
},
getParentSize () {
if (this.parent) {
const style = window.getComputedStyle(this.$el.parentNode, null)
return [
parseInt(style.getPropertyValue('width'), 10),
parseInt(style.getPropertyValue('height'), 10)
]
}
return [null, null]
},
elementTouchDown (e) {
eventsFor = events.touch
this.elementDown(e)
},
elementMouseDown (e) {
eventsFor = events.mouse
this.elementDown(e)
},
elementDown (e) {
if (e instanceof MouseEvent && e.which !== 1) {
return
}
const target = e.target || e.srcElement
if (this.$el.contains(target)) {
if (this.onDragStart(e) === false) {
return
}
if (
(this.dragHandle && !matchesSelectorToParentElements(target, this.dragHandle, this.$el)) ||
(this.dragCancel && matchesSelectorToParentElements(target, this.dragCancel, this.$el))
) {
this.dragging = false
return
}
if (!this.enabled) {
this.enabled = true
this.$emit('activated',this.customId)
this.$emit('update:active', true)
}
if (this.draggable) {
this.dragEnable = true
}
this.mouseClickPosition.mouseX = e.touches ? e.touches[0].pageX : e.pageX
this.mouseClickPosition.mouseY = e.touches ? e.touches[0].pageY : e.pageY
this.mouseClickPosition.left = this.left
this.mouseClickPosition.right = this.right
this.mouseClickPosition.top = this.top
this.mouseClickPosition.bottom = this.bottom
if (this.parent) {
this.bounds = this.calcDragLimits()
}
addEvent(document.documentElement, eventsFor.move, this.move)
addEvent(document.documentElement, eventsFor.stop, this.handleUp)
}
},
calcDragLimits () {
return {
minLeft: this.left % this.grid[0],
maxLeft: Math.floor((this.parentWidth - this.width - this.left) / this.grid[0]) * this.grid[0] + this.left,
minRight: this.right % this.grid[0],
maxRight: Math.floor((this.parentWidth - this.width - this.right) / this.grid[0]) * this.grid[0] + this.right,
minTop: this.top % this.grid[1],
maxTop: Math.floor((this.parentHeight - this.height - this.top) / this.grid[1]) * this.grid[1] + this.top,
minBottom: this.bottom % this.grid[1],
maxBottom: Math.floor((this.parentHeight - this.height - this.bottom) / this.grid[1]) * this.grid[1] + this.bottom
}
},
deselect (e) {
const target = e.target || e.srcElement
const regex = new RegExp(this.className + '-([trmbl]{2})', '')
if (!this.$el.contains(target) && !regex.test(target.className)) {
if (this.enabled && !this.preventDeactivation) {
this.enabled = false
this.$emit('deactivated')
this.$emit('update:active', false)
}
removeEvent(document.documentElement, eventsFor.move, this.handleResize)
}
this.resetBoundsAndMouseState()
},
handleTouchDown (handle, e) {
eventsFor = events.touch
this.handleDown(handle, e)
},
handleDown (handle, e) {
if (e instanceof MouseEvent && e.which !== 1) {
return
}
if (this.onResizeStart(handle, e) === false) {
return
}
if (e.stopPropagation) e.stopPropagation()
// Here we avoid a dangerous recursion by faking
// corner handles as middle handles
if (this.lockAspectRatio && !handle.includes('m')) {
this.handle = 'm' + handle.substring(1)
} else {
this.handle = handle
}
this.resizeEnable = true
this.mouseClickPosition.mouseX = e.touches ? e.touches[0].pageX : e.pageX
this.mouseClickPosition.mouseY = e.touches ? e.touches[0].pageY : e.pageY
this.mouseClickPosition.left = this.left
this.mouseClickPosition.right = this.right
this.mouseClickPosition.top = this.top
this.mouseClickPosition.bottom = this.bottom
this.bounds = this.calcResizeLimits()
addEvent(document.documentElement, eventsFor.move, this.handleResize)
addEvent(document.documentElement, eventsFor.stop, this.handleUp)
},
calcResizeLimits () {
let minW = this.minW
let minH = this.minH
let maxW = this.maxW
let maxH = this.maxH
const aspectFactor = this.aspectFactor
const [gridX, gridY] = this.grid
const width = this.width
const height = this.height
const left = this.left
const top = this.top
const right = this.right
const bottom = this.bottom
if (this.lockAspectRatio) {
if (minW / minH > aspectFactor) {
minH = minW / aspectFactor
} else {
minW = aspectFactor * minH
}
if (maxW && maxH) {
maxW = Math.min(maxW, aspectFactor * maxH)
maxH = Math.min(maxH, maxW / aspectFactor)
} else if (maxW) {
maxH = maxW / aspectFactor
} else if (maxH) {
maxW = aspectFactor * maxH
}
}
maxW = maxW - (maxW % gridX)
maxH = maxH - (maxH % gridY)
const limits = {
minLeft: null,
maxLeft: null,
minTop: null,
maxTop: null,
minRight: null,
maxRight: null,
minBottom: null,
maxBottom: null
}
if (this.parent) {
limits.minLeft = left % gridX
limits.maxLeft = left + Math.floor((width - minW) / gridX) * gridX
limits.minTop = top % gridY
limits.maxTop = top + Math.floor((height - minH) / gridY) * gridY
limits.minRight = right % gridX
limits.maxRight = right + Math.floor((width - minW) / gridX) * gridX
limits.minBottom = bottom % gridY
limits.maxBottom = bottom + Math.floor((height - minH) / gridY) * gridY
if (maxW) {
limits.minLeft = Math.max(limits.minLeft, this.parentWidth - right - maxW)
limits.minRight = Math.max(limits.minRight, this.parentWidth - left - maxW)
}
if (maxH) {
limits.minTop = Math.max(limits.minTop, this.parentHeight - bottom - maxH)
limits.minBottom = Math.max(limits.minBottom, this.parentHeight - top - maxH)
}
if (this.lockAspectRatio) {
limits.minLeft = Math.max(limits.minLeft, left - top * aspectFactor)
limits.minTop = Math.max(limits.minTop, top - left / aspectFactor)
limits.minRight = Math.max(limits.minRight, right - bottom * aspectFactor)
limits.minBottom = Math.max(limits.minBottom, bottom - right / aspectFactor)
}
} else {
limits.minLeft = null
limits.maxLeft = left + Math.floor((width - minW) / gridX) * gridX
limits.minTop = null
limits.maxTop = top + Math.floor((height - minH) / gridY) * gridY
limits.minRight = null
limits.maxRight = right + Math.floor((width - minW) / gridX) * gridX
limits.minBottom = null
limits.maxBottom = bottom + Math.floor((height - minH) / gridY) * gridY
if (maxW) {
limits.minLeft = -(right + maxW)
limits.minRight = -(left + maxW)
}
if (maxH) {
limits.minTop = -(bottom + maxH)
limits.minBottom = -(top + maxH)
}
if (this.lockAspectRatio && (maxW && maxH)) {
limits.minLeft = Math.min(limits.minLeft, -(right + maxW))
limits.minTop = Math.min(limits.minTop, -(maxH + bottom))
limits.minRight = Math.min(limits.minRight, -left - maxW)
limits.minBottom = Math.min(limits.minBottom, -top - maxH)
}
}
return limits
},
move (e) {
if (this.resizing) {
this.handleResize(e)
} else if (this.dragEnable) {
this.handleDrag(e)
}
},
handleDrag (e) {
const axis = this.axis
const grid = this.grid
const bounds = this.bounds
const mouseClickPosition = this.mouseClickPosition
const tmpDeltaX = axis && axis !== 'y' ? mouseClickPosition.mouseX - (e.touches ? e.touches[0].pageX : e.pageX) : 0
const tmpDeltaY = axis && axis !== 'x' ? mouseClickPosition.mouseY - (e.touches ? e.touches[0].pageY : e.pageY) : 0
const [deltaX, deltaY] = snapToGrid(grid, tmpDeltaX, tmpDeltaY, this.scale)
const left = restrictToBounds(mouseClickPosition.left - deltaX, bounds.minLeft, bounds.maxLeft)
const top = restrictToBounds(mouseClickPosition.top - deltaY, bounds.minTop, bounds.maxTop)
if (this.onDrag(left, top) === false) {
return
}
const right = restrictToBounds(mouseClickPosition.right + deltaX, bounds.minRight, bounds.maxRight)
const bottom = restrictToBounds(mouseClickPosition.bottom + deltaY, bounds.minBottom, bounds.maxBottom)
this.left = left
this.top = top
this.right = right
this.bottom = bottom
this.$emit('dragging', this.left, this.top)
this.dragging = true
},
moveHorizontally (val) {
// should calculate with scale 1.
const [deltaX, _] = snapToGrid(this.grid, val, this.top, 1)
const left = restrictToBounds(deltaX, this.bounds.minLeft, this.bounds.maxLeft)
this.left = left
this.right = this.parentWidth - this.width - left
},
moveVertically (val) {
// should calculate with scale 1.
const [_, deltaY] = snapToGrid(this.grid, this.left, val, 1)
const top = restrictToBounds(deltaY, this.bounds.minTop, this.bounds.maxTop)
this.top = top
this.bottom = this.parentHeight - this.height - top
},
handleResize (e) {
let left = this.left
let top = this.top
let right = this.right
let bottom = this.bottom
const mouseClickPosition = this.mouseClickPosition
const lockAspectRatio = this.lockAspectRatio
const aspectFactor = this.aspectFactor
const tmpDeltaX = mouseClickPosition.mouseX - (e.touches ? e.touches[0].pageX : e.pageX)
const tmpDeltaY = mouseClickPosition.mouseY - (e.touches ? e.touches[0].pageY : e.pageY)
if (!this.widthTouched && tmpDeltaX) {
this.widthTouched = true
}
if (!this.heightTouched && tmpDeltaY) {
this.heightTouched = true
}
const [deltaX, deltaY] = snapToGrid(this.grid, tmpDeltaX, tmpDeltaY, this.scale)
if (this.handle.includes('b')) {
bottom = restrictToBounds(
mouseClickPosition.bottom + deltaY,
this.bounds.minBottom,
this.bounds.maxBottom
)
if (this.lockAspectRatio && this.resizingOnY) {
right = this.right - (this.bottom - bottom) * aspectFactor
}
} else if (this.handle.includes('t')) {
top = restrictToBounds(
mouseClickPosition.top - deltaY,
this.bounds.minTop,
this.bounds.maxTop
)
if (this.lockAspectRatio && this.resizingOnY) {
left = this.left - (this.top - top) * aspectFactor
}
}
if (this.handle.includes('r')) {
right = restrictToBounds(
mouseClickPosition.right + deltaX,
this.bounds.minRight,
this.bounds.maxRight
)
if (this.lockAspectRatio && this.resizingOnX) {
bottom = this.bottom - (this.right - right) / aspectFactor
}
} else if (this.handle.includes('l')) {
left = restrictToBounds(
mouseClickPosition.left - deltaX,
this.bounds.minLeft,
this.bounds.maxLeft
)
if (this.lockAspectRatio && this.resizingOnX) {
top = this.top - (this.left - left) / aspectFactor
}
}
const width = computeWidth(this.parentWidth, left, right)
const height = computeHeight(this.parentHeight, top, bottom)
if (this.onResize(this.handle, left, top, width, height) === false) {
return
}
this.left = left
this.top = top
this.right = right
this.bottom = bottom
this.width = width
this.height = height
this.$emit('resizing', this.left, this.top, this.width, this.height)
this.resizing = true
},
changeWidth (val) {
// should calculate with scale 1.
const [newWidth, _] = snapToGrid(this.grid, val, 0, 1)
let right = restrictToBounds(
(this.parentWidth - newWidth - this.left),
this.bounds.minRight,
this.bounds.maxRight
)
let bottom = this.bottom
if (this.lockAspectRatio) {
bottom = this.bottom - (this.right - right) / this.aspectFactor
}
const width = computeWidth(this.parentWidth, this.left, right)
const height = computeHeight(this.parentHeight, this.top, bottom)
this.right = right
this.bottom = bottom
this.width = width
this.height = height
},
changeHeight (val) {
// should calculate with scale 1.
const [_, newHeight] = snapToGrid(this.grid, 0, val, 1)
let bottom = restrictToBounds(
(this.parentHeight - newHeight - this.top),
this.bounds.minBottom,
this.bounds.maxBottom
)
let right = this.right
if (this.lockAspectRatio) {
right = this.right - (this.bottom - bottom) * this.aspectFactor
}
const width = computeWidth(this.parentWidth, this.left, right)
const height = computeHeight(this.parentHeight, this.top, bottom)
this.right = right
this.bottom = bottom
this.width = width
this.height = height
},
handleUp (e) {
this.handle = null
this.resetBoundsAndMouseState()
this.dragEnable = false
this.resizeEnable = false
if (this.resizing) {
this.resizing = false
this.$emit('resizestop', this.left, this.top, this.width, this.height)
}
if (this.dragging) {
this.dragging = false
this.$emit('dragstop', this.left, this.top)
}
removeEvent(document.documentElement, eventsFor.move, this.handleResize)
}
},
computed: {
style () {
return {
transform: `translate(${this.left}px, ${this.top}px)`,
width: this.computedWidth,
height: this.computedHeight,
zIndex: this.zIndex,
...(this.dragging && this.disableUserSelect ? userSelectNone : userSelectAuto)
}
},
actualHandles () {
if (!this.resizable) return []
return this.handles
},
computedWidth () {
if (this.w === 'auto') {
if (!this.widthTouched) {
return 'auto'
}
}
return this.width + 'px'
},
computedHeight () {
if (this.h === 'auto') {
if (!this.heightTouched) {
return 'auto'
}
}
return this.height + 'px'
},
resizingOnX () {
return (Boolean(this.handle) && (this.handle.includes('l') || this.handle.includes('r')))
},
resizingOnY () {
return (Boolean(this.handle) && (this.handle.includes('t') || this.handle.includes('b')))
},
isCornerHandle () {
return (Boolean(this.handle) && ['tl', 'tr', 'br', 'bl'].includes(this.handle))
}
},
watch: {
active (val) {
this.enabled = val
if (val) {
this.$emit('activated')
} else {
this.$emit('deactivated')
}
},
z (val) {
if (val >= 0 || val === 'auto') {
this.zIndex = val
}
},
x (val) {
if (this.resizing || this.dragging) {
return
}
if (this.parent) {
this.bounds = this.calcDragLimits()
}
this.moveHorizontally(val)
},
y (val) {
if (this.resizing || this.dragging) {
return
}
if (this.parent) {
this.bounds = this.calcDragLimits()
}
this.moveVertically(val)
},
lockAspectRatio (val) {
if (val) {
this.aspectFactor = this.width / this.height
} else {
this.aspectFactor = undefined
}
},
minWidth (val) {
if (val > 0 && val <= this.width) {
this.minW = val
}
},
minHeight (val) {
if (val > 0 && val <= this.height) {
this.minH = val
}
},
maxWidth (val) {
this.maxW = val
},
maxHeight (val) {
this.maxH = val
},
w (val) {
if (this.resizing || this.dragging) {
return
}
if (this.parent) {
this.bounds = this.calcResizeLimits()
}
this.changeWidth(val)
},
h (val) {
if (this.resizing || this.dragging) {
return
}
if (this.parent) {
this.bounds = this.calcResizeLimits()
}
this.changeHeight(val)
}
}
}
</script>
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-06-08 16:55:43
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
const environment = process.env.NODE_ENV || 'production'
let config = require('./env.' + environment)
module.exports = config
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-06 17:38:28
*/
// 本地环境配置
module.exports = {
title: 'scrm-sub-blog',
response: {
data_key: 'data',
message_key: 'message',
code_key: 'code',
code_success_value: '0',
code_message_map: {}
},
request: {
baseURL: 'http://192.168.1.254',
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
sign: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: ''
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
cdn: 'https://www.xxx.cn/static'
}
\ No newline at end of file
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-06 17:38:28
*/
// 本地环境配置
module.exports = {
title: 'scrm-sub-blog',
response: {
data_key: 'data',
message_key: 'message',
code_key: 'code',
code_success_value: '0',
code_message_map: {}
},
request: {
baseURL: 'https://scrm.test.glsx.com.cn',
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
sign: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: ''
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
cdn: 'https://www.xxx.cn/static'
}
\ No newline at end of file
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-07 14:38:52
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
let cfg = require('./conf.js')
import { Http } from 'glsx-common'
let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) {
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
}
export const config = {
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
\ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: limin
* @LastEditTime: 2021-09-14 09:34:52
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
import apis from './api'
import './public-path'
// import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup'
Vue.config.productionTip = false
Vue.prototype.$apis = apis
start()
export { bootstrap, mount, unmount }
from '@/setup'
export const http = params => Vue.prototype.$http(params)
\ No newline at end of file
File mode changed
import Vue from 'vue'
import { Message, Autocomplete, Popover, Tag, Tooltip, Table, TableColumn, Steps, Step, Loading, Drawer, Pagination, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Row, Col, DatePicker, Tree } from 'element-ui'
Vue.use(Button)
Vue.use(ButtonGroup)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(Switch)
Vue.use(Select)
Vue.use(Option)
Vue.use(TimePicker)
Vue.use(Col)
Vue.use(Row)
Vue.use(DatePicker)
Vue.use(Tree)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Loading)
Vue.use(Drawer)
Vue.use(Pagination)
Vue.use(Steps)
Vue.use(Step)
Vue.use(Tooltip)
Vue.use(Autocomplete)
Vue.use(Tag)
Vue.use(Popover)
export const message = Message
\ No newline at end of file
if (window.__POWERED_BY_QIANKUN__) {
// eslint-disable-next-line no-undef
__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
}
import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'
Vue.use(VueRouter)
// 处理重复点击同一个路由报错的问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
function getRoutes(routesData) {
return routesData.reduce((routes, route) => {
routes.push({...route, component: () =>
import ('@/views' + route.compath + '.vue') })
return routes
}, [])
}
export { VueRouter, routes, getRoutes }
\ No newline at end of file
const staticRoutes = Object.freeze([{
name: 'channel',
path: '/channel/index',
component: resolve => require([`@/views/channel/index.vue`], resolve),
meta: {},
}, {
name: 'channel',
path: '/channel/store',
component: resolve => require([`@/views/channel/store.vue`], resolve),
meta: {}
}, {
name: 'addCode',
path: '/channel/addCode',
component: resolve => require([`@/views/channel/addCode.vue`], resolve),
meta: {}
}, {
name: 'poster',
path: '/channel/poster',
component: resolve => require([`@/views/channel/poster.vue`], resolve),
meta: {}
}, {
name: 'square',
path: '/square/index',
component: resolve => require([`@/views/square/index.vue`], resolve),
meta: {}
}, {
name: 'import',
path: '/square/import',
component: resolve => require([`@/views/square/import.vue`], resolve),
meta: {}
}, {
name: 'importResult',
path: '/square/importResult',
component: resolve => require([`@/views/square/importResult.vue`], resolve),
meta: {}
}, {
name: 'drainage',
path: '/square/drainage',
component: resolve => require([`@/views/square/drainage.vue`], resolve),
meta: {}
}, {
name: 'marketing',
path: '/marketing/index',
component: resolve => require([`@/views/marketing/index.vue`], resolve),
meta: {}
}, {
name: 'overview',
path: '/overview/index',
component: resolve => require([`@/views/overview/index.vue`], resolve),
meta: {}
}])
export default staticRoutes
\ No newline at end of file
/*
* @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 } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
// import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable)
import 'glsx-components/src/theme/theme.scss'
import '@/assets/css/common.scss'
let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, 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.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
subscribe({ messenger })
}
export async function mount(props) {
console.log('11111', 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)
})
}
\ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-09-23 19:04:32
* @LastEditors: limin
* @LastEditTime: 2021-09-23 20:34:32
* @FilePath: \scrm\scrm-sub-blog\src\qiankun\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
\ No newline at end of file
/*
* @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)
}
\ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: limin
* @LastEditTime: 2021-08-25 14:14:44
* @FilePath: \scrm\scrm-base\src\store\index.js
*/
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const modulesFiles = require.context('./modules', true, /\.js$/)
const modules = modulesFiles.keys().reduce(
(result, modulePath) => {
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
result.getters[moduleName] = state => state[moduleName]
result.modules[moduleName] = value.default
return result
},
{ modules: {}, getters: {} }
)
const store = new Vuex.Store(modules)
export default store
export default {
namespaced: true,
state: {
size: 10, // 分页 页大小
token: ''
},
mutations: {
// 设置分页大小
SET_PAGE_SIZE(state, data) {
state.size = data
},
// 设置token
SET_TOKEN(state, data) {
state.token = data
}
},
actions: {
// 设置分页大小
setPageSize({ commit }, data) {
commit('SET_PAGE_SIZE', data)
},
// 设置token
setToken({ commit }, data) {
commit('SET_TOKEN', data)
}
}
}
export default {
namespaced: true,
state: {},
mutations: {},
actions: {}
}
import { isFunction } from './fns'
export function matchesSelectorToParentElements (el, selector, baseNode) {
let node = el
const matchesSelectorFunc = [
'matches',
'webkitMatchesSelector',
'mozMatchesSelector',
'msMatchesSelector',
'oMatchesSelector'
].find(func => isFunction(node[func]))
if (!isFunction(node[matchesSelectorFunc])) return false
do {
if (node[matchesSelectorFunc](selector)) return true
if (node === baseNode) return false
node = node.parentNode
} while (node)
return false
}
export function getComputedSize ($el) {
const style = window.getComputedStyle($el)
return [
parseFloat(style.getPropertyValue('width'), 10),
parseFloat(style.getPropertyValue('height'), 10)
]
}
export function addEvent (el, event, handler) {
if (!el) {
return
}
if (el.attachEvent) {
el.attachEvent('on' + event, handler)
} else if (el.addEventListener) {
el.addEventListener(event, handler, true)
} else {
el['on' + event] = handler
}
}
export function removeEvent (el, event, handler) {
if (!el) {
return
}
if (el.detachEvent) {
el.detachEvent('on' + event, handler)
} else if (el.removeEventListener) {
el.removeEventListener(event, handler, true)
} else {
el['on' + event] = null
}
}
export function isFunction (func) {
return (typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]')
}
export function snapToGrid (grid, pendingX, pendingY, scale = 1) {
const [scaleX, scaleY] = typeof scale === 'number' ? [scale, scale] : scale
const x = Math.round((pendingX / scaleX) / grid[0]) * grid[0]
const y = Math.round((pendingY / scaleY) / grid[1]) * grid[1]
return [x, y]
}
export function getSize (el) {
const rect = el.getBoundingClientRect()
return [
parseInt(rect.width),
parseInt(rect.height)
]
}
export function computeWidth (parentWidth, left, right) {
return parentWidth - left - right
}
export function computeHeight (parentHeight, top, bottom) {
return parentHeight - top - bottom
}
export function restrictToBounds (value, min, max) {
if (min !== null && value < min) {
return min
}
if (max !== null && max < value) {
return max
}
return value
}
import { Message } from 'element-ui'
let util = {}
util.cloneText = function(message) {
let input = document.createElement('input')
input.value = message
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input)
Message.success('复制成功')
}
util.getBeforeDate = function(sign = '-') {
let day = new Date();
let month = day.getMonth() + 1;
let date = day.getDate();
if (month < 10) month = '0' + month;
if (date < 10) date = '0' + date;
var s = day.getFullYear() + sign + month + sign + date;
return s;
}
util.getBeforeMonth = function(days) {
let month = new Date().getMonth() + 1;
let year = new Date().getFullYear();
let arr = new Array();
for (let i = 0; i < days; i++) {
if (month <= 0) {
year = year - 1;
month = month + 12;
}
if (month < 10) month = '0' + month;
arr[i] = year + '年' + month + '月'
month--
}
return arr;
}
export default util
\ No newline at end of file
<template>
<div class="scrm-main">
<div class="channel-main scrm-box-f">
<div class="chanel-form-title">基本信息</div>
<div class="chanel-form-box">
<el-form
ref="codeForm"
:model="addCodeForm"
class="code-body-form"
label-width="120px"
:rules="baseRules"
>
<el-row>
<el-form-item label="渠道名称" prop="name">
<el-input
size="small"
v-model="addCodeForm.name"
placeholder="请输入渠道名称"
></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注">
<el-input
size="small"
v-model="addCodeForm.name"
placeholder="请输入备注"
></el-input>
<div class="form-tips">设置备注,便于后续管理查找</div>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="自动通过验证">
<el-switch
v-model="addCodeForm.value"
active-color="#5850FF"
inactive-color="#999999"
>
</el-switch>
<span class="form-tips-btn">开启后,客户添加使用人员无需好友验证</span>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="选择标签">
<el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择标签</el-button
>
<span class="form-tips-btn">已选择<span>8</span>个标签</span>
<div class="el-input-tag input-tag-wrapper">
<el-tag
v-for="(tag, idx) in innerTags"
:key="idx"
closable
:disable-transitions="false"
@close="remove(tag)"
>
{{ tag.staffName }}
</el-tag>
</div>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="选择专员">
<el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择专员</el-button
>
<span class="form-tips-btn">已选择<span>8</span>人</span>
<div class="el-input-tag input-tag-wrapper">
<el-tag
v-for="(tag, idx) in innerTags"
:key="idx"
closable
:disable-transitions="false"
@close="remove(tag)"
>
{{ tag.staffName }}
</el-tag>
</div>
</el-form-item>
</el-row>
</el-form>
</div>
</div>
<div class="channel-main-welcome scrm-box-f">
<div class="chanel-form-title">欢迎语</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px',
}"
>
<el-button type="primary">返回</el-button>
<el-button type="primary">提交</el-button>
<el-button type="primary">取消</el-button>
<el-button
type="primary"
v-show="active == 2 && statusQrcode != 'SUCCESS'"
@click="handleNext"
>确定</el-button
>
<el-button
type="primary"
v-show="active == 2 && statusQrcode == 'SUCCESS'"
@click="handleNext"
>下一步</el-button
>
</div>
</div>
</template>
<script>
export default {
name: "addCode",
data() {
return {
addCodeForm: {},
footerLeft: 0,
footerWidth: 0,
innerTags: [{ staffName: "等级考试" }],
};
},
methods: {},
mounted() {
this.footerLeft = document.querySelector(".base-container-right").offsetLeft;
this.footerWidth = document.documentElement.clientWidth - this.footerLeft;
}
};
</script>
<style lang="scss" scoped>
.channel-main-welcome {
margin-top: 20px;
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.chanel-form-title {
padding: 20px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 16px;
border-bottom: 1px solid #d8d8d8;
}
.code-body-form {
padding: 20px;
.form-tips {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
}
.form-tips-btn {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
margin-left: 10px;
> span {
color: #5850ff;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
flex-wrap: wrap;
line-height: 36px;
height: 36px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 350px;
display: flex;
align-items: center;
margin-top: 6px;
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
}
}
</style>
\ No newline at end of file
<template>
<div>
<div class="form-header">
<el-button type="primary" size="small" icon="el-icon-add">新建渠道活码</el-button>
</div>
<div class="form-panel scrm-box-f">
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="80px"
>
<el-row>
<el-form-item size="small" label="渠道名称">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入渠道名称"
>
</el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(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>
</div>
<template slot="otherOptions" slot-scope="scope">
<el-popover placement="top" width="180" trigger="hover">
<p>启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:</p>
<p>1. 角色管理-创建角色</p>
<p>2. 选择员工账户-修改角色</p>
<el-switch
:size="size"
slot="reference"
v-model="scope.scope.statusName"
active-value="启用"
inactive-value="禁用"
@change="(e) => handleSwitchChange(e, scope.scope)"
></el-switch>
</el-popover>
</template>
</GLTable>
</div>
</div>
</template>
<script>
export default {
name: "channelList",
data() {
return {
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "渠道名称",
prop: "staffName",
},
{
label: "昨日新增客户数",
prop: "entmicroName",
minWidth: "100px",
},
{
label: "总新增客户数",
prop: "roleName",
},
{
label: "使用人员",
prop: "staffPhone",
width: "130px",
},
{
label: "活码",
prop: "merchantName",
},
{
label: "标签",
prop: "belongingEntmicroName",
},
{
label: "创建时间",
prop: "statusName",
},
{
label: "操作",
prop: "optionBtns",
width: "140px",
addHtml: "optionBtns",
fixed: "right",
},
{
label: "启用开关",
prop: "otherOptions",
width: "80px",
addHtml: "otherOptions",
fixed: "right",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
handleSearch() {},
},
};
</script>
<style lang="scss" scoped>
.form-header {
margin-bottom: 20px;
}
.form-panel {
padding: 10px;
}
</style>
\ No newline at end of file
<template>
<div class="channel-main scrm-box-f">
<div class="scrm-flex">
<el-radio-group v-model="timeRadio" size="mini">
<el-radio-button label="1">昨天</el-radio-button>
<el-radio-button label="2">近1周</el-radio-button>
<el-radio-button label="3">近2周</el-radio-button>
<el-radio-button label="4">近1个月</el-radio-button>
</el-radio-group>
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="80px"
>
<el-form-item size="small" label="添加时间">
<el-date-picker
v-model="tableSearchForm.time"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item size="small" label="渠道名称">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入渠道名称"
>
</el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="channel-chart">
<div class="channel-chart-box">
<div class="channel-chart-title">新增客户走势</div>
<div class="channel-chart-container">
<linechart></linechart>
</div>
</div>
<div class="channel-chart-desc">
<div class="chart-desc">
<div class="chart-desc-title">
<div class="chart-title-time">昨日</div>
<div class="chart-title-num">各渠道新增客户数</div>
</div>
<div class="chart-desc-item" v-for="(item,index) in chartItem" :key="index">
<div class="chart-item-title"><span>-</span> {{item.name}}</div>
<div class="chart-item-num">{{item.num}}</div>
</div>
</div>
<div>
<div class="chart-desc-add">+选择查看渠道</div>
<div class="chart-desc-addNum">最多同时查看8个渠道数据</div>
</div>
</div>
</div>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
</GLTable>
</div>
</template>
<script>
import linechart from "./linechart";
export default {
name: "channelStatistics",
components: {
linechart
},
data() {
return {
chartItem: [{
name: '到店咨询客户',
num: 10
},{
name: '到店咨询客户',
num: 10
},{
name: '到店咨询客户',
num: 10
}],
timeRadio: 1,
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "渠道名称",
prop: "staffName",
},
{
label: "新增客户数",
prop: "entmicroName",
minWidth: "100px",
},
{
label: "留存客户数",
prop: "roleName",
},
{
label: "日期",
prop: "staffPhone",
width: "130px",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {},
};
</script>
<style lang="scss" scoped>
.channel-main {
padding: 10px;
}
.channel-chart {
display: flex;
.channel-chart-desc {
width: 300px;
min-height: 310px;
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 30px;
.chart-desc-title {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
.chart-title-time {
color: #5850ff;
}
}
.chart-desc-item {
display: flex;
justify-content: space-between;
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 10px;
}
.chart-desc-add {
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
text-align: center;
}
.chart-desc-addNum {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
text-align: center;
}
}
&-box {
flex: 1;
.channel-chart-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
}
.channel-chart-container {
margin-top: 20px;
}
}
}
</style>
\ No newline at end of file
<template>
<div id="channel-main" class="chart-line"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
name: "linechart",
data() {
return {};
},
methods: {
getChart() {
let chartDom = document.getElementById("channel-main");
let myChart = echarts.init(chartDom);
let option;
option = {
legend: {
left: "auto",
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
xAxis: {
type: "category",
boundaryGap: false,
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
},
yAxis: {
type: "value",
},
series: [
{
name: "Email",
type: "line",
stack: "Total",
data: [120, 132, 101, 134, 90, 230, 210],
},
{
name: "Union Ads",
type: "line",
stack: "Total",
data: [220, 182, 191, 234, 290, 330, 310],
},
{
name: "Video Ads",
type: "line",
stack: "Total",
data: [150, 232, 201, 154, 190, 330, 410],
},
{
name: "Direct",
type: "line",
stack: "Total",
data: [320, 332, 301, 334, 390, 330, 320],
},
{
name: "Search Engine",
type: "line",
stack: "Total",
data: [820, 932, 901, 934, 1290, 1330, 1320],
},
],
};
option && myChart.setOption(option);
},
},
mounted() {
this.getChart();
},
};
</script>
<style scoped lang="scss">
.chart-line {
height: 300px;
}
</style>
\ No newline at end of file
<template>
<div class="channel-main">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="渠道码列表" name="first"></el-tab-pane>
<el-tab-pane label="数据统计" name="second"></el-tab-pane>
</el-tabs>
<channel-list v-show="activeName == 'first'"></channel-list>
<channel-statistics v-show="activeName == 'second'"></channel-statistics>
</div>
</template>
<script>
import channelList from "./components/channelList";
import channelStatistics from "./components/channelStatistics";
export default {
name: 'channel',
components: {
channelList,
channelStatistics
},
data() {
return {
activeName: 'first'
}
},
methods: {
handleClick() {
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div class="channel-main scrm-box-f">
<div class="channel-header">
<el-button type="primary" size="small" @click="goBack">返回</el-button>
<el-upload action="" class="image-uploader" :before-upload="upLoadImg">
<el-button type="primary" size="small">创建活码海报</el-button>
</el-upload>
</div>
<div class="poster-body">
<div
class="poster-item"
@dblclick="setPoster"
@mouseenter="item.show = true"
@mouseleave="item.show = false"
v-for="(item, index) in posterList"
:key="index"
>
<div class="poster-del" v-show="item.show">
<img src="@/assets/img/del.png" />
</div>
<div class="poster-item-box">
<div
class="poster-image"
v-if="imgWidth"
:style="{
background: 'url(' + img_url + ')',
width: imgWidth + 'px',
height: imgHeight + 'px',
}"
></div>
</div>
<div class="poster-item-link">下载海报</div>
</div>
</div>
<el-dialog
title="创建活码海报"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<div class="poster-draggable-title">拖动活码可调整活码位置</div>
<div class="poster-draggable">
<div
class="poster-image"
v-if="dragHeight"
:style="{
background: 'url(' + img_url + ')',
height: dragHeight + 'px',
}"
>
<vue-draggable-resizable
:w="w1"
:h="h1"
:x="x1"
:y="y1"
:min-width="20"
:min-height="20"
class="img_cl"
:parent="true"
@dragging="onDrag"
@resizing="onResize"
:customId="index"
@activated="onActivated"
>
</vue-draggable-resizable>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import VueDraggableResizable from "@/components/vue-draggable-resizable";
import "@/components/vue-draggable-resizable.css";
export default {
name: "poster",
components: {
VueDraggableResizable,
},
data() {
return {
dialogVisible: false,
posterList: [{ show: false }, { show: false }],
img_url: "",
dragHeight: 0,
imgWidth: 0,
imgHeight: 0,
x1: 0,
y1: 0,
w1: 50,
h1: 50,
};
},
methods: {
goBack() {},
setPoster() {
this.dialogVisible = true;
},
enterPoster() {},
leavePoster() {},
upLoadImg(file) {
let fileName = file.name;
if (file.name.lastIndexOf(".") === -1) {
this.$message.info("路径不正确");
return false;
}
let AllImgExt = ".jpg|.jpeg|.gif|.bmp|.png|.swf";
let extName = file.name.substring(file.name.lastIndexOf(".")).toLowerCase();
if (AllImgExt.indexOf(extName + "|") === -1) {
this.$message.info("图片格式不正确");
return false;
}
// if (fileSize < 3145728) {
if (window.FileReader) {
let reader = new FileReader();
let self = this;
reader.readAsDataURL(file);
reader.onload = (img) => {
console.log(file);
let type = fileName.split(".")[1];
let imgUrl = img.target.result.split(",")[1];
// self.loadingImg = true;
self.$apis.common
.pictureUpload({
file: `${type}@${imgUrl}`,
})
.then((res) => {
if (res) {
self.accountAddForm.merchantFiles.push({
fileUrl: res,
fileName: "",
});
}
});
};
}
},
onDrag(a, b, c, d, e) {
console.log(a, b, c, d, e);
},
onActivated(index) {
console.log(index);
},
onResize() {},
getPoster() {
let img_url = "https://img1.baidu.com/it/u=3246628741,3439955235&fm=26&fmt=auto";
this.img_url = img_url;
let img = new Image();
img.src = img_url;
let self = this;
img.onload = function () {
if (img.width > img.height) {
self.imgWidth = 280;
self.imgHeight = (img.height * 280) / img.width;
} else {
self.imgHeight = 280;
self.imgWidth = (img.width * 280) / img.height;
}
};
},
getDraggable() {
let img_url = "https://img1.baidu.com/it/u=3246628741,3439955235&fm=26&fmt=auto";
let img = new Image();
img.src = img_url;
let self = this;
img.onload = function () {
self.dragHeight = (img.height * 300) / img.width;
};
},
},
mounted() {
this.getPoster();
this.getDraggable();
},
};
</script>
<style lang="scss" scoped>
.channel-main {
padding: 10px 20px;
}
.image-uploader {
display: inline-block;
margin-left: 20px;
}
.poster-draggable-title {
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
text-align: center;
margin-bottom: 10px;
}
.poster-draggable {
display: flex;
justify-content: center;
.poster-image {
background-size: 100% 100%;
width: 375px;
.img_cl {
background-image: url("../../assets/img/qrcode.png");
background-size: 100% 100%;
}
}
}
.poster-body {
display: flex;
flex-wrap: wrap;
margin-top: 20px;
.poster-item {
margin: 0px 15px 20px 0px;
position: relative;
overflow: hidden;
.poster-del {
transition: all 1s ease;
position: absolute;
right: -52px;
top: -52px;
width: 104px;
height: 104px;
border-radius: 50%;
background: rgba($color: #5850ff, $alpha: 0.15);
text-align: center;
line-height: 104px;
img {
width: 20px;
height: auto;
margin-top: 60px;
margin-right: 40px;
cursor: pointer;
}
}
&-box {
width: 300px;
height: 300px;
background: #f7f7f7;
border-radius: 8px;
display: flex;
justify-content: center;
align-items: center;
.poster-image {
background-size: 100% 100%;
width: 300px;
height: 300px;
.img_cl {
background-image: url("../../assets/img/qrcode.png");
background-size: 100% 100%;
}
}
}
&-link {
margin-top: 10px;
text-align: center;
font-size: 14px;
font-weight: 500;
color: #5850ff;
line-height: 20px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="channel-main scrm-box-f">
<div><el-button type="primary" size="small" @click="goback">返回</el-button></div>
<div class="detail-form">
<el-form :inline="true" :model="detailForm" label-width="120px">
<el-row><el-form-item size="small" label="渠道名称:"> </el-form-item></el-row>
<el-row><el-form-item size="small" label="备注:"> </el-form-item></el-row>
<el-row
><el-form-item size="small" label="使用员工:">
<div class="form-row">
<div class="emp-item">收到回复</div>
<div class="emp-item">收到回复</div>
</div> </el-form-item
></el-row>
<el-row
><el-form-item size="small" label="标签:">
<div class="form-row">
<div class="tag-item">龙湖</div>
<div class="tag-item">龙湖龙湖龙湖</div>
</div>
</el-form-item></el-row
>
</el-form>
<div class="count-panel">
<div class="count-panel-item">
<div class="count-item-title">昨日新增客户</div>
<div class="count-item-num">75人</div>
<img src="@/assets/img/channel/count1.png" class="count-item-icon" />
</div>
<div class="count-panel-item">
<div class="count-item-title">总新增客户</div>
<div class="count-item-num">75人</div>
<img src="@/assets/img/channel/count2.png" class="count-item-icon" />
</div>
<div class="count-panel-item">
<div class="count-item-title">
<span>留存客户总数</span>
<el-popover
placement="top"
title="说明"
width="200"
trigger="hover"
content="该渠道所有扫码新增的客户中,目前未删好友的客户数"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="count-item-num">75人</div>
<img src="@/assets/img/channel/count3.png" class="count-item-icon" />
</div>
</div>
</div>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
:hasNum="false"
>
</GLTable>
</div>
</template>
<script>
export default {
name: "store",
data() {
return {
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "渠道名称",
prop: "staffName",
},
{
label: "新增客户数",
prop: "entmicroName",
minWidth: "100px",
},
{
label: "留存客户数",
prop: "roleName",
},
{
label: "日期",
prop: "staffPhone",
width: "130px",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
goback() {},
},
};
</script>
<style lang="scss" scoped>
.channel-main {
padding: 20px;
.detail-form {
margin-top: 10px;
.form-row {
display: flex;
margin-top: 5px;
.tag-item {
display: inline-block;
border-radius: 4px;
border: 1px solid #999999;
text-align: center;
min-width: 76px;
padding: 8px 6px;
line-height: 14px;
box-sizing: border-box;
font-size: 14px;
font-weight: 400;
color: #999999;
margin-right: 5px;
}
.emp-item {
position: relative;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
padding-left: 12px;
margin-right: 25px;
&::before {
content: "";
position: absolute;
top: 6px;
left: 0px;
width: 8px;
height: 8px;
background: #5850ff;
border-radius: 50%;
}
}
}
.count-panel {
display: flex;
&-item {
position: relative;
margin: 10px 20px 20px 0px;
padding: 20px;
box-sizing: border-box;
width: 216px;
height: 116px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.count-item-title {
font-size: 14px;
font-weight: 500;
color: #666666;
line-height: 20px;
}
.count-item-num {
font-size: 26px;
font-weight: 600;
color: #333333;
line-height: 26px;
margin-top: 28px;
}
.count-item-icon {
position: absolute;
width: 40px;
height: 40px;
right: 20px;
top: 20px;
}
.count-item-question {
height: 14px;
width: 14px;
margin-left: 5px;
margin-top: 3px;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="square-main">
<div class="square-main-header">
<el-button size="small" type="primary" @click="handleSearch"
><i class="el-icon-plus"></i> 导入魔方</el-button
>
<label>结合门店营销活动,指定客户创建智能营销,提高活动转化率</label>
<el-popover
placement="top"
title="说明"
width="400"
trigger="hover"
content="通过导入的客户,门店可通过智能外呼及智能短信,结合营销活动的需要向离店用户进行智能营销,可实现标准、高效的营销同时实现用户线上化。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="square-tabel scrm-box-f">
<div class="square-tabel-form">
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="120px"
>
<el-form-item size="small" label="添加时间">
<el-date-picker
v-model="tableSearchForm.time"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item size="small" label="状态">
<el-select v-model="tableSearchForm.status" placeholder="请选择">
<el-option
v-for="item in optionstatus"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item size="small" label="ID">
<el-input v-model="tableSearchForm.id" placeholder="请输入ID"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">营销配置</el-button>
</div>
</GLTable>
</div>
</div>
</div>
</template>
<script>
export default {
name: "marketing",
data() {
return {
optionstatus: [
{
value: "1",
label: "进行中",
},
{
value: "2",
label: "已完成",
},
],
dialogVisible: true,
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
tableColumns: [
{
label: "ID",
prop: "staffName",
},
{
label: "营销客户数",
prop: "entmicroName",
minWidth: "100px",
},
{
label: "状态",
prop: "roleName",
},
{
label: "创建时间",
prop: "staffPhone",
width: "130px",
},
{
label: "创建人",
prop: "staffPhone",
width: "130px",
},
{
label: "操作",
prop: "optionBtns",
width: "100px",
addHtml: "optionBtns",
fixed: "right",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
handleSearch() {},
handleDetail() {},
},
};
</script>
<style lang="scss" scoped>
.square-main-header {
display: flex;
align-items: center;
label {
margin: 0px 20px 0px 10px;
}
img {
width: 14px;
height: 14px;
vertical-align: middle;
}
}
.dialog-wrap-box {
z-index: 2001;
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background: rgba(0, 0, 0, 0.5);
.dialog-wrap-panel {
background: #ffffff;
position: absolute;
top: 50%;
left: 10%;
transform: translateY(-50%);
height: 360px;
width: 80%;
.dialog-wrap-items {
position: relative;
display: flex;
width: 100%;
height: 360px;
.footer-btn {
cursor: pointer;
position: absolute;
bottom: -50px;
left: 50%;
text-align: center;
width: 120px;
margin-left: -60px;
height: 34px;
line-height: 34px;
background: #5850ff;
border-radius: 4px;
font-size: 14px;
color: #ffffff;
}
}
.dialog-wrap-item {
padding: 30px;
width: 33.33%;
text-align: center;
border-right: 1px solid #eeeeee;
.dialog-item-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
}
img {
width: 200px;
height: auto;
margin: 20px;
}
.dialog-item-content {
font-size: 14px;
width: 240px;
margin: 0 auto;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
}
}
.square-title {
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
img {
width: 14px;
height: 14px;
margin-top: 5px;
}
}
.square-num-box {
height: 102px;
margin: 20px 0px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
display: flex;
.square-num-item {
width: 33.33%;
padding-left: 20px;
.square-num-title {
margin-top: 20px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.square-num-count {
font-size: 30px;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
line-height: 38px;
}
}
}
.coustom-box {
margin-top: 20px;
display: flex;
&-item {
box-sizing: border-box;
width: 25%;
margin-right: 20px;
padding: 20px;
height: 334px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
text-align: center;
&:last-child {
margin-right: 0px;
}
.coustom-box-title {
font-size: 20px;
font-weight: 500;
color: #424242;
line-height: 28px;
letter-spacing: 1px;
margin: 10px;
}
.coustom-echart {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
.coustom-echart-desc {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
.coustom-echart-num {
font-size: 20px;
}
}
}
.coustom-box-content {
font-size: 14px;
font-weight: 500;
color: #a3a3a3;
line-height: 20px;
text-align: left;
height: 110px;
}
.coustom-box-config {
margin: 10px auto;
display: inline-block;
border-radius: 4px;
border: 1px solid #5850ff;
padding: 7px 28px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
}
}
}
.square-tabel {
padding: 10px;
margin-top: 20px;
}
</style>
\ No newline at end of file
<template>
<div :id="coustomId" class="coustom-main"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
name: "echartCircle",
props: {
coustomId: {
type: String,
default: "",
},
bgColor1: {
type: String,
default: "",
},
bgColor2: {
type: String,
default: "",
},
coustomCount: {
type: Array,
},
},
data() {
return {};
},
methods: {
getEchart() {
const chartDom = document.getElementById(this.coustomId);
const myChart = echarts.init(chartDom);
let option;
option = {
series: [
{
type: "pie",
radius: ["40%", "70%"],
hoverAnimation: false,
avoidLabelOverlap: false,
color: [this.bgColor1, this.bgColor2],
label: {
show: false,
position: "center",
},
labelLine: {
show: false,
},
data: [{ value: 1 }, { value: 1 }],
},
],
};
option && myChart.setOption(option);
},
},
mounted() {
this.getEchart();
},
};
</script>
<style lang="scss" scoped>
.coustom-main {
width: 74px;
height: 74px;
}
</style>
\ No newline at end of file
<template>
<div id="channel-main" class="chart-line"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
name: "linechart",
data() {
return {};
},
methods: {
getChart() {
let chartDom = document.getElementById("channel-main");
let myChart = echarts.init(chartDom);
let option;
option = {
legend: {
left: "auto",
icon: "stack",
itemHeight: 2,
textStyle: { color: ["#5850FF", "#FF6D00"] },
itemWidth: 12,
},
color: ["#5850FF", "#FF6D00"],
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
dataZoom: [
{
type: "inside",
start: 0,
end: 20,
},
{
start: 0,
end: 20,
},
],
xAxis: {
type: "category",
boundaryGap: false,
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
},
yAxis: {
type: "value",
},
series: [
{
name: "未匹配企微",
type: "line",
lineStyle: { color: "#5850FF" },
data: [120, 132, 101, 134, 90, 230, 210],
},
{
name: "已匹配企微",
type: "line",
lineStyle: { color: "#FF6D00" },
data: [220, 182, 191, 234, 290, 330, 310],
},
],
};
option && myChart.setOption(option);
},
},
mounted() {
this.getChart();
},
};
</script>
<style scoped lang="scss">
.chart-line {
height: 300px;
}
</style>
\ No newline at end of file
<template>
<div class="form-panel scrm-box-f">
<div class="statistics-panel">
<div class="statistics-panel-item">
<div class="statistics-title">
<span>任务完成率</span>
<el-popover
placement="top"
title="说明"
width="300"
trigger="hover"
content="当前外呼任务的完成情况,分子为完成数量,分母为任务总数量。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="circle-box">
<echart-circle
bgColor1="#F0F0F0"
bgColor2="#6F76EE"
coustomId="coustomId_5"
></echart-circle>
<div class="circle-box-item">
<div class="circle-item-scale">60%</div>
<div class="circle-item-num">28000</div>
</div>
</div>
</div>
</div>
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="80px"
>
<el-row>
<el-form-item size="small" label="电话号码">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入电话号码"
>
</el-input>
</el-form-item>
<el-form-item size="small" label="发送状态">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入电话号码"
>
</el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-row>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
</div>
</GLTable>
</div>
</template>
<script>
import echartCircle from "./echartCircle";
export default {
name: "channelList",
components: {
echartCircle,
},
data() {
return {
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "用户联系方式",
prop: "staffName",
},
{
label: "发送状态",
prop: "entmicroName",
},
{
label: "发送时间",
prop: "roleName",
},
{
label: "操作",
prop: "optionBtns",
width: "140px",
addHtml: "optionBtns",
fixed: "right",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
handleSearch() {},
},
};
</script>
<style lang="scss" scoped>
.form-header {
margin-bottom: 20px;
}
.form-panel {
padding: 20px;
.statistics-panel {
display: flex;
&-item {
width: 33.33%;
.statistics-title {
font-size: 16px;
font-weight: 500;
color: #424242;
line-height: 22px;
img {
width: 14px;
height: 14px;
margin-left: 10px;
margin-top: 4px;
}
}
.circle-box {
margin: 20px 0px;
display: flex;
align-items: center;
.circle-box-item {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
.circle-item-num {
font-size: 22px;
font-weight: 600;
color: #333333;
line-height: 30px;
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="channel-main scrm-box-f">
<div>
<div class="statistics-panel">
<div class="statistics-panel-item">
<div class="statistics-title">
<span>任务完成率</span>
<el-popover
placement="top"
title="说明"
width="300"
trigger="hover"
content="当前外呼任务的完成情况,分子为完成数量,分母为任务总数量。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="circle-box">
<echart-circle
bgColor1="#F0F0F0"
bgColor2="#6F76EE"
coustomId="coustomId_1"
></echart-circle>
<div class="circle-box-item">
<div class="circle-item-scale">60%</div>
<div class="circle-item-num">28000</div>
</div>
</div>
</div>
<div class="statistics-panel-item">
<div class="statistics-title">
<span>号码接通率</span>
<el-popover
placement="top"
title="说明"
width="300"
trigger="hover"
content="当前外呼任务的呼叫接通情况,分子为接通的电话数,分母为外呼的总通话数据量,其中分母不包括未外呼的电话,如空号不外呼、达到外呼次数限制等。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="circle-box">
<echart-circle
bgColor1="#F0F0F0"
bgColor2="#5AD8A6"
coustomId="coustomId_2"
></echart-circle>
<div class="circle-box-item">
<div class="circle-item-scale">60%</div>
<div class="circle-item-num">28000</div>
</div>
</div>
</div>
<div class="statistics-panel-item">
<div class="statistics-title">
<span>号码异常</span>
<el-popover
placement="top"
title="说明"
width="300"
trigger="hover"
content="当前外呼任务中,对话到达了在对话流中勾选了“标记为完结节点”的节点,分子为已标记完结的通话数量,分母为接通的电话数量。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="circle-box">
<echart-circle
bgColor1="#5AD8A6"
bgColor2="#7D82EF"
coustomId="coustomId_3"
></echart-circle>
<div class="circle-box-item">
<div class="circle-item-num">280</div>
<div class="circle-item-scale">
<span>空号:97</span><span>停机:20</span>
</div>
</div>
</div>
</div>
</div>
<div>
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="80px"
>
<el-form-item size="small" label="电话号码">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入电话号码"
>
</el-input>
</el-form-item>
<el-form-item size="small" label="是否应答">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入渠道名称"
>
</el-input>
</el-form-item>
<el-form-item size="small" label="通话状态">
<el-input
size="small"
v-model="tableSearchForm.merchantLoginAccount"
placeholder="请输入渠道名称"
>
</el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
</div>
</div>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
</GLTable>
</div>
</template>
<script>
import echartCircle from "./echartCircle";
export default {
name: "messageStatistics",
components: {
echartCircle,
},
data() {
return {
chartItem: [
{
name: "到店咨询客户",
num: 10,
},
{
name: "到店咨询客户",
num: 10,
},
{
name: "到店咨询客户",
num: 10,
},
],
timeRadio: 1,
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "用户联系方式备份",
prop: "staffName",
},
{
label: "最后拨打时间",
prop: "entmicroName",
},
{
label: "通话时长",
prop: "roleName",
},
{
label: "是否应答",
prop: "staffPhone",
},
{
label: "通话状态",
prop: "staffPhone",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {},
};
</script>
<style lang="scss" scoped>
.channel-main {
padding: 20px;
.statistics-panel {
display: flex;
&-item {
width: 33.33%;
.statistics-title {
font-size: 16px;
font-weight: 500;
color: #424242;
line-height: 22px;
img {
width: 14px;
height: 14px;
margin-left: 10px;
margin-top: 4px;
}
}
.circle-box {
margin: 20px 0px;
display: flex;
align-items: center;
.circle-box-item {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
span {
display: inline-block;
position: relative;
padding-left: 10px;
margin-right: 15px;
&:last-child {
&::before {
background: #7d82ef;
}
}
&::before {
content: "";
position: absolute;
border-radius: 50%;
top: 8px;
left: 0px;
width: 6px;
height: 6px;
background: #5ad8a6;
}
}
.circle-item-num {
font-size: 22px;
font-weight: 600;
color: #333333;
line-height: 30px;
}
}
}
}
}
}
.channel-chart {
display: flex;
.channel-chart-desc {
width: 300px;
min-height: 310px;
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 30px;
.chart-desc-title {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
.chart-title-time {
color: #5850ff;
}
}
.chart-desc-item {
display: flex;
justify-content: space-between;
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-top: 10px;
}
.chart-desc-add {
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
text-align: center;
}
.chart-desc-addNum {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
text-align: center;
}
}
&-box {
flex: 1;
.channel-chart-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
}
.channel-chart-container {
margin-top: 20px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="overview-main">
<div class="overview-header">
<span>引流获客概览</span>
<el-popover
placement="top"
title="说明"
width="400"
trigger="hover"
content="引流获客整合通过整合活码营销、企微魔方,可分别针对到店用户及离店用户提供企微线上化方案。帮助门店迅速的形成企微客户池,为后续营销活动搭建起稳定高频的触达通道。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="scrm-box-f store-panel">
<div class="store-panel-item">
<div class="store-item">
<div class="store-item-s">
<div class="store-item-title">到店用户线上化</div>
<el-button type="primary" size="small">配置活码</el-button>
</div>
<div class="store-item-s">
<div class="store-item-icon">
<img src="@/assets/img/overview/h1.png" />
渠道活码
</div>
<ul class="store-item-ul">
<li>自动分配跟进员工</li>
<li>区分渠道统计效果</li>
<li>自动回复指定活动</li>
</ul>
</div>
<div class="store-item-s">
<div class="store-item-icon">
<img src="@/assets/img/overview/h2.png" />
海报活码
</div>
<ul class="store-item-ul">
<li>灵活搭配门店活动</li>
<li>可作为门店易拉宝</li>
<li>独立统计活动效果</li>
</ul>
</div>
</div>
</div>
<div class="store-panel-item">
<div class="store-item">
<div class="store-item-s">
<div class="store-item-title">离店用户线上化</div>
<el-button type="primary" size="small">企微魔方</el-button>
</div>
<div class="store-item-s">
<div class="store-item-icon">
<img src="@/assets/img/overview/h3.png" />
智能外呼
</div>
<ul class="store-item-ul">
<li>意向判断、精准记录</li>
<li>话术灵活、语气灵动</li>
<li>多路并发、提效降本</li>
</ul>
</div>
<div class="store-item-s">
<div class="store-item-icon">
<img src="@/assets/img/overview/h4.png" />
客户分群
</div>
<ul class="store-item-ul">
<li>客户分群推荐策略</li>
<li>自动分配员工跟进</li>
<li>自动化引流获客</li>
</ul>
</div>
</div>
</div>
</div>
<div class="user-panel">
<div class="user-panel-line scrm-box-f">
<div class="echart-title">用户线上化趋势</div>
<div class="echart-count-panel">
<div class="echart-count-item">
<div class="echart-icon"><img src="@/assets/img/overview/h5.png" /></div>
<div class="echart-num-desc">
<div class="echart-num-1">客户总数</div>
<div class="echart-num-2">1,242,323人</div>
</div>
</div>
<div class="echart-count-item">
<div class="echart-icon"><img src="@/assets/img/overview/h6.png" /></div>
<div class="echart-num-desc">
<div class="echart-num-1">匹配企微客户数</div>
<div class="echart-num-2">1,242,323人</div>
</div>
</div>
</div>
<linechart></linechart>
</div>
<div class="user-panel-balance scrm-box-f">
<div class="balance-title">资源剩余</div>
<div class="balance-image"><img src="@/assets/img/overview/balance1.png" /></div>
<div class="balance-image"><img src="@/assets/img/overview/balance2.png" /></div>
</div>
</div>
<div class="statistics-main">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="短信营销统计" name="first"></el-tab-pane>
<el-tab-pane label="外呼营销统计" name="second"></el-tab-pane>
<message-list v-show="activeName == 'first'"></message-list>
<message-statistics v-show="activeName == 'second'"></message-statistics>
</el-tabs>
</div>
</div>
</template>
<script>
import messageStatistics from "./components/messageStatistics";
import messageList from "./components/messageList";
import linechart from "./components/linechart";
export default {
name: "channel",
components: {
messageStatistics,
messageList,
linechart,
},
data() {
return {
activeName: "first",
};
},
methods: {
handleClick() {},
},
};
</script>
<style lang="scss" scoped>
.overview-header {
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
img {
width: 14px;
height: auto;
margin-top: 3px;
margin-left: 6px;
}
}
.store-panel {
margin: 20px auto;
padding: 20px;
display: flex;
.store-panel-item {
height: 200px;
background: rgba(245, 244, 250, 0.7);
border-radius: 8px;
width: 50%;
&:first-child {
margin-right: 20px;
}
.store-item {
display: flex;
max-width: 580px;
}
.store-item-s {
width: 33.33%;
padding: 30px 20px;
.store-item-title {
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
margin: 10px 0px 70px;
}
.store-item-icon {
display: flex;
align-items: center;
img {
width: 40px;
height: 40px;
margin-right: 6px;
}
}
.store-item-ul {
padding-left: 18px;
margin-top: 20px;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 30px;
li {
color: #999999;
}
}
}
}
}
.user-panel {
display: flex;
&-line {
flex: 1;
padding: 20px;
.echart-title {
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
}
.echart-count-panel {
margin-top: 30px;
margin-bottom: 40px;
display: flex;
.echart-count-item {
display: flex;
margin-right: 40px;
.echart-icon {
width: 48px;
height: 48px;
margin-right: 10px;
}
.echart-num-desc {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
.echart-num-2 {
font-size: 22px;
margin-top: 4px;
}
}
}
}
}
&-balance {
width: 275px;
margin-left: 20px;
padding: 20px;
.balance-title {
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 28px;
letter-spacing: 1px;
}
.balance-image {
width: 160px;
height: 160px;
margin: 20px auto;
}
}
}
@media screen and (max-width: 1340px) {
.store-item-ul {
font-size: 12px!important;
}
.store-item-s {
padding: 10px!important;
}
.store-item-title {
font-size: 17px!important;
}
}
</style>
\ No newline at end of file
<template>
<div :id="coustomId" class="coustom-main"></div>
</template>
<script>
import * as echarts from "echarts";
export default {
name: "echartCircle",
props: {
coustomId: {
type: String,
default: "",
},
bgColor: {
type: String,
default: "",
},
coustomCount: {
type: Array,
},
},
data() {
return {};
},
methods: {
getEchart() {
const chartDom = document.getElementById(this.coustomId);
const myChart = echarts.init(chartDom);
let option;
option = {
series: [
{
type: "pie",
radius: ["40%", "70%"],
hoverAnimation: false,
avoidLabelOverlap: false,
color: ["rgba(0,0,0,.06)", this.bgColor],
label: {
show: false,
position: "center",
},
labelLine: {
show: false,
},
data: [{ value: 1 }, { value: 1 }],
},
],
};
option && myChart.setOption(option);
},
},
mounted() {
this.getEchart();
},
};
</script>
<style lang="scss" scoped>
.coustom-main {
width: 64px;
height: 64px;
}
</style>
\ No newline at end of file
<template>
<div class="square-main">
<el-dialog
title="选择跟进专员"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<el-form :inline="true" :model="tableSearchForm" label-width="80px">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.name" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
:hasNum="false"
>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "selectEmp",
data() {
return {
dialogVisible: false,
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "姓名",
prop: "staffName",
},
{
label: "部门",
prop: "entmicroName",
},
{
label: "测试专员类型",
prop: "roleName",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
init() {
this.dialogVisible = true;
},
},
};
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<template>
<div class="square-main">
<div class="drainage-wrap scrm-box-f">
<div class="drainage-title">客户引流企微</div>
<div class="drainage-panel">
<div class="drainage-config-wrap">
<div class="drainage-item-label">
平台通过智能外呼精准获取客户意向,结束通话后自动下发引流短信,用户一键接入微信生态。用户接入企微后可领取会员权益卡,实现高效锁客及后续营销策略提供精准触达的通道。
</div>
<div class="drainage-item-switch">
<el-switch v-model="value" active-color="#5850FF" inactive-color="#999999">
</el-switch>
</div>
</div>
<div class="config-title">
<label>编辑配置</label>
<i class="el-icon-edit-outline"></i>
</div>
<div class="config-market">
<div class="config-market-item checked">
<div class="config-market-title">首次营销</div>
<div class="config-market-select">
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon1.png" />
</div>
<div class="config-market-name">非企微客户</div>
</div>
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon2.png" />
</div>
<div class="config-market-name">导入客户信息后</div>
</div>
<div class="config-market-s1">
<div class="config-market-icon">
<img src="@/assets/img/square/icon3.png" />
</div>
<div class="config-market-name">首次营销</div>
</div>
</div>
</div>
<div class="config-market-item">
<el-switch
v-model="value1"
active-color="#5850FF"
inactive-color="#999999"
class="config-switch-icon"
></el-switch>
<div class="config-market-title">二次营销</div>
<div class="config-market-select">
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon1.png" />
</div>
<div class="config-market-name">非企微客户</div>
</div>
<div class="config-market-s1">
<div class="config-line"></div>
<div class="config-market-icon">
<img src="@/assets/img/square/icon4.png" />
</div>
<div class="config-market-name">首次营销30天后</div>
</div>
<div class="config-market-s1">
<div class="config-market-icon">
<img src="@/assets/img/square/icon5.png" />
</div>
<div class="config-market-name">再次营销</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="drainage-wrap scrm-box-f">
<div class="drainage-title">营销配置</div>
<div class="drainage-form">
<div class="drainage-form-item">
<label>跟进员工</label>
<div class="el-input-tag input-tag-wrapper">
<el-tag
v-for="(tag, idx) in innerTags"
:key="idx"
closable
:disable-transitions="false"
@close="remove(tag)"
>
{{ tag.staffName }}
</el-tag>
</div>
<el-button size="small" @click="handleAddEmp"
><i class="el-icon-plus"></i> 选择跟进专员</el-button
>
<div class="drainage-coutom-count">已经选择2人</div>
</div>
</div>
</div>
<select-emp ref="selectEmpForm"></select-emp>
</div>
</template>
<script>
import selectEmp from "./components/selectEmp";
export default {
name: "drainage",
components: {
selectEmp
},
data() {
return {
dialogVisible: true,
value: false,
value1: false,
innerTags: [{ staffName: "都是" }],
};
},
methods: {
remove() {},
handleAddEmp() {
this.$refs.selectEmpForm.init()
}
},
};
</script>
<style lang="scss" scoped>
.drainage-wrap {
margin-bottom: 20px;
.drainage-title {
padding-left: 20px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 57px;
height: 57px;
border-bottom: 1px solid #d8d8d8;
}
.drainage-form {
padding: 20px;
.drainage-form-item {
display: flex;
label {
width: 120px;
text-align: right;
margin-right: 20px;
height: 36px;
line-height: 36px;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
flex-wrap: wrap;
line-height: 36px;
height: 36px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 350px;
display: flex;
align-items: center;
margin-right: 20px;
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
}
.drainage-coutom-count {
font-size: 14px;
font-weight: 400;
color: #7d7d7d;
line-height: 36px;
margin-left: 20px;
}
}
.drainage-panel {
padding: 20px;
.drainage-config-wrap {
display: flex;
justify-content: space-between;
align-items: center;
.drainage-item-label {
width: 50%;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
.config-title {
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
margin: 20px 0px;
i {
margin-left: 6px;
}
}
.config-market {
display: flex;
&-item {
position: relative;
padding: 10px;
width: 50%;
height: 150px;
background: #f6f6ff;
border-radius: 4px;
opacity: 0.8;
box-sizing: border-box;
&:first-child {
margin-right: 20px;
}
&.checked {
border: 1px solid #5850ff;
.config-market-title {
color: #5850ff;
}
.config-market-icon {
background: linear-gradient(
153deg,
#8085ef 0%,
#6f76ee 100%,
#6f76ee 100%
) !important;
}
.config-market-name {
color: #333333 !important;
}
.config-line {
border: 1px solid #5850ff !important;
}
}
.config-market-title {
font-size: 16px;
font-weight: 400;
color: #999999;
line-height: 22px;
text-align: center;
}
.config-switch-icon {
position: absolute;
right: 10px;
top: 10px;
}
.config-market-select {
display: flex;
.config-market-s1 {
width: 33.33%;
margin: 0 auto;
text-align: center;
position: relative;
.config-line {
position: absolute;
top: 45px;
right: -30%;
width: 60%;
border: 1px solid #999999;
}
.config-market-icon {
width: 56px;
height: 56px;
background: #999999;
border-radius: 50%;
margin: 20px auto 10px;
}
.config-market-name {
font-size: 14px;
font-weight: 400;
color: #adadad;
line-height: 20px;
}
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="squre-main">
<el-button type="primary" size="small" @click="goBack">返回</el-button>
<div class="squre-safe-panel scrm-box-f">
<div class="safe-upload-panel" id="drop_area">
<el-upload action="" class="image-uploader" :before-upload="upLoadImg">
<div class="safe-upload-icon"><i class="el-icon-tickets"></i></div>
</el-upload>
<div class="safe-upload-tips">点击或将文件拖拽到这里上传</div>
<div class="safe-upload-xl">支持扩展名:.csv .xls .xlsl</div>
<div class="safe-upload-link">下载模版</div>
</div>
<div class="safe-upload-footer">
<el-button type="primary" size="small">提交</el-button>
<el-button size="small">返回</el-button>
</div>
</div>
<div class="squre-safe-panel scrm-box-f">
<div class="squre-safe-title">数据隐私&安全</div>
<div class="swiper-container">
<div class="swiper-wrap">
<div class="swiper-wrap-item">加密传输</div>
<div class="swiper-wrap-item">脱敏传输</div>
<div class="swiper-wrap-item">去标识化</div>
<div class="swiper-wrap-item">限制访问</div>
</div>
<div class="swiper-container-panel">
<div class="swiper-container-content">
从海量数据中发现、分类和保护敏感数据,分析使用情况并进行风险预警,帮助用户防止数据泄漏和满足GDPR等合规要求
</div>
<div class="swiper-container-image">
<img src="@/assets/img/square/safe1.png" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "import",
data() {
return {
borderhover: false, //文件拖拖动到区域的hover效果
imgArr: [],
fileData: [],
};
},
methods: {
goBack() {},
enentDrop(e) {
this.borderhover = false;
e.stopPropagation();
e.preventDefault(); //必填字段
let fileData = e.dataTransfer.files;
console.log(fileData);
this.uploadFile(fileData);
},
uploadFile(file) {
let AllImgExt = ".csv|.xls|.xlsl";
let extName = file[0].name.substring(file[0].name.lastIndexOf(".")).toLowerCase();
if (file.length > 1) {
this.$message.error("只能上传一个文件");
return false;
}
if (AllImgExt.indexOf(extName + "|") === -1) {
this.$message.error("上传格式不正确");
return false;
}
},
},
mounted() {
let _this = this;
var dropbox = document.getElementById("drop_area");
dropbox.addEventListener("drop", this.enentDrop, false);
dropbox.addEventListener("dragleave", function (e) {
e.stopPropagation();
e.preventDefault();
_this.borderhover = false;
});
dropbox.addEventListener("dragenter", function (e) {
e.stopPropagation();
e.preventDefault();
_this.borderhover = true;
});
dropbox.addEventListener("dragover", function (e) {
e.stopPropagation();
e.preventDefault();
_this.borderhover = true;
});
},
};
</script>
<style lang="scss" scoped>
.squre-safe-panel {
padding: 40px;
margin-top: 20px;
.safe-upload-panel {
margin: 20px auto;
padding: 20px;
box-sizing: border-box;
width: 384px;
height: 214px;
background: rgba(0, 0, 0, 0.02);
border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.15);
text-align: center;
.safe-upload-icon {
margin: 20px 0px;
i {
font-size: 35px;
color: #5850ff;
}
}
.safe-upload-tips {
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.safe-upload-xl {
font-size: 12px;
font-weight: 400;
color: rgba(0, 0, 0, 0.45);
line-height: 20px;
}
.safe-upload-link {
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 22px;
margin-top: 10px;
cursor: pointer;
}
}
.safe-upload-footer {
width: 300px;
display: flex;
justify-content: space-between;
margin: 0 auto;
}
.squre-safe-title {
text-align: center;
font-size: 32px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 40px;
}
.swiper-container {
width: 70%;
margin: 40px auto;
.swiper-wrap {
display: flex;
justify-content: center;
text-align: center;
.swiper-wrap-item {
width: 20%;
font-size: 24px;
font-weight: 300;
color: #464646;
line-height: 32px;
letter-spacing: 2px;
}
}
.swiper-container-content {
font-size: 16px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 24px;
margin-right: 80px;
}
.swiper-container-panel {
padding: 40px;
box-sizing: border-box;
margin: 40px 0px;
height: 328px;
background: #ffffff;
box-shadow: 0px 0px 20px 0px rgba(88, 80, 255, 0.1);
border-radius: 2px;
display: flex;
justify-content: space-between;
align-items: center;
.swiper-container-image {
img {
height: 248px;
width: auto;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="squre-main">
<el-button type="primary" size="small" @click="goBack">返回</el-button>
<div class="squre-success-panel scrm-box-f">
<div class="contact-us-wrap">
<img src="@/assets/img/qrcode.png">
<div class="contact-us-about">联系我们</div>
</div>
<div class="squre-success-image"><i class="el-icon-success"></i></div>
<div class="squre-success-tips">提交成功</div>
<div class="squre-success-content">
所提交的数据已经过加密,并安全存储专属加密区。
</div>
<div class="squre-success-content">
针对导入的结果有疑问请扫码联系我们,我们将为您提供专业答疑和营销推荐。
</div>
<div class="squre-success-footer">
<div class="squre-success-item">
<div class="success-item-title">本次导入总客户数</div>
<div class="success-item-num">1,000</div>
</div>
<div class="squre-success-item">
<div class="success-item-title">新导入客户数</div>
<div class="success-item-num">1,000</div>
</div>
<div class="squre-success-item">
<div class="success-item-title">企微客户占比</div>
<div class="success-item-num">1,000</div>
</div>
</div>
</div>
<div class="custom-title">客户分群营销</div>
<div class="custom-wrap">
<div class="custom-wrap-item">
<div class="custom-wrap-itemBox">
<div class="custom-wrap-title">待添加企微客户</div>
<div class="custom-wrap-sta">
<div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div>
</div>
<div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div>
</div>
</div>
<div class="custom-wrap-content">
当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。
</div>
<div class="custom-wrap-config">营销配置</div>
</div>
</div>
<div class="custom-wrap-item">
<div class="custom-wrap-itemBox">
<div class="custom-wrap-title">待续保客户</div>
<div class="custom-wrap-sta">
<div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div>
</div>
<div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div>
</div>
</div>
<div class="custom-wrap-content">
提前给车险快到期的用户自动推荐适合该客户的优惠服务,提高客户续保率。
</div>
<div class="custom-wrap-config">敬请期待</div>
</div>
</div>
<div class="custom-wrap-item">
<div class="custom-wrap-itemBox">
<div class="custom-wrap-title">待定保客户</div>
<div class="custom-wrap-sta">
<div class="custom-count-item">
<div class="custom-count-title">属于本次导入</div>
<div class="custom-count-num">107人</div>
</div>
<div class="custom-count-item">
<div class="custom-count-title">人群累计人数</div>
<div class="custom-count-num">107人</div>
</div>
</div>
<div class="custom-wrap-content">
智能提醒用户定期保养,推荐保养项目和优惠活动,提高用户返店率。
</div>
<div class="custom-wrap-config">敬请期待</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "importResult",
data() {
return {};
},
methods: {
goBack() {},
},
};
</script>
<style lang="scss" scoped>
.squre-success-panel {
margin-top: 20px;
position: relative;
.contact-us-wrap {
position: absolute;
top: 0px;
right: 0px;
width: 144px;
height: 191px;
background: #ffffff;
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
0px 9px 28px 8px rgba(0, 0, 0, 0.05);
text-align: center;
img {
width: 124px;
height: 124px;
margin: 15px 0px;
}
.contact-us-about {
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
}
}
.squre-success-image {
padding-top: 45px;
text-align: center;
i {
font-size: 64px;
color: #73d13d;
}
}
.squre-success-tips {
text-align: center;
font-size: 24px;
font-weight: 500;
color: #000000;
line-height: 32px;
margin: 20px 0px 10px;
}
.squre-success-content {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
}
.squre-success-footer {
display: flex;
.squre-success-item {
width: 33.33%;
text-align: center;
margin: 20px auto;
.success-item-title {
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.success-item-num {
font-size: 30px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 38px;
}
}
}
}
.custom-title {
margin: 20px 0px;
font-size: 20px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
}
.custom-wrap {
display: flex;
.custom-wrap-item {
box-sizing: border-box;
width: 33.33%;
padding: 30px 0px;
text-align: center;
height: 334px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-right: 20px;
&:last-child {
margin-right: 0px;
}
.custom-wrap-itemBox {
width: 70%;
margin: 0 auto;
}
.custom-wrap-title {
font-size: 20px;
font-weight: 500;
color: #424242;
line-height: 28px;
}
.custom-wrap-sta {
display: flex;
justify-content: space-between;
margin: 20px 0px;
.custom-count-title {
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.custom-count-num {
font-size: 20px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 34px;
}
}
.custom-wrap-content {
font-size: 14px;
font-weight: 500;
color: #a3a3a3;
line-height: 20px;
text-align: left;
height: 110px;
}
.custom-wrap-config {
margin: 10px auto;
display: inline-block;
border-radius: 4px;
border: 1px solid #5850ff;
padding: 7px 28px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="square-main">
<div class="square-title">
<span>企微魔方</span>
<el-popover
placement="top"
title="说明"
width="200"
trigger="hover"
content="通过导入的客户基础信息,过滤出系统策略所匹配的目标营销人群,从而引导门店分门别类的配置营销方案,并监控实施效果。"
>
<img
src="@/assets/img/question.png"
slot="reference"
class="count-item-question"
/>
</el-popover>
</div>
<div class="square-num-box">
<div class="square-num-item">
<div class="square-num-title">客户总数</div>
<div class="square-num-count">1,230,000</div>
</div>
<div class="square-num-item">
<div class="square-num-title">企微客户数</div>
<div class="square-num-count">1,230,000</div>
</div>
<div class="square-num-item">
<div class="square-num-title">魔方导入客户数</div>
<div class="square-num-count">1,230,000</div>
</div>
</div>
<div class="square-title">客户分群营销</div>
<div class="coustom-box">
<div class="coustom-box-item">
<div class="coustom-box-title">待添加企微客户</div>
<div class="coustom-echart">
<echart-circle bgColor="#6395FA" coustomId="coustomId_1"></echart-circle>
<div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div>
<div class="coustom-echart-num">107</div>
</div>
</div>
<div class="coustom-box-content">
当前客户池中,尚未匹配到企微账号的数量。推荐使用以下营销策略,吸引用户添加企微。
</div>
<div class="coustom-box-config">营销配置</div>
</div>
<div class="coustom-box-item">
<div class="coustom-box-title">信息待完善客户</div>
<div class="coustom-echart">
<echart-circle bgColor="#5AD8A6" coustomId="coustomId_2"></echart-circle>
<div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div>
<div class="coustom-echart-num">107</div>
</div>
</div>
<div class="coustom-box-content">
当前客户池中,有企微客户尚未维护手机号码。建议批量通知对应的销售顾问维护此类客户信息。
</div>
<div class="coustom-box-config">营销配置</div>
</div>
<div class="coustom-box-item">
<div class="coustom-box-title">待续保客户</div>
<div class="coustom-echart">
<echart-circle bgColor="#5D7092" coustomId="coustomId_3"></echart-circle>
<div class="coustom-echart-desc">
<div class="coustom-echart-title">人群数量</div>
<div class="coustom-echart-num">107</div>
</div>
</div>
<div class="coustom-box-content">
提前给车险快到期的用户自动推荐适合该客户的优惠服务,提高客户续保率。
</div>
<div class="coustom-box-config">敬请期待</div>
</div>
<div class="coustom-box-item">
<div class="coustom-box-title">待定保客户</div>
<div class="coustom-echart">
<echart-circle bgColor="#5B8FF9" coustomId="coustomId_4"></echart-circle>
<div class="coustom-echart-desc">
<div class="coustom-echart-title">人群占比</div>
<div class="coustom-echart-num">10%</div>
</div>
</div>
<div class="coustom-box-content">
智能提醒用户定期保养,推荐保养项目和优惠活动,提高用户返店率。
</div>
<div class="coustom-box-config">敬请期待</div>
</div>
</div>
<div class="square-tabel scrm-box-f">
<div class="square-tabel-form">
<el-form
:inline="true"
:model="tableSearchForm"
class="follow-form-item"
label-width="120px"
>
<el-button size="small" type="primary" @click="handleSearch"
><i class="el-icon-plus"></i> 导入魔方</el-button
>
<el-form-item size="small" label="导入时间">
<el-date-picker
v-model="tableSearchForm.time"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item size="small" style="float: right">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable
ref="employeeRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</div>
</GLTable>
</div>
</div>
<div class="dialog-wrap-box" v-show="dialogVisible">
<div class="dialog-wrap-panel">
<div class="dialog-wrap-items">
<div class="dialog-wrap-item">
<div class="dialog-item-title">客户智能分群</div>
<div class="dialog-item-image">
<img src="@/assets/img/square/coutom1.png" />
</div>
<div class="dialog-item-content">
通过企微客户及导入的客户基础数据,识别针对未匹配到企微的客户系统提供全套智能引流方案。
</div>
</div>
<div class="dialog-wrap-item">
<div class="dialog-item-title">自动匹配营销策略</div>
<div class="dialog-item-image">
<img src="@/assets/img/square/coutom2.png" />
</div>
<div class="dialog-item-content">
系统识别客户所处的营销场景,如待定保、待续保,配合智能外呼及智能短信推送营销活动,降低跟进客户的成本。
</div>
</div>
<div class="dialog-wrap-item">
<div class="dialog-item-title">支持多种数据对接模式</div>
<div class="dialog-item-image">
<img src="@/assets/img/square/coutom3.png" />
</div>
<div class="dialog-item-content">
支持按需手动导入客户数据以供分析;支持API对接同步客户数据,大幅降低客户数据维护难度,提高运营时效性。
</div>
</div>
<div class="footer-btn" @click="dialogVisible = false">我知道啦</div>
</div>
</div>
</div>
</div>
</template>
<script>
import echartCircle from "./components/echartCircle";
export default {
name: "square",
components: {
echartCircle,
},
data() {
return {
dialogVisible: true,
tableSearchForm: {},
getListApi: this.$apis.channel.getListApi,
tableParams: {
listName: "data",
tableOption: false,
otherOptions: {
label: "启用开关",
},
tableColumns: [
{
label: "导入时间",
prop: "staffName",
},
{
label: "企微客户数 | 导入客户数",
prop: "entmicroName",
minWidth: "100px",
},
{
label: "新增客户数 | 导入客户数",
prop: "roleName",
},
{
label: "导入人员",
prop: "staffPhone",
width: "130px",
},
{
label: "操作",
prop: "optionBtns",
width: "100px",
addHtml: "optionBtns",
fixed: "right",
},
],
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "count" },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: [],
},
};
},
methods: {
handleSearch() {},
handleDetail() {},
},
};
</script>
<style lang="scss" scoped>
.dialog-wrap-box {
z-index: 2001;
position: fixed;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
background: rgba(0, 0, 0, 0.5);
.dialog-wrap-panel {
background: #ffffff;
position: absolute;
top: 50%;
left: 10%;
transform: translateY(-50%);
height: 360px;
width: 80%;
.dialog-wrap-items {
position: relative;
display: flex;
width: 100%;
height: 360px;
.footer-btn {
cursor: pointer;
position: absolute;
bottom: -50px;
left: 50%;
text-align: center;
width: 120px;
margin-left: -60px;
height: 34px;
line-height: 34px;
background: #5850ff;
border-radius: 4px;
font-size: 14px;
color: #ffffff;
}
}
.dialog-wrap-item {
padding: 30px;
width: 33.33%;
text-align: center;
border-right: 1px solid #eeeeee;
.dialog-item-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
}
img {
width: 200px;
height: auto;
margin: 20px;
}
.dialog-item-content {
font-size: 14px;
width: 240px;
margin: 0 auto;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
}
}
.square-title {
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
img {
width: 14px;
height: 14px;
margin-top: 5px;
}
}
.square-num-box {
height: 102px;
margin: 20px 0px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
display: flex;
.square-num-item {
width: 33.33%;
padding-left: 20px;
.square-num-title {
margin-top: 20px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
}
.square-num-count {
font-size: 30px;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
line-height: 38px;
}
}
}
.coustom-box {
margin-top: 20px;
display: flex;
&-item {
box-sizing: border-box;
width: 25%;
margin-right: 20px;
padding: 20px;
height: 334px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
text-align: center;
&:last-child {
margin-right: 0px;
}
.coustom-box-title {
font-size: 20px;
font-weight: 500;
color: #424242;
line-height: 28px;
letter-spacing: 1px;
margin: 10px;
}
.coustom-echart {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
.coustom-echart-desc {
margin-left: 10px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 22px;
.coustom-echart-num {
font-size: 20px;
}
}
}
.coustom-box-content {
font-size: 14px;
font-weight: 500;
color: #a3a3a3;
line-height: 20px;
text-align: left;
height: 110px;
}
.coustom-box-config {
margin: 10px auto;
display: inline-block;
border-radius: 4px;
border: 1px solid #5850ff;
padding: 7px 28px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 14px;
}
}
}
.square-tabel {
padding: 10px;
margin-top: 20px;
}
</style>
\ No newline at end of file
const path = require('path')
const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
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/${packageName}`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
components: resolve('src/components')
}
},
output: {
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: {
hot: true,
disableHostCheck: true,
host: process.env.VUE_APP_HOST,
port: process.env.VUE_APP_PORT,
headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
}
},
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
.rule('fonts')
.test(/.(ttf|otf|eot|woff|woff2)$/)
.use('url-loader')
.loader('url-loader')
.tap(options => {
options = {
// limit: 10000,
name: '/static/fonts/[name].[ext]'
}
return options
})
.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!