diff --git a/sub-government-affairs-service/auto-imports.d.ts b/sub-government-affairs-service/auto-imports.d.ts new file mode 100644 index 0000000..369aad4 --- /dev/null +++ b/sub-government-affairs-service/auto-imports.d.ts @@ -0,0 +1,75 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import +export {} +declare global { + const EffectScope: typeof import('vue')['EffectScope'] + const computed: typeof import('vue')['computed'] + const createApp: typeof import('vue')['createApp'] + const customRef: typeof import('vue')['customRef'] + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] + const defineComponent: typeof import('vue')['defineComponent'] + const effectScope: typeof import('vue')['effectScope'] + const getCurrentInstance: typeof import('vue')['getCurrentInstance'] + const getCurrentScope: typeof import('vue')['getCurrentScope'] + const h: typeof import('vue')['h'] + const inject: typeof import('vue')['inject'] + const isProxy: typeof import('vue')['isProxy'] + const isReactive: typeof import('vue')['isReactive'] + const isReadonly: typeof import('vue')['isReadonly'] + const isRef: typeof import('vue')['isRef'] + const markRaw: typeof import('vue')['markRaw'] + const nextTick: typeof import('vue')['nextTick'] + const onActivated: typeof import('vue')['onActivated'] + const onBeforeMount: typeof import('vue')['onBeforeMount'] + const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] + const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] + const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] + const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] + const onDeactivated: typeof import('vue')['onDeactivated'] + const onErrorCaptured: typeof import('vue')['onErrorCaptured'] + const onMounted: typeof import('vue')['onMounted'] + const onRenderTracked: typeof import('vue')['onRenderTracked'] + const onRenderTriggered: typeof import('vue')['onRenderTriggered'] + const onScopeDispose: typeof import('vue')['onScopeDispose'] + const onServerPrefetch: typeof import('vue')['onServerPrefetch'] + const onUnmounted: typeof import('vue')['onUnmounted'] + const onUpdated: typeof import('vue')['onUpdated'] + const onWatcherCleanup: typeof import('vue')['onWatcherCleanup'] + const provide: typeof import('vue')['provide'] + const reactive: typeof import('vue')['reactive'] + const readonly: typeof import('vue')['readonly'] + const ref: typeof import('vue')['ref'] + const resolveComponent: typeof import('vue')['resolveComponent'] + const shallowReactive: typeof import('vue')['shallowReactive'] + const shallowReadonly: typeof import('vue')['shallowReadonly'] + const shallowRef: typeof import('vue')['shallowRef'] + const toRaw: typeof import('vue')['toRaw'] + const toRef: typeof import('vue')['toRef'] + const toRefs: typeof import('vue')['toRefs'] + const toValue: typeof import('vue')['toValue'] + const triggerRef: typeof import('vue')['triggerRef'] + const unref: typeof import('vue')['unref'] + const useAttrs: typeof import('vue')['useAttrs'] + const useCssModule: typeof import('vue')['useCssModule'] + const useCssVars: typeof import('vue')['useCssVars'] + const useId: typeof import('vue')['useId'] + const useLink: typeof import('vue-router')['useLink'] + const useModel: typeof import('vue')['useModel'] + const useRoute: typeof import('vue-router')['useRoute'] + const useRouter: typeof import('vue-router')['useRouter'] + const useSlots: typeof import('vue')['useSlots'] + const useTemplateRef: typeof import('vue')['useTemplateRef'] + const watch: typeof import('vue')['watch'] + const watchEffect: typeof import('vue')['watchEffect'] + const watchPostEffect: typeof import('vue')['watchPostEffect'] + const watchSyncEffect: typeof import('vue')['watchSyncEffect'] +} +// for type re-export +declare global { + // @ts-ignore + export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' + import('vue') +} diff --git a/sub-government-affairs-service/components.d.ts b/sub-government-affairs-service/components.d.ts index d7376fb..ae4ec06 100644 --- a/sub-government-affairs-service/components.d.ts +++ b/sub-government-affairs-service/components.d.ts @@ -11,6 +11,7 @@ declare module 'vue' { AreaSelect: typeof import('./src/components/AreaSelect/index.vue')['default'] CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default'] FileUploader: typeof import('./src/components/FileUploader/index.vue')['default'] + LandSelect: typeof import('./src/components/LandSelect.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] TableComponent: typeof import('./src/components/tableComponent.vue')['default'] diff --git a/sub-government-affairs-service/src/apis/inputSuppliesApi/supervisionOfInputs.js b/sub-government-affairs-service/src/apis/inputSuppliesApi/supervisionOfInputs.js index 656c9bd..9e09a89 100644 --- a/sub-government-affairs-service/src/apis/inputSuppliesApi/supervisionOfInputs.js +++ b/sub-government-affairs-service/src/apis/inputSuppliesApi/supervisionOfInputs.js @@ -26,8 +26,8 @@ export function delSeedUseRegulatory(ids) { } /* 获取详情-通用,传入url和参数 */ -export function getRowDetails({ url, id }) { - return request(`${url}${id}`); +export function getRowDetails(url) { + return request(url); } /* 肥料使用监管-列表 */ @@ -79,3 +79,7 @@ export function editPesticideUseRegulatory(data) { export function delPesticideUseRegulatory(ids) { return request(`/inputGoods/supervise/pesticide/delete/${ids}`); } +/* 获取地块列表 */ +export function getLandList() { + return request(`/land-resource/landManage/getLandList`); +} diff --git a/sub-government-affairs-service/src/apis/system/dictType.js b/sub-government-affairs-service/src/apis/system/dictType.js index b95c0eb..947668a 100644 --- a/sub-government-affairs-service/src/apis/system/dictType.js +++ b/sub-government-affairs-service/src/apis/system/dictType.js @@ -56,3 +56,11 @@ export function GetDictType(dictId) { method: 'GET', }); } +/** + * @Title: 类型信息 + */ +export function GetDictTypeInfo(dictId) { + return request(`/system/dict/data/type/${dictId}`, { + method: 'GET', + }); +} diff --git a/sub-government-affairs-service/src/components/LandSelect.vue b/sub-government-affairs-service/src/components/LandSelect.vue new file mode 100644 index 0000000..e4ca053 --- /dev/null +++ b/sub-government-affairs-service/src/components/LandSelect.vue @@ -0,0 +1,240 @@ + + + + + diff --git a/sub-government-affairs-service/src/styles/custom.scss b/sub-government-affairs-service/src/styles/custom.scss index e7f1d46..bd53f60 100644 --- a/sub-government-affairs-service/src/styles/custom.scss +++ b/sub-government-affairs-service/src/styles/custom.scss @@ -346,6 +346,9 @@ .mr-20 { margin-right: 20px; } +.mb-20 { + margin-bottom: 20px; +} // 弹窗表单样式-子元素一行2个列 .dialog-form-container { @@ -368,4 +371,5 @@ right: 0; } } -} \ No newline at end of file +} + diff --git a/sub-government-affairs-service/src/views/inputSuppliesManage/demandManage/fertilizerDemand.vue b/sub-government-affairs-service/src/views/inputSuppliesManage/demandManage/fertilizerDemand.vue index d868085..e779920 100644 --- a/sub-government-affairs-service/src/views/inputSuppliesManage/demandManage/fertilizerDemand.vue +++ b/sub-government-affairs-service/src/views/inputSuppliesManage/demandManage/fertilizerDemand.vue @@ -25,21 +25,37 @@
新增
+
+ +
+ 已选择 {{ landNums }} 个地块 +
+
+ 面积总计(亩):{{ totalArea }} +
+
+ 肥料总计(件):{{ totalSeed }} +
+
+ + @@ -140,6 +156,7 @@ const resetForm = () => { // 表格数据 const tableData = ref([]); const selectedIds = ref([]); +const selectedRows = ref([]); const tableLoading = ref(false); const tableTotal = ref(0); const columns = ref([ @@ -149,10 +166,10 @@ const columns = ref([ { prop: 'gridName', label: '网格名称' }, { prop: 'landId', label: '地块编码' }, { prop: 'landName', label: '地块名称' }, - { prop: 'name', label: '姓名' }, - { prop: 'phone', label: '联系方式' }, - { prop: 'fertilizeId', label: '化肥编号' }, - { prop: 'fertilizeName', label: '化肥名称' }, + { prop: 'extent', label: '面积(亩)' }, + { prop: 'useNumber', label: '肥料需求', slotName: 'useNumber' }, + { prop: 'businessEntityCode', label: '生产经营主体编码' }, + { prop: 'businessEntityName', label: '生产经营主体名称' }, // { prop: 'action', label: '操作', slotName: 'action', width: 230, fixed: 'right' }, ]); const handlePaginationChange = ({ page, pageSize }) => { @@ -160,6 +177,19 @@ const handlePaginationChange = ({ page, pageSize }) => { formInline.size = pageSize; loadData(); }; +let landNums = ref(0); +let totalArea = computed(() => { + return selectedRows.value.reduce((sum, item) => sum + item.extent, 0); +}); +let totalSeed = computed(() => { + return selectedRows.value.reduce((sum, item) => sum + item.useNumber, 0); +}); +const handleSelectionChange = (selection, keys) => { + // console.log(selection, keys); + selectedRows.value = selection; + landNums.value = selection.length; +}; + const loadData = async () => { tableLoading.value = true; try { diff --git a/sub-government-affairs-service/src/views/inputSuppliesManage/demandManage/pesticideDemand.vue b/sub-government-affairs-service/src/views/inputSuppliesManage/demandManage/pesticideDemand.vue index f967dc8..c94663d 100644 --- a/sub-government-affairs-service/src/views/inputSuppliesManage/demandManage/pesticideDemand.vue +++ b/sub-government-affairs-service/src/views/inputSuppliesManage/demandManage/pesticideDemand.vue @@ -25,21 +25,37 @@
新增
+
+ +
+ 已选择 {{ landNums }} 个地块 +
+
+ 面积总计(亩):{{ totalArea }} +
+
+ 种子总计(件):{{ totalSeed }} +
+
+ + @@ -140,17 +156,20 @@ const resetForm = () => { // 表格数据 const tableData = ref([]); const selectedIds = ref([]); +const selectedRows = ref([]); const tableLoading = ref(false); const tableTotal = ref(0); const columns = ref([ - { prop: 'name', label: '姓名' }, - { prop: 'phone', label: '联系方式' }, - { prop: 'landName', label: '用药地块' }, + { prop: 'regionCode', label: '行政区域编码' }, + { prop: 'regionName', label: '行政区域名称' }, + { prop: 'gridId', label: '网格编码' }, + { prop: 'gridName', label: '网格名称' }, { prop: 'landId', label: '地块编码' }, - { prop: 'detectionTime', label: '检测时间' }, - { prop: 'detectionResult', label: '检测结果' }, - { prop: 'detectionUnit', label: '检测单位' }, - { prop: 'isUpload', label: '检测报告(是否上传)' }, + { prop: 'landName', label: '地块名称' }, + { prop: 'extent', label: '面积(亩)' }, + { prop: 'useNumber', label: '农药需求', slotName: 'useNumber' }, + { prop: 'businessEntityCode', label: '生产经营主体编码' }, + { prop: 'businessEntityName', label: '生产经营主体名称' }, // { prop: 'action', label: '操作', slotName: 'action', width: 230, fixed: 'right' }, ]); const handlePaginationChange = ({ page, pageSize }) => { @@ -158,6 +177,18 @@ const handlePaginationChange = ({ page, pageSize }) => { formInline.size = pageSize; loadData(); }; +let landNums = ref(0); +let totalArea = computed(() => { + return selectedRows.value.reduce((sum, item) => sum + item.extent, 0); +}); +let totalSeed = computed(() => { + return selectedRows.value.reduce((sum, item) => sum + item.useNumber, 0); +}); +const handleSelectionChange = (selection, keys) => { + // console.log(selection, keys); + selectedRows.value = selection; + landNums.value = selection.length; +}; const loadData = async () => { tableLoading.value = true; try { diff --git a/sub-government-affairs-service/src/views/inputSuppliesManage/supervisionOfInputs/fertilizerRegulation.vue b/sub-government-affairs-service/src/views/inputSuppliesManage/supervisionOfInputs/fertilizerRegulation.vue index 2607c97..0c97c98 100644 --- a/sub-government-affairs-service/src/views/inputSuppliesManage/supervisionOfInputs/fertilizerRegulation.vue +++ b/sub-government-affairs-service/src/views/inputSuppliesManage/supervisionOfInputs/fertilizerRegulation.vue @@ -47,52 +47,53 @@
+ + + + + {{ dialogForm.regionCode }} + {{ dialogForm.regionName }} + {{ dialogForm.gridId }} + {{ dialogForm.gridName }} + {{ dialogForm.landName }} + {{ dialogForm.landId }} + + + {{ dialogForm.businessEntityCode }} + {{ dialogForm.businessEntityName }} + - - +
农药用药详情
+ + - - + + - - + + + + + - - + + - - - - - - - -
-
- - - -
-
- - - -
-