农场页面可以添加全景地址、全景管理页面添加农场显示
| | |
| | | }) |
| | | } |
| | | |
| | | export const getPage = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/panorama/panorama/page', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/panorama/panorama/detail', |
| | |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/panorama/panorama/submit', |
| | | url: '/api/panorama/panorama/save', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/panorama/panorama/submit', |
| | | url: '/api/panorama/panorama/update', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | |
| | | @row-del="rowDel" |
| | | @selection-change="selectionChange" |
| | | @refresh-change="refreshChange" |
| | | @change="change" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | |
| | | required: true, |
| | | message: "请选择省份", |
| | | trigger: "blur" |
| | | }] |
| | | }], |
| | | }, |
| | | { |
| | | label: '地市', |
| | |
| | | trigger: "blur" |
| | | }], |
| | | labelWidth: 145, |
| | | overHidden:true |
| | | overHidden:true, |
| | | }, |
| | | |
| | | { |
| | | label: "农场面积", |
| | | prop: "farmArea", |
| | |
| | | }], |
| | | }, |
| | | { |
| | | label:"360全景地址", |
| | | prop:"panoramic", |
| | | labelWidth:145, |
| | | rules:[{ |
| | | required:false, |
| | | message:"请输入地址", |
| | | trigger:"blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "介绍", |
| | | prop: "introduce", |
| | | type:"textarea", |
| | |
| | | initData(){ |
| | | getInventoryPage(this.page.currentPage,this.page.pageSize).then((res)=>{ |
| | | if(res.data.code == 200){ |
| | | console.log(res) |
| | | this.data = res.data.data.records |
| | | this.page.total = res.data.data.total |
| | | } |
| | |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/panorama/panorama"; |
| | | import {getPage} from "@/api/panorama/panorama"; |
| | | import {mapGetters} from "vuex"; |
| | | export default { |
| | | data() { |
| | |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label:"农场名", |
| | | prop:"farmId", |
| | | type:"select", |
| | | props:{ |
| | | label:"farmName", |
| | | value:"id" |
| | | }, |
| | | dicUrl: '/api/farm/getFarmList', |
| | | rules:[{ |
| | | required:true, |
| | | message:"请输入", |
| | | trigger:"blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "全景名称", |
| | | prop: "panoramaName", |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | getPage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |