Commit 4c587ab9 authored by TZW's avatar TZW

adder

parent 0b3c170b
...@@ -32,9 +32,8 @@ const loginOut = async () => { ...@@ -32,9 +32,8 @@ const loginOut = async () => {
const AvatarDropdown = ({ menu }) => { const AvatarDropdown = ({ menu }) => {
const getUserApp = useRequest(async () => { const getUserApp = useRequest(async () => {
let res = await doFetch({ url: '/auth/sysUser/userApp/selection', params: {} }); let res = await doFetch({ url: '/auth/sysUser/userApp/selection', params: {} });
return res?.data?.dataList || {}; return res?.data || {};
}); });
console.log(getUserApp);
const { initialState, setInitialState } = useModel('@@initialState'); const { initialState, setInitialState } = useModel('@@initialState');
const [visible, cv] = useState(false), const [visible, cv] = useState(false),
[formRef] = Form.useForm(), [formRef] = Form.useForm(),
...@@ -126,6 +125,9 @@ const AvatarDropdown = ({ menu }) => { ...@@ -126,6 +125,9 @@ const AvatarDropdown = ({ menu }) => {
if (!currentUser || !currentUser.username) { if (!currentUser || !currentUser.username) {
return loadings; return loadings;
} }
console.log(
getUserApp?.data?.dataList?.filter((it) => it?.appId == getUserApp?.data?.appId)[0]?.value,
);
let saveData = (values) => { let saveData = (values) => {
let newfields = JSON.parse(JSON.stringify(values)); let newfields = JSON.parse(JSON.stringify(values));
...@@ -152,7 +154,6 @@ const AvatarDropdown = ({ menu }) => { ...@@ -152,7 +154,6 @@ const AvatarDropdown = ({ menu }) => {
}; };
run({ url: '/ngic-auth/sysUser/changePassword', params: { ...postData } }); run({ url: '/ngic-auth/sysUser/changePassword', params: { ...postData } });
}; };
const menuHeaderDropdown = ( const menuHeaderDropdown = (
<Menu className={styles.menu} selectedKeys={[]} onClick={onMenuClick}> <Menu className={styles.menu} selectedKeys={[]} onClick={onMenuClick}>
<Menu.Item key="logout"> <Menu.Item key="logout">
...@@ -167,7 +168,6 @@ const AvatarDropdown = ({ menu }) => { ...@@ -167,7 +168,6 @@ const AvatarDropdown = ({ menu }) => {
window.location.href = value; window.location.href = value;
} }
}; };
return ( return (
<div <div
style={{ style={{
...@@ -199,8 +199,10 @@ const AvatarDropdown = ({ menu }) => { ...@@ -199,8 +199,10 @@ const AvatarDropdown = ({ menu }) => {
</Modal> </Modal>
<Select <Select
style={{ width: 150, marginRight: 8 }} style={{ width: 150, marginRight: 8 }}
defaultValue="http://ems.nangaoyun.com:8089" value={
options={getUserApp.data} getUserApp?.data?.dataList?.filter((it) => it?.appId == getUserApp?.data?.appId)[0]?.value
}
options={getUserApp?.data?.dataList}
onChange={handleChange} onChange={handleChange}
/> />
<HeaderDropdown overlay={menuHeaderDropdown}> <HeaderDropdown overlay={menuHeaderDropdown}>
......
...@@ -107,8 +107,25 @@ function getcolumns(setdrawer) { ...@@ -107,8 +107,25 @@ function getcolumns(setdrawer) {
}, },
}, },
key: 'shopId', key: 'shopId',
search: false,
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
}, },
{
title: '车间名称',
dataIndex: 'shopName',
width: 120,
valueType: 'select',
fieldProps: {
placeholder: '请选择',
showSearch: true,
},
options: {
path: '/auth/sysShop/getAllShopSelection',
},
key: 'shopId',
hideInForm: true,
hideInTable: true,
},
{ {
title: '工段名称', title: '工段名称',
width: 120, width: 120,
...@@ -126,6 +143,23 @@ function getcolumns(setdrawer) { ...@@ -126,6 +143,23 @@ function getcolumns(setdrawer) {
shopId: '', shopId: '',
}, },
}, },
search: false,
},
{
title: '工段名称',
width: 120,
dataIndex: 'sectionName',
key: 'sectionId',
fieldProps: {
placeholder: '请选择',
showSearch: true,
},
valueType: 'select',
options: {
path: '/auth/sysSection/getAllSectionSelection',
},
hideInForm: true,
hideInTable: true,
}, },
{ {
title: '产线名称', title: '产线名称',
...@@ -144,6 +178,23 @@ function getcolumns(setdrawer) { ...@@ -144,6 +178,23 @@ function getcolumns(setdrawer) {
shopId: '', shopId: '',
}, },
}, },
search: false,
},
{
title: '产线名称',
width: 120,
dataIndex: 'productLineName',
valueType: 'select',
fieldProps: {
placeholder: '请选择',
showSearch: true,
},
key: 'productLineId',
options: {
path: '/auth/sysProductionLine/getAllProductLineSelection',
},
hideInForm: true,
hideInTable: true,
}, },
{ {
title: '供应商', title: '供应商',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56 * @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-20 11:27:01 * @Last Modified time: 2023-01-11 16:49:41
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -1228,7 +1228,6 @@ function Model(props) { ...@@ -1228,7 +1228,6 @@ function Model(props) {
dataIndex: 'factoryName', dataIndex: 'factoryName',
key: 'factoryId', key: 'factoryId',
width: 120, width: 120,
fieldProps: { fieldProps: {
placeholder: '请选择', placeholder: '请选择',
showSearch: true, showSearch: true,
...@@ -1253,9 +1252,26 @@ function Model(props) { ...@@ -1253,9 +1252,26 @@ function Model(props) {
factoryId: '', factoryId: '',
}, },
}, },
search: false,
key: 'shopId', key: 'shopId',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
}, },
{
title: '车间名称',
dataIndex: 'shopName',
width: 120,
valueType: 'select',
fieldProps: {
placeholder: '请选择',
showSearch: true,
},
options: {
path: '/auth/sysShop/getAllShopSelection',
},
key: 'shopId',
hideInForm: true,
hideInTable: true,
},
{ {
title: '工段名称', title: '工段名称',
width: 120, width: 120,
...@@ -1273,6 +1289,24 @@ function Model(props) { ...@@ -1273,6 +1289,24 @@ function Model(props) {
shopId: '', shopId: '',
}, },
}, },
search: false,
},
{
title: '工段名称',
width: 120,
dataIndex: 'sectionName',
key: 'sectionId',
fieldProps: {
placeholder: '请选择',
showSearch: true,
},
valueType: 'select',
options: {
path: '/auth/sysSection/getAllSectionSelection',
},
hideInForm: true,
hideInTable: true,
}, },
{ {
title: '产线名称', title: '产线名称',
...@@ -1291,6 +1325,23 @@ function Model(props) { ...@@ -1291,6 +1325,23 @@ function Model(props) {
shopId: '', shopId: '',
}, },
}, },
search: false,
},
{
title: '产线名称',
width: 120,
dataIndex: 'productLineName',
valueType: 'select',
fieldProps: {
placeholder: '请选择',
showSearch: true,
},
key: 'productLineId',
options: {
path: '/auth/sysProductionLine/getAllProductLineSelection',
},
hideInForm: true,
hideInTable: true,
}, },
]; ];
return ( return (
......
...@@ -80,11 +80,30 @@ function getcolumns(ifs) { ...@@ -80,11 +80,30 @@ function getcolumns(ifs) {
], ],
}, },
}, },
{
title: '状态',
dataIndex: 'status',
valueType: 'radio',
key: 'status',
options: [
{
label: '启用',
value: 1,
},
{
label: '禁用',
value: 2,
},
],
hideInTable: true,
hideInForm: true,
},
{ {
title: '状态', title: '状态',
dataIndex: 'status', dataIndex: 'status',
key: 'status', key: 'status',
valueType: 'radio', valueType: 'radio',
search: false,
formItemProps: { formItemProps: {
rules: [ rules: [
{ {
......
...@@ -24,6 +24,7 @@ function getcolumns(ifs) { ...@@ -24,6 +24,7 @@ function getcolumns(ifs) {
title: '所属车间', title: '所属车间',
dataIndex: 'shopName', dataIndex: 'shopName',
key: 'shopId', key: 'shopId',
hideInForm: true,
fieldProps: { fieldProps: {
showSearch: true, showSearch: true,
}, },
...@@ -31,10 +32,7 @@ function getcolumns(ifs) { ...@@ -31,10 +32,7 @@ function getcolumns(ifs) {
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
valueType: 'select', valueType: 'select',
options: { options: {
path: '/auth/sysShop/getShopSelectionByFactory', path: '/auth/sysShop/getAllShopSelection',
linkParams: {
factoryId: '', //key 后面如果存在value 则该value会在调用接口时format
},
}, },
}, },
{ {
...@@ -58,7 +56,6 @@ function getcolumns(ifs) { ...@@ -58,7 +56,6 @@ function getcolumns(ifs) {
key: 'shopId', key: 'shopId',
hideInTable: true, hideInTable: true,
search: false, search: false,
hideInForm: true,
fieldProps: { fieldProps: {
disabled: ifs, disabled: ifs,
}, },
...@@ -66,7 +63,7 @@ function getcolumns(ifs) { ...@@ -66,7 +63,7 @@ function getcolumns(ifs) {
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
valueType: 'select', valueType: 'select',
options: { options: {
path: '/auth/sysShop/getShopSelectionByFactory', path: '/auth/sysShop/getAllShopSelection',
linkParams: { linkParams: {
factoryId: '', //key 后面如果存在value 则该value会在调用接口时format factoryId: '', //key 后面如果存在value 则该value会在调用接口时format
}, },
......
...@@ -65,10 +65,7 @@ function getcolumns(ifs) { ...@@ -65,10 +65,7 @@ function getcolumns(ifs) {
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
valueType: 'select', valueType: 'select',
options: { options: {
path: '/auth/sysShop/getShopSelectionByFactory', path: '/auth/sysShop/getAllShopSelection',
linkParams: {
factoryId: '', //key 后面如果存在value 则该value会在调用接口时format
},
}, },
}, },
]; ];
......
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