|
|
@@ -115,11 +115,7 @@
|
|
|
{{ scope.row.department || scope.row.deptName }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="职位" align="center" min-width="120" show-overflow-tooltip>
|
|
|
- <template #default="scope">
|
|
|
- {{ scope.row.position || scope.row.roleName }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="职位" align="center" prop="position" min-width="120" show-overflow-tooltip />
|
|
|
<el-table-column label="项目角色" align="center" width="120">
|
|
|
<template #default="scope">
|
|
|
<dict-tag :options="projectRoleOptions" :value="scope.row.projectRole" />
|
|
|
@@ -202,13 +198,24 @@
|
|
|
<!-- 附件 Tab -->
|
|
|
<div v-show="activeTab === 'attachment'" class="tab-content">
|
|
|
<div class="attachment-section">
|
|
|
+ <div style="margin-bottom: 12px; display: flex; justify-content: flex-end;">
|
|
|
+ <el-upload
|
|
|
+ :action="uploadFileUrl"
|
|
|
+ :headers="headers"
|
|
|
+ :on-success="handleUploadSuccess"
|
|
|
+ :show-file-list="false"
|
|
|
+ multiple
|
|
|
+ >
|
|
|
+ <el-button type="primary" icon="Upload">上传附件</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
<el-table :data="detailFileList" border class="attach-table">
|
|
|
<el-table-column label="文件名称" prop="name" show-overflow-tooltip />
|
|
|
<el-table-column label="文件类型" prop="type" width="120" align="center" />
|
|
|
<el-table-column label="上传时间" prop="uploadTime" width="170" align="center" />
|
|
|
<el-table-column label="操作" width="150" align="center">
|
|
|
<template #default="scope">
|
|
|
- <el-link :href="scope.row.url" :underline="false" target="_blank" type="primary" style="margin-right: 10px;">下载</el-link>
|
|
|
+ <el-link type="primary" :underline="false" @click="handleDownloadFile(scope.row)" style="margin-right: 10px;">下载</el-link>
|
|
|
<el-link type="danger" :underline="false" @click="handleDeleteFile(scope.row)">删除</el-link>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -864,6 +871,26 @@ const loadOssFiles = async () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const handleUploadSuccess = async (res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ const file = res.data;
|
|
|
+ const ossId = file.ossId;
|
|
|
+ const currentFileNo = form.value.fileNo ? form.value.fileNo.split(',').filter(Boolean) : [];
|
|
|
+ currentFileNo.push(ossId);
|
|
|
+ const newFileNo = currentFileNo.join(',');
|
|
|
+ try {
|
|
|
+ await updateLeads({ id: form.value.id, fileNo: newFileNo });
|
|
|
+ form.value.fileNo = newFileNo;
|
|
|
+ loadOssFiles();
|
|
|
+ proxy.$modal.msgSuccess("上传成功");
|
|
|
+ } catch (e) {
|
|
|
+ proxy.$modal.msgError("附件保存失败");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ proxy.$modal.msgError(res.msg || "上传失败");
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
const handleAnalysisUploadSuccess = (res) => {
|
|
|
if (res.code === 200) {
|
|
|
const file = res.data;
|
|
|
@@ -1191,6 +1218,16 @@ const handleDeleteContact = (row) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const handleDownloadFile = (row) => {
|
|
|
+ if (row.ossId) {
|
|
|
+ proxy.$download.oss(row.ossId);
|
|
|
+ } else if (row.url) {
|
|
|
+ window.open(row.url, '_blank');
|
|
|
+ } else {
|
|
|
+ proxy.$modal.msgError("下载地址不存在");
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
const handleDeleteFile = (row) => {
|
|
|
proxy.$modal.confirm(`确认删除附件「${row.name}」吗?`).then(async () => {
|
|
|
const currentFileNos = form.value.fileNo ? form.value.fileNo.split(',') : [];
|