From 89380e6260a75d1d3b94de687ebcc2f50d50659d Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 03 Feb 2026 15:44:33 +0800
Subject: [PATCH] feat:环境变量配置调整
---
applications/task-work-order/src/views/orderView/orderDataManage/evaluate/index.vue | 64 ++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 23 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 2f5aaec..405710e 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
@@ -2,17 +2,24 @@
<basic-container>
<el-form ref="queryParamsRef" :model="searchParams" class="gd-search-form">
<el-form-item label="标题" prop="title">
- <el-input class="gd-input" v-model="searchParams.title" placeholder="请输入" clearable @clear="handleSearch" />
+ <el-input
+ class="gd-input gray"
+ v-model="searchParams.title"
+ placeholder="请输入"
+ clearable
+ @clear="handleSearch"
+ />
</el-form-item>
<el-form-item label="是否解决" prop="isResolved">
<el-select
- class="gd-select"
+ class="gd-select gray"
popper-class="gd-select-popper"
v-model="searchParams.isResolved"
placeholder="请选择"
clearable
@change="handleSearch"
+ :disabled="permission.sjyy_shtg"
>
<el-option v-for="item in isResolvedOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
@@ -25,14 +32,17 @@
</el-form>
<div class="gd-table-toolbar">
- <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">新增</el-button>
- <el-button :icon="Delete" color="#4C34FF" :disabled="!selectedIds.length" @click="handleDelete()">删除</el-button>
+ <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">新增评价</el-button>
</div>
<div class="gd-table-container" v-loading="loading">
<div class="gd-table-content gd-table-content-bg">
- <el-table class="gd-table" :data="list" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="46" />
+ <el-table class="gd-table" :data="list">
+ <el-table-column label="序号" width="80">
+ <template v-slot="{ $index }">
+ {{ $index + 1 }}
+ </template>
+ </el-table-column>
<el-table-column prop="title" show-overflow-tooltip label="标题" />
<el-table-column prop="dataName" show-overflow-tooltip label="数据名称" />
<el-table-column prop="proposeDeptName" show-overflow-tooltip label="提出部门" />
@@ -44,11 +54,11 @@
</template>
</el-table-column>
<el-table-column prop="evaluationContent" show-overflow-tooltip label="评价内容" />
- <el-table-column label="操作" class-name="operation-btns">
+ <el-table-column label="操作" class-name="operation-btns" width="150">
<template v-slot="{ row }">
- <el-link @click="openForm('view', row)">查看</el-link>
- <el-link @click="openForm('edit', row)">编辑</el-link>
- <el-link @click="handleDelete(row)">删除</el-link>
+ <el-link type="primary" @click="openForm('view', 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>
@@ -71,7 +81,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'
@@ -79,19 +88,22 @@
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) // 总条数
const loading = ref(true) // 列表加载中
const list = ref([]) // 列表数据
-const selectedIds = ref([]) // 勾选的ID列表
const queryParamsRef = ref(null) // 查询表单实例
const dialogRef = ref(null) // 弹框实例
const dialogVisible = ref(false)
@@ -112,7 +124,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 {
@@ -143,24 +167,18 @@
// 删除
async function handleDelete(row) {
- const tips = row ? '该条' : '选中的项'
- await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', {
+ await ElMessageBox.confirm('确认删除该条记录吗?', '提示', {
type: 'warning',
customClass: 'gd-confirm-custom',
confirmButtonClass: 'gd-confirm-button',
cancelButtonClass: 'gd-confirm-cancel-button',
})
- const ids = row ? row.id : selectedIds.value.join(',')
- await gdDataEvaluationRemoveApi({ ids })
+ await gdDataEvaluationRemoveApi({ ids: row.id })
ElMessage.success('删除成功')
- selectedIds.value = []
getList()
}
-// 勾选值设置
-function handleSelectionChange(rows) {
- selectedIds.value = rows.map(item => item.id)
-}
+
// 获取部门树
function getDeptTreeFun() {
--
Gitblit v1.9.3