设计管理
This commit is contained in:
@ -63,23 +63,17 @@
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['design:volumeFile:query']">查看文件</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上传说明" align="center" prop="explainText">
|
||||
<el-table-column label="外部意见" align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.fileVoList[0]?.explainText }}
|
||||
<el-link v-if="scope.row.opinion" :key="scope.row.opinion" :href="scope.row.opinion" target="_blank" type="primary" :underline="false">
|
||||
{{ scope.row.opinion }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
v-if="scope.row.auditStatus != 'finish' && scope.row.auditStatus != 'termination' && scope.row.auditStatus != 'waiting'"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['design:volumeFile:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['design:volumeFile:edit']">修改</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@ -89,6 +83,7 @@
|
||||
v-hasPermi="['design:volumeFile:add']"
|
||||
>上传图纸</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Upload" @click="handleOpinion(scope.row)">外部意见</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -156,21 +151,28 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 查看文件列表 -->
|
||||
<el-dialog draggable title="图纸列表" v-model="viewVisible" width="45%">
|
||||
<el-dialog draggable title="图纸列表" v-model="viewVisible" width="1000px">
|
||||
<el-tabs type="border-card" v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="蓝图" name="3"
|
||||
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||
<template #operation="{ row }">
|
||||
<el-button link type="primary" icon="edit" @click="handleAuditLantu(row)" v-if="row.auditStatus == 'draft' || row.auditStatus == 'back'"
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="edit"
|
||||
@click="handleAuditLantu(row)"
|
||||
v-if="(row.status != '2' && row.auditStatus == 'draft') || row.auditStatus == 'back'"
|
||||
>审核</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="View" v-if="row.auditStatus != 'draft'" @click="handleAuditViewLantu(row)">查看流程</el-button>
|
||||
<el-button link type="primary" icon="View" v-if="row.status != '2' && row.auditStatus != 'draft'" @click="handleAuditViewLantu(row)"
|
||||
>查看流程</el-button
|
||||
>
|
||||
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
link
|
||||
icon="View"
|
||||
v-if="row.auditStatus == 'back' || row.auditStatus == 'termination' || row.auditStatus == 'finish'"
|
||||
v-if="(row.status != '2' && row.auditStatus == 'back') || row.auditStatus == 'termination' || row.auditStatus == 'finish'"
|
||||
@click="handleViewHistory(row)"
|
||||
>查看单据</el-button
|
||||
>
|
||||
@ -196,17 +198,10 @@
|
||||
</template>
|
||||
</TableContent></el-tab-pane
|
||||
>
|
||||
<el-tab-pane label="变更" name="2"
|
||||
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||
<template #operation="{ row }">
|
||||
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button>
|
||||
</template>
|
||||
</TableContent></el-tab-pane
|
||||
>
|
||||
<el-tab-pane label="作废 " name="4"
|
||||
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||
<template #operation="{ row }">
|
||||
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载1 </el-button>
|
||||
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button>
|
||||
</template>
|
||||
</TableContent></el-tab-pane
|
||||
>
|
||||
@ -220,6 +215,18 @@
|
||||
<el-dialog draggable title="单据" v-model="dialogHistory" width="800px">
|
||||
<histroy ref="histroyRef"></histroy>
|
||||
</el-dialog>
|
||||
<el-dialog draggable title="上传外部意见" v-model="uploadOpinionVisible" width="500px" append-to-body>
|
||||
<el-form :model="updateRow" label-width="80px" :inline="false">
|
||||
<el-form-item label="外部意见">
|
||||
<file-upload :fileType="['pdf']" :isShowTip="false" :fileSize="100" :onUploadSuccess="onUploadSuccess" v-model="opinion"></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="font-size: 12px; color: #999999">注意:请上传pdf格式文件</span>
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<el-button type="primary" @click="onSubmitOpinion">确定</el-button>
|
||||
<el-button @click="uploadOpinionVisible = false">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -253,9 +260,14 @@ const TableContentRef = ref<InstanceType<typeof TableContentRef>>();
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const activeName = ref('3');
|
||||
const uploadOpinionVisible = ref(false);
|
||||
const design = ref('');
|
||||
const total = ref(0);
|
||||
const dialogHistory = ref(false);
|
||||
const opinion = ref('');
|
||||
const updateRow = ref({
|
||||
opinion: []
|
||||
});
|
||||
// 获取用户 store
|
||||
const userStore = useUserStoreHook();
|
||||
// 从 store 中获取项目列表和当前选中的项目
|
||||
@ -422,7 +434,31 @@ const handleView = (row?: any) => {
|
||||
/** 上传文件按钮操作 */
|
||||
const uploadVisible = ref(false);
|
||||
const viewVisible = ref(false);
|
||||
// 上传外部意见
|
||||
const handleOpinion = (row) => {
|
||||
uploadOpinionVisible.value = true;
|
||||
updateRow.value = row;
|
||||
opinion.value = '';
|
||||
};
|
||||
const onSubmitOpinion = async () => {
|
||||
// 提交外部意见
|
||||
if (opinion.value.length == 0) {
|
||||
proxy.$modal.msgError('请上传外部意见');
|
||||
return;
|
||||
}
|
||||
await updateVolumeCatalog({ ...updateRow.value });
|
||||
};
|
||||
const onUploadSuccess = (fileList, res) => {
|
||||
if (res.code == 200) {
|
||||
updateRow.value.opinion = res.data.url;
|
||||
}
|
||||
};
|
||||
const handleUpload = async (row?: any) => {
|
||||
// 判断是否有专业和设计人员
|
||||
if (!row?.principalName || !row?.specialtyName) {
|
||||
proxy?.$modal.warning('请先选择专业和设计人员');
|
||||
return;
|
||||
}
|
||||
resetUploadForm();
|
||||
uploadForm.volumeCatalogId = row.design;
|
||||
userList.value = row.noViewerList;
|
||||
|
Reference in New Issue
Block a user