溯源码显示页面随农场切换,添加溯源码时机构id更改为存储农场id
| | |
| | | <div style="width: 65%; float: left; font-size: 12px"> |
| | | <div style="margin-top: 5px"> |
| | | <input type="radio" v-model="radio" value="1" /> |
| | | 男不使用禁用农药兽药、停用兽药和非法添加物 |
| | | 不使用禁用农药兽药、停用兽药和非法添加物 |
| | | </div> |
| | | <div style="margin-top: 3px"> |
| | | <input type="radio" v-model="radio" value="1" /> |
| | |
| | | radio: "1", |
| | | title: "创建溯源码", |
| | | form: {}, |
| | | farm:{}, |
| | | formLabelAlign: { |
| | | productName: "", |
| | | createTime: "", |
| | |
| | | computed: { |
| | | ...mapState({ |
| | | userInfo: (state) => state.user.userInfo, |
| | | $farmId: state => state.user.$farmId, |
| | | }), |
| | | }, |
| | | methods: { |
| | |
| | | submit() { |
| | | var that = this; |
| | | that.formLabelAlign['tenantId'] = this.userInfo.tenant_id; |
| | | that.formLabelAlign['deptId'] = this.userInfo.dept_id; |
| | | that.formLabelAlign['deptId'] = this.$farmId |
| | | this.$refs["formLabelAlign"].validate((valid) => { |
| | | if (valid) { |
| | | that.formLabelAlign.createTime = |
| | |
| | | that.formLabelAlign['bind'] = '0'; |
| | | } |
| | | that.formLabelAlign['tenantId'] = this.userInfo.tenant_id; |
| | | that.formLabelAlign['deptId'] = this.userInfo.dept_id; |
| | | that.formLabelAlign['deptId'] = this.$farmId; |
| | | //新增 |
| | | save(that.formLabelAlign).then( |
| | | () => { |
| | |
| | | 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.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, |