| | |
| | | :size="size" |
| | | icon="el-icon-view" |
| | | :disabled="row.bind != 0" |
| | | @click="handleViewCode(row)" |
| | | >二维码 |
| | | </el-button> |
| | | <el-button |
| | | :type="type" |
| | | :size="size" |
| | | icon="el-icon-view" |
| | | :disabled="row.bind != 0" |
| | | @click="handleView(row)" |
| | | >预览 |
| | | </el-button> |
| | |
| | | option: { |
| | | tip: false, |
| | | height: "auto", |
| | | menuWidth: 280, |
| | | menuWidth: 320, |
| | | menuAlign: "center", |
| | | align: "center", |
| | | selection: true, |
| | |
| | | addBtn:false, |
| | | editBtn:false, |
| | | delBtn:false, |
| | | refreshBtn:false, |
| | | columnBtn:false, |
| | | searchShowBtn:false, |
| | | column: [ |
| | | { |
| | | label: "产品名称", |
| | |
| | | created() { |
| | | this.initData(); |
| | | }, |
| | | watch: { |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | this.query={} |
| | | this.onLoad(this.page) |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | ...mapGetters(["permission", "userInfo","$farmId"]), |
| | | // permissionList() { |
| | | // return { |
| | | // addBtn: this.vaildData(this.permission.social_add, true), |
| | |
| | | this.$refs.print.init(row); |
| | | }); |
| | | }, |
| | | //预览溯源码 |
| | | handleView(row){ |
| | | //查看二维码 |
| | | handleViewCode(row){ |
| | | this.viewVisible = true; |
| | | this.$nextTick(() => { |
| | | console.log(this.$refs,123456); |
| | | console.log(this.$refs.views,789); |
| | | this.$refs.views.init(row); |
| | | }); |
| | | }, |
| | | //预览溯源码详情信息 |
| | | handleView(row){ |
| | | this.$router.push({ |
| | | path: `/traceability/details`, |
| | | query: row |
| | | }); |
| | | }, |
| | | //新增 |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoads(){ |
| | | this.onLoad(this.page, this.query); |
| | | // this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params['tenantId'] = this.userInfo.tenant_id; |
| | | params['deptId'] = this.userInfo.dept_id; |
| | | params.deptId = this.$farmId |
| | | this.loading = true; |
| | | getList( |
| | | page.currentPage, |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | <style > |
| | | </style> |