指标样式优化

This commit is contained in:
zhujida 2021-01-13 10:54:56 +08:00
parent 188137e06b
commit 8ac1977c61
3 changed files with 67 additions and 23 deletions

View File

@ -57,7 +57,11 @@ export default {
} else {
this.activeIndex = ''
}
if (this.auth.evaluationSet && this.auth.roleSet) this.activeIndex = this.$route.query.activeIndex || '0'
if (this.auth.evaluationSet && this.auth.roleSet) {
this.activeIndex = this.$route.query.activeIndex || '0'
} else {
this.activeIndex = this.$route.query.activeIndex
}
},
beforeMount () { },
mounted () { },

View File

@ -1,7 +1,7 @@
<template>
<div class="add-target commonFont">
<el-form
ref="form"
ref="formTarget"
:model="formData"
size="small"
label-width="200px"
@ -25,10 +25,11 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
prop="targetType"
>
<div slot="label" style="margin-left:10px;">指标类型</div>
<el-form-item prop="targetType">
<div
slot="label"
style="margin-left:10px;"
>指标类型</div>
<el-radio-group v-model="formData.targetType">
<el-radio
v-for="item in targetRadioList"
@ -46,27 +47,39 @@
placeholder="请输入指标名称"
></el-input>
</el-form-item>
<el-form-item
prop="standard"
>
<div slot="label" style="margin-left:10px;">考核标准</div>
<el-form-item prop="standard">
<div
slot="label"
style="margin-left:10px;"
>考核标准</div>
<el-input
type="textarea"
v-model="formData.standard"
placeholder="请输入指标名称"
></el-input>
</el-form-item>
<el-form-item>
<div slot="label" style="margin-left:10px;">权重</div>
<el-form-item prop="weight">
<div
slot="label"
style="margin-left:10px;"
>权重</div>
<el-input
type="number"
v-model="formData.targetName"
v-model="formData.weight"
placeholder="请输入指标名称"
>
<el-button slot="append">%</el-button>
</el-input>
<div class="comonPromptFont">权重设置为0时此指标将不参与运算</div>
</el-form-item>
<el-form-item label=" ">
<el-button
type="primary"
@click="handleSaveSet"
>保存设置</el-button>
</el-form-item>
<el-form-item label=" "><el-button type="primary" @click="handleSaveSet">保存设置</el-button></el-form-item>
</el-form>
</div>
@ -75,7 +88,14 @@
export default {
methods: {
handleSaveSet () {
this.$refs.formTarget.validate((valid) => {
if (valid) {
alert('submit!')
} else {
console.log('error submit!!')
return false
}
})
}
},
data () {

View File

@ -14,7 +14,7 @@
placeholder="搜索指标"
style="width:200px;"
size="small"
:value="headerSearchValue"
v-model="headerSearchValue"
@change="handleHeaderSearch"
></el-input>
</el-col>
@ -63,14 +63,19 @@
</template>
<template slot-scope="scope">
<el-dropdown @command="handleClasseDropdown">
<el-button type="text">...</el-button>
<div
style="width:40px;height:23px;"
class="el-dropdown-link"
@mousemove="selectedMenuRowIndex=scope.$index"
@mouseout="selectedMenuRowIndex=-1"
>{{selectedMenuRowIndex===scope.$index?'...':' '}}</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
:command="{obj:scope.row,type:0}"
icon="el-icon-edit"
>编辑</el-dropdown-item>
<el-dropdown-item
:command="{obj:scope.row,type:0}"
:command="{obj:scope.row,type:1}"
icon="el-icon-delete"
>删除</el-dropdown-item>
</el-dropdown-menu>
@ -89,6 +94,10 @@
height="400px"
:header-cell-style="{background:'#f5f4f5'}"
>
<div
slot="empty"
class="comonPromptFont"
>{{$isStringEmpty(this.headerSearchValue)?'暂无数据':'未找到关于'+this.headerSearchValue+'的结果'}}</div>
<el-table-column type="selection"></el-table-column>
<el-table-column
label="名称"
@ -112,8 +121,8 @@
<script>
export default {
methods: {
handleHeaderSearch () {
handleHeaderSearch (val) {
console.log('搜索指标' + this.headerSearchValue)
},
handleAdd () {
//
@ -126,6 +135,11 @@ export default {
},
handleRemove () {
console.log('删除指标')
this.$confirm('确认删除选中指标', '提示').then(() => {
console.log('确认删除选中指标')
}).catch(() => {
this.selectedMenuRowModel = null
})
},
handleAddCalsse () {
console.log('添加分类')
@ -144,6 +158,11 @@ export default {
})
} else if (type === 1) {
//
this.$confirm('您确定要删除此分类吗?', '提示').then(() => {
console.log('确定删除分类')
}).catch(() => {
this.selectedMenuRowModel = null
})
console.log('移除指标')
}
}
@ -155,7 +174,9 @@ export default {
tableMenuData: [{ name: '收代理费建安费啦k咳咳咳书法家阿李师傅', id: '1' }],
tableData: [],
menuDataClasseHide: false,
selectedRowList: []
selectedRowList: [],
selectedMenuRowIndex: -1,
selectedMenuRowModel: null
}
}
}
@ -165,7 +186,6 @@ export default {
background-color: white;
padding: 28px;
background-color: #fff;
&-classe-menu-hide {
width: 1px;
}