优化
This commit is contained in:
parent
a05c8267eb
commit
cfacebdd48
BIN
src/assets/workbench/jiaquan.png
Normal file
BIN
src/assets/workbench/jiaquan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
src/assets/workbench/pingfen.png
Normal file
BIN
src/assets/workbench/pingfen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
105
src/components/PopupRight/index.vue
Normal file
105
src/components/PopupRight/index.vue
Normal file
@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<transition name="popupfade">
|
||||
<div class="taskDetailRight" @click="getRight">
|
||||
<div class="taskDetailRight-contant" @click.stop="aa">
|
||||
<div class="taskDetailRight-contant-title commonFont" >{{title}}</div>
|
||||
<div class="taskDetailRight-contant-content" >
|
||||
<slot name="content"></slot>
|
||||
</div>
|
||||
<div class="taskDetailRight-contant-footer" >
|
||||
<el-button size="small" @click="$emit('cancel')">取 消</el-button>
|
||||
<el-button size="small" type="primary" @click="$emit('submit')">确 定</el-button>
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
beforeMount () { },
|
||||
mounted () {
|
||||
},
|
||||
methods: {
|
||||
aa () {},
|
||||
onSubmit () {
|
||||
console.log('submit!')
|
||||
this.$emit('update:show', false)
|
||||
},
|
||||
getRight () {
|
||||
this.$emit('update:show', false)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
.popupfade-enter{
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
.fade-leave {
|
||||
transform: translateX(0);
|
||||
}
|
||||
.popupfade-leave-to{
|
||||
transform: translateX(60%);
|
||||
}
|
||||
|
||||
.fade-enter-to{
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
.popupfade-leave-active,.fade-enter-active {
|
||||
transition:all 40s;
|
||||
}
|
||||
|
||||
.taskDetailRight {
|
||||
position: fixed;
|
||||
z-index: 50;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
min-width: 200px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
transition: all 1s;
|
||||
&-contant {
|
||||
min-width: 100px;
|
||||
height: 100%;
|
||||
float: right;
|
||||
background:#fff;
|
||||
box-shadow: 0 1px 6px 0 rgba(0,0,0,.12), 0 1px 6px 0 rgba(0,0,0,.12);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
&-title{
|
||||
border-bottom: 1px solid @borderColor;
|
||||
padding:10px 20px;
|
||||
}
|
||||
&-content{
|
||||
flex: 1;
|
||||
padding:20px 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
&-footer{
|
||||
text-align: right;
|
||||
padding: 10px 20px;
|
||||
border-top: 1px solid @borderColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -23,13 +23,17 @@ import {
|
||||
DropdownItem,
|
||||
Dialog,
|
||||
Tree,
|
||||
Tag
|
||||
Tag,
|
||||
Tooltip,
|
||||
Popover
|
||||
} from 'element-ui'
|
||||
|
||||
Vue.prototype.$message = Message
|
||||
Vue.prototype.$confirm = MessageBox.confirm
|
||||
Vue.prototype.$alert = MessageBox.alert
|
||||
|
||||
Vue.use(Popover)
|
||||
Vue.use(Tooltip)
|
||||
Vue.use(Tag)
|
||||
Vue.use(Tree)
|
||||
Vue.use(Dialog)
|
||||
|
||||
140
src/views/kpi/assessment/components/popup copy.vue
Normal file
140
src/views/kpi/assessment/components/popup copy.vue
Normal file
@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<transition name="popupfade">
|
||||
<div class="taskDetailRight" @click="getRight">
|
||||
<div class="taskDetailRight-contant" @click.stop="aa">
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-form-item label="活动名称">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动区域">
|
||||
<el-select v-model="form.region" placeholder="请选择活动区域">
|
||||
<el-option label="区域一" value="shanghai"></el-option>
|
||||
<el-option label="区域二" value="beijing"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间">
|
||||
<el-col :span="11">
|
||||
<el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
|
||||
</el-col>
|
||||
<el-col class="line" :span="2">-</el-col>
|
||||
<el-col :span="11">
|
||||
<el-time-picker placeholder="选择时间" v-model="form.date2" style="width: 100%;"></el-time-picker>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="即时配送">
|
||||
<el-switch v-model="form.delivery"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动性质">
|
||||
<el-checkbox-group v-model="form.type">
|
||||
<el-checkbox label="美食/餐厅线上活动" name="type"></el-checkbox>
|
||||
<el-checkbox label="地推活动" name="type"></el-checkbox>
|
||||
<el-checkbox label="线下主题活动" name="type"></el-checkbox>
|
||||
<el-checkbox label="单纯品牌曝光" name="type"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="特殊资源">
|
||||
<el-radio-group v-model="form.resource">
|
||||
<el-radio label="线上品牌商赞助"></el-radio>
|
||||
<el-radio label="线下场地免费"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动形式">
|
||||
<el-input type="textarea" v-model="form.desc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">立即创建</el-button>
|
||||
<el-button>取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
form: {
|
||||
name: '',
|
||||
region: '',
|
||||
date1: '',
|
||||
date2: '',
|
||||
delivery: false,
|
||||
type: [],
|
||||
resource: '',
|
||||
desc: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
beforeMount () { },
|
||||
mounted () {
|
||||
console.log('item: ', this.item)
|
||||
},
|
||||
methods: {
|
||||
onSubmit () {
|
||||
console.log('submit!')
|
||||
this.$emit('update:compont', '')
|
||||
},
|
||||
aa () {
|
||||
console.log(this.item)
|
||||
},
|
||||
getRight () {
|
||||
this.$emit('getRight', false)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
.popupfade-enter{
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
.fade-leave {
|
||||
transform: translateX(0);
|
||||
}
|
||||
.popupfade-leave-to{
|
||||
transform: translateX(60%);
|
||||
}
|
||||
|
||||
.fade-enter-to{
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
.popupfade-leave-active,.fade-enter-active {
|
||||
transition:all 40s;
|
||||
}
|
||||
|
||||
.taskDetailRight {
|
||||
position: fixed;
|
||||
z-index: 50;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
min-width: 200px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
transition: all 1s;
|
||||
&-contant {
|
||||
min-width: 100px;
|
||||
height: 100%;
|
||||
float: right;
|
||||
background:#fff;
|
||||
box-shadow: 0 1px 6px 0 rgba(0,0,0,.12), 0 1px 6px 0 rgba(0,0,0,.12);
|
||||
.form {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -1,8 +1,9 @@
|
||||
<!-- -->
|
||||
<template>
|
||||
<transition name="popupfade">
|
||||
<div class="taskDetailRight" @click="getRight">
|
||||
<div class="taskDetailRight-contant" @click.stop="aa">
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<div>
|
||||
<popup-right v-if="show" @cancel='handleCancel' @submit="handleSubmit" title="添加维度">
|
||||
<div slot='content'>
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-form-item label="活动名称">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
@ -24,14 +25,14 @@
|
||||
<el-form-item label="即时配送">
|
||||
<el-switch v-model="form.delivery"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动性质">
|
||||
<!-- <el-form-item label="活动性质">
|
||||
<el-checkbox-group v-model="form.type">
|
||||
<el-checkbox label="美食/餐厅线上活动" name="type"></el-checkbox>
|
||||
<el-checkbox label="地推活动" name="type"></el-checkbox>
|
||||
<el-checkbox label="线下主题活动" name="type"></el-checkbox>
|
||||
<el-checkbox label="单纯品牌曝光" name="type"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="特殊资源">
|
||||
<el-radio-group v-model="form.resource">
|
||||
<el-radio label="线上品牌商赞助"></el-radio>
|
||||
@ -41,100 +42,50 @@
|
||||
<el-form-item label="活动形式">
|
||||
<el-input type="textarea" v-model="form.desc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">立即创建</el-button>
|
||||
<el-button>取消</el-button>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<el-button type="primary" @click="handleCancel">立即创建</el-button>
|
||||
<el-button @click="handleCancel">取消</el-button>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</popup-right>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
export default {
|
||||
props: {
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
form: {
|
||||
name: '',
|
||||
region: '',
|
||||
date1: '',
|
||||
date2: '',
|
||||
delivery: false,
|
||||
type: [],
|
||||
resource: '',
|
||||
desc: ''
|
||||
}
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PopupRight
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
beforeMount () { },
|
||||
mounted () {
|
||||
console.log('item: ', this.item)
|
||||
},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
methods: {
|
||||
onSubmit () {
|
||||
console.log('submit!')
|
||||
this.$emit('update:compont', '')
|
||||
handleCancel () {
|
||||
this.$emit('update:show', false)
|
||||
},
|
||||
aa () {
|
||||
console.log(this.item)
|
||||
},
|
||||
getRight () {
|
||||
this.$emit('getRight', false)
|
||||
handleSubmit () {
|
||||
this.$emit('update:show', false)
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='less' scoped>
|
||||
.popupfade-enter{
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
.fade-leave {
|
||||
transform: translateX(0);
|
||||
}
|
||||
.popupfade-leave-to{
|
||||
transform: translateX(60%);
|
||||
}
|
||||
<style lang='' scoped>
|
||||
|
||||
.fade-enter-to{
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
.popupfade-leave-active,.fade-enter-active {
|
||||
transition:all 40s;
|
||||
}
|
||||
|
||||
.taskDetailRight {
|
||||
position: fixed;
|
||||
z-index: 50;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
min-width: 200px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
transition: all 1s;
|
||||
&-contant {
|
||||
min-width: 100px;
|
||||
height: 100%;
|
||||
float: right;
|
||||
background:#fff;
|
||||
box-shadow: 0 1px 6px 0 rgba(0,0,0,.12), 0 1px 6px 0 rgba(0,0,0,.12);
|
||||
.form {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<component :compont.sync='compont' :is="compont"></component>
|
||||
<popup-set :show.sync='show'></popup-set>
|
||||
<!-- 考核管理
|
||||
<el-button type="success" @click="handleToHome('home')">去二级页面</el-button>
|
||||
<el-button type="success" @click="handleToHome('home1')">去二级页面带弹窗</el-button> -->
|
||||
@ -77,7 +77,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
compont: '',
|
||||
show: false,
|
||||
options: [
|
||||
{
|
||||
value: '1',
|
||||
@ -135,7 +135,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleRight () {
|
||||
this.compont = 'popup-set'
|
||||
this.show = true
|
||||
},
|
||||
handleSelectClick (row, column, event) {
|
||||
console.log('event: ', event)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div>
|
||||
|
||||
<div v-for="i in array" :key="i.id">
|
||||
<!-- {{i.id}}{{bbb(i)}} -->
|
||||
{{i.id}}{{bbb(i)}}
|
||||
</div>
|
||||
<el-button @click="aaa">点击</el-button>
|
||||
</div>
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
return this.arr1.some(i => i === item.id)
|
||||
},
|
||||
aaa () {
|
||||
this.arr1 = []
|
||||
// this.arr1 = []
|
||||
console.log('this.array: ', this.array)
|
||||
}
|
||||
},
|
||||
|
||||
@ -7,7 +7,9 @@
|
||||
<div class="basis-form">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="考评组名称:" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入名称"></el-input>
|
||||
<el-input
|
||||
size="small"
|
||||
v-model="form.name" placeholder="请输入名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="周期类型:">
|
||||
<el-radio-group v-model="form.radio">
|
||||
@ -17,20 +19,58 @@
|
||||
:label="i.id">{{i.name}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="考评组管理员:">
|
||||
<el-input v-model="form.name" placeholder="请输入名称"></el-input>
|
||||
<el-form-item label="考评组管理员:" >
|
||||
<el-tooltip class="item" effect="light" placement="right">
|
||||
<div slot="content">
|
||||
考评组管理员<br/>
|
||||
只有考评组管理员可以编辑这个考评组,<br/>
|
||||
权限为全部考评组的管理员默认可以管理<br/>
|
||||
所有考评组,考评组管理员只能从智能绩<br/>
|
||||
效的管理员中选择
|
||||
</div>
|
||||
<el-input
|
||||
style="width:300px;cursor: pointer;"
|
||||
size="mini"
|
||||
placeholder="请选择日期"
|
||||
readonly
|
||||
v-model="form.input1">
|
||||
<i slot="suffix" class="el-input__icon el-icon-edit"></i>
|
||||
</el-input>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
<el-form-item label="被考核人员" prop="name">
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="考评员工:">
|
||||
<div v-if="showData.list.length>0">
|
||||
<el-input
|
||||
@focus='handleGetChoose'
|
||||
style="width:300px;cursor: pointer;"
|
||||
size="small"
|
||||
:value ="showData.title + '等' + showData.list.length + '个部门' || '请选择部门'"
|
||||
readonly>
|
||||
<i slot="suffix" class="el-input__icon el-icon-edit"></i>
|
||||
</el-input>
|
||||
<i @click="showData.list=[]" style="margin-left:10px;cursor: pointer;" class="el-icon-delete"></i>
|
||||
</div>
|
||||
<div>
|
||||
<el-input
|
||||
style="width:300px;cursor: pointer;"
|
||||
size="small"
|
||||
placeholder="请选择人员"
|
||||
readonly
|
||||
v-model="form.input1">
|
||||
<i slot="suffix" class="el-input__icon el-icon-edit"></i>
|
||||
</el-input>
|
||||
<i style="margin-left:10px;cursor: pointer;" class="el-icon-delete"></i>
|
||||
</div>
|
||||
<el-button size='mini' @click="handleGetChoose" icon="el-icon-plus">选部门</el-button>
|
||||
<el-button size='mini' @click="handleGetChoose" icon="el-icon-plus">选角色</el-button>
|
||||
<!-- <el-button size='mini' @click="handleGetChoose" icon="el-icon-plus">选角色</el-button> -->
|
||||
<el-button size='mini' @click="handleGetChoose" icon="el-icon-plus">选人员</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<get-depart v-if="isShow" :isShow.sync='isShow'/>
|
||||
<get-depart v-if="isShow" :isShow.sync='isShow' :showDataList.sync='showData'/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -41,6 +81,9 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
isShow: false,
|
||||
showData: {
|
||||
list: []
|
||||
}, // 部门信息
|
||||
zhouqi: [{
|
||||
id: 1,
|
||||
name: '月度'
|
||||
|
||||
@ -9,16 +9,27 @@
|
||||
center>
|
||||
<div class="popup">
|
||||
<div class="popup-item boderAndRadius">
|
||||
<div class="popup-item-title">全部</div>
|
||||
<div class="popup-item-title">
|
||||
<span
|
||||
v-for="(i,index) in titleList"
|
||||
style="cursor: pointer;"
|
||||
:key="i.id"
|
||||
:class="{isActiveTitle:index+1<titleList.length}"
|
||||
@click="handleChangeTtitle(i)"
|
||||
>
|
||||
{{i.name}}
|
||||
<span v-if="index+1<titleList.length">></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="popup-item-content">
|
||||
<div class="popup-item-content-item">
|
||||
<div class="content">
|
||||
<el-checkbox>全选</el-checkbox>
|
||||
<el-checkbox :value ='isAll' @change="handleChangChoose($event)">全选</el-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="(i) in showData" :key="i.id" class="popup-item-content-item borderItem">
|
||||
<div class="content"><el-checkbox :value ='handleCheck(i)' @change='handleChangChoose($event,i)' >{{i.name}}</el-checkbox></div>
|
||||
<div class="popup-item-content-item-next" :class="{isHasActive:handleCheck(i)}" @click='handleNext(i)'>下级</div>
|
||||
<div class="popup-item-content-item-next" :class="{isHasActive:handleCheck(i)|| !i.children}" @click='handleNext(i)'>下级</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -35,8 +46,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" @click="xcq">取 消</el-button>
|
||||
<el-button size="mini" @click="xcq1">清空全部</el-button>
|
||||
<el-button size="mini" @click="handleCancel">取 消</el-button>
|
||||
<el-button size="mini" @click="tags=[]">清空全部</el-button>
|
||||
<el-button size="mini" type="primary" @click="centerDialogVisible">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@ -47,6 +58,17 @@
|
||||
import bbb from './a'
|
||||
console.log('bbb: ', bbb)
|
||||
export default {
|
||||
props: {
|
||||
showDataList: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
list: [],
|
||||
title: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
show: true,
|
||||
@ -54,10 +76,11 @@ export default {
|
||||
data: bbb,
|
||||
showData: [],
|
||||
checkList: [],
|
||||
tags: [{
|
||||
id: 100,
|
||||
name: '霖梓控股'
|
||||
titleList: [{
|
||||
id: 0,
|
||||
name: '全部'
|
||||
}],
|
||||
tags: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
@ -65,18 +88,49 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
isAll () {
|
||||
return this.showData.every(i => this.tags.some(j => i.id === j.id))
|
||||
}
|
||||
},
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
this.tags = this.showDataList.list || []
|
||||
this.showData = this.data.length > -1 ? this.data : []
|
||||
},
|
||||
methods: {
|
||||
// 点击title切换层级
|
||||
handleChangeTtitle (item) {
|
||||
if (item.id === 0) {
|
||||
this.showData = this.data.length > -1 ? this.data : []
|
||||
this.titleList = [{
|
||||
id: 0,
|
||||
name: '全部'
|
||||
}]
|
||||
return
|
||||
}
|
||||
let arr = []
|
||||
for (let i in this.titleList) {
|
||||
arr.push(this.titleList[i])
|
||||
if (item.id === this.titleList[i].id) break
|
||||
}
|
||||
this.titleList = arr
|
||||
this.showData = item.children
|
||||
},
|
||||
// 是否勾选
|
||||
handleCheck (item) {
|
||||
return this.tags.some(i => i.id === item.id)
|
||||
},
|
||||
handleChangChoose (event, item) {
|
||||
if (!item) {
|
||||
if (event) {
|
||||
this.showData.map(i => {
|
||||
if (!this.tags.some(j => i.id === j.id)) this.tags.push(i)
|
||||
})
|
||||
} else {
|
||||
this.tags = this.tags.filter(i => !this.showData.some(j => j.id === i.id))
|
||||
}
|
||||
return
|
||||
}
|
||||
const isHas = this.tags.some(i => i.id === item.id)
|
||||
if (isHas && !event) {
|
||||
this.tags = this.tags.filter(i => i.id !== item.id)
|
||||
@ -89,8 +143,9 @@ export default {
|
||||
},
|
||||
// 点击下级
|
||||
handleNext (item) {
|
||||
if (this.handleCheck(item)) return
|
||||
if (this.handleCheck(item) || !item.children) return
|
||||
this.showData = item.children
|
||||
this.titleList.push(item)
|
||||
this.handleGetNextChildren()
|
||||
},
|
||||
// 删除右侧标签
|
||||
@ -105,14 +160,22 @@ export default {
|
||||
},
|
||||
// 关闭弹窗
|
||||
centerDialogVisible () {
|
||||
const params = {
|
||||
list: this.tags,
|
||||
title: ''
|
||||
}
|
||||
for (let i in this.tags) {
|
||||
if (i > 1) break
|
||||
params.title = params.title + (i === '0' ? '' : ',') + this.tags[i].name
|
||||
}
|
||||
this.$emit('update:showDataList', params)
|
||||
this.$emit('update:isShow', false)
|
||||
},
|
||||
handleGetNextChildren (children = this.data) {
|
||||
console.log('children: ', children)
|
||||
},
|
||||
xcq () {
|
||||
// const list = this.$refs.tree.getCheckedNodes()
|
||||
// console.log('list: ', list)
|
||||
handleCancel () {
|
||||
this.$emit('update:isShow', false)
|
||||
},
|
||||
xcq1 () {
|
||||
console.log(this.a)
|
||||
@ -132,6 +195,7 @@ export default {
|
||||
&-item{
|
||||
width: 48%;
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
padding: 10px 0;
|
||||
&-right{
|
||||
padding: 10px !important;
|
||||
@ -139,6 +203,9 @@ export default {
|
||||
margin: 5px 6px;
|
||||
}
|
||||
}
|
||||
.isActiveTitle{
|
||||
color: @fontBlue;
|
||||
}
|
||||
&-title{
|
||||
color:#9b9b9b;
|
||||
padding-bottom: 4px;
|
||||
@ -177,6 +244,7 @@ export default {
|
||||
border-left: 1px solid @fontBlue;
|
||||
color: @fontBlue;
|
||||
height: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.el-checkbox{
|
||||
width: 100%;
|
||||
|
||||
@ -6,12 +6,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PopupRight
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
|
||||
@ -1,27 +1,112 @@
|
||||
<!-- -->
|
||||
<template>
|
||||
<div>
|
||||
模板设置
|
||||
<div class="set">
|
||||
<div class="set-top">
|
||||
<div class="set-top-title">总分规则</div>
|
||||
<div class="set-top-content">
|
||||
<el-form label-width="200px" label-position='left' :model="form">
|
||||
<el-form-item label="指标评分计算方式加和计算">
|
||||
<el-radio-group v-model="form.radio">
|
||||
<el-radio :label="3">加权计算
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
trigger="hover">
|
||||
<div>
|
||||
<img src="@/assets/workbench/jiaquan.png" alt="" srcset="">
|
||||
</div>
|
||||
<span slot="reference" class="wenhao">?</span>
|
||||
</el-popover></el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="3.75评分等级制">
|
||||
<el-switch
|
||||
v-model="form.value"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
trigger="hover">
|
||||
<div>
|
||||
<img src="@/assets/workbench/pingfen.png" alt="" srcset="">
|
||||
</div>
|
||||
<span slot="reference" class="wenhao">?</span>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set-add">
|
||||
<el-button icon="el-icon-plus" size="small" @click="handleAdd" round>添加考核维度</el-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<popup-right v-if="show" @cancel='handleCancel' @submit="handleSubmit" title="添加维度"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
|
||||
show: false,
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PopupRight
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
methods: {},
|
||||
methods: {
|
||||
// 添加考核维度
|
||||
handleAdd () {
|
||||
this.show = true
|
||||
},
|
||||
handleCancel () {
|
||||
this.show = false
|
||||
},
|
||||
handleSubmit () {
|
||||
this.show = false
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='' scoped>
|
||||
|
||||
<style lang='less' scoped>
|
||||
.set{
|
||||
&-top{
|
||||
padding: 10px;
|
||||
background: rgb(242, 246, 253);
|
||||
.wenhao{
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
background: rgb(211, 211, 211);
|
||||
}
|
||||
.el-form-item{
|
||||
margin: 0;
|
||||
}
|
||||
&-title{
|
||||
font-size: 18px;
|
||||
}
|
||||
&-content{
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
&-add{
|
||||
margin: 20px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
</div>
|
||||
<div class="eidt-content boderAndRadius">
|
||||
<basis v-show="active===1"/>
|
||||
<process v-show="active===2"/>
|
||||
<template-set v-show="active===3"/>
|
||||
<template-set v-show="active===2"/>
|
||||
<process v-show="active===3"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -21,7 +21,7 @@ import templateSet from './components/templateSet'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
active: 1
|
||||
active: 2
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user