| | |
| | | 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( |
| | | () => { |
| | |
| | | //初始化表格数据 |
| | | initFormData(){ |
| | | var that = this; |
| | | // //获取农地数据 |
| | | // getLandList(this.userInfo.user_id).then((res)=>{ |
| | | // if(res.data.code==200){ |
| | | // var landIdcolumn = that.findObject(that.option.column,"landId"); |
| | | // that.landList = res.data.data; |
| | | // landIdcolumn.dicData = res.data.data; |
| | | // } |
| | | // }) |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.user_id).then((res)=>{ |
| | | getLandList(this.$farmId).then((res)=>{ |
| | | if(res.data.code==200){ |
| | | var landIdcolumn = that.findObject(that.option.column,"landId"); |
| | | that.landList = res.data.data; |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | params["farmId"] = this.$farmId |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |