14 files modified
6 files added
| | |
| | | <html> |
| | | |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta http-equiv="X-UA-Compatible" content="chrome=1" /> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"> |
| | | <meta name="apple-mobile-web-app-capable" content="yes"> |
| | | <meta name="apple-mobile-web-app-status-bar-style" content="black"> |
| | | <meta name="format-detection" content="telephone=no"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/element-ui/2.15.6/theme-chalk/index.css"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/index.css"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/avue/iconfont.css"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/saber/iconfont.css"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.9.5/index.css"> |
| | | <script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script> |
| | | <script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta http-equiv="X-UA-Compatible" content="chrome=1"/> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"> |
| | | <meta name="apple-mobile-web-app-capable" content="yes"> |
| | | <meta name="apple-mobile-web-app-status-bar-style" content="black"> |
| | | <meta name="format-detection" content="telephone=no"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/element-ui/2.15.6/theme-chalk/index.css"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/index.css"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/avue/iconfont.css"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/saber/iconfont.css"> |
| | | <link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.9.5/index.css"> |
| | | <script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script> |
| | | <script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script> |
| | | |
| | | <!-- 地图 --> |
| | | <script type="text/javascript" src="js/jquery.min.js"></script> |
| | | <script src="libs/Cesium/Cesium.js"></script> |
| | | <script type="text/javascript" src="js/drawTree.js"></script> |
| | | <!-- 地图 --> |
| | | <script type="text/javascript" src="js/jquery.min.js"></script> |
| | | <script src="libs/Cesium/Cesium.js"></script> |
| | | <script type="text/javascript" src="js/drawTree.js"></script> |
| | | <!-- Avue地图选点 --> |
| | | <script type="text/javascript" |
| | | src='https://webapi.amap.com/maps?v=1.4.11&key=7ab53b28352e55dc5754699add0ad862&plugin=AMap.PlaceSearch'></script> |
| | | <script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script> |
| | | <script src="https://cdn.staticfile.org/FileSaver.js/2014-11-29/FileSaver.min.js"></script> |
| | | <script src="https://cdn.staticfile.org/xlsx/0.18.2/xlsx.full.min.js"></script> |
| | | <link rel="icon" href="<%= BASE_URL %>favicon.png"> |
| | | <title>智慧农业综合管理平台</title> |
| | | <style> |
| | | html, |
| | | body, |
| | | #app { |
| | | height: 100%; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | <link rel="icon" href="<%= BASE_URL %>favicon.png"> |
| | | <title>智慧农业综合管理平台</title> |
| | | <style> |
| | | html, |
| | | body, |
| | | #app { |
| | | height: 100%; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | .avue-home { |
| | | background-color: #303133; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .avue-home { |
| | | background-color: #303133; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | .avue-home__main { |
| | | user-select: none; |
| | | width: 100%; |
| | | flex-grow: 1; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .avue-home__main { |
| | | user-select: none; |
| | | width: 100%; |
| | | flex-grow: 1; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | } |
| | | .avue-home__footer { |
| | | width: 100%; |
| | | flex-grow: 0; |
| | | text-align: center; |
| | | padding: 1em 0; |
| | | } |
| | | |
| | | .avue-home__footer { |
| | | width: 100%; |
| | | flex-grow: 0; |
| | | text-align: center; |
| | | padding: 1em 0; |
| | | } |
| | | .avue-home__footer > a { |
| | | font-size: 12px; |
| | | color: #ABABAB; |
| | | text-decoration: none; |
| | | } |
| | | |
| | | .avue-home__footer>a { |
| | | font-size: 12px; |
| | | color: #ABABAB; |
| | | text-decoration: none; |
| | | } |
| | | .avue-home__loading { |
| | | height: 32px; |
| | | width: 32px; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .avue-home__loading { |
| | | height: 32px; |
| | | width: 32px; |
| | | margin-bottom: 20px; |
| | | } |
| | | .avue-home__title { |
| | | color: #FFF; |
| | | font-size: 14px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .avue-home__title { |
| | | color: #FFF; |
| | | font-size: 14px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .avue-home__sub-title { |
| | | color: #ABABAB; |
| | | font-size: 12px; |
| | | } |
| | | </style> |
| | | .avue-home__sub-title { |
| | | color: #ABABAB; |
| | | font-size: 12px; |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <noscript> |
| | | <noscript> |
| | | <strong> |
| | | 很抱歉,如果没有 JavaScript 支持,Saber 将不能正常工作。请启用浏览器的 JavaScript 然后继续。 |
| | | </strong> |
| | | </noscript> |
| | | <div id="app"> |
| | | <div class="avue-home"> |
| | | <div class="avue-home__main"> |
| | | <img class="avue-home__loading" src="<%= BASE_URL %>svg/loading-spin.svg" alt="loading"> |
| | | <div class="avue-home__title"> |
| | | 正在加载资源 |
| | | </div> |
| | | <div class="avue-home__sub-title d"> |
| | | 初次加载资源可能需要较多时间 请耐心等待 |
| | | </div> |
| | | </div> |
| | | <div class="avue-home__footer"> |
| | | <a href="https://bladex.vip" target="_blank"> |
| | | https://bladex.vip </a> |
| | | </div> |
| | | </div> |
| | | <div id="app"> |
| | | <div class="avue-home"> |
| | | <div class="avue-home__main"> |
| | | <img class="avue-home__loading" src="<%= BASE_URL %>svg/loading-spin.svg" alt="loading"> |
| | | <div class="avue-home__title"> |
| | | 正在加载资源 |
| | | </div> |
| | | <div class="avue-home__sub-title d"> |
| | | 初次加载资源可能需要较多时间 请耐心等待 |
| | | </div> |
| | | </div> |
| | | <!-- built files will be auto injected --> |
| | | <script src="<%= BASE_URL %>util/aes.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/vue/2.6.10/vue.min.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/vuex/3.1.1/vuex.min.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/vue-router/3.0.1/vue-router.min.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/axios/1.0.0/axios.min.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/element-ui/2.15.6/index.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/avue/2.9.5/avue.min.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/nutflow/wf-design-base/index.umd.min.js" charset="utf-8"></script> |
| | | <div class="avue-home__footer"> |
| | | <a href="https://bladex.vip" target="_blank"> |
| | | https://bladex.vip </a> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- built files will be auto injected --> |
| | | <script src="<%= BASE_URL %>util/aes.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/vue/2.6.10/vue.min.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/vuex/3.1.1/vuex.min.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/vue-router/3.0.1/vue-router.min.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/axios/1.0.0/axios.min.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/element-ui/2.15.6/index.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/avue/2.9.5/avue.min.js" charset="utf-8"></script> |
| | | <script src="<%= BASE_URL %>cdn/nutflow/wf-design-base/index.umd.min.js" charset="utf-8"></script> |
| | | </body> |
| | | |
| | | </html> |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/machining/machining/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/machining/machining/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/machining/machining/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/machining/machining/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/machining/machining/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/sale/sale/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/sale/sale/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/sale/sale/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/sale/sale/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/sale/sale/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | |
| | | data: row |
| | | }) |
| | | } |
| | | export const pagenum = (row) => { |
| | | export const pagenum = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/stock/stock/pagenum', |
| | | method: 'post', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | export const StockCount = (row) => { |
| | | return request({ |
| | | url: '/api/stock/stock/StockCount', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| New file |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (current, size, params) => { |
| | | return request({ |
| | | url: '/api/task/task/list', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getDetail = (id) => { |
| | | return request({ |
| | | url: '/api/task/task/detail', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/task/task/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const add = (row) => { |
| | | return request({ |
| | | url: '/api/task/task/save', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/task/task/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | |
| | | // 阿里矢量图标库配置 |
| | | let iconfontVersion = ['567566_pwc3oottzol','1653398_nw8h5egzn2']; |
| | | let iconfontVersion = ['567566_pwc3oottzol','1653398_nw8h5egzn2','1653398_2si2rf9nb8w','1653398_a5j8xupowom','1653398_x47clmaqqfs']; |
| | | let iconfontUrl = `//at.alicdn.com/t/font_$key.css`; |
| | | |
| | | let baseUrl = ''; |
| | |
| | | "iconfont iconicon_add", |
| | | "iconfont icongithub", |
| | | "iconfont icongitee2", |
| | | "iconfont icona-baohuguotukongjianzonghezhengzhi" |
| | | "iconfont icona-baohuguotukongjianzonghezhengzhi", |
| | | "iconfont iconkucun", |
| | | "iconfont iconnongziguanli", |
| | | "iconfont icontongji" |
| | | ] |
| | | }, |
| | | { |
| | |
| | | import Layout from '@/page/index/' |
| | | |
| | | export default [{ |
| | | path: '/wel', |
| | | component: Layout, |
| | | redirect: '/wel/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '首页', |
| | | meta: { |
| | | i18n: 'dashboard' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/wel/index') |
| | | }, { |
| | | path: 'dashboard', |
| | | name: '控制台', |
| | | meta: { |
| | | i18n: 'dashboard', |
| | | menu: false, |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/wel/dashboard') |
| | | }] |
| | | path: '/wel', |
| | | component: Layout, |
| | | redirect: '/wel/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '首页', |
| | | meta: { |
| | | i18n: 'dashboard' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/wel/index') |
| | | }, { |
| | | path: 'dashboard', |
| | | name: '控制台', |
| | | meta: { |
| | | i18n: 'dashboard', |
| | | menu: false, |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/wel/dashboard') |
| | | }] |
| | | }, { |
| | | path: '/test', |
| | | component: Layout, |
| | | redirect: '/test/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '测试页', |
| | | meta: { |
| | | i18n: 'test' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/util/test') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/framing', |
| | | redirect: '/farmplant/farmplant', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'index', |
| | | name: '农事操作', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/farm/farmPaper') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/stockrecord', |
| | | redirect: '/stockrecord/stockrecord', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'stockrecord', |
| | | name: '农资记录', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/stockrecord/stockrecord') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/farmingrecord', |
| | | redirect: '/farm/farmingrecord', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'farmingrecord', |
| | | name: '农事记录', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/farm/farmingrecord') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/soldrecord', |
| | | redirect: '/soldrecord/soldrecord', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'soldrecord', |
| | | name: '已出库待使用农资', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/soldrecord/soldrecord') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/farmDetail', |
| | | redirect: '/wel/farmDetail', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/farmDetail', |
| | | name: '操作记录', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/wel/farmDetail') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/LandDetail', |
| | | redirect: '/land/LandDetail', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/LandDetail', |
| | | name: '地块详情', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/land/LandDetail') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/stockout', |
| | | redirect: '/stock/stockout', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/stockout', |
| | | name: '已出资待使用农资', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/stock/stockout') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/landMap', |
| | | redirect: '/land/landMap', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/landMap', |
| | | name: '地块位置', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/land/landMap') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/recovery', |
| | | redirect: '/recovery/recovery', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'recovery', |
| | | name: '采收记录', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/recovery/recovery') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/dict-horizontal', |
| | | component: Layout, |
| | | redirect: '/dict-horizontal/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '字典管理', |
| | | meta: { |
| | | i18n: 'dict' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal') |
| | | }] |
| | | }, { |
| | | path: '/dict-vertical', |
| | | component: Layout, |
| | | redirect: '/dict-vertical/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '字典管理', |
| | | meta: { |
| | | i18n: 'dict' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/land', |
| | | component: Layout, |
| | | redirect: '/land/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '地块管理', |
| | | meta: { |
| | | i18n: 'land' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/land/cs') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/task', |
| | | component: Layout, |
| | | redirect: '/task/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '任务管理', |
| | | meta: { |
| | | i18n: 'task' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/task/task') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/farmproductstock', |
| | | component: Layout, |
| | | redirect: '/farmproductstock/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '农产品库存管理', |
| | | meta: { |
| | | i18n: 'farmproductstock' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/farmplant/farmproductstock') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/stockmanage', |
| | | component: Layout, |
| | | redirect: '/stockmanage/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '农资库存管理', |
| | | meta: { |
| | | i18n: 'stockmanage' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/stock/stockmanage') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/statistics', |
| | | component: Layout, |
| | | redirect: '/statistics/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '数据统计', |
| | | meta: { |
| | | i18n: 'statistics' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/statistics/statistics') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/traceability', |
| | | component: Layout, |
| | | redirect: '/traceability/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '溯源码管理', |
| | | meta: { |
| | | i18n: 'traceability' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/traceability/traceability') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/info', |
| | | component: Layout, |
| | | redirect: '/info/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '个人信息', |
| | | meta: { |
| | | i18n: 'info' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/system/userinfo') |
| | | }] |
| | | }, { |
| | | path: '/work/process/leave', |
| | | component: Layout, |
| | | redirect: '/work/process/leave/form', |
| | | children: [{ |
| | | path: 'form/:processDefinitionId', |
| | | name: '请假流程', |
| | | meta: { |
| | | i18n: 'work' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/form') |
| | | }, { |
| | | path: '/test', |
| | | component: Layout, |
| | | redirect: '/test/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '测试页', |
| | | meta: { |
| | | i18n: 'test' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/util/test') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/framing', |
| | | redirect: '/farmplant/farmplant', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'index', |
| | | name: '农事操作', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/farm/farmPaper') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/stockrecord', |
| | | redirect: '/stockrecord/stockrecord', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'stockrecord', |
| | | name: '农资记录', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/stockrecord/stockrecord') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/farmingrecord', |
| | | redirect: '/farm/farmingrecord', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'farmingrecord', |
| | | name: '农事记录', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/farm/farmingrecord') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/soldrecord', |
| | | redirect: '/soldrecord/soldrecord', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'soldrecord', |
| | | name: '已出库待使用农资', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/soldrecord/soldrecord') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/farmDetail', |
| | | redirect: '/wel/farmDetail', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/farmDetail', |
| | | name: '操作记录', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/wel/farmDetail') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/LandDetail', |
| | | redirect: '/land/LandDetail', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/LandDetail', |
| | | name: '地块详情', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/land/LandDetail') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/stockout', |
| | | redirect: '/stock/stockout', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/stockout', |
| | | name: '已出资待使用农资', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/stock/stockout') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/landMap', |
| | | redirect: '/land/landMap', |
| | | component: Layout, |
| | | children: [{ |
| | | path: '/landMap', |
| | | name: '地块位置', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/land/landMap') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/recovery', |
| | | redirect: '/recovery/recovery', |
| | | component: Layout, |
| | | children: [{ |
| | | path: 'recovery', |
| | | name: '采收记录', |
| | | meta: { |
| | | i18n: 'index', |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/recovery/recovery') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/dict-horizontal', |
| | | component: Layout, |
| | | redirect: '/dict-horizontal/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '字典管理', |
| | | meta: { |
| | | i18n: 'dict' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal') |
| | | }] |
| | | path: 'handle/:taskId/:processInstanceId/:businessId', |
| | | name: '处理请假流程', |
| | | meta: { |
| | | i18n: 'work' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle') |
| | | }, { |
| | | path: '/dict-vertical', |
| | | component: Layout, |
| | | redirect: '/dict-vertical/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '字典管理', |
| | | meta: { |
| | | i18n: 'dict' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/land', |
| | | component: Layout, |
| | | redirect: '/land/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '地块管理', |
| | | meta: { |
| | | i18n: 'land' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/land/cs') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/farmproductstock', |
| | | component: Layout, |
| | | redirect: '/farmproductstock/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '农产品库存管理', |
| | | meta: { |
| | | i18n: 'farmproductstock' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/farmplant/farmproductstock') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/stockmanage', |
| | | component: Layout, |
| | | redirect: '/stockmanage/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '农资库存管理', |
| | | meta: { |
| | | i18n: 'stockmanage' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/stock/stockmanage') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/statistics', |
| | | component: Layout, |
| | | redirect: '/statistics/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '数据统计', |
| | | meta: { |
| | | i18n: 'statistics' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/statistics/statistics') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/traceability', |
| | | component: Layout, |
| | | redirect: '/traceability/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '溯源码管理', |
| | | meta: { |
| | | i18n: 'traceability' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/traceability/traceability') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/info', |
| | | component: Layout, |
| | | redirect: '/info/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '个人信息', |
| | | meta: { |
| | | i18n: 'info' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/system/userinfo') |
| | | }] |
| | | }, { |
| | | path: '/work/process/leave', |
| | | component: Layout, |
| | | redirect: '/work/process/leave/form', |
| | | children: [{ |
| | | path: 'form/:processDefinitionId', |
| | | name: '请假流程', |
| | | meta: { |
| | | i18n: 'work' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/form') |
| | | }, { |
| | | path: 'handle/:taskId/:processInstanceId/:businessId', |
| | | name: '处理请假流程', |
| | | meta: { |
| | | i18n: 'work' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle') |
| | | }, { |
| | | path: 'detail/:processInstanceId/:businessId', |
| | | name: '请假流程详情', |
| | | meta: { |
| | | i18n: 'work' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/farm', |
| | | component: Layout, |
| | | redirect: '/farm/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '农场信息管理', |
| | | meta: { |
| | | i18n: 'farm' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/farm/farm') |
| | | }] |
| | | }, |
| | | ] |
| | | path: 'detail/:processInstanceId/:businessId', |
| | | name: '请假流程详情', |
| | | meta: { |
| | | i18n: 'work' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail') |
| | | }] |
| | | }, |
| | | { |
| | | path: '/farm', |
| | | component: Layout, |
| | | redirect: '/farm/index', |
| | | children: [{ |
| | | path: 'index', |
| | | name: '农场信息管理', |
| | | meta: { |
| | | i18n: 'farm' |
| | | }, |
| | | component: () => |
| | | import ( /* webpackChunkName: "views" */ '@/views/farm/farm') |
| | | }] |
| | | }, |
| | | ] |
| | |
| | | <div class="ln">{{ dic }}</div> |
| | | </div> |
| | | <div class="dc">占地面积:{{ landArea }}{{ dica }}</div> |
| | | <div class="dck">所属农场:{{ deptname }}</div> |
| | | </div> |
| | | <div class="dv"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | |
| | | activeName: "tab1", |
| | | url: "", |
| | | dica: "", |
| | | deptname: "", |
| | | landArea: "", |
| | | dic: "", |
| | | formC: {}, |
| | |
| | | this.dic = this.$route.query.dic; |
| | | this.landArea = this.$route.query.landArea; |
| | | this.dica = this.$route.query.dica; |
| | | this.deptname = this.$route.query.deptname; |
| | | this.form = res.data.data; |
| | | let usePolygons = this.$route.query.landRange |
| | | .split("POLYGON((")[1] |
| | |
| | | margin-left: 340px; |
| | | width: 175px; |
| | | } |
| | | .dck { |
| | | width: 151px; |
| | | margin-left: 340px; |
| | | width: 175px; |
| | | } |
| | | |
| | | .landimg { |
| | | width: 200px; |
| | |
| | | keyword: "", |
| | | }, |
| | | query: {}, |
| | | value:false, |
| | | farmingCount:0, |
| | | landVisible: false, |
| | | farmPlanList: [], |
| | |
| | | margin-top: -25px; |
| | | } |
| | | .el-page { |
| | | background-color: black; |
| | | padding-top: 30px; |
| | | text-align: center; |
| | | } |
| | | } |
| | |
| | | <script> |
| | | |
| | | import {mapGetters} from "vuex"; |
| | | import { getLandList } from "@/api/land/land"; |
| | | import { getStrainList } from "@/api/farmplant/strain"; |
| | | import {getDeptTree} from "@/api/system/dept"; |
| | | import {add} from "@/api/land/land"; |
| | | import website from '@/config/website'; |
| | | import getMapDataInThere from "./getMapDataInThere.vue"; |
| | | |
| | | export default { |
| | | components: { |
| | | getMapDataInThere |
| | | }, |
| | | data() { |
| | | return { |
| | | title:"新增地块", |
| | | title: "新增地块", |
| | | form: {}, |
| | | option: { |
| | | emptyBtn: false, |
| | |
| | | required: true, |
| | | message: "请输入地块名称", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "所属农场", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | dicData: [], |
| | | props: { |
| | | label: "title" |
| | | }, |
| | | slot: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属农场", |
| | | trigger: "click" |
| | | }] |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: "面积单位", |
| | | prop: "landUnit", |
| | | value: "0", |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=landunit", |
| | | props: { |
| | |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission", "polygons"]), |
| | | }, |
| | | mounted() { |
| | | this.initData(this.userInfo.tenant_id); |
| | | }, |
| | | methods: { |
| | | initData(tenantId) { |
| | | getDeptTree(tenantId).then(res => { console.log(res) |
| | | |
| | | const column = this.findObject(this.option.column, "deptId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | }, |
| | | //初始化 |
| | | init() { |
| | | //计算当前时间 |
| | | this.visible = true; |
| | | }, |
| | | // 表单提交 |
| | | submit(row,loading) { |
| | | submit(row, loading) { |
| | | var that = this; |
| | | if (this.polygons.length == 0) { |
| | | //没有面的数据 |
| | |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | window.console.log(error); |
| New file |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.machining_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | <el-button type="success" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-upload2" |
| | | @click="handleImport">导入 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="用户数据导入" |
| | | append-to-body |
| | | :visible.sync="excelBox" |
| | | width="555px"> |
| | | <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
| | | <template slot="excelTemplate"> |
| | | <el-button type="primary" @click="handleTemplate"> |
| | | 点击下载<i class="el-icon-download el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </avue-form> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/machining/machining"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | excelBox: false, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | selectionList: [], |
| | | excelOption: { |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | column: [ |
| | | { |
| | | label: '模板上传', |
| | | prop: 'excelFile', |
| | | type: 'upload', |
| | | drag: true, |
| | | loadText: '模板上传中,请稍等', |
| | | span: 24, |
| | | propsHttp: { |
| | | res: 'data' |
| | | }, |
| | | tip: '请上传 .xls,.xlsx 标准格式文件', |
| | | action: "/api/blade-user/import-user" |
| | | }, |
| | | { |
| | | label: "数据覆盖", |
| | | prop: "isCovered", |
| | | type: "switch", |
| | | align: "center", |
| | | width: 80, |
| | | dicData: [ |
| | | { |
| | | label: "否", |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: "是", |
| | | value: 1 |
| | | } |
| | | ], |
| | | value: 0, |
| | | slot: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请选择是否覆盖", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: '模板下载', |
| | | prop: 'excelTemplate', |
| | | formslot: true, |
| | | span: 24, |
| | | } |
| | | ] |
| | | }, |
| | | option: { |
| | | excelBtn: true, |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | menuAlign: "center", |
| | | align: "center", |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "加工类型", |
| | | prop: "machiningType", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入加工类型", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "加工原料", |
| | | prop: "machiningYl", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入加工原料", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "图片", |
| | | type: "upload", |
| | | prop: "machiningTp", |
| | | listType: "picture-img", |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "url", |
| | | }, |
| | | canvasOption: { |
| | | text: " ", |
| | | ratio: 1.0, |
| | | }, |
| | | action: "/api/blade-resource/oss/endpoint/put-files", |
| | | tip: "", |
| | | span: 24, |
| | | labelWidth: 110, |
| | | }, |
| | | { |
| | | label: "更新时间", |
| | | prop: "updateTime", |
| | | addDisplay: false, |
| | | viewDisplay: false, |
| | | editDisplay: false, |
| | | }, |
| | | { |
| | | label: "备注", |
| | | prop: "remarks", |
| | | span: 24, |
| | | type: "textarea", |
| | | }, |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.machining_add, false), |
| | | viewBtn: this.vaildData(this.permission.machining_view, false), |
| | | delBtn: this.vaildData(this.permission.machining_delete, false), |
| | | editBtn: this.vaildData(this.permission.machining_edit, false) |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(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; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | | window.console.log(column); |
| | | this.excelBox = false; |
| | | this.refreshChange(); |
| | | done(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.sale_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/sale/sale"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height:'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "品种id", |
| | | prop: "strainId", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入品种id", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "销售时间", |
| | | prop: "saleTime", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入销售时间", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "销售数量", |
| | | prop: "saleNum", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入销售数量", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "销售去向", |
| | | prop: "saleDestination", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入销售去向", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "具体销售去向", |
| | | prop: "saleDestination1", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入具体销售去向", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "销售价格", |
| | | prop: "salePrice", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入销售价格", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | ] |
| | | }, |
| | | data: [] |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.sale_add, false), |
| | | viewBtn: this.vaildData(this.permission.sale_view, false), |
| | | delBtn: this.vaildData(this.permission.sale_delete, false), |
| | | editBtn: this.vaildData(this.permission.sale_edit, false) |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage){ |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize){ |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(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; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | var myDate = new Date(); |
| | | var year = myDate.getFullYear(); |
| | | //获取当前月份(0-11,0代表1月,所以要加1); |
| | | var month = myDate.getMonth() + 1; |
| | | var month = myDate.getMonth() + 1; |
| | | //获取当前日(1-31) |
| | | var day = myDate.getDate(); |
| | | var day = myDate.getDate(); |
| | | if (month < 10) { |
| | | month = "0" + month; |
| | | } |
| | |
| | | var myDate = new Date(); |
| | | var year = myDate.getFullYear(); |
| | | //获取当前月份(0-11,0代表1月,所以要加1); |
| | | var month = myDate.getMonth() + 1; |
| | | var month = myDate.getMonth() + 1; |
| | | //获取当前日(1-31) |
| | | var day = myDate.getDate(); |
| | | var day = myDate.getDate(); |
| | | if (month < 10) { |
| | | month = "0" + month; |
| | | } |
| | |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | :summary-method="getSummaries" |
| | | v-model="form" |
| | |
| | | , |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | } |
| | | , |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | const {releaseTimeRange} = this.query; |
| | |
| | | , |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | var datas = this.$route.query.sid; |
| | | var type = this.$route.query.type; |
| | | params.sid=datas; |
| | | params.stype=type; |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | var datas = this.$route.query.sid; |
| | | console.log(datas) |
| | | params.sid=datas; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| New file |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.task_delete" |
| | | @click="handleDelete">删 除 |
| | | </el-button> |
| | | </template> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | icon="el-icon-circle-plus-outline" |
| | | @click="chuli(row)" |
| | | :size="size" |
| | | :type="type" |
| | | >处理 |
| | | </el-button |
| | | > |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog |
| | | title="任务处理" |
| | | :visible.sync="gradeBoxVisiblechuli" |
| | | width="width" |
| | | :modal="true" |
| | | :modal-append-to-body="true" |
| | | :append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :before-close="dialogBeforeClose" |
| | | > |
| | | <div> |
| | | <avue-form |
| | | ref="formchuli" |
| | | :option="optionchuli" |
| | | v-model="formchuli" |
| | | @reset-change="emptytChange" |
| | | @submit="submitR" |
| | | > |
| | | </avue-form> |
| | | </div> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/task/task"; |
| | | import {mapGetters} from "vuex"; |
| | | import {getLandList} from "@/api/land/land"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | formchuli: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | selectionList: [], |
| | | landList: [], |
| | | option: { |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | align: "center", |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | gradeBoxVisible: false, |
| | | column: [ |
| | | { |
| | | label: "任务名称", |
| | | prop: "taskName", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入任务名称", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "地块", |
| | | prop: "landId", |
| | | type: "tree", |
| | | hide: true, |
| | | dicData: [], |
| | | props: { |
| | | label: "landName", |
| | | value: "id" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入地块", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "截止时间", |
| | | prop: "time", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入截止时间", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "负责人", |
| | | prop: "taskUser", |
| | | type: "tree", |
| | | dicUrl: `/api/blade-user/user-list`, |
| | | props: { |
| | | label: "account", |
| | | value: "id" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入负责人", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "拍照照片", |
| | | prop: "type", |
| | | span: 6, |
| | | type: "switch", |
| | | dicData: [{ |
| | | label: '开启', |
| | | value: 0 |
| | | }, { |
| | | label: '关闭', |
| | | value: 1 |
| | | }], |
| | | mock: { |
| | | type: 'dic' |
| | | }, |
| | | hide: true, |
| | | row: true, |
| | | }, |
| | | { |
| | | label: "任务说明", |
| | | prop: "taskExplain", |
| | | type: "textarea", |
| | | span: 23, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入任务说明", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "任务状态", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | prop: "status", |
| | | dicData: [ |
| | | { |
| | | label: "已完成", |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: "处理中", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "待处理", |
| | | value: 2 |
| | | } |
| | | ], |
| | | span: 23, |
| | | }, |
| | | { |
| | | label: "备注", |
| | | hide:true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | prop: "remark", |
| | | type: "textarea", |
| | | span: 23, |
| | | }, |
| | | { |
| | | label: "图片", |
| | | hide:true, |
| | | prop: "tp", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入图片", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "农事操作", |
| | | hide:true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | prop: "farm", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入农事操作", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | ] |
| | | }, |
| | | optionchuli: { |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "农资", |
| | | prop: "stockId1", |
| | | span: 23, |
| | | type: "select", |
| | | disabled: true, |
| | | dicUrl: "/api/stockfactory/stockfactory/selectStockFa", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入农资", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "规格", |
| | | disabled: true, |
| | | span: 6, |
| | | prop: "spn", |
| | | addDisplay: false, |
| | | }, |
| | | { |
| | | label: "规格", |
| | | display: false, |
| | | hide: true, |
| | | prop: "specs1", |
| | | span: 5, |
| | | viewDisplay: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入规格", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "规格值1", |
| | | display: false, |
| | | hide: true, |
| | | prop: "specsVal1", |
| | | searchSpan: 4, |
| | | span: 6, |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockSpecs1", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "类型", |
| | | display: false, |
| | | hide: true, |
| | | prop: "stockType1", |
| | | }, |
| | | { |
| | | label: "规格值2", |
| | | display: false, |
| | | hide: true, |
| | | prop: "specsVal2", |
| | | searchSpan: 4, |
| | | span: 6, |
| | | type: "select", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockSpecs2", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "当前库存", |
| | | disabled: true, |
| | | span: 6, |
| | | prop: "num", |
| | | }, |
| | | { |
| | | label: "入库数量", |
| | | type: "number", |
| | | span: 11, |
| | | prop: "amount1", |
| | | }, |
| | | { |
| | | label: "入库类型", |
| | | prop: "type1", |
| | | type: "select", |
| | | span: 12, |
| | | searchSpan: 4, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=stockPurchase", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入入库类型", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "入库时间", |
| | | prop: "time1", |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | span: 11, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入入库时间", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "单据、凭证照片", |
| | | prop: "picture1", |
| | | type: "upload", |
| | | labelWidth: 145, |
| | | dataType: "string", |
| | | span: 24, |
| | | limit: 5, |
| | | listType: "picture-card", |
| | | tip: "建议上传手机横屏拍摄的照片,宽高比16:9,最多上传5张", |
| | | canvasOption: { |
| | | text: "", |
| | | ratio: 1.0, |
| | | }, |
| | | propsHttp: { |
| | | res: "data", |
| | | url: "url" |
| | | }, |
| | | action: "/api/blade-resource/oss/endpoint/put-files" |
| | | }, |
| | | { |
| | | label: "备注", |
| | | type: "textarea", |
| | | prop: "remarks1", |
| | | span: 23, |
| | | }, |
| | | ] |
| | | }, |
| | | gradeBoxVisiblechuli:false, |
| | | data: [] |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initData(); |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.task_add, false), |
| | | viewBtn: this.vaildData(this.permission.task_view, false), |
| | | delBtn: this.vaildData(this.permission.task_delete, false), |
| | | editBtn: this.vaildData(this.permission.task_edit, false) |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | } |
| | | }, |
| | | methods: { |
| | | //入库 |
| | | submitR(row, done, loading) { |
| | | that.gradeBoxVisible = false; |
| | | // var that = this; |
| | | // add1(row).then( |
| | | // () => { |
| | | // that.onLoad(this.page); |
| | | // that.$refs.formR.resetFields(); |
| | | // that.$message({ |
| | | // type: "success", |
| | | // message: "操作成功!" |
| | | // }); |
| | | // that.gradeBoxVisible = false; |
| | | // |
| | | // done(); |
| | | // }, |
| | | // error => { |
| | | // window.console.log(error); |
| | | // done(); |
| | | // } |
| | | // ); |
| | | }, |
| | | // 处理 |
| | | chuli(row) { |
| | | this.formchuli = {}; |
| | | this.gradeBoxVisiblechuli = true; |
| | | }, |
| | | initData() { |
| | | var that = this; |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.dept_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; |
| | | } |
| | | }) |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择至少一条数据"); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getList(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; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | <div class="title"> |
| | | <div class="repertory-title">农资库存</div> |
| | | <div class="detail"> |
| | | <el-link type="success" :underline="false">明细>></el-link> |
| | | <el-link type="success" :underline="false "@click="stockDetail" >明细>></el-link> |
| | | </div> |
| | | </div> |
| | | <div class="repertory-centont"> |
| | | <div class="detail"> |
| | | <div class="detail-title">肥料</div> |
| | | <div class="detail-number">剩余库存 <span>1</span>公斤</div> |
| | | <div class="detail" v-for="(item, index) in stockList" :key="index" @click="stockDetails(item)"> |
| | | <div class="detail-title">{{ item.name}}</div> |
| | | <div class="detail-number">剩余库存 <span>{{ item.val}}</span>公斤</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | import { getList, update } from "@/api/farmplant/farmplant"; |
| | | import { getFarmingCount, getFarmingStatis } from "@/api/farm/farmingrecord"; |
| | | import { selectCount } from "@/api/land/land"; |
| | | import {StockCount} from "@/api/stock/stock" |
| | | import recovery from "./recovery.vue"; |
| | | import land from "./land.vue"; |
| | | import plant from "./plant.vue"; |
| | |
| | | data() { |
| | | return { |
| | | farmingList: [], |
| | | stockList: [], |
| | | isFarmingDetail: false, |
| | | landInfo: {}, |
| | | customColor: "#5ABF78", |
| | |
| | | this.getFarmingCount(); |
| | | //本年农事操作记录,分组 |
| | | this.getFarmingStatis(); |
| | | this.StockCount(); |
| | | }, |
| | | methods: { |
| | | //本年农事操作记录 |
| | |
| | | var that = this; |
| | | getFarmingStatis().then((res) => { |
| | | that.farmingList = res.data.data; |
| | | }); |
| | | }, |
| | | StockCount() { |
| | | var that = this; |
| | | StockCount().then((res) => { |
| | | that.stockList= res.data.data; |
| | | console.log(that.stockList) |
| | | }); |
| | | }, |
| | | //地块使用率统计 |
| | |
| | | query: data, |
| | | }); |
| | | }, |
| | | stockDetail() { |
| | | this.$router.push({ |
| | | path: `/stockmanage`, |
| | | }); |
| | | }, |
| | | //本年农事操作明细--有参 |
| | | farmPlantDetails(item) { |
| | | console.log(item,11111); |
| | |
| | | query: data, |
| | | }); |
| | | }, |
| | | //农资库存点击事件 |
| | | stockDetails(item) { |
| | | var type; |
| | | if (item.name=="化肥"){ |
| | | type=0 |
| | | } |
| | | if (item.name=="有机肥"){ |
| | | type=1 |
| | | } |
| | | if (item.name=="杀虫剂"){ |
| | | type=2 |
| | | } |
| | | if (item.name=="杀菌剂"){ |
| | | type=3 |
| | | } |
| | | if (item.name=="饲料"){ |
| | | type=4 |
| | | } |
| | | const data = { |
| | | type:type, |
| | | }; |
| | | this.$router.push({ |
| | | path: `/stockmanage`, |
| | | query: data, |
| | | }); |
| | | }, |
| | | //采收记录 |
| | | recoveryDetail() { |
| | | const data = { |
| | |
| | | label: "面积单位", |
| | | prop: "landUnit", |
| | | type: "select", |
| | | value:"0", |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=landunit", |
| | | props: { |
| | | label: "dictValue", |