Compare commits

..

5 Commits

Author SHA1 Message Date
8e782722a5 xiabin 2025-05-14 15:31:55 +08:00
b78bf38587 xiabin 2025-05-14 15:23:32 +08:00
729c2ccd2e 夏滨接入子应用 2025-05-14 15:15:40 +08:00
3cb8d54fe3 xiaibn 2025-05-13 09:32:02 +08:00
0f87afbd32 xiabin 2025-05-12 17:46:49 +08:00
40 changed files with 16210 additions and 1021 deletions

View File

@ -8,6 +8,7 @@ VITE_APP_SUB_OA = '//localhost:9527/sub-operation-admin/'
VITE_APP_SUB_GAS = '//localhost:9528/sub-government-affairs-service/'
VITE_APP_SUB_GAA = '//localhost:9525/sub-government-admin/'
VITE_APP_SUB_GSS = '//localhost:9529/sub-government-screen-service/'
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'

View File

@ -1,11 +1,20 @@
# 正式环境
VITE_APP_NAME = 'daimp-front-main'
VITE_APP_TITLE = '数字农业产业管理平台'
<<<<<<< HEAD
VITE_APP_SUB_OS = '//http://47.109.205.240:88/sub-operation-service/'
VITE_APP_SUB_OA = '//http://47.109.205.240:88/sub-operation-admin/'
VITE_APP_SUB_GAS = '//http://47.109.205.240:88/sub-government-affairs-service/'
VITE_APP_SUB_GAA = '//http://47.109.205.240:88/sub-government-affairs-admin/'
VITE_APP_SUB_GSS = '//http://47.109.205.240:88/sub-government-screen-service/'
VITE_APP_SUB_GSR = '//http://47.109.205.240:88/new-digital-agriculture-screen/'
=======
VITE_APP_SUB_OS = '//47.109.205.240:80/sub-operation-service/'
VITE_APP_SUB_OA = '//47.109.205.240:80/sub-operation-admin/'
VITE_APP_SUB_GAS = '//47.109.205.240:80/sub-government-affairs-service/'
VITE_APP_SUB_GAA = '//47.109.205.240:80/sub-government-admin/'
VITE_APP_SUB_GSS = '//47.109.205.240:80/sub-government-screen-service/'
>>>>>>> dev
# 接口
VITE_APP_BASE_API = '/apis'
VITE_APP_BASE_URL = ''

View File

@ -6,6 +6,7 @@ VITE_APP_SUB_OA = '//192.168.18.99:88/sub-operation-admin/'
VITE_APP_SUB_GAS = '//192.168.18.99:88/sub-government-affairs-service/'
VITE_APP_SUB_GAA = '//192.168.18.99:88/sub-government-admin/'
VITE_APP_SUB_GSS = '//192.168.18.99:88/sub-government-screen-service/'
VITE_APP_SUB_GSR = '//192.168.18.99:88/new-digital-agriculture-screen/'
# 接口
VITE_APP_BASE_API = '/apis'
VITE_APP_BASE_URL = ''

View File

