| | |
| | | <el-button |
| | | :type="type" |
| | | :size="size" |
| | | icon="el-icon-view" |
| | | :disabled="row.bind != 0" |
| | | @click="handleView(row)" |
| | | >预览 |
| | | </el-button> |
| | | <el-button |
| | | :type="type" |
| | | :size="size" |
| | | :disabled="row.bind != 1" |
| | | icon="el-icon-paperclip" |
| | | @click="handlebind(row)" |
| | |
| | | <recovery v-if="bindVisible" ref="recovery" @refreshOnLoad="onLoads"></recovery> |
| | | <!-- 补打印 --> |
| | | <print v-if="printVisible" ref="print"></print> |
| | | <!-- 预览 --> |
| | | <firstView v-if="viewVisible" ref="views"></firstView> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | import addTraceability from "./addTraceability.vue"; |
| | | import recovery from "./recovery.vue"; |
| | | import print from "./print.vue"; |
| | | import firstView from "./firstView.vue"; |
| | | export default { |
| | | components: { |
| | | addTraceability, |
| | | recovery, |
| | | print |
| | | print, |
| | | firstView |
| | | }, |
| | | data() { |
| | | return { |
| | | addTraceabilityVisible: false, |
| | | bindVisible: false, |
| | | printVisible: false, |
| | | viewVisible: false, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | |
| | | this.$refs.print.init(row); |
| | | }); |
| | | }, |
| | | //预览溯源码 |
| | | handleView(row){ |
| | | this.viewVisible = true; |
| | | this.$nextTick(() => { |
| | | console.log(this.$refs,123456); |
| | | console.log(this.$refs.views,789); |
| | | this.$refs.views.init(row); |
| | | }); |
| | | }, |
| | | //新增 |
| | | rowSave(row, done, loading) { |
| | | row['farmType'] = 0; |