feat:溯源发布1.0
This commit is contained in:
parent
ab50c87e9c
commit
f5d43be8fc
@ -4,11 +4,9 @@ VITE_APP_NAME = 'daimp-front-main'
|
||||
VITE_APP_TITLE = '数字农业产业管理平台'
|
||||
VITE_APP_SUB_OS = '//localhost:9526/sub-operation-service/'
|
||||
VITE_APP_SUB_ADMIN = '//localhost:9527/sub-admin/'
|
||||
VITE_APP_SUB_GAS = '//localhost:9528/suv-government-affairs-service/'
|
||||
VITE_APP_SUB_GAS = '//localhost:9528/sub-government-affairs-service/'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300'
|
||||
VITE_APP_SYSTEM_API = '/systemApis'
|
||||
VITE_APP_SYSTEM_URL = 'http://192.168.18.99:99/stage-api'
|
||||
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300'
|
@ -1,7 +1,11 @@
|
||||
# 正式环境
|
||||
VITE_APP_NAME = 'daimp-front-main'
|
||||
VITE_APP_TITLE = '数字农业产业管理平台'
|
||||
VITE_APP_BASE_API = ""
|
||||
VITE_APP_SUB_OS = '//192.168.18.99:88/sub-operation-service/'
|
||||
VITE_APP_SUB_ADMIN = '//192.168.18.99:88/sub-admin/'
|
||||
VITE_APP_SUB_GAS = '//192.168.18.99:88/sub-government-affairs-service/'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = ''
|
||||
VITE_APP_SUB_VUE = '//localhost:9526/sub-vue/'
|
||||
VITE_APP_SUB_ADMIN = '//localhost:9527/sub-admin/'
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = ''
|
12
main/.env.test
Normal file
12
main/.env.test
Normal file
@ -0,0 +1,12 @@
|
||||
# 开发环境
|
||||
VITE_PORT = 9000
|
||||
VITE_APP_NAME = 'daimp-front-main'
|
||||
VITE_APP_TITLE = '数字农业产业管理平台'
|
||||
VITE_APP_SUB_OS = '//localhost:8090/sub-operation-service/'
|
||||
VITE_APP_SUB_ADMIN = '//localhost:8090/sub-admin/'
|
||||
VITE_APP_SUB_GAS = '//localhost:8090/sub-government-affairs-service/'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = ''
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = ''
|
@ -6,6 +6,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite --mode development",
|
||||
"build": "vite build --mode production",
|
||||
"test": "vite build --mode test",
|
||||
"preview": "vite preview",
|
||||
"format": "prettier --write 'src/**/*.{vue,ts,tsx,js,jsx,css,less,scss,json,md}'",
|
||||
"eslint": "npx eslint --init",
|
||||
|
@ -14,7 +14,7 @@ export function Login(data) {
|
||||
}
|
||||
|
||||
// 注册方法
|
||||
export function register(data) {
|
||||
export function Register(data) {
|
||||
return request({
|
||||
url: '/auth/register',
|
||||
headers: {
|
||||
@ -26,7 +26,7 @@ export function register(data) {
|
||||
}
|
||||
|
||||
// 刷新方法
|
||||
export function refreshToken() {
|
||||
export function RefreshToken() {
|
||||
return request({
|
||||
url: '/auth/refresh',
|
||||
method: 'post',
|
||||
@ -34,7 +34,7 @@ export function refreshToken() {
|
||||
}
|
||||
|
||||
// 获取用户详细信息
|
||||
export function getInfo() {
|
||||
export function GetInfo() {
|
||||
return request({
|
||||
url: '/system/user/getInfo',
|
||||
method: 'get',
|
||||
@ -42,7 +42,7 @@ export function getInfo() {
|
||||
}
|
||||
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
export function Logout() {
|
||||
return request({
|
||||
url: '/auth/logout',
|
||||
method: 'delete',
|
||||
@ -60,35 +60,3 @@ export function GetCodeImg() {
|
||||
timeout: 20000,
|
||||
});
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @Title: 登录
|
||||
// */
|
||||
// export function Login(data, token) {
|
||||
// return request('/self/login', {
|
||||
// method: 'POST',
|
||||
// data,
|
||||
// headers: {
|
||||
// 'Fairies-Captcha-Token': token,
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * @Title: 登出
|
||||
// */
|
||||
// export function LogOut() {
|
||||
// return request('/self/logout', {
|
||||
// method: 'POST',
|
||||
// });
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * @Title: 验证码
|
||||
// */
|
||||
// export function GetCaptcha() {
|
||||
// return request('/self/captcha', {
|
||||
// method: 'GET',
|
||||
// responseType: 'arraybuffer',
|
||||
// });
|
||||
// }
|
||||
|
539
main/src/assets/fonts/demo.css
Normal file
539
main/src/assets/fonts/demo.css
Normal file
@ -0,0 +1,539 @@
|
||||
/* Logo 字体 */
|
||||
@font-face {
|
||||
font-family: "iconfont logo";
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-family: "iconfont logo";
|
||||
font-size: 160px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.nav-tabs {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
#tabs li {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: 2px solid transparent;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-bottom: -1px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
#tabs .active {
|
||||
border-bottom-color: #f00;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-container .content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 页面布局 */
|
||||
.main {
|
||||
padding: 30px 100px;
|
||||
width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.main .logo {
|
||||
color: #333;
|
||||
text-align: left;
|
||||
margin-bottom: 30px;
|
||||
line-height: 1;
|
||||
height: 110px;
|
||||
margin-top: -50px;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
font-size: 160px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.helps {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.helps pre {
|
||||
padding: 20px;
|
||||
margin: 10px 0;
|
||||
border: solid 1px #e7e1cd;
|
||||
background-color: #fffdef;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.icon_lists {
|
||||
width: 100% !important;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.icon_lists li {
|
||||
width: 100px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
list-style: none !important;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.icon_lists li .code-name {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.icon_lists .icon {
|
||||
display: block;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
font-size: 42px;
|
||||
margin: 10px auto;
|
||||
color: #333;
|
||||
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
}
|
||||
|
||||
.icon_lists .icon:hover {
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
.icon_lists .svg-icon {
|
||||
/* 通过设置 font-size 来改变图标大小 */
|
||||
width: 1em;
|
||||
/* 图标和文字相邻时,垂直对齐 */
|
||||
vertical-align: -0.15em;
|
||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||
fill: currentColor;
|
||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||
normalize.css 中也包含这行 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.icon_lists li .name,
|
||||
.icon_lists li .code-name {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* markdown 样式 */
|
||||
.markdown {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.markdown img {
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
color: #404040;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown h2,
|
||||
.markdown h3,
|
||||
.markdown h4,
|
||||
.markdown h5,
|
||||
.markdown h6 {
|
||||
color: #404040;
|
||||
margin: 1.6em 0 0.6em 0;
|
||||
font-weight: 500;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.markdown h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.markdown h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.markdown h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.markdown h5 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
background: #e9e9e9;
|
||||
margin: 16px 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown>p,
|
||||
.markdown>blockquote,
|
||||
.markdown>.highlight,
|
||||
.markdown>ol,
|
||||
.markdown>ul {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.markdown ul>li {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
.markdown>ul li,
|
||||
.markdown blockquote ul>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown>ul li p,
|
||||
.markdown>ol li p {
|
||||
margin: 0.6em 0;
|
||||
}
|
||||
|
||||
.markdown ol>li {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.markdown>ol li,
|
||||
.markdown blockquote ol>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown code {
|
||||
margin: 0 3px;
|
||||
padding: 0 5px;
|
||||
background: #eee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown strong,
|
||||
.markdown b {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 95%;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
white-space: nowrap;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table th,
|
||||
.markdown>table td {
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.markdown blockquote {
|
||||
font-size: 90%;
|
||||
color: #999;
|
||||
border-left: 4px solid #e9e9e9;
|
||||
padding-left: 0.8em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown blockquote p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown .anchor {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.markdown .waiting {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.markdown h1:hover .anchor,
|
||||
.markdown h2:hover .anchor,
|
||||
.markdown h3:hover .anchor,
|
||||
.markdown h4:hover .anchor,
|
||||
.markdown h5:hover .anchor,
|
||||
.markdown h6:hover .anchor {
|
||||
opacity: 1;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.markdown>br,
|
||||
.markdown>p>br {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 代码高亮 */
|
||||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
background: none;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre)>code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre)>code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #9a6e3a;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
1223
main/src/assets/fonts/demo_index.html
Normal file
1223
main/src/assets/fonts/demo_index.html
Normal file
File diff suppressed because it is too large
Load Diff
195
main/src/assets/fonts/iconfont.css
Normal file
195
main/src/assets/fonts/iconfont.css
Normal file
@ -0,0 +1,195 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 4425172 */
|
||||
src: url('iconfont.woff2?t=1725879404188') format('woff2'),
|
||||
url('iconfont.woff?t=1725879404188') format('woff'),
|
||||
url('iconfont.ttf?t=1725879404188') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-data4:before {
|
||||
content: "\e60c";
|
||||
}
|
||||
|
||||
.icon-data5:before {
|
||||
content: "\e6be";
|
||||
}
|
||||
|
||||
.icon-recharge-record:before {
|
||||
content: "\e614";
|
||||
}
|
||||
|
||||
.icon-recharge-rule:before {
|
||||
content: "\e628";
|
||||
}
|
||||
|
||||
.icon-user-profile:before {
|
||||
content: "\e783";
|
||||
}
|
||||
|
||||
.icon-achieve:before {
|
||||
content: "\e616";
|
||||
}
|
||||
|
||||
.icon-activity-level:before {
|
||||
content: "\e61a";
|
||||
}
|
||||
|
||||
.icon-skins:before {
|
||||
content: "\e790";
|
||||
}
|
||||
|
||||
.icon-data1:before {
|
||||
content: "\e996";
|
||||
}
|
||||
|
||||
.icon-data2:before {
|
||||
content: "\e661";
|
||||
}
|
||||
|
||||
.icon-data3:before {
|
||||
content: "\e632";
|
||||
}
|
||||
|
||||
.icon-data:before {
|
||||
content: "\e64e";
|
||||
}
|
||||
|
||||
.icon-game:before {
|
||||
content: "\e6d0";
|
||||
}
|
||||
|
||||
.icon-banner:before {
|
||||
content: "\e613";
|
||||
}
|
||||
|
||||
.icon-verification:before {
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.icon-balance:before {
|
||||
content: "\e6b9";
|
||||
}
|
||||
|
||||
.icon-refund:before {
|
||||
content: "\e7af";
|
||||
}
|
||||
|
||||
.icon-wechat:before {
|
||||
content: "\e681";
|
||||
}
|
||||
|
||||
.icon-alipay:before {
|
||||
content: "\e61e";
|
||||
}
|
||||
|
||||
.icon-user:before {
|
||||
content: "\e67f";
|
||||
}
|
||||
|
||||
.icon-coupon:before {
|
||||
content: "\e65a";
|
||||
}
|
||||
|
||||
.icon-level:before {
|
||||
content: "\e7d8";
|
||||
}
|
||||
|
||||
.icon-activity:before {
|
||||
content: "\e67b";
|
||||
}
|
||||
|
||||
.icon-shop:before {
|
||||
content: "\e60a";
|
||||
}
|
||||
|
||||
.icon-member:before {
|
||||
content: "\e640";
|
||||
}
|
||||
|
||||
.icon-recharge:before {
|
||||
content: "\e799";
|
||||
}
|
||||
|
||||
.icon-marketing:before {
|
||||
content: "\e765";
|
||||
}
|
||||
|
||||
.icon-goods-sku:before {
|
||||
content: "\e6d7";
|
||||
}
|
||||
|
||||
.icon-store:before {
|
||||
content: "\e62b";
|
||||
}
|
||||
|
||||
.icon-goods-store:before {
|
||||
content: "\e6c6";
|
||||
}
|
||||
|
||||
.icon-storer:before {
|
||||
content: "\e64a";
|
||||
}
|
||||
|
||||
.icon-order:before {
|
||||
content: "\e737";
|
||||
}
|
||||
|
||||
.icon-permission:before {
|
||||
content: "\e612";
|
||||
}
|
||||
|
||||
.icon-goods:before {
|
||||
content: "\e889";
|
||||
}
|
||||
|
||||
.icon-menu:before {
|
||||
content: "\e60e";
|
||||
}
|
||||
|
||||
.icon-dict-type:before {
|
||||
content: "\e652";
|
||||
}
|
||||
|
||||
.icon-dictionary:before {
|
||||
content: "\e600";
|
||||
}
|
||||
|
||||
.icon-role:before {
|
||||
content: "\e604";
|
||||
}
|
||||
|
||||
.icon-fullscreen:before {
|
||||
content: "\e8fa";
|
||||
}
|
||||
|
||||
.icon-exit-fullscreen:before {
|
||||
content: "\e8fb";
|
||||
}
|
||||
|
||||
.icon-table:before {
|
||||
content: "\e615";
|
||||
}
|
||||
|
||||
.icon-test:before {
|
||||
content: "\e610";
|
||||
}
|
||||
|
||||
.icon-lang:before {
|
||||
content: "\e649";
|
||||
}
|
||||
|
||||
.icon-demo:before {
|
||||
content: "\e6ee";
|
||||
}
|
||||
|
||||
.icon-size:before {
|
||||
content: "\e660";
|
||||
}
|
||||
|
1
main/src/assets/fonts/iconfont.js
Normal file
1
main/src/assets/fonts/iconfont.js
Normal file
File diff suppressed because one or more lines are too long
324
main/src/assets/fonts/iconfont.json
Normal file
324
main/src/assets/fonts/iconfont.json
Normal file
@ -0,0 +1,324 @@
|
||||
{
|
||||
"id": "4425172",
|
||||
"name": "sub-vue",
|
||||
"font_family": "iconfont",
|
||||
"css_prefix_text": "icon-",
|
||||
"description": "react/vue项目后台管理平台",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "1218184",
|
||||
"name": "销售明细",
|
||||
"font_class": "data4",
|
||||
"unicode": "e60c",
|
||||
"unicode_decimal": 58892
|
||||
},
|
||||
{
|
||||
"icon_id": "2230090",
|
||||
"name": "销售明细",
|
||||
"font_class": "data5",
|
||||
"unicode": "e6be",
|
||||
"unicode_decimal": 59070
|
||||
},
|
||||
{
|
||||
"icon_id": "6882983",
|
||||
"name": "充值记录",
|
||||
"font_class": "recharge-record",
|
||||
"unicode": "e614",
|
||||
"unicode_decimal": 58900
|
||||
},
|
||||
{
|
||||
"icon_id": "34611004",
|
||||
"name": "充值规则",
|
||||
"font_class": "recharge-rule",
|
||||
"unicode": "e628",
|
||||
"unicode_decimal": 58920
|
||||
},
|
||||
{
|
||||
"icon_id": "15562252",
|
||||
"name": "用户画像",
|
||||
"font_class": "user-profile",
|
||||
"unicode": "e783",
|
||||
"unicode_decimal": 59267
|
||||
},
|
||||
{
|
||||
"icon_id": "18747445",
|
||||
"name": "成就",
|
||||
"font_class": "achieve",
|
||||
"unicode": "e616",
|
||||
"unicode_decimal": 58902
|
||||
},
|
||||
{
|
||||
"icon_id": "33848542",
|
||||
"name": "我的-段位",
|
||||
"font_class": "activity-level",
|
||||
"unicode": "e61a",
|
||||
"unicode_decimal": 58906
|
||||
},
|
||||
{
|
||||
"icon_id": "20406821",
|
||||
"name": "皮肤",
|
||||
"font_class": "skins",
|
||||
"unicode": "e790",
|
||||
"unicode_decimal": 59280
|
||||
},
|
||||
{
|
||||
"icon_id": "2214847",
|
||||
"name": "个人中心-积分商城",
|
||||
"font_class": "data1",
|
||||
"unicode": "e996",
|
||||
"unicode_decimal": 59798
|
||||
},
|
||||
{
|
||||
"icon_id": "14233304",
|
||||
"name": "价值投资",
|
||||
"font_class": "data2",
|
||||
"unicode": "e661",
|
||||
"unicode_decimal": 58977
|
||||
},
|
||||
{
|
||||
"icon_id": "23059951",
|
||||
"name": "费用统计",
|
||||
"font_class": "data3",
|
||||
"unicode": "e632",
|
||||
"unicode_decimal": 58930
|
||||
},
|
||||
{
|
||||
"icon_id": "2199049",
|
||||
"name": "数据报表",
|
||||
"font_class": "data",
|
||||
"unicode": "e64e",
|
||||
"unicode_decimal": 58958
|
||||
},
|
||||
{
|
||||
"icon_id": "36257316",
|
||||
"name": "游戏管理",
|
||||
"font_class": "game",
|
||||
"unicode": "e6d0",
|
||||
"unicode_decimal": 59088
|
||||
},
|
||||
{
|
||||
"icon_id": "11913396",
|
||||
"name": "banner",
|
||||
"font_class": "banner",
|
||||
"unicode": "e613",
|
||||
"unicode_decimal": 58899
|
||||
},
|
||||
{
|
||||
"icon_id": "35264323",
|
||||
"name": "核销码核销",
|
||||
"font_class": "verification",
|
||||
"unicode": "e601",
|
||||
"unicode_decimal": 58881
|
||||
},
|
||||
{
|
||||
"icon_id": "6514128",
|
||||
"name": "结算管理",
|
||||
"font_class": "balance",
|
||||
"unicode": "e6b9",
|
||||
"unicode_decimal": 59065
|
||||
},
|
||||
{
|
||||
"icon_id": "12025983",
|
||||
"name": "退货退款",
|
||||
"font_class": "refund",
|
||||
"unicode": "e7af",
|
||||
"unicode_decimal": 59311
|
||||
},
|
||||
{
|
||||
"icon_id": "1207908",
|
||||
"name": "wechat",
|
||||
"font_class": "wechat",
|
||||
"unicode": "e681",
|
||||
"unicode_decimal": 59009
|
||||
},
|
||||
{
|
||||
"icon_id": "27188513",
|
||||
"name": "alipay",
|
||||
"font_class": "alipay",
|
||||
"unicode": "e61e",
|
||||
"unicode_decimal": 58910
|
||||
},
|
||||
{
|
||||
"icon_id": "11111017",
|
||||
"name": "会员",
|
||||
"font_class": "user",
|
||||
"unicode": "e67f",
|
||||
"unicode_decimal": 59007
|
||||
},
|
||||
{
|
||||
"icon_id": "630079",
|
||||
"name": "我的优惠券",
|
||||
"font_class": "coupon",
|
||||
"unicode": "e65a",
|
||||
"unicode_decimal": 58970
|
||||
},
|
||||
{
|
||||
"icon_id": "2046370",
|
||||
"name": "会员等级",
|
||||
"font_class": "level",
|
||||
"unicode": "e7d8",
|
||||
"unicode_decimal": 59352
|
||||
},
|
||||
{
|
||||
"icon_id": "2569868",
|
||||
"name": "活动",
|
||||
"font_class": "activity",
|
||||
"unicode": "e67b",
|
||||
"unicode_decimal": 59003
|
||||
},
|
||||
{
|
||||
"icon_id": "2681698",
|
||||
"name": "门店",
|
||||
"font_class": "shop",
|
||||
"unicode": "e60a",
|
||||
"unicode_decimal": 58890
|
||||
},
|
||||
{
|
||||
"icon_id": "2811147",
|
||||
"name": "会员",
|
||||
"font_class": "member",
|
||||
"unicode": "e640",
|
||||
"unicode_decimal": 58944
|
||||
},
|
||||
{
|
||||
"icon_id": "4560182",
|
||||
"name": "会员充值",
|
||||
"font_class": "recharge",
|
||||
"unicode": "e799",
|
||||
"unicode_decimal": 59289
|
||||
},
|
||||
{
|
||||
"icon_id": "5880283",
|
||||
"name": "营销",
|
||||
"font_class": "marketing",
|
||||
"unicode": "e765",
|
||||
"unicode_decimal": 59237
|
||||
},
|
||||
{
|
||||
"icon_id": "6982618",
|
||||
"name": "商品规格",
|
||||
"font_class": "goods-sku",
|
||||
"unicode": "e6d7",
|
||||
"unicode_decimal": 59095
|
||||
},
|
||||
{
|
||||
"icon_id": "7307041",
|
||||
"name": "商家入驻",
|
||||
"font_class": "store",
|
||||
"unicode": "e62b",
|
||||
"unicode_decimal": 58923
|
||||
},
|
||||
{
|
||||
"icon_id": "11639867",
|
||||
"name": "小店商品库",
|
||||
"font_class": "goods-store",
|
||||
"unicode": "e6c6",
|
||||
"unicode_decimal": 59078
|
||||
},
|
||||
{
|
||||
"icon_id": "13872198",
|
||||
"name": "商家列表",
|
||||
"font_class": "storer",
|
||||
"unicode": "e64a",
|
||||
"unicode_decimal": 58954
|
||||
},
|
||||
{
|
||||
"icon_id": "577335",
|
||||
"name": "订单",
|
||||
"font_class": "order",
|
||||
"unicode": "e737",
|
||||
"unicode_decimal": 59191
|
||||
},
|
||||
{
|
||||
"icon_id": "736503",
|
||||
"name": "权限",
|
||||
"font_class": "permission",
|
||||
"unicode": "e612",
|
||||
"unicode_decimal": 58898
|
||||
},
|
||||
{
|
||||
"icon_id": "1727271",
|
||||
"name": "06商品-线性",
|
||||
"font_class": "goods",
|
||||
"unicode": "e889",
|
||||
"unicode_decimal": 59529
|
||||
},
|
||||
{
|
||||
"icon_id": "7587933",
|
||||
"name": "菜单",
|
||||
"font_class": "menu",
|
||||
"unicode": "e60e",
|
||||
"unicode_decimal": 58894
|
||||
},
|
||||
{
|
||||
"icon_id": "12758820",
|
||||
"name": "dictionary",
|
||||
"font_class": "dict-type",
|
||||
"unicode": "e652",
|
||||
"unicode_decimal": 58962
|
||||
},
|
||||
{
|
||||
"icon_id": "13768112",
|
||||
"name": "dictionary",
|
||||
"font_class": "dictionary",
|
||||
"unicode": "e600",
|
||||
"unicode_decimal": 58880
|
||||
},
|
||||
{
|
||||
"icon_id": "37734141",
|
||||
"name": "new-role",
|
||||
"font_class": "role",
|
||||
"unicode": "e604",
|
||||
"unicode_decimal": 58884
|
||||
},
|
||||
{
|
||||
"icon_id": "1727563",
|
||||
"name": "327全屏",
|
||||
"font_class": "fullscreen",
|
||||
"unicode": "e8fa",
|
||||
"unicode_decimal": 59642
|
||||
},
|
||||
{
|
||||
"icon_id": "1727566",
|
||||
"name": "328退出全屏",
|
||||
"font_class": "exit-fullscreen",
|
||||
"unicode": "e8fb",
|
||||
"unicode_decimal": 59643
|
||||
},
|
||||
{
|
||||
"icon_id": "11641852",
|
||||
"name": "表格",
|
||||
"font_class": "table",
|
||||
"unicode": "e615",
|
||||
"unicode_decimal": 58901
|
||||
},
|
||||
{
|
||||
"icon_id": "20104468",
|
||||
"name": "测试",
|
||||
"font_class": "test",
|
||||
"unicode": "e610",
|
||||
"unicode_decimal": 58896
|
||||
},
|
||||
{
|
||||
"icon_id": "26686335",
|
||||
"name": "中英文",
|
||||
"font_class": "lang",
|
||||
"unicode": "e649",
|
||||
"unicode_decimal": 58953
|
||||
},
|
||||
{
|
||||
"icon_id": "30012547",
|
||||
"name": "方案列表-默认",
|
||||
"font_class": "demo",
|
||||
"unicode": "e6ee",
|
||||
"unicode_decimal": 59118
|
||||
},
|
||||
{
|
||||
"icon_id": "37702310",
|
||||
"name": "文字大小",
|
||||
"font_class": "size",
|
||||
"unicode": "e660",
|
||||
"unicode_decimal": 58976
|
||||
}
|
||||
]
|
||||
}
|
BIN
main/src/assets/fonts/iconfont.ttf
Normal file
BIN
main/src/assets/fonts/iconfont.ttf
Normal file
Binary file not shown.
BIN
main/src/assets/fonts/iconfont.woff
Normal file
BIN
main/src/assets/fonts/iconfont.woff
Normal file
Binary file not shown.
BIN
main/src/assets/fonts/iconfont.woff2
Normal file
BIN
main/src/assets/fonts/iconfont.woff2
Normal file
Binary file not shown.
@ -1,11 +1,10 @@
|
||||
import { initGlobalState } from 'qiankun';
|
||||
import { reactive } from 'vue';
|
||||
|
||||
const initialState = reactive({
|
||||
export const initialState = reactive({
|
||||
token: null,
|
||||
user: {
|
||||
name: 'admin',
|
||||
},
|
||||
user: {},
|
||||
roles: [],
|
||||
menus: [],
|
||||
auths: [],
|
||||
});
|
||||
|
@ -3,77 +3,79 @@ import actions from './actions';
|
||||
const { VITE_APP_SUB_OS, VITE_APP_SUB_ADMIN, VITE_APP_SUB_GAS } = import.meta.env;
|
||||
|
||||
export const leftApps = [
|
||||
// {
|
||||
// name: 'sub-operation-service',
|
||||
// entry: VITE_APP_SUB_OS,
|
||||
// activeRule: '/sub-operation-service/',
|
||||
// title: '运营服务',
|
||||
// icon: 'images/platform/icon-home.png',
|
||||
// },
|
||||
// {
|
||||
// name: 'sub-admin',
|
||||
// entry: VITE_APP_SUB_ADMIN,
|
||||
// activeRule: '/sub-admin/',
|
||||
// title: '管理后台',
|
||||
// icon: 'images/platform/icon-admin.png',
|
||||
// },
|
||||
// {
|
||||
// name: 'sub-app',
|
||||
// entry: VITE_APP_SUB_ADMIN,
|
||||
// activeRule: '/sub-app/',
|
||||
// title: 'APP',
|
||||
// icon: 'images/platform/icon-app.png',
|
||||
// },
|
||||
// {
|
||||
// name: 'sub-screen',
|
||||
// entry: VITE_APP_SUB_ADMIN,
|
||||
// activeRule: '/sub-screen/',
|
||||
// title: '数据大屏',
|
||||
// icon: 'images/platform/icon-screen.png',
|
||||
// },
|
||||
{
|
||||
name: 'sub-operation-service',
|
||||
entry: VITE_APP_SUB_OS,
|
||||
activeRule: '/sub-operation-service',
|
||||
title: '运营服务',
|
||||
icon: 'images/platform/icon-home.png',
|
||||
},
|
||||
{
|
||||
name: 'sub-admin',
|
||||
entry: VITE_APP_SUB_ADMIN,
|
||||
activeRule: '/sub-admin',
|
||||
title: '管理后台',
|
||||
icon: 'images/platform/icon-admin.png',
|
||||
},
|
||||
{
|
||||
name: 'sub-app',
|
||||
entry: VITE_APP_SUB_ADMIN,
|
||||
activeRule: '/sub-app',
|
||||
title: 'APP',
|
||||
icon: 'images/platform/icon-app.png',
|
||||
},
|
||||
{
|
||||
name: 'sub-screen',
|
||||
entry: VITE_APP_SUB_ADMIN,
|
||||
activeRule: '/sub-screen',
|
||||
title: '数据大屏',
|
||||
icon: 'images/platform/icon-screen.png',
|
||||
},
|
||||
];
|
||||
|
||||
export const rightApps = [
|
||||
{
|
||||
name: 'sub-government-affairs-service',
|
||||
entry: VITE_APP_SUB_GAS,
|
||||
activeRule: '/sub-government-affairs-service/',
|
||||
activeRule: '/sub-government-affairs-service',
|
||||
title: '政务服务',
|
||||
icon: 'images/platform/icon-home.png',
|
||||
},
|
||||
// {
|
||||
// name: 'sub-government-admin',
|
||||
// entry: VITE_APP_SUB_ADMIN,
|
||||
// activeRule: '/sub-government-admin/',
|
||||
// title: '管理后台',
|
||||
// icon: 'images/platform/icon-admin.png',
|
||||
// },
|
||||
// {
|
||||
// name: 'sub-government-app',
|
||||
// entry: VITE_APP_SUB_ADMIN,
|
||||
// activeRule: '/sub-government-app/',
|
||||
// title: 'APP',
|
||||
// icon: 'images/platform/icon-app.png',
|
||||
// },
|
||||
// {
|
||||
// name: 'sub-government-screen',
|
||||
// entry: VITE_APP_SUB_ADMIN,
|
||||
// activeRule: '/sub-government-screen/',
|
||||
// title: '数据大屏',
|
||||
// icon: 'images/platform/icon-screen.png',
|
||||
// },
|
||||
{
|
||||
name: 'sub-government-admin',
|
||||
entry: VITE_APP_SUB_ADMIN,
|
||||
activeRule: '/sub-government-admin',
|
||||
title: '管理后台',
|
||||
icon: 'images/platform/icon-admin.png',
|
||||
},
|
||||
{
|
||||
name: 'sub-government-app',
|
||||
entry: VITE_APP_SUB_ADMIN,
|
||||
activeRule: '/sub-government-app',
|
||||
title: 'APP',
|
||||
icon: 'images/platform/icon-app.png',
|
||||
},
|
||||
{
|
||||
name: 'sub-government-screen',
|
||||
entry: VITE_APP_SUB_ADMIN,
|
||||
activeRule: '/sub-government-screen/',
|
||||
title: '数据大屏',
|
||||
icon: 'images/platform/icon-screen.png',
|
||||
},
|
||||
];
|
||||
|
||||
export const defaultApps = [
|
||||
// {
|
||||
// name: 'sub-admin',
|
||||
// entry: VITE_APP_SUB_ADMIN,
|
||||
// activeRule: '/sub-admin/',
|
||||
// title: '后台管理系统',
|
||||
// },
|
||||
{
|
||||
name: 'sub-government-affairs-service',
|
||||
entry: VITE_APP_SUB_GAS,
|
||||
activeRule: '/sub-government-affairs-service',
|
||||
title: '政务服务',
|
||||
icon: 'images/platform/icon-home.png',
|
||||
},
|
||||
];
|
||||
|
||||
export const microApps = [...defaultApps, ...leftApps, ...rightApps];
|
||||
// export const microApps = [...defaultApps, ...leftApps, ...rightApps];
|
||||
export const microApps = [...defaultApps];
|
||||
|
||||
const apps = microApps.map((item) => {
|
||||
return {
|
||||
|
@ -27,6 +27,12 @@ export const constantRoutes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// path: '/sub-government-affairs-service/:pathMatch(.*)',
|
||||
// name: 'sub-government-affairs-service',
|
||||
// component: Layout,
|
||||
// redirect: '/sub-government-affairs-service/home',
|
||||
// },
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
|
@ -1,6 +1,6 @@
|
||||
// color
|
||||
$legacy-ie: 10;
|
||||
$color-primary: #b10304;
|
||||
$color-primary: #20a0ff;
|
||||
$color-success: #13ce66;
|
||||
$color-warning: #f7ba2a;
|
||||
$color-danger: #ff4949;
|
||||
@ -20,7 +20,7 @@ $color-gray: #d3dce6;
|
||||
$color-gray-light: #e5e9f2;
|
||||
$color-gray-lighter: #eff2f7;
|
||||
$color-333: #333333;
|
||||
$color-666: #333333;
|
||||
$color-666: #666666;
|
||||
$color-999: #999999;
|
||||
$color-border-gray: #d1dbe5;
|
||||
$color-input-border: #dcdfe6;
|
||||
@ -51,6 +51,11 @@ $color-types: (
|
||||
#ff6d6d,
|
||||
#e64242,
|
||||
),
|
||||
gray: (
|
||||
$color-999,
|
||||
#999999,
|
||||
#9d9d9d,
|
||||
),
|
||||
);
|
||||
|
||||
@import 'utils/utils';
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2022-02-23 21:12:37
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2025-02-13 14:46:34
|
||||
* @LastEditTime: 2025-02-17 09:55:20
|
||||
*/
|
||||
import axios from 'axios';
|
||||
import { ElNotification } from 'element-plus';
|
||||
@ -32,7 +32,7 @@ const errorHandler = async (error) => {
|
||||
switch (response.status) {
|
||||
case 401:
|
||||
case 403:
|
||||
UserStore.logout();
|
||||
// UserStore.logout();
|
||||
router.push('/login');
|
||||
break;
|
||||
default:
|
||||
|
@ -24,7 +24,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
|
||||
const userStore = useUserStore();
|
||||
const hasToken = userStore.hasToken();
|
||||
|
||||
console.log('main', hasToken);
|
||||
if (hasToken) {
|
||||
if (to.path === '/login') {
|
||||
next({ path: '/' });
|
||||
|
@ -41,6 +41,7 @@ const gotoPage = (row) => {
|
||||
// curentApp,
|
||||
// });
|
||||
// console.log('===', actions.getGlobalState('user'));
|
||||
if (row.name !== 'sub-government-affairs-service') return;
|
||||
window.history.pushState({}, row.name, row.activeRule);
|
||||
};
|
||||
</script>
|
||||
|
@ -47,9 +47,9 @@
|
||||
<script>
|
||||
import Cookies from 'js-cookie';
|
||||
import { encrypt, decrypt } from '@/utils';
|
||||
import { GetCodeImg, Login } from '@/apis/login';
|
||||
import { GetCodeImg, Login, GetInfo } from '@/apis/login';
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import actions from '@/micro/actions';
|
||||
import actions, { initialState } from '@/micro/actions';
|
||||
|
||||
const UserStore = useUserStore();
|
||||
export default {
|
||||
@ -110,7 +110,7 @@ export default {
|
||||
};
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
this.$refs.loginForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
if (this.loginForm.rememberMe) {
|
||||
@ -122,20 +122,28 @@ export default {
|
||||
Cookies.remove('password');
|
||||
Cookies.remove('rememberMe');
|
||||
}
|
||||
Login(this.loginForm)
|
||||
.then((res) => {
|
||||
UserStore.setToken(res.data.access_token);
|
||||
actions.setGlobalState({
|
||||
token: res.data.access_token,
|
||||
});
|
||||
this.$router.push({ path: this.redirect || '/' }).catch(() => {});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
if (this.captchaEnabled) {
|
||||
this.getCode();
|
||||
}
|
||||
try {
|
||||
const res = await Login(this.loginForm);
|
||||
UserStore.setToken(res.data.access_token);
|
||||
const data = await GetInfo();
|
||||
UserStore.setUserInfo(data.user);
|
||||
UserStore.setOrgList(data.roles);
|
||||
// UserStore.setMenus(data.menus);
|
||||
actions.setGlobalState({
|
||||
...initialState,
|
||||
token: res.data.access_token ?? null,
|
||||
user: data.user ?? {},
|
||||
roles: data.roles ?? [],
|
||||
auths: data.permissions ?? [],
|
||||
});
|
||||
// this.$router.push({ path: this.redirect || '/' }).catch(() => {});
|
||||
this.$router.push({ path: this.redirect || '/' });
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
if (this.captchaEnabled) {
|
||||
this.getCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -154,7 +162,8 @@ export default {
|
||||
.title {
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
color: #707070;
|
||||
font-size: 30px;
|
||||
color: $color-333;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
|
@ -30,6 +30,30 @@ export default defineConfig(({ command, mode }) => {
|
||||
target: 'ESNext',
|
||||
outDir: 'dist',
|
||||
minify: 'terser',
|
||||
// terserOptions: {
|
||||
// compress: {
|
||||
// drop_console: true,
|
||||
// drop_debugger: true,
|
||||
// pure_funcs: ['console.log'],
|
||||
// },
|
||||
// output: {
|
||||
// comments: true,
|
||||
// },
|
||||
// },
|
||||
// reportCompressedSize: false,
|
||||
// chunkSizeWarningLimit: 2000,
|
||||
// rollupOptions: {
|
||||
// output: {
|
||||
// manualChunks(id) {
|
||||
// if (id.includes('node_modules')) {
|
||||
// return id.toString().split('node_modules/')[1].split('/')[1].toString();
|
||||
// }
|
||||
// },
|
||||
// chunkFileNames: 'assets/js/[name]-[hash].js',
|
||||
// entryFileNames: 'assets/js/[name]-[hash].js',
|
||||
// assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
|
||||
// },
|
||||
// },
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
|
@ -1,4 +1,6 @@
|
||||
# 生产环境配置
|
||||
VUE_APP_TITLE = 后台管理系统
|
||||
VUE_APP_NAME = 'sub-amin'
|
||||
ENV = 'production'
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_BASE_API = '/apis'
|
||||
VUE_APP_BASE_URL = ''
|
||||
|
@ -6,7 +6,7 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"format": "prettier --write 'src/**/*.{vue,ts,tsx,js,jsx,css,less,scss,json,md}'",
|
||||
|
@ -7,13 +7,14 @@ const TokenKey = 'Admin-Token';
|
||||
const ExpiresInKey = 'Admin-Expires-In';
|
||||
|
||||
export function getToken() {
|
||||
let token = Cookies.get(TokenKey);
|
||||
if (undefined === token || null == token || 'null' === token) {
|
||||
token = getQueryString('Authorization');
|
||||
if (null != token || 'null' !== token) Cookies.set(TokenKey, token);
|
||||
}
|
||||
if (undefined === token || null == token || 'null' === token) token = false;
|
||||
return token;
|
||||
return true
|
||||
// let token = Cookies.get(TokenKey);
|
||||
// if (undefined === token || null == token || 'null' === token) {
|
||||
// token = getQueryString('Authorization');
|
||||
// if (null != token || 'null' !== token) Cookies.set(TokenKey, token);
|
||||
// }
|
||||
// if (undefined === token || null == token || 'null' === token) token = false;
|
||||
// return token;
|
||||
}
|
||||
|
||||
export function setToken(token) {
|
||||
|
@ -1,15 +1,15 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
'use strict';
|
||||
const path = require('path');
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
return path.join(__dirname, dir);
|
||||
}
|
||||
|
||||
const CompressionPlugin = require('compression-webpack-plugin')
|
||||
const CompressionPlugin = require('compression-webpack-plugin');
|
||||
|
||||
const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题
|
||||
const name = process.env.VUE_APP_TITLE || '若依管理系统'; // 网页标题
|
||||
|
||||
const port = process.env.VUE_APP_PORT // 端口
|
||||
const port = process.env.VUE_APP_PORT; // 端口
|
||||
|
||||
// vue.config.js 配置说明
|
||||
// 官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||
@ -18,7 +18,7 @@ module.exports = {
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === 'development' ? `/sub-admin/` : '/',
|
||||
publicPath: `/sub-admin/`,
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
@ -67,6 +67,8 @@ module.exports = {
|
||||
library: `${name}-[name]`,
|
||||
libraryTarget: 'umd', // 把微应用打包成 umd 库格式
|
||||
jsonpFunction: `${name}`,
|
||||
filename: `[name].[hash].js`,
|
||||
chunkFilename: `[name].[hash].js`
|
||||
},
|
||||
plugins: [
|
||||
new CompressionPlugin({
|
||||
@ -80,11 +82,11 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.plugins.delete('preload') // TODO: need test
|
||||
config.plugins.delete('prefetch') // TODO: need test
|
||||
config.plugins.delete('preload'); // TODO: need test
|
||||
config.plugins.delete('prefetch'); // TODO: need test
|
||||
|
||||
// set svg-sprite-loader
|
||||
config.module.rule('svg').exclude.add(resolve('src/assets/icons')).end()
|
||||
config.module.rule('svg').exclude.add(resolve('src/assets/icons')).end();
|
||||
config.module
|
||||
.rule('icons')
|
||||
.test(/\.svg$/)
|
||||
@ -95,7 +97,7 @@ module.exports = {
|
||||
.options({
|
||||
symbolId: 'icon-[name]',
|
||||
})
|
||||
.end()
|
||||
.end();
|
||||
|
||||
config.module
|
||||
.rule('fonts')
|
||||
@ -107,10 +109,10 @@ module.exports = {
|
||||
...options,
|
||||
limit: 99999999,
|
||||
name: '[name].[hash:7].[ext]',
|
||||
}
|
||||
return options
|
||||
};
|
||||
return options;
|
||||
})
|
||||
.end()
|
||||
.end();
|
||||
|
||||
config.when(process.env.NODE_ENV !== 'development', (config) => {
|
||||
config
|
||||
@ -122,7 +124,7 @@ module.exports = {
|
||||
inline: /runtime\..*\.js$/,
|
||||
},
|
||||
])
|
||||
.end()
|
||||
.end();
|
||||
|
||||
config.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
@ -146,8 +148,8 @@ module.exports = {
|
||||
reuseExistingChunk: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
config.optimization.runtimeChunk('single')
|
||||
})
|
||||
});
|
||||
config.optimization.runtimeChunk('single');
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
|
@ -7,6 +7,3 @@ VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300'
|
||||
VITE_APP_SYSTEM_API = '/systemApis'
|
||||
VITE_APP_SYSTEM_URL = 'http://192.168.18.99:99/stage-api'
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
# 生产环境
|
||||
VITE_MODE = 'PRO'
|
||||
VITE_APP_MIAN = 'daimp-front-main'
|
||||
VITE_APP_NAME = 'sub-government-affairs-service'
|
||||
VITE_APP_BASE_API = ''
|
||||
VITE_APP_BASE_URL = 'http://192.168.18.99:8080/trace'
|
||||
# 接口
|
||||
VITE_APP_BASE_API = '/apis'
|
||||
VITE_APP_BASE_URL = ''
|
||||
VITE_APP_UPLOAD_API = '/uploadApis'
|
||||
VITE_APP_UPLOAD_URL = ''
|
||||
|
51
sub-government-affairs-service/src/apis/grid.js
Normal file
51
sub-government-affairs-service/src/apis/grid.js
Normal file
@ -0,0 +1,51 @@
|
||||
import request from '@/utils/axios';
|
||||
|
||||
/**
|
||||
* @Title: 列表
|
||||
*/
|
||||
export function GetEntityList(params = {}) {
|
||||
return request('/land-resource/gridManage/page', {
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: 新增
|
||||
*/
|
||||
export function AddEntity(data = {}) {
|
||||
return request('/land-resource/gridManage/save', {
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: 修改
|
||||
*/
|
||||
export function UpdateEntity(data = {}) {
|
||||
return request('/land-resource/gridManage/edit', {
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: 删除
|
||||
*/
|
||||
export function DeleteEntity(params = {}) {
|
||||
return request(`/land-resource/gridManage/delete/${params.id}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @Title: 导出
|
||||
*/
|
||||
export function ExportEntity(params = {}) {
|
||||
return request('/land-resource/gridManage/export', {
|
||||
method: 'GET',
|
||||
params,
|
||||
responseType: 'blob',
|
||||
});
|
||||
}
|
@ -3,20 +3,20 @@
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2023-06-20 14:29:45
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2025-02-13 15:59:56
|
||||
* @LastEditTime: 2025-02-14 11:39:56
|
||||
-->
|
||||
<template>
|
||||
<el-dropdown class="layout-avatar">
|
||||
<span class="el-dropdown-link">
|
||||
<el-avatar :size="30" class="avatar" :src="userInfo.avatar || getAssetsFile('images/avatar.gif')" />
|
||||
<span class="layout-avatar-name">{{ userInfo.name || '游客' }}</span>
|
||||
<span class="layout-avatar-name">{{ userInfo.userName || '游客' }}</span>
|
||||
<el-icon class="el-icon--right">
|
||||
<arrow-down />
|
||||
</el-icon>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item :command="0"> 当前角色:管理员 </el-dropdown-item>
|
||||
<el-dropdown-item :command="0"> 当前角色:{{ userInfo.nickName }} </el-dropdown-item>
|
||||
<el-dropdown-item :command="5" divided @click="logOut">
|
||||
<el-icon><SwitchButton /></el-icon>退出登录
|
||||
</el-dropdown-item>
|
||||
|
@ -18,8 +18,13 @@ export const registerMicroApps = (app) => {
|
||||
},
|
||||
});
|
||||
};
|
||||
const render = ({ container }) => {
|
||||
app.mount(container ? container : '#app');
|
||||
const render = async ({ container }) => {
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
if (!container) {
|
||||
console.error('挂载容器不存在');
|
||||
return;
|
||||
}
|
||||
app.mount(container.querySelector('#app') || '#app');
|
||||
};
|
||||
qiankunWindow.__POWERED_BY_QIANKUN__ ? initQiankun() : render({});
|
||||
};
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2023-06-20 11:48:41
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2025-02-05 09:31:21
|
||||
* @LastEditTime: 2025-02-17 11:47:53
|
||||
*/
|
||||
import { createRouter, createWebHistory } from 'vue-router';
|
||||
import { qiankunWindow } from 'vite-plugin-qiankun/dist/helper';
|
||||
@ -38,7 +38,7 @@ export const constantRoutes = [
|
||||
path: '/home',
|
||||
component: () => import('@/views/home/index.vue'),
|
||||
name: 'home',
|
||||
meta: { title: '政务服务主页', icon: 'House' },
|
||||
meta: { title: '首页', icon: 'House' },
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -50,9 +50,9 @@ export const constantRoutes = [
|
||||
* @Title notFoundRouter(找不到路由)
|
||||
*/
|
||||
export const notFoundRouter = {
|
||||
path: '/:pathMatch(.*)',
|
||||
name: 'notFound',
|
||||
redirect: '/404',
|
||||
// path: '/:pathMatch(.*)',
|
||||
// name: 'notFound',
|
||||
// redirect: '/404',
|
||||
};
|
||||
|
||||
const router = createRouter({
|
||||
|
@ -6,7 +6,7 @@ export default [
|
||||
path: '/plantingAndBreeding',
|
||||
name: 'plantingAndBreeding',
|
||||
component: Layout,
|
||||
redirect: '/planting',
|
||||
redirect: '/breeding',
|
||||
meta: { title: '种养殖管理', icon: 'Document' },
|
||||
children: [
|
||||
{
|
||||
|
@ -0,0 +1,69 @@
|
||||
import Layout from '@/layouts/index.vue';
|
||||
import Views from '@/layouts/Views.vue';
|
||||
|
||||
export default [
|
||||
{
|
||||
path: '/resource',
|
||||
name: 'resource',
|
||||
component: Layout,
|
||||
redirect: '/grid',
|
||||
meta: { title: '土地资源管理', icon: 'icon-test' },
|
||||
children: [
|
||||
{
|
||||
path: '/grid',
|
||||
component: () => import('@/views/resource/grid/index.vue'),
|
||||
name: 'grid',
|
||||
meta: { title: '网格化管理', icon: 'Document' },
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
// {
|
||||
// path: '/resource-info',
|
||||
// name: 'resource-info-manager',
|
||||
// component: Views,
|
||||
// meta: { title: '土地信息管理', icon: 'Document' },
|
||||
// redirect: '/land',
|
||||
// children: [
|
||||
// {
|
||||
// path: '/land',
|
||||
// component: () => import('@/views/resource/land/index.vue'),
|
||||
// name: 'land',
|
||||
// meta: { title: '土地资源', icon: 'Document' },
|
||||
// },
|
||||
// {
|
||||
// path: '/land-fill',
|
||||
// name: 'land-fill',
|
||||
// component: () => import('@/views/resource/land/index.vue'),
|
||||
// meta: { title: '土地信息填报审核', icon: 'Document' },
|
||||
// },
|
||||
// {
|
||||
// path: '/land-fill-review',
|
||||
// name: 'land-fill-review',
|
||||
// component: () => import('@/views/resource/land/index.vue'),
|
||||
// meta: { title: '土地流转信息填报审核', icon: 'Document' },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// path: '/land-monitor',
|
||||
// name: 'land-monitor',
|
||||
// component: Views,
|
||||
// meta: { title: '土地监管', icon: 'Document' },
|
||||
// redirect: '/land-patrol',
|
||||
// children: [
|
||||
// {
|
||||
// path: '/land-patrol',
|
||||
// component: () => import('@/views/resource/land/index.vue'),
|
||||
// name: 'land-patrol',
|
||||
// meta: { title: '土地使用巡查', icon: 'Document' },
|
||||
// },
|
||||
// {
|
||||
// path: '/land-handle',
|
||||
// name: 'land-handle',
|
||||
// component: () => import('@/views/resource/land/index.vue'),
|
||||
// meta: { title: '土地违法处理', icon: 'Document' },
|
||||
// },
|
||||
// ],
|
||||
// },
|
@ -6,63 +6,21 @@ export default [
|
||||
path: '/resource',
|
||||
name: 'resource',
|
||||
component: Layout,
|
||||
redirect: '/resource-map',
|
||||
meta: { title: '土地资源管理管理', icon: 'icon-test' },
|
||||
redirect: '/grid',
|
||||
meta: { title: '土地资源管理', icon: 'icon-test' },
|
||||
children: [
|
||||
{
|
||||
path: '/resource-map',
|
||||
component: () => import('@/views/resource/map/index.vue'),
|
||||
name: 'resource-map',
|
||||
meta: { title: '土地资源一张图', icon: 'Document' },
|
||||
path: '/grid',
|
||||
component: () => import('@/views/resource/grid/index.vue'),
|
||||
name: 'grid',
|
||||
meta: { title: '网格化管理', icon: 'Document' },
|
||||
},
|
||||
{
|
||||
path: '/resource-info',
|
||||
name: 'resource-info-manager',
|
||||
component: Views,
|
||||
meta: { title: '土地信息管理', icon: 'Document' },
|
||||
redirect: '/land',
|
||||
children: [
|
||||
{
|
||||
path: '/land',
|
||||
component: () => import('@/views/resource/land/index.vue'),
|
||||
name: 'land',
|
||||
meta: { title: '土地资源', icon: 'Document' },
|
||||
},
|
||||
// {
|
||||
// path: '/land-fill',
|
||||
// name: 'land-fill',
|
||||
// component: () => import('@/views/resource/land/index.vue'),
|
||||
// meta: { title: '土地信息填报审核', icon: 'Document' },
|
||||
// },
|
||||
// {
|
||||
// path: '/land-fill-review',
|
||||
// name: 'land-fill-review',
|
||||
// component: () => import('@/views/resource/land/index.vue'),
|
||||
// meta: { title: '土地流转信息填报审核', icon: 'Document' },
|
||||
// },
|
||||
],
|
||||
path: '/grid2',
|
||||
component: () => import('@/views/resource/grid/index.vue'),
|
||||
name: 'grid2',
|
||||
meta: { title: '网格化管理2', icon: 'Document' },
|
||||
},
|
||||
// {
|
||||
// path: '/land-monitor',
|
||||
// name: 'land-monitor',
|
||||
// component: Views,
|
||||
// meta: { title: '土地监管', icon: 'Document' },
|
||||
// redirect: '/land-patrol',
|
||||
// children: [
|
||||
// {
|
||||
// path: '/land-patrol',
|
||||
// component: () => import('@/views/resource/land/index.vue'),
|
||||
// name: 'land-patrol',
|
||||
// meta: { title: '土地使用巡查', icon: 'Document' },
|
||||
// },
|
||||
// {
|
||||
// path: '/land-handle',
|
||||
// name: 'land-handle',
|
||||
// component: () => import('@/views/resource/land/index.vue'),
|
||||
// meta: { title: '土地违法处理', icon: 'Document' },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
@ -22,8 +22,8 @@ router.beforeEach(async (to, from, next) => {
|
||||
}
|
||||
|
||||
const userStore = useUserStore();
|
||||
const hasToken = true;
|
||||
|
||||
const hasToken = userStore.hasToken();
|
||||
console.log('sub', hasToken);
|
||||
if (hasToken) {
|
||||
if (to.path === '/login') {
|
||||
// 如果已登录,请重定向到主页
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div style="width: 100%; height: 100%">
|
||||
<div>政务服务</div>
|
||||
<div></div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="home"></script>
|
||||
|
371
sub-government-affairs-service/src/views/resource/grid/index.vue
Normal file
371
sub-government-affairs-service/src/views/resource/grid/index.vue
Normal file
@ -0,0 +1,371 @@
|
||||
<template>
|
||||
<div class="custom-page">
|
||||
<avue-crud
|
||||
ref="crudRef"
|
||||
v-model="state.form"
|
||||
v-model:search="state.query"
|
||||
v-model:page="state.pageData"
|
||||
:table-loading="state.loading"
|
||||
:data="state.data"
|
||||
:option="state.options"
|
||||
@refresh-change="refreshChange"
|
||||
@search-reset="searchChange"
|
||||
@search-change="searchChange"
|
||||
@selection-change="selectionChange"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
@row-save="rowSave"
|
||||
@row-update="rowUpdate"
|
||||
@row-del="rowDel"
|
||||
>
|
||||
<template #menu-left>
|
||||
<el-button type="success" icon="download" @click="onExport">导出</el-button>
|
||||
</template>
|
||||
|
||||
<template #menu="scope">
|
||||
<custom-table-operate :actions="state.options.actions" :data="scope" />
|
||||
</template>
|
||||
</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/grid';
|
||||
|
||||
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,
|
||||
},
|
||||
form: {},
|
||||
selection: [],
|
||||
options: {
|
||||
...CRUD_OPTIONS,
|
||||
addBtnText: '添加网格',
|
||||
column: [
|
||||
{
|
||||
label: '网格区',
|
||||
prop: 'gridArea',
|
||||
search: true,
|
||||
width: 200,
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '网格名称',
|
||||
prop: 'gridName',
|
||||
search: true,
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '网格区域',
|
||||
prop: 'gridAreaName',
|
||||
width: 300,
|
||||
display: false,
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '网格区域',
|
||||
prop: 'cities',
|
||||
type: 'cascader',
|
||||
hide: true,
|
||||
addDisplay: true,
|
||||
editDisplay: true,
|
||||
viewDisplay: false,
|
||||
props: {
|
||||
label: 'areaName',
|
||||
value: 'areaCode',
|
||||
children: 'areaChildVOS',
|
||||
},
|
||||
dicUrl: `${VITE_APP_BASE_API}/system/area/region?areaCode=530000`,
|
||||
dicHeaders: {
|
||||
authorization: UserStore.token,
|
||||
},
|
||||
dicFormatter: (res) => res.data ?? [],
|
||||
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: 'province',
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: '市',
|
||||
prop: 'city',
|
||||
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: 'note',
|
||||
type: 'textarea',
|
||||
span: 24,
|
||||
rows: 4,
|
||||
overHidden: true,
|
||||
width: 200,
|
||||
rules: {
|
||||
required: true,
|
||||
message: '请输入',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
prop: 'createTime',
|
||||
width: 200,
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
name: '查看',
|
||||
icon: 'view',
|
||||
event: ({ row }) => rowView(row),
|
||||
},
|
||||
{
|
||||
name: '编辑',
|
||||
icon: 'edit',
|
||||
event: ({ row }) => rowEdit(row),
|
||||
},
|
||||
{
|
||||
type: 'danger',
|
||||
name: '删除',
|
||||
icon: 'delete',
|
||||
event: ({ row }) => rowDel(row),
|
||||
},
|
||||
],
|
||||
},
|
||||
pageData: {
|
||||
total: 0,
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
data: [],
|
||||
currentRow: {},
|
||||
});
|
||||
|
||||
// 加载
|
||||
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;
|
||||
});
|
||||
};
|
||||
|
||||
loadData();
|
||||
|
||||
// 页数
|
||||
const currentChange = (current) => {
|
||||
state.query.current = current;
|
||||
loadData();
|
||||
};
|
||||
|
||||
// 条数
|
||||
const sizeChange = (size) => {
|
||||
state.query.size = size;
|
||||
loadData();
|
||||
};
|
||||
|
||||
// 搜索
|
||||
const searchChange = (params, done) => {
|
||||
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) => {
|
||||
// state.currentRow = row;
|
||||
crudRef.value.rowView(row);
|
||||
};
|
||||
|
||||
const setCity = (row) => {
|
||||
if (!isEmpty(row.cities)) {
|
||||
row.province = row?.cities[0] ?? null;
|
||||
row.city = row?.cities[1] ?? null;
|
||||
row.county = row?.cities[2] ?? null;
|
||||
row.village = row?.cities[3] ?? null;
|
||||
}
|
||||
};
|
||||
|
||||
// 新增
|
||||
const rowSave = (row, done, loading) => {
|
||||
setCity(row);
|
||||
AddEntity(row)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
app.$message.success('添加成功!');
|
||||
done();
|
||||
loadData();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
app.$message.error(err.msg);
|
||||
})
|
||||
.finally(() => {
|
||||
loading();
|
||||
});
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const rowEdit = (row) => {
|
||||
row.cities = compact([row.province, row.city, row.county ?? '', row.village ?? '']);
|
||||
crudRef.value.rowEdit(row);
|
||||
};
|
||||
const rowUpdate = (row, index, done, loading) => {
|
||||
setCity(row);
|
||||
UpdateEntity(row)
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
app.$message.success('更新成功!');
|
||||
done();
|
||||
loadData();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
app.$message.error(err.msg);
|
||||
})
|
||||
.finally(() => {
|
||||
loading();
|
||||
});
|
||||
};
|
||||
|
||||
// 删除
|
||||
const rowDel = (row, index, done) => {
|
||||
if (isEmpty(row)) return;
|
||||
app
|
||||
.$confirm(`删除后信息将不可查看,确认要删除吗?`, '确定删除', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
DeleteEntity({ id: row.id })
|
||||
.then((res) => {
|
||||
if (res.code === 200) {
|
||||
app.$message.success('删除成功!');
|
||||
done();
|
||||
loadData();
|
||||
}
|
||||
})
|
||||
.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)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
downloadFile(res.data, `${fileName}.xlsx`, 'blob');
|
||||
app.$message.success('导出成功!');
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
app.$message.error('导出失败!');
|
||||
})
|
||||
.finally(() => {
|
||||
state.loading = false;
|
||||
});
|
||||
};
|
||||
</script>
|
@ -1,6 +0,0 @@
|
||||
<template>
|
||||
<div style="width: 100%; height: 100%">
|
||||
<div>土地资源一张图</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="home"></script>
|
@ -62,7 +62,7 @@ import { GetEntityList, AddEntity, UpdateEntity, DeleteEntity, ImportEntity, Exp
|
||||
import CustomInfo from './info.vue';
|
||||
import CustomQualityAdd from '../quality/form.vue';
|
||||
|
||||
const { VITE_APP_SYSTEM_API } = import.meta.env;
|
||||
const { VITE_APP_BASE_API } = import.meta.env;
|
||||
const app = useApp();
|
||||
const UserStore = useUserStore();
|
||||
const crudRef = ref(null);
|
||||
@ -117,7 +117,7 @@ const state = reactive({
|
||||
label: 'dictLabel',
|
||||
value: 'dictValue',
|
||||
},
|
||||
dicUrl: `${VITE_APP_SYSTEM_API}/system/dict/data/list?pageNum=1&pageSize=20&dictType=sys_product_type`,
|
||||
dicUrl: `${VITE_APP_BASE_API}/system/dict/data/list?pageNum=1&pageSize=20&dictType=sys_product_type`,
|
||||
dicHeaders: {
|
||||
authorization: UserStore.token,
|
||||
},
|
||||
@ -146,7 +146,7 @@ const state = reactive({
|
||||
label: 'dictLabel',
|
||||
value: 'dictValue',
|
||||
},
|
||||
dicUrl: `${VITE_APP_SYSTEM_API}/system/dict/data/list?pageNum=1&pageSize=20&dictType=sys_unit_type`,
|
||||
dicUrl: `${VITE_APP_BASE_API}/system/dict/data/list?pageNum=1&pageSize=20&dictType=sys_unit_type`,
|
||||
dicHeaders: {
|
||||
authorization: UserStore.token,
|
||||
},
|
||||
@ -257,7 +257,7 @@ const state = reactive({
|
||||
value: 'areaCode',
|
||||
children: 'areaChildVOS',
|
||||
},
|
||||
dicUrl: `${VITE_APP_SYSTEM_API}/system/area/region?areaCode=530000`,
|
||||
dicUrl: `${VITE_APP_BASE_API}/system/area/region?areaCode=530000`,
|
||||
dicHeaders: {
|
||||
authorization: UserStore.token,
|
||||
},
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @Author: zenghua.wang
|
||||
* @Date: 2022-09-18 21:24:29
|
||||
* @LastEditors: zenghua.wang
|
||||
* @LastEditTime: 2025-02-13 15:47:00
|
||||
* @LastEditTime: 2025-02-17 10:58:12
|
||||
*/
|
||||
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
@ -34,11 +34,35 @@ export default defineConfig(({ command, mode }) => {
|
||||
VITE_APP_SYSTEM_URL,
|
||||
} = loadEnv(mode, process.cwd());
|
||||
const config = {
|
||||
base: './',
|
||||
base: '/sub-government-affairs-service/',
|
||||
build: {
|
||||
target: 'ESNext',
|
||||
outDir: 'dist',
|
||||
minify: 'terser',
|
||||
// terserOptions: {
|
||||
// compress: {
|
||||
// drop_console: true,
|
||||
// drop_debugger: true,
|
||||
// pure_funcs: ['console.log'],
|
||||
// },
|
||||
// output: {
|
||||
// comments: true,
|
||||
// },
|
||||
// },
|
||||
// reportCompressedSize: false,
|
||||
// chunkSizeWarningLimit: 2000,
|
||||
// rollupOptions: {
|
||||
// output: {
|
||||
// manualChunks(id) {
|
||||
// if (id.includes('node_modules')) {
|
||||
// return id.toString().split('node_modules/')[1].split('/')[1].toString();
|
||||
// }
|
||||
// },
|
||||
// chunkFileNames: 'assets/js/[name]-[hash].js',
|
||||
// entryFileNames: 'assets/js/[name]-[hash].js',
|
||||
// assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
|
||||
// },
|
||||
// },
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
|
Loading…
x
Reference in New Issue
Block a user