@ -1,6 +1,10 @@
import actions from './actions';
<<<<<<< HEAD
const { VITE_APP_SUB_OS, VITE_APP_SUB_ADMIN, VITE_APP_SUB_GAS, VITE_APP_SUB_GSS, VITE_APP_SUB_GSR } = import.meta.env;
=======
const { VITE_APP_SUB_OS, VITE_APP_SUB_OA, VITE_APP_SUB_APP, VITE_APP_SUB_GAA, VITE_APP_SUB_GAS, VITE_APP_SUB_GSS } = import.meta.env;
>>>>>>> dev
export const leftApps = [
{
@ -56,9 +60,12 @@ export const rightApps = [
icon: 'images/platform/icon-app.png',
},
{
name: 'sub-government-screen-service',
entry: VITE_APP_SUB_GSS,
activeRule: '/sub-government-screen-service',
// name: 'sub-government-screen-service',
name: 'new-digital-agriculture-screen',
// entry: VITE_APP_SUB_GSS,
entry: VITE_APP_SUB_GSR,
// activeRule: '/sub-government-screen-service',
activeRule: '/new-digital-agriculture-screen',
title: '数据大屏',
icon: 'images/platform/icon-screen.png',
},
@ -87,16 +94,19 @@ export const defaultApps = [
icon: 'images/platform/icon-home.png',
},
{
name: 'sub-government-screen-service',
entry: VITE_APP_SUB_GSS,
activeRule: '/sub-government-screen-service',
// name: 'sub-government-screen-service',
name: 'new-digital-agriculture-screen',
// entry: VITE_APP_SUB_GSS,
entry: VITE_APP_SUB_GSR,
// activeRule: '/sub-government-screen-service',
activeRule: '/new-digital-agriculture-screen',
title: '数据大屏',
icon: 'images/platform/icon-screen.png',
},
];
export const microApps = [...defaultApps];
console.log(microApps);
const apps = microApps.map((item) => {
return {
...item,

View File

@ -3,10 +3,10 @@
<h2 class="platform-title">数字农业产业管理平台</h2>
<div class="platform-panel">
<div class="platform-panel-item">
<div class="icon"><img :src="getAssetsFile('images/platform/icon-yy.png')" /></div>
<b>农业产业运营服务平台</b>
<div class="icon"><img :src="getAssetsFile('images/platform/icon-zw.png')" /></div>
<b>农业产业政务服务平台</b>
<ul class="entry">
<li v-for="item in leftApps" :key="item.name" @click="gotoPage(item)">
<li v-for="item in rightApps" :key="item.name" @click="gotoPage(item)">
<span class="entry-icon">
<img :src="getAssetsFile(item.icon)" />
</span>
@ -15,10 +15,10 @@
</ul>
</div>
<div class="platform-panel-item">
<div class="icon"><img :src="getAssetsFile('images/platform/icon-zw.png')" /></div>
<b>农业产业政务服务平台</b>
<div class="icon"><img :src="getAssetsFile('images/platform/icon-yy.png')" /></div>
<b>农业产业运营服务平台</b>
<ul class="entry">
<li v-for="item in rightApps" :key="item.name" @click="gotoPage(item)">
<li v-for="item in leftApps" :key="item.name" @click="gotoPage(item)">
<span class="entry-icon">
<img :src="getAssetsFile(item.icon)" />
</span>
@ -35,6 +35,9 @@ import { leftApps, rightApps } from '@/micro/app';
import { getAssetsFile } from '@/utils';
const gotoPage = (row) => {
console.log(row);
console.log(window.history.pushState({}, row.name, row.activeRule));
debugger;
window.history.pushState({}, row.name, row.activeRule);
};
</script>

@ -0,0 +1 @@
Subproject commit 5ec53f7fd03a8dacfd9af43d9d706119fc1cc997

454
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,18 +10,21 @@
"install:sub-gas": "cd sub-government-affairs-service && yarn install",
"install:sub-gss": "cd sub-government-screen-service && yarn install",
"install:sub-os": "cd sub-operation-service && yarn install",
"install:sub-gsr": "cd new-digital-agriculture-screen && yarn install",
"dev": "npm-run-all --parallel dev:*",
"dev:main": "cd main && yarn dev",
"dev:sub-admin": "cd sub-app && yarn dev",
"dev:sub-gas": "cd sub-government-affairs-service && yarn dev",
"dev:sub-gss": "cd sub-government-screen-service && yarn dev",
"dev:sub-os": "cd sub-operation-service && yarn dev",
"dev:sub-gsr": "cd new-digital-agriculture-screen && yarn dev",
"build": "npm-run-all --serial build:*",
"build:main": "cd main && yarn build",
"build:sub-admin": "cd sub-admin && yarn build",
"build:sub-gas": "cd sub-government-affairs-service && yarn build",
"build:sub-gss": "cd sub-government-screen-service && yarn build",
"build:sub-os": "cd sub-operation-service && yarn build",
"build:sub-gsr": "cd new-digital-agriculture-screen && yarn build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [

View File

@ -0,0 +1,732 @@
<template>
<div class="container">
<div class="left-board">
<div class="logo-wrapper">
<div class="logo"><img :src="logo" alt="logo" /> Form Generator</div>
</div>
<el-scrollbar class="left-scrollbar">
<div class="components-list">
<div class="components-title"><svg-icon icon-class="component" />输入型组件</div>
<draggable
class="components-draggable"
:list="inputComponents"
:group="{ name: 'componentsGroup', pull: 'clone', put: false }"
:clone="cloneComponent"
draggable=".components-item"
:sort="false"
@end="onEnd"
>
<div v-for="(element, index) in inputComponents" :key="index" class="components-item" @click="addComponent(element)">
<div class="components-body">
<svg-icon v-if="element.tagIcon != ''" :icon-class="element.tagIcon" />
{{ element.label }}
</div>
</div>
</draggable>
<div class="components-title"><svg-icon icon-class="component" />选择型组件</div>
<draggable
class="components-draggable"
:list="selectComponents"
:group="{ name: 'componentsGroup', pull: 'clone', put: false }"
:clone="cloneComponent"
draggable=".components-item"
:sort="false"
@end="onEnd"
>
<div v-for="(element, index) in selectComponents" :key="index" class="components-item" @click="addComponent(element)">
<div class="components-body">
<svg-icon v-if="element.tagIcon != ''" :icon-class="element.tagIcon" />
{{ element.label }}
</div>
</div>
</draggable>
<div class="components-title"><svg-icon icon-class="component" /> 布局型组件</div>
<draggable
class="components-draggable"
:list="layoutComponents"
:group="{ name: 'componentsGroup', pull: 'clone', put: false }"
:clone="cloneComponent"
draggable=".components-item"
:sort="false"
@end="onEnd"
>
<div v-for="(element, index) in layoutComponents" :key="index" class="components-item" @click="addComponent(element)">
<div class="components-body">
<svg-icon v-if="element.tagIcon != ''" :icon-class="element.tagIcon" />
{{ element.label }}
</div>
</div>
</draggable>
</div>
</el-scrollbar>
</div>
<div class="center-board">
<div class="action-bar">
<el-button icon="el-icon-download" type="text" @click="download"> 导出vue文件 </el-button>
<el-button class="copy-btn-main" icon="el-icon-document-copy" type="text" @click="copy"> 复制代码 </el-button>
<el-button class="delete-btn" icon="el-icon-delete" type="text" @click="empty"> 清空 </el-button>
</div>
<el-scrollbar class="center-scrollbar">
<el-row class="center-board-row" :gutter="formConf.gutter">
<el-form
:size="formConf.size"
:label-position="formConf.labelPosition"
:disabled="formConf.disabled"
:label-width="formConf.labelWidth + 'px'"
>
<draggable class="drawing-board" :list="drawingList" :animation="340" group="componentsGroup">
<draggable-item
v-for="(element, index) in drawingList"
:key="element.renderKey"
:drawing-list="drawingList"
:element="element"
:index="index"
:active-id="activeId"
:form-conf="formConf"
@activeItem="activeFormItem"
@copyItem="drawingItemCopy"
@deleteItem="drawingItemDelete"
/>
</draggable>
<div v-show="!drawingList.length" class="empty-info">从左侧拖入或点选组件进行表单设计</div>
</el-form>
</el-row>
</el-scrollbar>
</div>
<right-panel :active-data="activeData" :form-conf="formConf" :show-field="!!drawingList.length" @tag-change="tagChange" />
<code-type-dialog :visible.sync="dialogVisible" title="选择生成类型" :show-file-name="showFileName" @confirm="generate" />
<input id="copyNode" type="hidden" />
</div>
</template>
<script>
import draggable from 'vuedraggable';
import beautifier from 'js-beautify';
import ClipboardJS from 'clipboard';
import render from '@/utils/generator/render';
import RightPanel from './RightPanel';
import { inputComponents, selectComponents, layoutComponents, formConf } from '@/utils/generator/config';
import { beautifierConf, titleCase } from '@/utils/index';
import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/html';
import { makeUpJs } from '@/utils/generator/js';
import { makeUpCss } from '@/utils/generator/css';
import drawingDefault from '@/utils/generator/drawingDefault';
import logo from '@/assets/logo/logo.png';
import CodeTypeDialog from './CodeTypeDialog';
import DraggableItem from './DraggableItem';
let oldActiveId;
let tempActiveData;
export default {
components: {
draggable,
render,
RightPanel,
CodeTypeDialog,
DraggableItem,
},
data() {
return {
logo,
idGlobal: 100,
formConf,
inputComponents,
selectComponents,
layoutComponents,
labelWidth: 100,
drawingList: drawingDefault,
drawingData: {},
activeId: drawingDefault[0].formId,
drawerVisible: false,
formData: {},
dialogVisible: false,
generateConf: null,
showFileName: false,
activeData: drawingDefault[0],
};
},
created() {
// firefox
document.body.ondrop = (event) => {
event.preventDefault();
event.stopPropagation();
};
},
watch: {
// eslint-disable-next-line func-names
'activeData.label': function (val, oldVal) {
if (this.activeData.placeholder === undefined || !this.activeData.tag || oldActiveId !== this.activeId) {
return;
}
this.activeData.placeholder = this.activeData.placeholder.replace(oldVal, '') + val;
},
activeId: {
handler(val) {
oldActiveId = val;
},
immediate: true,
},
},
mounted() {
const clipboard = new ClipboardJS('#copyNode', {
text: (trigger) => {
const codeStr = this.generateCode();
this.$notify({
title: '成功',
message: '代码已复制到剪切板,可粘贴。',
type: 'success',
});
return codeStr;
},
});
clipboard.on('error', (e) => {
this.$message.error('代码复制失败');
});
},
methods: {
activeFormItem(element) {
this.activeData = element;
this.activeId = element.formId;
},
onEnd(obj, a) {
if (obj.from !== obj.to) {
this.activeData = tempActiveData;
this.activeId = this.idGlobal;
}
},
addComponent(item) {
const clone = this.cloneComponent(item);
this.drawingList.push(clone);
this.activeFormItem(clone);
},
cloneComponent(origin) {
const clone = JSON.parse(JSON.stringify(origin));
clone.formId = ++this.idGlobal;
clone.span = formConf.span;
clone.renderKey = +new Date(); // renderKey
if (!clone.layout) clone.layout = 'colFormItem';
if (clone.layout === 'colFormItem') {
clone.vModel = `field${this.idGlobal}`;
clone.placeholder !== undefined && (clone.placeholder += clone.label);
tempActiveData = clone;
} else if (clone.layout === 'rowFormItem') {
delete clone.label;
clone.componentName = `row${this.idGlobal}`;
clone.gutter = this.formConf.gutter;
tempActiveData = clone;
}
return tempActiveData;
},
AssembleFormData() {
this.formData = {
fields: JSON.parse(JSON.stringify(this.drawingList)),
...this.formConf,
};
},
generate(data) {
const func = this[`exec${titleCase(this.operationType)}`];
this.generateConf = data;
func && func(data);
},
execRun(data) {
this.AssembleFormData();
this.drawerVisible = true;
},
execDownload(data) {
const codeStr = this.generateCode();
const blob = new Blob([codeStr], { type: 'text/plain;charset=utf-8' });
this.$download.saveAs(blob, data.fileName);
},
execCopy(data) {
document.getElementById('copyNode').click();
},
empty() {
this.$confirm('确定要清空所有组件吗?', '提示', { type: 'warning' }).then(() => {
this.drawingList = [];
});
},
drawingItemCopy(item, parent) {
let clone = JSON.parse(JSON.stringify(item));
clone = this.createIdAndKey(clone);
parent.push(clone);
this.activeFormItem(clone);
},
createIdAndKey(item) {
item.formId = ++this.idGlobal;
item.renderKey = +new Date();
if (item.layout === 'colFormItem') {
item.vModel = `field${this.idGlobal}`;
} else if (item.layout === 'rowFormItem') {
item.componentName = `row${this.idGlobal}`;
}
if (Array.isArray(item.children)) {
item.children = item.children.map((childItem) => this.createIdAndKey(childItem));
}
return item;
},
drawingItemDelete(index, parent) {
parent.splice(index, 1);
this.$nextTick(() => {
const len = this.drawingList.length;
if (len) {
this.activeFormItem(this.drawingList[len - 1]);
}
});
},
generateCode() {
const { type } = this.generateConf;
this.AssembleFormData();
const script = vueScript(makeUpJs(this.formData, type));
const html = vueTemplate(makeUpHtml(this.formData, type));
const css = cssStyle(makeUpCss(this.formData));
return beautifier.html(html + script + css, beautifierConf.html);
},
download() {
this.dialogVisible = true;
this.showFileName = true;
this.operationType = 'download';
},
run() {
this.dialogVisible = true;
this.showFileName = false;
this.operationType = 'run';
},
copy() {
this.dialogVisible = true;
this.showFileName = false;
this.operationType = 'copy';
},
tagChange(newTag) {
newTag = this.cloneComponent(newTag);
newTag.vModel = this.activeData.vModel;
newTag.formId = this.activeId;
newTag.span = this.activeData.span;
delete this.activeData.tag;
delete this.activeData.tagIcon;
delete this.activeData.document;
Object.keys(newTag).forEach((key) => {
if (this.activeData[key] !== undefined && typeof this.activeData[key] === typeof newTag[key]) {
newTag[key] = this.activeData[key];
}
});
this.activeData = newTag;
this.updateDrawingList(newTag, this.drawingList);
},
updateDrawingList(newTag, list) {
const index = list.findIndex((item) => item.formId === this.activeId);
if (index > -1) {
list.splice(index, 1, newTag);
} else {
list.forEach((item) => {
if (Array.isArray(item.children)) this.updateDrawingList(newTag, item.children);
});
}
},
},
};
</script>
<style lang="scss">
.editor-tabs {
background: #121315;
.el-tabs__header {
margin: 0;
border-bottom-color: #121315;
.el-tabs__nav {
border-color: #121315;
}
}
.el-tabs__item {
height: 32px;
line-height: 32px;
color: #888a8e;
border-left: 1px solid #121315 !important;
background: #363636;
margin-right: 5px;
user-select: none;
}
.el-tabs__item.is-active {
background: #1e1e1e;
border-bottom-color: #1e1e1e !important;
color: #fff;
}
.el-icon-edit {
color: #f1fa8c;
}
.el-icon-document {
color: #a95812;
}
}
// home
.right-scrollbar {
.el-scrollbar__view {
padding: 12px 18px 15px 15px;
}
}
.left-scrollbar .el-scrollbar__wrap {
box-sizing: border-box;
overflow-x: hidden !important;
margin-bottom: 0 !important;
}
.center-tabs {
.el-tabs__header {
margin-bottom: 0 !important;
}
.el-tabs__item {
width: 50%;
text-align: center;
}
.el-tabs__nav {
width: 100%;
}
}
.reg-item {
padding: 12px 6px;
background: #f8f8f8;
position: relative;
border-radius: 4px;
.close-btn {
position: absolute;
right: -6px;
top: -6px;
display: block;
width: 16px;
height: 16px;
line-height: 16px;
background: rgba(0, 0, 0, 0.2);
border-radius: 50%;
color: #fff;
text-align: center;
z-index: 1;
cursor: pointer;
font-size: 12px;
&:hover {
background: rgba(210, 23, 23, 0.5);
}
}
& + .reg-item {
margin-top: 18px;
}
}
.action-bar {
& .el-button + .el-button {
margin-left: 15px;
}
& i {
font-size: 20px;
vertical-align: middle;
position: relative;
top: -1px;
}
}
.custom-tree-node {
width: 100%;
font-size: 14px;
.node-operation {
float: right;
}
i[class*='el-icon'] + i[class*='el-icon'] {
margin-left: 6px;
}
.el-icon-plus {
color: #409eff;
}
.el-icon-delete {
color: #157a0c;
}
}
.left-scrollbar .el-scrollbar__view {
overflow-x: hidden;
}
.el-rate {
display: inline-block;
vertical-align: text-top;
}
.el-upload__tip {
line-height: 1.2;
}
$selectedColor: #f6f7ff;
$lighterBlue: #409eff;
.container {
position: relative;
width: 100%;
height: 100%;
}
.components-list {
padding: 8px;
box-sizing: border-box;
height: 100%;
.components-item {
display: inline-block;
width: 48%;
margin: 1%;
transition: transform 0ms !important;
}
}
.components-draggable {
padding-bottom: 20px;
}
.components-title {
font-size: 14px;
color: #222;
margin: 6px 2px;
.svg-icon {
color: #666;
font-size: 18px;
}
}
.components-body {
padding: 8px 10px;
background: $selectedColor;
font-size: 12px;
cursor: move;
border: 1px dashed $selectedColor;
border-radius: 3px;
.svg-icon {
color: #777;
font-size: 15px;
}
&:hover {
border: 1px dashed #787be8;
color: #787be8;
.svg-icon {
color: #787be8;
}
}
}
.left-board {
width: 260px;
position: absolute;
left: 0;
top: 0;
height: 100vh;
}
.left-scrollbar {
height: calc(100vh - 42px);
overflow: hidden;
}
.center-scrollbar {
height: calc(100vh - 42px);
overflow: hidden;
border-left: 1px solid #f1e8e8;
border-right: 1px solid #f1e8e8;
box-sizing: border-box;
}
.center-board {
height: 100vh;
width: auto;
margin: 0 350px 0 260px;
box-sizing: border-box;
}
.empty-info {
position: absolute;
top: 46%;
left: 0;
right: 0;
text-align: center;
font-size: 18px;
color: #ccb1ea;
letter-spacing: 4px;
}
.action-bar {
position: relative;
height: 42px;
text-align: right;
padding: 0 15px;
box-sizing: border-box;
border: 1px solid #f1e8e8;
border-top: none;
border-left: none;
.delete-btn {
color: #f56c6c;
}
}
.logo-wrapper {
position: relative;
height: 42px;
background: #fff;
border-bottom: 1px solid #f1e8e8;
box-sizing: border-box;
}
.logo {
position: absolute;
left: 12px;
top: 6px;
line-height: 30px;
color: #00afff;
font-weight: 600;
font-size: 17px;
white-space: nowrap;
> img {
width: 30px;
height: 30px;
vertical-align: top;
}
.github {
display: inline-block;
vertical-align: sub;
margin-left: 15px;
> img {
height: 22px;
}
}
}
.center-board-row {
padding: 12px 12px 15px 12px;
box-sizing: border-box;
& > .el-form {
// 69 = 12+15+42
height: calc(100vh - 69px);
}
}
.drawing-board {
height: 100%;
position: relative;
.components-body {
padding: 0;
margin: 0;
font-size: 0;
}
.sortable-ghost {
position: relative;
display: block;
overflow: hidden;
&::before {
content: ' ';
position: absolute;
left: 0;
right: 0;
top: 0;
height: 3px;
background: rgb(89, 89, 223);
z-index: 2;
}
}
.components-item.sortable-ghost {
width: 100%;
height: 60px;
background-color: $selectedColor;
}
.active-from-item {
& > .el-form-item {
background: $selectedColor;
border-radius: 6px;
}
& > .drawing-item-copy,
& > .drawing-item-delete {
display: initial;
}
& > .component-name {
color: $lighterBlue;
}
}
.el-form-item {
margin-bottom: 15px;
}
}
.drawing-item {
position: relative;
cursor: move;
&.unfocus-bordered:not(.activeFromItem) > div:first-child {
border: 1px dashed #ccc;
}
.el-form-item {
padding: 12px 10px;
}
}
.drawing-row-item {
position: relative;
cursor: move;
box-sizing: border-box;
border: 1px dashed #ccc;
border-radius: 3px;
padding: 0 2px;
margin-bottom: 15px;
.drawing-row-item {
margin-bottom: 2px;
}
.el-col {
margin-top: 22px;
}
.el-form-item {
margin-bottom: 0;
}
.drag-wrapper {
min-height: 80px;
}
&.active-from-item {
border: 1px dashed $lighterBlue;
}
.component-name {
position: absolute;
top: 0;
left: 0;
font-size: 12px;
color: #bbb;
display: inline-block;
padding: 0 6px;
}
}
.drawing-item,
.drawing-row-item {
&:hover {
& > .el-form-item {
background: $selectedColor;
border-radius: 6px;
}
& > .drawing-item-copy,
& > .drawing-item-delete {
display: initial;
}
}
& > .drawing-item-copy,
& > .drawing-item-delete {
display: none;
position: absolute;
top: -10px;
width: 22px;
height: 22px;
line-height: 22px;
text-align: center;
border-radius: 50%;
font-size: 12px;
border: 1px solid;
cursor: pointer;
z-index: 1;
}
& > .drawing-item-copy {
right: 56px;
border-color: $lighterBlue;
color: $lighterBlue;
background: #fff;
&:hover {
background: $lighterBlue;
color: #fff;
}
}
& > .drawing-item-delete {
right: 24px;
border-color: #f56c6c;
color: #f56c6c;
background: #fff;
&:hover {
background: #f56c6c;
color: #fff;
}
}
}
</style>

View File

@ -1,8 +1,8 @@
# 开发环境
VITE_PORT = 9528
VITE_MODE = 'DEV'
VITE_APP_MIAN = 'daimp-front-main'
VITE_APP_MIAN_URL = 'http://localhost:9000'
VITE_APP_MIAN = 'platform'
VITE_APP_MIAN_URL = 'http://192.168.18.99:88'
VITE_APP_NAME = 'sub-government-affairs-service'
VITE_APP_BASE_API = '/apis'
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'

View File

@ -11,10 +11,10 @@ module.exports = {
extends: [
'stylelint-config-standard',
'stylelint-config-standard-scss',
'stylelint-config-prettier',
'stylelint-config-html/vue',
'stylelint-config-recommended-vue',
'stylelint-config-recommended-scss'
'stylelint-config-recommended-scss',
'stylelint-config-prettier'
],
overrides: [
{

View File

View File

@ -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')
}

View File

@ -0,0 +1,14 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}
declare module 'vue' {
export interface GlobalComponents {
CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
}

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,8 @@
* @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>
<el-icon v-if="icon.includes('icon') && icon !== ''" :class="`iconfont ${icon}`" :size="size" />
<el-icon v-if="!icon.includes('icon') && icon !== ''" :size="size"> <component :is="icon" /></el-icon>
</template>
<script setup name="layout-icon">
defineProps({

View File

@ -6,20 +6,20 @@ const annualplanRoutes = [
name: 'annualPlan',
component: Views,
redirect: '/sub-government-affairs-service/annualPlans',
meta: { title: '年度计划', icon: 'Document' },
meta: { title: '年度种植计划', icon: '' },
children: [
{
path: '/sub-government-affairs-service/annualPlans',
name: 'annualPlans',
component: () => import('@/views/annualPlan/component/annualPlans/index.vue'),
meta: { title: '年度计划', icon: 'Document' },
},
{
path: '/sub-government-affairs-service/plantings',
name: 'plantings',
component: () => import('@/views/annualPlan/component/plantings/index.vue'),
meta: { title: '网格种植进度', icon: 'Document' },
meta: { title: '年度种植计划', icon: '' },
},
// {
// path: '/sub-government-affairs-service/plantings',
// name: 'plantings',
// component: () => import('@/views/annualPlan/component/plantings/index.vue'),
// meta: { title: '网格种植进度', icon: 'Document' },
// },
],
},
];

View File

@ -7,31 +7,31 @@ const dictRoutes = [
name: 'dict',
component: Views,
redirect: '/sub-government-affairs-service/region',
meta: { title: '基础信息维护', icon: 'Document' },
meta: { title: '基础信息维护', icon: 'DocumentRemove' },
children: [
{
path: '/sub-government-affairs-service/region',
name: 'region',
component: () => import('@/views/dict/component/region/index.vue'),
meta: { title: '行政区域信息', icon: 'Document' },
meta: { title: '行政区域信息', icon: '' },
},
{
path: '/sub-government-affairs-service/landCassification',
name: 'landCassification',
component: () => import('@/views/dict/component/landCassification/index.vue'),
meta: { title: '土地分类', icon: 'Document' },
meta: { title: '土地分类', icon: '' },
},
{
path: '/sub-government-affairs-service/dictCrop',
name: 'dictCrop',
component: () => import('@/views/dict/component/dictCrop/index.vue'),
meta: { title: '种植产物信息', icon: 'Document' },
meta: { title: '种植产物信息', icon: '' },
},
{
path: '/sub-government-affairs-service/soilClassification',
name: 'soilClassification',
component: () => import('@/views/dict/component/soilClassification/index.vue'),
meta: { title: '土壤分类', icon: 'Document' },
meta: { title: '土壤分类', icon: '' },
},
],
},

View File

@ -7,7 +7,7 @@ const inputSuppliesRoutes = [
name: 'inputSuppliesManage',
component: Layout,
redirect: '/sub-government-affairs-service/materialManage',
meta: { title: '投入品监管平台', icon: 'Document' },
meta: { title: '投入品监管平台', icon: 'FullScreen' },
children: [
// {
// path: '/sub-government-affairs-service/inputDataView',
@ -20,19 +20,26 @@ const inputSuppliesRoutes = [
name: 'material',
component: Views,
redirect: '/sub-government-affairs-service/material/pesticide',
meta: { title: '物资管理', icon: 'Document' },
meta: { title: '投入品管理', icon: 'OfficeBuilding' },
children: [
{
<<<<<<< HEAD
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/seed',
name: 'input-supplies-seed',
component: () => import('@/views/inputSuppliesManage/material/seed/index.vue'),
meta: { title: '种源管理', icon: 'Document' },
>>>>>>> dev
},
{
path: '/sub-government-affairs-service/material/fertilizer',
name: 'input-supplies-fertilizer',
component: () => import('@/views/inputSuppliesManage/material/fertilizer/index.vue'),
meta: { title: '肥料管理', icon: 'Document' },
meta: { title: '肥料管理', icon: '' },
},
{
path: '/sub-government-affairs-service/material/pesticide',
@ -44,13 +51,22 @@ const inputSuppliesRoutes = [
path: '/sub-government-affairs-service/material/ratPoison',
name: 'input-supplies-ratPoison',
component: () => import('@/views/inputSuppliesManage/material/ratPoison/index.vue'),
meta: { title: '兽药管理', icon: 'Document' },
meta: { title: '兽药管理', icon: '' },
},
{
<<<<<<< HEAD
path: '/sub-government-affairs-service/material/seed',
name: 'input-supplies-seed',
component: () => import('@/views/inputSuppliesManage/material/seed/index.vue'),
meta: { title: '种源管理', icon: '' },
},
{
=======
>>>>>>> dev
path: '/sub-government-affairs-service/material/farmMachinery',
name: 'input-supplies-farmMachinery',
component: () => import('@/views/inputSuppliesManage/material/farmMachinery/index.vue'),
meta: { title: '农机管理', icon: 'Document' },
meta: { title: '农机管理', icon: '' },
},
],
},
@ -58,7 +74,7 @@ const inputSuppliesRoutes = [
path: '/sub-government-affairs-service/productionDealer',
name: 'productionDealer',
component: () => import('@/views/inputSuppliesManage/productionDealer/index.vue'),
meta: { title: '企业经销商管理', icon: 'Document' },
meta: { title: '企业经销商管理', icon: '' },
},
{
path: '/sub-government-affairs-service/enterpriseDealerCheck',
@ -70,25 +86,25 @@ const inputSuppliesRoutes = [
path: '/sub-government-affairs-service/useSupervise',
name: 'useSupervise',
component: () => import('@/views/inputSuppliesManage/useSupervise/index.vue'),
meta: { title: '使用监管', icon: 'Document' },
meta: { title: '使用监管', icon: '' },
},
{
path: '/sub-government-affairs-service/leaseSupervise',
name: 'leaseSupervise',
component: () => import('@/views/inputSuppliesManage/leaseSupervise/index.vue'),
meta: { title: '农机租赁监管', icon: 'Document' },
meta: { title: '农机租赁监管', icon: '' },
},
{
path: '/sub-government-affairs-service/redBlackRank',
name: 'redBlackRank',
component: () => import('@/views/inputSuppliesManage/redBlackRank/index.vue'),
meta: { title: '企业红黑榜', icon: 'Document' },
meta: { title: '企业红黑榜', icon: '' },
},
{
path: '/sub-government-affairs-service/knowledgeManage',
name: 'knowledgeManage',
component: () => import('@/views/inputSuppliesManage/knowledgeManage/index.vue'),
meta: { title: '知识库', icon: 'Document' },
meta: { title: '知识库', icon: '' },
},
// {
// path: '/sub-government-affairs-service/patrolCaseManage',

View File

@ -7,37 +7,37 @@ const landsRoutes = [
name: 'landManage',
component: Views,
redirect: '/sub-government-affairs-service/landsManage',
meta: { title: '土地管理', icon: 'Document' },
meta: { title: '土地管理', icon: 'Grape' },
children: [
{
path: '/sub-government-affairs-service/landsManage',
name: 'landsManage',
component: () => import('@/views/landManage/component/landsManage/index.vue'),
meta: { title: '土地信息登记', icon: 'Document' },
meta: { title: '土地信息登记', icon: '' },
},
{
path: '/sub-government-affairs-service/plantPlan',
name: 'plantPlan',
component: () => import('@/views/landManage/component/plantPlan/index.vue'),
meta: { title: '种植规划', icon: 'Document' },
},
{
path: '/sub-government-affairs-service/landPartol',
name: 'landPartol',
component: () => import('@/views/landManage/component/landPartol/index.vue'),
meta: { title: '土地巡查', icon: 'Document' },
},
{
path: '/sub-government-affairs-service/illegalHandle',
name: 'illegalHandle',
component: () => import('@/views/landManage/component/illegalHandle/index.vue'),
meta: { title: '土地违法处理', icon: 'Document' },
meta: { title: '种植规划', icon: '' },
},
{
path: '/sub-government-affairs-service/operationRecord',
name: 'operationRecord',
component: () => import('@/views/landManage/component/operationRecord/index.vue'),
meta: { title: '作业记录', icon: 'Document' },
meta: { title: '作业记录', icon: '' },
},
{
path: '/sub-government-affairs-service/landPartol',
name: 'landPartol',
component: () => import('@/views/landManage/component/landPartol/index.vue'),
meta: { title: '土地巡查', icon: '' },
},
{
path: '/sub-government-affairs-service/illegalHandle',
name: 'illegalHandle',
component: () => import('@/views/landManage/component/illegalHandle/index.vue'),
meta: { title: '土地违法处理', icon: '' },
},
],
},

View File

@ -6,38 +6,38 @@ export default [
name: 'plantingAndBreeding',
component: Layout,
redirect: '/sub-government-affairs-service/environment-monitor',
meta: { title: '种养植综合管理', icon: 'Document' },
meta: { title: '种养植综合管理', icon: 'Monitor' },
children: [
{
path: '/sub-government-affairs-service/environment-monitor',
name: 'environment-monitor',
component: () => import('@/views/plantingAndBreeding/environment/index.vue'),
meta: { title: '环境监测信息', icon: 'Document' },
meta: { title: '环境监测信息', icon: '' },
},
{
path: '/sub-government-affairs-service/threshold-value-setting',
name: 'threshold-value-setting',
component: () => import('@/views/plantingAndBreeding/threshold/index.vue'),
hidden: true,
meta: { title: '阀值设置', icon: 'Document' },
meta: { title: '阀值设置', icon: '' },
},
{
path: '/sub-government-affairs-service/pest-monitor',
name: 'pest-monitor',
component: () => import('@/views/plantingAndBreeding/pest/index.vue'),
meta: { title: '病虫害监测信息', icon: 'Document' },
meta: { title: '病虫害监测信息', icon: '' },
},
{
path: '/sub-government-affairs-service/epidemic-disease-monitor',
name: 'epidemic-disease-monitor',
component: () => import('@/views/plantingAndBreeding/epidemicDisease/index.vue'),
meta: { title: '疫病监测信息', icon: 'Document' },
meta: { title: '疫病监测信息', icon: '' },
},
{
path: '/sub-government-affairs-service/breeding-base-information',
name: 'breeding-base-information',
component: () => import('@/views/plantingAndBreeding/base/index.vue'),
meta: { title: '种养殖基地', icon: 'Document' },
meta: { title: '种养殖基地', icon: '' },
},
],
},

View File

@ -12,13 +12,38 @@ export default [
path: '/sub-government-affairs-service/mainHome',
component: () => import('@/views/productOperateMain/home/index.vue'),
name: 'mainHome',
meta: { title: '数据可视化管理', icon: 'Document' },
meta: { title: '数据可视化管理', icon: '' },
},
{
<<<<<<< HEAD
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: '' },
},
{
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: '' },
=======
path: '/sub-government-affairs-service/businessEntity',
component: () => import('@/views/productOperateMain/businessEntity/index.vue'),
name: 'businessEntity',
meta: { title: '经营主体', icon: 'Document' },
>>>>>>> dev
},
// {
// path: '/sub-government-affairs-service/individual',
@ -48,13 +73,21 @@ export default [
path: '/sub-government-affairs-service/examineList',
component: () => import('@/views/productOperateMain/examine/list.vue'),
name: 'examineList',
<<<<<<< HEAD
meta: { title: '主体审核管理', icon: '' },
=======
meta: { title: '待审核', icon: 'Document' },
>>>>>>> dev
},
{
path: '/sub-government-affairs-service/examineRecord',
component: () => import('@/views/productOperateMain/examine/record.vue'),
name: 'examineRecord',
<<<<<<< HEAD
meta: { title: '主体审核历史', icon: '' },
=======
meta: { title: '审核历史', icon: 'Document' },
>>>>>>> dev
},
],
},

View File

@ -16,7 +16,7 @@ export default [
path: '/sub-government-affairs-service/grid',
component: () => import('@/views/resource/grid/index.vue'),
name: 'grid',
meta: { title: '网格化管理', icon: 'Document' },
meta: { title: '网格化管理', icon: '' },
},
...annualplanRouters,
...landsRoutes,

View File

@ -12,19 +12,19 @@ export default [
path: '/sub-government-affairs-service/analysis-land',
component: () => import('@/views/resource/statisticAnalysis/land/index.vue'),
name: 'analysis-land',
meta: { title: '土地利用与规划分析', icon: 'Document' },
meta: { title: '土地利用与规划分析', icon: '' },
},
{
path: '/sub-government-affairs-service/analysis-agriculture',
name: 'analysis-agriculture',
component: () => import('@/views/resource/statisticAnalysis/agriculture/index.vue'),
meta: { title: '农业生产效率分析', icon: 'Document' },
meta: { title: '农业生产效率分析', icon: '' },
},
{
path: '/sub-government-affairs-service/analysis-environment',
name: 'analysis-environment',
component: () => import('@/views/resource/statisticAnalysis/environment/index.vue'),
meta: { title: '环境影响与经济效益分析', icon: 'Document' },
meta: { title: '环境影响与经济效益分析', icon: '' },
},
],
},

View File

@ -6,25 +6,25 @@ export default [
name: 'system',
component: Layout,
redirect: '/sub-government-affairs-service/system-dict',
meta: { title: '系统管理', icon: 'Document' },
meta: { title: '系统管理', icon: 'Setting' },
children: [
{
path: '/sub-government-affairs-service/system-dict-type',
component: () => import('@/views/system/dict/type.vue'),
name: 'system-dict-type',
meta: { title: '字典类型', icon: 'Document' },
meta: { title: '字典类型', icon: '' },
},
{
path: '/sub-government-affairs-service/system-dict',
component: () => import('@/views/system/dict/index.vue'),
name: 'system-dict',
meta: { title: '字典管理', icon: 'Document' },
meta: { title: '字典管理', icon: '' },
},
{
path: '/sub-government-affairs-service/system-menu',
component: () => import('@/views/system/menu/index.vue'),
name: 'system-menu',
meta: { title: '菜单管理', icon: 'Document' },
meta: { title: '菜单管理', icon: '' },
},
{
path: '/sub-government-affairs-service/system-dept',

View File

@ -7,26 +7,26 @@ export default [
name: 'trace',
component: Layout,
redirect: '/sub-government-affairs-service/trace-home',
meta: { title: '溯源管理', icon: 'Document' },
meta: { title: '溯源管理', icon: 'Connection' },
children: [
{
path: '/sub-government-affairs-service/record',
name: 'record',
component: Views,
meta: { title: '种养植档案', icon: 'Document' },
meta: { title: '种养植档案', icon: 'Tickets' },
redirect: '/sub-government-affairs-service/record-base',
children: [
{
path: '/sub-government-affairs-service/record-base',
component: () => import('@/views/trace/record/base/index.vue'),
name: 'record-base',
meta: { title: '基地档案', icon: 'Document' },
meta: { title: '基地档案', icon: '' },
},
{
path: '/sub-government-affairs-service/record-seed',
component: () => import('@/views/trace/record/seed/index.vue'),
name: 'record-seed',
meta: { title: '种源档案', icon: 'Document' },
meta: { title: '种源档案', icon: '' },
},
],
},
@ -34,20 +34,20 @@ export default [
path: '/sub-government-affairs-service/agricultural',
name: 'agricultural',
component: Views,
meta: { title: '农事管理', icon: 'Document' },
meta: { title: '农事管理', icon: 'SetUp' },
redirect: '/sub-government-affairs-service/agricultural-coding',
children: [
{
path: '/sub-government-affairs-service/agricultural-coding',
component: () => import('@/views/trace/agricultural/coding/index.vue'),
name: 'agricultural-coding',
meta: { title: '采收与赋码管理', icon: 'Document' },
meta: { title: '采收与赋码管理', icon: '' },
},
{
path: '/sub-government-affairs-service/agricultural-quality',
component: () => import('@/views/trace/agricultural/quality/index.vue'),
name: 'agricultural-quality',
meta: { title: '产品质检管理', icon: 'Document' },
meta: { title: '产品质检管理', icon: '' },
},
],
},
@ -55,20 +55,20 @@ export default [
path: '/sub-government-affairs-service/trace-search',
name: 'trace-search',
component: () => import('@/views/trace/search/index.vue'),
meta: { title: '溯源查询', icon: 'Document' },
meta: { title: '溯源查询', icon: '' },
},
{
path: '/sub-government-affairs-service/trace-info',
name: 'trace-info',
component: () => import('@/views/trace/search/info.vue'),
meta: { title: '溯源详情', icon: 'Document' },
meta: { title: '溯源详情', icon: '' },
hidden: true,
},
{
path: '/sub-government-affairs-service/trace-statistic',
name: 'trace-statistic',
component: () => import('@/views/trace/statistic/index.vue'),
meta: { title: '溯源统计', icon: 'Document' },
meta: { title: '溯源统计', icon: '' },
},
],
},

View File

@ -5,7 +5,7 @@ import { isEmpty, encode, decode } from '@/utils';
export const useUserStore = defineStore({
id: GenKey('userStore'),
state: () => ({
token: null,
token: '',
userInfo: {},
currentOrg: null,
orgList: [],

View File

@ -55,6 +55,9 @@ publicAxios.interceptors.request.use(async (config) => {
config.baseURL = VITE_APP_BASE_API;
}
}
config.headers['authorization'] =
'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjozLCJ1c2VyX2tleSI6ImQxNGRhZjMzLWJkODQtNDc1Yy1iMDU3LWE5MmI2OTgyYmY1MyIsInVzZXJuYW1lIjoidGVzdCJ9.3AFekADq1-7-k_OAIQuJterJnVUVCK1rTSYg3X32UHhepBUO95fU-du9joJ_3ZepTrgBHvJApFTqP2x9041THQ';
if (UserStore.hasToken()) {
config.headers['authorization'] = config.headers['authorization'] ?? UserStore.token;
config.headers['cache-control'] = 'no-cache';

View File

@ -24,8 +24,7 @@ router.beforeEach(async (to, from, next) => {
const userStore = useUserStore();
const hasToken = userStore.hasToken();
console.log('sub', hasToken);
if (hasToken) {
if (!hasToken) {
if (to.path === '/login') {
next({ path: '/' });
} else {

View File

@ -86,26 +86,28 @@ const state = reactive({
//
const loadData = () => {
// state.loading = true;
// GetEntityList(state.query)
// .then((res) => {
// if (res.code === 200) {
// const { current, size, total, records } = res.data;
// state.data = records;
// state.pageData = {
// currentPage: current || 1,
// pageSize: size || 10,
// total: total,
// };
// }
// })
// .catch((err) => {
// app.$message.error(err.msg);
// state.data = [];
// })
// .finally(() => {
// state.loading = false;
// });
debugger;
state.loading = true;
GetEntityList(state.query)
.then((res) => {
if (res.code === 200) {
console.log(res);
const { current, size, total, records } = res.data;
state.data = records;
state.pageData = {
currentPage: current || 1,
pageSize: size || 10,
total: total,
};
}
})
.catch((err) => {
app.$message.error(err.msg);
state.data = [];
})
.finally(() => {
state.loading = false;
});
};
loadData();

View File

@ -137,7 +137,7 @@ const option = reactive({
editDisplay: false,
},
{
label: '地块名',
label: '地块名',
prop: 'landName',
search: true,
addDisplay: false,
@ -154,12 +154,13 @@ const option = reactive({
width: 300,
},
{
label: '产权人',
label: '经营主体',
prop: 'owner',
search: true,
addDisplay: false,
display: false,
editDisplay: false,
width: 100,
},
{
label: '所属网格',
@ -346,7 +347,7 @@ const option = reactive({
prop: 'area',
},
{
label: '产权人',
label: '经营主体',
prop: 'owner',
},
{
@ -375,11 +376,11 @@ const option = reactive({
prop: 'baseGroup',
column: [
{
label: '产权人姓名',
label: '经营主体姓名',
prop: 'propertyName',
},
{
label: '产权人联系电话',
label: '经营主体联系电话',
prop: 'propertyPhone',
},
{

View File

@ -172,7 +172,7 @@ const state = reactive({
},
},
{
label: '物',
label: '种植作物',
prop: 'crop',
disabled: false,
rules: {
@ -213,7 +213,7 @@ const state = reactive({
},
],
searchColumn: [
{ label: '地块名', prop: 'landName', search: true },
{ label: '地块名', prop: 'landName', search: true },
{ label: '种植产物', prop: 'crop', search: true },
{
label: '作业类型',

View File

@ -113,7 +113,7 @@ const state = reactive({
selection: true,
column: [
{
label: '地块名',
label: '地块名',
type: 'input',
prop: 'landName',
search: true,
@ -140,7 +140,7 @@ const state = reactive({
},
},
{
label: '产权人',
label: '经营主体',
type: 'input',
prop: 'owner',
search: true,

View File

@ -111,7 +111,7 @@ const state = reactive({
},
},
{
label: '地块名',
label: '地块名',
prop: 'landName',
width: 200,
type: 'select',

View File

@ -92,7 +92,7 @@ const state = reactive({
},
},
{
label: '地块名',
label: '地块名',
prop: 'landName',
width: 200,
addDisplay: false,
@ -101,7 +101,7 @@ const state = reactive({
overHidden: true,
},
{
label: '地块名',
label: '地块名',
prop: 'landId',
width: 200,
type: 'select',

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@ VITE_PORT = 9526
VITE_APP_MIAN = 'daimp-front-main'
VITE_APP_MIAN_URL = 'http://localhost:9000'
VITE_APP_NAME = 'sub-operation-service'
VITE_APP_BASE_API = '/apis'
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
VITE_APP_BASE_API = '/platform'
VITE_APP_BASE_URL = 'http://192.168.18.99:88'
VITE_APP_UPLOAD_API = '/uploadApis'
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300'

View File

@ -123,6 +123,9 @@ export const constantRoutes = [
},
],
},
<<<<<<< HEAD
// ...demo,
=======
{
path: '/sub-operation-service/farmingService',
name: 'farmingService',
@ -191,6 +194,7 @@ export const constantRoutes = [
},
],
},
>>>>>>> dev
];
/**

View File

@ -12,7 +12,6 @@ import { isEmpty } from '@/utils';
import { useUserStore } from '@/store/modules/user';
const { VITE_APP_BASE_API, VITE_APP_UPLOAD_API } = import.meta.env;
/**
* 创建axios实例
*/

524
yarn.lock

File diff suppressed because it is too large Load Diff