Commit c0681bfb authored by 李翰林's avatar 李翰林

修改面板

parent fa3f7a99
......@@ -12,8 +12,8 @@ export default {
"/srwms/": {
// 要代理的地址
// target: "http://192.168.40.18/wms/", //39:28040 18/wms/
// target: "http://192.168.40.203:28040", //39:28040 18/wms/ dj
target: "http://192.168.40.117:28040", //39:28040 18/wms/ jf
target: "http://192.168.40.228:28040", //39:28040 18/wms/ dj
// target: "http://192.168.40.117:28040", //39:28040 18/wms/ jf
// target: "http://192.168.40.108:28040", //39:28040 18/wms/ jf
changeOrigin: true,
pathRewrite: {
......
......@@ -5,7 +5,7 @@
"description": "An out-of-box UI solution for enterprise applications",
"scripts": {
"analyze": "cross-env ANALYZE=1 umi build",
"build": "umi build",
"build": "set NODE_OPTIONS=--openssl-legacy-provider & umi build",
"deploy": "npm run build && npm run gh-pages",
"dev": "npm run start:dev",
"gh-pages": "gh-pages -d dist",
......
import { Image } from "antd";
const Imgdetail = ({ files, width, height }) => {
return <div style={{ display: "flex", flexFlow: "row wrap", width: "100%" }}>
{
files && typeof (files) == "string" ?
<Image style={{ marginRight: 15}} src={files} width={width ?? 40} height={height ?? 40}></Image>
: files && Array.isArray(files) && files?.length ?
files?.map(el => {
return <div style={{ marginRight: 15}} key={el?.uid} >
<Image src={el?.url} width={width ?? 40} height={height ?? 40} ></Image>
</div>
})
:
"-"
}
</div>
}
export default Imgdetail;
\ No newline at end of file
import React, { useState } from 'react';
import { Popconfirm, Button } from 'antd';
import { useModel } from 'umi';
function PremButton(props) {
const { initialState, setInitialState } = useModel('@@initialState');
let buttonPerm = initialState?.newMenu?.buttonPerm;
const { children, btn, pop, access } = props;
let res =
buttonPerm && buttonPerm.length > 0
? buttonPerm?.filter((it) => it.typeName == access && it.show == 1)
: [];
let accesses = access ? res.map((it) => it.typeName).includes(access) : true;
//配置按钮权限接口
return pop ? (
<Popconfirm {...pop} disabled={pop?.disabled || !accesses}>
<Button {...btn} disabled={btn?.disabled || !accesses}>
{children}
</Button>
</Popconfirm>
) : (
<Button {...btn} disabled={btn?.disabled || !accesses}>
{children}
</Button>
);
}
export default PremButton;
......@@ -126,7 +126,7 @@ export function getColumns(setDrawer, formRef) {
},
columns: [
{
title: "量",
title: "量",
dataIndex: "weight",
key: "weight",
valueType: "digit",
......
......@@ -8,6 +8,7 @@ import {
Modal,
Space,
message,
Image,
} from "antd";
import AutoTable from "@/components/AutoTable";
import { useRequest } from "umi";
......@@ -16,8 +17,8 @@ import { doFetch } from "@/utils/doFetch";
import InitForm from "@/components/NewInitForm";
import { start } from "@/utils/printHandle.js";
import { ExclamationCircleFilled } from "@ant-design/icons";
import PremButton from "@/components/PremButton/index.jsx";
const { confirm } = Modal;
const Station = (props) => {
let actionRef = useRef(),
formRef = useRef(),
......@@ -53,7 +54,7 @@ const Station = (props) => {
key: "specificationModel",
},
{
title: "量",
title: "量",
dataIndex: "weight",
key: "weight",
search: false,
......@@ -93,6 +94,15 @@ const Station = (props) => {
key: "unilateralThickness",
search: false,
},
{
title: "二维码",
dataIndex: "qrCodeUrl ",
key: "qrCodeUrl ",
search: false,
render: (_, row) => {
return <Image src={row?.qrCodeUrl} width={30} height={30} ></Image>
}
},
{
title: "创建人",
dataIndex: "createUserName",
......@@ -105,6 +115,39 @@ const Station = (props) => {
key: "orderDate",
search: false,
},
{
title: "操作",
valueType: "option",
render: (_, row) => {
return [
<PremButton
key="remove"
pop={{
title: "是否删除该条信息?",
okText: "确认",
cancelText: "取消",
onConfirm: async () => {
let res = await doFetch({
url: "/ngic-workmanship/wmsMaterieLabel/deleteById",
params: {
id: row?.id,
},
});
if (res && res?.code === "0000") {
actionRef?.current?.reload();
}
},
}}
btn={{
size: "small",
type: "danger",
}}
>
删除
</PremButton>,
];
},
},
];
const [drawer, setDrawer] = useState({
......
......@@ -105,7 +105,7 @@ export default (props) => {
})}
</div>
{data.length === 0 ? (
<div style={{ width: "100%", height: "auto",color:'#ffffff80',textAlign:'center',marginTop:'20%' }}>暂无数据</div>
<div style={{ width: "100%", height: "auto",color:'#ffffff80',textAlign:'center',marginTop:'10%' }}>暂无数据</div>
) : (
<ScrollBoard
config={config}
......
......@@ -7,12 +7,10 @@ export default ({ data }) => {
let allArr = data?.[0]?.thirdList;
let newArr = [];
allArr?.forEach((item) => {
item?.fourthList?.forEach((it) => {
item?.fourthList?.reverse()?.forEach((it) => {
newArr.push(it?.status);
});
});
console.log("arr1", newArr);
return newArr;
}, [data]);
const statusArr2 = useMemo(() => {
......@@ -20,7 +18,7 @@ export default ({ data }) => {
let newArr = [];
allArr?.forEach((item) => {
console.log(item);
item?.fourthList?.forEach((it) => {
item?.fourthList?.reverse()?.forEach((it) => {
newArr.push(it?.status);
});
});
......@@ -33,7 +31,7 @@ export default ({ data }) => {
let newArr = [];
allArr?.forEach((item) => {
console.log(item);
item?.fourthList?.forEach((it) => {
item?.fourthList?.reverse()?.forEach((it) => {
newArr.push(it?.status);
});
});
......@@ -68,19 +66,6 @@ export default ({ data }) => {
<span>10</span>
</div>
<div className="jk-content-unit">
<div className="jk-status " style={{ position: "relative" }}>
<div className="statusLine bgline1"></div>
<span
style={{
position: "absolute",
bottom: "-20px",
left: "-2px",
color: "white",
}}
>
</span>
</div>
<div className="jk-statusContent">
{statusArr1?.map((it) => {
return (
......@@ -94,27 +79,27 @@ export default ({ data }) => {
})}
<div className="jk-statusBottom">
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>3</span>
<span>2</span>
<span>1</span>
</div>
</div>
</div>
<div className="jk-content-unit">
<div className="jk-status" style={{ position: "relative" }}>
<div className="statusLine bgline2"></div>
<div className="jk-status " style={{ position: "relative" }}>
<div className="statusLine bgline1"></div>
<span
style={{
position: "absolute",
bottom: "-20px",
left: "0",
left: "-18px",
bottom: "-4px",
color: "white",
}}
>
</span>
</div>
</div>
<div className="jk-content-unit">
<div className="jk-statusContent">
{statusArr2?.map((it) => {
return (
......@@ -128,27 +113,27 @@ export default ({ data }) => {
})}
<div className="jk-statusBottom">
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>3</span>
<span>2</span>
<span>1</span>
</div>
</div>
</div>
<div className="jk-content-unit">
<div className="jk-status" style={{ position: "relative" }}>
<div className="statusLine bgline3"></div>
<div className="statusLine bgline2"></div>
<span
style={{
position: "absolute",
bottom: "-20px",
left: "0",
left: "-18px",
bottom: "-4px",
color: "white",
}}
>
</span>
</div>
</div>
<div className="jk-content-unit">
<div className="jk-statusContent">
{statusArr3?.map((it) => {
return (
......@@ -162,12 +147,25 @@ export default ({ data }) => {
})}
<div className="jk-statusBottom">
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>3</span>
<span>2</span>
<span>1</span>
</div>
</div>
<div className="jk-status" style={{ position: "relative" }}>
<div className="statusLine bgline3"></div>
<span
style={{
position: "absolute",
left: "-18px",
bottom: "-4px",
color: "white",
}}
>
</span>
</div>
</div>
</div>
<div
......
......@@ -251,7 +251,7 @@
.jk-content {
display: flex;
flex-direction: row;
flex-direction: column;
height: calc(100% - 32px);
padding: 12px 0px 24px 24px;
......@@ -259,39 +259,41 @@
.jk-content-unit {
flex: 1;
height: 100%;
display: flex;
flex-direction: row;
flex-direction: column;
margin-left: 6px;
gap: 2px;
height: 100%;
.jk-statusBottom {
width: 100%;
position: absolute;
top: 1;
height: 100%;
}
}
.statusDiv {
width: 10px;
height: auto;
flex: 22%;
background-color: #00bbf2;
border-radius: 10px;
margin: 6px 1px;
margin: 1px
}
.statusLine {
width: 10px;
width: 100%;
background-color: green;
height: 100%;
height: 10px;
// margin-top: 4px;
// margin-bottom: 4px;
}
.jk-status {
width: 10px;
height: 100%;
height: 10px;
width: 100%;
display: flex;
flex-direction: row;
}
......@@ -302,18 +304,18 @@
.bgline1 {
background: linear-gradient(180deg, rgba(255, 15, 15, 0.49) 0%, rgba(246, 244, 244, 0.00) 51%, rgba(255, 0, 0, 0.38) 100%);
background: linear-gradient(90deg, rgba(255, 15, 15, 0.49) 0%, rgba(246, 244, 244, 0.00) 51%, rgba(255, 0, 0, 0.38) 100%);
}
.bgline2 {
background: linear-gradient(180deg, rgba(255, 147, 15, 0.49) 0%, rgba(246, 244, 244, 0.00) 51%, rgba(255, 140, 0, 0.38) 100%);
background: linear-gradient(90deg, rgba(255, 147, 15, 0.49) 0%, rgba(246, 244, 244, 0.00) 51%, rgba(255, 140, 0, 0.38) 100%);
}
.bgline3 {
background: linear-gradient(180deg, rgba(255, 251, 15, 0.49) 0%, rgba(246, 244, 244, 0.00) 51%, rgba(255, 251, 0, 0.38) 100%);
background: linear-gradient(90deg, rgba(255, 251, 15, 0.49) 0%, rgba(246, 244, 244, 0.00) 51%, rgba(255, 251, 0, 0.38) 100%);
}
......@@ -322,22 +324,24 @@
.jk-statusContent {
flex: 1;
display: flex;
flex-direction: row;
flex-direction: column;
flex-wrap: wrap;
position: relative;
height: 100%;
.jk-statusBottom {
position: absolute;
bottom: -20px;
width: 100%;
left: -18px;
height: calc(100% - 10px);
display: flex;
flex-direction: row;
flex-direction: column;
span {
flex: 1;
text-align: center;
color: skyblue;
display: flex;
font-size: 16px;
flex-direction: column;
justify-content: center;
color: skyblue;
font-weight: 600;
}
}
......@@ -350,16 +354,17 @@
.numberStatus {
display: flex;
flex-direction: column;
flex-direction: row;
justify-content: space-around;
height: 100%;
align-self: center;
height: auto;
width: 100%;
span {
color: #fff;
flex: 1;
height: auto;
align-self: center;
text-align: center;
font-size: 16px;
padding-top: 6px;
}
......
......@@ -63,7 +63,8 @@ export async function start(url, params) {
),
okText: "下载插件",
onOk() {
location.href = "http://192.168.40.251/staticfile/group1/M00/00/00/CLodop_Setup_for_Win32NT1111111.exe";
location.href = "http://10.110.84.250/staticfile/group1/M00/00/00/CLodop_Setup_for_Win32NT1111111.exe"; // 郑州思锐生产环境
// http://192.168.40.18/staticfile/download/CLodop_Setup_for_Win32NT.exe 测试环境
},
});
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment