diff --git a/src/views/design/drawing/DrawingTable.vue b/src/views/design/drawing/DrawingTable.vue new file mode 100644 index 0000000..093d5fe --- /dev/null +++ b/src/views/design/drawing/DrawingTable.vue @@ -0,0 +1,114 @@ + + + + + + + {{ scope.row.fileName }} + + + + + + + + + + + + 是 + 否 + + + + + + + + + + + + + + + 修改 + + + 删除 + + + + + 查看 + + + 撤销 + + + + + + + + \ No newline at end of file diff --git a/src/views/design/drawing/index.vue b/src/views/design/drawing/index.vue index af5bc1f..ba69f16 100644 --- a/src/views/design/drawing/index.vue +++ b/src/views/design/drawing/index.vue @@ -7,11 +7,11 @@ - + @@ -33,65 +33,55 @@ - 新增 + 上传图纸 - - - - - - {{ scope.row.fileName }} - - - - - - - - - - - - 是 - 否 - - - - - - - - - - - - - - - 修改 - - - 删除 - - - - - 查看 - - - 撤销 - - - - - + + + + + + + + + + + @@ -101,8 +91,9 @@ import { listDrawing, getDrawing, delDrawing, addDrawing, updateDrawing } from '@/api/design/drawing'; import { DrawingVO, DrawingQuery, DrawingForm } from '@/api/design/drawing/types'; import { useUserStoreHook } from '@/store/modules/user'; -import { LeaveVO } from '@/api/workflow/leave/types'; +import { LeaveVO } from '@/api/workflow/leave/types'; import { cancelProcessApply } from '@/api/workflow/instance'; +import DrawingTable from './DrawingTable.vue'; // 获取用户 store const userStore = useUserStoreHook(); @@ -110,6 +101,8 @@ const userStore = useUserStoreHook(); const currentProject = computed(() => userStore.selectedProject); const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { drawing_file_type, wf_business_status } = toRefs(proxy?.useDict('drawing_file_type', 'wf_business_status')); +console.log(drawing_file_type); + const drawingList = ref([]); const loading = ref(true); const showSearch = ref(true); @@ -121,6 +114,7 @@ const fileList = ref([]); // 存储上传的文件列表 const selectedFile = ref(null); // 当前选中的文件 const queryFormRef = ref(); const drawingFormRef = ref(); +const activeName = ref('1'); const dialog = reactive({ visible: false, title: '', @@ -235,7 +229,7 @@ const handleUpdate = async (row?: DrawingVO) => { proxy.$router.push({ path: `/workflow/drawing/indexEdit`, query: { - id: row.id, + id: row.id, type: 'update' } }); @@ -249,10 +243,12 @@ const handleDelete = async (row?: DrawingVO) => { proxy?.$modal.msgSuccess('删除成功'); await getList(); }; + const handleView = (row) => { - var url= row.file.url + var url = row.file.url; window.open(url, '_blank'); }; + /** 查看按钮操作 */ const handleViewInfo = (row?: LeaveVO) => { proxy.$tab.closePage(proxy.$route); @@ -264,6 +260,7 @@ const handleViewInfo = (row?: LeaveVO) => { } }); }; + /** 撤销按钮操作 */ const handleCancelProcessApply = async (id: string) => { await proxy?.$modal.confirm('是否确认撤销当前单据?'); @@ -276,7 +273,14 @@ const handleCancelProcessApply = async (id: string) => { await getList(); proxy?.$modal.msgSuccess('撤销成功'); }; + +const handleClick = (val) => { + queryParams.value.pageNum = 1; + queryParams.value.fileType = val.props.name; + getList(); +}; + onMounted(() => { getList(); }); - + \ No newline at end of file diff --git a/src/views/design/drawing/indexEdit.vue b/src/views/design/drawing/indexEdit.vue index b859f0a..0b1613a 100644 --- a/src/views/design/drawing/indexEdit.vue +++ b/src/views/design/drawing/indexEdit.vue @@ -1,54 +1,86 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -