农事记录、农资使用记录、采收记录、任务记录、农事操作的地块筛选,有列表显示的随农场变化,
| | |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/task/task/list', |
| | | url: '/api/task/task/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | //获取农地数据 |
| | | getLandList(this.$farmId).then((res) => { |
| | | if (res.data.code == 200) { |
| | | var landIdcolumn = this.findObject(this.option.column, "landId") |
| | | this.landList = res.data.data |
| | | landIdcolumn.dicData = res.data.data |
| | | } |
| | | }) |
| | | this.query={} |
| | | this.onLoad(this.page) |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.initData() |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | ...mapGetters(["permission", "userInfo","$farmId"]), |
| | | // permissionList() { |
| | | // return { |
| | | // addBtn: this.vaildData(this.permission.social_add, true), |
| | |
| | | }) |
| | | return ids.join(",") |
| | | }, |
| | | }, |
| | | }, |
| | | mounted () { |
| | | }, |
| | | methods: { |
| | |
| | | initData () { |
| | | var that = this |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.dept_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 |
| | |
| | | var datas = this.$route.query.id |
| | | params.landId = datas |
| | | params['tenantId'] = this.userInfo.tenant_id |
| | | params['deptId'] = this.userInfo.dept_id |
| | | params['farmId'] = this.$farmId |
| | | if (this.landId) { |
| | | params['landId'] = this.landId |
| | | } |
| | |
| | | this.initData() |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | ...mapGetters(["permission", "userInfo","$farmId"]), |
| | | ids () { |
| | | let ids = [] |
| | | this.selectionList.forEach((ele) => { |
| | |
| | | return ids.join(",") |
| | | }, |
| | | }, |
| | | watch:{ |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | //获取农地数据 |
| | | getLandList(this.$farmId).then((res) => { |
| | | if (res.data.code == 200) { |
| | | var landIdcolumn = this.findObject(this.option.column, "landId") |
| | | this.landList = res.data.data |
| | | landIdcolumn.dicData = res.data.data |
| | | } |
| | | }) |
| | | this.query={} |
| | | this.onLoad(this.page) |
| | | } |
| | | } |
| | | }, |
| | | mounted () { |
| | | }, |
| | | methods: { |
| | |
| | | initData () { |
| | | var that = this |
| | | //获取农地地块数据 |
| | | getLandList(this.userInfo.dept_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 |
| | | landIdcolumn.dicData = res.data.data |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | beforeOpen (done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | console.log(params) |
| | | this.loading = true |
| | | var datas = this.$route.query.id |
| | | params.landId = datas |
| | | params['tenantId'] = this.userInfo.tenant_id |
| | | params['deptId'] = this.userInfo.dept_id |
| | | params['farmId'] = this.$farmId |
| | | console.log(params) |
| | | if (this.landId) { |
| | | params['landId'] = this.landId |
| | | } |
| | |
| | | } |
| | | }, |
| | | watch: { |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | //获取农地数据 |
| | | getLandList(this.$farmId).then((res) => { |
| | | if (res.data.code == 200) { |
| | | var landIdcolumn = this.findObject(this.option.column, "landId") |
| | | this.landList = res.data.data |
| | | landIdcolumn.dicData = res.data.data |
| | | } |
| | | }) |
| | | this.query={} |
| | | this.onLoad(this.page) |
| | | } |
| | | } |
| | | // "form.farmType": { |
| | | // handler(val) { |
| | | // var splantcolumn = this.findObject(this.option.column,"plant"); |
| | |
| | | // }, |
| | | // immediate: true |
| | | // }, |
| | | |
| | | }, |
| | | mounted () { |
| | | if (this.activeName == "tab1") { |
| | |
| | | this.initData() |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | ...mapGetters(["permission", "userInfo","$farmId"]), |
| | | // permissionList() { |
| | | // return { |
| | | // addBtn: this.vaildData(this.permission.social_add, true), |
| | |
| | | initData () { |
| | | var that = this |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.dept_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 |
| | |
| | | params['landId'] = this.landId |
| | | } |
| | | params['tenantId'] = this.userInfo.tenant_id |
| | | params['deptId'] = this.userInfo.dept_id |
| | | params['farmId'] = this.$farmId |
| | | this.loading = true |
| | | getList( |
| | | page.currentPage, |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | ...mapGetters(["permission", "userInfo","$farmId"]), |
| | | // permissionList() { |
| | | // return { |
| | | // addBtn: this.vaildData(this.permission.social_add, true), |
| | |
| | | return ids.join(",") |
| | | }, |
| | | }, |
| | | watch:{ |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | //获取农地数据 |
| | | getLandList(this.$farmId).then((res) => { |
| | | if (res.data.code == 200) { |
| | | var landIdcolumn = this.findObject(this.option.column, "landId") |
| | | this.landList = res.data.data |
| | | landIdcolumn.dicData = res.data.data |
| | | } |
| | | }) |
| | | this.query={} |
| | | this.onLoad(this.page) |
| | | } |
| | | } |
| | | }, |
| | | mounted () { }, |
| | | methods: { |
| | | //初始化数据 |
| | | initData () { |
| | | var that = this |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.dept_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 |
| | |
| | | params['landId'] = this.landId |
| | | } |
| | | params['tenantId'] = this.userInfo.tenant_id |
| | | params['deptId'] = this.userInfo.dept_id |
| | | params['farmId'] = this.$farmId |
| | | this.loading = true |
| | | getList( |
| | | page.currentPage, |
| | |
| | | this.initData(); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | ...mapGetters(["permission", "userInfo","$farmId"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.task_add, false), |
| | |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | //获取农地数据 |
| | | getLandList(this.$farmId).then((res) => { |
| | | if (res.data.code == 200) { |
| | | var landIdcolumn = this.findObject(this.option.column, "landId") |
| | | this.landList = res.data.data |
| | | landIdcolumn.dicData = res.data.data |
| | | } |
| | | }) |
| | | this.query={} |
| | | this.onLoad(this.page) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | //入库 |
| | |
| | | initData() { |
| | | var that = this; |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.dept_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, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | |
| | | <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" /> |
| | |
| | | submit() { |
| | | var that = this; |
| | | that.formLabelAlign['tenantId'] = this.userInfo.tenant_id; |
| | | that.formLabelAlign['deptId'] = this.$farmId |
| | | that.formLabelAlign['deptId'] = this.$farmId; |
| | | this.$refs["formLabelAlign"].validate((valid) => { |
| | | if (valid) { |
| | | that.formLabelAlign.createTime = |
| | |
| | | // } |
| | | // }) |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.dept_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, |
| | |
| | | computed: { |
| | | ...mapState({ |
| | | userInfo: (state) => state.user.userInfo, |
| | | $farmId: state => state.user.$farmId, |
| | | }), |
| | | }, |
| | | watch: { |
| | |
| | | this.visible = true; |
| | | var that = this; |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.dept_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; |