Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev
This commit is contained in:
commit
bdb5330e63
@ -12,5 +12,6 @@ VITE_APP_SUB_GSR = '//localhost:9530/new-digital-agriculture-screen/'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
||||
# VITE_APP_BASE_URL = 'http://192.168.18.14:8080'//线下测试
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080'
|
@ -16,7 +16,7 @@
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="captchaEnabled" prop="code">
|
||||
<!-- <el-form-item v-if="captchaEnabled" prop="code">
|
||||
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter="handleLogin">
|
||||
<template #prefix>
|
||||
<svg-icon icon-class="validCode" class="el-input__icon input-icon" />
|
||||
@ -25,7 +25,7 @@
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" class="login-code-img" @click="getCode" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px">记住密码</el-checkbox>
|
||||
<el-form-item style="width: 100%">
|
||||
<el-button :loading="loading" size="large" type="primary" style="width: 100%" @click.prevent="handleLogin">
|
||||
@ -61,13 +61,13 @@ export default {
|
||||
username: 'admin',
|
||||
password: 'admin123',
|
||||
rememberMe: false,
|
||||
code: '',
|
||||
code: '1',
|
||||
uuid: '',
|
||||
},
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
|
||||
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
|
||||
code: [{ required: true, trigger: 'change', message: '请输入验证码' }],
|
||||
// code: [{ required: true, trigger: 'change', message: '请输入验证码' }],
|
||||
},
|
||||
loading: false,
|
||||
// 验证码开关
|
||||
|
@ -31,14 +31,14 @@ export default defineConfig(({ command, mode }) => {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
},
|
||||
proxy: {
|
||||
// 仅 Brand 模块走子应用 DevServer
|
||||
'/api/brand': {
|
||||
target: 'http://localhost:9526',
|
||||
changeOrigin: true,
|
||||
// 如果想去掉 /api/brand 前缀(比如子应用实际监听的是 /brand/...),
|
||||
// 可以加一个 rewrite:
|
||||
// rewrite: path => path.replace(/^\/api\/brand/, '/brand'),
|
||||
},
|
||||
// // 仅 Brand 模块走子应用 DevServer
|
||||
// '/api/brand': {
|
||||
// target: 'http://localhost:9526',
|
||||
// changeOrigin: true,
|
||||
// // 如果想去掉 /api/brand 前缀(比如子应用实际监听的是 /brand/...),
|
||||
// // 可以加一个 rewrite:
|
||||
// // rewrite: path => path.replace(/^\/api\/brand/, '/brand'),
|
||||
// },
|
||||
[VITE_APP_BASE_API]: {
|
||||
target: VITE_APP_BASE_URL,
|
||||
changeOrigin: true,
|
||||
|
@ -55,6 +55,7 @@ const props = defineProps({
|
||||
default() {
|
||||
return [
|
||||
// { label: '首页', value: '/new-digital-agriculture-screen/v2/home' },
|
||||
{ label: '首页', value: 'home' },
|
||||
{ label: '土地资源', value: '/new-digital-agriculture-screen/v2/land' },
|
||||
{ label: '投入品监管', value: '/new-digital-agriculture-screen/v2/inputs' },
|
||||
{ label: '产出品管理', value: '/new-digital-agriculture-screen/v2/entities' },
|
||||
@ -120,6 +121,10 @@ function handleTitleBtn(t = -1) {
|
||||
}
|
||||
}
|
||||
function handleTitleClick(val) {
|
||||
if (val === 'home') {
|
||||
window.location.href = 'http://47.109.205.240/platform';
|
||||
return;
|
||||
}
|
||||
activeTitle.value = val;
|
||||
// emit('changeTitle', val);
|
||||
router.push({ path: val });
|
||||
|
@ -27,9 +27,9 @@ const chartData = ref(
|
||||
|
||||
// 各品类基础值
|
||||
return [
|
||||
{ type: '种子种苗', values: generateWaveData(15) },
|
||||
{ type: '种子', values: generateWaveData(1) },
|
||||
{ type: '化肥', values: generateWaveData(20) },
|
||||
{ type: '农药', values: generateWaveData(10) },
|
||||
{ type: '农药', values: generateWaveData(2) },
|
||||
].flatMap(({ type, values }) =>
|
||||
values.map((value, i) => ({
|
||||
type,
|
||||
@ -50,7 +50,7 @@ function hexToRGBA(hex, alpha = 1) {
|
||||
const chartOption = ref({
|
||||
color: ['#02FD94', '#FEF906', '#01FEFD'],
|
||||
legend: {
|
||||
data: ['种子种苗', '化肥', '农药'],
|
||||
data: ['种子', '化肥', '农药'],
|
||||
top: 8,
|
||||
itemWidth: 12, // 矩形宽度
|
||||
itemHeight: 12, // 矩形高度
|
||||
@ -104,7 +104,7 @@ const chartOption = ref({
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '种子种苗',
|
||||
name: '种子',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
|
@ -1,12 +1,20 @@
|
||||
<template>
|
||||
<div class="order-stats">
|
||||
<el-row :gutter="20">
|
||||
<el-col v-for="item in state.list" :key="item.label" :span="12">
|
||||
<el-col :span="12">
|
||||
<div class="order-stats-item flex-column">
|
||||
<div class="order-stats-value">
|
||||
{{ item.value }}<span>{{ item.unit }}</span>
|
||||
{{ currentChoose[0].value }}<span>{{ currentChoose[0].unit }}</span>
|
||||
</div>
|
||||
<div class="order-stats-label">{{ item.label }}</div>
|
||||
<div class="order-stats-label">{{ currentChoose[0].label }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="order-stats-item flex-column">
|
||||
<div class="order-stats-value">
|
||||
{{ currentChoose[1].value }}<span>{{ currentChoose[1].unit }}</span>
|
||||
</div>
|
||||
<div class="order-stats-label">{{ currentChoose[1].label }}</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -14,10 +22,18 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import { reactive, onMounted, watch, ref } from 'vue';
|
||||
import { isEmpty } from '@/utils/index.js';
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: String,
|
||||
default: () => '3',
|
||||
},
|
||||
});
|
||||
|
||||
const state = reactive({
|
||||
list: [
|
||||
year: [
|
||||
{
|
||||
label: '订单金额',
|
||||
value: '548.86',
|
||||
@ -29,7 +45,66 @@ const state = reactive({
|
||||
unit: '笔',
|
||||
},
|
||||
],
|
||||
day: [
|
||||
{
|
||||
label: '订单金额',
|
||||
value: '0.95',
|
||||
unit: '万元',
|
||||
},
|
||||
{
|
||||
label: '订单数量',
|
||||
value: '583',
|
||||
unit: '笔',
|
||||
},
|
||||
],
|
||||
month: [
|
||||
{
|
||||
label: '订单金额',
|
||||
value: '34.85',
|
||||
unit: '万元',
|
||||
},
|
||||
{
|
||||
label: '订单数量',
|
||||
value: '16517',
|
||||
unit: '笔',
|
||||
},
|
||||
],
|
||||
quarter: [
|
||||
{
|
||||
label: '订单金额',
|
||||
value: '117.51',
|
||||
unit: '万元',
|
||||
},
|
||||
{
|
||||
label: '订单数量',
|
||||
value: '46120',
|
||||
unit: '笔',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const currentChoose = ref(state.year);
|
||||
|
||||
watch(
|
||||
() => props.data,
|
||||
(val) => {
|
||||
if (!isEmpty(val)) {
|
||||
if (val === '3') {
|
||||
currentChoose.value = state.year;
|
||||
} else if (val === '2') {
|
||||
currentChoose.value = state.quarter;
|
||||
} else if (val === '1') {
|
||||
currentChoose.value = state.month;
|
||||
} else if (val === '0') {
|
||||
currentChoose.value = state.day;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<template #header>
|
||||
<div class="land-map-pop-header">
|
||||
<div class="title">{{ currentRegion?.name || '投入品' }}</div>
|
||||
<a class="view-case" @click.prevent="handleViewCase">查看案件 ></a>
|
||||
<!-- <a class="view-case" @click.prevent="handleViewCase">查看案件 ></a>-->
|
||||
</div>
|
||||
</template>
|
||||
<template #dialogContent>
|
||||
|
@ -83,8 +83,8 @@ const state = reactive({
|
||||
},
|
||||
},
|
||||
data: [
|
||||
{ value: 221.8, name: '产业运营平台' },
|
||||
{ value: 70.01, name: '其它', floatZ: 1 },
|
||||
{ value: 221.8, name: '合资公司' },
|
||||
{ value: 70.01, name: '其它实体', floatZ: 1 },
|
||||
],
|
||||
});
|
||||
</script>
|
||||
|
@ -40,11 +40,12 @@ const chartConfig = ref({
|
||||
option: {
|
||||
header: ['投入品种类', '平台价格', '市场价格'],
|
||||
dataset: [
|
||||
['圆茄种苗', '0.3元/棵', '0.4元/棵'],
|
||||
['高氮复合肥', '1850元/吨', '1980元/吨'],
|
||||
['硫酸钾', '1250元/吨', '1380元/吨'],
|
||||
['高氮复合肥', '1850元/吨', '1980元/吨'],
|
||||
['西红柿种苗', '0.3元/棵', '0.4元/棵'],
|
||||
['西红柿种苗', '0.45元/株', '0.6元/株'],
|
||||
['美玉27号甜糯玉米种子', '102元/kg', '126元/kg'],
|
||||
['磷酸二氢钾99% 全水溶叶面肥磷钾肥', '6750元/吨', '8400元/吨'],
|
||||
['大量元素水溶肥 平衡,高钾,高氮', '6550元/吨', '7980元/吨'],
|
||||
['20%氯虫苯甲酰胺', '69885元/吨', '76880元/吨'],
|
||||
['21.9%精草铵膦铵盐高浓度除草剂', '2748元/吨', '3416元/吨'],
|
||||
],
|
||||
// 样式配置
|
||||
headerBGC: 'rgba(53, 208, 192, 0.4)', // 表头背景
|
||||
|
@ -6,34 +6,34 @@
|
||||
import { reactive } from 'vue';
|
||||
|
||||
const rawData = [
|
||||
{ name: '勐撒镇', type: '种子农药', value: 15 },
|
||||
{ name: '勐撒镇', type: '化肥', value: 30 },
|
||||
{ name: '勐撒镇', type: '农药', value: 22 },
|
||||
{ name: '勐永镇', type: '种子农药', value: 18 },
|
||||
{ name: '勐永镇', type: '化肥', value: 28 },
|
||||
{ name: '勐永镇', type: '农药', value: 20 },
|
||||
{ name: '孟定镇', type: '种子农药', value: 21 },
|
||||
{ name: '孟定镇', type: '化肥', value: 25 },
|
||||
{ name: '孟定镇', type: '农药', value: 24 },
|
||||
{ name: '勐简乡', type: '种子农药', value: 13 },
|
||||
{ name: '勐简乡', type: '化肥', value: 20 },
|
||||
{ name: '勐简乡', type: '农药', value: 15 },
|
||||
{ name: '贺派乡', type: '种子农药', value: 17 },
|
||||
{ name: '贺派乡', type: '化肥', value: 18 },
|
||||
{ name: '贺派乡', type: '农药', value: 16 },
|
||||
{ name: '芒洪乡', type: '种子农药', value: 14 },
|
||||
{ name: '芒洪乡', type: '化肥', value: 23 },
|
||||
{ name: '芒洪乡', type: '农药', value: 21 },
|
||||
{ name: '大兴乡', type: '种子农药', value: 12 },
|
||||
{ name: '大兴乡', type: '化肥', value: 17 },
|
||||
{ name: '大兴乡', type: '农药', value: 14 },
|
||||
{ name: '耿马镇', type: '种子农药', value: 19 },
|
||||
{ name: '耿马镇', type: '化肥', value: 26 },
|
||||
{ name: '耿马镇', type: '农药', value: 23 },
|
||||
{ name: '勐撒镇', type: '种子', value: 0.15 },
|
||||
{ name: '勐撒镇', type: '化肥', value: 3.0 },
|
||||
{ name: '勐撒镇', type: '农药', value: 2.2 },
|
||||
{ name: '勐永镇', type: '种子', value: 0.18 },
|
||||
{ name: '勐永镇', type: '化肥', value: 2.8 },
|
||||
{ name: '勐永镇', type: '农药', value: 2.0 },
|
||||
{ name: '孟定镇', type: '种子', value: 0.21 },
|
||||
{ name: '孟定镇', type: '化肥', value: 2.5 },
|
||||
{ name: '孟定镇', type: '农药', value: 2.4 },
|
||||
{ name: '勐简乡', type: '种子', value: 0.13 },
|
||||
{ name: '勐简乡', type: '化肥', value: 2.0 },
|
||||
{ name: '勐简乡', type: '农药', value: 1.5 },
|
||||
{ name: '贺派乡', type: '种子', value: 0.17 },
|
||||
{ name: '贺派乡', type: '化肥', value: 1.8 },
|
||||
{ name: '贺派乡', type: '农药', value: 1.6 },
|
||||
{ name: '芒洪乡', type: '种子', value: 0.14 },
|
||||
{ name: '芒洪乡', type: '化肥', value: 2.3 },
|
||||
{ name: '芒洪乡', type: '农药', value: 2.1 },
|
||||
{ name: '大兴乡', type: '种子', value: 0.2 },
|
||||
{ name: '大兴乡', type: '化肥', value: 3 },
|
||||
{ name: '大兴乡', type: '农药', value: 1.14 },
|
||||
{ name: '耿马镇', type: '种子', value: 0.5 },
|
||||
{ name: '耿马镇', type: '化肥', value: 4 },
|
||||
{ name: '耿马镇', type: '农药', value: 2.3 },
|
||||
];
|
||||
|
||||
const towns = ['勐撒镇', '勐永镇', '孟定镇', '勐简乡', '贺派乡', '芒洪乡', '大兴乡', '耿马镇'];
|
||||
const types = ['种子农药', '化肥', '农药'];
|
||||
const types = ['种子', '化肥', '农药'];
|
||||
const colors = ['#15EB90', '#F3F70F', '#08DFE4'];
|
||||
|
||||
const series = types.map((type, idx) => {
|
||||
|
@ -51,13 +51,13 @@
|
||||
:value-field="'value'"
|
||||
:down-width="'100px'"
|
||||
:options="[
|
||||
{ label: '按日', value: '0' },
|
||||
{ label: '按月', value: '1' },
|
||||
{ label: '按季度', value: '2' },
|
||||
{ label: '按年', value: '3' },
|
||||
{ label: '按季度', value: '2' },
|
||||
{ label: '按月', value: '1' },
|
||||
{ label: '按日', value: '0' },
|
||||
]"
|
||||
:is-down="true"
|
||||
command="handleCommand"
|
||||
@command="handleCommand"
|
||||
>
|
||||
<template #back>
|
||||
<inputsFour :data="state.data.ProductEntity" />
|
||||
@ -135,7 +135,7 @@ const loadData = async () => {
|
||||
unit: '家',
|
||||
},
|
||||
],
|
||||
InputDetector: [{ JCFGL: 33.33, JCYPPC: 15684, zero_count: 13, JCHGL: 86.67, counts: 45 }],
|
||||
InputDetector: [{ JCFGL: 49.58, JCYPPC: 15684, zero_count: 13, JCHGL: 86.67, counts: 45 }],
|
||||
there: [
|
||||
{ value: 530, name: '种子' },
|
||||
{ value: 1215, name: '化肥' },
|
||||
@ -143,11 +143,7 @@ const loadData = async () => {
|
||||
{ value: 916, name: '地膜' },
|
||||
{ value: 108, name: '水' },
|
||||
],
|
||||
ProductEntity: [
|
||||
{ manufacturerCount: 2, percentage: 16.67, category: '种源企业' },
|
||||
{ manufacturerCount: 5, percentage: 41.67, category: '农药厂家' },
|
||||
{ manufacturerCount: 5, percentage: 41.67, category: '肥料厂家' },
|
||||
],
|
||||
ProductEntity: '3',
|
||||
five: [
|
||||
{ value: 10, name: '2020' },
|
||||
{ value: 66, name: '2021' },
|
||||
@ -365,7 +361,8 @@ const loadData = async () => {
|
||||
loadData();
|
||||
|
||||
const handleCommand = (data) => {
|
||||
state.queryCode = data.value;
|
||||
console.log(data);
|
||||
state.data.ProductEntity = data.value;
|
||||
// console.info('data=', data);
|
||||
// nextTick(() => {
|
||||
// fiveRef.value && fiveRef.value.refresData();
|
||||
|
@ -27,12 +27,14 @@ import { ref, reactive, computed } from 'vue';
|
||||
|
||||
const unit = ref('万亩');
|
||||
const list = reactive([
|
||||
{ title: '望天田', value: '60.8', color: '#01FEFD' },
|
||||
{ title: '菜地', value: '60.8', color: '#FEF906' },
|
||||
{ title: '水田', value: '60.8', color: '#01FEFD' },
|
||||
{ title: '旱地', value: '60.8', color: '#FEF906' },
|
||||
{ title: '水浇地', value: '60.8', color: '#02FD94' },
|
||||
{ title: '果园', value: '60.8', color: '#FE7F03' },
|
||||
{ title: '灌溉水田', value: '60.8', color: '#41BDFC' },
|
||||
{ title: '旱地', value: '60.8', color: '#FC0003' },
|
||||
{ title: '灌木林地', value: '60.8', color: '#FE7F03' },
|
||||
{ title: '竹林地', value: '60.8', color: '#41BDFC' },
|
||||
{ title: '果园', value: '60.8', color: '#FC0003' },
|
||||
{ title: '茶园', value: '60.8', color: '#9C27B0' },
|
||||
{ title: '人工牧草地', value: '60.8', color: '#4CAF50' },
|
||||
]);
|
||||
function doMapclick() {
|
||||
list.forEach((v) => {
|
||||
|
@ -31,24 +31,25 @@
|
||||
<div class="right-charts-item">
|
||||
<customBack
|
||||
top-title="管理需求分类"
|
||||
:down-title="'永久基本农田'"
|
||||
:down-title="'所有类型'"
|
||||
:top-postion="'right'"
|
||||
:down-width="'140px'"
|
||||
:options="[
|
||||
{ label: '永久基本农田', value: '530926' },
|
||||
{ label: '耿马镇', value: '42611' },
|
||||
{ label: '勐撒镇', value: '9259' },
|
||||
{ label: '勐永镇', value: '17787' },
|
||||
{ label: '孟定镇', value: '42610' },
|
||||
{ label: '勐简乡', value: '17788' },
|
||||
{ label: '贺派乡', value: '40161' },
|
||||
{ label: '四排山乡', value: '40163' },
|
||||
{ label: '大兴乡', value: '40159' },
|
||||
{ label: '所有类型', value: '530926' },
|
||||
{ label: '水田', value: '42611' },
|
||||
{ label: '灌溉水田', value: '9259' },
|
||||
{ label: '水浇地', value: '17787' },
|
||||
{ label: '灌木林地', value: '42610' },
|
||||
{ label: '竹林地', value: '17788' },
|
||||
{ label: '果园', value: '40161' },
|
||||
{ label: '茶园', value: '40163' },
|
||||
{ label: '人工牧草地', value: '40159' },
|
||||
]"
|
||||
:is-down="true"
|
||||
@command="handleContrast"
|
||||
>
|
||||
<template #back>
|
||||
<landFive :data="state.data.five" />
|
||||
<land-five :data="state.data.five"></land-five>
|
||||
</template>
|
||||
</customBack>
|
||||
</div>
|
||||
@ -64,7 +65,7 @@
|
||||
</el-row>
|
||||
</template>
|
||||
<script setup>
|
||||
import { nextTick, reactive } from 'vue';
|
||||
import { nextTick, reactive, onMounted } from 'vue';
|
||||
import landMap from './components/landMap.vue';
|
||||
import landOne from './components/landOne.vue';
|
||||
import landTwo from './components/landTwo.vue';
|
||||
@ -84,6 +85,153 @@ const state = reactive({
|
||||
queryCode: '',
|
||||
});
|
||||
|
||||
const landData = [
|
||||
{
|
||||
area: '耿马镇',
|
||||
land: [
|
||||
{ type: '水田', value: 15.2 },
|
||||
{ type: '菜地', value: 12.5 },
|
||||
{ type: '水浇地', value: 8.3 },
|
||||
{ type: '果园', value: 5.1 },
|
||||
{ type: '灌溉水田', value: 10.8 },
|
||||
{ type: '旱地', value: 28.6 },
|
||||
{ type: '竹林地', value: 1.2 },
|
||||
{ type: '茶园', value: 0.8 },
|
||||
{ type: '人工牧草地', value: 0.5 },
|
||||
{ type: '灌木林地', value: 6.7 },
|
||||
],
|
||||
total: 89.7, // 15.2 + 12.5 + 8.3 + 5.1 + 10.8 + 28.6 + 1.2 + 0.8 + 0.5 + 6.7
|
||||
},
|
||||
{
|
||||
area: '勐永镇',
|
||||
land: [
|
||||
{ type: '水田', value: 8.5 },
|
||||
{ type: '菜地', value: 9.2 },
|
||||
{ type: '水浇地', value: 6.7 },
|
||||
{ type: '果园', value: 4.3 },
|
||||
{ type: '灌溉水田', value: 7.9 },
|
||||
{ type: '旱地', value: 22.4 },
|
||||
{ type: '竹林地', value: 0.9 },
|
||||
{ type: '茶园', value: 0.6 },
|
||||
{ type: '人工牧草地', value: 0.3 },
|
||||
{ type: '灌木林地', value: 5.2 },
|
||||
],
|
||||
total: 66.0, // 8.5 + 9.2 + 6.7 + 4.3 + 7.9 + 22.4 + 0.9 + 0.6 + 0.3 + 5.2
|
||||
},
|
||||
{
|
||||
area: '勐撒镇',
|
||||
land: [
|
||||
{ type: '水田', value: 12.1 },
|
||||
{ type: '菜地', value: 15.3 },
|
||||
{ type: '水浇地', value: 10.2 },
|
||||
{ type: '果园', value: 7.8 },
|
||||
{ type: '灌溉水田', value: 14.5 },
|
||||
{ type: '旱地', value: 18.9 },
|
||||
{ type: '竹林地', value: 1.5 },
|
||||
{ type: '茶园', value: 1.2 },
|
||||
{ type: '人工牧草地', value: 0.7 },
|
||||
{ type: '灌木林地', value: 8.4 },
|
||||
],
|
||||
total: 91.6, // 12.1 + 15.3 + 10.2 + 7.8 + 14.5 + 18.9 + 1.5 + 1.2 + 0.7 + 8.4
|
||||
},
|
||||
{
|
||||
area: '孟定镇',
|
||||
land: [
|
||||
{ type: '水田', value: 5.8 },
|
||||
{ type: '菜地', value: 7.0 },
|
||||
{ type: '水浇地', value: 4.5 },
|
||||
{ type: '果园', value: 3.2 },
|
||||
{ type: '灌溉水田', value: 6.7 },
|
||||
{ type: '旱地', value: 12.3 },
|
||||
{ type: '竹林地', value: 0.7 },
|
||||
{ type: '茶园', value: 0.4 },
|
||||
{ type: '人工牧草地', value: 0.2 },
|
||||
{ type: '灌木林地', value: 3.9 },
|
||||
],
|
||||
total: 44.7, // 5.8 + 7.0 + 4.5 + 3.2 + 6.7 + 12.3 + 0.7 + 0.4 + 0.2 + 3.9
|
||||
},
|
||||
{
|
||||
area: '大兴乡',
|
||||
land: [
|
||||
{ type: '水田', value: 6.3 },
|
||||
{ type: '菜地', value: 8.1 },
|
||||
{ type: '水浇地', value: 5.4 },
|
||||
{ type: '果园', value: 3.9 },
|
||||
{ type: '灌溉水田', value: 7.2 },
|
||||
{ type: '旱地', value: 15.6 },
|
||||
{ type: '竹林地', value: 1.1 },
|
||||
{ type: '茶园', value: 0.9 },
|
||||
{ type: '人工牧草地', value: 0.4 },
|
||||
{ type: '灌木林地', value: 4.8 },
|
||||
],
|
||||
total: 53.7, // 6.3 + 8.1 + 5.4 + 3.9 + 7.2 + 15.6 + 1.1 + 0.9 + 0.4 + 4.8
|
||||
},
|
||||
{
|
||||
area: '芒洪乡',
|
||||
land: [
|
||||
{ type: '水田', value: 4.2 },
|
||||
{ type: '菜地', value: 5.6 },
|
||||
{ type: '水浇地', value: 3.8 },
|
||||
{ type: '果园', value: 2.5 },
|
||||
{ type: '灌溉水田', value: 5.1 },
|
||||
{ type: '旱地', value: 11.5 },
|
||||
{ type: '竹林地', value: 0.5 },
|
||||
{ type: '茶园', value: 0.3 },
|
||||
{ type: '人工牧草地', value: 0.1 },
|
||||
{ type: '灌木林地', value: 3.2 },
|
||||
],
|
||||
total: 36.8, // 4.2 + 5.6 + 3.8 + 2.5 + 5.1 + 11.5 + 0.5 + 0.3 + 0.1 + 3.2
|
||||
},
|
||||
{
|
||||
area: '四排山乡',
|
||||
land: [
|
||||
{ type: '水田', value: 3.7 },
|
||||
{ type: '菜地', value: 4.8 },
|
||||
{ type: '水浇地', value: 3.2 },
|
||||
{ type: '果园', value: 2.1 },
|
||||
{ type: '灌溉水田', value: 4.6 },
|
||||
{ type: '旱地', value: 9.8 },
|
||||
{ type: '竹林地', value: 0.4 },
|
||||
{ type: '茶园', value: 0.2 },
|
||||
{ type: '人工牧草地', value: 0.1 },
|
||||
{ type: '灌木林地', value: 2.7 },
|
||||
],
|
||||
total: 31.6, // 3.7 + 4.8 + 3.2 + 2.1 + 4.6 + 9.8 + 0.4 + 0.2 + 0.1 + 2.7
|
||||
},
|
||||
{
|
||||
area: '贺派乡',
|
||||
land: [
|
||||
{ type: '水田', value: 7.9 },
|
||||
{ type: '菜地', value: 10.4 },
|
||||
{ type: '水浇地', value: 7.1 },
|
||||
{ type: '果园', value: 5.6 },
|
||||
{ type: '灌溉水田', value: 9.3 },
|
||||
{ type: '旱地', value: 20.1 },
|
||||
{ type: '竹林地', value: 1.3 },
|
||||
{ type: '茶园', value: 1 },
|
||||
{ type: '人工牧草地', value: 0.6 },
|
||||
{ type: '灌木林地', value: 7.1 },
|
||||
],
|
||||
total: 70.4, // 7.9 + 10.4 + 7.1 + 5.6 + 9.3 + 20.1 + 1.3 + 1 + 0.6 + 7.1
|
||||
},
|
||||
{
|
||||
area: '勐简乡',
|
||||
land: [
|
||||
{ type: '水田', value: 5.1 },
|
||||
{ type: '菜地', value: 6.7 },
|
||||
{ type: '水浇地', value: 4.6 },
|
||||
{ type: '果园', value: 3.4 },
|
||||
{ type: '灌溉水田', value: 6.2 },
|
||||
{ type: '旱地', value: 13.8 },
|
||||
{ type: '竹林地', value: 0.8 },
|
||||
{ type: '茶园', value: 0.5 },
|
||||
{ type: '人工牧草地', value: 0.3 },
|
||||
{ type: '灌木林地', value: 4.3 },
|
||||
],
|
||||
total: 45.7, // 5.1 + 6.7 + 4.6 + 3.4 + 6.2 + 13.8 + 0.8 + 0.5 + 0.3 + 4.3
|
||||
},
|
||||
];
|
||||
|
||||
// 加载
|
||||
const loadData = async () => {
|
||||
state.loading = true;
|
||||
@ -130,27 +278,27 @@ const loadData = async () => {
|
||||
],
|
||||
four: [
|
||||
{ value: 58.9, label: '灌溉水田' },
|
||||
{ value: 56.1, label: '基地地' },
|
||||
{ value: 60.8, label: '望天田' },
|
||||
{ value: 56.1, label: '基地' },
|
||||
{ value: 60.8, label: '水田' },
|
||||
{ value: 60.6, label: '水浇地' },
|
||||
{ value: 32.6, label: '林地' },
|
||||
{ value: 32.6, label: '竹林地' },
|
||||
{ value: 25.8, label: '育苗地' },
|
||||
{ value: 56.0, label: '果园' },
|
||||
{ value: 52.4, label: '草地' },
|
||||
{ value: 6.3, label: '观测用地' },
|
||||
{ value: 6.1, label: '监测用地' },
|
||||
],
|
||||
five: [
|
||||
{ value: 20, name: '耿马镇' },
|
||||
{ value: 15, name: '勐撒镇' },
|
||||
{ value: 12, name: '勐永镇' },
|
||||
{ value: 16, name: '孟定镇' },
|
||||
{ value: 8, name: '勐简乡' },
|
||||
{ value: 12, name: '贺派乡' },
|
||||
{ value: 10, name: '四排山乡' },
|
||||
{ value: 9, name: '芒洪乡' },
|
||||
{ value: 8, name: '大兴乡' },
|
||||
],
|
||||
// five: [
|
||||
// { value: 20, name: '耿马镇' },
|
||||
// { value: 15, name: '勐撒镇' },
|
||||
// { value: 12, name: '勐永镇' },
|
||||
// { value: 16, name: '孟定镇' },
|
||||
// { value: 8, name: '勐简乡' },
|
||||
// { value: 12, name: '贺派乡' },
|
||||
// { value: 10, name: '四排山乡' },
|
||||
// { value: 9, name: '芒洪乡' },
|
||||
// { value: 8, name: '大兴乡' },
|
||||
// ],
|
||||
six: [
|
||||
{
|
||||
name: '小麦',
|
||||
@ -195,12 +343,37 @@ const loadData = async () => {
|
||||
|
||||
loadData();
|
||||
|
||||
const handleCommand = (data) => {
|
||||
state.queryCode = data.value;
|
||||
// console.info('data=', data);
|
||||
// nextTick(() => {
|
||||
// fiveRef.value && fiveRef.value.refresData();
|
||||
// });
|
||||
onMounted(() => {
|
||||
state.data.five = [];
|
||||
for (let i in landData) {
|
||||
state.data.five.push({ name: landData[i].area, value: landData[i].total });
|
||||
}
|
||||
});
|
||||
|
||||
const handleContrast = (data) => {
|
||||
state.data.five = [];
|
||||
if (data.label === '所有类型') {
|
||||
for (let i in landData) {
|
||||
let obj = {
|
||||
name: landData[i].area,
|
||||
value: landData[i].total,
|
||||
};
|
||||
state.data.five.push(obj);
|
||||
}
|
||||
} else {
|
||||
for (let i in landData) {
|
||||
let obj = {
|
||||
name: landData[i].area,
|
||||
value: 0,
|
||||
};
|
||||
for (let k in landData[i].land) {
|
||||
if (landData[i].land[k].type === data.label) {
|
||||
obj.value = landData[i].land[k].value;
|
||||
}
|
||||
}
|
||||
state.data.five.push(obj);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
@ -6,5 +6,7 @@ VITE_APP_MIAN_URL = 'http://localhost:9000'
|
||||
VITE_APP_NAME = 'sub-government-affairs-service'
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
||||
# VITE_APP_BASE_URL = 'http://192.168.18.14:8080'
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300'
|
||||
# VITE_APP_UPLOAD_URL = 'http://192.168.18.14:8080'
|
@ -1,7 +1,8 @@
|
||||
# 生产环境
|
||||
VITE_MODE = 'PRO'
|
||||
VITE_APP_MIAN = 'daimp-front-main'
|
||||
VITE_APP_MIAN_URL = 'http://47.109.205.240:88'
|
||||
# VITE_APP_MIAN_URL = 'http://47.109.205.240:88'
|
||||
VITE_APP_MIAN_URL = 'http://192.168.18.14:8080'
|
||||
VITE_APP_NAME = 'sub-government-affairs-service'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
|
54
sub-government-affairs-service/src/apis/resource/member.js
Normal file
54
sub-government-affairs-service/src/apis/resource/member.js
Normal file
@ -0,0 +1,54 @@
|
||||
import request from '@/utils/axios';
|
||||
|
||||
// 获取网格列表
|
||||
export const GetGridList = (params = {}) => {
|
||||
return request('/land-resource/gridManage/page', {
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
// 网格员管理 - 列表
|
||||
export function GetMemberList(params = {}) {
|
||||
return request('/land-resource/grid-member/page', {
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 网格员管理 - 新增
|
||||
export function AddMember(data = {}) {
|
||||
return request('/land-resource/grid-member', {
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 网格员管理 - 修改
|
||||
export function UpdateMember(data = {}) {
|
||||
return request('/land-resource/grid-member', {
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 网格员管理 - 删除
|
||||
export function DeleteMember(id) {
|
||||
return request(`/land-resource/grid-member/${id}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
// // 网格员管理 - 导出
|
||||
// export function ExportMember() {
|
||||
// return request('/land-resource/grid-member/export', {
|
||||
// method: 'POST',
|
||||
// });
|
||||
// }
|
||||
export function ExportMember(data = {}) {
|
||||
return request('/land-resource/grid-member/export', {
|
||||
method: 'POST',
|
||||
data,
|
||||
responseType: 'blob', // 明确告诉 axios 返回 blob
|
||||
});
|
||||
}
|
BIN
sub-government-affairs-service/src/assets/images/logo.png
Normal file
BIN
sub-government-affairs-service/src/assets/images/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -1,10 +1,3 @@
|
||||
<!--
|
||||
* @Description:
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2023-06-20 14:29:45
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2024-01-26 23:04:29
|
||||
-->
|
||||
<template>
|
||||
<div class="layout-hamburger" @click="handleCollapse">
|
||||
<el-icon v-if="isCollapse" class="icon"><expand /></el-icon>
|
||||
|
@ -7,8 +7,8 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="logo">
|
||||
<!-- <img src="/images/logo.png" class="logo-picture" /> -->
|
||||
<h2 v-show="!isCollapse" class="logo-title">{{ VITE_APP_TITLE }}</h2>
|
||||
<!-- <img src="../../../assets/images/logo.png" class="logo-picture" />
|
||||
<h2 v-show="!isCollapse" class="logo-title">{{ VITE_APP_TITLE }}</h2> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -43,5 +43,9 @@ const { VITE_APP_TITLE } = import.meta.env;
|
||||
line-height: 35px;
|
||||
color: $color-primary;
|
||||
}
|
||||
.logo-picture {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,10 +1,3 @@
|
||||
<!--
|
||||
* @Description:
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2024-01-27 16:02:43
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2024-04-12 21:12:01
|
||||
-->
|
||||
<template>
|
||||
<el-icon v-if="icon.includes('icon')" :class="`iconfont ${icon}`" :size="size" />
|
||||
<el-icon v-else :size="size"> <component :is="icon" /></el-icon>
|
||||
|
@ -1,10 +1,3 @@
|
||||
<!--
|
||||
* @Description:
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2023-06-20 14:29:45
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2024-01-27 09:29:36
|
||||
-->
|
||||
<template>
|
||||
<component :is="type" v-bind="linkProps(to)">
|
||||
<slot />
|
||||
|
@ -1,10 +1,3 @@
|
||||
<!--
|
||||
* @Description:
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2023-06-20 14:29:45
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2024-01-27 16:07:37
|
||||
-->
|
||||
<template>
|
||||
<template v-if="!item.hidden">
|
||||
<template v-if="!item.alwaysShow && hasOneShowingChild(item.children, item)">
|
||||
@ -15,21 +8,41 @@
|
||||
</el-menu-item>
|
||||
</layout-link>
|
||||
</template>
|
||||
<template v-else-if="level === 2 && !isCollapse">
|
||||
<el-dropdown trigger="hover" placement="right-start" :show-timeout="100" @visible-change="(val) => (isDropdownOpen = val)">
|
||||
<span class="el-dropdown-link el-menu-item" @mouseenter.prevent>
|
||||
<layout-icon :size="20" :icon="item.meta?.icon" />
|
||||
<span>{{ item.meta?.title }}</span>
|
||||
<el-icon class="arrow-icon" v-if="item.children?.length">
|
||||
<component :is="isDropdownOpen ? 'arrow-left' : 'arrow-right'" />
|
||||
</el-icon>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-menu class="third-level-menu el-menu--vertical el-menu--popup-container" :default-active="$route.path" @select="$router.push">
|
||||
<el-menu-item v-for="child in item.children" :key="child.path" :index="child.path">
|
||||
<layout-icon :size="20" :icon="child.meta?.icon" />
|
||||
<span>{{ child.meta?.title }}</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
<el-sub-menu v-else :index="item.path" teleported>
|
||||
<template #title>
|
||||
<layout-icon :size="20" :icon="item?.meta?.icon" />
|
||||
<span>{{ item.meta && item.meta?.title }}</span>
|
||||
</template>
|
||||
<sub-item v-for="child in item.children" :key="child.path" :item="child" />
|
||||
<sub-item v-for="child in item.children" :key="child.path" :item="child" :level="level + 1" />
|
||||
</el-sub-menu>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script setup name="sub-item">
|
||||
import { ref } from 'vue';
|
||||
import { ref, computed } from 'vue';
|
||||
// import { isExternal } from '@/utils/validate.js';
|
||||
import LayoutLink from './Link';
|
||||
import LayoutIcon from './Icon';
|
||||
import { useSettingStore } from '@/store/modules/setting';
|
||||
// import path from 'path-browserify';
|
||||
|
||||
defineProps({
|
||||
@ -37,6 +50,10 @@ defineProps({
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
level: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
basePath: {
|
||||
type: String,
|
||||
default: '',
|
||||
@ -44,6 +61,10 @@ defineProps({
|
||||
});
|
||||
|
||||
const onlyOneChild = ref(null);
|
||||
const SettingStore = useSettingStore();
|
||||
const isDropdownOpen = ref(false);
|
||||
|
||||
const isCollapse = computed(() => !SettingStore.isCollapse);
|
||||
const hasOneShowingChild = (children = [], parent) => {
|
||||
const showingChildren = children.filter((item) => {
|
||||
// 过滤掉需要隐藏的菜单
|
||||
@ -79,3 +100,25 @@ const hasOneShowingChild = (children = [], parent) => {
|
||||
// return path.resolve(props.basePath, routePath);
|
||||
// };
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.third-level-menu {
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
||||
min-width: 180px;
|
||||
}
|
||||
.el-dropdown-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.arrow-icon {
|
||||
margin-left: auto;
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,10 +1,3 @@
|
||||
<!--
|
||||
* @Description:
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2024-01-27 20:01:45
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2024-03-30 14:32:07
|
||||
-->
|
||||
<template>
|
||||
<div class="layout-sider" :class="{ 'has-logo': themeConfig.showLogo }">
|
||||
<Logo v-if="themeConfig.showLogo" :is-collapse="isCollapse" />
|
||||
@ -19,7 +12,7 @@
|
||||
:collapse-transition="false"
|
||||
:collapse="isCollapse"
|
||||
>
|
||||
<SubItem v-for="item in permissionRoutes" :key="item.path" :item="item" />
|
||||
<SubItem v-for="item in permissionRoutes" :key="item.path" :item="item" :level="1" />
|
||||
</el-menu>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
|
@ -1,10 +1,3 @@
|
||||
<!--
|
||||
* @Description: layout
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2024-01-26 20:13:37
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2024-02-05 16:03:31
|
||||
-->
|
||||
<template>
|
||||
<div
|
||||
class="basic-layout"
|
||||
|
@ -47,10 +47,10 @@ export const constantRoutes = [
|
||||
...resourceRouter,
|
||||
...productOperateMainRoutes,
|
||||
...inputSuppliesRoutes,
|
||||
produceGoods,
|
||||
...plantingAndBreedingRouter,
|
||||
// produceGoods,
|
||||
// ...plantingAndBreedingRouter,
|
||||
...traceRouter,
|
||||
...systemRouter,
|
||||
// ...systemRouter,
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -34,62 +34,62 @@ const inputSuppliesRoutes = [
|
||||
component: () => import('@/views/inputSuppliesManage/material/fertilizer/index.vue'),
|
||||
meta: { title: '肥料管理', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/material/pesticide',
|
||||
name: 'input-supplies-pesticide',
|
||||
component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
|
||||
meta: { title: '农药管理', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/material/ratPoison',
|
||||
name: 'input-supplies-ratPoison',
|
||||
component: () => import('@/views/inputSuppliesManage/material/ratPoison/index.vue'),
|
||||
meta: { title: '兽药管理', icon: '' },
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/material/pesticide',
|
||||
// name: 'input-supplies-pesticide',
|
||||
// component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
|
||||
// meta: { title: '农药管理', icon: '' },
|
||||
// },
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/material/ratPoison',
|
||||
// name: 'input-supplies-ratPoison',
|
||||
// component: () => import('@/views/inputSuppliesManage/material/ratPoison/index.vue'),
|
||||
// meta: { title: '兽药管理', icon: '' },
|
||||
// },
|
||||
{
|
||||
path: '/sub-government-affairs-service/material/seed',
|
||||
name: 'input-supplies-seed',
|
||||
component: () => import('@/views/inputSuppliesManage/material/seed/index.vue'),
|
||||
meta: { title: '种源管理', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/material/farmMachinery',
|
||||
name: 'input-supplies-farmMachinery',
|
||||
component: () => import('@/views/inputSuppliesManage/material/farmMachinery/index.vue'),
|
||||
meta: { title: '农机管理', icon: '' },
|
||||
meta: { title: '种子管理', icon: '' },
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/material/farmMachinery',
|
||||
// name: 'input-supplies-farmMachinery',
|
||||
// component: () => import('@/views/inputSuppliesManage/material/farmMachinery/index.vue'),
|
||||
// meta: { title: '农机管理', icon: '' },
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/productionDealer',
|
||||
name: 'productionDealer',
|
||||
component: () => import('@/views/inputSuppliesManage/productionDealer/index.vue'),
|
||||
meta: { title: '企业经销商管理', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/enterpriseDealerCheck',
|
||||
name: 'enterpriseDealerCheck',
|
||||
component: () => import('@/views/inputSuppliesManage/enterpriseDealerCheck/index.vue'),
|
||||
meta: { title: '企业经销商抽检', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/useSupervise',
|
||||
name: 'useSupervise',
|
||||
component: () => import('@/views/inputSuppliesManage/useSupervise/index.vue'),
|
||||
meta: { title: '使用监管', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/leaseSupervise',
|
||||
name: 'leaseSupervise',
|
||||
component: () => import('@/views/inputSuppliesManage/leaseSupervise/index.vue'),
|
||||
meta: { title: '农机租赁监管', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/redBlackRank',
|
||||
name: 'redBlackRank',
|
||||
component: () => import('@/views/inputSuppliesManage/redBlackRank/index.vue'),
|
||||
meta: { title: '企业红黑榜', icon: '' },
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/productionDealer',
|
||||
// name: 'productionDealer',
|
||||
// component: () => import('@/views/inputSuppliesManage/productionDealer/index.vue'),
|
||||
// meta: { title: '企业经销商管理', icon: '' },
|
||||
// },
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/enterpriseDealerCheck',
|
||||
// name: 'enterpriseDealerCheck',
|
||||
// component: () => import('@/views/inputSuppliesManage/enterpriseDealerCheck/index.vue'),
|
||||
// meta: { title: '企业经销商抽检', icon: '' },
|
||||
// },
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/useSupervise',
|
||||
// name: 'useSupervise',
|
||||
// component: () => import('@/views/inputSuppliesManage/useSupervise/index.vue'),
|
||||
// meta: { title: '使用监管', icon: '' },
|
||||
// },
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/leaseSupervise',
|
||||
// name: 'leaseSupervise',
|
||||
// component: () => import('@/views/inputSuppliesManage/leaseSupervise/index.vue'),
|
||||
// meta: { title: '农机租赁监管', icon: '' },
|
||||
// },
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/redBlackRank',
|
||||
// name: 'redBlackRank',
|
||||
// component: () => import('@/views/inputSuppliesManage/redBlackRank/index.vue'),
|
||||
// meta: { title: '企业红黑榜', icon: '' },
|
||||
// },
|
||||
{
|
||||
path: '/sub-government-affairs-service/knowledgeManage',
|
||||
name: 'knowledgeManage',
|
||||
|
@ -8,37 +8,37 @@ export default [
|
||||
redirect: '/sub-government-affairs-service/mainHome',
|
||||
meta: { title: '生产经营主体', icon: 'icon-shop' },
|
||||
children: [
|
||||
{
|
||||
path: '/sub-government-affairs-service/mainHome',
|
||||
component: () => import('@/views/productOperateMain/home/index.vue'),
|
||||
name: 'mainHome',
|
||||
meta: { title: '数据可视化管理', icon: '' },
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/mainHome',
|
||||
// component: () => import('@/views/productOperateMain/home/index.vue'),
|
||||
// name: 'mainHome',
|
||||
// meta: { title: '数据可视化管理', icon: '' },
|
||||
// },
|
||||
{
|
||||
path: '/sub-government-affairs-service/individual',
|
||||
component: () => import('@/views/productOperateMain/individual/index.vue'),
|
||||
name: 'individual',
|
||||
meta: { title: '个体户', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/collective',
|
||||
component: () => import('@/views/productOperateMain/collective/index.vue'),
|
||||
name: 'collective',
|
||||
meta: { title: '村集体', icon: '' },
|
||||
meta: { title: '农户', icon: '' },
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/collective',
|
||||
// component: () => import('@/views/productOperateMain/collective/index.vue'),
|
||||
// name: 'collective',
|
||||
// meta: { title: '村集体', icon: '' },
|
||||
// },
|
||||
{
|
||||
path: '/sub-government-affairs-service/coop',
|
||||
component: () => import('@/views/productOperateMain/coOp/index.vue'),
|
||||
name: 'coop',
|
||||
meta: { title: '合作社', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/enterprise',
|
||||
component: () => import('@/views/productOperateMain/enterprise/index.vue'),
|
||||
name: 'enterprise',
|
||||
meta: { title: '经营企业', icon: '' },
|
||||
meta: { title: '农企合作社', icon: '' },
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/enterprise',
|
||||
// component: () => import('@/views/productOperateMain/enterprise/index.vue'),
|
||||
// name: 'enterprise',
|
||||
// meta: { title: '经营企业', icon: '' },
|
||||
// },
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/individual',
|
||||
// component: () => import('@/views/productOperateMain/individual/index.vue'),
|
||||
// name: 'individual',
|
||||
@ -68,12 +68,12 @@ export default [
|
||||
name: 'examineList',
|
||||
meta: { title: '主体审核管理', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/examineRecord',
|
||||
component: () => import('@/views/productOperateMain/examine/record.vue'),
|
||||
name: 'examineRecord',
|
||||
meta: { title: '主体审核历史', icon: '' },
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/examineRecord',
|
||||
// component: () => import('@/views/productOperateMain/examine/record.vue'),
|
||||
// name: 'examineRecord',
|
||||
// meta: { title: '主体审核历史', icon: '' },
|
||||
// },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
@ -21,27 +21,27 @@ export default [
|
||||
children: [
|
||||
{
|
||||
path: '/sub-government-affairs-service/add-grid',
|
||||
component: () => import('@/views/resource/grid/index.vue'),
|
||||
component: () => import('@/views/resource/grid/AddGrid.vue'),
|
||||
name: 'add',
|
||||
meta: { title: '新增网格', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/add--grid-member',
|
||||
component: () => import('@/views/resource/grid/AddGridMember.vue'),
|
||||
component: () => import('@/views/resource/grid/GridMember.vue'),
|
||||
name: 'member',
|
||||
meta: { title: '新增网格员', icon: '' },
|
||||
},
|
||||
{
|
||||
path: '/sub-government-affairs-service/grid--management',
|
||||
component: () => import('@/views/resource/grid/GridManagement.vue'),
|
||||
name: 'management',
|
||||
meta: { title: '网格化管理', icon: '' },
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/grid--management',
|
||||
// component: () => import('@/views/resource/grid/GridManagement.vue'),
|
||||
// name: 'management',
|
||||
// meta: { title: '网格化管理', icon: '' },
|
||||
// },
|
||||
],
|
||||
},
|
||||
...annualplanRouters,
|
||||
...landsRoutes,
|
||||
...statisticsRoutes,
|
||||
// ...statisticsRoutes,
|
||||
...dictRoutes,
|
||||
],
|
||||
},
|
||||
|
@ -8,12 +8,12 @@ export default [
|
||||
redirect: '/sub-government-affairs-service/analysis-land',
|
||||
meta: { title: '统计分析', icon: 'icon-test' },
|
||||
children: [
|
||||
{
|
||||
path: '/sub-government-affairs-service/analysis-land',
|
||||
component: () => import('@/views/resource/statisticAnalysis/land/index.vue'),
|
||||
name: 'analysis-land',
|
||||
meta: { title: '土地利用与规划分析', icon: '' },
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/analysis-land',
|
||||
// component: () => import('@/views/resource/statisticAnalysis/land/index.vue'),
|
||||
// name: 'analysis-land',
|
||||
// meta: { title: '土地利用与规划分析', icon: '' },
|
||||
// },
|
||||
{
|
||||
path: '/sub-government-affairs-service/analysis-agriculture',
|
||||
name: 'analysis-agriculture',
|
||||
|
@ -13,7 +13,7 @@ export default [
|
||||
path: '/sub-government-affairs-service/record',
|
||||
name: 'record',
|
||||
component: Views,
|
||||
meta: { title: '种养植档案', icon: 'Tickets' },
|
||||
meta: { title: '种植档案', icon: 'Tickets' },
|
||||
redirect: '/sub-government-affairs-service/record-base',
|
||||
children: [
|
||||
{
|
||||
@ -26,7 +26,7 @@ export default [
|
||||
path: '/sub-government-affairs-service/record-seed',
|
||||
component: () => import('@/views/trace/record/seed/index.vue'),
|
||||
name: 'record-seed',
|
||||
meta: { title: '种源档案', icon: '' },
|
||||
meta: { title: '种子档案', icon: '' },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -6,13 +6,13 @@
|
||||
<b class="statistic-title">综合数据统计</b>
|
||||
<el-row :gutter="16" style="margin-top: 40px">
|
||||
<el-col :span="8" class="text-center">
|
||||
<p>农村人口</p>
|
||||
<p>人口</p>
|
||||
<avue-count-up end="27.88" :decimals="2" class="text-primary" />
|
||||
<em>万人</em>
|
||||
</el-col>
|
||||
<el-col :span="8" class="text-center">
|
||||
<p>耕地面积</p>
|
||||
<avue-count-up end="103.88" :decimals="2" class="text-warning" />
|
||||
<avue-count-up end="17" :decimals="2" class="text-warning" />
|
||||
<em>万亩</em>
|
||||
</el-col>
|
||||
<el-col :span="8" class="text-center">
|
||||
@ -38,7 +38,8 @@
|
||||
<el-row :gutter="16" style="margin-bottom: 20px">
|
||||
<el-col :span="12">
|
||||
<el-card shadow="hover">
|
||||
<custom-echart-bar :chart-data="state.breedingData" height="400px" :option="state.breedingOption" />
|
||||
<!-- <custom-echart-bar :chart-data="state.breedingData" height="400px" :option="state.breedingOption" /> -->
|
||||
<custom-echart-pie :chart-data="state.businessData" height="400px" :option="state.businessOption" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -51,14 +52,15 @@
|
||||
<el-row :gutter="16" style="margin-bottom: 20px">
|
||||
<el-col :span="12">
|
||||
<el-card shadow="hover">
|
||||
<custom-echart-pie :chart-data="state.businessData" height="400px" :option="state.businessOption" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card shadow="hover">
|
||||
<!-- <custom-echart-pie :chart-data="state.businessData" height="400px" :option="state.businessOption" /> -->
|
||||
<custom-echart-mixin :chart-data="state.codingData" :option="state.codingOption" height="400px" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-card shadow="hover">
|
||||
<custom-echart-mixin :chart-data="state.codingData" :option="state.codingOption" height="400px" />
|
||||
</el-card>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
@ -85,11 +87,11 @@ const state = reactive({
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '亩',
|
||||
name: '万亩',
|
||||
},
|
||||
tooltip: {
|
||||
formatter: function (params) {
|
||||
return `${params.name}:${params.value}亩`;
|
||||
return `${params.name}:${params.value}万亩`;
|
||||
},
|
||||
},
|
||||
barStyle: {
|
||||
@ -101,16 +103,16 @@ const state = reactive({
|
||||
},
|
||||
},
|
||||
areaData: [
|
||||
{ value: 230, name: '耿马镇' },
|
||||
{ value: 165, name: '勐永镇' },
|
||||
{ value: 217, name: '勐撒镇' },
|
||||
{ value: 200, name: '孟定镇' },
|
||||
{ value: 305, name: '大兴乡' },
|
||||
{ value: 2, name: '耿马镇' },
|
||||
{ value: 6, name: '勐永镇' },
|
||||
{ value: 4, name: '勐撒镇' },
|
||||
{ value: 2, name: '孟定镇' },
|
||||
{ value: 3, name: '大兴乡' },
|
||||
],
|
||||
breedingOption: {
|
||||
color: ['#41b879', '#fed500'],
|
||||
title: {
|
||||
text: '种养殖综合数据统计',
|
||||
text: '种殖综合数据统计',
|
||||
textStyle: {
|
||||
color: '#333',
|
||||
},
|
||||
@ -131,9 +133,9 @@ const state = reactive({
|
||||
},
|
||||
breedingData: [
|
||||
{ value: 230, name: '种植面积', unit: '亩' },
|
||||
{ value: 165, name: '养殖面积', unit: '亩' },
|
||||
// { value: 165, name: '养殖面积', unit: '亩' },
|
||||
{ value: 217, name: '种植基地', unit: '个' },
|
||||
{ value: 200, name: '养殖基地', unit: '个' },
|
||||
// { value: 200, name: '养殖基地', unit: '个' },
|
||||
],
|
||||
inputsOption: {
|
||||
color: ['#ffd500'],
|
||||
@ -192,9 +194,9 @@ const state = reactive({
|
||||
},
|
||||
inputsData: [
|
||||
{ value: 75, name: '农药使用', type: '投入品', max: 100, unit: '吨' },
|
||||
{ value: 38, name: '农机使用', type: '投入品', max: 100, unit: '台' },
|
||||
{ value: 74, name: '种源使用', type: '投入品', max: 100, unit: '万吨' },
|
||||
{ value: 55, name: '兽药使用', type: '投入品', max: 100, unit: '千克' },
|
||||
// { value: 38, name: '农机使用', type: '投入品', max: 100, unit: '台' },
|
||||
{ value: 18, name: '种子使用', type: '投入品', max: 100, unit: '吨' },
|
||||
// { value: 55, name: '兽药使用', type: '投入品', max: 100, unit: '千克' },
|
||||
{ value: 65, name: '肥料使用', type: '投入品', max: 100, unit: '吨' },
|
||||
],
|
||||
businessOption: {
|
||||
@ -233,12 +235,12 @@ const state = reactive({
|
||||
],
|
||||
},
|
||||
businessData: [
|
||||
{ value: 28, name: '个体户' },
|
||||
{ value: 358, name: '村集体' },
|
||||
{ value: 217, name: '合作社' },
|
||||
{ value: 128, name: '农资企业' },
|
||||
{ value: 22, name: '种源企业' },
|
||||
{ value: 41, name: '生产加工企业' },
|
||||
{ value: 217, name: '农户' },
|
||||
// { value: 358, name: '村集体' },
|
||||
{ value: 28, name: '农企/合作社' },
|
||||
// { value: 128, name: '农资企业' },
|
||||
// { value: 22, name: '种源企业' },
|
||||
// { value: 41, name: '生产加工企业' },
|
||||
],
|
||||
codingOption: {
|
||||
color: ['#41b879', '#ffd500'],
|
||||
|
@ -21,7 +21,8 @@
|
||||
@row-update="handleRowUpdate"
|
||||
>
|
||||
<template #menu="{ row }">
|
||||
<el-button type="primary">详情</el-button>
|
||||
<!-- <el-button type="primary">详情</el-button> -->
|
||||
暂无
|
||||
</template>
|
||||
</avue-crud>
|
||||
</section>
|
||||
@ -154,16 +155,65 @@ async function getData(resetPage) {
|
||||
searchCondition.value
|
||||
);
|
||||
console.log('params', params);
|
||||
for (let i = 0; i < 14; i++) {
|
||||
data.value.push({
|
||||
taskNum: '20220101' + `${i}${i}${i}${i}${i}`,
|
||||
taskType: i % 2 == 0 ? '0' : '1',
|
||||
enterpriseName: '上海XX有限公司',
|
||||
enterpriseOwner: '张三',
|
||||
phone: '123456789',
|
||||
status: i % 2 == 0 ? '0' : '1',
|
||||
});
|
||||
}
|
||||
data.value = [
|
||||
{
|
||||
taskNum: '202451211',
|
||||
taskType: '0',
|
||||
enterpriseName: '合肥丰乐种业股份有限公司',
|
||||
enterpriseOwner: '戴登安',
|
||||
phone: '18785733748',
|
||||
status: '0',
|
||||
},
|
||||
{
|
||||
taskNum: '202471241',
|
||||
taskType: '0',
|
||||
enterpriseName: '山东登海种业股份有限公司',
|
||||
enterpriseOwner: '唐世伟',
|
||||
phone: '18785733748',
|
||||
status: '0',
|
||||
},
|
||||
{
|
||||
taskNum: '2024111241',
|
||||
taskType: '0',
|
||||
enterpriseName: '甘肃省敦煌种业股份有限公司',
|
||||
enterpriseOwner: '李世晓',
|
||||
phone: '15685474526',
|
||||
status: '0',
|
||||
},
|
||||
{
|
||||
taskNum: '2024112244',
|
||||
taskType: '1',
|
||||
enterpriseName: '河南秋乐种业科技股份有限公司',
|
||||
enterpriseOwner: '侯传伟',
|
||||
phone: '17485693256',
|
||||
status: '1',
|
||||
},
|
||||
{
|
||||
taskNum: '2024122242',
|
||||
taskType: '0',
|
||||
enterpriseName: '安徽荃银高科种业股份有限公司',
|
||||
enterpriseOwner: '应敏杰',
|
||||
phone: '18423568745',
|
||||
status: '0',
|
||||
},
|
||||
{
|
||||
taskNum: '2024122242',
|
||||
taskType: '0',
|
||||
enterpriseName: '辽宁东亚种业有限公司',
|
||||
enterpriseOwner: '杨永华',
|
||||
phone: '15236989568',
|
||||
status: '0',
|
||||
},
|
||||
{
|
||||
taskNum: '202472255',
|
||||
taskType: '0',
|
||||
enterpriseName: '云南广大种业有限公司',
|
||||
enterpriseOwner: '王云贵',
|
||||
phone: '13888965335',
|
||||
status: '0',
|
||||
},
|
||||
];
|
||||
|
||||
pageData.value.total = data.value.length;
|
||||
_loading.value = false;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<section class="custom-page">
|
||||
<h2>种源基本信息</h2>
|
||||
<h2>种子基本信息</h2>
|
||||
<TypeMenu v-if="materialTypes['4'].length > 1" v-model:type="_type" :types="materialTypes['4']" />
|
||||
<br />
|
||||
<avue-crud
|
||||
@ -77,7 +77,7 @@ const option = ref({
|
||||
menuWidth: 160,
|
||||
column: [
|
||||
{
|
||||
label: '种源名称',
|
||||
label: '种子名称',
|
||||
prop: 'keywords',
|
||||
hide: true,
|
||||
search: true,
|
||||
@ -86,9 +86,9 @@ const option = ref({
|
||||
editDisplay: false,
|
||||
},
|
||||
{
|
||||
label: '种源名称',
|
||||
label: '种子名称',
|
||||
prop: 'seedName',
|
||||
rules: customRules({ msg: '请输入种源名称' }),
|
||||
rules: customRules({ msg: '请输入种子名称' }),
|
||||
},
|
||||
{
|
||||
prop: 'manufacturer',
|
||||
|
@ -4,7 +4,6 @@
|
||||
ref="crudRef"
|
||||
v-model:search="searchCondition"
|
||||
v-model:page="pageData"
|
||||
:table-loading="_loading"
|
||||
:option="option"
|
||||
:data="data"
|
||||
@search-change="
|
||||
|
@ -53,20 +53,20 @@ const state = reactive({
|
||||
...CRUD_OPTIONS,
|
||||
// addBtnText: '添加网格',
|
||||
column: [
|
||||
{
|
||||
label: '网格区',
|
||||
prop: 'gridArea',
|
||||
search: true,
|
||||
width: 200,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: true,
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// label: '网格区',
|
||||
// prop: 'gridArea',
|
||||
// search: true,
|
||||
// width: 200,
|
||||
// addDisplay: false,
|
||||
// editDisplay: false,
|
||||
// viewDisplay: true,
|
||||
// rules: {
|
||||
// required: true,
|
||||
// message: '请输入',
|
||||
// trigger: 'blur',
|
||||
// },
|
||||
// },
|
||||
{
|
||||
label: '网格名称',
|
||||
prop: 'gridName',
|
||||
@ -80,7 +80,7 @@ const state = reactive({
|
||||
{
|
||||
label: '网格区域',
|
||||
prop: 'gridAreaName',
|
||||
width: 300,
|
||||
// width: 300,
|
||||
display: false,
|
||||
rules: {
|
||||
required: true,
|
||||
@ -117,24 +117,24 @@ const state = reactive({
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '网格管理员',
|
||||
prop: 'gridManager',
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '联系方式',
|
||||
prop: 'contactInfo',
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// label: '网格管理员',
|
||||
// prop: 'gridManager',
|
||||
// rules: {
|
||||
// required: true,
|
||||
// message: '请输入',
|
||||
// trigger: 'blur',
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// label: '联系方式',
|
||||
// prop: 'contactInfo',
|
||||
// rules: {
|
||||
// required: true,
|
||||
// message: '请输入',
|
||||
// trigger: 'blur',
|
||||
// },
|
||||
// },
|
||||
{
|
||||
label: '省',
|
||||
prop: 'provinceCode',
|
||||
@ -172,7 +172,7 @@ const state = reactive({
|
||||
span: 24,
|
||||
rows: 4,
|
||||
overHidden: true,
|
||||
width: 200,
|
||||
// width: 200,
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
|
@ -28,159 +28,99 @@
|
||||
</avue-crud>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { useApp } from '@/hooks';
|
||||
import { CRUD_OPTIONS } from '@/config';
|
||||
import { isEmpty, downloadFile } from '@/utils';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import { compact } from 'lodash';
|
||||
import { GetEntityList, AddEntity, UpdateEntity, DeleteEntity, ExportEntity } from '@/apis/resource/grid';
|
||||
|
||||
// 请根据你的项目路径替换为实际的接口路径
|
||||
import { GetGridList, GetMemberList, AddMember, UpdateMember, DeleteMember, ExportMember } from '@/apis/resource/member';
|
||||
|
||||
const { VITE_APP_BASE_API } = import.meta.env;
|
||||
const app = useApp();
|
||||
const UserStore = useUserStore();
|
||||
const crudRef = ref(null);
|
||||
|
||||
const state = reactive({
|
||||
loading: false,
|
||||
query: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
},
|
||||
query: { current: 1, size: 10 },
|
||||
form: {},
|
||||
selection: [],
|
||||
gridOptions: [],
|
||||
options: {
|
||||
...CRUD_OPTIONS,
|
||||
// addBtnText: '添加网格',
|
||||
column: [
|
||||
{
|
||||
label: '网格区',
|
||||
prop: 'gridArea',
|
||||
label: '网格员姓名',
|
||||
prop: 'memberName',
|
||||
searchLabelWidth: 100,
|
||||
search: true,
|
||||
width: 200,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: true,
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
message: '请输入网格员姓名',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '网格名称',
|
||||
prop: 'gridName',
|
||||
search: true,
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '网格区域',
|
||||
label: '所属行政区域',
|
||||
prop: 'gridAreaName',
|
||||
width: 300,
|
||||
display: false,
|
||||
searchLabelWidth: 110,
|
||||
search: true,
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
message: '请输入所属区域',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '网格区域',
|
||||
prop: 'cities',
|
||||
type: 'cascader',
|
||||
hide: true,
|
||||
addDisplay: true,
|
||||
editDisplay: true,
|
||||
viewDisplay: false,
|
||||
// multiple: true,
|
||||
// checkStrictly: true,
|
||||
// collapseTags: true,
|
||||
// emitPath: false,
|
||||
// checkDescendants: false,
|
||||
label: '所属网格',
|
||||
prop: 'gridId',
|
||||
type: 'select',
|
||||
width: 200,
|
||||
search: true,
|
||||
dicData: [], // 初始为空,将在mounted中填充
|
||||
props: {
|
||||
label: 'areaName',
|
||||
value: 'areaCode',
|
||||
children: 'areaChildVOS',
|
||||
label: 'gridName',
|
||||
value: 'id',
|
||||
},
|
||||
dicUrl: `${VITE_APP_BASE_API}/system/area/region?areaCode=530000`,
|
||||
dicHeaders: {
|
||||
authorization: UserStore.token,
|
||||
},
|
||||
dicFormatter: (res) => res.data ?? [],
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请选择',
|
||||
trigger: 'blur',
|
||||
message: '请选择所属网格',
|
||||
trigger: 'change',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '网格管理员',
|
||||
prop: 'gridManager',
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
label: '管理员标识',
|
||||
prop: 'adminFlag',
|
||||
type: 'radio',
|
||||
dicData: [
|
||||
{ label: '是', value: '1' },
|
||||
{ label: '否', value: '0' },
|
||||
],
|
||||
valueDefault: '0',
|
||||
hide: true, // 隐藏字段,如需显示可设置为false
|
||||
},
|
||||
{
|
||||
label: '联系方式',
|
||||
prop: 'contactInfo',
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '省',
|
||||
prop: 'provinceCode',
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: '市',
|
||||
prop: 'cityCode',
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: '县/区',
|
||||
prop: 'gridAreaCode',
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: '乡镇',
|
||||
prop: 'townCode',
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: '乡镇',
|
||||
prop: 'village',
|
||||
hide: true,
|
||||
display: false,
|
||||
label: '电话号码',
|
||||
prop: 'phone',
|
||||
rules: [
|
||||
{ required: true, message: '请输入电话号码', trigger: 'blur' },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
prop: 'note',
|
||||
type: 'textarea',
|
||||
span: 24,
|
||||
rows: 4,
|
||||
rows: 3,
|
||||
overHidden: true,
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
prop: 'createTime',
|
||||
width: 200,
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
@ -210,10 +150,9 @@ const state = reactive({
|
||||
currentRow: {},
|
||||
});
|
||||
|
||||
// 加载
|
||||
const loadData = () => {
|
||||
state.loading = true;
|
||||
GetEntityList(state.query)
|
||||
GetMemberList(state.query)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
const { current, size, total, records } = res.data;
|
||||
@ -233,60 +172,56 @@ const loadData = () => {
|
||||
state.loading = false;
|
||||
});
|
||||
};
|
||||
|
||||
loadData();
|
||||
|
||||
// 页数
|
||||
// 加载网格列表
|
||||
const loadGridOptions = async () => {
|
||||
try {
|
||||
const res = await GetGridList(); // 获取足够多的网格数据
|
||||
if (res.code === 200) {
|
||||
state.options.column.find((item) => item.prop === 'gridId').dicData = res.data.records;
|
||||
}
|
||||
} catch (error) {
|
||||
app.$message.error('获取网格列表失败');
|
||||
}
|
||||
};
|
||||
loadGridOptions();
|
||||
const currentChange = (current) => {
|
||||
state.query.current = current;
|
||||
loadData();
|
||||
// state.query.current = current;
|
||||
// loadData();
|
||||
};
|
||||
|
||||
// 条数
|
||||
const sizeChange = (size) => {
|
||||
state.query.size = size;
|
||||
loadData();
|
||||
// state.query.size = size;
|
||||
// loadData();
|
||||
};
|
||||
|
||||
// 搜索
|
||||
const searchChange = (params, done) => {
|
||||
if (done) done();
|
||||
state.query = params;
|
||||
state.query.current = 1;
|
||||
loadData();
|
||||
// if (done) done();
|
||||
// state.query = params;
|
||||
// state.query.current = 1;
|
||||
// loadData();
|
||||
};
|
||||
|
||||
// 刷新
|
||||
const refreshChange = () => {
|
||||
loadData();
|
||||
app.$message.success('刷新成功');
|
||||
};
|
||||
|
||||
// 选择
|
||||
const selectionChange = (rows) => {
|
||||
state.selection = rows;
|
||||
};
|
||||
|
||||
// 查看
|
||||
const rowView = (row) => {
|
||||
crudRef.value.rowView(row);
|
||||
};
|
||||
|
||||
const setCity = (row) => {
|
||||
if (!isEmpty(row.cities)) {
|
||||
row.provinceCode = row?.cities[0] ?? null;
|
||||
row.cityCode = row?.cities[1] ?? null;
|
||||
row.gridAreaCode = row?.cities[2] ?? null;
|
||||
row.townCode = row?.cities[3] ?? null;
|
||||
row.village = row?.cities[4] ?? null;
|
||||
// row.village = row?.cities.join(',');
|
||||
}
|
||||
const rowEdit = (row) => {
|
||||
crudRef.value.rowEdit(row);
|
||||
};
|
||||
|
||||
// 新增
|
||||
const rowSave = (row, done, loading) => {
|
||||
setCity(row);
|
||||
AddEntity(row)
|
||||
AddMember(row)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
app.$message.success('添加成功!');
|
||||
@ -294,23 +229,12 @@ const rowSave = (row, done, loading) => {
|
||||
loadData();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
app.$message.error(err.msg);
|
||||
})
|
||||
.finally(() => {
|
||||
loading();
|
||||
});
|
||||
.catch((err) => app.$message.error(err.msg))
|
||||
.finally(() => loading());
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const rowEdit = (row) => {
|
||||
const village = !isEmpty(row.village) ? row.village : [];
|
||||
row.cities = compact([row.provinceCode, row.cityCode, row.gridAreaCode ?? '', row.townCode ?? '', ...village]);
|
||||
crudRef.value.rowEdit(row);
|
||||
};
|
||||
const rowUpdate = (row, index, done, loading) => {
|
||||
setCity(row);
|
||||
UpdateEntity(row)
|
||||
UpdateMember(row)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
app.$message.success('更新成功!');
|
||||
@ -318,56 +242,48 @@ const rowUpdate = (row, index, done, loading) => {
|
||||
loadData();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
app.$message.error(err.msg);
|
||||
})
|
||||
.finally(() => {
|
||||
loading();
|
||||
});
|
||||
.catch((err) => app.$message.error(err.msg))
|
||||
.finally(() => loading());
|
||||
};
|
||||
|
||||
// 删除
|
||||
const rowDel = (row, index, done) => {
|
||||
if (isEmpty(row)) return;
|
||||
app
|
||||
.$confirm(`删除后信息将不可查看,确认要删除吗?`, '确定删除', {
|
||||
.$confirm(`确认删除该网格员吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
DeleteEntity({ id: row.id })
|
||||
DeleteMember(row.id) // 👈 只传 id
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
app.$message.success('删除成功!');
|
||||
loadData();
|
||||
done?.(); // 若使用 Table 的 inline 操作支持回调
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
app.$message.error(err.msg);
|
||||
});
|
||||
.catch((err) => app.$message.error(err.msg || '删除失败'));
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
// 导出
|
||||
const onExport = () => {
|
||||
if (isEmpty(state.data)) {
|
||||
app.$message.error('当前暂时没有可供导出的数据!');
|
||||
return;
|
||||
}
|
||||
state.loading = true;
|
||||
const fileName = '网格明细表';
|
||||
ExportEntity(state.query)
|
||||
|
||||
// 仅发送有效的查询条件
|
||||
const { current, size, ...query } = state.query;
|
||||
|
||||
ExportMember(query)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
downloadFile(res.data, `${fileName}.xlsx`, 'blob');
|
||||
app.$message.success('导出成功!');
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
app.$message.error('导出失败!');
|
||||
downloadFile(res, '网格员明细表.xlsx', 'blob');
|
||||
app.$message.success('导出成功!');
|
||||
})
|
||||
.catch(() => app.$message.error('导出失败!'))
|
||||
.finally(() => {
|
||||
state.loading = false;
|
||||
});
|
@ -6,7 +6,7 @@
|
||||
v-model:search="state.query"
|
||||
v-model:page="state.page"
|
||||
:table-loading="state.loading"
|
||||
:data="state.data"
|
||||
:data="res"
|
||||
:option="state.options"
|
||||
@refresh-change="refreshChange"
|
||||
@search-reset="searchChange"
|
||||
@ -32,25 +32,78 @@ import { sleep } from '@/utils';
|
||||
import { CRUD_OPTIONS } from '@/config';
|
||||
|
||||
import Mock from 'mockjs';
|
||||
const res = Mock.mock({
|
||||
'data|20': [
|
||||
{
|
||||
id: '@increment(100000)',
|
||||
// name: '@ctitle(5,10)',
|
||||
name: '一号基地',
|
||||
'area|100-1000': 100,
|
||||
'status|1-2': 1,
|
||||
location: '东经 98°53′至 99°15′,北纬 23°27′至 23°40′F',
|
||||
'type|1-2': 1,
|
||||
'p1|1-2': 1,
|
||||
'p2|100-1000': 100,
|
||||
p3: '@cname(2,3)',
|
||||
tag: '龙津河周边',
|
||||
address: '耿马镇白塔社区',
|
||||
createTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
|
||||
},
|
||||
],
|
||||
});
|
||||
const res = [
|
||||
{
|
||||
id: '1000012',
|
||||
name: `1号基地`,
|
||||
area: 100,
|
||||
status: 1,
|
||||
location: '东经 92°54′至 99°23′,北纬 20°27′至 18°41′F',
|
||||
type: 1,
|
||||
p1: 1,
|
||||
p2: 100,
|
||||
p3: '农户',
|
||||
tag: '龙津河周边',
|
||||
address: '耿马镇白塔社区',
|
||||
createTime: '2024-10-12 22:30',
|
||||
},
|
||||
{
|
||||
id: '1000013',
|
||||
name: `2号基地`,
|
||||
area: 211,
|
||||
status: 1,
|
||||
location: '东经 92°54′至 99°21′,北纬 20°25′至 18°31′F',
|
||||
type: 1,
|
||||
p1: 1,
|
||||
p2: 120,
|
||||
p3: '农户',
|
||||
tag: '龙津河周边',
|
||||
address: '耿马镇白马社区',
|
||||
createTime: '2024-02-26 20:30',
|
||||
},
|
||||
{
|
||||
id: '1000014',
|
||||
name: `3号基地`,
|
||||
area: 121,
|
||||
status: 1,
|
||||
location: '东经 92°53′至 99°22′,北纬 20°21′至 18°32′F',
|
||||
type: 1,
|
||||
p1: 1,
|
||||
p2: 56,
|
||||
p3: '合作社',
|
||||
tag: '龙津河周边',
|
||||
address: '耿马镇石灰窑村',
|
||||
createTime: '2024-11-02 23:30',
|
||||
},
|
||||
{
|
||||
id: '1000015',
|
||||
name: `4号基地`,
|
||||
area: 231,
|
||||
status: 2,
|
||||
location: '东经 92°53′至 99°22′,北纬 20°21′至 18°32′F',
|
||||
type: 2,
|
||||
p1: 2,
|
||||
p2: 145,
|
||||
p3: '农户',
|
||||
tag: '龙津河周边',
|
||||
address: '耿马镇芒蚌村',
|
||||
createTime: '2024-02-02 12:30',
|
||||
},
|
||||
{
|
||||
id: '1000016',
|
||||
name: `5号基地`,
|
||||
area: 231,
|
||||
status: 2,
|
||||
location: '东经 92°43′至 99°26′,北纬 21°21′至 18°22′F',
|
||||
type: 2,
|
||||
p1: 2,
|
||||
p2: 145,
|
||||
p3: '农户',
|
||||
tag: '龙津河周边',
|
||||
address: '耿马镇菜籽地村',
|
||||
createTime: '2024-04-12 16:21',
|
||||
},
|
||||
];
|
||||
|
||||
const app = useApp();
|
||||
const crudRef = ref(null);
|
||||
@ -190,7 +243,7 @@ const state = reactive({
|
||||
trigger: 'blur',
|
||||
},
|
||||
formatter: (row) => {
|
||||
return row.area + 'm';
|
||||
return row.p2 + 'm';
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -251,7 +304,7 @@ const loadData = async () => {
|
||||
await sleep(500);
|
||||
state.data = res.data;
|
||||
state.page = {
|
||||
total: 20,
|
||||
total: 5,
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
|
@ -33,11 +33,27 @@ import { CRUD_OPTIONS } from '@/config';
|
||||
|
||||
import Mock from 'mockjs';
|
||||
const res = Mock.mock({
|
||||
'data|20': [
|
||||
'data|2': [
|
||||
{
|
||||
id: '@increment(100000)',
|
||||
name: '@ctitle(5,10)',
|
||||
shop: '@ctitle(10,30)',
|
||||
name: '小麦',
|
||||
shop: '万好芽种公司',
|
||||
buyTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
|
||||
avalibleTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
|
||||
createdTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
|
||||
},
|
||||
{
|
||||
id: '@increment(100000)',
|
||||
name: '玉米',
|
||||
shop: '万好芽种公司',
|
||||
buyTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
|
||||
avalibleTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
|
||||
createdTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
|
||||
},
|
||||
{
|
||||
id: '@increment(100000)',
|
||||
name: '南瓜',
|
||||
shop: '丰隆种源专卖点',
|
||||
buyTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
|
||||
avalibleTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
|
||||
createdTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
|
||||
@ -74,7 +90,7 @@ const state = reactive({
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '供应商',
|
||||
label: '生产厂家',
|
||||
prop: 'shop',
|
||||
search: true,
|
||||
with: 300,
|
||||
@ -153,7 +169,7 @@ const loadData = async () => {
|
||||
await sleep(500);
|
||||
state.data = res.data;
|
||||
state.page = {
|
||||
total: 20,
|
||||
total: 6,
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
|
@ -9,7 +9,7 @@
|
||||
<el-card class="search-card" shadow="hover">
|
||||
<div class="search-card-item">
|
||||
<span class="icon"><img :src="getAssetsFile('images/trace/search-1.png')" /></span>
|
||||
<span class="text">种养植档案管理</span>
|
||||
<span class="text">种植档案管理</span>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="search-card-connector"></div>
|
||||
|
@ -235,35 +235,39 @@ const loadData = async () => {
|
||||
await sleep(500);
|
||||
state.rankList = [
|
||||
{
|
||||
name: '个人',
|
||||
num: 1000,
|
||||
name: '农户',
|
||||
num: 1389,
|
||||
icon: '1',
|
||||
},
|
||||
{
|
||||
name: '合作社',
|
||||
num: 1000,
|
||||
name: '农企/合作社',
|
||||
num: 54,
|
||||
icon: '2',
|
||||
},
|
||||
{
|
||||
name: '农业企业',
|
||||
num: 1000,
|
||||
icon: '3',
|
||||
},
|
||||
{
|
||||
name: '种植企业',
|
||||
num: 1000,
|
||||
icon: '4',
|
||||
},
|
||||
// {
|
||||
// name: '农业企业',
|
||||
// num: 1000,
|
||||
// icon: '3',
|
||||
// },
|
||||
// {
|
||||
// name: '种植企业',
|
||||
// num: 1000,
|
||||
// icon: '4',
|
||||
// },
|
||||
];
|
||||
state.data = [
|
||||
{ p1: '耿马佑氏种植专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
{ p1: '耿马金田园种植专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
{ p1: '耿马原生茶叶种植专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
{ p1: '耿马华侨金国源农业专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
{ p1: '耿马尖山沿边魔芋种植农民专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
{ p1: '耿马丰盈种植专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
{ p1: '耿马玉美种植专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
{ p1: '耿马绿生种植专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
{ p1: '耿马纳百川种植专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
{ p1: '耿马助民种植专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
{ p1: '耿马民实种植农民专业合作社', p2: '农残检测中心', p3: '合格', p4: '2025-01-01' },
|
||||
];
|
||||
state.data = mockData(
|
||||
{
|
||||
p1: '红星农业合作社',
|
||||
p2: '农残检测中心',
|
||||
p3: '合格',
|
||||
p4: '2025-01-01',
|
||||
},
|
||||
10
|
||||
);
|
||||
state.loading = false;
|
||||
// GetEntityList(state.query)
|
||||
// .then((res) => {
|
||||
|
@ -9,7 +9,7 @@
|
||||
<el-card class="search-card" shadow="hover">
|
||||
<div class="search-card-item">
|
||||
<span class="icon"><img :src="getAssetsFile('images/trace/search-1.png')" /></span>
|
||||
<span class="text">种养植档案管理</span>
|
||||
<span class="text">种植档案管理</span>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="search-card-connector"></div>
|
||||
|
@ -4,6 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/logo.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<title>运营服务</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -17,3 +17,11 @@ export function agriculturalList(params) {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取用户评价列表
|
||||
export function agriculturalContent(params) {
|
||||
return request('goods/business/category/contentPage', {
|
||||
method: 'POST',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
@ -168,7 +168,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="tabVal == 'evaluate'" class="content-evaluate">
|
||||
<evaluate></evaluate>
|
||||
<evaluate :good-id="goodId"></evaluate>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -188,6 +188,7 @@ import evaluate from './components/evaluate.vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const goodId = route.params.id; // 获取参数
|
||||
|
||||
let bannerList = reactive(['images/ecommerce/' + 'banner.png', 'images/ecommerce/' + 'banner.png']);
|
||||
const tabList = reactive([
|
||||
|
@ -81,10 +81,26 @@ import { isEmpty, getAssetsFile } from '@/utils';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { ref, reactive, onMounted, watch } from 'vue';
|
||||
import upImg from '@/components/upImg.vue';
|
||||
import { agriculturalContent } from '@/apis/agricultural.js';
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
let score = ref(4.5);
|
||||
|
||||
const props = defineProps({
|
||||
goodId: {
|
||||
type: Number,
|
||||
default: () => 0,
|
||||
},
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
type: 1,
|
||||
current: 1,
|
||||
size: 20,
|
||||
goodId: 0,
|
||||
});
|
||||
|
||||
const colors = ref(['#99A9BF', '#25BF82', '#25BF82']);
|
||||
const totalList = reactive([
|
||||
{ title: '全部', name: 'all', num: 912 },
|
||||
@ -106,6 +122,19 @@ const doAnonymous = () => {
|
||||
isAnonymous.value = !isAnonymous.value;
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
data.goodId = props.goodId;
|
||||
getContentList();
|
||||
});
|
||||
|
||||
const getContentList = (type) => {
|
||||
agriculturalContent(data).then((res) => {
|
||||
if (res.code === '200') {
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const submitEvaluate = () => {};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<div class="c-goods-item-warp" @click="toDetail">
|
||||
<div class="c-goods-item-warp" @click="toDetail(data.id)">
|
||||
<div class="goods-img">
|
||||
<el-image :src="getAssetsFile('images/ecommerce/' + 'pic.png')?.href ?? ''" fit="cover" />
|
||||
<img :src="data.goodUrl ? data.goodUrl : ''" alt="" style="width: 100%" />
|
||||
<!-- <el-image :src="encodeURIComponent(data.goodUrl) ? encodeURIComponent(data.goodUrl) : ''" fit="cover" @error="handleImageError" />-->
|
||||
</div>
|
||||
<div class="goods-name txt-ellipsis clamp2">{{ '遇合堂新款禽泰克家禽通用药250遇合堂新款禽泰克家禽通用药250' }}</div>
|
||||
<div class="goods-name txt-ellipsis clamp2">{{ data.title }}</div>
|
||||
<div class="goods-do">
|
||||
<div class="price txt-ellipsis clamp">25.00</div>
|
||||
<div class="price txt-ellipsis clamp">{{ data.goodPrice }}</div>
|
||||
<div class="do">
|
||||
<div class="iconfont icon-cart"></div>
|
||||
</div>
|
||||
@ -13,13 +14,25 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, onMounted, computed } from 'vue';
|
||||
import { isEmpty, getAssetsFile } from '@/utils';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { encodeURL } from 'js-base64';
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const toDetail = () => {
|
||||
let id = '01';
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
|
||||
const handleImageError = (e) => {
|
||||
console.error('图片加载失败:', e);
|
||||
};
|
||||
|
||||
const toDetail = (id) => {
|
||||
router.push('/sub-operation-service/ecommerce-agriculturalDetail?id=' + id);
|
||||
};
|
||||
</script>
|
||||
|
@ -3,15 +3,25 @@
|
||||
<common current-name="agricultural">
|
||||
<template #main>
|
||||
<banner :imglist="bannerList"></banner>
|
||||
<filtertop :list="treeList"></filtertop>
|
||||
<filtertop :list="treeList" @select="selected"></filtertop>
|
||||
<div class="goods-list-warp">
|
||||
<div class="goods-list">
|
||||
<template v-for="(n, index) in 10" :key="n.id">
|
||||
<template v-for="(n, index) in list" :key="n.id">
|
||||
<div class="goods-item">
|
||||
<goodsItem></goodsItem>
|
||||
<goodsItem :data="n"></goodsItem>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-pagination
|
||||
:current-page="pagination.current"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pagination.size"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pagination.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
</common>
|
||||
@ -81,15 +91,49 @@ let params = reactive({
|
||||
parentId: null,
|
||||
childrenId: null,
|
||||
});
|
||||
let pagination = reactive({
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
});
|
||||
const handleSizeChange = (val) => {
|
||||
pagination.size = val;
|
||||
getList();
|
||||
};
|
||||
const handleCurrentChange = (val) => {
|
||||
pagination.current = val;
|
||||
getList();
|
||||
};
|
||||
const getList = () => {
|
||||
params.current = pagination.current;
|
||||
params.size = pagination.size;
|
||||
agriculturalList(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
console.log('res', res);
|
||||
list.splice(0, list.length, ...res.data.records);
|
||||
pagination.total = res.data.total;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
let bannerList = reactive(['images/ecommerce/' + 'banner.png', 'images/ecommerce/' + 'banner1.png']);
|
||||
|
||||
const selected = (data) => {
|
||||
// 获取所有值并转为数组
|
||||
const val = Object.values(data);
|
||||
console.log(data);
|
||||
if (val.length === 1) {
|
||||
params.parentId = val[0].id;
|
||||
} else {
|
||||
if (val[0].id === '') {
|
||||
params.childrenId = '';
|
||||
params.parentId = null;
|
||||
} else {
|
||||
params.childrenId = val[val.length - 1].id;
|
||||
params.parentId = val[val.length - 1].parentId;
|
||||
}
|
||||
}
|
||||
getList();
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.goods-list-warp {
|
||||
|
Loading…
x
Reference in New Issue
Block a user