设计管理优化
This commit is contained in:
@ -35,46 +35,33 @@
|
||||
<dict-tag :options="wf_business_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5" v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['design:extract:query']">审核</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="scope.row.status === 'finish'">
|
||||
<el-button link type="primary" icon="Download" @click="handleDownload(scope.row)" v-hasPermi="['design:extract:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
link
|
||||
type="warning"
|
||||
icon="View"
|
||||
v-if="scope.row.status != 'draft'"
|
||||
v-hasPermi="['design:extract:query']"
|
||||
@click="handleViewInfo(scope.row)"
|
||||
>查看流程</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
link
|
||||
type="warning"
|
||||
icon="View"
|
||||
v-if="scope.row.status != 'draft'"
|
||||
v-hasPermi="['design:extract:query']"
|
||||
@click="handleFile(scope.row)"
|
||||
>查看文件</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['design:extract:query']">审核</el-button>
|
||||
<el-button link type="primary" icon="Download" @click="handleDownload(scope.row)" v-hasPermi="['design:extract:export']">导出</el-button
|
||||
><el-button
|
||||
link
|
||||
type="warning"
|
||||
icon="View"
|
||||
v-if="scope.row.status != 'draft'"
|
||||
v-hasPermi="['design:extract:query']"
|
||||
@click="handleViewInfo(scope.row)"
|
||||
>查看流程</el-button
|
||||
><el-button
|
||||
link
|
||||
type="warning"
|
||||
icon="View"
|
||||
v-if="scope.row.status != 'draft'"
|
||||
v-hasPermi="['design:extract:query']"
|
||||
@click="handleFile(scope.row)"
|
||||
>查看文件</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<el-dialog title="提取文件列表" v-model="viewVisible" width="500px">
|
||||
<el-dialog title="文件列表" v-model="viewVisible" width="800px">
|
||||
<el-table :loading="loadingFlie" :data="fileList" style="width: 100%" border>
|
||||
<el-table-column prop="fileName" label="文件名称" align="center">
|
||||
<template #default="scope">
|
||||
@ -89,19 +76,17 @@
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否变更" align="center" width="120">
|
||||
<el-table-column label="版本号" align="center" width="120" prop="version"> </el-table-column>
|
||||
<el-table-column label="文件类型" width="120" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.type == 1 ? 'success' : 'info'">{{ scope.row.type == 1 ? '否' : '是' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="120" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.status == 1 ? 'success' : 'info'">{{ scope.row.status == 1 ? '使用中' : '已作废' }}</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.type == 1">过程图纸</el-tag>
|
||||
<el-tag type="primary" v-if="scope.row.type == 3">蓝图</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.type == 4">作废图纸</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="170" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="success" link icon="View" @click="handleViewFile(scope.row)"> 查看 </el-button>
|
||||
<el-button type="success" v-if="viewFlie == 'finish'" link icon="View" @click="handleViewFile(scope.row)"> 查看 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -131,6 +116,7 @@ const showSearch = ref(true);
|
||||
const loading = ref(false);
|
||||
const loadingFlie = ref(false);
|
||||
const viewVisible = ref(false); //文件列表展示
|
||||
const viewFlie = ref('');
|
||||
const fileList = ref([]);
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
@ -205,10 +191,11 @@ const handleDownload = (row) => {
|
||||
);
|
||||
};
|
||||
const handleViewFile = (row) => {
|
||||
window.open(row.docUrl, '_blank');
|
||||
window.open(row.fileUrl, '_blank');
|
||||
};
|
||||
const handleFile = async (row) => {
|
||||
// 查看文件
|
||||
viewFlie.value = row.status;
|
||||
viewVisible.value = true;
|
||||
loadingFlie.value = true;
|
||||
let res = await getFileList(row.id);
|
||||
|
Reference in New Issue
Block a user