pull/5/head
qsh 1 month ago
parent df3a4b9f46
commit e4ae5e275f
  1. 110
      src/views/Kpi/Appraise/index.vue
  2. 7
      src/views/Kpi/Score/index.vue

@ -0,0 +1,110 @@
<template>
<div>
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryFormRef" inline label-width="0">
<el-form-item>
<el-input v-model="queryParams.name" placeholder="请输入考核指标" clearable />
</el-form-item>
<el-form-item>
<el-button @click="handleQuery" v-hasPermi="['kpi:appraise:search']"> 搜索</el-button>
<el-button @click="resetQuery" v-hasPermi="['kpi:appraise:reset']"> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['kpi:appraise:add']"
>
新增
</el-button>
</el-form-item>
</el-form>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" border>
<el-table-column prop="name" label="考核指标" width="180" />
<el-table-column prop="leaderUserName" label="权重%" width="90" />
<el-table-column prop="sort" label="考核内容" />
<el-table-column label="考核规则" prop="createTime" />
<el-table-column label="评分上限" prop="createTime" width="90" />
<el-table-column label="考核人数" prop="createTime" width="90" />
<el-table-column label="操作" class-name="fixed-width" width="120">
<template #default="{ row }">
<el-button
link
type="primary"
@click="openForm('update', row.id)"
v-hasPermi="['kpi:appraise:update']"
>
修改
</el-button>
<el-button
link
type="danger"
@click="handleDelete(row.id)"
v-hasPermi="['kpi:appraise:remove']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script setup name="KpiContent">
const message = useMessage() //
const loading = ref(false) //
const list = ref() //
const queryParams = reactive({
name: undefined,
pageNo: 1,
pageSize: 20
})
/** 初始化 **/
onMounted(() => {
handleQuery()
})
const getList = async () => {
loading.value = true
try {
const data = await DeptApi.getDeptPage(queryParams)
list.value = handleTree(data)
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type, id) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id) => {
try {
//
await message.delConfirm()
//
await DeptApi.deleteDept(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,7 @@
<template>
<div> 打分 </div>
</template>
<script setup name="KpiScore"></script>
<style lang="scss" scoped></style>
Loading…
Cancel
Save