Commit fa4c939b by 张立顺

theme-color-replacer 写法修改

1 parent 5172dd5f
Showing 139 changed files with 1620 additions and 912 deletions
...@@ -3,7 +3,7 @@ module.exports = { ...@@ -3,7 +3,7 @@ module.exports = {
env: { env: {
node: true node: true
}, },
'extends': [ extends: [
'plugin:vue/essential', 'plugin:vue/essential',
'@vue/prettier' '@vue/prettier'
], ],
......
module.exports = { module.exports = {
root: true, root: true,
parserOptions: { parserOptions: {
parser: '@babel/eslint-parser' // parser: '@babel/eslint-parser'
ecmaVersion: 2020,
}, },
env: { env: {
browser: true browser: true,
}, },
extends: [ extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevent // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevent
...@@ -12,23 +13,27 @@ module.exports = { ...@@ -12,23 +13,27 @@ module.exports = {
// `plugin:vue/recommended` for stricter rules. // `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential', 'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md // https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard' 'standard',
'plugin:vue/strongly-recommended',
'@vue/standard',
// '@vue/typescript/recommended'
], ],
// required to lint *.vue files // required to lint *.vue files
plugins: ['vue'], plugins: ['vue'],
globals: { globals: {
NODE_ENV: false, NODE_ENV: false,
_: false, _: false,
echarts: false echarts: false,
}, },
rules: { rules: {
'arrow-spacing': [ 'arrow-spacing': [
2, 2,
{ {
before: true, before: true,
after: true after: true,
} },
], ],
'no-var': 'off',
eqeqeq: 'off', eqeqeq: 'off',
// 'no-eval': ['error', { allowIndirect: false }], // default is false // 'no-eval': ['error', { allowIndirect: false }], // default is false
'no-eval': 'off', // default is false 'no-eval': 'off', // default is false
...@@ -39,16 +44,16 @@ module.exports = { ...@@ -39,16 +44,16 @@ module.exports = {
2, 2,
'1tbs', '1tbs',
{ {
allowSingleLine: true allowSingleLine: true,
} },
], ],
'comma-dangle': [2, 'never'], 'comma-dangle': [2, 'never'],
'comma-spacing': [ 'comma-spacing': [
2, 2,
{ {
before: false, before: false,
after: true after: true,
} },
], ],
'comma-style': [2, 'last'], 'comma-style': [2, 'last'],
curly: [2, 'multi-line'], curly: [2, 'multi-line'],
...@@ -57,29 +62,29 @@ module.exports = { ...@@ -57,29 +62,29 @@ module.exports = {
2, 2,
2, 2,
{ {
SwitchCase: 1 SwitchCase: 1,
} },
], ],
'key-spacing': [ 'key-spacing': [
2, 2,
{ {
beforeColon: false, beforeColon: false,
afterColon: true afterColon: true,
} },
], ],
'keyword-spacing': [ 'keyword-spacing': [
2, 2,
{ {
before: true, before: true,
after: true after: true,
} },
], ],
'new-cap': [ 'new-cap': [
2, 2,
{ {
newIsCap: true, newIsCap: true,
capIsNew: false capIsNew: false,
} },
], ],
'no-extra-parens': [2, 'functions'], 'no-extra-parens': [2, 'functions'],
'no-floating-decimal': 2, 'no-floating-decimal': 2,
...@@ -87,8 +92,8 @@ module.exports = { ...@@ -87,8 +92,8 @@ module.exports = {
'no-multiple-empty-lines': [ 'no-multiple-empty-lines': [
2, 2,
{ {
max: 1 max: 1,
} },
], ],
'no-trailing-spaces': 2, 'no-trailing-spaces': 2,
quotes: [ quotes: [
...@@ -96,8 +101,8 @@ module.exports = { ...@@ -96,8 +101,8 @@ module.exports = {
'single', 'single',
{ {
avoidEscape: true, avoidEscape: true,
allowTemplateLiterals: true allowTemplateLiterals: true,
} },
], ],
semi: [2, 'never'], semi: [2, 'never'],
'space-before-blocks': [2, 'always'], 'space-before-blocks': [2, 'always'],
...@@ -109,10 +114,10 @@ module.exports = { ...@@ -109,10 +114,10 @@ module.exports = {
2, 2,
{ {
words: true, words: true,
nonwords: false nonwords: false,
} },
], ],
'spaced-comment': [2, 'always'], 'spaced-comment': [2, 'always'],
'prefer-const': 2 'prefer-const': 2,
} },
} }
No preview for this file type
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
"eslint-plugin-import": "^2.25.3", "eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0", "eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^8.0.3", "eslint-plugin-vue": "^7.0.0",
"jest": "^27.1.0", "jest": "^27.1.0",
"postcss": "^8.4.16", "postcss": "^8.4.16",
"postcss-loader": "^7.0.1", "postcss-loader": "^7.0.1",
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<script> <script>
export default { export default {
name: 'app', name: 'App',
created() { created() {
// console.log(abcd.efg) // console.log(abcd.efg)
......
...@@ -7,5 +7,5 @@ const req = require.context('./icons', false, /\.svg$/) ...@@ -7,5 +7,5 @@ const req = require.context('./icons', false, /\.svg$/)
const iconMap = requireAll(req) const iconMap = requireAll(req)
// console.log("iconMap",iconMap); // console.log("iconMap",iconMap);
// e.slice(3) 老写法 // e.slice(3) 老写法
Vue.prototype.$IconSvg = iconMap.map(e =>e.split('/')[1].split('.')[0] ) Vue.prototype.$IconSvg = iconMap.map(e => e.split('/')[1].split('.')[0])
// Vue.prototype.$IconSvg = iconMap.map(e =>console.log(e.default)) // Vue.prototype.$IconSvg = iconMap.map(e =>console.log(e.default))
...@@ -16,7 +16,7 @@ export const Util = { ...@@ -16,7 +16,7 @@ export const Util = {
* confirmButtonColor 确认按钮颜色 * confirmButtonColor 确认按钮颜色
* cancelButtonColor 取消按钮颜色 * cancelButtonColor 取消按钮颜色
*/ */
msg: function(options) { msg: function (options) {
MessageBox({ MessageBox({
title: options.title || '', title: options.title || '',
type: options.type || 'error', type: options.type || 'error',
...@@ -28,7 +28,7 @@ export const Util = { ...@@ -28,7 +28,7 @@ export const Util = {
confirmButtonColor: options.confirmButtonColor || '#1989fa', confirmButtonColor: options.confirmButtonColor || '#1989fa',
cancelButtonColor: options.cancelButtonColor || '#000', cancelButtonColor: options.cancelButtonColor || '#000',
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
callback: function(action, done) { callback: function (action, done) {
if (action == 'confirm') { if (action == 'confirm') {
if (options.success) { if (options.success) {
options.success(done) options.success(done)
...@@ -37,7 +37,7 @@ export const Util = { ...@@ -37,7 +37,7 @@ export const Util = {
console.log(done) console.log(done)
// done() // done()
} }
} },
}) })
/* Vue.$vux.alert.show({ /* Vue.$vux.alert.show({
...@@ -55,55 +55,56 @@ export const Util = { ...@@ -55,55 +55,56 @@ export const Util = {
/** /**
* 提示框 * 提示框
*/ */
Info: function(options) { Info: function (options) {
Message({ Message({
message: options.message || '提示', message: options.message || '提示',
type: options.type || 'error', type: options.type || 'error',
duration: options.time || 2000, duration: options.time || 2000,
onClose: options.onClose || '' onClose: options.onClose || '',
}) })
}, },
/** /**
* 轻提示 * 轻提示
*/ */
Tips: function(options) { Tips: function (options) {
Message({ Message({
message: options.message || '提示', message: options.message || '提示',
duration: options.duration || 3000, duration: options.duration || 3000,
type: options.type || 'text', type: options.type || 'text',
icon: options.icon || '' icon: options.icon || '',
}) })
}, },
/** /**
* loading * loading
*/ */
loading: function(message) { loading: function (message) {
loadingInstance = Loading.service({ loadingInstance = Loading.service({
text: message || '加载中...' text: message || '加载中...',
}) })
}, },
/** /**
* 关闭loading * 关闭loading
*/ */
closeLoading: function() { closeLoading: function () {
loadingInstance.close() loadingInstance.close()
}, },
/** /**
* 校验手机号码格式 * 校验手机号码格式
*/ */
checkPhone: function(mobile) { checkPhone: function (mobile) {
const myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/ const myreg =
/^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile) return myreg.test(mobile)
}, },
/** /**
* 校验固定电话 * 校验固定电话
*/ */
validationTel: function(tel) { validationTel: function (tel) {
const reg = /^0[\d]{2,3}-[\d]{7,8}$/ const reg = /^0[\d]{2,3}-[\d]{7,8}$/
return reg.test(tel) return reg.test(tel)
}, },
...@@ -111,7 +112,7 @@ export const Util = { ...@@ -111,7 +112,7 @@ export const Util = {
/** /**
* 是否特殊字符 * 是否特殊字符
*/ */
isSpecialLetter: function(str) { isSpecialLetter: function (str) {
const reg = new RegExp( const reg = new RegExp(
"[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]" "[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"
) )
...@@ -121,7 +122,7 @@ export const Util = { ...@@ -121,7 +122,7 @@ export const Util = {
/** /**
* 只能输入英文字母和数字,不能输入中文 * 只能输入英文字母和数字,不能输入中文
*/ */
validationInput: function(str) { validationInput: function (str) {
const reg = /[^\w\.\/]/gi // eslint-disable-line const reg = /[^\w\.\/]/gi // eslint-disable-line
return reg.test(str) return reg.test(str)
}, },
...@@ -129,21 +130,21 @@ export const Util = { ...@@ -129,21 +130,21 @@ export const Util = {
/** /**
* 获取当前时间 * 获取当前时间
*/ */
getCurrentDate: function() { getCurrentDate: function () {
const time = new Date() const time = new Date()
const y = time.getFullYear() const y = time.getFullYear()
const m = time.getMonth() + 1 const m = time.getMonth() + 1
const d = time.getDate() const d = time.getDate()
return { return {
date: y + '/' + m + '/' + d date: y + '/' + m + '/' + d,
} }
}, },
/** /**
* 获取浏览器参数 * 获取浏览器参数
*/ */
getUrlParams: function(name) { getUrlParams: function (name) {
const vars = [] const vars = []
let hash let hash
const oParams = {} const oParams = {}
...@@ -166,7 +167,7 @@ export const Util = { ...@@ -166,7 +167,7 @@ export const Util = {
/** /**
* 根据当前时间,计算往后30天的日期 * 根据当前时间,计算往后30天的日期
*/ */
getAfterDate: function(day) { getAfterDate: function (day) {
const date1 = new Date() const date1 = new Date()
const date2 = new Date(date1) const date2 = new Date(date1)
let time = 30 let time = 30
...@@ -182,14 +183,14 @@ export const Util = { ...@@ -182,14 +183,14 @@ export const Util = {
date: _date, date: _date,
year: date2.getFullYear(), year: date2.getFullYear(),
month: date2.getMonth() + 1, month: date2.getMonth() + 1,
day: date2.getDate() day: date2.getDate(),
} }
}, },
/** /**
* 日期格式转换 * 日期格式转换
*/ */
dateFormate: function(str, type) { dateFormate: function (str, type) {
let txt = 'YYYY-MM-DD' let txt = 'YYYY-MM-DD'
if (type) { if (type) {
txt = type txt = type
...@@ -201,7 +202,7 @@ export const Util = { ...@@ -201,7 +202,7 @@ export const Util = {
/** /**
* 字段截取 * 字段截取
*/ */
cutStr: function(str, num) { cutStr: function (str, num) {
if (!str) { if (!str) {
return '' return ''
} }
...@@ -224,7 +225,7 @@ export const Util = { ...@@ -224,7 +225,7 @@ export const Util = {
* console.log(bar===foo) false * console.log(bar===foo) false
* @param {*} obj * @param {*} obj
*/ */
deepClone: function(obj) { deepClone: function (obj) {
// Handle the 3 simple types, and null or undefined or function // Handle the 3 simple types, and null or undefined or function
if (obj == null || typeof obj !== 'object') return obj if (obj == null || typeof obj !== 'object') return obj
// Handle Date // Handle Date
...@@ -237,7 +238,7 @@ export const Util = { ...@@ -237,7 +238,7 @@ export const Util = {
if ((obj instanceof Array) | (obj instanceof Object)) { if ((obj instanceof Array) | (obj instanceof Object)) {
const copy = obj instanceof Array ? [] : {} const copy = obj instanceof Array ? [] : {}
for (var attr in obj) { for (var attr in obj) {
if (obj.hasOwnProperty(attr)) { if (Object.prototype.hasOwnProperty.call(attr)) {
copy[attr] = Util.deepClone(obj[attr]) copy[attr] = Util.deepClone(obj[attr])
} }
} }
...@@ -250,7 +251,7 @@ export const Util = { ...@@ -250,7 +251,7 @@ export const Util = {
* url下载文件 * url下载文件
* *
*/ */
downLoadFile: function(url) { downLoadFile: function (url) {
// console.log(row) // console.log(row)
// return // return
const Temp = document.createElement('a') const Temp = document.createElement('a')
...@@ -268,7 +269,7 @@ export const Util = { ...@@ -268,7 +269,7 @@ export const Util = {
* @param {Object} type: 默认不传 ==>全部小写;传1 ==>全部大写;传2 ==>首字母大写 * @param {Object} type: 默认不传 ==>全部小写;传1 ==>全部大写;传2 ==>首字母大写
* 将json的key值进行大小写转换 * 将json的key值进行大小写转换
*/ */
jsonKeysToCase: function(json, type) { jsonKeysToCase: function (json, type) {
if (typeof json == 'object') { if (typeof json == 'object') {
var tempJson = JSON.parse(JSON.stringify(json)) var tempJson = JSON.parse(JSON.stringify(json))
toCase(tempJson) toCase(tempJson)
...@@ -280,7 +281,7 @@ export const Util = { ...@@ -280,7 +281,7 @@ export const Util = {
function toCase(json) { function toCase(json) {
if (typeof json == 'object') { if (typeof json == 'object') {
if (Array.isArray(json)) { if (Array.isArray(json)) {
json.forEach(function(item) { json.forEach(function (item) {
toCase(item) toCase(item)
}) })
} else { } else {
...@@ -314,9 +315,9 @@ export const Util = { ...@@ -314,9 +315,9 @@ export const Util = {
}, },
// 判断字段为空时显示 // 判断字段为空时显示
fieldShow: function(field, show) { fieldShow: function (field, show) {
return field || show return field || show
} },
} }
export const showModal = Util.msg export const showModal = Util.msg
......
<template> <template>
<el-dialog id="baseDialog" <el-dialog
id="baseDialog"
top="30vh" top="30vh"
:close-on-click-modal="true" :close-on-click-modal="true"
:close-on-press-escape="true" :close-on-press-escape="true"
...@@ -8,24 +9,28 @@ ...@@ -8,24 +9,28 @@
:visible.sync="visible" :visible.sync="visible"
:show-close="config.showClose" :show-close="config.showClose"
class="noborder" class="noborder"
:append-to-body="config.appendToBody"> :append-to-body="config.appendToBody"
<slot></slot> >
<div slot="footer" <slot />
v-if="config.isShowFooter"> <div
<el-button type="primary" slot="footer"
@click="confirmBtn"> v-if="config.isShowFooter"
{{config.confirm_name}} >
<el-button
type="primary"
@click="confirmBtn"
>
{{ config.confirm_name }}
</el-button> </el-button>
<el-button @click="visible = false"> <el-button @click="visible = false">
{{ config.cancel_name }} {{ config.cancel_name }}
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
export default { export default {
name: 'baseDialog', name: 'BaseDialog',
props: { props: {
dialogConfig: { dialogConfig: {
required: false, required: false,
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
* @param {*} btn * @param {*} btn
*/ */
const filter = btn => const filter = btn =>
mapping ? mapping[data[mapping['field']]].includes(btn.label) : true mapping ? mapping[data[mapping.field]].includes(btn.label) : true
const $store = _this.$store.getters['d2admin/auth/curBtns'] const $store = _this.$store.getters['d2admin/auth/curBtns']
if (!$store) return h('div') if (!$store) return h('div')
if (label) { if (label) {
......
<template> <template>
<div class="d2-container-card-bs"> <div class="d2-container-card-bs">
<div v-if="$slots.header" class="d2-container-card-bs__header" ref="header"> <div
<slot name="header"/> v-if="$slots.header"
class="d2-container-card-bs__header"
ref="header"
>
<slot name="header" />
</div> </div>
<div class="d2-container-card-bs__body" ref="wrapper"> <div
class="d2-container-card-bs__body"
ref="wrapper"
>
<div class="d2-container-card-bs__body-wrapper-inner"> <div class="d2-container-card-bs__body-wrapper-inner">
<div class="d2-container-card-bs__body-card"> <div class="d2-container-card-bs__body-card">
<slot/> <slot />
</div> </div>
</div> </div>
</div> </div>
<div v-if="$slots.footer" class="d2-container-card-bs__footer" ref="footer"> <div
<slot name="footer"/> v-if="$slots.footer"
class="d2-container-card-bs__footer"
ref="footer"
>
<slot name="footer" />
</div> </div>
</div> </div>
</template> </template>
...@@ -19,7 +30,7 @@ ...@@ -19,7 +30,7 @@
<script> <script>
import bs from './mixins/bs' import bs from './mixins/bs'
export default { export default {
name: 'd2-container-card-bs', name: 'D2ContainerCardBs',
mixins: [ mixins: [
bs bs
] ]
......
<template> <template>
<div class="d2-container-card"> <div class="d2-container-card">
<div v-if="$slots.header" class="d2-container-card__header" ref="header"> <div
<slot name="header"/> v-if="$slots.header"
class="d2-container-card__header"
ref="header"
>
<slot name="header" />
</div> </div>
<div class="d2-container-card__body" ref="body"> <div
class="d2-container-card__body"
ref="body"
>
<div class="d2-container-card__body-card"> <div class="d2-container-card__body-card">
<slot/> <slot />
</div> </div>
</div> </div>
<div v-if="$slots.footer" class="d2-container-card__footer" ref="footer"> <div
<slot name="footer"/> v-if="$slots.footer"
class="d2-container-card__footer"
ref="footer"
>
<slot name="footer" />
</div> </div>
</div> </div>
</template> </template>
...@@ -17,7 +28,7 @@ ...@@ -17,7 +28,7 @@
<script> <script>
import scroll from './mixins/normal' import scroll from './mixins/normal'
export default { export default {
name: 'd2-container-card', name: 'D2ContainerCard',
mixins: [ mixins: [
scroll scroll
], ],
......
<template> <template>
<div class="d2-container-full-bs"> <div class="d2-container-full-bs">
<div v-if="$slots.header" class="d2-container-full-bs__header" ref="header"> <div
<slot name="header"/> v-if="$slots.header"
class="d2-container-full-bs__header"
ref="header"
>
<slot name="header" />
</div> </div>
<div class="d2-container-full-bs__body" ref="wrapper"> <div
class="d2-container-full-bs__body"
ref="wrapper"
>
<div class="d2-container-full-bs__body-wrapper-inner"> <div class="d2-container-full-bs__body-wrapper-inner">
<slot/> <slot />
</div> </div>
</div> </div>
<div v-if="$slots.footer" class="d2-container-full-bs__footer" ref="footer"> <div
<slot name="footer"/> v-if="$slots.footer"
class="d2-container-full-bs__footer"
ref="footer"
>
<slot name="footer" />
</div> </div>
</div> </div>
</template> </template>
...@@ -17,7 +28,7 @@ ...@@ -17,7 +28,7 @@
<script> <script>
import bs from './mixins/bs' import bs from './mixins/bs'
export default { export default {
name: 'd2-container-card-bs', name: 'D2ContainerCardBs',
mixins: [ mixins: [
bs bs
] ]
......
<template> <template>
<div class="d2-container-full"> <div class="d2-container-full">
<!-- <el-scrollbar> --> <!-- <el-scrollbar> -->
<div v-if="$slots.header" <div
v-if="$slots.header"
class="d2-container-full__header" class="d2-container-full__header"
ref="header" ref="header"
:class="this.active?'active':'close'"> :class="this.active?'active':'close'"
>
<slot name="header" /> <slot name="header" />
<d2-header-switch /> <d2-header-switch />
</div> </div>
<div class="d2-container-full__body" <div
ref="body"> class="d2-container-full__body"
ref="body"
>
<slot /> <slot />
</div> </div>
<div v-if="$slots.footer" <div
v-if="$slots.footer"
class="d2-container-full__footer" class="d2-container-full__footer"
ref="footer"> ref="footer"
>
<slot name="footer" /> <slot name="footer" />
</div> </div>
<!-- </el-scrollbar> --> <!-- </el-scrollbar> -->
...@@ -24,7 +30,7 @@ ...@@ -24,7 +30,7 @@
<script> <script>
import scroll from './mixins/normal' import scroll from './mixins/normal'
export default { export default {
name: 'd2-container-full', name: 'D2ContainerFull',
mixins: [scroll], mixins: [scroll],
components: { components: {
d2HeaderSwitch: () => import('./d2-header-switch.vue') d2HeaderSwitch: () => import('./d2-header-switch.vue')
......
<template> <template>
<div class="d2-container-ghost-bs"> <div class="d2-container-ghost-bs">
<div v-if="$slots.header" class="d2-container-ghost-bs__header" ref="header"> <div
<slot name="header"/> v-if="$slots.header"
class="d2-container-ghost-bs__header"
ref="header"
>
<slot name="header" />
</div> </div>
<div class="d2-container-ghost-bs__body" ref="wrapper"> <div
class="d2-container-ghost-bs__body"
ref="wrapper"
>
<div> <div>
<slot/> <slot />
</div> </div>
</div> </div>
<div v-if="$slots.footer" class="d2-container-ghost-bs__footer" ref="footer"> <div
<slot name="footer"/> v-if="$slots.footer"
class="d2-container-ghost-bs__footer"
ref="footer"
>
<slot name="footer" />
</div> </div>
</div> </div>
</template> </template>
...@@ -17,7 +28,7 @@ ...@@ -17,7 +28,7 @@
<script> <script>
import bs from './mixins/bs' import bs from './mixins/bs'
export default { export default {
name: 'd2-container-card-bs', name: 'D2ContainerCardBs',
mixins: [ mixins: [
bs bs
] ]
......
<template> <template>
<div class="d2-container-ghost"> <div class="d2-container-ghost">
<div v-if="$slots.header" class="d2-container-ghost__header" ref="header"> <div
<slot name="header"/> v-if="$slots.header"
class="d2-container-ghost__header"
ref="header"
>
<slot name="header" />
</div> </div>
<div class="d2-container-ghost__body" ref="body"> <div
<slot/> class="d2-container-ghost__body"
ref="body"
>
<slot />
</div> </div>
<div v-if="$slots.footer" class="d2-container-ghost__footer" ref="footer"> <div
<slot name="footer"/> v-if="$slots.footer"
class="d2-container-ghost__footer"
ref="footer"
>
<slot name="footer" />
</div> </div>
</div> </div>
</template> </template>
...@@ -15,7 +26,7 @@ ...@@ -15,7 +26,7 @@
<script> <script>
import scroll from './mixins/normal' import scroll from './mixins/normal'
export default { export default {
name: 'd2-container-ghost', name: 'D2ContainerGhost',
mixins: [ mixins: [
scroll scroll
], ],
......
<template> <template>
<div v-if="show" <div
v-if="show"
class="d2-header-switch" class="d2-header-switch"
:class="{ 'd2-header-switch--active': isActive }" :class="{ 'd2-header-switch--active': isActive }"
@click="handleClick"> @click="handleClick"
>
<d2-el-icon :name="name" /> <d2-el-icon :name="name" />
<li :class="$store.state.d2admin.tsearch.active?'fa fa-compress':'fa fa-expand'"></li> <li :class="$store.state.d2admin.tsearch.active?'fa fa-compress':'fa fa-expand'" />
</div> </div>
</template> </template>
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
v-if="show" v-if="show"
class="d2-source" class="d2-source"
:class="{ 'd2-source--active': isActive }" :class="{ 'd2-source--active': isActive }"
@click="handleClick"> @click="handleClick"
<d2-icon name="code"/> 本页源码 >
<d2-icon name="code" /> 本页源码
</div> </div>
</template> </template>
......
...@@ -38,9 +38,9 @@ export default { ...@@ -38,9 +38,9 @@ export default {
} }
}, },
render(h) { render(h) {
const slots = [ this.$slots.default ] const slots = [this.$slots.default]
if (this.$slots.header) slots.push(h('template', { slot: 'header' }, [ this.$slots.header ])) if (this.$slots.header) slots.push(h('template', { slot: 'header' }, [this.$slots.header]))
if (this.$slots.footer) slots.push(h('template', { slot: 'footer' }, [ this.$slots.footer ])) if (this.$slots.footer) slots.push(h('template', { slot: 'footer' }, [this.$slots.footer]))
return h('div', { return h('div', {
ref: 'container', ref: 'container',
class: 'container-component' class: 'container-component'
......
...@@ -10,24 +10,28 @@ ...@@ -10,24 +10,28 @@
:width="width" :width="width"
> >
<span slot="title"> <span slot="title">
{{title}} {{ title }}
<span class="dialog-sub-title"> <span class="dialog-sub-title">
<slot name="sub-title"></slot> <slot name="sub-title" />
</span> </span>
</span> </span>
<slot></slot> <slot />
<div slot="footer"> <div slot="footer">
<slot name="btn-start"></slot> <slot name="btn-start" />
<el-button <el-button
type="primary" type="primary"
@click="handleConfirm" @click="handleConfirm"
:loading="$store.state.d2admin.loading.value" :loading="$store.state.d2admin.loading.value"
>{{btnOkLabel}}</el-button> >
{{ btnOkLabel }}
</el-button>
<el-button <el-button
v-if="!noCancel" v-if="!noCancel"
@click="handleClose" @click="handleClose"
>取消</el-button> >
<slot name="btn-middle"></slot> 取消
</el-button>
<slot name="btn-middle" />
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -35,7 +39,7 @@ ...@@ -35,7 +39,7 @@
<script> <script>
export default { export default {
name: 'd2-dialog', name: 'D2Dialog',
data() { data() {
return { return {
} }
......
<template> <template>
<i :class="`el-icon-${name}`" aria-hidden="true"></i> <i
:class="`el-icon-${name}`"
aria-hidden="true"
/>
</template> </template>
<script> <script>
export default { export default {
name: 'd2-el-icon', name: 'D2ElIcon',
props: { props: {
name: { name: {
type: String, type: String,
......
<!-- 编辑商品弹窗 --> <!-- 编辑商品弹窗 -->
<template> <template>
<d2-dialog title="添加绑定升级商品" <d2-dialog
:isVisible.sync="relateProVisible" title="添加绑定升级商品"
btnOkLabel="关联" :is-visible.sync="relateProVisible"
btn-ok-label="关联"
width="950px" width="950px"
@confirmDialog="handleRelateProConfirm" @confirmDialog="handleRelateProConfirm"
@closeDialog="handleRelateProClose" @closeDialog="handleRelateProClose"
class="relatePro"> class="relatePro"
>
<div class="relateProDialog flex"> <div class="relateProDialog flex">
<img v-show="proInfo.thumbUrl" <img
:src="proInfo.thumbUrl" /> v-show="proInfo.thumbUrl"
<img v-show="!proInfo.thumbUrl" :src="proInfo.thumbUrl"
src="./image/no-choice.png" /> >
<el-form :model="proInfo" <img
v-show="!proInfo.thumbUrl"
src="./image/no-choice.png"
>
<el-form
:model="proInfo"
:rules="rules" :rules="rules"
label-width="110px" label-width="110px"
ref="proRuleForm1" ref="proRuleForm1"
style="width: calc(100% - 180px);"> style="width: calc(100% - 180px);"
>
<div class="w-50"> <div class="w-50">
<el-form-item label="选择产品" <el-form-item
prop="goodsCode"> label="选择产品"
<el-select style="width: 98%;" prop="goodsCode"
>
<el-select
style="width: 98%;"
v-model="proInfo.goodsCode" v-model="proInfo.goodsCode"
placeholder="请选择一款作为升级商品" placeholder="请选择一款作为升级商品"
value-key="goodsCode" value-key="goodsCode"
filterable filterable
@change="handleChangeGood"> @change="handleChangeGood"
<el-option v-for="item in proList" >
<el-option
v-for="item in proList"
:key="item.goodsCode" :key="item.goodsCode"
:label="item.goodsName" :label="item.goodsName"
:value="item.goodsCode" :value="item.goodsCode"
:disabled="item.disabled"></el-option> :disabled="item.disabled"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
<div class="w-50"> <div class="w-50">
<el-form-item label="分类"> <el-form-item label="分类">
<el-input disabled <el-input
disabled
placeholder="分类" placeholder="分类"
:value="proInfo.goodsTypeName" :value="proInfo.goodsTypeName"
class="dis-in-block"></el-input> class="dis-in-block"
/>
</el-form-item> </el-form-item>
</div> </div>
<div class="w-50"> <div class="w-50" />
</div>
<div class="w-50"> <div class="w-50">
<el-form-item label="编号"> <el-form-item label="编号">
<el-input disabled <el-input
disabled
placeholder="编号" placeholder="编号"
:value="proInfo.sapCode" :value="proInfo.sapCode"
class="dis-in-block"></el-input> class="dis-in-block"
/>
</el-form-item> </el-form-item>
</div> </div>
<div class="w-50"> <div class="w-50">
<el-form-item label="产品成本" <el-form-item
prop="shopPrice"> label="产品成本"
<el-input v-model="proInfo.shopPrice" prop="shopPrice"
>
<el-input
v-model="proInfo.shopPrice"
placeholder="请输入建议产品成本" placeholder="请输入建议产品成本"
class="dis-in-block" class="dis-in-block"
@input="handleShopPrice" @input="handleShopPrice"
@blur="handleShopPriceBlur"> @blur="handleShopPriceBlur"
<i slot="suffix" >
class="suffix">元</i> <i
slot="suffix"
class="suffix"
>元</i>
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="w-50"> <div class="w-50">
<el-form-item label="建议升级价格" <el-form-item
prop="upgradePrice"> label="建议升级价格"
<el-input v-model="proInfo.upgradePrice" prop="upgradePrice"
>
<el-input
v-model="proInfo.upgradePrice"
placeholder="请输入建议升级价格" placeholder="请输入建议升级价格"
class="dis-in-block" class="dis-in-block"
@input="handleUpgradePrice"> @input="handleUpgradePrice"
<i slot="suffix" >
class="suffix">元</i> <i
slot="suffix"
class="suffix"
>元</i>
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="w-50"> <div class="w-50">
<el-form-item label="商品最低价" <el-form-item
prop="shopMinPrice"> label="商品最低价"
<el-input v-model="proInfo.shopMinPrice" prop="shopMinPrice"
>
<el-input
v-model="proInfo.shopMinPrice"
placeholder="请输入商品最低价" placeholder="请输入商品最低价"
class="dis-in-block" class="dis-in-block"
@input="handleShopMinPrice"> @input="handleShopMinPrice"
<i slot="suffix" >
class="suffix">元</i> <i
slot="suffix"
class="suffix"
>元</i>
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="w-50" <div
v-show="warrantyProList.includes(proInfo.goodsType)"> class="w-50"
<el-form-item label="质保年限" v-show="warrantyProList.includes(proInfo.goodsType)"
prop="warrantyPeriod"> >
<el-select style="width: 98%;" <el-form-item
label="质保年限"
prop="warrantyPeriod"
>
<el-select
style="width: 98%;"
:class="{ 'select-suffix': !!proInfo.warrantyPeriod }" :class="{ 'select-suffix': !!proInfo.warrantyPeriod }"
v-model="proInfo.warrantyPeriod"> v-model="proInfo.warrantyPeriod"
<el-option v-for="item in warrantyPeriodList" >
<el-option
v-for="item in warrantyPeriodList"
:key="item.confId" :key="item.confId"
:label="item.confLabel" :label="item.confLabel"
:value="item.confId"></el-option> :value="item.confId"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
...@@ -112,7 +155,7 @@ ...@@ -112,7 +155,7 @@
import _ from 'lodash' import _ from 'lodash'
import { limitPrice } from '@/common/constants' import { limitPrice } from '@/common/constants'
export default { export default {
name: 'relateProDialog', name: 'RelateProDialog',
data() { data() {
return { return {
goodVal: {}, goodVal: {},
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
<template> <template>
<d2-dialog <d2-dialog
title="关联门店" title="关联门店"
:isVisible.sync="relateStoreVisible" :is-visible.sync="relateStoreVisible"
width="70%" width="70%"
btnOkLabel="关联" btn-ok-label="关联"
@confirmDialog="handleRelateStoreConfirm" @confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose" @closeDialog="handleRelateStoreClose"
class="relateStore" class="relateStore"
> >
<slot></slot> <slot />
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-table <el-table
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
width="55" width="55"
align="center" align="center"
:selectable="selectable" :selectable="selectable"
></el-table-column> />
<el-table-column <el-table-column
v-if="sourcePage != 'serviceStore'" v-if="sourcePage != 'serviceStore'"
prop="yqMerchantName" prop="yqMerchantName"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
align="center" align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{scope.row.yqMerchantName}}</span> <span :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{ scope.row.yqMerchantName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
align="center" align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{scope.row.merchantName}}</span> <span :class="{'red': !scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)}">{{ scope.row.merchantName }}</span>
<el-tooltip <el-tooltip
v-if="!scope.row.isSetUpgradeSettleRule" v-if="!scope.row.isSetUpgradeSettleRule"
popper-class="tooltip-class" popper-class="tooltip-class"
...@@ -51,9 +51,13 @@ ...@@ -51,9 +51,13 @@
content="该门店无配置财务分润规则,无法关联!" content="该门店无配置财务分润规则,无法关联!"
placement="top" placement="top"
> >
<span v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)" class="tip-icon">?</span> <span
v-if="!scope.row.isSetUpgradeSettleRule && needTip.includes(sourcePage)"
class="tip-icon"
>?</span>
</el-tooltip> </el-tooltip>
</template></el-table-column> </template>
</el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
small small
...@@ -63,7 +67,7 @@ ...@@ -63,7 +67,7 @@
:page-size="pageSize" :page-size="pageSize"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:total="total" :total="total"
></el-pagination> />
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-table <el-table
...@@ -77,12 +81,12 @@ ...@@ -77,12 +81,12 @@
prop="yqMerchantName" prop="yqMerchantName"
label="园区店名称" label="园区店名称"
align="center" align="center"
></el-table-column> />
<el-table-column <el-table-column
prop="merchantName" prop="merchantName"
label="4S店名称" label="4S店名称"
align="center" align="center"
></el-table-column> />
<el-table-column <el-table-column
label="删除" label="删除"
align="center" align="center"
...@@ -93,8 +97,7 @@ ...@@ -93,8 +97,7 @@
class="el-icon-delete" class="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
type="text" type="text"
> />
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -105,7 +108,7 @@ ...@@ -105,7 +108,7 @@
<script> <script>
export default { export default {
name: 'relateStoreDialog', name: 'RelateStoreDialog',
data() { data() {
return { return {
selectedData: [], selectedData: [],
......
<template> <template>
<svg aria-hidden="true"> <svg aria-hidden="true">
<use :xlink:href="icon"></use> <use :xlink:href="icon" />
</svg> </svg>
</template> </template>
<script> <script>
export default { export default {
name: 'd2-icon-svg', name: 'D2IconSvg',
props: { props: {
name: { name: {
type: String, type: String,
......
<template> <template>
<i class="fa" :class="`fa-${name}`" aria-hidden="true"></i> <i
class="fa"
:class="`fa-${name}`"
aria-hidden="true"
/>
</template> </template>
<script> <script>
import './font-awesome-4.7.0/css/font-awesome.min.css' import './font-awesome-4.7.0/css/font-awesome.min.css'
export default { export default {
name: 'd2-icon', name: 'D2Icon',
props: { props: {
name: { name: {
type: String, type: String,
......
<!-- 搜索 --> <!-- 搜索 -->
<template> <template>
<div class="d2-search"> <div class="d2-search">
<el-form :inline="true" <el-form
:inline="true"
v-model="searchForm" v-model="searchForm"
:label-width="labelWidth" :label-width="labelWidth"
size="small" size="small"
class="d2-search-block"> class="d2-search-block"
>
<template v-for="(item, index) in formData"> <template v-for="(item, index) in formData">
<el-col v-if="!item.isHide" <el-col
v-if="!item.isHide"
:key="index" :key="index"
:span="12" :span="12"
class="item-height"> class="item-height"
<el-form-item :class="{'no-label': !item.label}" >
:label="item.label ? (item.label + ':') : ''"> <el-form-item
<el-input v-if="item.type === 'input'" :class="{'no-label': !item.label}"
:label="item.label ? (item.label + ':') : ''"
>
<el-input
v-if="item.type === 'input'"
:placeholder="item.placeholder || ('请输入' + item.label)" :placeholder="item.placeholder || ('请输入' + item.label)"
v-model.trim="searchForm[item.name]" v-model.trim="searchForm[item.name]"
:disabled="item.isDisabled" :disabled="item.isDisabled"
...@@ -21,70 +28,93 @@ ...@@ -21,70 +28,93 @@
:type="item.inputType || 'text'" :type="item.inputType || 'text'"
:maxlength="item.maxlength||''" :maxlength="item.maxlength||''"
@input="e => maxLengthInput(e, item)" @input="e => maxLengthInput(e, item)"
@keydown.native="e => handleInputDown(e, item)"></el-input> @keydown.native="e => handleInputDown(e, item)"
/>
<!-- 选择-输入框 --> <!-- 选择-输入框 -->
<el-input v-else-if="item.type === 'selectInput'" <el-input
v-else-if="item.type === 'selectInput'"
:placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label"
v-model.trim="searchSelectObj[item.selectName].value" v-model.trim="searchSelectObj[item.selectName].value"
:clearable="item.isClear || false" :clearable="item.isClear || false"
class="input-with-select"> class="input-with-select"
<el-select v-model="searchSelectObj[item.selectName].attr" >
<el-select
v-model="searchSelectObj[item.selectName].attr"
style="width: 130px" style="width: 130px"
slot="prepend" slot="prepend"
placeholder="请选择" placeholder="请选择"
@change="item.handleSelectChange"> @change="item.handleSelectChange"
<el-option v-for="(subItem, subIndex) in item.selectOption" >
<el-option
v-for="(subItem, subIndex) in item.selectOption"
:key="subIndex" :key="subIndex"
:label="subItem.label" :label="subItem.label"
:value="subItem.name"></el-option> :value="subItem.name"
/>
</el-select> </el-select>
</el-input> </el-input>
<!-- 选择-时间选择框 --> <!-- 选择-时间选择框 -->
<template v-else-if="item.type === 'selectDatePicker'"> <template v-else-if="item.type === 'selectDatePicker'">
<el-select v-model="searchSelectObj[item.selectName].attr" <el-select
v-model="searchSelectObj[item.selectName].attr"
style="width: 130px" style="width: 130px"
placeholder="请选择" placeholder="请选择"
@change="item.handleSelectChange"> @change="item.handleSelectChange"
<el-option v-for="(subItem, subIndex) in item.selectOption" >
<el-option
v-for="(subItem, subIndex) in item.selectOption"
:key="subIndex" :key="subIndex"
:label="subItem.label" :label="subItem.label"
:value="subItem.name"></el-option> :value="subItem.name"
/>
</el-select> </el-select>
<el-date-picker v-model="searchSelectObj[item.selectName].value" <el-date-picker
v-model="searchSelectObj[item.selectName].value"
style="width: calc(100% - 130px)" style="width: calc(100% - 130px)"
:type="item.dateType || 'daterange'" :type="item.dateType || 'daterange'"
:clearable="item.isClear || false" :clearable="item.isClear || false"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
:picker-options="pickerOption[item.pickerOptions]"> :picker-options="pickerOption[item.pickerOptions]"
</el-date-picker> />
</template> </template>
<!-- 双选择框 --> <!-- 双选择框 -->
<template v-else-if="item.type === 'selectDouble'"> <template v-else-if="item.type === 'selectDouble'">
<el-select v-model="searchSelectObj[item.selectName].attr" <el-select
v-model="searchSelectObj[item.selectName].attr"
style="width: 130px" style="width: 130px"
placeholder="请选择" placeholder="请选择"
@change="item.handleSelectChange"> @change="item.handleSelectChange"
<el-option v-for="(subItem, subIndex) in item.selectOption" >
<el-option
v-for="(subItem, subIndex) in item.selectOption"
:key="subIndex" :key="subIndex"
:label="subItem.label" :label="subItem.label"
:value="subItem.name"></el-option> :value="subItem.name"
/>
</el-select> </el-select>
<el-select v-model="searchSelectObj[item.selectName].value" <el-select
v-model="searchSelectObj[item.selectName].value"
style="width: calc(100% - 130px)" style="width: calc(100% - 130px)"
:placeholder="'请选择' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label"> :placeholder="'请选择' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label"
<el-option label="全部" >
value=""></el-option> <el-option
<el-option v-for="subItem in item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).optionList" label="全部"
value=""
/>
<el-option
v-for="subItem in item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).optionList"
:key="subItem[item.optionId]" :key="subItem[item.optionId]"
:label="subItem[item.optionLabel]" :label="subItem[item.optionLabel]"
:value="subItem[item.optionId]"></el-option> :value="subItem[item.optionId]"
/>
</el-select> </el-select>
</template> </template>
<!-- 选择框 --> <!-- 选择框 -->
<el-select v-else-if="item.type === 'select'" <el-select
v-else-if="item.type === 'select'"
:style="{ width: item.width || '100%'}" :style="{ width: item.width || '100%'}"
v-model="searchForm[item.name]" v-model="searchForm[item.name]"
:clearable="item.isClear || false" :clearable="item.isClear || false"
...@@ -92,29 +122,34 @@ ...@@ -92,29 +122,34 @@
:filterable="!item.noFilter" :filterable="!item.noFilter"
:disabled="item.isDisabled" :disabled="item.isDisabled"
:no-data-text="item.noDataText || '无数据'" :no-data-text="item.noDataText || '无数据'"
@change="selectAddAttr($event, item)"> @change="selectAddAttr($event, item)"
<el-option v-for="subItem in item.optionList" >
<el-option
v-for="subItem in item.optionList"
:key="subItem[item.optionId]" :key="subItem[item.optionId]"
:label="subItem[item.optionLabel]" :label="subItem[item.optionLabel]"
:value="subItem[item.optionId]"> :value="subItem[item.optionId]"
</el-option> />
</el-select> </el-select>
<el-date-picker v-else-if="item.type === 'datePicker'" <el-date-picker
v-else-if="item.type === 'datePicker'"
v-model="searchForm[item.name]" v-model="searchForm[item.name]"
:type="item.dateType || 'daterange'" :type="item.dateType || 'daterange'"
:clearable="item.isClear || false" :clearable="item.isClear || false"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
:picker-options="pickerOption[item.pickerOptions]"> :picker-options="pickerOption[item.pickerOptions]"
</el-date-picker> />
<slot v-if="item.addHtml" <slot
v-if="item.addHtml"
:name="item.addHtml" :name="item.addHtml"
:scope="item"></slot> :scope="item"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
<slot></slot> <slot />
</el-form> </el-form>
</div> </div>
</template> </template>
...@@ -122,7 +157,7 @@ ...@@ -122,7 +157,7 @@
<script> <script>
import { rangePickerOptions } from '@/common/constants' import { rangePickerOptions } from '@/common/constants'
export default { export default {
name: 'd2-search', name: 'D2Search',
data() { data() {
return { return {
pickerOption: { pickerOption: {
......
<template> <template>
<el-row class="table-header"> <el-row class="table-header">
<el-col :span="leftSpan"> <el-col :span="leftSpan">
<span v-text="title"></span> <span v-text="title" />
<slot name="left"></slot> <slot name="left" />
</el-col> </el-col>
<el-col :span="24 - leftSpan"> <el-col :span="24 - leftSpan">
<slot></slot> <slot />
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<script> <script>
export default { export default {
name: 'd2-teble-header', name: 'D2TebleHeader',
props: { props: {
title: { title: {
type: String, type: String,
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
align="center" align="center"
width="60px" width="60px"
label="序号" label="序号"
type='index' type="index"
:index="index=>index+(pagination.pageSize - 1) * pagination.pageCount + 1" :index="index=>index+(pagination.pageSize - 1) * pagination.pageCount + 1"
></el-table-column> />
<el-table-column <el-table-column
v-for="(item, index) in tableParams.tableColumns" v-for="(item, index) in tableParams.tableColumns"
:key="index" :key="index"
...@@ -32,19 +32,19 @@ ...@@ -32,19 +32,19 @@
:name="item.addHtml" :name="item.addHtml"
:scope="scope.row" :scope="scope.row"
:prop="item.prop" :prop="item.prop"
:momFlag="item.momFlag" :mom-flag="item.momFlag"
></slot> />
<template v-else-if="item.momFlag"> <template v-else-if="item.momFlag">
<div> <div>
<span v-text="scope.row[item.prop]"></span> <span v-text="scope.row[item.prop]" />
<span <span
v-if="scope.row[item.momFlag] > 0" v-if="scope.row[item.momFlag] > 0"
class="el-icon-top" class="el-icon-top"
></span> />
<span <span
v-else-if="scope.row[item.momFlag] < 0" v-else-if="scope.row[item.momFlag] < 0"
class="el-icon-bottom" class="el-icon-bottom"
></span> />
<span v-else-if="scope.row[item.momFlag] == 0">--</span> <span v-else-if="scope.row[item.momFlag] == 0">--</span>
</div> </div>
</template> </template>
...@@ -53,22 +53,21 @@ ...@@ -53,22 +53,21 @@
v-if="!item.tagName" v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]" :type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]" v-text="tableParams.tag.label[scope.row[item.prop]]"
> />
</el-tag>
<el-tag <el-tag
v-else v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]" :type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]" v-text="tableParams[item.tagName].label[scope.row[item.prop]]"
></el-tag> />
</template> </template>
<template v-else-if="item.formatter"> <template v-else-if="item.formatter">
<span v-text="item.formatter(scope.row)"></span> <span v-text="item.formatter(scope.row)" />
</template> </template>
<template v-else-if="getListApi"> <template v-else-if="getListApi">
<p v-text="data[scope.$index][item.prop]"></p> <p v-text="data[scope.$index][item.prop]" />
</template> </template>
<template v-else> <template v-else>
<p v-text="tableData[scope.$index][item.prop]"></p> <p v-text="tableData[scope.$index][item.prop]" />
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
...@@ -83,7 +82,7 @@ ...@@ -83,7 +82,7 @@
<slot <slot
name="auth-button" name="auth-button"
:scope="scope.row" :scope="scope.row"
></slot> />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -97,14 +96,13 @@ ...@@ -97,14 +96,13 @@
:page-size="page.pageCount" :page-size="page.pageCount"
:total="getListApi ? total : tableTotal" :total="getListApi ? total : tableTotal"
layout="sizes,total,->,prev,pager,next,jumper" layout="sizes,total,->,prev,pager,next,jumper"
> />
</el-pagination>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'd2-table', name: 'D2Table',
data() { data() {
return { return {
loading: false, loading: false,
......
...@@ -13,11 +13,15 @@ ...@@ -13,11 +13,15 @@
:indeterminate="isIndeterminate" :indeterminate="isIndeterminate"
v-model="checkAll" v-model="checkAll"
@change="handleCheckAllChange" @change="handleCheckAllChange"
>全选</el-checkbox> >
全选
</el-checkbox>
<el-button <el-button
@click="handleConfirm" @click="handleConfirm"
type="text" type="text"
>确定</el-button> >
确定
</el-button>
</p> </p>
<el-checkbox-group <el-checkbox-group
v-model="checkedList" v-model="checkedList"
...@@ -28,7 +32,9 @@ ...@@ -28,7 +32,9 @@
:label="item[optionConfig.optionId]" :label="item[optionConfig.optionId]"
:key="item[optionConfig.optionId]" :key="item[optionConfig.optionId]"
@change="handleCheckedChange" @change="handleCheckedChange"
>{{item[optionConfig.optionLabel]}}</el-checkbox> >
{{ item[optionConfig.optionLabel] }}
</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</block> </block>
<img <img
...@@ -36,7 +42,7 @@ ...@@ -36,7 +42,7 @@
class="head-search" class="head-search"
src="./image/search.png" src="./image/search.png"
@click="handleOpen" @click="handleOpen"
/> >
</el-popover> </el-popover>
</template> </template>
......
<!-- 表格+分页 --> <!-- 表格+分页 -->
<template> <template>
<div class="d2-table"> <div class="d2-table">
<el-table :ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'" <el-table
:ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:data="getListApi ? data : tableData" :data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''" :row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading" v-loading="loading"
...@@ -9,86 +10,108 @@ ...@@ -9,86 +10,108 @@
:highlight-current-row="true" :highlight-current-row="true"
@sort-change="sortChange" @sort-change="sortChange"
@selection-change="handleSelect" @selection-change="handleSelect"
:tree-props="{children: 'upgradeGoodsList'}"> :tree-props="{children: 'upgradeGoodsList'}"
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" >
<el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection" type="selection"
width="55" width="55"
:reserve-selection="true"> :reserve-selection="true"
</el-table-column> />
<el-table-column v-if="hasNum" <el-table-column
v-if="hasNum"
align="center" align="center"
width="60px" width="60px"
label="序号" label="序号"
type='index' type="index"
:index="index=>index+(pagination.currentPage - 1) * pagination.pageSize + 1"> :index="index=>index+(pagination.currentPage - 1) * pagination.pageSize + 1"
</el-table-column> />
<el-table-column v-for="(item, index) in tableParams.tableColumns" <el-table-column
v-for="(item, index) in tableParams.tableColumns"
:key="index" :key="index"
:label="item.label" :label="item.label"
:prop="item.prop" :prop="item.prop"
:width="item.width" :width="item.width"
:min-width="item.minWidth" :min-width="item.minWidth"
:align="item.align||'center'" :align="item.align||'center'"
:sortable="item.sortable"> :sortable="item.sortable"
>
<template slot="header"> <template slot="header">
<span>{{item.label}}</span> <span>{{ item.label }}</span>
<table-head-search v-if="item.optionConfig" <table-head-search
:searchForm="headSearchForm" v-if="item.optionConfig"
:optionConfig="item.optionConfig" :search-form="headSearchForm"
:baseData="baseData" :option-config="item.optionConfig"
@handleTableHeadChange="handleTableHeadChange"></table-head-search> :base-data="baseData"
@handleTableHeadChange="handleTableHeadChange"
/>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<slot v-if="item.addHtml" <slot
v-if="item.addHtml"
:name="item.addHtml" :name="item.addHtml"
:scope="scope.row" :scope="scope.row"
:prop="item.prop" :prop="item.prop"
:width="item.width"></slot> :width="item.width"
/>
<template v-else-if="item.tagLabel"> <template v-else-if="item.tagLabel">
<el-tag v-if="!item.tagName" <el-tag
v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]" :type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]"> v-text="tableParams.tag.label[scope.row[item.prop]]"
</el-tag> />
<el-tag v-else <el-tag
v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]" :type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]"></el-tag> v-text="tableParams[item.tagName].label[scope.row[item.prop]]"
/>
</template> </template>
<template v-else-if="item.formatter"> <template v-else-if="item.formatter">
<span v-if="item.html" <span
v-html="item.formatter(scope.row)"></span> v-if="item.html"
v-html="item.formatter(scope.row)"
/>
<template v-if="!item.html"> <template v-if="!item.html">
<span :class="item.className?item.className(scope.row):''"></span> <span :class="item.className?item.className(scope.row):''" />
<span v-text="item.formatter(scope.row)"></span> <span v-text="item.formatter(scope.row)" />
</template> </template>
</template> </template>
<template v-else-if="getListApi"> <template v-else-if="getListApi">
<span v-if="item.prefix">{{item.prefix}}</span> <span v-if="item.prefix">{{ item.prefix }}</span>
<span <span
v-if="item.parentProp">{{scope.row[item.parentProp] ? scope.row[item.parentProp][item.prop] : ''}}</span> v-if="item.parentProp"
<span v-else>{{scope.row[item.prop]}}</span> >{{ scope.row[item.parentProp] ? scope.row[item.parentProp][item.prop] : '' }}</span>
<span v-else>{{ scope.row[item.prop] }}</span>
</template> </template>
<template v-else> <template v-else>
<span v-text="tableData[scope.$index][item.prop]"></span> <span v-text="tableData[scope.$index][item.prop]" />
</template> </template>
<template v-if="item.addSymbol"> <template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span> <span v-text="item.addSymbol" />
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="tableParams.tableOption" <el-table-column
v-if="tableParams.tableOption"
label="操作" label="操作"
fixed="right" fixed="right"
:align="tableParams.tableOption.align||'center'" :align="tableParams.tableOption.align||'center'"
:width="tableParams.tableOption.width||'auto'"> :width="tableParams.tableOption.width||'auto'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot name="auth-button" <slot
:scope="scope.row"></slot> name="auth-button"
<slot name="auth-button-other" :scope="scope.row"
:scope="scope.row"></slot> />
<slot
name="auth-button-other"
:scope="scope.row"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination v-if="hasPage" <el-pagination
v-if="hasPage"
background background
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -96,15 +119,15 @@ ...@@ -96,15 +119,15 @@
:page-sizes="[10,20,30,40]" :page-sizes="[10,20,30,40]"
:page-size="page.pageSize" :page-size="page.pageSize"
:total="getListApi ? total : tableTotal" :total="getListApi ? total : tableTotal"
:layout="layout"> :layout="layout"
</el-pagination> />
</div> </div>
</template> </template>
<script> <script>
import TableHeadSearch from './TableHeadSearch' import TableHeadSearch from './TableHeadSearch'
export default { export default {
name: 'd2-table', name: 'D2Table',
data() { data() {
return { return {
loading: false, loading: false,
......
...@@ -4,16 +4,16 @@ import d2Container from './d2-container' ...@@ -4,16 +4,16 @@ import d2Container from './d2-container'
import authButton from './d2-auth/d2-auth-btn.js' import authButton from './d2-auth/d2-auth-btn.js'
// 注意 有些组件使用异步加载会有影响 // 注意 有些组件使用异步加载会有影响
Vue.component('d2-container', d2Container) Vue.component('D2Container', d2Container)
Vue.component('d2-icon', () => import('./d2-icon')) Vue.component('D2Icon', () => import('./d2-icon'))
Vue.component('d2-el-icon', () => import('./d2-el-icon')) Vue.component('D2ElIcon', () => import('./d2-el-icon'))
Vue.component('d2-icon-svg', () => import('./d2-icon-svg/index.vue')) Vue.component('D2IconSvg', () => import('./d2-icon-svg/index.vue'))
Vue.component('d2-table-header', () => import('./d2-table-header/index.vue')) Vue.component('D2TableHeader', () => import('./d2-table-header/index.vue'))
Vue.component('d2-table', () => import('./d2-table/index.vue')) Vue.component('D2Table', () => import('./d2-table/index.vue'))
Vue.component('d2-dialog', () => import('./d2-dialog/index.vue')) Vue.component('D2Dialog', () => import('./d2-dialog/index.vue'))
Vue.component('d2-form', () => import('./d2-form/index.vue')) Vue.component('D2Form', () => import('./d2-form/index.vue'))
Vue.component('d2-search', () => import('./d2-search/index.vue')) Vue.component('D2Search', () => import('./d2-search/index.vue'))
Vue.component('relateStoreDialog', () => Vue.component('RelateStoreDialog', () =>
import('./d2-form/relateStoreDialog.vue') import('./d2-form/relateStoreDialog.vue')
) )
// Vue.component([authButton.name], authButton) // Vue.component([authButton.name], authButton)
......
<template> <template>
<div <div
class="d2-contentmenu-list" class="d2-contentmenu-list"
@click="rowClick"> @click="rowClick"
>
<div <div
v-for="item in menulist" v-for="item in menulist"
:key="item.value" :key="item.value"
:data-value="item.value" :data-value="item.value"
class="d2-contentmenu-item" class="d2-contentmenu-item"
flex="cross:center main:center"> flex="cross:center main:center"
>
<d2-el-icon <d2-el-icon
v-if="item.icon" v-if="item.icon"
:name="item.icon"/> :name="item.icon"
/>
<div <div
class="d2-contentmenu-item-title" class="d2-contentmenu-item-title"
flex-box="1" flex-box="1"
v-text="item.title"> v-text="item.title"
</div> />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'd2-contextmenu-list', name: 'D2ContextmenuList',
props: { props: {
menulist: { menulist: {
type: Array, type: Array,
......
...@@ -2,14 +2,15 @@ ...@@ -2,14 +2,15 @@
<div <div
class="d2-contextmenu" class="d2-contextmenu"
v-show="flag" v-show="flag"
:style="style"> :style="style"
<slot/> >
<slot />
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'd2-contextmenu', name: 'D2Contextmenu',
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
......
...@@ -8,14 +8,18 @@ ...@@ -8,14 +8,18 @@
<path d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z" <path d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z"
p-id="1694"></path> p-id="1694"></path>
</svg> --> </svg> -->
<div @click="click" class="hamburger" :class="{'is-active':isActive}"> <div
@click="click"
class="hamburger"
:class="{'is-active':isActive}"
>
<d2-el-icon name="s-fold" /> <d2-el-icon name="s-fold" />
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'hamburger', name: 'Hamburger',
props: { props: {
isActive: { isActive: {
type: Boolean, type: Boolean,
......
...@@ -4,14 +4,15 @@ ...@@ -4,14 +4,15 @@
:value="value" :value="value"
:predefine="predefine" :predefine="predefine"
size="mini" size="mini"
@change="set"/> @change="set"
/>
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
export default { export default {
name: 'd2-header-color', name: 'D2HeaderColor',
data() { data() {
return { return {
predefine: [ predefine: [
......
<template> <template>
<div class="header-datetime"></div> <div class="header-datetime" />
</template> </template>
<script> <script>
...@@ -7,7 +7,7 @@ import dayjs from 'dayjs' ...@@ -7,7 +7,7 @@ import dayjs from 'dayjs'
const sFormat = 'YYYY年MM月DD日' const sFormat = 'YYYY年MM月DD日'
const WEEK = ['天', '一', '二', '三', '四', '五', '六'] const WEEK = ['天', '一', '二', '三', '四', '五', '六']
export default { export default {
name: 'd2-header-datetime', name: 'D2HeaderDatetime',
data() { data() {
return { return {
timeInterval: null, timeInterval: null,
......
...@@ -2,10 +2,22 @@ ...@@ -2,10 +2,22 @@
<el-tooltip <el-tooltip
effect="dark" effect="dark"
:content="active ? '退出全屏' : '全屏'" :content="active ? '退出全屏' : '全屏'"
placement="bottom"> placement="bottom"
<el-button class="d2-mr btn-text can-hover" type="text" @click="toggle"> >
<d2-el-icon v-if="active" name="aim"/> <el-button
<d2-el-icon v-else name="full-screen" style="font-size: 16px"/> class="d2-mr btn-text can-hover"
type="text"
@click="toggle"
>
<d2-el-icon
v-if="active"
name="aim"
/>
<d2-el-icon
v-else
name="full-screen"
style="font-size: 16px"
/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</template> </template>
......
...@@ -2,17 +2,27 @@ ...@@ -2,17 +2,27 @@
<el-dropdown <el-dropdown
placement="bottom" placement="bottom"
size="small" size="small"
@command="onChangeLocale"> @command="onChangeLocale"
<el-button class="d2-mr btn-text can-hover" type="text"> >
<d2-icon name="language" style="font-size: 16px;"/> <el-button
class="d2-mr btn-text can-hover"
type="text"
>
<d2-icon
name="language"
style="font-size: 16px;"
/>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item
v-for="(language, index) in $languages" v-for="(language, index) in $languages"
:key="index" :key="index"
:command="language.value"> :command="language.value"
<d2-icon :name="$i18n.locale === language.value ? 'dot-circle-o' : 'circle-o'" class="d2-mr-5"/> >
<d2-icon
:name="$i18n.locale === language.value ? 'dot-circle-o' : 'circle-o'"
class="d2-mr-5"
/>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
......
...@@ -2,24 +2,29 @@ ...@@ -2,24 +2,29 @@
<el-tooltip <el-tooltip
effect="dark" effect="dark"
:content="tooltipContent" :content="tooltipContent"
placement="bottom"> placement="bottom"
>
<el-button <el-button
class="d2-ml-0 d2-mr btn-text can-hover" class="d2-ml-0 d2-mr btn-text can-hover"
type="text" type="text"
@click="handleClick"> @click="handleClick"
>
<el-badge <el-badge
v-if="logLength > 0" v-if="logLength > 0"
:max="99" :max="99"
:value="logLengthError" :value="logLengthError"
:is-dot="logLengthError === 0"> :is-dot="logLengthError === 0"
>
<d2-icon <d2-icon
:name="logLengthError === 0 ? 'dot-circle-o' : 'bug'" :name="logLengthError === 0 ? 'dot-circle-o' : 'bug'"
style="font-size: 20px"/> style="font-size: 20px"
/>
</el-badge> </el-badge>
<d2-icon <d2-icon
v-else v-else
name="dot-circle-o" name="dot-circle-o"
style="font-size: 20px"/> style="font-size: 20px"
/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</template> </template>
......
<template> <template>
<el-button class="d2-mr btn-text can-hover" type="text" @click="handleClick"> <el-button
<d2-el-icon name="search" style="font-size: 18px;"/> class="d2-mr btn-text can-hover"
type="text"
@click="handleClick"
>
<d2-el-icon
name="search"
style="font-size: 18px;"
/>
</el-button> </el-button>
</template> </template>
......
<template> <template>
<el-dropdown placement="bottom" size="small" @command="handleChange"> <el-dropdown
<el-button class="d2-mr btn-text can-hover" type="text"> placement="bottom"
<d2-icon name="font" style="font-size: 16px;"/> size="small"
@command="handleChange"
>
<el-button
class="d2-mr btn-text can-hover"
type="text"
>
<d2-icon
name="font"
style="font-size: 16px;"
/>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="item in options" :key="item.value" :command="item.value"> <el-dropdown-item
<d2-icon :name="iconName(item.value)" class="d2-mr-5"/> v-for="item in options"
:key="item.value"
:command="item.value"
>
<d2-icon
:name="iconName(item.value)"
class="d2-mr-5"
/>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
...@@ -14,7 +31,7 @@ ...@@ -14,7 +31,7 @@
<script> <script>
import { mapState, mapMutations, mapActions } from 'vuex' import { mapState, mapMutations, mapActions } from 'vuex'
export default { export default {
name: 'd2-header-size', name: 'D2HeaderSize',
data() { data() {
return { return {
options: [ options: [
......
<template> <template>
<el-table <el-table
:data="list" :data="list"
v-bind="table"> v-bind="table"
>
<el-table-column <el-table-column
prop="title" prop="title"
align="center" align="center"
width="160"/> width="160"
/>
<el-table-column <el-table-column
label="预览" label="预览"
width="120"> width="120"
>
<div <div
slot-scope="scope" slot-scope="scope"
class="theme-preview" class="theme-preview"
:style="{ :style="{
backgroundImage: `url(${$baseUrl}${scope.row.preview})` backgroundImage: `url(${$baseUrl}${scope.row.preview})`
}"> }"
</div> />
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
align="center"> align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="activeName === scope.row.name" v-if="activeName === scope.row.name"
type="primary" type="primary"
icon="el-icon-check" icon="el-icon-check"
class="btn-active-success" class="btn-active-success"
round> round
>
已激活 已激活
</el-button> </el-button>
<el-button <el-button
v-else v-else
round round
@click="handleSelectTheme(scope.row)"> @click="handleSelectTheme(scope.row)"
>
使用 使用
</el-button> </el-button>
</template> </template>
...@@ -43,7 +49,7 @@ ...@@ -43,7 +49,7 @@
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
export default { export default {
name: 'd2-theme-list', name: 'D2ThemeList',
data() { data() {
return { return {
table: { table: {
......
...@@ -3,22 +3,26 @@ ...@@ -3,22 +3,26 @@
<el-tooltip <el-tooltip
effect="dark" effect="dark"
content="主题" content="主题"
placement="bottom"> placement="bottom"
>
<el-button <el-button
class="d2-ml-0 d2-mr btn-text can-hover" class="d2-ml-0 d2-mr btn-text can-hover"
type="text" type="text"
@click="dialogVisible = true"> @click="dialogVisible = true"
>
<d2-el-icon <d2-el-icon
name="magic-stick" name="magic-stick"
style="font-size: 18px"/> style="font-size: 18px"
/>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-dialog <el-dialog
title="主题" title="主题"
width="600px" width="600px"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:append-to-body="true"> :append-to-body="true"
<d2-theme-list style="margin-top: -25px;"/> >
<d2-theme-list style="margin-top: -25px;" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
......
<template> <template>
<div> <div>
<div class="d2-mr personal-wrap"> <div class="d2-mr personal-wrap">
<el-popover ref="popover1" <el-popover
ref="popover1"
placement="top-start" placement="top-start"
width="400" width="400"
@show="redPotShow = false" @show="redPotShow = false"
popper-class="popper" popper-class="popper"
v-model="visible" v-model="visible"
trigger="hover"> trigger="hover"
<p class="title">导出和导出任务</p> >
<p class="tips"> 导出和导出任务加载完成后将自动进行下载,加载过程中不要离开系统,否则将导致任务自动清空</p> <p class="title">
<div v-for="(item,index) in dowloadList" 导出和导出任务
</p>
<p class="tips">
导出和导出任务加载完成后将自动进行下载,加载过程中不要离开系统,否则将导致任务自动清空
</p>
<div
v-for="(item,index) in dowloadList"
:key="index" :key="index"
class="downloadSty"> class="downloadSty"
<span class="one-line-ellipsis downName">{{item.name}}</span> >
<span class="downLabel"> {{item.labelText}}</span> <span class="one-line-ellipsis downName">{{ item.name }}</span>
<span class="downLabel"> {{ item.labelText }}</span>
</div> </div>
<div v-for="(item,index) in updateList" <div
v-for="(item,index) in updateList"
:key="index+'a'" :key="index+'a'"
class="updateListClass"> class="updateListClass"
>
<div v-if="item.progress!= 100"> <div v-if="item.progress!= 100">
<p>{{item.name}}</p> <p>{{ item.name }}</p>
<el-progress :percentage="item.progress?item.progress:2"></el-progress> <el-progress :percentage="item.progress?item.progress:2" />
</div> </div>
<div v-else> <div v-else>
<p>{{item.name||''}}</p> <p>{{ item.name||'' }}</p>
<p>成功{{item.succNum}}条<span v-if="item.failNum">,失败{{item.failNum}}条</span></p> <p>成功{{ item.succNum }}条<span v-if="item.failNum">,失败{{ item.failNum }}条</span></p>
</div> </div>
</div> </div>
<!-- @click="test" --> <!-- @click="test" -->
<span slot="reference"> <span slot="reference">
<i class="el-icon-bell tipsIcon " <i
:class="{'redPot':redPotShow }"></i> class="el-icon-bell tipsIcon "
:class="{'redPot':redPotShow }"
/>
</span> </span>
</el-popover> </el-popover>
<span v-if="show" <span
class="btn-text">{{info && info.detail ? (info.detail.userType == 2 ? `${info.detail.userName}` : '管理员') : '未登录'}}</span> v-if="show"
<span class="btn-text out-txt" class="btn-text"
@click="clear">退出</span> >{{ info && info.detail ? (info.detail.userType == 2 ? `${info.detail.userName}` : '管理员') : '未登录' }}</span>
<span
class="btn-text out-txt"
@click="clear"
>退出</span>
</div> </div>
</div> </div>
</template> </template>
...@@ -78,8 +93,8 @@ export default { ...@@ -78,8 +93,8 @@ export default {
}, },
computed: { computed: {
...mapState({ ...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList, dowloadList: (state) => state.d2admin.user.dowloadList,
'updateList': (state) => state.d2admin.user.updateList updateList: (state) => state.d2admin.user.updateList
}) })
}, },
watch: { watch: {
......
// 创建 el-menu-item // 创建 el-menu-item
export function elMenuItem(createElement, menu) { export function elMenuItem(createElement, menu) {
return createElement('el-menu-item', { props: { index: menu.path } }, [ return createElement('el-menu-item', { props: { index: menu.path } }, [
...menu.icon ? [ ...menu.icon
? [
createElement('i', { attrs: { class: `el-icon-${menu.icon}` } }) createElement('i', { attrs: { class: `el-icon-${menu.icon}` } })
] : [], ]
: [],
...menu.icon === undefined & !menu.iconSvg ? [ ...menu.icon === undefined & !menu.iconSvg ? [
// createElement('img', { attrs: { src: './menuIcon/' + menu.path.slice(1) + '.png' } }) // createElement('img', { attrs: { src: './menuIcon/' + menu.path.slice(1) + '.png' } })
// public 文件需要使用绝对路径引入 // public 文件需要使用绝对路径引入
createElement('img', { attrs: { src: `${process.env.VUE_APP_PUBLIC_PATH}/menuIcon/` + menu.path.slice(1) + '.png' } }) createElement('img', { attrs: { src: `${process.env.VUE_APP_PUBLIC_PATH}/menuIcon/` + menu.path.slice(1) + '.png' } })
] : [], ] : [],
...menu.iconSvg ? [ ...menu.iconSvg
? [
createElement('d2-icon-svg', { props: { name: menu.iconSvg } }) createElement('d2-icon-svg', { props: { name: menu.iconSvg } })
] : [], ]
: [],
createElement('span', { slot: 'title' }, menu.title || '未命名菜单') createElement('span', { slot: 'title' }, menu.title || '未命名菜单')
]) ])
} }
...@@ -19,17 +23,21 @@ export function elMenuItem(createElement, menu) { ...@@ -19,17 +23,21 @@ export function elMenuItem(createElement, menu) {
// 创建 el-submenu // 创建 el-submenu
export function elSubmenu(createElement, menu) { export function elSubmenu(createElement, menu) {
return createElement('el-submenu', { props: { index: menu.path } }, [ return createElement('el-submenu', { props: { index: menu.path } }, [
...menu.icon ? [ ...menu.icon
? [
createElement('i', { slot: 'title', attrs: { class: `el-icon-${menu.icon}` } }) createElement('i', { slot: 'title', attrs: { class: `el-icon-${menu.icon}` } })
] : [], ]
: [],
...menu.icon === undefined & !menu.iconSvg ? [ ...menu.icon === undefined & !menu.iconSvg ? [
// createElement('img', { slot: 'title', attrs: { src: './menuIcon/' + menu.path.slice(1) + '.png' } }) // createElement('img', { slot: 'title', attrs: { src: './menuIcon/' + menu.path.slice(1) + '.png' } })
// public 文件需要使用绝对路径引入 // public 文件需要使用绝对路径引入
createElement('img', { slot: 'title', attrs: { src: `${process.env.VUE_APP_PUBLIC_PATH}/menuIcon/` + menu.path.slice(1) + '.png' } }) createElement('img', { slot: 'title', attrs: { src: `${process.env.VUE_APP_PUBLIC_PATH}/menuIcon/` + menu.path.slice(1) + '.png' } })
] : [], ] : [],
...menu.iconSvg ? [ ...menu.iconSvg
? [
createElement('d2-icon-svg', { slot: 'title', props: { name: menu.iconSvg } }) createElement('d2-icon-svg', { slot: 'title', props: { name: menu.iconSvg } })
] : [], ]
: [],
createElement('span', { slot: 'title' }, menu.title || '未命名菜单'), createElement('span', { slot: 'title' }, menu.title || '未命名菜单'),
...menu.children.map((child, childIndex) => child.sideHidden ? '' : (child.children === undefined ? elMenuItem : elSubmenu).call(this, createElement, child)) ...menu.children.map((child, childIndex) => child.sideHidden ? '' : (child.children === undefined ? elMenuItem : elSubmenu).call(this, createElement, child))
]) ])
......
...@@ -28,7 +28,8 @@ export default { ...@@ -28,7 +28,8 @@ export default {
}, this.header.map(menu => (menu.children === undefined ? elMenuItem : elSubmenu).call(this, createElement, menu))) }, this.header.map(menu => (menu.children === undefined ? elMenuItem : elSubmenu).call(this, createElement, menu)))
]) ])
]), ]),
...this.isScroll ? [ ...this.isScroll
? [
createElement('div', { createElement('div', {
attrs: { class: 'd2-theme-header-menu__prev', flex: 'main:center cross:center', 'flex-box': '0' }, attrs: { class: 'd2-theme-header-menu__prev', flex: 'main:center cross:center', 'flex-box': '0' },
on: { click: () => this.scroll('left') } on: { click: () => this.scroll('left') }
...@@ -41,7 +42,8 @@ export default { ...@@ -41,7 +42,8 @@ export default {
}, [ }, [
createElement('i', { attrs: { class: 'el-icon-arrow-right' } }) createElement('i', { attrs: { class: 'el-icon-arrow-right' } })
]) ])
] : [] ]
: []
]) ])
}, },
computed: { computed: {
......
...@@ -15,12 +15,14 @@ export default { ...@@ -15,12 +15,14 @@ export default {
ref: 'menu', ref: 'menu',
on: { select: this.handleMenuSelect } on: { select: this.handleMenuSelect }
}, this.aside.map(menu => ((menu.children === undefined || menu.children.every(i => i.sideHidden === true)) ? elMenuItem : elSubmenu).call(this, createElement, menu))), }, this.aside.map(menu => ((menu.children === undefined || menu.children.every(i => i.sideHidden === true)) ? elMenuItem : elSubmenu).call(this, createElement, menu))),
...this.aside.length === 0 && !this.asideCollapse ? [ ...this.aside.length === 0 && !this.asideCollapse
? [
createElement('div', { attrs: { class: 'd2-layout-header-aside-menu-empty', flex: 'dir:top main:center cross:center' } }, [ createElement('div', { attrs: { class: 'd2-layout-header-aside-menu-empty', flex: 'dir:top main:center cross:center' } }, [
createElement('d2-icon', { props: { name: 'inbox' } }), createElement('d2-icon', { props: { name: 'inbox' } }),
createElement('span', {}, '没有侧栏菜单') createElement('span', {}, '没有侧栏菜单')
]) ])
] : [] ]
: []
]) ])
}, },
data() { data() {
......
<template> <template>
<div class="d2-panel-search-item" :class="hoverMode ? 'can-hover' : ''" flex> <div
<div class="d2-panel-search-item__icon" flex-box="0"> class="d2-panel-search-item"
<div class="d2-panel-search-item__icon-box" flex="main:center cross:center"> :class="hoverMode ? 'can-hover' : ''"
<d2-el-icon v-if="item.icon" :name="item.icon"/> flex
>
<div
class="d2-panel-search-item__icon"
flex-box="0"
>
<div
class="d2-panel-search-item__icon-box"
flex="main:center cross:center"
>
<d2-el-icon
v-if="item.icon"
:name="item.icon"
/>
<!-- <d2-icon-svg v-else-if="item.iconSvg" :name="item.iconSvg"/> <!-- <d2-icon-svg v-else-if="item.iconSvg" :name="item.iconSvg"/>
<d2-icon v-else name="file-o"/> --> <d2-icon v-else name="file-o"/> -->
</div> </div>
</div> </div>
<div class="d2-panel-search-item__info" flex-box="1" flex="dir:top"> <div
<div class="d2-panel-search-item__info-title" flex-box="1" flex="cross:center"> class="d2-panel-search-item__info"
<span></span> flex-box="1"
flex="dir:top"
>
<div
class="d2-panel-search-item__info-title"
flex-box="1"
flex="cross:center"
>
<span />
</div> </div>
<div class="d2-panel-search-item__info-fullTitle" flex-box="0"> <div
<span></span> class="d2-panel-search-item__info-fullTitle"
flex-box="0"
>
<span />
</div> </div>
<div class="d2-panel-search-item__info-path" flex-box="0"> <div
<span></span> class="d2-panel-search-item__info-path"
flex-box="0"
>
<span />
</div> </div>
</div> </div>
</div> </div>
......
<template> <template>
<div <div
class="panel-search" class="panel-search"
flex="dir:top"> flex="dir:top"
>
<div <div
class="panel-search__input-group" class="panel-search__input-group"
flex-box="0" flex-box="0"
flex="dir:top main:center cross:center" flex="dir:top main:center cross:center"
@click.self="handlePanelClick"> @click.self="handlePanelClick"
>
<!-- <d2-icon-svg <!-- <d2-icon-svg
class="panel-search__logo" class="panel-search__logo"
name="d2-admin-text"/> --> name="d2-admin-text"/> -->
<img src="./image/logo.png" alt=""> <img
src="./image/logo.png"
alt=""
>
<el-autocomplete <el-autocomplete
class="panel-search__input" class="panel-search__input"
ref="input" ref="input"
...@@ -21,23 +26,26 @@ ...@@ -21,23 +26,26 @@
:trigger-on-focus="false" :trigger-on-focus="false"
:clearable="true" :clearable="true"
@keydown.esc.native="handleEsc" @keydown.esc.native="handleEsc"
@select="handleSelect"> @select="handleSelect"
>
<d2-panel-search-item <d2-panel-search-item
slot-scope="{ item }" slot-scope="{ item }"
:item="item"/> :item="item"
/>
</el-autocomplete> </el-autocomplete>
<div class="panel-search__tip"> <div class="panel-search__tip">
您可以使用快捷键 您可以使用快捷键
<span class="panel-search__key"></span> <span class="panel-search__key" />
唤醒搜索面板,按 唤醒搜索面板,按
<span class="panel-search__key"></span> <span class="panel-search__key" />
关闭 关闭
</div> </div>
</div> </div>
<div <div
v-if="resultsList.length > 0" v-if="resultsList.length > 0"
class="panel-search__results-group" class="panel-search__results-group"
flex-box="1"> flex-box="1"
>
<el-card> <el-card>
<div class="panel-search__results-group-inner"> <div class="panel-search__results-group-inner">
<d2-panel-search-item <d2-panel-search-item
...@@ -45,7 +53,8 @@ ...@@ -45,7 +53,8 @@
:key="index" :key="index"
:item="item" :item="item"
:hover-mode="true" :hover-mode="true"
@click.native="handleResultsGroupItemClick(item.path)"/> @click.native="handleResultsGroupItemClick(item.path)"
/>
</div> </div>
</el-card> </el-card>
</div> </div>
...@@ -76,10 +85,12 @@ export default { ...@@ -76,10 +85,12 @@ export default {
]), ]),
// 这份数据是展示在搜索面板下面的 // 这份数据是展示在搜索面板下面的
resultsList() { resultsList() {
return (this.results.length === 0 && this.searchText === '') ? this.pool.map(e => ({ return (this.results.length === 0 && this.searchText === '')
? this.pool.map(e => ({
value: e.fullTitle, value: e.fullTitle,
...e ...e
})) : this.results }))
: this.results
} }
}, },
methods: { methods: {
......
...@@ -51,19 +51,34 @@ ...@@ -51,19 +51,34 @@
清空本地缓存 清空本地缓存
</div> </div>
</div>--> </div>-->
<div class="panel-item" @click="handleChangeAccount"> <div
<el-button type="text" :disabled="accountInfo.accountList.length == 1"> class="panel-item"
<i class="i el-icon-sort"></i>{{user && user.merchantAccountLevel ? (user.merchantAccountLevel == 4 ? `${user.detail.userName}` : '管理员') : '未登录'}} @click="handleChangeAccount"
>
<el-button
type="text"
:disabled="accountInfo.accountList.length == 1"
>
<i class="i el-icon-sort" />{{ user && user.merchantAccountLevel ? (user.merchantAccountLevel == 4 ? `${user.detail.userName}` : '管理员') : '未登录' }}
</el-button> </el-button>
</div> </div>
<div class="panel-item" @click="clear"> <div
class="panel-item"
@click="clear"
>
<el-button type="text"> <el-button type="text">
<i class="i el-icon-switch-button"></i>退出账户 <i class="i el-icon-switch-button" />退出账户
</el-button> </el-button>
</div> </div>
</div> </div>
<personal-dialog :visible="personalVisible" :user="info" /> <personal-dialog
<password-dialog :visible="passwordVisible" :user="info" /> :visible="personalVisible"
:user="info"
/>
<password-dialog
:visible="passwordVisible"
:user="info"
/>
</div> </div>
</template> </template>
......
...@@ -9,23 +9,69 @@ ...@@ -9,23 +9,69 @@
:close-on-click-modal="false" :close-on-click-modal="false"
width="600px" width="600px"
> >
<el-form label-width="120px" v-if="info" :model="info" :rules="rules" ref="passwordForm"> <el-form
<el-form-item label="用户名:" prop="userName"> label-width="120px"
<el-input disabled="disabled" v-model="info.userName"></el-input> v-if="info"
:model="info"
:rules="rules"
ref="passwordForm"
>
<el-form-item
label="用户名:"
prop="userName"
>
<el-input
disabled="disabled"
v-model="info.userName"
/>
</el-form-item> </el-form-item>
<el-form-item label="原密码:" prop="oldPassword"> <el-form-item
<el-input type="password" maxlength="12" :show-password="true" v-model="info.oldPassword" /> label="原密码:"
prop="oldPassword"
>
<el-input
type="password"
maxlength="12"
:show-password="true"
v-model="info.oldPassword"
/>
</el-form-item> </el-form-item>
<el-form-item label="新密码:" prop="newPassword"> <el-form-item
<el-input type="password" maxlength="12" :show-password="true" v-model="info.newPassword" /> label="新密码:"
prop="newPassword"
>
<el-input
type="password"
maxlength="12"
:show-password="true"
v-model="info.newPassword"
/>
</el-form-item> </el-form-item>
<el-form-item label="确认密码:" prop="confirm"> <el-form-item
<el-input type="password" maxlength="12" :show-password="true" v-model="info.confirm" /> label="确认密码:"
prop="confirm"
>
<el-input
type="password"
maxlength="12"
:show-password="true"
v-model="info.confirm"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div
<el-button type="primary" @click="submit">保 存</el-button> slot="footer"
<el-button @click="handleClose">取 消</el-button> class="dialog-footer"
>
<el-button
type="primary"
@click="submit"
>
保 存
</el-button>
<el-button @click="handleClose">
取 消
</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -43,7 +89,8 @@ export default { ...@@ -43,7 +89,8 @@ export default {
{ required: true, message: '请输入旧密码', trigger: ['blur'] } { required: true, message: '请输入旧密码', trigger: ['blur'] }
], ],
newPassword: [ newPassword: [
{ required: true, {
required: true,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (!value) { if (!value) {
callback(new Error('请输入新密码')) callback(new Error('请输入新密码'))
...@@ -58,7 +105,8 @@ export default { ...@@ -58,7 +105,8 @@ export default {
} }
], ],
confirm: [ confirm: [
{ required: true, {
required: true,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (!value) { if (!value) {
callback(new Error('请再次输入新密码')) callback(new Error('请再次输入新密码'))
......
...@@ -9,29 +9,74 @@ ...@@ -9,29 +9,74 @@
:close-on-click-modal="false" :close-on-click-modal="false"
width="600px" width="600px"
> >
<el-form v-if="user" label-width="120px" :model="user"> <el-form
<el-form-item label="用户名:" prop="loginName"> v-if="user"
<el-input disabled v-model="user.loginName"></el-input> label-width="120px"
:model="user"
>
<el-form-item
label="用户名:"
prop="loginName"
>
<el-input
disabled
v-model="user.loginName"
/>
</el-form-item> </el-form-item>
<el-form-item label="姓名:" prop="userName"> <el-form-item
<el-input disabled v-model="user.userName"></el-input> label="姓名:"
prop="userName"
>
<el-input
disabled
v-model="user.userName"
/>
</el-form-item> </el-form-item>
<el-form-item label="联系方式:" prop="mobile"> <el-form-item
<el-input disabled v-model="user.mobile"></el-input> label="联系方式:"
prop="mobile"
>
<el-input
disabled
v-model="user.mobile"
/>
</el-form-item> </el-form-item>
<el-form-item label="所属公司:" prop="companyName"> <el-form-item
<el-input disabled v-model="user.companyName"></el-input> label="所属公司:"
prop="companyName"
>
<el-input
disabled
v-model="user.companyName"
/>
</el-form-item> </el-form-item>
<el-form-item label="部门:" prop="departName"> <el-form-item
<el-input disabled v-model="user.departName"></el-input> label="部门:"
prop="departName"
>
<el-input
disabled
v-model="user.departName"
/>
</el-form-item> </el-form-item>
<el-form-item label="职务:" prop="postName"> <el-form-item
<el-input disabled v-model="user.postName"></el-input> label="职务:"
prop="postName"
>
<el-input
disabled
v-model="user.postName"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div
slot="footer"
class="dialog-footer"
>
<!-- <el-button type="primary" @click="personDialogVisible = false">确 定</el-button> --> <!-- <el-button type="primary" @click="personDialogVisible = false">确 定</el-button> -->
<el-button @click="handleClose">确 定</el-button> <el-button @click="handleClose">
确 定
</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -40,7 +85,7 @@ ...@@ -40,7 +85,7 @@
<script> <script>
// import { ctMethods, request } from '@/api' // import { ctMethods, request } from '@/api'
export default { export default {
name: 'personalDialog', name: 'PersonalDialog',
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
......
<template> <template>
<div class="d2-multiple-page-control-group" flex> <div
<div class="d2-multiple-page-control-content" flex-box="1"> class="d2-multiple-page-control-group"
flex
>
<div
class="d2-multiple-page-control-content"
flex-box="1"
>
<div class="d2-multiple-page-control-content-inner"> <div class="d2-multiple-page-control-content-inner">
<d2-contextmenu <d2-contextmenu
:visible.sync="contextmenuFlag" :visible.sync="contextmenuFlag"
:x="contentmenuX" :x="contentmenuX"
:y="contentmenuY"> :y="contentmenuY"
>
<d2-contextmenu-list <d2-contextmenu-list
:menulist="tagName === '/index' ? contextmenuListIndex : contextmenuList" :menulist="tagName === '/index' ? contextmenuListIndex : contextmenuList"
@rowClick="contextmenuClick"/> @rowClick="contextmenuClick"
/>
</d2-contextmenu> </d2-contextmenu>
<el-tabs <el-tabs
class="d2-multiple-page-control" class="d2-multiple-page-control"
...@@ -17,25 +25,43 @@ ...@@ -17,25 +25,43 @@
:closable="true" :closable="true"
@tab-click="handleClick" @tab-click="handleClick"
@edit="handleTabsEdit" @edit="handleTabsEdit"
@contextmenu.native="handleContextmenu"> @contextmenu.native="handleContextmenu"
>
<el-tab-pane <el-tab-pane
v-for="page in opened" v-for="page in opened"
:key="page.fullPath" :key="page.fullPath"
:name="page.fullPath"> :name="page.fullPath"
<span slot="label"><d2-el-icon :name="page.meta.icon"/> <span v-text="(page.meta && page.meta.title) || '未命名'"></span></span> >
<span slot="label"><d2-el-icon :name="page.meta.icon" /> <span v-text="(page.meta && page.meta.title) || '未命名'" /></span>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>
<div <div
class="d2-multiple-page-control-btn" class="d2-multiple-page-control-btn"
flex-box="0"> flex-box="0"
>
<el-button-group> <el-button-group>
<el-button icon="el-icon-error" @click="closeAll"></el-button> <el-button
<el-tooltip class="item" effect="dark" :content="cacheTip" placement="bottom"> icon="el-icon-error"
<el-button :icon="kaIcon" @click="handleCache"></el-button> @click="closeAll"
/>
<el-tooltip
class="item"
effect="dark"
:content="cacheTip"
placement="bottom"
>
<el-button
:icon="kaIcon"
@click="handleCache"
/>
</el-tooltip> </el-tooltip>
<el-button icon="el-icon-refresh" @click="reload" :disabled="current==='/index'"></el-button> <el-button
icon="el-icon-refresh"
@click="reload"
:disabled="current==='/index'"
/>
</el-button-group> </el-button-group>
</div> </div>
</div> </div>
...@@ -44,11 +70,11 @@ ...@@ -44,11 +70,11 @@
<script> <script>
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
const CMD_MAP = { const CMD_MAP = {
'left': 'closeLeft', left: 'closeLeft',
'right': 'closeRight', right: 'closeRight',
'other': 'closeOther', other: 'closeOther',
'all': 'closeAll', all: 'closeAll',
'reload': 'reload' reload: 'reload'
} }
export default { export default {
components: { components: {
......
<template> <template>
<div class="d2-layout-header-aside-group" <div
class="d2-layout-header-aside-group"
:style="styleLayoutMainGroup" :style="styleLayoutMainGroup"
:class="{grayMode: grayActive}"> :class="{grayMode: grayActive}"
>
<!-- 半透明遮罩 --> <!-- 半透明遮罩 -->
<div class="d2-layout-header-aside-mask"></div> <div class="d2-layout-header-aside-mask" />
<!-- 主体内容 --> <!-- 主体内容 -->
<div class="d2-layout-header-aside-content" <div
flex="dir:top"> class="d2-layout-header-aside-content"
flex="dir:top"
>
<!-- 顶栏 --> <!-- 顶栏 -->
<div class="d2-theme-header" <div
class="d2-theme-header"
:style="{ :style="{
opacity: this.searchActive ? 0.5 : 1 opacity: this.searchActive ? 0.5 : 1
}" }"
flex-box="0" flex-box="0"
flex> flex
<div class="logo-group d2-theme-header-logo" >
<div
class="logo-group d2-theme-header-logo"
:class="asideCollapse ? 'logo-only' : 'logo-all'" :class="asideCollapse ? 'logo-only' : 'logo-all'"
flex-box="0"> flex-box="0"
<img v-if="asideCollapse" >
src="../../assets/icon-only.png"> <img
<img v-else v-if="asideCollapse"
src="../../assets/all.png"> src="../../assets/icon-only.png"
>
<img
v-else
src="../../assets/all.png"
>
<!-- <img style="width: 32px; height: 32px;" src="../../assets/icon-only.png"> --> <!-- <img style="width: 32px; height: 32px;" src="../../assets/icon-only.png"> -->
</div> </div>
<p v-if="show" <p
class="d2-header-name">{{info ? info.detail.merchantName : ''}}</p> v-if="show"
class="d2-header-name"
>
{{ info ? info.detail.merchantName : '' }}
</p>
<!-- <hamburger :onClick="handleToggleAside" :isActive="asideCollapse" flex-box="0" class="toggle-aside-btn"></hamburger> <!-- <hamburger :onClick="handleToggleAside" :isActive="asideCollapse" flex-box="0" class="toggle-aside-btn"></hamburger>
<span class="header-title">{{headerTitle}}</span> --> <span class="header-title">{{headerTitle}}</span> -->
<d2-menu-header flex-box="1" /> <d2-menu-header flex-box="1" />
<!-- 顶栏右侧 --> <!-- 顶栏右侧 -->
<div class="d2-header-right" <div
flex-box="0"> class="d2-header-right"
flex-box="0"
>
<!-- <d2-header-datetime /> --> <!-- <d2-header-datetime /> -->
<!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" --> <!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" -->
<!-- <d2-header-search @click="handleSearchClick"/> --> <!-- <d2-header-search @click="handleSearchClick"/> -->
...@@ -43,64 +61,87 @@ ...@@ -43,64 +61,87 @@
<d2-header-user /> <d2-header-user />
</div> </div>
</div> </div>
<div class="d2-theme-header" <div
class="d2-theme-header"
style="height: 40px; font-size: 14px; border-top: 1px solid #F0F2F5;" style="height: 40px; font-size: 14px; border-top: 1px solid #F0F2F5;"
flex-box="0" flex-box="0"
flex> flex
<div class="logo-group d2-theme-header-logo" >
<div
class="logo-group d2-theme-header-logo"
style="height: 1px; margin-top: -1px;" style="height: 1px; margin-top: -1px;"
:class="asideCollapse ? 'logo-only' : 'logo-all'" :class="asideCollapse ? 'logo-only' : 'logo-all'"
flex-box="0">
</div>
<hamburger :onClick="handleToggleAside"
:isActive="asideCollapse"
flex-box="0" flex-box="0"
class="toggle-aside-btn"></hamburger> />
<span class="header-title">{{headerTitle}}</span> <hamburger
:on-click="handleToggleAside"
:is-active="asideCollapse"
flex-box="0"
class="toggle-aside-btn"
/>
<span class="header-title">{{ headerTitle }}</span>
</div> </div>
<!-- 下面 主体 --> <!-- 下面 主体 -->
<div class="d2-theme-container" <div
class="d2-theme-container"
flex-box="1" flex-box="1"
flex> flex
>
<!-- 主体 侧边栏 --> <!-- 主体 侧边栏 -->
<div flex-box="0" <div
flex-box="0"
ref="aside" ref="aside"
class="d2-theme-container-aside" class="d2-theme-container-aside"
:style="{ :style="{
width: asideCollapse ? asideWidthCollapse : asideWidth, width: asideCollapse ? asideWidthCollapse : asideWidth,
opacity: this.searchActive ? 0.5 : 1 opacity: this.searchActive ? 0.5 : 1
}"> }"
>
<d2-menu-side /> <d2-menu-side />
</div> </div>
<!-- 主体 --> <!-- 主体 -->
<div class="d2-theme-container-main" <div
class="d2-theme-container-main"
:class="this.searchActive ? 'is-search' : ''" :class="this.searchActive ? 'is-search' : ''"
flex-box="1" flex-box="1"
flex> flex
>
<!-- 搜索 --> <!-- 搜索 -->
<transition name="fade-scale"> <transition name="fade-scale">
<div v-if="searchActive" <div
v-if="searchActive"
class="d2-theme-container-main-layer" class="d2-theme-container-main-layer"
flex> flex
<d2-panel-search ref="panelSearch" >
@close="searchPanelClose" /> <d2-panel-search
ref="panelSearch"
@close="searchPanelClose"
/>
</div> </div>
</transition> </transition>
<!-- 内容 --> <!-- 内容 -->
<transition name="fade-scale"> <transition name="fade-scale">
<div v-if="!searchActive" <div
v-if="!searchActive"
class="d2-theme-container-main-layer" class="d2-theme-container-main-layer"
flex="dir:top"> flex="dir:top"
>
<!-- tab --> <!-- tab -->
<div class="d2-theme-container-main-header" <div
flex-box="0"> class="d2-theme-container-main-header"
flex-box="0"
>
<!-- <d2-tabs/> --> <!-- <d2-tabs/> -->
</div> </div>
<!-- 页面 --> <!-- 页面 -->
<div class="d2-theme-container-main-body" <div
flex-box="1"> class="d2-theme-container-main-body"
<transition :name="transitionActive ? 'el-fade-in' : '' " flex-box="1"
mode="out-in"> >
<transition
:name="transitionActive ? 'el-fade-in' : '' "
mode="out-in"
>
<keep-alive :include="keepAlive"> <keep-alive :include="keepAlive">
<router-view /> <router-view />
</keep-alive> </keep-alive>
...@@ -132,7 +173,7 @@ import { mapState, mapGetters, mapActions } from 'vuex' ...@@ -132,7 +173,7 @@ import { mapState, mapGetters, mapActions } from 'vuex'
import mixinSearch from './mixins/search' import mixinSearch from './mixins/search'
import { localRoutes } from '@/router/routes' import { localRoutes } from '@/router/routes'
export default { export default {
name: 'd2-layout-header-aside', name: 'D2LayoutHeaderAside',
mixins: [ mixins: [
mixinSearch mixinSearch
], ],
...@@ -193,9 +234,11 @@ export default { ...@@ -193,9 +234,11 @@ export default {
*/ */
styleLayoutMainGroup() { styleLayoutMainGroup() {
return { return {
...this.themeActiveSetting.backgroundImage ? { ...this.themeActiveSetting.backgroundImage
? {
backgroundImage: `url('${this.$baseUrl}${this.themeActiveSetting.backgroundImage}')` backgroundImage: `url('${this.$baseUrl}${this.themeActiveSetting.backgroundImage}')`
} : {} }
: {}
} }
} }
}, },
......
...@@ -6,14 +6,14 @@ const util = { ...@@ -6,14 +6,14 @@ const util = {
cookies, cookies,
db, db,
log, log,
permision permision,
} }
/** /**
* @description 更新标题 * @description 更新标题
* @param {String} title 标题 * @param {String} title 标题
*/ */
util.title = function(titleText) { util.title = function (titleText) {
const processTitle = process.env.VUE_APP_TITLE const processTitle = process.env.VUE_APP_TITLE
window.document.title = `${processTitle}${titleText ? ` | ${titleText}` : ''}` window.document.title = `${processTitle}${titleText ? ` | ${titleText}` : ''}`
} }
...@@ -22,7 +22,7 @@ util.title = function(titleText) { ...@@ -22,7 +22,7 @@ util.title = function(titleText) {
* @description 打开新页面 * @description 打开新页面
* @param {String} url 地址 * @param {String} url 地址
*/ */
util.open = function(url, target) { util.open = function (url, target) {
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('href', url) a.setAttribute('href', url)
a.setAttribute('target', target || '_blank') a.setAttribute('target', target || '_blank')
...@@ -37,7 +37,7 @@ util.open = function(url, target) { ...@@ -37,7 +37,7 @@ util.open = function(url, target) {
* console.log(bar===foo) false * console.log(bar===foo) false
* @param {*} obj * @param {*} obj
*/ */
util.deepClone = obj => { util.deepClone = (obj) => {
// Handle the 3 simple types, and null or undefined or function // Handle the 3 simple types, and null or undefined or function
if (obj == null || typeof obj !== 'object') return obj if (obj == null || typeof obj !== 'object') return obj
// Handle Date // Handle Date
...@@ -50,7 +50,7 @@ util.deepClone = obj => { ...@@ -50,7 +50,7 @@ util.deepClone = obj => {
if ((obj instanceof Array) | (obj instanceof Object)) { if ((obj instanceof Array) | (obj instanceof Object)) {
const copy = obj instanceof Array ? [] : {} const copy = obj instanceof Array ? [] : {}
for (var attr in obj) { for (var attr in obj) {
if (obj.hasOwnProperty(attr)) { if (Object.prototype.hasOwnProperty.call(attr)) {
copy[attr] = util.deepClone(obj[attr]) copy[attr] = util.deepClone(obj[attr])
} }
} }
...@@ -64,7 +64,7 @@ util.deepClone = obj => { ...@@ -64,7 +64,7 @@ util.deepClone = obj => {
* @param {Function} condition 回调函数,必须返回谓词,判断是否找到了。会传入(item, index, level)三个参数 * @param {Function} condition 回调函数,必须返回谓词,判断是否找到了。会传入(item, index, level)三个参数
* @param {String} children 子数组的key * @param {String} children 子数组的key
*/ */
util.deepFind = function(menus, id) { util.deepFind = function (menus, id) {
const cloneMenus = util.deepClone(menus) const cloneMenus = util.deepClone(menus)
for (const menu of cloneMenus) { for (const menu of cloneMenus) {
if (menu.id === id) { if (menu.id === id) {
...@@ -112,7 +112,7 @@ util.colorToRgb = (sColor, alpha) => { ...@@ -112,7 +112,7 @@ util.colorToRgb = (sColor, alpha) => {
* 重置form * 重置form
* 用法: util.resetForm.call(this,'formName') * 用法: util.resetForm.call(this,'formName')
*/ */
util.resetForm = function(formName) { util.resetForm = function (formName) {
this.$nextTick(() => { this.$nextTick(() => {
for (var key in this[formName]) { for (var key in this[formName]) {
if (this[formName].hasOwnProperty(key)) { if (this[formName].hasOwnProperty(key)) {
...@@ -127,10 +127,10 @@ util.resetForm = function(formName) { ...@@ -127,10 +127,10 @@ util.resetForm = function(formName) {
* 格式化时间 * 格式化时间
* @param {Array} time * @param {Array} time
*/ */
util.formatTime = function(time) { util.formatTime = function (time) {
return { return {
startTime: time ? time[0] + ' ' + '00:00:00' : '', startTime: time ? time[0] + ' ' + '00:00:00' : '',
endTime: time ? time[1] + ' ' + '23:59:59' : '' endTime: time ? time[1] + ' ' + '23:59:59' : '',
} }
} }
......
...@@ -37,8 +37,8 @@ permision.packRoutesBtns = function(resources, idsInPermision) { ...@@ -37,8 +37,8 @@ permision.packRoutesBtns = function(resources, idsInPermision) {
} }
}) })
return { return {
'route': __aRouteInPermision, route: __aRouteInPermision,
'btn': __oBtnInPermision btn: __oBtnInPermision
} }
} }
...@@ -114,7 +114,8 @@ permision.format2Menu = function(oMenu) { ...@@ -114,7 +114,8 @@ permision.format2Menu = function(oMenu) {
path, path,
authId, authId,
parentId, parentId,
sideHidden } sideHidden
}
} }
/** /**
...@@ -129,7 +130,8 @@ permision.format2ResourceMenu = function(oMenu) { ...@@ -129,7 +130,8 @@ permision.format2ResourceMenu = function(oMenu) {
icon, icon,
authId, authId,
parentId, parentId,
auth } auth
}
} }
/** /**
......
...@@ -70,7 +70,7 @@ export const sys = [ ...@@ -70,7 +70,7 @@ export const sys = [
* 908 - 我的分账 * 908 - 我的分账
*/ */
export const resources = { export const resources = {
'902': { 902: {
path: '/flowManage', path: '/flowManage',
name: 'flowManage', name: 'flowManage',
meta: { meta: {
...@@ -80,7 +80,7 @@ export const resources = { ...@@ -80,7 +80,7 @@ export const resources = {
cache: false cache: false
} }
}, },
'90201': { 90201: {
path: '/customerList', path: '/customerList',
name: 'customerList', name: 'customerList',
meta: { meta: {
...@@ -101,7 +101,7 @@ export const resources = { ...@@ -101,7 +101,7 @@ export const resources = {
], ],
component: _import('customer/customerList') component: _import('customer/customerList')
}, },
'90202': { 90202: {
path: '/recordList', path: '/recordList',
name: 'recordList', name: 'recordList',
meta: { meta: {
...@@ -151,7 +151,7 @@ export const resources = { ...@@ -151,7 +151,7 @@ export const resources = {
], ],
component: _import('customer/recordList') component: _import('customer/recordList')
}, },
'901': { 901: {
path: '/editCustomer', path: '/editCustomer',
name: 'editCustomer', name: 'editCustomer',
meta: { meta: {
...@@ -164,7 +164,7 @@ export const resources = { ...@@ -164,7 +164,7 @@ export const resources = {
}, },
component: _import('customer/editCustomer') component: _import('customer/editCustomer')
}, },
'90203': { 90203: {
path: '/invitation', path: '/invitation',
name: 'invitation', name: 'invitation',
meta: { meta: {
...@@ -226,7 +226,7 @@ export const resources = { ...@@ -226,7 +226,7 @@ export const resources = {
], ],
component: _import('customer/invitation') component: _import('customer/invitation')
}, },
'903': { 903: {
path: '/goods', path: '/goods',
name: 'goods', name: 'goods',
meta: { meta: {
...@@ -236,7 +236,7 @@ export const resources = { ...@@ -236,7 +236,7 @@ export const resources = {
cache: false cache: false
} }
}, },
'90301': { 90301: {
path: '/product', path: '/product',
name: 'product', name: 'product',
meta: { meta: {
...@@ -297,7 +297,7 @@ export const resources = { ...@@ -297,7 +297,7 @@ export const resources = {
], ],
component: _import('goods/product') component: _import('goods/product')
}, },
'90304': { 90304: {
path: '/editProduct', path: '/editProduct',
name: 'editProduct', name: 'editProduct',
meta: { meta: {
...@@ -310,7 +310,7 @@ export const resources = { ...@@ -310,7 +310,7 @@ export const resources = {
}, },
component: _import('goods/editProduct') component: _import('goods/editProduct')
}, },
'90302': { 90302: {
path: '/commodity', path: '/commodity',
name: 'commodity', name: 'commodity',
meta: { meta: {
...@@ -401,7 +401,7 @@ export const resources = { ...@@ -401,7 +401,7 @@ export const resources = {
], ],
component: _import('goods/commodity') component: _import('goods/commodity')
}, },
'90305': { 90305: {
path: '/editCommodity', path: '/editCommodity',
name: 'editCommodity', name: 'editCommodity',
meta: { meta: {
...@@ -414,7 +414,7 @@ export const resources = { ...@@ -414,7 +414,7 @@ export const resources = {
}, },
component: _import('goods/editCommodity') component: _import('goods/editCommodity')
}, },
'90306': { 90306: {
path: '/coupons', path: '/coupons',
name: 'coupons', name: 'coupons',
meta: { meta: {
...@@ -468,7 +468,7 @@ export const resources = { ...@@ -468,7 +468,7 @@ export const resources = {
], ],
component: _import('goods/coupons') component: _import('goods/coupons')
}, },
'904': { 904: {
path: '/orderManage', path: '/orderManage',
name: 'orderManage', name: 'orderManage',
meta: { meta: {
...@@ -478,7 +478,7 @@ export const resources = { ...@@ -478,7 +478,7 @@ export const resources = {
cache: false cache: false
} }
}, },
'90401': { 90401: {
path: '/orderList', path: '/orderList',
name: 'orderList', name: 'orderList',
meta: { meta: {
...@@ -543,7 +543,7 @@ export const resources = { ...@@ -543,7 +543,7 @@ export const resources = {
], ],
component: _import('orderManage/orderList') component: _import('orderManage/orderList')
}, },
'90402': { 90402: {
path: '/orderDetail', path: '/orderDetail',
name: 'orderDetail', name: 'orderDetail',
meta: { meta: {
...@@ -555,7 +555,7 @@ export const resources = { ...@@ -555,7 +555,7 @@ export const resources = {
}, },
component: _import('orderManage/orderDetail') component: _import('orderManage/orderDetail')
}, },
'90403': { 90403: {
path: '/orderSupplement', path: '/orderSupplement',
name: 'orderSupplement', name: 'orderSupplement',
meta: { meta: {
...@@ -567,7 +567,7 @@ export const resources = { ...@@ -567,7 +567,7 @@ export const resources = {
}, },
component: _import('orderManage/orderSupplement') component: _import('orderManage/orderSupplement')
}, },
'905': { 905: {
path: '/financeManage', path: '/financeManage',
name: 'financeManage', name: 'financeManage',
meta: { meta: {
...@@ -577,7 +577,7 @@ export const resources = { ...@@ -577,7 +577,7 @@ export const resources = {
cache: false cache: false
} }
}, },
'90501': { 90501: {
path: '/financeList', path: '/financeList',
name: 'financeList', name: 'financeList',
meta: { meta: {
...@@ -620,7 +620,7 @@ export const resources = { ...@@ -620,7 +620,7 @@ export const resources = {
], ],
component: _import('financeManage/index') component: _import('financeManage/index')
}, },
'90502': { 90502: {
path: '/financeDetail', path: '/financeDetail',
name: 'financeDetail', name: 'financeDetail',
meta: { meta: {
...@@ -632,7 +632,7 @@ export const resources = { ...@@ -632,7 +632,7 @@ export const resources = {
}, },
component: _import('financeManage/financeDetail') component: _import('financeManage/financeDetail')
}, },
'90503': { 90503: {
path: '/onlineAccountList', path: '/onlineAccountList',
name: 'onlineAccountList', name: 'onlineAccountList',
meta: { meta: {
...@@ -661,7 +661,7 @@ export const resources = { ...@@ -661,7 +661,7 @@ export const resources = {
], ],
component: _import('financeManage/account/index') component: _import('financeManage/account/index')
}, },
'90504': { 90504: {
path: '/accountRecord', path: '/accountRecord',
name: 'accountRecord', name: 'accountRecord',
meta: { meta: {
...@@ -673,7 +673,7 @@ export const resources = { ...@@ -673,7 +673,7 @@ export const resources = {
}, },
component: _import('financeManage/account/accountRecord') component: _import('financeManage/account/accountRecord')
}, },
'906': { 906: {
path: '/systemConfig', path: '/systemConfig',
name: 'systemConfig', name: 'systemConfig',
meta: { meta: {
...@@ -683,7 +683,7 @@ export const resources = { ...@@ -683,7 +683,7 @@ export const resources = {
cache: false cache: false
} }
}, },
'90601': { 90601: {
path: '/personalInfo', path: '/personalInfo',
name: 'personalInfo', name: 'personalInfo',
meta: { meta: {
...@@ -694,7 +694,7 @@ export const resources = { ...@@ -694,7 +694,7 @@ export const resources = {
}, },
component: _import('systemConfig/personalInfo') component: _import('systemConfig/personalInfo')
}, },
'90603': { 90603: {
path: '/merchantManage', path: '/merchantManage',
name: 'merchantManage', name: 'merchantManage',
meta: { meta: {
...@@ -746,7 +746,7 @@ export const resources = { ...@@ -746,7 +746,7 @@ export const resources = {
], ],
component: _import('systemConfig/merchant/merchantManage') component: _import('systemConfig/merchant/merchantManage')
}, },
'90604': { 90604: {
path: '/merchantDetail', path: '/merchantDetail',
name: 'merchantDetail', name: 'merchantDetail',
meta: { meta: {
...@@ -758,7 +758,7 @@ export const resources = { ...@@ -758,7 +758,7 @@ export const resources = {
}, },
component: _import('systemConfig/merchant/merchantStep/index') component: _import('systemConfig/merchant/merchantStep/index')
}, },
'90605': { 90605: {
path: '/serviceManage', path: '/serviceManage',
name: 'serviceManage', name: 'serviceManage',
meta: { meta: {
...@@ -785,7 +785,7 @@ export const resources = { ...@@ -785,7 +785,7 @@ export const resources = {
], ],
component: _import('systemConfig/serviceManage') component: _import('systemConfig/serviceManage')
}, },
'90608': { 90608: {
path: '/yqStoreManage', path: '/yqStoreManage',
name: 'yqStoreManage', name: 'yqStoreManage',
meta: { meta: {
...@@ -810,7 +810,7 @@ export const resources = { ...@@ -810,7 +810,7 @@ export const resources = {
], ],
component: _import('systemConfig/yqStoreManage') component: _import('systemConfig/yqStoreManage')
}, },
'90609': { 90609: {
path: '/yqStoreDetail', path: '/yqStoreDetail',
name: 'yqStoreDetail', name: 'yqStoreDetail',
meta: { meta: {
...@@ -822,7 +822,7 @@ export const resources = { ...@@ -822,7 +822,7 @@ export const resources = {
}, },
component: _import('systemConfig/yqStoreConfig') component: _import('systemConfig/yqStoreConfig')
}, },
'90606': { 90606: {
path: '/accountList', path: '/accountList',
name: 'accountList', name: 'accountList',
meta: { meta: {
...@@ -858,7 +858,7 @@ export const resources = { ...@@ -858,7 +858,7 @@ export const resources = {
], ],
component: _import('systemConfig/account/accountList') component: _import('systemConfig/account/accountList')
}, },
'90607': { 90607: {
path: '/applyAccount', path: '/applyAccount',
name: 'applyAccount', name: 'applyAccount',
meta: { meta: {
...@@ -870,7 +870,7 @@ export const resources = { ...@@ -870,7 +870,7 @@ export const resources = {
}, },
component: _import('systemConfig/account/applyAccount') component: _import('systemConfig/account/applyAccount')
}, },
'90610': { 90610: {
path: '/accountList_new', path: '/accountList_new',
name: 'accountList_new', name: 'accountList_new',
meta: { meta: {
...@@ -912,7 +912,7 @@ export const resources = { ...@@ -912,7 +912,7 @@ export const resources = {
], ],
component: _import('systemConfig/accountNew/accountList') component: _import('systemConfig/accountNew/accountList')
}, },
'90611': { 90611: {
path: '/applyAccount_new', path: '/applyAccount_new',
name: 'applyAccount_new', name: 'applyAccount_new',
meta: { meta: {
......
...@@ -10,9 +10,11 @@ function supplementMenuPath(menu) { ...@@ -10,9 +10,11 @@ function supplementMenuPath(menu) {
return menu.map(e => ({ return menu.map(e => ({
...e, ...e,
path: e.path || _.uniqueId('d2-menu-empty-'), path: e.path || _.uniqueId('d2-menu-empty-'),
...e.children ? { ...e.children
? {
children: supplementMenuPath(e.children) children: supplementMenuPath(e.children)
} : {} }
: {}
})) }))
} }
......
...@@ -39,11 +39,11 @@ export default { ...@@ -39,11 +39,11 @@ export default {
const push = function(menu, titlePrefix = []) { const push = function(menu, titlePrefix = []) {
menu.forEach(m => { menu.forEach(m => {
if (m.children) { if (m.children) {
push(m.children, [ ...titlePrefix, m.title ]) push(m.children, [...titlePrefix, m.title])
} else { } else {
pool.push({ pool.push({
...m, ...m,
fullTitle: [ ...titlePrefix, m.title ].join(' / ') fullTitle: [...titlePrefix, m.title].join(' / ')
}) })
} }
}) })
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<d2-dialog <d2-dialog
title="提现" title="提现"
:isVisible.sync="cashVisible" :is-visible.sync="cashVisible"
width="60%" width="60%"
@confirmDialog="handleCashConfirm" @confirmDialog="handleCashConfirm"
@closeDialog="handleCashClose" @closeDialog="handleCashClose"
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</el-form-item> </el-form-item>
<el-form-item label="到账账户:"> <el-form-item label="到账账户:">
<p>{{ cashForm.bankAccountName }}</p> <p>{{ cashForm.bankAccountName }}</p>
<p>{{ cashForm.bankName}}({{ cashForm.bankAccountNo }})<span>预计24小时内到账</span></p> <p>{{ cashForm.bankName }}({{ cashForm.bankAccountNo }})<span>预计24小时内到账</span></p>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="验证码:" label="验证码:"
...@@ -32,15 +32,19 @@ ...@@ -32,15 +32,19 @@
v-model="cashForm.smsCode" v-model="cashForm.smsCode"
placeholder="请输入验证码" placeholder="请输入验证码"
style="width: 200px" style="width: 200px"
></el-input> />
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="handleSend" @click="handleSend"
:disabled="isSend" :disabled="isSend"
class="cash-btn" class="cash-btn"
>{{isSend ? sendMsg + '秒后,重试' : '获取验证码'}}</el-button> >
<p v-show="showtips">已向尾号为{{ cashForm.withdrawPhone ? cashForm.withdrawPhone.slice(-4) : '' }}的手机号发送验证码,验证码30分钟内有效</p> {{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }}
</el-button>
<p v-show="showtips">
已向尾号为{{ cashForm.withdrawPhone ? cashForm.withdrawPhone.slice(-4) : '' }}的手机号发送验证码,验证码30分钟内有效
</p>
</el-form-item> </el-form-item>
</el-form> </el-form>
</d2-dialog> </d2-dialog>
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
<d2-search <d2-search
ref="showSearch" ref="showSearch"
class="show-search" class="show-search"
:searchForm="searchForm" :search-form="searchForm"
:formData="showFormData" :form-data="showFormData"
> >
<div <div
slot="accountType" slot="accountType"
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
:key="item.confId" :key="item.confId"
:value="item.confId" :value="item.confId"
:label="item.confLabel" :label="item.confLabel"
></el-option> />
</el-select> </el-select>
<el-select v-model="searchForm.divisionStatus"> <el-select v-model="searchForm.divisionStatus">
<el-option <el-option
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
:key="item.confId" :key="item.confId"
:value="item.confId" :value="item.confId"
:label="item.confLabel" :label="item.confLabel"
></el-option> />
</el-select> </el-select>
</div> </div>
</d2-search> </d2-search>
...@@ -62,44 +62,53 @@ ...@@ -62,44 +62,53 @@
:id="tableParams.btnId" :id="tableParams.btnId"
size="small" size="small"
type="primary" type="primary"
>查询</el-button> >
查询
</el-button>
<el-button <el-button
size="small" size="small"
@click="handleReset" @click="handleReset"
>重置</el-button> >
重置
</el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :leftSpan="22"> <d2-table-header :left-span="22">
<span slot="left">共<span class="count-txt">{{countObj.orderCount}}</span>笔订单,累计分账金额<span class="count-txt">{{countObj.partnerDivisionMoneyCount}}</span>元,分账成功金额<span class="count-txt">{{countObj.partnerDivisionSuccessMoneyCount}}</span>元,分账中金额<span class="count-txt">{{countObj.partnerInDivisionMoneyCount}}</span>元,分账失败金额<span class="count-txt">{{countObj.partnerDivisionFailureMoneyCount}}</span>元。</span> <span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计分账金额<span class="count-txt">{{ countObj.partnerDivisionMoneyCount }}</span>元,分账成功金额<span class="count-txt">{{ countObj.partnerDivisionSuccessMoneyCount }}</span>元,分账中金额<span class="count-txt">{{ countObj.partnerInDivisionMoneyCount }}</span>元,分账失败金额<span class="count-txt">{{ countObj.partnerDivisionFailureMoneyCount }}</span>元。</span>
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
>导出</el-button> >
导出
</el-button>
</d2-table-header> </d2-table-header>
<d2-table <d2-table
ref="merchantTable" ref="merchantTable"
:getListApi="getListApi" :get-list-api="getListApi"
:searchForm="searchFormSearch" :search-form="searchFormSearch"
:tableParams="tableParams" :table-params="tableParams"
:beforeSearchFn="beforeSearchFn" :before-search-fn="beforeSearchFn"
>
<template
slot="divisionStatus"
slot-scope="scope"
> >
<template slot="divisionStatus" slot-scope="scope">
<span <span
v-if="scope.scope.divisionStatus" v-if="scope.scope.divisionStatus"
:style="{ 'color': [4, 5].includes(+scope.scope.divisionStatus) ? 'red' : '#606266' }" :style="{ 'color': [4, 5].includes(+scope.scope.divisionStatus) ? 'red' : '#606266' }"
>{{baseData.divisionStatusList.find(item => +item.confId === scope.scope.divisionStatus).confLabel}}</span> >{{ baseData.divisionStatusList.find(item => +item.confId === scope.scope.divisionStatus).confLabel }}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</d2-table> </d2-table>
</div> </div>
<cash-dialog <cash-dialog
:cashForm="cashForm" :cash-form="cashForm"
:cashVisible="cashVisible" :cash-visible="cashVisible"
@handleCashConfirm="handleCashConfirm" @handleCashConfirm="handleCashConfirm"
@handleCashClose="handleCashClose" @handleCashClose="handleCashClose"
></cash-dialog> />
</d2-container> </d2-container>
</template> </template>
...@@ -111,7 +120,7 @@ import { getCurrentSixMonth, divisionTypeList, divisionStatusList } from '@/comm ...@@ -111,7 +120,7 @@ import { getCurrentSixMonth, divisionTypeList, divisionStatusList } from '@/comm
// import { getPartnerYqListApi } from '@api/editCustomer' // import { getPartnerYqListApi } from '@api/editCustomer'
import { getListApi, getCountApi, exportApi, getBankBalanceApi, getPartnerYqListApi } from '@/api/account' import { getListApi, getCountApi, exportApi, getBankBalanceApi, getPartnerYqListApi } from '@/api/account'
export default { export default {
name: 'myAccount', name: 'MyAccount',
data() { data() {
return { return {
countObj: {}, countObj: {},
......
...@@ -7,34 +7,36 @@ ...@@ -7,34 +7,36 @@
> >
<d2-search <d2-search
ref="showSearch" ref="showSearch"
:searchForm="searchForm" :search-form="searchForm"
:formData="showFormData" :form-data="showFormData"
> />
</d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button <el-button
:id="tableParams.btnId" :id="tableParams.btnId"
size="small" size="small"
type="primary" type="primary"
>查询</el-button> >
查询
</el-button>
<el-button <el-button
size="small" size="small"
@click="handleReset" @click="handleReset"
>重置</el-button> >
重置
</el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :leftSpan="24"> <d2-table-header :left-span="24">
<span slot="left">共提现<span class="count-txt">{{countObj.recordCount}}</span>次,累计分账金额<span class="count-txt">{{countObj.totalAmount}}</span>元。</span> <span slot="left">共提现<span class="count-txt">{{ countObj.recordCount }}</span>次,累计分账金额<span class="count-txt">{{ countObj.totalAmount }}</span>元。</span>
</d2-table-header> </d2-table-header>
<d2-table <d2-table
ref="merchantTable" ref="merchantTable"
:getListApi="getListApi" :get-list-api="getListApi"
:searchForm="searchFormSearch" :search-form="searchFormSearch"
:tableParams="tableParams" :table-params="tableParams"
:beforeSearchFn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> />
</d2-table>
</div> </div>
</d2-container> </d2-container>
</template> </template>
...@@ -44,7 +46,7 @@ import { Util } from '@/common/util' ...@@ -44,7 +46,7 @@ import { Util } from '@/common/util'
import { getWithdrawList, getWithdrawCountApi } from '@/api/account' import { getWithdrawList, getWithdrawCountApi } from '@/api/account'
import { getCurrentSixMonth, withdrawStatusList, withdrawChannelList } from '@/common/constants.js' import { getCurrentSixMonth, withdrawStatusList, withdrawChannelList } from '@/common/constants.js'
export default { export default {
name: 'myAccountRecord', name: 'MyAccountRecord',
data() { data() {
return { return {
countObj: { countObj: {
......
<!-- 客户列表 --> <!-- 客户列表 -->
<template> <template>
<d2-container class="customer-list"> <d2-container class="customer-list">
<div class="header" <div
slot="header"> class="header"
<d2-search ref="showSearch" slot="header"
>
<d2-search
ref="showSearch"
class="show-search" class="show-search"
:searchForm="searchForm" :search-form="searchForm"
:formData="showFormData"> :form-data="showFormData"
</d2-search> />
<div class="up-btns"> <div class="up-btns">
<el-button size="small" <el-button
size="small"
type="primary" type="primary"
@click="handleSearch">查询</el-button> @click="handleSearch"
<el-button size="small" >
@click="handleReset">重置</el-button> 查询
</el-button>
<el-button
size="small"
@click="handleReset"
>
重置
</el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span slot="left">客户列表记录{{count.orderCount}}条。</span> <span slot="left">客户列表记录{{ count.orderCount }}条。</span>
<auth-button category="Button"></auth-button> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<el-table :data="tableData"> <el-table :data="tableData">
<el-table-column label="序号" <el-table-column
label="序号"
width="60px" width="60px"
type='index' type="index"
align="center"></el-table-column> align="center"
/>
<el-table-column label="客户信息"> <el-table-column label="客户信息">
<el-table-column label="客户姓名" <el-table-column
label="客户姓名"
prop="customerName" prop="customerName"
align="center"></el-table-column> align="center"
<el-table-column label="性别" />
align="center"> <el-table-column
label="性别"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.customerSex === 1 ? '男' : '女'}}</span> <span>{{ scope.row.customerSex === 1 ? '男' : '女' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="品牌车型" <el-table-column
label="品牌车型"
align="center" align="center"
width="150px"> width="150px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.carBrand || ''}}{{scope.row.carSeriesName ? ('-' + scope.row.carSeriesName) : ''}}{{scope.row.carTypeName ? ( '-' + scope.row.carTypeName) : ''}}</span> <span>{{ scope.row.carBrand || '' }}{{ scope.row.carSeriesName ? ('-' + scope.row.carSeriesName) : '' }}{{ scope.row.carTypeName ? ( '-' + scope.row.carTypeName) : '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车架号" <el-table-column
label="车架号"
align="center" align="center"
prop="standNo"></el-table-column> prop="standNo"
<el-table-column label="客户状态" />
align="center"> <el-table-column
label="客户状态"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span <!-- <span
class="red" class="red"
...@@ -55,67 +78,85 @@ ...@@ -55,67 +78,85 @@
>未完成</span> >未完成</span>
<span v-else>已完成</span> --> <span v-else>已完成</span> -->
<span <span
:class="{ 'red': scope.row.status === 1 }">{{baseData.customerStatusList.find(item => item.confId == scope.row.status).confLabel}}</span> :class="{ 'red': scope.row.status === 1 }"
>{{ baseData.customerStatusList.find(item => item.confId == scope.row.status).confLabel }}</span>
<!-- <span>{{scope.row.status}}</span> --> <!-- <span>{{scope.row.status}}</span> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="服务时间" <el-table-column
align="center"> label="服务时间"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.order ? (!scope.row.order.installUpgradeTime ? '' : new Date(scope.row.order.installUpgradeTime).toLocaleDateString()) : ''}}</span> <span>{{ scope.row.order ? (!scope.row.order.installUpgradeTime ? '' : new Date(scope.row.order.installUpgradeTime).toLocaleDateString()) : '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注信息" <el-table-column
label="备注信息"
align="center" align="center"
prop="order.remark"> prop="order.remark"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.order ? (scope.row.order.upgradeFlag === 'N' ? (scope.row.order.customer ? (scope.row.order.customer.refusalReason || '无') : '无') : (scope.row.order.remark || '无')) : '无'}}</span> <span>{{ scope.row.order ? (scope.row.order.upgradeFlag === 'N' ? (scope.row.order.customer ? (scope.row.order.customer.refusalReason || '无') : '无') : (scope.row.order.remark || '无')) : '无' }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="关联信息"> <el-table-column label="关联信息">
<el-table-column label="流量来源" <el-table-column
label="流量来源"
align="center" align="center"
prop="merchantName" prop="merchantName"
width="170"></el-table-column> width="170"
<el-table-column label="推荐人" />
<el-table-column
label="推荐人"
align="center" align="center"
prop="employeeName"> prop="employeeName"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.order ? scope.row.order.employeeName : ''}}</span> <span>{{ scope.row.order ? scope.row.order.employeeName : '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="园区店" <el-table-column
label="园区店"
align="center" align="center"
prop="yqMerchantName" prop="yqMerchantName"
width="170px"></el-table-column> width="170px"
<el-table-column label="转化专员" />
<el-table-column
label="转化专员"
align="center" align="center"
prop="order.sellerName"></el-table-column> prop="order.sellerName"
/>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" <el-table-column
align="center"> label="创建时间"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{new Date(scope.row.createdDate).toLocaleDateString()}}</span> <span>{{ new Date(scope.row.createdDate).toLocaleDateString() }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建方式" <el-table-column
label="创建方式"
align="center" align="center"
prop="source"> prop="source"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.order ? (scope.row.order.source === 3 ? '现场升级' : (scope.row.order.source === 5 ? '核销抵扣' : '系统录入')): (scope.row.source === 3 ? '现场升级' : (scope.row.source === 5 ? '核销抵扣' : '系统录入'))}}</span> <span>{{ scope.row.order ? (scope.row.order.source === 3 ? '现场升级' : (scope.row.order.source === 5 ? '核销抵扣' : '系统录入')): (scope.row.source === 3 ? '现场升级' : (scope.row.source === 5 ? '核销抵扣' : '系统录入')) }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination background <el-pagination
background
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page.pageNum" :current-page="page.pageNum"
:page-sizes="[10,20,30,40]" :page-sizes="[10,20,30,40]"
:page-size="page.pageSize" :page-size="page.pageSize"
:total="total" :total="total"
layout="sizes,total,->,prev,pager,next,jumper"> layout="sizes,total,->,prev,pager,next,jumper"
</el-pagination> />
</div> </div>
</d2-container> </d2-container>
</template> </template>
...@@ -127,7 +168,7 @@ import { getServiceStore, getParkStore } from '@api/editCustomer' ...@@ -127,7 +168,7 @@ import { getServiceStore, getParkStore } from '@api/editCustomer'
import { asyncExportEecel } from '@api/sys.base' import { asyncExportEecel } from '@api/sys.base'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
export default { export default {
name: 'index', name: 'Index',
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
...@@ -263,7 +304,7 @@ export default { ...@@ -263,7 +304,7 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
</div> </div>
<div class="appoint-table-content"> <div class="appoint-table-content">
<table <table
cellpadding='0' cellpadding="0"
cellspacing='0' cellspacing="0"
> >
<tr class="appoint-table-header"> <tr class="appoint-table-header">
<td>邀约时间</td> <td>邀约时间</td>
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
v-for="(item, index) in detailData" v-for="(item, index) in detailData"
:key="index" :key="index"
> >
<td>{{item.time}}</td> <td>{{ item.time }}</td>
<td class="flex"> <td class="flex">
<img <img
class="detail-header" class="detail-header"
:src="item.info.sex === 1 ? './images/header-man-grey.png' : './images/header-woman.png'" :src="item.info.sex === 1 ? './images/header-man-grey.png' : './images/header-woman.png'"
/> >
<block class="detail-info"> <block class="detail-info">
<p>{{item.info.name}}</p> <p>{{ item.info.name }}</p>
<p>{{item.info.project}}</p> <p>{{ item.info.project }}</p>
</block> </block>
<block class="detail-phone"> <block class="detail-phone">
<p <p
...@@ -40,16 +40,20 @@ ...@@ -40,16 +40,20 @@
@click="handleGetPhone(item, index)" @click="handleGetPhone(item, index)"
>获取虚拟手机号</span> >获取虚拟手机号</span>
</p> </p>
<p v-show="item.info.phone">{{item.info.phone}}</p> <p v-show="item.info.phone">
{{ item.info.phone }}
</p>
</block> </block>
</td> </td>
<td> <td>
{{item.status === 1 ? '完成服务' : '未到店'}} {{ item.status === 1 ? '完成服务' : '未到店' }}
</td> </td>
</tr> </tr>
</template> </template>
<tr v-else> <tr v-else>
<td colspan="3">无数据</td> <td colspan="3">
无数据
</td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -62,11 +66,11 @@ export default { ...@@ -62,11 +66,11 @@ export default {
data() { data() {
return { return {
hoursList: [ hoursList: [
{ 'hour': '9:00' }, { 'hour': '10:00' }, { hour: '9:00' }, { hour: '10:00' },
{ 'hour': '11:00' }, { 'hour': '12:00' }, { hour: '11:00' }, { hour: '12:00' },
{ 'hour': '13:00' }, { 'hour': '14:00' }, { hour: '13:00' }, { hour: '14:00' },
{ 'hour': '15:00' }, { 'hour': '16:00' }, { hour: '15:00' }, { hour: '16:00' },
{ 'hour': '17:00' }, { 'hour': '18:00' }], { hour: '17:00' }, { hour: '18:00' }],
detailData: [{ detailData: [{
time: '上午9:00', time: '上午9:00',
info: { info: {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<p>中午12:00</p> <p>中午12:00</p>
<p>晚上18:00</p> <p>晚上18:00</p>
</div> </div>
<p class="date-y-line"></p> <p class="date-y-line" />
</block> </block>
<el-button <el-button
icon="el-icon-d-arrow-left" icon="el-icon-d-arrow-left"
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
class="arrow-left-icon" class="arrow-left-icon"
:disabled="currentWeek === 1" :disabled="currentWeek === 1"
@click="handleWeek(false)" @click="handleWeek(false)"
></el-button> />
<block> <block>
<div class="date-picker"> <div class="date-picker">
<div <div
...@@ -50,13 +50,13 @@ ...@@ -50,13 +50,13 @@
:class="{'col-width': true, 'hour-block': true, 'status-full': info.status === 2, 'status-remain': info.status === 1 }" :class="{'col-width': true, 'hour-block': true, 'status-full': info.status === 2, 'status-remain': info.status === 1 }"
slot="reference" slot="reference"
@click="handleAppoint(item, infoIndex)" @click="handleAppoint(item, infoIndex)"
>{{appointStatusList[info.status]}}</el-button> >{{ appointStatusList[info.status] }}</el-button>
</el-popover> </el-popover>
</p> </p>
</span> </span>
</div> </div>
</div> </div>
<p class="date-x-line"></p> <p class="date-x-line" />
<div class="date-picker"> <div class="date-picker">
<div <div
class="wrapper" class="wrapper"
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
:class="{'date-btn': true, 'col-width': true, 'active': item.active}" :class="{'date-btn': true, 'col-width': true, 'active': item.active}"
@click="handleSelectDate(index)" @click="handleSelectDate(index)"
> >
<p>{{item.date.split('/')[1] + '.' + item.date.split('/')[2]}}</p> <p>{{ item.date.split('/')[1] + '.' + item.date.split('/')[2] }}</p>
<p>{{weekList[item.week]}}</p> <p>{{ weekList[item.week] }}</p>
</el-button> </el-button>
</div> </div>
</div> </div>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
type="text" type="text"
:disabled="currentWeek === 5" :disabled="currentWeek === 5"
@click="handleWeek(true)" @click="handleWeek(true)"
></el-button> />
</div> </div>
</div> </div>
</template> </template>
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
class="header" class="header"
slot="header" slot="header"
> >
<appoint-table></appoint-table> <appoint-table />
<time-date <time-date
:appointData="appointData" :appoint-data="appointData"
:hoursList="hoursList" :hours-list="hoursList"
@handleAppoint="handleAppoint" @handleAppoint="handleAppoint"
></time-date> />
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<el-form :inline="true"> <el-form :inline="true">
...@@ -21,14 +21,13 @@ ...@@ -21,14 +21,13 @@
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
> />
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-input <el-input
v-model="searchForm.name" v-model="searchForm.name"
placeholder="客户姓名或车架号" placeholder="客户姓名或车架号"
></el-input> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
...@@ -36,18 +35,24 @@ ...@@ -36,18 +35,24 @@
:id="tableParams.btnId" :id="tableParams.btnId"
size="small" size="small"
type="primary" type="primary"
>查询</el-button> >
查询
</el-button>
<el-button <el-button
v-show="activeName === 'second'" v-show="activeName === 'second'"
:id="tableSecondParams.btnId" :id="tableSecondParams.btnId"
size="small" size="small"
type="primary" type="primary"
style="margin-left: 0px;" style="margin-left: 0px;"
>查询</el-button> >
查询
</el-button>
<el-button <el-button
size="small" size="small"
@click="handleReset" @click="handleReset"
>重置</el-button> >
重置
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-tabs <el-tabs
...@@ -55,13 +60,13 @@ ...@@ -55,13 +60,13 @@
type="card" type="card"
> >
<el-tab-pane name="first"> <el-tab-pane name="first">
<span slot="label"><i class="el-icon-date"></i>已预约({{totalCount.inviteCount}})</span> <span slot="label"><i class="el-icon-date" />已预约({{ totalCount.inviteCount }})</span>
<d2-table <d2-table
ref="invitationFirstTable" ref="invitationFirstTable"
:hasNum="false" :has-num="false"
:searchForm="searchForm" :search-form="searchForm"
:tableParams="tableParams" :table-params="tableParams"
:getListApi="getListApi" :get-list-api="getListApi"
> >
<template <template
slot="auth-button" slot="auth-button"
...@@ -69,19 +74,19 @@ ...@@ -69,19 +74,19 @@
> >
<auth-button <auth-button
:data="scope.scope" :data="scope.scope"
showBtnIds="['9020301', '9020302', '9020303', '9020304']" show-btn-ids="['9020301', '9020302', '9020303', '9020304']"
></auth-button> />
</template> </template>
</d2-table> </d2-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="second"> <el-tab-pane name="second">
<span slot="label"><i class="el-icon-date"></i>待预约({{totalCount.customerCount}})</span> <span slot="label"><i class="el-icon-date" />待预约({{ totalCount.customerCount }})</span>
<d2-table <d2-table
ref="invitationSecondTable" ref="invitationSecondTable"
:hasNum="false" :has-num="false"
:searchForm="searchForm" :search-form="searchForm"
:tableParams="tableSecondParams" :table-params="tableSecondParams"
:getListApi="getListApi" :get-list-api="getListApi"
> >
<template <template
slot="auth-button" slot="auth-button"
...@@ -89,17 +94,16 @@ ...@@ -89,17 +94,16 @@
> >
<auth-button <auth-button
:data="scope.scope" :data="scope.scope"
showBtnIds="['9020305', '9020306', '9020307']" show-btn-ids="['9020305', '9020306', '9020307']"
></auth-button> />
</template> </template>
</d2-table> </d2-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<d2-dialog <d2-dialog
title="正在为客户预约" title="正在为客户预约"
:isVisible="appointDialogVisible" :is-visible="appointDialogVisible"
@closeDialog="handleAppointClose" @closeDialog="handleAppointClose"
@confirmDialog="handleAppointConfirm" @confirmDialog="handleAppointConfirm"
> >
...@@ -114,7 +118,7 @@ ...@@ -114,7 +118,7 @@
<el-input <el-input
v-model="appointForm.name" v-model="appointForm.name"
placeholder="请输入客户姓名" placeholder="请输入客户姓名"
></el-input> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="车架号后6位:" label="车架号后6位:"
...@@ -123,7 +127,7 @@ ...@@ -123,7 +127,7 @@
<el-input <el-input
v-model="appointForm.carNo" v-model="appointForm.carNo"
placeholder="请输入车架号后6位" placeholder="请输入车架号后6位"
></el-input> />
</el-form-item> </el-form-item>
<el-form-item label="具体时间:"> <el-form-item label="具体时间:">
<el-col :span="10"> <el-col :span="10">
...@@ -133,8 +137,7 @@ ...@@ -133,8 +137,7 @@
placeholder="选择日期" placeholder="选择日期"
:picker-options="afterTodayOptions" :picker-options="afterTodayOptions"
@change="handleChangeDate(1)" @change="handleChangeDate(1)"
> />
</el-date-picker>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-select <el-select
...@@ -147,7 +150,7 @@ ...@@ -147,7 +150,7 @@
:label="item.hour" :label="item.hour"
:value="item.hour" :value="item.hour"
:disabled="((appointForm.date == new Date().toLocaleDateString()) && (+item.hour.split(':')[0] <= new Date().getHours()) || fullList[index])" :disabled="((appointForm.date == new Date().toLocaleDateString()) && (+item.hour.split(':')[0] <= new Date().getHours()) || fullList[index])"
></el-option> />
</el-select> </el-select>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -158,7 +161,7 @@ ...@@ -158,7 +161,7 @@
<el-select <el-select
v-model="appointForm.project" v-model="appointForm.project"
placeholder="请输入预约项目" placeholder="请输入预约项目"
></el-select> />
</el-form-item> </el-form-item>
</el-form> </el-form>
</d2-dialog> </d2-dialog>
...@@ -171,7 +174,7 @@ import { afterTodayOptions, appointDays } from '@/common/constants' ...@@ -171,7 +174,7 @@ import { afterTodayOptions, appointDays } from '@/common/constants'
import TimeDate from './invitation-component/TimeDate' import TimeDate from './invitation-component/TimeDate'
import AppointTable from './invitation-component/AppointTable' import AppointTable from './invitation-component/AppointTable'
export default { export default {
name: 'invitation', name: 'Invitation',
data() { data() {
return { return {
// 邀约弹窗 // 邀约弹窗
...@@ -195,11 +198,11 @@ export default { ...@@ -195,11 +198,11 @@ export default {
} }
}), }),
hoursList: [ hoursList: [
{ 'hour': '9:00' }, { 'hour': '10:00' }, { hour: '9:00' }, { hour: '10:00' },
{ 'hour': '11:00' }, { 'hour': '12:00' }, { hour: '11:00' }, { hour: '12:00' },
{ 'hour': '13:00' }, { 'hour': '14:00' }, { hour: '13:00' }, { hour: '14:00' },
{ 'hour': '15:00' }, { 'hour': '16:00' }, { hour: '15:00' }, { hour: '16:00' },
{ 'hour': '17:00' }, { 'hour': '18:00' }], { hour: '17:00' }, { hour: '18:00' }],
// table // table
activeName: 'first', activeName: 'first',
totalCount: { totalCount: {
......
<!-- 预录客户列表 --> <!-- 预录客户列表 -->
<template> <template>
<d2-container class="record-list"> <d2-container class="record-list">
<div class="header" <div
slot="header"> class="header"
<d2-search ref="showSearch" slot="header"
>
<d2-search
ref="showSearch"
class="show-search" class="show-search"
:searchForm="searchForm" :search-form="searchForm"
:formData="showFormData"> :form-data="showFormData"
>
<!-- <p class="custom-input"> <!-- <p class="custom-input">
<el-input <el-input
size="small" size="small"
...@@ -17,84 +21,125 @@ ...@@ -17,84 +21,125 @@
</p> --> </p> -->
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button
:id="tableParams.btnId"
size="small" size="small"
type="primary">查询</el-button> type="primary"
<el-button size="small" >
@click="handleReset">重置</el-button> 查询
</el-button>
<el-button
size="small"
@click="handleReset"
>
重置
</el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span slot="left"> <span slot="left">
<auth-button category="Button" <auth-button
category="Button"
style="{display: inline-block}" style="{display: inline-block}"
:showBtnIds="['9020201']"></auth-button> :show-btn-ids="['9020201']"
<span class="table-header-left-txt">已预录客户列表{{total}}条记录。</span> />
<span class="table-header-left-txt">已预录客户列表{{ total }}条记录。</span>
</span> </span>
<span> <span>
<span class="btn-tips"><img src="../../assets/icon-warn.png">所有号码已启用隐私号码保护功能!</span> <span class="btn-tips"><img src="../../assets/icon-warn.png">所有号码已启用隐私号码保护功能!</span>
<auth-button category="Button" <auth-button
:showBtnIds="['9020202']"></auth-button> category="Button"
:show-btn-ids="['9020202']"
/>
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" <d2-table
:searchForm="tableSearchForm" ref="recordTable"
:tableParams="tableParams" :search-form="tableSearchForm"
:getListApi="getListApi" :table-params="tableParams"
:beforeSearchFn="beforeSearchFn"> :get-list-api="getListApi"
<span slot="baseGoodsStr" :before-search-fn="beforeSearchFn"
slot-scope="scope"> >
<p v-for="(item, index) in scope.scope.baseGoodsStr ? scope.scope.baseGoodsStr.split(',') : []" <span
:key="index">{{item}}</p> slot="baseGoodsStr"
slot-scope="scope"
>
<p
v-for="(item, index) in scope.scope.baseGoodsStr ? scope.scope.baseGoodsStr.split(',') : []"
:key="index"
>{{ item }}</p>
</span> </span>
<auth-button slot="auth-button" <auth-button
slot="auth-button"
slot-scope="scope" slot-scope="scope"
:data="scope.scope"></auth-button> :data="scope.scope"
/>
</d2-table> </d2-table>
</div> </div>
<d2-dialog :title="'上传文件'" <d2-dialog
:isVisible="fileVisible" :title="'上传文件'"
:is-visible="fileVisible"
@closeDialog="handleImport" @closeDialog="handleImport"
@confirmDialog="handleConfirmImport"> @confirmDialog="handleConfirmImport"
>
<slot> <slot>
<el-form :model="fileForm" <el-form
:model="fileForm"
ref="fileRuleForm" ref="fileRuleForm"
:rules="fileRules" :rules="fileRules"
label-width="120px"> label-width="120px"
<el-form-item v-if="userInfo.beSuper" >
<el-form-item
v-if="userInfo.beSuper"
label="园区店:" label="园区店:"
prop="yqMerchantId"> prop="yqMerchantId"
>
<el-select v-model="fileForm.yqMerchantId"> <el-select v-model="fileForm.yqMerchantId">
<el-option v-for="item in baseData.parkServiceList.filter(i => i.merchantName !== '全部')" <el-option
v-for="item in baseData.parkServiceList.filter(i => i.merchantName !== '全部')"
:key="item.merchantId" :key="item.merchantId"
:value="item.merchantId" :value="item.merchantId"
:label="item.merchantName"></el-option> :label="item.merchantName"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="导入文件:" <el-form-item
prop="fileName"> label="导入文件:"
prop="fileName"
>
<el-col :span="16"> <el-col :span="16">
<el-input readonly <el-input
v-model="fileForm.fileName"></el-input> readonly
v-model="fileForm.fileName"
/>
</el-col> </el-col>
<el-col :span="4" <el-col
class="m-l-md"> :span="4"
<el-button class="import-btn">导入文件 class="m-l-md"
<input type="file" >
<el-button class="import-btn">
导入文件
<input
type="file"
id="fileUpload" id="fileUpload"
class="import-input" class="import-input"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFile($event)" /> @change="importFile($event)"
<el-link href="http://img01.glsx.com.cn/upload/salesexcel/预录订单导入模板.xlsx" >
<el-link
href="http://img01.glsx.com.cn/upload/salesexcel/预录订单导入模板.xlsx"
type="primary" type="primary"
class="import-template" class="import-template"
icon="el-icon-link">模版下载</el-link> icon="el-icon-link"
>
模版下载
</el-link>
</el-button> </el-button>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item v-show="showNum"> <el-form-item v-show="showNum">
<span>导入成功{{importNum.succNum}}条,导入失败{{importNum.failNum}}条</span> <span>导入成功{{ importNum.succNum }}条,导入失败{{ importNum.failNum }}条</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</slot> </slot>
...@@ -109,7 +154,7 @@ import { getList, getOrderDetail, recordUpload, getOrderTotal } from '@api/recor ...@@ -109,7 +154,7 @@ import { getList, getOrderDetail, recordUpload, getOrderTotal } from '@api/recor
import { getServiceStore, getParkStore, getStaff, getGoods } from '@api/editCustomer' import { getServiceStore, getParkStore, getStaff, getGoods } from '@api/editCustomer'
import { exportJsonToExcel } from '@/common/Export2Excel.js' import { exportJsonToExcel } from '@/common/Export2Excel.js'
export default { export default {
name: 'recordList', name: 'RecordList',
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
...@@ -173,12 +218,12 @@ export default { ...@@ -173,12 +218,12 @@ export default {
this.searchForm.userId = '' this.searchForm.userId = ''
this.searchForm.baseGoodsId = '' this.searchForm.baseGoodsId = ''
if (value) { if (value) {
const params = { 'merchantId': value, 'channelType': targetItem.optionList.find(item => item.merchantId === value).channelType } const params = { merchantId: value, channelType: targetItem.optionList.find(item => item.merchantId === value).channelType }
getStaff(params).then(res => { getStaff(params).then(res => {
this.baseData.adviserList = res || [] this.baseData.adviserList = res || []
this.getOptionsList() this.getOptionsList()
}) })
getGoods({ 'merchantId': value }).then(res => { getGoods({ merchantId: value }).then(res => {
this.baseData.goodList = res || [] this.baseData.goodList = res || []
this.baseData.goodList.forEach(item => { this.baseData.goodList.forEach(item => {
item.goodsName = item.goodsInfo.goodsName item.goodsName = item.goodsInfo.goodsName
......
...@@ -8,38 +8,41 @@ ...@@ -8,38 +8,41 @@
<d2-search <d2-search
ref="showSearch" ref="showSearch"
class="show-search" class="show-search"
:searchForm="searchForm" :search-form="searchForm"
:formData="showFormData" :form-data="showFormData"
> />
</d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button <el-button
:id="tableParams.btnId" :id="tableParams.btnId"
size="small" size="small"
type="primary" type="primary"
>查询</el-button> >
查询
</el-button>
<el-button <el-button
size="small" size="small"
@click="handleReset" @click="handleReset"
>重置</el-button> >
重置
</el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :leftSpan="24"> <d2-table-header :left-span="24">
<span slot="left">共提现<span class="count-txt">{{countObj.recordCount}}</span>次,累计分账金额<span class="count-txt">{{countObj.totalAmount}}</span>元。</span> <span slot="left">共提现<span class="count-txt">{{ countObj.recordCount }}</span>次,累计分账金额<span class="count-txt">{{ countObj.totalAmount }}</span>元。</span>
</d2-table-header> </d2-table-header>
<d2-table <d2-table
ref="accountRecordTable" ref="accountRecordTable"
:getListApi="getListApi" :get-list-api="getListApi"
:searchForm="searchFormSearch" :search-form="searchFormSearch"
:tableParams="tableParams" :table-params="tableParams"
:beforeSearchFn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<auth-button <auth-button
slot="auth-button" slot="auth-button"
slot-scope="scope" slot-scope="scope"
:data="scope.scope" :data="scope.scope"
></auth-button> />
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
...@@ -51,7 +54,7 @@ import { mapActions } from 'vuex' ...@@ -51,7 +54,7 @@ import { mapActions } from 'vuex'
import { BaseData, getCurrentSixMonth, withdrawStatusList, withdrawChannelList } from '@/common/constants.js' import { BaseData, getCurrentSixMonth, withdrawStatusList, withdrawChannelList } from '@/common/constants.js'
import { getWithdrawList, getWithdrawCountApi } from '@/api/account' import { getWithdrawList, getWithdrawCountApi } from '@/api/account'
export default { export default {
name: 'accountRecord', name: 'AccountRecord',
data() { data() {
return { return {
countObj: { countObj: {
......
...@@ -9,20 +9,20 @@ ...@@ -9,20 +9,20 @@
<el-tab-pane <el-tab-pane
label="线下对账" label="线下对账"
name="offline" name="offline"
></el-tab-pane> />
<el-tab-pane <el-tab-pane
label="线上分账" label="线上分账"
name="online" name="online"
></el-tab-pane> />
</el-tabs> </el-tabs>
</div> </div>
<div v-if="+accountType === 7"> <div v-if="+accountType === 7">
<service-offline-list v-show="activeName === 'offline'"></service-offline-list> <service-offline-list v-show="activeName === 'offline'" />
<service-online-list v-if="activeName === 'online'"></service-online-list> <service-online-list v-if="activeName === 'online'" />
</div> </div>
<div v-else> <div v-else>
<offline-account-list v-show="activeName === 'offline'"></offline-account-list> <offline-account-list v-show="activeName === 'offline'" />
<online-account-list v-show="activeName === 'online'"></online-account-list> <online-account-list v-show="activeName === 'online'" />
</div> </div>
</d2-container> </d2-container>
</template> </template>
...@@ -33,7 +33,7 @@ import serviceOfflineList from './serviceAccount/serviceOfflineList' ...@@ -33,7 +33,7 @@ import serviceOfflineList from './serviceAccount/serviceOfflineList'
import onlineAccountList from './onlineAccountList' import onlineAccountList from './onlineAccountList'
import offlineAccountList from './offlineAccountList' import offlineAccountList from './offlineAccountList'
export default { export default {
name: 'account', name: 'Account',
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<d2-dialog <d2-dialog
title="提现" title="提现"
:isVisible.sync="cashVisible" :is-visible.sync="cashVisible"
width="60%" width="60%"
@confirmDialog="handleCashConfirm" @confirmDialog="handleCashConfirm"
@closeDialog="handleCashClose" @closeDialog="handleCashClose"
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</el-form-item> </el-form-item>
<el-form-item label="到账账户:"> <el-form-item label="到账账户:">
<p>{{ cashForm.bankAccountName }}</p> <p>{{ cashForm.bankAccountName }}</p>
<p>{{ cashForm.bankName}}({{ cashForm.bankAccountNo }})<span>预计24小时内到账</span></p> <p>{{ cashForm.bankName }}({{ cashForm.bankAccountNo }})<span>预计24小时内到账</span></p>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="验证码:" label="验证码:"
...@@ -32,15 +32,19 @@ ...@@ -32,15 +32,19 @@
v-model="cashForm.smsCode" v-model="cashForm.smsCode"
placeholder="请输入验证码" placeholder="请输入验证码"
style="width: 200px" style="width: 200px"
></el-input> />
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@click="handleSend" @click="handleSend"
:disabled="isSend" :disabled="isSend"
class="cash-btn" class="cash-btn"
>{{isSend ? sendMsg + '秒后,重试' : '获取验证码'}}</el-button> >
<p v-show="showtips">已向尾号为{{ cashForm.withdrawPhone ? cashForm.withdrawPhone.slice(-4) : '' }}的手机号发送验证码,验证码30分钟内有效</p> {{ isSend ? sendMsg + '秒后,重试' : '获取验证码' }}
</el-button>
<p v-show="showtips">
已向尾号为{{ cashForm.withdrawPhone ? cashForm.withdrawPhone.slice(-4) : '' }}的手机号发送验证码,验证码30分钟内有效
</p>
</el-form-item> </el-form-item>
</el-form> </el-form>
</d2-dialog> </d2-dialog>
......
...@@ -7,34 +7,36 @@ ...@@ -7,34 +7,36 @@
> >
<d2-search <d2-search
ref="showSearch" ref="showSearch"
:searchForm="searchForm" :search-form="searchForm"
:formData="showFormData" :form-data="showFormData"
> />
</d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button <el-button
:id="tableParams.btnId" :id="tableParams.btnId"
size="small" size="small"
type="primary" type="primary"
>查询</el-button> >
查询
</el-button>
<el-button <el-button
size="small" size="small"
@click="handleReset" @click="handleReset"
>重置</el-button> >
重置
</el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :leftSpan="24"> <d2-table-header :left-span="24">
<span slot="left">共提现<span class="count-txt">{{countObj.recordCount}}</span>次,累计分账金额<span class="count-txt">{{countObj.totalAmount}}</span>元。</span> <span slot="left">共提现<span class="count-txt">{{ countObj.recordCount }}</span>次,累计分账金额<span class="count-txt">{{ countObj.totalAmount }}</span>元。</span>
</d2-table-header> </d2-table-header>
<d2-table <d2-table
ref="merchantTable" ref="merchantTable"
:getListApi="getListApi" :get-list-api="getListApi"
:searchForm="searchFormSearch" :search-form="searchFormSearch"
:tableParams="tableParams" :table-params="tableParams"
:beforeSearchFn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> />
</d2-table>
</div> </div>
</d2-container> </d2-container>
</template> </template>
...@@ -44,7 +46,7 @@ import { Util } from '@/common/util' ...@@ -44,7 +46,7 @@ import { Util } from '@/common/util'
import { getWithdrawList, getWithdrawCountApi } from '@/api/account' import { getWithdrawList, getWithdrawCountApi } from '@/api/account'
import { getCurrentSixMonth, withdrawStatusList, withdrawChannelList } from '@/common/constants.js' import { getCurrentSixMonth, withdrawStatusList, withdrawChannelList } from '@/common/constants.js'
export default { export default {
name: 'myAccountRecord', name: 'MyAccountRecord',
data() { data() {
return { return {
countObj: { countObj: {
......
<!-- 服务商 - 我的分账 - 线下对账 --> <!-- 服务商 - 我的分账 - 线下对账 -->
<template> <template>
<div class="my-off-account"> <div class="my-off-account">
<div class="d2-container-content" <div
style="padding: 10px 20px;"> class="d2-container-content"
<d2-search ref="showSearch" style="padding: 10px 20px;"
>
<d2-search
ref="showSearch"
class="show-search" class="show-search"
:searchForm="searchForm" :search-form="searchForm"
:searchSelectObj="searchSelectObj" :search-select-obj="searchSelectObj"
:formData="showFormData"> :form-data="showFormData"
</d2-search> />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button
:id="tableParams.btnId"
size="small" size="small"
type="primary">查询</el-button> type="primary"
<el-button size="small" >
@click="handleReset">重置</el-button> 查询
</el-button>
<el-button
size="small"
@click="handleReset"
>
重置
</el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :leftSpan="22"> <d2-table-header :left-span="22">
<span slot="left">共<span class="count-txt">{{countObj.orderCount}}</span>笔订单,累计线下分账金额<span <span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线下分账金额<span
class="count-txt">{{countObj.divisionMoneyCount}}</span>元。</span> class="count-txt"
<el-button type="primary" >{{ countObj.divisionMoneyCount }}</span>元。</span>
<el-button
type="primary"
size="mini" size="mini"
@click="handleExport">导出</el-button> @click="handleExport"
>
导出
</el-button>
</d2-table-header> </d2-table-header>
<d2-table ref="merchantTable" <d2-table
:getListApi="getListApi" ref="merchantTable"
:searchForm="searchFormSearch" :get-list-api="getListApi"
:tableParams="tableParams" :search-form="searchFormSearch"
:beforeSearchFn="beforeSearchFn"> :table-params="tableParams"
</d2-table> :before-search-fn="beforeSearchFn"
/>
</div> </div>
</div> </div>
</template> </template>
...@@ -43,7 +60,7 @@ import { Util } from '@/common/util' ...@@ -43,7 +60,7 @@ import { Util } from '@/common/util'
import { getPartnerYqListApi, getSeviceList, getSeviceCount } from '@/api/account' import { getPartnerYqListApi, getSeviceList, getSeviceCount } from '@/api/account'
import { asyncExportEecel } from '@api/sys.base' import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'serviceOfflineList', name: 'ServiceOfflineList',
data() { data() {
return { return {
countObj: {}, countObj: {},
...@@ -168,7 +185,7 @@ export default { ...@@ -168,7 +185,7 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
......
...@@ -22,58 +22,84 @@ ...@@ -22,58 +22,84 @@
@click="handleCash" @click="handleCash"
>提现></el-button> >提现></el-button>
</div> --> </div> -->
<div class="d2-container-content" <div
style="padding: 10px 20px;"> class="d2-container-content"
<d2-search ref="showSearch" style="padding: 10px 20px;"
>
<d2-search
ref="showSearch"
class="show-search" class="show-search"
:searchForm="searchForm" :search-form="searchForm"
:searchSelectObj="searchSelectObj" :search-select-obj="searchSelectObj"
:formData="showFormData"> :form-data="showFormData"
</d2-search> />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button
:id="tableParams.btnId"
size="small" size="small"
type="primary">查询</el-button> type="primary"
<el-button size="small" >
@click="handleReset">重置</el-button> 查询
</el-button>
<el-button
size="small"
@click="handleReset"
>
重置
</el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header :leftSpan="22"> <d2-table-header :left-span="22">
<!-- <span slot="left">共<span class="count-txt">{{countObj.orderCount}}</span>笔订单,累计分账金额<span <!-- <span slot="left">共<span class="count-txt">{{countObj.orderCount}}</span>笔订单,累计分账金额<span
class="count-txt">{{countObj.divisionMoneyCount}}</span>元,分账成功金额<span class="count-txt">{{countObj.divisionMoneyCount}}</span>元,分账成功金额<span
class="count-txt">{{countObj.divisionSuccessMoneyCount}}</span>元,分账中金额<span class="count-txt">{{countObj.divisionSuccessMoneyCount}}</span>元,分账中金额<span
class="count-txt">{{countObj.inDivisionMoneyCount}}</span>元,分账失败金额<span class="count-txt">{{countObj.inDivisionMoneyCount}}</span>元,分账失败金额<span
class="count-txt">{{countObj.divisionFailureMoneyCount}}</span>元,异常分账金额<span class="count-txt">{{countObj.divisionFailureMoneyCount}}</span>元,异常分账金额<span
class="count-txt">{{countObj.divisionExceptionMoneyCount}}</span>元。</span> --> class="count-txt">{{countObj.divisionExceptionMoneyCount}}</span>元。</span> -->
<span slot="left">共<span class="count-txt">{{countObj.orderCount}}</span>笔订单,累计线上分账成功金额<span <span slot="left">共<span class="count-txt">{{ countObj.orderCount }}</span>笔订单,累计线上分账成功金额<span
class="count-txt">{{countObj.divisionMoneyCount}}</span>元,分账中金额<span class="count-txt"
class="count-txt">{{countObj.inDivisionMoneyCount}}</span>元,分账失败金额<span >{{ countObj.divisionMoneyCount }}</span>元,分账中金额<span
class="count-txt">{{countObj.divisionFailureMoneyCount}}</span>元,待分账金额<span class="count-txt"
class="count-txt">{{countObj.waitingDivisionMoneyCount}}</span>元。</span> >{{ countObj.inDivisionMoneyCount }}</span>元,分账失败金额<span
<el-button type="primary" class="count-txt"
>{{ countObj.divisionFailureMoneyCount }}</span>元,待分账金额<span
class="count-txt"
>{{ countObj.waitingDivisionMoneyCount }}</span>元。</span>
<el-button
type="primary"
size="mini" size="mini"
@click="handleExport">导出</el-button> @click="handleExport"
>
导出
</el-button>
</d2-table-header> </d2-table-header>
<d2-table ref="merchantTable" <d2-table
:getListApi="getListApi" ref="merchantTable"
:searchForm="searchFormSearch" :get-list-api="getListApi"
:tableParams="tableParams" :search-form="searchFormSearch"
:beforeSearchFn="beforeSearchFn"> :table-params="tableParams"
<template slot="divisionStatus" :before-search-fn="beforeSearchFn"
slot-scope="scope"> >
<template
slot="divisionStatus"
slot-scope="scope"
>
<span v-if="scope.scope.divisionStatus"> <span v-if="scope.scope.divisionStatus">
<span <span
:style="{ 'color': [4, 5].includes(+scope.scope.divisionStatus) ? 'red' : '#606266' }">{{baseData.divisionStatusList.find(item => +item.confId === scope.scope.divisionStatus).confLabel}}</span> :style="{ 'color': [4, 5].includes(+scope.scope.divisionStatus) ? 'red' : '#606266' }"
>{{ baseData.divisionStatusList.find(item => +item.confId === scope.scope.divisionStatus).confLabel }}</span>
</span> </span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</d2-table> </d2-table>
</div> </div>
<cash-dialog :cashForm="cashForm" <cash-dialog
:cashVisible="cashVisible" :cash-form="cashForm"
:cash-visible="cashVisible"
@handleCashConfirm="handleCashConfirm" @handleCashConfirm="handleCashConfirm"
@handleCashClose="handleCashClose"></cash-dialog> @handleCashClose="handleCashClose"
/>
</div> </div>
</template> </template>
...@@ -86,7 +112,7 @@ import { divisionStatusList } from '@/common/constants.js' ...@@ -86,7 +112,7 @@ import { divisionStatusList } from '@/common/constants.js'
import { getBankBalanceApi, getPartnerYqListApi, getSeviceList, getSeviceCount } from '@/api/account' import { getBankBalanceApi, getPartnerYqListApi, getSeviceList, getSeviceCount } from '@/api/account'
import { asyncExportEecel } from '@api/sys.base' import { asyncExportEecel } from '@api/sys.base'
export default { export default {
name: 'serviceOnlineList', name: 'ServiceOnlineList',
data() { data() {
return { return {
countObj: {}, countObj: {},
...@@ -257,7 +283,7 @@ export default { ...@@ -257,7 +283,7 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
......
<template> <template>
<div class="row-center captcha_input_wrapper"> <div class="row-center captcha_input_wrapper">
<input v-for="(item,index) in captchas" <input
v-for="(item,index) in captchas"
:key="index" :key="index"
v-model="item.num" v-model="item.num"
:id="'captcha'+index" :id="'captcha'+index"
...@@ -10,13 +11,14 @@ ...@@ -10,13 +11,14 @@
class="captcha_input_box row-center" class="captcha_input_box row-center"
:style="customStyle" :style="customStyle"
type="tel" type="tel"
maxlength="1" /> maxlength="1"
>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'captchaInput', name: 'CaptchaInput',
props: { props: {
customStyle: { customStyle: {
type: String, type: String,
...@@ -49,7 +51,7 @@ export default { ...@@ -49,7 +51,7 @@ export default {
} }
}, },
watch: { watch: {
'captchas': { captchas: {
handler: function (value) { handler: function (value) {
console.log(value) console.log(value)
const str = value.map((item) => { const str = value.map((item) => {
...@@ -59,7 +61,7 @@ export default { ...@@ -59,7 +61,7 @@ export default {
}, },
deep: true deep: true
}, },
'captchasLenght': { captchasLenght: {
handler: function (value) { handler: function (value) {
for (let index = 0; index < this.captchasLenght; index++) { for (let index = 0; index < this.captchasLenght; index++) {
// const element = array[index]; // const element = array[index];
......
<!-- 下载对账单 --> <!-- 下载对账单 -->
<template> <template>
<d2-dialog title="下载对账单" <d2-dialog
:isVisible="accountVisible" title="下载对账单"
:is-visible="accountVisible"
class="accountDailog" class="accountDailog"
width="40%" width="40%"
btnOkLabel="确定下载" btn-ok-label="确定下载"
@closeDialog="handleClose" @closeDialog="handleClose"
@confirmDialog="handleAddConfirm"> @confirmDialog="handleAddConfirm"
<el-form ref="accountForm" >
<el-form
ref="accountForm"
:model="infoForm" :model="infoForm"
:rules="formRules" :rules="formRules"
label-width="120px"> label-width="120px"
<el-form-item label="商户类型:" >
prop="merchantType"> <el-form-item
<el-radio-group v-model="infoForm.merchantType" label="商户类型:"
@change="changeType"> prop="merchantType"
>
<el-radio-group
v-model="infoForm.merchantType"
@change="changeType"
>
<!-- <el-radio-button label="">全部</el-radio-button> --> <!-- <el-radio-button label="">全部</el-radio-button> -->
<el-radio-button label="2">4S店</el-radio-button> <el-radio-button label="2">
<el-radio-button label="7">服务商</el-radio-button> 4S店
<el-radio-button label="6">园区店</el-radio-button> </el-radio-button>
<el-radio-button label="7">
服务商
</el-radio-button>
<el-radio-button label="6">
园区店
</el-radio-button>
<!-- <el-radio-button label="2" @click.native.prevent="clickMerchantType('2')">4S店</el-radio-button> <!-- <el-radio-button label="2" @click.native.prevent="clickMerchantType('2')">4S店</el-radio-button>
<el-radio-button label="7" @click.native.prevent="clickMerchantType('7')">服务商</el-radio-button> <el-radio-button label="7" @click.native.prevent="clickMerchantType('7')">服务商</el-radio-button>
<el-radio-button label="6" @click.native.prevent="clickMerchantType('6')">园区店</el-radio-button> --> <el-radio-button label="6" @click.native.prevent="clickMerchantType('6')">园区店</el-radio-button> -->
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="infoForm.merchantType == '7'" <el-form-item
v-if="infoForm.merchantType == '7'"
label="账单类型:" label="账单类型:"
prop="reportType"> prop="reportType"
>
<el-radio-group v-model="infoForm.reportType"> <el-radio-group v-model="infoForm.reportType">
<el-radio-button label="1">普通对账单</el-radio-button> <el-radio-button label="1">
<el-radio-button label="2">安装费对账单</el-radio-button> 普通对账单
<el-radio-button label="3">营销费对账单</el-radio-button> </el-radio-button>
<el-radio-button label="2">
安装费对账单
</el-radio-button>
<el-radio-button label="3">
营销费对账单
</el-radio-button>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="选择商户:" <el-form-item
prop="merchant"> label="选择商户:"
<el-select v-model="infoForm.merchant" prop="merchant"
>
<el-select
v-model="infoForm.merchant"
multiple multiple
:multiple-limit="10" :multiple-limit="10"
filterable filterable
style="width:400px"> style="width:400px"
<el-option v-for="item in baseData.merchantList" >
<el-option
v-for="item in baseData.merchantList"
:key="item.merchantId" :key="item.merchantId"
:label="item.merchantName" :label="item.merchantName"
:value="item.merchantId"></el-option> :value="item.merchantId"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="订单支付时间:" <el-form-item
label="订单支付时间:"
class="dateItem" class="dateItem"
prop="payStartDate"> prop="payStartDate"
<el-date-picker type="date" >
<el-date-picker
type="date"
placeholder="选择开始日期" placeholder="选择开始日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
clearables clearables
:picker-options="startDateOptions" :picker-options="startDateOptions"
v-model="infoForm.payStartDate" v-model="infoForm.payStartDate"
@change="changeStartDate" @change="changeStartDate"
style="width:185px"></el-date-picker> style="width:185px"
/>
<!-- :picker-options="startDateOptions" --> <!-- :picker-options="startDateOptions" -->
<div style="margin:0 15px;">-</div> <div style="margin:0 15px;">
-
</div>
<!--style="width: 100%;" :picker-options="EndDateOptions" style="width: 100%;" --> <!--style="width: 100%;" :picker-options="EndDateOptions" style="width: 100%;" -->
<el-date-picker type="date" <el-date-picker
type="date"
placeholder="选择结束日期" placeholder="选择结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
clearable clearable
v-model="infoForm.payEndDate" v-model="infoForm.payEndDate"
:picker-options="pickerOptions0" :picker-options="pickerOptions0"
style="width:185px"></el-date-picker> style="width:185px"
/>
<!-- <el-date-picker v-model="infoForm.time" <!-- <el-date-picker v-model="infoForm.time"
type="daterange" type="daterange"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
...@@ -92,7 +128,7 @@ import { getMerchantPageSearch } from '@api/publicAccount' ...@@ -92,7 +128,7 @@ import { getMerchantPageSearch } from '@api/publicAccount'
import { asyncExportEecel } from '@api/sys.base' import { asyncExportEecel } from '@api/sys.base'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
export default { export default {
name: 'downloadAccountDialog', name: 'DownloadAccountDialog',
data() { data() {
const validateLonlat = (rule, value, callback) => { const validateLonlat = (rule, value, callback) => {
if (value) { if (value) {
...@@ -184,7 +220,7 @@ export default { ...@@ -184,7 +220,7 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
'dowloadList': (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!