From bef19f2b6641f40ce21cadd72257600dec9e8019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98lijianhao=E2=80=99?= Date: Thu, 28 Jul 2022 10:03:10 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E5=85=BB=E6=8A=A4=E9=81=93=E8=B7=AF?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=95=B0=E9=87=8F=E6=95=B0=E6=8D=AE=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../footer/conserve/right/right-center.js | 3 ++- .../containers/footer/conserve/right/right-top.js | 13 +++++++------ .../src/sections/quanju/containers/heand/index.js | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js index 64147c84..5aad0bdd 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js @@ -14,7 +14,8 @@ const RightCenter = (props) => { const style = { height: "31%", marginTop: "3%" } const textStyle = { fontSize: 14, color: '#E9F7FF' } const numStyle = { color: '#fff', fontSize: 21, fontFamily: 'YouSheBiaoTiHei', textShadow: '0px 0px 8px #1C60FE', marginTop: 8 } - const list = highwaysData?.slice(4, 8).map((h,index)=>{ + let list = highwaysData?.sort((a, b) => a.id - b.id) + list = highwaysData?.slice(4, 8).map((h,index)=>{ return { id:h.id, name:h.name, diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js index e264b79d..11ed88f3 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js @@ -16,13 +16,14 @@ const RightTop = (props) => { const style = { height: "31%", marginTop: "3%" } const textStyle = { fontSize: 14, color: '#E9F7FF' } const numStyle = { color: '#fff', fontSize: 21, fontFamily: 'YouSheBiaoTiHei', textShadow: '0px 0px 8px #1C60FE', marginTop: 8 } - const list = highwaysData?.slice(0, 4).map((h,index)=>{ + let list = highwaysData?.sort((a, b) => a.id - b.id) + list = highwaysData?.slice(0, 4).map((h, index) => { return { - id:h.id, - name:h.name, - count:h.count, - unit:unit[index], - icon:iconSrc[index] + id: h.id, + name: h.name, + count: h.count, + unit: unit[index], + icon: iconSrc[index] } }) diff --git a/web/client/src/sections/quanju/containers/heand/index.js b/web/client/src/sections/quanju/containers/heand/index.js index 92f01e00..e2c4a82a 100644 --- a/web/client/src/sections/quanju/containers/heand/index.js +++ b/web/client/src/sections/quanju/containers/heand/index.js @@ -21,7 +21,7 @@ const Header = (props) => {
{ onClick("build") }}>建设
-
{ +
{ onClick("guanli") }}>管理
{ From 33210217dc31926d2e8de446e729047a90154cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98lijianhao=E2=80=99?= Date: Thu, 28 Jul 2022 10:18:06 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E5=B8=A6=E5=87=BA=E4=B8=8A=E4=B8=80=E6=AC=A1=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/organization/components/depModal.js | 2 +- web/client/src/sections/organization/components/userModal.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/client/src/sections/organization/components/depModal.js b/web/client/src/sections/organization/components/depModal.js index 59f6ed5e..8f6d7471 100644 --- a/web/client/src/sections/organization/components/depModal.js +++ b/web/client/src/sections/organization/components/depModal.js @@ -30,7 +30,7 @@ const DepModal = (props) => { onFinish={onFinish} formRef={formRef} destroyOnClose - initialValues={data || null} + initialValues={depModalType === 'edit' ? data : null} > { label="姓名" required placeholder="请输入姓名" - rules={[{ required: true, message: '请输入姓名' },{ max: 10, message: '请输入10个字以内的名称' }]} + rules={[{ required: true, message: '请输入姓名' },{ max: 5, message: '请输入5个字以内的名称' }]} /> < ProFormText name={['contract', 'phone']} From 0a1922a2231f933e5bf4efcfea5996c42192d030 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 28 Jul 2022 10:26:19 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/data/index.js | 24 ++++++++++++++++++- api/app/lib/index.js | 1 - api/app/lib/routes/data/index.js | 4 ++++ web/client/assets/color.less | 22 ++++++++--------- .../src/layout/components/header/index.js | 3 ++- .../src/layout/containers/layout/index.js | 18 +++++--------- web/package.json | 2 +- 7 files changed, 47 insertions(+), 27 deletions(-) diff --git a/api/app/lib/controllers/data/index.js b/api/app/lib/controllers/data/index.js index 93c7ac93..4dc8cb25 100644 --- a/api/app/lib/controllers/data/index.js +++ b/api/app/lib/controllers/data/index.js @@ -2,6 +2,7 @@ const fs = require('fs'); const xlsxDownload = require('../../../../utils/xlsxDownload.js'); const moment = require('moment'); +const request = require('superagent'); async function dataExport (ctx) { try { @@ -105,6 +106,27 @@ async function dataExport (ctx) { } } +async function godTrans (ctx) { + try { + const models = ctx.fs.dc.models; + const { userId } = ctx.fs.api + + const res = await request.get('https://report.amap.com/ajax/districtRank.do?linksType=1&cityCode=360100') + + const data = JSON.parse(res.text) + const nanchang = data.find(item => item.name == '南昌县') || {} + ctx.status = 200 + ctx.body = nanchang + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); + ctx.status = 400; + ctx.body = { + message: typeof error == 'string' ? error : undefined + } + } +} + module.exports = { - dataExport + dataExport, + godTrans }; \ No newline at end of file diff --git a/api/app/lib/index.js b/api/app/lib/index.js index 7bfe983a..ba30ac57 100644 --- a/api/app/lib/index.js +++ b/api/app/lib/index.js @@ -23,7 +23,6 @@ module.exports.entry = function (app, router, opts) { module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Sequelize, models: {} } fs.readdirSync(path.join(__dirname, '/models')).forEach((filename) => { - console.log(filename); require(`./models/${filename}`)(dc) }); diff --git a/api/app/lib/routes/data/index.js b/api/app/lib/routes/data/index.js index c49cce4b..c8a2fe2b 100644 --- a/api/app/lib/routes/data/index.js +++ b/api/app/lib/routes/data/index.js @@ -15,6 +15,10 @@ module.exports = function (app, router, opts) { app.fs.api.logAttr['GET/data/export'] = { content: '导出数据', visible: true }; router.get('/data/export', dataIndex.dataExport); + // god 交通 + app.fs.api.logAttr['GET/data/god_trans'] = { content: '获取高德交通数据', visible: true }; + router.get('/data/god_trans', dataIndex.godTrans); + // 运政 //客运车 async function setVehicleType (ctx, next) { diff --git a/web/client/assets/color.less b/web/client/assets/color.less index 3a14a30f..2899426f 100644 --- a/web/client/assets/color.less +++ b/web/client/assets/color.less @@ -1149,10 +1149,10 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-mentions-dropdown-menu-item-active {background-color: @item-hover-bg;} .ant-menu-item-danger.ant-menu-item {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-item-danger.ant-menu-item-active {color: #ff4d4f;} -.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{slider-rail-background-color}", 1)`);} +.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{select-clear-background}", 1)`);} .ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;} -.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{slider-rail-background-color}", 1)`);} +.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{select-clear-background}", 1)`);} .ant-menu-inline .ant-menu-item-danger.ant-menu-item::after {border-right-color: #ff4d4f;} .ant-menu-dark .ant-menu-item-danger.ant-menu-item, .ant-menu-dark .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-dark .ant-menu-item-danger.ant-menu-item > a {color: #ff4d4f;} .ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {color: #fff;background-color: #ff4d4f;} @@ -1722,11 +1722,11 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;} .ant-tag-checkable:active, .ant-tag-checkable-checked {color: #fff;} .ant-tag-checkable-checked {background-color: @primary-color;} .ant-tag-checkable:active {background-color: color(~`colorPalette("@{primary-color}", 7)`);} -.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{table-expand-icon-bg}", 1)`);border-color: #ffadd2;} +.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{modal-footer-border-color-split}", 1)`);border-color: #ffadd2;} .ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} -.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{table-expand-icon-bg}", 1)`);border-color: #ffadd2;} +.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{modal-footer-border-color-split}", 1)`);border-color: #ffadd2;} .ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} -.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{slider-rail-background-color}", 1)`);border-color: #ffa39e;} +.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{select-clear-background}", 1)`);border-color: #ffa39e;} .ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;} .ant-tag-volcano {color: #d4380d;background: #fff2e8;border-color: #ffbb96;} .ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;} @@ -1734,19 +1734,19 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;} .ant-tag-orange-inverse {color: #fff;background: #fa8c16;border-color: #fa8c16;} .ant-tag-yellow {color: #d4b106;background: #feffe6;border-color: #fffb8f;} .ant-tag-yellow-inverse {color: #fff;background: #fadb14;border-color: #fadb14;} -.ant-tag-gold {color: #d48806;background: #fffbe6;border-color: #ffe58f;} +.ant-tag-gold {color: #d48806;background: color(~`colorPalette("@{error-color-deprecated-border}", 1)`);border-color: #ffe58f;} .ant-tag-gold-inverse {color: #fff;background: #faad14;border-color: #faad14;} .ant-tag-cyan {color: #08979c;background: #e6fffb;border-color: #87e8de;} .ant-tag-cyan-inverse {color: #fff;background: #13c2c2;border-color: #13c2c2;} -.ant-tag-lime {color: #7cb305;background: #fcffe6;border-color: #eaff8f;} +.ant-tag-lime {color: #7cb305;background: color(~`colorPalette("@{steps-nav-arrow-color}", 1)`);border-color: #eaff8f;} .ant-tag-lime-inverse {color: #fff;background: #a0d911;border-color: #a0d911;} .ant-tag-green {color: #389e0d;background: #f6ffed;border-color: #b7eb8f;} .ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;} -.ant-tag-blue {color: #096dd9;background: #e6f7ff;border-color: #91d5ff;} +.ant-tag-blue {color: #096dd9;background: color(~`colorPalette("@{pagination-item-input-bg}", 1)`);border-color: color(~`colorPalette("@{pagination-item-input-bg}", 3)`);} .ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} -.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{cascader-menu-bg}", 1)`);border-color: #adc6ff;} +.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{modal-content-bg}", 1)`);border-color: #adc6ff;} .ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} -.ant-tag-purple {color: #531dab;background: color(~`colorPalette("@{disabled-color-dark}", 4)`);border-color: #d3adf7;} +.ant-tag-purple {color: #531dab;background: #f9f0ff;border-color: #d3adf7;} .ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;} .ant-tag-success {color: #52c41a;background: @success-color-deprecated-bg;border-color: @success-color-deprecated-border;} .ant-tag-processing {color: @primary-color;background: @info-color-deprecated-bg;border-color: @info-color-deprecated-border;} @@ -1984,7 +1984,7 @@ a.ant-typography.ant-typography-disabled:hover, .ant-typography a.ant-typography .ant-upload-list-picture .ant-upload-list-item-error, .ant-upload-list-picture-card .ant-upload-list-item-error {border-color: #ff4d4f;} .ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info, .ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info {background: transparent;} .ant-upload-list-picture .ant-upload-list-item-uploading, .ant-upload-list-picture-card .ant-upload-list-item-uploading {border-style: dashed;} -.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'] {fill: @error-color-deprecated-bg;} +.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='color(~`colorPalette("@{pagination-item-input-bg}", 1)`)'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='color(~`colorPalette("@{pagination-item-input-bg}", 1)`)'] {fill: @error-color-deprecated-bg;} .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'] {fill: #ff4d4f;} .ant-upload-list-picture-card .ant-upload-list-item-info::before {background-color: rgba(0, 0, 0, 0.5);} .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete {color: rgba(255, 255, 255, 0.85);} diff --git a/web/client/src/layout/components/header/index.js b/web/client/src/layout/components/header/index.js index f4e0e5c8..55ed786f 100644 --- a/web/client/src/layout/components/header/index.js +++ b/web/client/src/layout/components/header/index.js @@ -52,7 +52,8 @@ const Header = props => {