提交 12dd8e6d 作者: 龚洪江

Merge remote-tracking branch 'origin/develop' into develop

......@@ -31,6 +31,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: WeChat Work notification by markdown
uses: chf007/action-wechat-work@master
env:
WECHAT_WORK_BOT_WEBHOOK: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9be1b073-1760-442d-8e3d-faa0fd32ea16
with:
msgtype: markdown
content: "
### GitHub提交信息 \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{ github.event.head_commit.message }} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到分支: ${{github.ref}} \n
即将开始更新,请关注Argocd同步状态...
"
- name: Login to ACR EE with the AccessKey pair
uses: aliyun/acr-login@v1
with:
......@@ -56,5 +71,20 @@ jobs:
git config user.name "Chuck"
git config user.email "Chuck@users.noreply.github.com"
git remote set-url origin "$GITLAB_URL"
git commit -am "Generated Image Update"
git push origin "develop"
git commit -am "Update Image Tag"
git tag -a $TAG -m "日常迭代"
git push origin "develop" --tags
- name: Send Error Notification by WeChat
if: ${{ failure() }}
run: |
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9be1b073-1760-442d-8e3d-faa0fd32ea16' -H 'Content-Type: application/json' -d '
{
"msgtype": "markdown",
"markdown": {
"content": "### GitHub构建并推送镜像失败 \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到分支: ${{github.ref}} \n 请修复错误后重新提交..."
}'
\ No newline at end of file
......@@ -32,6 +32,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: WeChat Work notification by markdown
uses: chf007/action-wechat-work@master
env:
WECHAT_WORK_BOT_WEBHOOK: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9be1b073-1760-442d-8e3d-faa0fd32ea16
with:
msgtype: markdown
content: "
### GitHub提交信息 \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{ github.event.head_commit.message }} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到分支: ${{github.ref}} \n
即将开始更新,请关注Argocd同步状态...
"
- name: Login to ACR EE with the AccessKey pair
uses: aliyun/acr-login@v1
with:
......@@ -57,5 +72,20 @@ jobs:
git config user.name "Chuck"
git config user.email "Chuck@users.noreply.github.com"
git remote set-url origin "$GITLAB_URL"
git commit -am "generated Image update"
git push origin "master"
git commit -am "Update Image Tag"
git tag -a $TAG -m "日常迭代"
git push origin "master" --tags
- name: Send Error Notification by WeChat
if: ${{ failure() }}
run: |
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9be1b073-1760-442d-8e3d-faa0fd32ea16' -H 'Content-Type: application/json' -d '
{
"msgtype": "markdown",
"markdown": {
"content": "### GitHub构建并推送镜像失败 \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到分支: ${{github.ref}} \n 请修复错误后重新提交..."
}'
\ No newline at end of file
#请求接口地址
#VITE_REQUEST_BASE_URL='https://www.iuav.shop'
VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='https://test.iuav.shop' // 测试服
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='/api'
VITE_REQUEST_BASE_URL='/api'
#旧版接口地址
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='https://test.iuav.mmcuav.cn'
......@@ -10,6 +10,7 @@ VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='http://192.168.3.22:10001'
#VITE_REQUEST_BASE_URL='http://192.168.3.17:8099'
#VITE_REQUEST_BASE_URL='http://192.168.3.23:35150'
#VITE_REQUEST_BASE_URL='http://192.168.3.111:10001'
#版本
NODE_ENV='development'
VERSION='2.2.4.230217.Release'
#请求接口地址
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='https://www.iuav.shop'
VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='/api'
#旧版接口地址
......
......@@ -4,7 +4,7 @@ metadata:
name: admin-deployment
namespace: default
spec:
minReadySeconds: 5
minReadySeconds: 10
revisionHistoryLimit: 2
replicas: 1
selector:
......@@ -27,6 +27,7 @@ spec:
cpu: 100m
ports:
- containerPort: 80
name: admin-port
volumes:
- name: log-of-nginx
hostPath:
......
......@@ -3,9 +3,9 @@ kind: Deployment
metadata:
name: admin-deployment
spec:
replicas: 2
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
\ No newline at end of file
maxUnavailable: 0
......@@ -14,4 +14,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag: 6734c922902c32116dbfda98fbd95793607fb835
newTag: bac794979fb129c97afb5c04e149709b916230bb
......@@ -31,6 +31,7 @@ export type releaseTenderNews = InterListFunction<
port: number;
tenderName: string;
using: number;
url: string;
}
>;
// 新增招标快讯
......
......@@ -2,6 +2,8 @@ import React, { useEffect, useState } from 'react';
import { message, Upload, UploadProps } from 'antd';
import { CommonAPI } from '~/api';
import './index.scss';
import Viewer from '~/components/viewer';
import saveAs from 'file-saver';
interface PropsType {
listType?: 'text' | 'picture' | 'picture-card'; // 上传列表的内建样式
......@@ -43,6 +45,11 @@ export const Uploader: React.FC<PropsType> = (props) => {
defaultFileList,
disabled,
} = props;
// 是否上传图片
const [visible, setVisible] = useState<boolean>(false);
// 当前选择的文件
const [currentFile, setCurrentFile] = useState<string>();
// 文件列表
const [fileList, setFileList] = useState<any[]>([]);
// 上传文件配置
const uploadProps: UploadProps = {
......@@ -114,7 +121,23 @@ export const Uploader: React.FC<PropsType> = (props) => {
setFileList(newFileList);
onChange?.(newFileList);
},
// onPreview: { onPreview },
onPreview: (res) => {
const { url } = res;
const fileType = url?.substring(url?.lastIndexOf('.') + 1) || '';
if (['png', 'jpg', 'bmp', 'gif', 'jpeg', 'webp'].includes(fileType)) {
setCurrentFile(url);
setVisible(true);
} else {
if (url) {
// 如果有oss地址,则直接下载
saveAs(url.replace(/^http:/, 'https:'), res?.name ? res.name : '未命名文件');
} else {
// 没有就直接保存文件
const blob = new Blob([res as any]);
saveAs(blob, res.name);
}
}
},
};
useEffect(() => {
// 如果有默认文件列表
......@@ -135,6 +158,19 @@ export const Uploader: React.FC<PropsType> = (props) => {
{fileList.length < (fileLength || 1) && children}
</Upload>
)}
<Viewer
visible={visible}
currentImgList={[
{
src: currentFile,
alt: '图片',
},
]}
activeViewerIndex={0}
setVisible={() => {
setVisible(false);
}}
/>
</div>
);
};
......@@ -5,6 +5,7 @@ interface propsType {
visible: boolean;
currentImgList: any;
activeViewerIndex: number;
// eslint-disable-next-line @typescript-eslint/ban-types
setVisible: Function;
}
......
......@@ -65,9 +65,9 @@ export const ChangeModal: FC<PropsType> = (props) => {
return (
<Modal open={open} title='变更' onCancel={handleClosed} destroyOnClose onOk={handleSubmit}>
<Form form={form} labelCol={{ span: 5 }} wrapperCol={{ span: 16 }}>
<Form.Item label='等级标签' name='cooperationTagIds'>
<Form.Item label='加盟身份' name='cooperationTagIds'>
<Select
placeholder='请选择等级标签'
placeholder='请选择加盟身份'
disabled={!data?.userName && !data?.companyName}
allowClear
options={cooperationTagIdList}
......
......@@ -147,7 +147,7 @@ function CustomListView() {
render: (text) => (text ? '普通用户' : '游客用户'),
},
{
title: '渠道等级',
title: '加盟身份',
dataIndex: 'cooperationTagVOS',
align: 'center',
render: (_text, record) =>
......
......@@ -38,6 +38,8 @@ const bannerType = [
{ label: '链接', value: 8 },
{ label: '富文本', value: 11 },
];
// 全部数据
// let tableDataAll: TableType = [];
const MaterielManageDetail = () => {
const { confirm } = Modal;
......@@ -121,6 +123,7 @@ const MaterielManageDetail = () => {
if (res && res.code === '200') {
const { list } = res.result; // 解构
setTableDataAll(list || []);
// tableDataAll = list || [];
}
};
// 切换排序
......@@ -148,24 +151,30 @@ const MaterielManageDetail = () => {
setSortBtnDisabled(true);
// 转换位置
const res = await CommonAPI.exchangeBannerInfo(
from === 'up' ? [tableDataAll[index - 1], item] : [tableDataAll[index + 1], item],
from === 'up'
? [tableDataAll[index - 1], tableDataAll[index]]
: [tableDataAll[index + 1], tableDataAll[index]],
);
if (res && res.code === '200') {
message.success('操作成功').then();
setSortBtnDisabled(false);
// setSelectedRows(from === 'up' ? [tableDataAll[index - 1]] : [tableDataAll[index + 1]]);
// 如果是当前页的第一条数据
if (tableIndex === 0 && from === 'up') {
paginationChange(pagination.current - 1, pagination.pageSize);
await getAllData();
await setSortBtnDisabled(false);
return;
}
// 如果是当前页的最后一条数据
if (tableIndex === tableData.length - 1 && from === 'down') {
paginationChange(pagination.current + 1, pagination.pageSize);
await getAllData();
await setSortBtnDisabled(false);
return;
}
paginationChange(pagination.current, pagination.pageSize);
getAllData().then();
await getAllData();
await setSortBtnDisabled(false);
}
};
// 修改提交数据
......@@ -209,6 +218,13 @@ const MaterielManageDetail = () => {
width: '50px',
render: (_text, _record, index) => (pagination.current - 1) * pagination.pageSize + index + 1,
},
// {
// title: 'sort',
// dataIndex: 'sort',
// align: 'center',
// width: '100px',
// ellipsis: true,
// },
{
title: '名称',
dataIndex: 'bannerName',
......@@ -411,6 +427,7 @@ const MaterielManageDetail = () => {
setAddModalVisible(false);
setEditData(undefined);
paginationChange(pagination.current, pagination.pageSize);
getAllData().then();
}}
moduleId={Number(qs.parse(location.search).id)}
/>
......
......@@ -184,7 +184,7 @@ const MaterielManageView = () => {
search={[
{
label: '模块名称',
name: 'keyword',
name: 'moduleName',
type: 'input',
placeholder: '请输入模块名称',
},
......
......@@ -5,6 +5,7 @@ import { releaseTenderNewsUpdate, releaseTenderNews } from '~/api/interface/reso
import { ResourceManageAPI } from '~/api';
import { Uploader } from '~/components/uploader';
import { UploadOutlined } from '@ant-design/icons';
import { uploadFile } from '~/utils/uploadFile';
// 列表的类型
type TableType = InterListType<releaseTenderNews>;
......@@ -48,11 +49,23 @@ const AddEditModal: React.FC<propType> = (props) => {
};
// 提交事件
const handleSubmit = async (values: ReqType & { file: any[] }) => {
// 上传文件
const filePath = await uploadFile(values?.file?.at(-1));
// 新建formData
const formData = new FormData();
formData.append('file', values?.file?.at(-1));
const blob = new Blob([JSON.stringify({ ...values, id: data?.id ? data?.id : null })], {
type: 'application/json',
});
const blob = new Blob(
[
JSON.stringify({
...values,
id: data?.id ? data?.id : null,
url: filePath ? filePath : null,
}),
],
{
type: 'application/json',
},
);
formData.append('tenderNewsVO', blob);
const res = await ResourceManageAPI[
data?.id ? 'releaseTenderNewsUpdate' : 'releaseTenderNewsAdd'
......@@ -115,6 +128,7 @@ const AddEditModal: React.FC<propType> = (props) => {
onChange={(e) => {
form.setFieldValue('file', e);
}}
defaultFileList={data?.url ? [{ url: data?.url, name: `${data.tenderName}.xlsx` }] : []}
>
<Button icon={<UploadOutlined />} type={'primary'}>
上传
......
import { useEffect, useState } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import SearchBox from '~/components/search-box';
import { Button, Table } from 'antd';
import { Button, Table, Tooltip } from 'antd';
import { ArrowLeftOutlined } from '@ant-design/icons';
import qs from 'query-string';
import { InterListType } from '~/api/interface';
......@@ -85,6 +85,28 @@ const TenderManageDetail = () => {
align: 'center',
width: '300px',
ellipsis: true,
render: (text) =>
text && (
<Tooltip
placement='top'
title={
<div
dangerouslySetInnerHTML={{ __html: text.replace(/<img(?:(?!\/>).|\n)*?\/>/gm, '') }}
/>
}
>
<div
style={{
height: '20px',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
wordBreak: 'break-all',
}}
dangerouslySetInnerHTML={{ __html: text }}
/>
</Tooltip>
),
},
{
title: '价格(万元)',
......
......@@ -138,7 +138,7 @@ const TenderManageFeedback = () => {
placeholder: '请选择编号',
options: tenderInfoList,
},
{ label: '用户姓名', name: 'userName', type: 'input', placeholder: '请输入编号' },
{ label: '用户姓名', name: 'userName', type: 'input', placeholder: '请输入用户姓名' },
]}
searchData={onFinish}
child={
......
......@@ -27,6 +27,11 @@ import {
MessageOutlined,
AliwangwangOutlined,
AuditOutlined,
MonitorOutlined,
PictureOutlined,
PaperClipOutlined,
ReadOutlined,
ThunderboltOutlined,
} from '@ant-design/icons';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
......@@ -234,7 +239,7 @@ export const routerList: Array<RouteObjectType> = [
meta: {
id: 30200,
title: '需求收集',
icon: <SketchOutlined />,
icon: <MonitorOutlined />,
},
},
{
......@@ -243,7 +248,7 @@ export const routerList: Array<RouteObjectType> = [
meta: {
id: 30100,
title: '宣传管理',
icon: <SketchOutlined />,
icon: <PictureOutlined />,
},
},
{
......@@ -262,7 +267,7 @@ export const routerList: Array<RouteObjectType> = [
meta: {
id: 30300,
title: '标签管理',
icon: <SketchOutlined />,
icon: <PaperClipOutlined />,
},
},
{
......@@ -271,7 +276,7 @@ export const routerList: Array<RouteObjectType> = [
meta: {
id: 30400,
title: '行业新闻',
icon: <SketchOutlined />,
icon: <ReadOutlined />,
},
},
{
......@@ -330,7 +335,7 @@ export const routerList: Array<RouteObjectType> = [
meta: {
id: 40100,
title: '动态列表',
icon: <SketchOutlined />,
icon: <ThunderboltOutlined />,
},
},
],
......
import { CommonAPI } from '~/api';
import { message } from 'antd';
// 上传文件
export const uploadFile = (file: any): Promise<string> =>
new Promise((resolve, reject) => {
// 上传到服务器
const formData = new FormData();
formData.append('uploadFile', file);
CommonAPI.uploadOssBP(formData).then((res) => {
if (res && res.code === '200') {
resolve(res.result);
return;
} else {
reject(res);
message.error('文件上传失败').then();
return;
}
});
});
......@@ -13,6 +13,8 @@ export default defineConfig({
'/api': {
// target: 'http://192.168.3.111:8099', // 后端女pms
// target: 'http://192.168.3.111:8077', // 后端女oms
// target: 'http://192.168.3.111:10001', // 后端女release
// target: 'http://192.168.3.111:35150', // 后端女user
// target: 'http://192.168.3.17:8099', // 狗旺
target: 'https://test.iuav.shop',
changeOrigin: true,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论