莳松crm管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ss-crm-manage-web/src/views/Kpi/Appraise/index.vue

148 lines
4.1 KiB

5 months ago
<template>
<div>
<!-- 搜索工作栏 -->
4 months ago
<el-form :model="searchForm" ref="queryFormRef" inline label-width="0">
5 months ago
<el-form-item>
4 months ago
<el-input v-model="searchForm.name" placeholder="请输入考核指标" clearable />
5 months ago
</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" />
4 months ago
<el-table-column prop="rate" label="权重%" width="90" />
<el-table-column label="考核内容">
<template #default="{ row }">
<div v-dompurify-html="row.kaoheneirong"></div>
</template>
</el-table-column>
<el-table-column label="考核规则" prop="kaoheguize">
<template #default="{ row }">
<div v-dompurify-html="row.kaoheguize"></div>
</template>
</el-table-column>
<el-table-column label="评分上限" prop="maxScore" width="90" />
<el-table-column label="考核人数" width="90">
<template #default="{ row }">
{{ row.checkEmployees?.length || 0 }}
</template>
</el-table-column>
5 months ago
<el-table-column label="操作" class-name="fixed-width" width="120">
<template #default="{ row }">
<el-button
link
type="primary"
4 months ago
@click="openForm('update', row)"
5 months ago
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>
4 months ago
<Pagination
v-model:limit="searchForm.pageSize"
v-model:page="searchForm.pageNo"
:total="total"
@pagination="getList"
/>
<DialogAppraise ref="formRef" @success="handleQuery" />
5 months ago
</div>
</template>
<script setup name="KpiContent">
4 months ago
import DialogAppraise from './Components/DialogAppraise.vue'
5 months ago
const message = useMessage() // 消息弹窗
const loading = ref(false) // 列表的加载中
const list = ref() // 列表的数据
4 months ago
const searchForm = ref({
5 months ago
name: undefined,
pageNo: 1,
pageSize: 20
})
4 months ago
const total = ref(0)
5 months ago
/** 初始化 **/
onMounted(() => {
handleQuery()
})
4 months ago
const getList = async (info) => {
5 months ago
loading.value = true
try {
4 months ago
const data = [
{
name: '纳税申报',
rate: 35,
kaoheneirong:
'<p>1、每个月13号之前在柠檬云财税把上个月的财务数据录入系统出具财务报表;</p><p>2、社保和公积金及时增减人员,做好核定工作,及时申报缴纳;</p><p>3、按照税务局规定时间把自己所负责的公司增指税、附加税、所得税以及其他税种申报完成</p>',
kaoheguize: `当天处理完今日线索,连续2天未处理完,一次扣2分,最多扣5分`,
maxScore: 5,
checkEmployees: [1, 3, 4]
}
]
if (info) {
data.push(info)
}
list.value = data
5 months ago
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
4 months ago
const handleQuery = (info) => {
searchForm.value.pageNo = 1
getList(info)
5 months ago
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
4 months ago
const openForm = (type, row) => {
formRef.value.open(type, row)
5 months ago
}
/** 删除按钮操作 */
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>