|
|
|
|
@ -27,16 +27,6 @@
|
|
|
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="12"> </el-col>
|
|
|
|
|
<el-col :span="12"> </el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="12"> </el-col>
|
|
|
|
|
<el-col :span="12"> </el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="12"> </el-col>
|
|
|
|
|
<el-col :span="12"> </el-col>
|
|
|
|
|
<el-col :span="12" v-show="false">
|
|
|
|
|
<el-form-item label="周报ID" prop="reportId">
|
|
|
|
|
<el-input v-model="queryParams.reportId" placeholder="请点击右侧图标选择项目" />
|
|
|
|
|
@ -93,9 +83,6 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row">
|
|
|
|
|
<el-col :span="24"> </el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
@ -107,11 +94,11 @@
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd(null)" v-hasPermi="['oa/erp:projectReport:add']">新增</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<!-- <el-col :span="1.5">
|
|
|
|
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['oa/erp:projectReport:edit']"
|
|
|
|
|
>修改</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-col> -->
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['oa/erp:projectReport:remove']"
|
|
|
|
|
>删除</el-button
|
|
|
|
|
@ -126,41 +113,41 @@
|
|
|
|
|
<!-- 项目周报信息表格展示 -->
|
|
|
|
|
<el-table v-loading="loading" border :data="projectReportList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="项目周报ID" align="center" prop="reportId" v-if="columns[0].visible" />
|
|
|
|
|
<el-table-column label="项目ID" align="center" prop="projectId" v-if="columns[1].visible" />
|
|
|
|
|
<el-table-column label="项目名称" align="center" prop="projectName" v-if="columns[2].visible" />
|
|
|
|
|
<el-table-column label="项目编码" align="center" prop="projectCode" v-if="columns[3].visible" />
|
|
|
|
|
<el-table-column label="当前里程碑" align="center" prop="milestonePlan" v-if="columns[4].visible" />
|
|
|
|
|
<el-table-column label="项目经理" align="center" prop="managerName" v-if="columns[5].visible" />
|
|
|
|
|
<el-table-column label="部门名称" align="center" prop="deptName" v-if="columns[6].visible" />
|
|
|
|
|
<el-table-column label="部门负责人" align="center" prop="chargeName" v-if="columns[7].visible" />
|
|
|
|
|
<el-table-column label="分管副总" align="center" prop="deputyName" v-if="columns[8].visible" />
|
|
|
|
|
<el-table-column label="周报情况说明" align="center" prop="informationNote" v-if="columns[9].visible" />
|
|
|
|
|
<el-table-column label="排序号" align="center" prop="sortOrder" v-if="columns[10].visible" />
|
|
|
|
|
<el-table-column label="附件ID" align="center" prop="ossId" v-if="columns[11].visible" />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[12].visible" />
|
|
|
|
|
<el-table-column label="激活标识" align="center" prop="activeFlag" v-if="columns[13].visible" />
|
|
|
|
|
<el-table-column label="项目周报ID" align="center" prop="reportId" width="100" v-if="columns[0].visible" />
|
|
|
|
|
<el-table-column label="项目ID" align="center" prop="projectId" width="100" v-if="columns[1].visible" />
|
|
|
|
|
<el-table-column label="项目名称" align="center" prop="projectName" width="150" v-if="columns[2].visible" />
|
|
|
|
|
<el-table-column label="项目编码" align="center" prop="projectCode" width="150" v-if="columns[3].visible" />
|
|
|
|
|
<el-table-column label="当前里程碑" align="center" prop="milestonePlan" width="100" v-if="columns[4].visible" />
|
|
|
|
|
<el-table-column label="项目经理" align="center" prop="managerName" width="100" v-if="columns[5].visible" />
|
|
|
|
|
<el-table-column label="部门名称" align="center" prop="deptName" width="150" v-if="columns[6].visible" />
|
|
|
|
|
<el-table-column label="部门负责人" align="center" prop="chargeName" width="100" v-if="columns[7].visible" />
|
|
|
|
|
<el-table-column label="分管副总" align="center" prop="deputyName" width="100" v-if="columns[8].visible" />
|
|
|
|
|
<el-table-column label="周报情况说明" align="center" prop="informationNote" width="150" v-if="columns[9].visible" />
|
|
|
|
|
<el-table-column label="排序号" align="center" prop="sortOrder" width="100" v-if="columns[10].visible" />
|
|
|
|
|
<el-table-column label="附件ID" align="center" prop="ossId" width="100" v-if="columns[11].visible" />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" width="150" v-if="columns[12].visible" />
|
|
|
|
|
<el-table-column label="激活标识" align="center" prop="activeFlag" width="100" v-if="columns[13].visible" />
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="100" v-if="columns[14].visible" />
|
|
|
|
|
<el-table-column label="更新时间" align="center" prop="updateTime" width="100" v-if="columns[15].visible" />
|
|
|
|
|
<el-table-column label="操作" align="center" width="150" fixed="right" class-name="small-padding fixed-width">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-tooltip content="新增已有周报明细" placement="top">
|
|
|
|
|
<el-tooltip content="新增已有周报明细" placement="top" v-if="scope.row.status === '0'">
|
|
|
|
|
<el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['oa/erp:projectReport:add']"></el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip content="查看详情" placement="top">
|
|
|
|
|
<el-button link type="info" icon="DocumentChecked" @click="handleView(scope.row)"></el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<!-- <el-tooltip content="修改" placement="top">
|
|
|
|
|
<el-tooltip content="修改" placement="top" v-if="scope.row.status === '1'">
|
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
type="primary"
|
|
|
|
|
type="success"
|
|
|
|
|
icon="Edit"
|
|
|
|
|
@click="handleUpdateReport(scope.row)"
|
|
|
|
|
v-hasPermi="['oa/erp:projectReport:edit']"
|
|
|
|
|
></el-button>
|
|
|
|
|
</el-tooltip> -->
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip content="查看详情" placement="top">
|
|
|
|
|
<el-button link type="info" icon="DocumentChecked" @click="handleView(scope.row)"></el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip content="删除" placement="top">
|
|
|
|
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['oa/erp:projectReport:remove']"></el-button>
|
|
|
|
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['oa/erp:projectReport:remove']"></el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
@ -251,15 +238,8 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="附件" prop="ossId">
|
|
|
|
|
<el-button type="primary" plain icon="Upload" @click="handleFile">上传周报附件</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="form-row" v-show="false">
|
|
|
|
|
<el-col :span="12" v-show="false">
|
|
|
|
|
<el-form-item label="排序号" prop="sortOrder">
|
|
|
|
|
<el-input v-model="form.sortOrder" placeholder="请输入排序号" />
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
@ -270,8 +250,15 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
|
|
|
|
|
<el-form-item label="附件" prop="ossId">
|
|
|
|
|
<FileUpload
|
|
|
|
|
v-model="ossIdString"
|
|
|
|
|
:limit="5"
|
|
|
|
|
:fileSize="20"
|
|
|
|
|
:fileType="['doc', 'docx', 'pdf', 'xls', 'xlsx', 'jpg', 'jpeg', 'png']"
|
|
|
|
|
:disabled="false"
|
|
|
|
|
:isShowTip="true"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" v-show="false">
|
|
|
|
|
@ -300,22 +287,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改OSS对象存储对话框 -->
|
|
|
|
|
<el-dialog v-model="dialogOSS.visible" :title="dialogOSS.title" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="ossFormRef" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
<el-form-item label="文件名">
|
|
|
|
|
<fileUpload v-if="type === 0" v-model="ossFileModel" />
|
|
|
|
|
<imageUpload v-if="type === 1" v-model="ossFileModel" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitOss">确 定</el-button>
|
|
|
|
|
<el-button @click="cancelOss">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -325,6 +296,7 @@ import { ProjectReportVO, ProjectReportQuery, ProjectReportForm } from '@/api/oa
|
|
|
|
|
import { listProjectReport, getProjectReport, delProjectReport, addProjectReport, updateProjectReport } from '@/api/oa/erp/projectReport';
|
|
|
|
|
import { allListDept } from '@/api/system/dept';
|
|
|
|
|
import { listUserByDeptId } from '@/api/system/user';
|
|
|
|
|
import FileUpload from '@/components/FileUpload/index.vue';
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
|
|
|
|
@ -362,7 +334,7 @@ const columns = ref<FieldOption[]>([
|
|
|
|
|
{ key: 9, label: `周报情况说明`, visible: true },
|
|
|
|
|
{ key: 10, label: `排序号`, visible: false },
|
|
|
|
|
{ key: 11, label: `附件ID`, visible: true },
|
|
|
|
|
{ key: 12, label: `备注`, visible: true },
|
|
|
|
|
{ key: 12, label: `备注`, visible: false },
|
|
|
|
|
{ key: 13, label: `激活标识`, visible: false },
|
|
|
|
|
{ key: 14, label: `创建时间`, visible: true },
|
|
|
|
|
{ key: 15, label: `更新时间`, visible: true }
|
|
|
|
|
@ -385,7 +357,8 @@ const initFormData: ProjectReportForm = {
|
|
|
|
|
deptName: undefined,
|
|
|
|
|
managerName: undefined,
|
|
|
|
|
chargeName: undefined,
|
|
|
|
|
deputyName: undefined
|
|
|
|
|
deputyName: undefined,
|
|
|
|
|
status: undefined
|
|
|
|
|
};
|
|
|
|
|
const data = reactive<PageData<ProjectReportForm, ProjectReportQuery>>({
|
|
|
|
|
form: { ...initFormData },
|
|
|
|
|
@ -409,6 +382,7 @@ const data = reactive<PageData<ProjectReportForm, ProjectReportQuery>>({
|
|
|
|
|
managerName: undefined,
|
|
|
|
|
chargeName: undefined,
|
|
|
|
|
deputyName: undefined,
|
|
|
|
|
status: undefined,
|
|
|
|
|
params: {}
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
@ -419,43 +393,16 @@ const data = reactive<PageData<ProjectReportForm, ProjectReportQuery>>({
|
|
|
|
|
|
|
|
|
|
const { queryParams, form, rules } = toRefs(data);
|
|
|
|
|
|
|
|
|
|
const type = ref(0);
|
|
|
|
|
// OSS功能
|
|
|
|
|
const dialogOSS = reactive<DialogOption>({
|
|
|
|
|
visible: false,
|
|
|
|
|
title: ''
|
|
|
|
|
});
|
|
|
|
|
/** 文件按钮操作 */
|
|
|
|
|
const handleFile = () => {
|
|
|
|
|
type.value = 0;
|
|
|
|
|
// 打开时回显已有附件
|
|
|
|
|
ossFileModel.value = form.value.ossId as any;
|
|
|
|
|
dialogOSS.visible = true;
|
|
|
|
|
dialogOSS.title = '上传周报附件';
|
|
|
|
|
};
|
|
|
|
|
// OSS 上传内部 v-model 中转,避免直接绑定到 form 的未知属性
|
|
|
|
|
const ossFileModel = ref<string | string[] | undefined>(undefined);
|
|
|
|
|
// 确认上传,仅关闭弹窗并依赖 v-model 同步到 ossId
|
|
|
|
|
const submitOss = () => {
|
|
|
|
|
// 将上传组件返回的 ossId 串写回表单
|
|
|
|
|
form.value.ossId = ossFileModel.value as any;
|
|
|
|
|
dialogOSS.visible = false;
|
|
|
|
|
proxy?.$modal.msgSuccess('附件已更新');
|
|
|
|
|
};
|
|
|
|
|
function cancelOss() {
|
|
|
|
|
dialogOSS.visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 监听上传组件返回的文件(ossId 串)并同步到表单字段
|
|
|
|
|
// 同步表单初值到上传模型
|
|
|
|
|
watch(
|
|
|
|
|
() => form.value.ossId,
|
|
|
|
|
(val) => {
|
|
|
|
|
if (!dialog.visible) {
|
|
|
|
|
ossFileModel.value = val as any;
|
|
|
|
|
}
|
|
|
|
|
// 定义计算属性用于双向绑定
|
|
|
|
|
const ossIdString = computed({
|
|
|
|
|
get() {
|
|
|
|
|
const v = form.value.ossId as any;
|
|
|
|
|
return v === undefined || v === null ? '' : String(v);
|
|
|
|
|
},
|
|
|
|
|
set(val: string) {
|
|
|
|
|
form.value.ossId = val || (undefined as any);
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const deptList = ref<any[]>([]);
|
|
|
|
|
const managerList = ref<any[]>([]);
|
|
|
|
|
@ -633,12 +580,12 @@ const handleView = (row?: ProjectReportVO) => {
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
const handleUpdateReport = (row?: ProjectReportVO) => {
|
|
|
|
|
reset();
|
|
|
|
|
const _projectId = row?.projectId;
|
|
|
|
|
const _reportId = row?.reportId;
|
|
|
|
|
proxy.$tab.closePage(route);
|
|
|
|
|
router.push({
|
|
|
|
|
path: '/project/projectReport/edit',
|
|
|
|
|
query: {
|
|
|
|
|
id: _projectId,
|
|
|
|
|
id: _reportId,
|
|
|
|
|
type: 'update',
|
|
|
|
|
// 传递完整的行数据,方便合同信息页面直接使用
|
|
|
|
|
reportData: encodeURIComponent(JSON.stringify(row))
|
|
|
|
|
|