From 1d3e8e3a14f09e42ee47d8e8b6cc5feb6c4f7c79 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 02 Feb 2026 16:24:38 +0800
Subject: [PATCH] feat:区域划分绘制逻辑、编辑逻辑优化调整
---
applications/task-work-order/src/views/orderView/orderDataManage/evaluate/index.vue | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/applications/task-work-order/src/views/orderView/orderDataManage/evaluate/index.vue b/applications/task-work-order/src/views/orderView/orderDataManage/evaluate/index.vue
index fa6d277..58066d9 100644
--- a/applications/task-work-order/src/views/orderView/orderDataManage/evaluate/index.vue
+++ b/applications/task-work-order/src/views/orderView/orderDataManage/evaluate/index.vue
@@ -39,7 +39,7 @@
<el-table class="gd-table" :data="list">
<el-table-column label="序号" width="80">
<template v-slot="{ $index }">
- {{ ((searchParams.current - 1) * searchParams.size + $index + 1).toString().padStart(2, '0') }}
+ {{ $index + 1 }}
</template>
</el-table-column>
<el-table-column prop="title" show-overflow-tooltip label="标题" />
@@ -53,11 +53,11 @@
</template>
</el-table-column>
<el-table-column prop="evaluationContent" show-overflow-tooltip label="评价内容" />
- <el-table-column label="操作" class-name="operation-btns" width="180">
+ <el-table-column label="操作" class-name="operation-btns" width="150">
<template v-slot="{ row }">
<el-link type="primary" @click="openForm('view', row)">查看</el-link>
- <el-link type="primary" @click="openForm('edit', row)">编辑</el-link>
- <el-link type="primary" @click="handleDelete(row)">删除</el-link>
+ <el-link type="primary" @click="openForm('edit', row)" v-if="row.isTheSameDepartment">编辑</el-link>
+ <el-link type="primary" @click="handleDelete(row)" v-if="row.isTheSameDepartment">删除</el-link>
</template>
</el-table-column>
</el-table>
@@ -80,7 +80,6 @@
</template>
<script setup>
import { Search, RefreshRight, Plus, Delete } from '@element-plus/icons-vue'
-import { onMounted, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getDeptTree } from '@/api/system/dept'
import FormDiaLog from './FormDiaLog.vue'
@@ -88,13 +87,17 @@
gdDataEvaluationPageApi,
gdDataEvaluationRemoveApi,
} from '@/views/orderView/orderDataManage/evaluate/evaluateApi'
-
+import { useStore } from 'vuex'
+const store = useStore()
+const userDepartment = store.state.user.userInfo?.dept_id
+const permission = computed(() => store.state.user.permission);
// 初始化查询参数
const initSearchParams = () => ({
title: '', // 标题
isResolved: '', // 是否解决
current: 1, // 当前页
size: 10, // 每页大小
+ isQueryAll:''//是否查询所有
})
const searchParams = ref(initSearchParams()) // 查询参数
const total = ref(0) // 总条数
@@ -120,7 +123,19 @@
async function getList() {
loading.value = true
try {
- const res = await gdDataEvaluationPageApi(searchParams.value)
+ // 根据权限设置查询参数
+ const params = { ...searchParams.value }
+ if (permission.value.sjyy_shtg) {
+ params.isQueryAll = true
+ params.isResolved = '0'
+ } else {
+ params.isQueryAll = false
+ delete params.isResolved
+ }
+ const res = await gdDataEvaluationPageApi(params)
+ res?.data?.data?.records.forEach(item => {
+ item.isTheSameDepartment = String(item.createDept) === String(userDepartment)
+ })
list.value = res?.data?.data?.records ?? []
total.value = res?.data?.data?.total ?? 0
} finally {
--
Gitblit v1.9.3