This commit is contained in:
parent
f895483925
commit
4f2d4d8a6a
|
|
@ -70,6 +70,28 @@ export function updateFileManageRightApi(data) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 加入整改
|
||||||
|
export function addRectification(data) {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/fileManage/addRectification',
|
||||||
|
method: 'post',
|
||||||
|
data:data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function selectRectificationListApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/fileManage/selectRectificationList',
|
||||||
|
method: 'post',
|
||||||
|
data:data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function updateRectificationApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/fileManage/selectRectificationList',
|
||||||
|
method: 'post',
|
||||||
|
data:data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除档案目录
|
// 删除档案目录
|
||||||
export function delFileManageApi(data) {
|
export function delFileManageApi(data) {
|
||||||
|
|
|
||||||
|
|
@ -116,4 +116,11 @@ export default [
|
||||||
title: '移交详情'
|
title: '移交详情'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: '/fileManager/rectificationList',
|
||||||
|
name: 'RectificationList',
|
||||||
|
component: () => import('@/views/fileManager/components/rectificationList.vue'),
|
||||||
|
meta: { title: '整改清单' }
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="dialogVisible"
|
||||||
|
:title="title"
|
||||||
|
:show-close="true"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
@close="handleClose"
|
||||||
|
:append-to-body="true"
|
||||||
|
width="600px"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<el-form :model="form" :rules="rules" ref="ruleFormRef" label-width="110px">
|
||||||
|
<el-form-item label="档案文件">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
class="form-item"
|
||||||
|
:value="belongName"
|
||||||
|
:disabled="true"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="整改描述" prop="description">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
class="form-item"
|
||||||
|
v-model="form.description"
|
||||||
|
clearable
|
||||||
|
show-word-limit
|
||||||
|
placeholder="请输入整改描述"
|
||||||
|
maxlength="64"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="handleClose">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm">确认</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
|
import { ElMessage, ElLoading } from 'element-plus'
|
||||||
|
import { addRectification} from '@/api/archivesManagement/fileManager/fileManager.js'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
title: { type: String, default: '编辑档案' },
|
||||||
|
rowData: { type: Object, required: true },
|
||||||
|
projectId: { type: String, required: true }
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits(['closeDialog', 'handleQuery'])
|
||||||
|
|
||||||
|
const dialogVisible = ref(true)
|
||||||
|
const form = reactive({
|
||||||
|
id: null,
|
||||||
|
description: '',
|
||||||
|
proId: null
|
||||||
|
})
|
||||||
|
const belongName = ref('')
|
||||||
|
const ruleFormRef = ref()
|
||||||
|
|
||||||
|
const rules = reactive({
|
||||||
|
description: [{ required: true, message: '整改描述不能为空', trigger: 'blur' }]
|
||||||
|
})
|
||||||
|
|
||||||
|
// 初始化表单:直接使用 props 数据,不发请求
|
||||||
|
const initFormData = () => {
|
||||||
|
belongName.value = props.rowData.belongName || ''
|
||||||
|
form.fileId = props.rowData.fileId
|
||||||
|
form.description = props.rowData.description || ''
|
||||||
|
form.proId = props.projectId
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleClose = () => {
|
||||||
|
dialogVisible.value = false
|
||||||
|
emit('closeDialog')
|
||||||
|
}
|
||||||
|
|
||||||
|
const submitForm = async () => {
|
||||||
|
try {
|
||||||
|
await ruleFormRef.value.validate()
|
||||||
|
} catch {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const loading = ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '保存中...',
|
||||||
|
background: 'rgba(0,0,0,0.5)'
|
||||||
|
})
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
const res = await addRectification({
|
||||||
|
fileId: form.fileId,
|
||||||
|
description: form.description.trim(),
|
||||||
|
proId: form.proId })
|
||||||
|
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
ElMessage.success('加入成功')
|
||||||
|
emit('handleQuery')
|
||||||
|
handleClose()
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.data.msg || '修改失败')
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
initFormData()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.form-item {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,205 @@
|
||||||
|
<template>
|
||||||
|
<div class="rectification-list">
|
||||||
|
<el-card>
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span>整改清单</span>
|
||||||
|
<el-button size="small" @click="goBack">返回</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 表格:已移除详情按钮 -->
|
||||||
|
<avue-crud
|
||||||
|
:data="tableData"
|
||||||
|
:page="page"
|
||||||
|
:table-loading="loading"
|
||||||
|
:option="option"
|
||||||
|
addBtn: false
|
||||||
|
@on-load="onLoad"
|
||||||
|
@refresh-change="onLoad"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@row-click="handleEdit"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 编辑弹窗 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="dialogVisible"
|
||||||
|
title="编辑整改内容"
|
||||||
|
width="500px"
|
||||||
|
@close="closeDialog"
|
||||||
|
>
|
||||||
|
<avue-form
|
||||||
|
ref="formRef"
|
||||||
|
:option="editOption"
|
||||||
|
v-model="formData"
|
||||||
|
:rules="rules"
|
||||||
|
/>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="closeDialog">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitEdit" :loading="submitLoading">保存</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { selectRectificationListApi, updateRectificationApi } from '@/api/archivesManagement/fileManager/fileManager.js'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
|
// 从路由获取参数
|
||||||
|
const projectId = route.query.projectId
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const tableData = ref([])
|
||||||
|
const page = reactive({
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
// 表格配置:移除了操作列(#menu 插槽已删除)
|
||||||
|
const option = reactive({
|
||||||
|
height: 'auto',
|
||||||
|
index: true,
|
||||||
|
border: true,
|
||||||
|
addBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
menu: false, // 👈 关键:不显示操作列
|
||||||
|
column: [
|
||||||
|
{ label: '项目名称', },
|
||||||
|
{ label: '单项工程名称', prop: 'singleProName' },
|
||||||
|
{ label: '档案名称', prop: 'contentName'},
|
||||||
|
{ label: '整改内容', prop: 'description', sortable: true }
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
// 查询数据
|
||||||
|
const onLoad = async (pageParam = page) => {
|
||||||
|
if (!projectId) {
|
||||||
|
ElMessage.error('缺少必要参数')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const res = await selectRectificationListApi({
|
||||||
|
proId: projectId,
|
||||||
|
pageNum: pageParam.currentPage,
|
||||||
|
pageSize: pageParam.pageSize
|
||||||
|
})
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
tableData.value = res.data.rows || []
|
||||||
|
page.total = res.data.total || 0
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.data.msg || '加载失败')
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error('网络错误')
|
||||||
|
console.error(error)
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页方法
|
||||||
|
const handleCurrentChange = (val) => {
|
||||||
|
page.currentPage = val
|
||||||
|
onLoad()
|
||||||
|
}
|
||||||
|
const handleSizeChange = (val) => {
|
||||||
|
page.pageSize = val
|
||||||
|
onLoad()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回
|
||||||
|
const goBack = () => {
|
||||||
|
router.go(-1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ================== 编辑功能 ==================
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const formData = ref({})
|
||||||
|
const submitLoading = ref(false)
|
||||||
|
const formRef = ref()
|
||||||
|
|
||||||
|
// 编辑表单配置
|
||||||
|
const editOption = reactive({
|
||||||
|
labelWidth: 100,
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: '档案名称',
|
||||||
|
prop: 'contentName',
|
||||||
|
disabled: true, // 👈 禁用
|
||||||
|
placeholder: '档案名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '整改内容',
|
||||||
|
prop: 'description',
|
||||||
|
type: 'textarea',
|
||||||
|
rows: 4,
|
||||||
|
placeholder: '请输入整改内容'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
const rules = {
|
||||||
|
description: [{ required: true, message: '请输入整改内容', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
|
||||||
|
// 点击行进入编辑
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
formData.value = {
|
||||||
|
id: row.id,
|
||||||
|
contentName: row.contentName,
|
||||||
|
description: row.description
|
||||||
|
}
|
||||||
|
dialogVisible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
const closeDialog = () => {
|
||||||
|
dialogVisible.value = false
|
||||||
|
formData.value = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交编辑
|
||||||
|
const submitEdit = async () => {
|
||||||
|
await formRef.value.validate()
|
||||||
|
submitLoading.value = true
|
||||||
|
try {
|
||||||
|
const res = await updateRectificationApi(formData.value)
|
||||||
|
if (res.data.code === 200) {
|
||||||
|
ElMessage.success('保存成功')
|
||||||
|
closeDialog()
|
||||||
|
onLoad() // 刷新列表
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.data.msg || '保存失败')
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error('网络错误')
|
||||||
|
} finally {
|
||||||
|
submitLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始加载
|
||||||
|
onMounted(() => {
|
||||||
|
onLoad()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -19,6 +19,16 @@
|
||||||
@click="handleAdd" :disabled="addBtnIsShow" v-if="fileStatus === '0'">
|
@click="handleAdd" :disabled="addBtnIsShow" v-if="fileStatus === '0'">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<!-- 整改清单按钮(跳转页面) -->
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
size="small"
|
||||||
|
type="warning"
|
||||||
|
icon="List"
|
||||||
|
@click="goToRectificationList"
|
||||||
|
>
|
||||||
|
整改清单
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #fileName="{ row }">
|
<template #fileName="{ row }">
|
||||||
|
|
@ -43,6 +53,14 @@
|
||||||
@click="handleUpdate(row)"
|
@click="handleUpdate(row)"
|
||||||
v-hasPermi="['file:manage:update']"
|
v-hasPermi="['file:manage:update']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="row.isRectification === '0'"
|
||||||
|
:size="size"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
icon="Plus"
|
||||||
|
@click="handleRect(row)"
|
||||||
|
>加入整改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
:size="size"
|
:size="size"
|
||||||
type="danger"
|
type="danger"
|
||||||
|
|
@ -57,6 +75,9 @@
|
||||||
<!-- 新增/编辑 -->
|
<!-- 新增/编辑 -->
|
||||||
<AddTableData v-if="isflag" :isAdd="isAdd" :rowData="row" @handleQuery="handleQuery" :title="title"
|
<AddTableData v-if="isflag" :isAdd="isAdd" :rowData="row" @handleQuery="handleQuery" :title="title"
|
||||||
@closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :width="600" :projectId="projectId" />
|
@closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :width="600" :projectId="projectId" />
|
||||||
|
<!-- 整改 -->
|
||||||
|
<RectTableData v-if="isflagRect" :isRect="isRect" :rowData="row" @handleQuery="handleQuery" :title="title"
|
||||||
|
@closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :width="600" :projectId="projectId" />
|
||||||
|
|
||||||
<!-- 预览文件 -->
|
<!-- 预览文件 -->
|
||||||
<ViewFile v-if="isViewflag" :rowData="row" :title="title" :isAdd="isAdd" @closeDialog="closeDialog"
|
<ViewFile v-if="isViewflag" :rowData="row" :title="title" :isAdd="isAdd" @closeDialog="closeDialog"
|
||||||
|
|
@ -66,6 +87,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
import { ref, reactive, watch, nextTick } from 'vue'
|
import { ref, reactive, watch, nextTick } from 'vue'
|
||||||
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus';
|
import { ElLoading, ElMessage, ElMessageBox } from 'element-plus';
|
||||||
import { Plus, View, Edit, Delete } from '@element-plus/icons-vue'
|
import { Plus, View, Edit, Delete } from '@element-plus/icons-vue'
|
||||||
|
|
@ -75,6 +98,7 @@ import {
|
||||||
getFileManageApi,
|
getFileManageApi,
|
||||||
} from '@/api/archivesManagement/fileManager/fileManager.js'
|
} from '@/api/archivesManagement/fileManager/fileManager.js'
|
||||||
import AddTableData from './addTableData.vue'
|
import AddTableData from './addTableData.vue'
|
||||||
|
import RectTableData from './rectTableData.vue'
|
||||||
import ViewFile from '@/views/viewFile/viewFile.vue'
|
import ViewFile from '@/views/viewFile/viewFile.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -92,11 +116,27 @@ const props = defineProps({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const goToRectificationList = () => {
|
||||||
|
if (!props.projectId) {
|
||||||
|
ElMessage.warning('项目异常,请联系管理员')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 跳转到整改清单页面,携带 projectId
|
||||||
|
router.push({
|
||||||
|
name: 'RectificationList', // 路由名称,需与路由配置一致
|
||||||
|
query: {
|
||||||
|
projectId: props.projectId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
const title = ref("")
|
const title = ref("")
|
||||||
const isflag = ref(false)
|
const isflag = ref(false)
|
||||||
|
const isflagRect = ref(false)
|
||||||
const isViewflag = ref(false)
|
const isViewflag = ref(false)
|
||||||
const isAdd = ref('')
|
const isAdd = ref('')
|
||||||
|
const isRect = ref('')
|
||||||
const row = ref({})
|
const row = ref({})
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const addBtnIsShow = ref(true)
|
const addBtnIsShow = ref(true)
|
||||||
|
|
@ -168,6 +208,7 @@ const option = reactive({
|
||||||
// 方法
|
// 方法
|
||||||
const closeDialog = () => {
|
const closeDialog = () => {
|
||||||
isflag.value = false
|
isflag.value = false
|
||||||
|
isflagRect.value = false
|
||||||
isViewflag.value = false
|
isViewflag.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -203,6 +244,14 @@ const handleUpdate = (rowData) => {
|
||||||
row.value.detailStatus = false
|
row.value.detailStatus = false
|
||||||
isflag.value = true
|
isflag.value = true
|
||||||
}
|
}
|
||||||
|
const handleRect = (rowData) => {
|
||||||
|
title.value = "加入整改清单"
|
||||||
|
isRect.value = 'rect'
|
||||||
|
row.value = rowData
|
||||||
|
row.value.belongName = props.selectedNode.parentName + '/' + props.selectedNode.label + '/' + row.value.fileName
|
||||||
|
row.value.detailStatus = false
|
||||||
|
isflagRect.value = true
|
||||||
|
}
|
||||||
|
|
||||||
// 预览文件
|
// 预览文件
|
||||||
const viewFile = (rowData) => {
|
const viewFile = (rowData) => {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<el-button type="warning" plain icon="Bottom" size="small" @click="handleFileExtract"
|
<el-button type="warning" plain icon="Bottom" size="small" @click="handleFileExtract"
|
||||||
v-if="fileStatus === '0' && !integrityStatus">档案同步</el-button>
|
v-if="fileStatus === '0' && !integrityStatus">档案同步</el-button>
|
||||||
<el-button type="success" plain icon="Finished" size="small" @click="moveListConfirm"
|
<el-button type="success" plain icon="Finished" size="small" @click="moveListConfirm"
|
||||||
v-if="fileStatus === '0' && !integrityStatus">移交清单确认</el-button>
|
v-if="fileStatus === '0' && !integrityStatus">发起归档</el-button>
|
||||||
<el-button type="success" plain icon="Finished" size="small" @click="handleIntegrityStatus"
|
<el-button type="success" plain icon="Finished" size="small" @click="handleIntegrityStatus"
|
||||||
v-if="fileStatus === '0' && integrityStatus">完整性确认</el-button>
|
v-if="fileStatus === '0' && integrityStatus">完整性确认</el-button>
|
||||||
<el-button type="danger" plain icon="Close" size="small" @click="handleClose">返回</el-button>
|
<el-button type="danger" plain icon="Close" size="small" @click="handleClose">返回</el-button>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue