| | |
| | | <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"> |
| | | <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> |
| | | </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: '', |
| | |
| | | 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{ |
| | | margin-top: 40px; |
| | | width: 650px; |
| | | height: 650px; |
| | | border: 1px solid black; |
| | | overflow-y: scroll; |
| | | } |
| | | } |
| | | </style> |