Commit 1c96e88c by Jaxon

feat: 新增部分文件

1 parent e62e3e7b
...@@ -26,6 +26,26 @@ module.exports = { ...@@ -26,6 +26,26 @@ module.exports = {
echarts: false echarts: false
}, },
rules: { rules: {
"vue/attributes-order": [
"error",
{
order: [
"DEFINITION", // is
"LIST_RENDERING", // v-for
"CONDITIONALS", // v-if v-else-if v-else v-show v-cloak
"RENDER_MODIFIERS", // v-once v-pre
"GLOBAL", // id
"UNIQUE", // ref key
"SLOT", // v-slot slot
"TWO_WAY_BINDING", // v-model
"OTHER_DIRECTIVES", // v-custom-directive
"OTHER_ATTR", // 自定义属性和其他
"EVENTS", // @click @focus
"CONTENT" // v-text v-html
],
alphabetical: true // 是否在同组内再按字母排序(建议 false,官方默认顺序更好)
}
],
"vue/max-attributes-per-line": [ "vue/max-attributes-per-line": [
2, 2,
{ {
......
// 组件 // 组件
import d2ContainerFull from "./components/d2-container-full.vue" import d2ContainerFull from "./components/d2-container-full.vue"
import d2ContainerFullBs from "./components/d2-container-full-bs.vue" import d2ContainerFullBs from "./components/d2-container-full-bs.vue"
import d2ContainerGhost from "./components/d2-container-ghost.vue" import d2ContainerGhost from "./components/d2-container-ghost.vue"
import d2ContainerGhostBs from "./components/d2-container-ghost-bs.vue" import d2ContainerGhostBs from "./components/d2-container-ghost-bs.vue"
import d2ContainerCard from "./components/d2-container-card.vue" import d2ContainerCard from "./components/d2-container-card.vue"
import d2ContainerCardBs from "./components/d2-container-card-bs.vue" import d2ContainerCardBs from "./components/d2-container-card-bs.vue"
// import d2Source from './components/d2-source.vue' // import d2Source from './components/d2-source.vue'
export default { export default {
name: "d2-container", name: "d2-container",
props: { props: {
// 容器样式 // 容器样式
type: { type: {
type: String, type: String,
required: false, required: false,
default: "full" default: "full"
}, },
// 滚动优化 // 滚动优化
betterScroll: { betterScroll: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false
} }
}, },
computed: { computed: {
// 始终返回渲染组件 // 始终返回渲染组件
component() { component() {
if (this.type === "card" && !this.betterScroll) return d2ContainerCard if (this.type === "card" && !this.betterScroll) return d2ContainerCard
if (this.type === "card" && this.betterScroll) return d2ContainerCardBs if (this.type === "card" && this.betterScroll) return d2ContainerCardBs
if (this.type === "ghost" && !this.betterScroll) return d2ContainerGhost if (this.type === "ghost" && !this.betterScroll) return d2ContainerGhost
if (this.type === "ghost" && this.betterScroll) return d2ContainerGhostBs if (this.type === "ghost" && this.betterScroll) return d2ContainerGhostBs
if (this.type === "full" && !this.betterScroll) return d2ContainerFull if (this.type === "full" && !this.betterScroll) return d2ContainerFull
if (this.type === "full" && this.betterScroll) return d2ContainerFullBs if (this.type === "full" && this.betterScroll) return d2ContainerFullBs
else { else {
return "div" return "div"
} }
} }
}, },
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( return h(
"div", "div",
{ {
ref: "container", ref: "container",
class: "container-component" class: "container-component"
}, },
[ [
h( h(
this.component, this.component,
{ {
ref: "component", ref: "component",
props: this.$attrs, props: this.$attrs,
on: { on: {
scroll: (e) => this.$emit("scroll", e) scroll: (e) => this.$emit("scroll", e)
} }
}, },
slots slots
) )
// h(d2Source) // h(d2Source)
] ]
) )
}, },
methods: { methods: {
// 返回顶部 // 返回顶部
scrollToTop() { scrollToTop() {
this.$refs.component.scrollToTop() this.$refs.component.scrollToTop()
// 如果开启了 better scroll 还需要手动触发一遍 scroll 事件 // 如果开启了 better scroll 还需要手动触发一遍 scroll 事件
const bs = this.$refs.component.BS const bs = this.$refs.component.BS
if (bs) this.$refs.component.scroll() if (bs) this.$refs.component.scroll()
}, },
// 用法同原生方法 scrollBy // 用法同原生方法 scrollBy
scrollBy(x = 0, y = 0, time = 300) { scrollBy(x = 0, y = 0, time = 300) {
if (this.betterScroll) { if (this.betterScroll) {
const bs = this.$refs.component.BS const bs = this.$refs.component.BS
if (bs) { if (bs) {
bs.scrollBy(-x, -y, time) bs.scrollBy(-x, -y, time)
// 手动触发一遍 scroll 事件 // 手动触发一遍 scroll 事件
this.$refs.component.scroll() this.$refs.component.scroll()
} }
} else { } else {
this.$refs.component.$refs.body.scrollBy(x, y) this.$refs.component.$refs.body.scrollBy(x, y)
} }
}, },
// 用法同原生方法 scrollTo // 用法同原生方法 scrollTo
scrollTo(x = 0, y = 0, time = 300) { scrollTo(x = 0, y = 0, time = 300) {
if (this.betterScroll) { if (this.betterScroll) {
const bs = this.$refs.component.BS const bs = this.$refs.component.BS
if (bs) { if (bs) {
bs.scrollTo(-x, -y, time) bs.scrollTo(-x, -y, time)
// 手动触发一遍 scroll 事件 // 手动触发一遍 scroll 事件
this.$refs.component.scroll() this.$refs.component.scroll()
} }
} else { } else {
this.$refs.component.$refs.body.scrollTo(x, y) this.$refs.component.$refs.body.scrollTo(x, y)
} }
}, },
// 用法同原生方法 scrollTop // 用法同原生方法 scrollTop
scrollTop(top = 0, time = 300) { scrollTop(top = 0, time = 300) {
if (this.betterScroll) { if (this.betterScroll) {
const bs = this.$refs.component.BS const bs = this.$refs.component.BS
if (bs) { if (bs) {
bs.scrollTo(bs.x, -top, time) bs.scrollTo(bs.x, -top, time)
// 手动触发一遍 scroll 事件 // 手动触发一遍 scroll 事件
this.$refs.component.scroll() this.$refs.component.scroll()
} }
} else { } else {
this.$refs.component.$refs.body.scrollTop = top this.$refs.component.$refs.body.scrollTop = top
} }
} }
} }
} }
...@@ -754,7 +754,7 @@ export const routerName = { ...@@ -754,7 +754,7 @@ export const routerName = {
sideHidden: true, sideHidden: true,
activePath: "/salaryPerformance" activePath: "/salaryPerformance"
}, },
component: _import("residentManage/salaryPerformance/performanceScheme") component: _import("residentManage/salaryPerformance/performanceScheme/index.vue")
}, },
91213: { 91213: {
path: "/inStorePoints", path: "/inStorePoints",
......
<!-- 工资绩效 --> <!-- 工资绩效 -->
<template> <template>
<div class="performance-list-wrap"> <div class="performance-list-wrap">
<div class="header" slot="header" style="background: #e7eaec"> <div class="header"
slot="header"
style="background: #e7eaec">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index"> <el-tab-pane v-for="(item, index) in tabPaneList"
:label="item.label"
:name="item.name"
:key="index">
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<components :is="tabName" :active-name="activeName"></components> <components :is="tabName" :active-name="activeName"></components>
......
<template>
<d2-container v-loading="$store.state.d2admin.loading.value" class="performance-scheme-wrapper">
<el-form ref="form"
class="form"
label-width="150px"
:model="formData"
:rules="rules">
<div class="warp-box">
<div class="title space-b">
<div class="title-wrap">
<span>绩效规则选择</span>
</div>
</div>
<div class="warp-content">
<el-form-item label="考核因子:" prop="checkList">
<el-checkbox-group v-model="formData.checkList">
<el-checkbox label="个人月度总值"></el-checkbox>
<el-checkbox label="个人月度单店总值"></el-checkbox>
<el-checkbox label="个人渗透率"></el-checkbox>
<el-checkbox label="转化率"></el-checkbox>
<el-checkbox label="高客单价"></el-checkbox>
<el-checkbox label="升级客单价"></el-checkbox>
<el-checkbox label="交车客单价"></el-checkbox>
<el-checkbox label="门店触客率"></el-checkbox>
<el-checkbox label="升级订单数"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="提成基数:" prop="checkList">
<el-checkbox-group v-model="formData.checkList">
<el-checkbox label="GMV产值"></el-checkbox>
<el-checkbox label="总提成"></el-checkbox>
<el-checkbox label="升级订单数"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="提成方式:" prop="checkList">
<el-checkbox-group v-model="formData.checkList">
<el-checkbox label="比例"></el-checkbox>
<el-checkbox label="系数"></el-checkbox>
<el-checkbox label="固定金额"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="商品分类:" prop="checkList">
<el-checkbox-group v-model="formData.checkList">
<el-checkbox label="品类"></el-checkbox>
<el-checkbox label="圈定商品"></el-checkbox>
<el-checkbox label="圈定套餐"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="适配业务:" prop="checkList">
<el-checkbox-group v-model="formData.checkList">
<el-checkbox label="轻改"></el-checkbox>
<el-checkbox label="延保"></el-checkbox>
<el-checkbox label="权益"></el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
</div>
<div class="warp-box">
<div class="title space-b">
<div class="title-wrap">
<span>绩效参数配置</span>
</div>
</div>
<div class="warp-content">
<el-form-item label="考核因子:" prop="checkList">
<el-checkbox-group v-model="formData.checkList">
<el-checkbox label="个人月度总值"></el-checkbox>
<el-checkbox label="个人月度单店总值"></el-checkbox>
<el-checkbox label="个人渗透率"></el-checkbox>
<el-checkbox label="转化率"></el-checkbox>
<el-checkbox label="高客单价"></el-checkbox>
<el-checkbox label="升级客单价"></el-checkbox>
<el-checkbox label="交车客单价"></el-checkbox>
<el-checkbox label="门店触客率"></el-checkbox>
<el-checkbox label="升级订单数"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="提成基数:" prop="checkList">
<el-checkbox-group v-model="formData.checkList">
<el-checkbox label="GMV产值"></el-checkbox>
<el-checkbox label="总提成"></el-checkbox>
<el-checkbox label="升级订单数"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="提成方式:" prop="checkList">
<el-checkbox-group v-model="formData.checkList">
<el-checkbox label="比例"></el-checkbox>
<el-checkbox label="系数"></el-checkbox>
<el-checkbox label="固定金额"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="商品分类:" prop="checkList">
<el-checkbox-group v-model="formData.checkList">
<el-checkbox label="品类"></el-checkbox>
<el-checkbox label="圈定商品"></el-checkbox>
<el-checkbox label="圈定套餐"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="适配业务:" prop="checkList">
<el-checkbox-group v-model="formData.checkList">
<el-checkbox label="轻改"></el-checkbox>
<el-checkbox label="延保"></el-checkbox>
<el-checkbox label="权益"></el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
</div>
</el-form>
</d2-container>
</template>
<script>
export default {
name: 'PerformanceScheme',
data() {
return {
formData: {
checkList: []
},
rules: {
}
}
},
created() {
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.performance-scheme-wrapper{
.warp-box{
background: #fff;
margin-bottom: 16px;
position: relative;
.title {
height: 50px;
line-height: 50px;
padding: 0 20px;
border-bottom: 1px solid #e5e5e5;
font-size: 16px;
font-weight: 600;
color: #333333;
display: flex;
align-items: center;
margin-bottom: 16px;
.title-wrap {
display: flex;
align-items: center;
}
.merchant-text {
font-size: 14px;
font-weight: normal;
color: #666666;
}
}
.space-b{
justify-content: space-between;
}
::v-deep .el-form-item__label{
padding: 0;
}
.warp-content{
padding: 0 20px 20px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!