From 1ea0d85b0fe2e7e4427fd484a9342d964c831b3d Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Wed, 06 Aug 2025 15:15:00 +0800
Subject: [PATCH] 修改
---
src/views/hazardousChemicals/traceableQuery/index.vue | 50 ++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 42 insertions(+), 8 deletions(-)
diff --git a/src/views/hazardousChemicals/traceableQuery/index.vue b/src/views/hazardousChemicals/traceableQuery/index.vue
index cd019e4..5210f24 100644
--- a/src/views/hazardousChemicals/traceableQuery/index.vue
+++ b/src/views/hazardousChemicals/traceableQuery/index.vue
@@ -1,28 +1,40 @@
<template>
- <div>
+ <div class="query">
<div style="margin-top:20px;margin-left: 20px">
<el-form :inline="true" style="display: flex;align-items: center;flex-wrap: wrap;" >
<el-form-item label="二维码编号:" >
- <el-input v-model="data.form.code" placeholder="请输入二维码编号进行搜索" clearable></el-input>
+ <el-input v-model="data.form.code" placeholder="请输入二维码编号进行搜索"></el-input>
</el-form-item>
<el-form-item >
<el-button
type="primary"
@click="getList"
>查询</el-button>
+ <el-button
+ @click="reset"
+ >重置</el-button>
</el-form-item>
- </el-form>
- <div v-if="data.form.code !=''">
+ </el-form>
+ <div style="display: flex;justify-content: center;margin-top: 20px">
+ <el-card :style="{ height: '650px' ,overflow: 'auto'}">
+ <div class="content">
+ <flow-deail ref="flowRef" v-if="data.showData"></flow-deail>
+ <el-empty description="暂无数据" style="margin-top: 10%" v-else></el-empty>
+ </div>
+ </el-card>
</div>
- <el-empty description="暂无数据" style="margin-top: 10%" v-else></el-empty>
</div>
</div>
</template>
<script setup>
-import {reactive} from "vue";
+import {nextTick, reactive, ref} from "vue";
+import flowDeail from '../../components/flowDetail.vue'
+import {getFlowByCode, getProFlow} from "@/api/hazardousChemicals/productRecord";
+import {ElMessage} from "element-plus";
+const flowRef = ref();
const data = reactive({
queryParams: {
name: '',
@@ -31,13 +43,35 @@
form: {
code: ''
},
- dataList: []
+ dataList: [],
+ showData:false
});
-const getList = () => {
+const getList = async () => {
+ if(data.form.code!=''){
+ data.showData = true
+ await nextTick(() => {
+ flowRef.value.openDialog('code',data.form.code)
+ })
+ }else {
+ ElMessage.warning('请先输入二维码编号')
+ }
+
+
+}
+const reset = () =>{
+ data.form.code = ''
+ data.showData = false
}
</script>
<style scoped lang="scss">
+.query{
+ .content{
+ width: 650px;
+ //height: 650px;
+ //border: 1px solid #c2bfbf;
+ }
+}
</style>
--
Gitblit v1.9.2