Commit 4c587ab9 authored by TZW's avatar TZW

adder

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