Commit ab6d67e8 authored by TZW's avatar TZW

12081548

parent 905daa97
...@@ -25,7 +25,7 @@ const keepalive = getList(authRoutes) ...@@ -25,7 +25,7 @@ const keepalive = getList(authRoutes)
}) })
.map((it) => it.path); .map((it) => it.path);
console.log(keepalive); //console.log(keepalive);
export default defineConfig({ export default defineConfig({
outputPath: 'package', outputPath: 'package',
......
...@@ -13,12 +13,13 @@ export default { ...@@ -13,12 +13,13 @@ export default {
dev: { dev: {
[defaultSetting.proxypath]: { [defaultSetting.proxypath]: {
// 要代理的地址 // 要代理的地址
target: 'http://192.168.40.117:8000', // target: 'http://192.168.40.117:8000', //jf哥
target: 'http://192.168.40.203:8000', //dj哥
changeOrigin: true, changeOrigin: true,
}, },
'/token': { '/token': {
// 要代理的地址 // 要代理的地址
target: 'http://192.168.40.117:8000', target: 'http://192.168.40.203:8000',
changeOrigin: true, changeOrigin: true,
}, },
'/staticfile/': { '/staticfile/': {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
let allauth = authRoutes; // .map((it) => ({ ...it, wrappers: ['@/wrappers/auth'] })); let allauth = authRoutes; // .map((it) => ({ ...it, wrappers: ['@/wrappers/auth'] }));
console.log(allauth); //console.log(allauth);
export default [ export default [
{ {
......
...@@ -13,7 +13,7 @@ import routes from '../config/authRoutes'; ...@@ -13,7 +13,7 @@ import routes from '../config/authRoutes';
const { LinkOutlined } = Ant4Icons; const { LinkOutlined } = Ant4Icons;
// const isDev = process.env.NODE_ENV === 'development'; // const isDev = process.env.NODE_ENV === 'development';
const isDev = true; const isDev = true;
console.log(isDev); //console.log(isDev);
const loginPath = '/user/login'; const loginPath = '/user/login';
/** /**
...@@ -141,7 +141,7 @@ export const layout = ({ initialState, setInitialState }) => { ...@@ -141,7 +141,7 @@ export const layout = ({ initialState, setInitialState }) => {
userId: initialState?.currentUser?.id, userId: initialState?.currentUser?.id,
}, },
request: (params, defaultMenuData) => { request: (params, defaultMenuData) => {
console.log(initialState); //console.log(initialState);
let lastArr = initialState?.newMenu?.userHavePermList let lastArr = initialState?.newMenu?.userHavePermList
? JSON.parse(JSON.stringify(initialState?.newMenu?.userHavePermList)) ? JSON.parse(JSON.stringify(initialState?.newMenu?.userHavePermList))
: [], : [],
......
...@@ -109,7 +109,7 @@ const App = ({ url, actionRef, setdrawer }) => { ...@@ -109,7 +109,7 @@ const App = ({ url, actionRef, setdrawer }) => {
formRef={formRef} formRef={formRef}
fields={columns} fields={columns}
onValuesChange={(changedValues, allValues) => { onValuesChange={(changedValues, allValues) => {
console.log(changedValues, allValues); //console.log(changedValues, allValues);
if (Object.keys(changedValues)[0] == 'faultDetailId') { if (Object.keys(changedValues)[0] == 'faultDetailId') {
doFetch({ doFetch({
url: '/repair/umFaultSettingDetail/queryById', url: '/repair/umFaultSettingDetail/queryById',
...@@ -117,7 +117,7 @@ const App = ({ url, actionRef, setdrawer }) => { ...@@ -117,7 +117,7 @@ const App = ({ url, actionRef, setdrawer }) => {
id: changedValues?.faultDetailId, id: changedValues?.faultDetailId,
}, },
}).then((res) => { }).then((res) => {
console.log(res); //console.log(res);
formRef?.current?.setFieldsValue({ formRef?.current?.setFieldsValue({
faultDescription: res?.data?.data.faultPhenomenon, faultDescription: res?.data?.data.faultPhenomenon,
}); });
...@@ -125,7 +125,7 @@ const App = ({ url, actionRef, setdrawer }) => { ...@@ -125,7 +125,7 @@ const App = ({ url, actionRef, setdrawer }) => {
} }
}} }}
onFinish={async (vals) => { onFinish={async (vals) => {
console.log(vals); //console.log(vals);
let params = { let params = {
...vals, ...vals,
}; };
......
...@@ -349,7 +349,7 @@ const Mtable = (props) => { ...@@ -349,7 +349,7 @@ const Mtable = (props) => {
{...components} {...components}
size={size} size={size}
onSubmit={(params) => { onSubmit={(params) => {
//console.log(params, 'onSubmit'); ////console.log(params, 'onSubmit');
let newparams = {}; let newparams = {};
columns.map((it, i) => { columns.map((it, i) => {
if ( if (
......
...@@ -25,15 +25,15 @@ function DetailPro(props) { ...@@ -25,15 +25,15 @@ function DetailPro(props) {
res?.data?.data[props.extendField]?.forEach((it) => { res?.data?.data[props.extendField]?.forEach((it) => {
obj[it?.fieldId] = it?.fieldRealValue; obj[it?.fieldId] = it?.fieldRealValue;
}); });
console.log('extendField:', obj); //console.log('extendField:', obj);
setcuritem({ setcuritem({
...(res?.data?.data ?? {}), ...(res?.data?.data ?? {}),
...obj, ...obj,
}); });
console.log('drawerpro:', { // console.log('drawerpro:', {
...(res?.data?.data ?? {}), // ...(res?.data?.data ?? {}),
...obj, // ...obj,
}); // });
return { return {
success: res?.code == '0000', success: res?.code == '0000',
......
...@@ -31,7 +31,7 @@ let Diyrule = (props) => { ...@@ -31,7 +31,7 @@ let Diyrule = (props) => {
); );
}, [defval?.other]); }, [defval?.other]);
console.log(other); //console.log(other);
let { data, loading } = useRequest(() => { let { data, loading } = useRequest(() => {
return doFetch({ url: '/base/bmNoRule/querySelect', params: {} }); return doFetch({ url: '/base/bmNoRule/querySelect', params: {} });
......
...@@ -119,7 +119,7 @@ const EditTable = (props) => { ...@@ -119,7 +119,7 @@ const EditTable = (props) => {
recordCreatorProps={false} recordCreatorProps={false}
size={size} size={size}
onSubmit={(params) => { onSubmit={(params) => {
console.log(params, 'onSubmit'); //console.log(params, 'onSubmit');
}} }}
onSizeChange={(size) => { onSizeChange={(size) => {
localStorage.setItem('size', size); //设置全局表格规格缓存 localStorage.setItem('size', size); //设置全局表格规格缓存
......
...@@ -497,11 +497,11 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) { ...@@ -497,11 +497,11 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) {
} else { } else {
ifclean = res?.data?.dataList.filter((it) => it.value == curval)?.[0]?.value; ifclean = res?.data?.dataList.filter((it) => it.value == curval)?.[0]?.value;
} }
console.log( //console.log(
curval, // curval,
res?.data?.dataList?.map((it) => it.value), // res?.data?.dataList?.map((it) => it.value),
curkey, // curkey,
); // );
formRef?.current?.setFieldsValue({ [curkey]: ifclean }); formRef?.current?.setFieldsValue({ [curkey]: ifclean });
} }
...@@ -1179,7 +1179,7 @@ function UploadImg({ value, onChange, fieldProps }) { ...@@ -1179,7 +1179,7 @@ function UploadImg({ value, onChange, fieldProps }) {
<div style={{ marginTop: 8 }}>上传图片</div> <div style={{ marginTop: 8 }}>上传图片</div>
</div> </div>
); );
console.log(value?.length, fieldProps.limit); //console.log(value?.length, fieldProps.limit);
return ( return (
<> <>
<Image <Image
......
...@@ -86,7 +86,7 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => { ...@@ -86,7 +86,7 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => {
function InitForm({ function InitForm({
formRef, formRef,
onFinish = (vals) => { onFinish = (vals) => {
console.log(vals); //console.log(vals);
}, },
formKey, formKey,
params = {}, params = {},
...@@ -97,7 +97,7 @@ function InitForm({ ...@@ -97,7 +97,7 @@ function InitForm({
extendField = '', extendField = '',
colProps = { xs: 24, sm: 24, md: 12, lg: 12, xl: 12, xxl: 12 }, colProps = { xs: 24, sm: 24, md: 12, lg: 12, xl: 12, xxl: 12 },
onValuesChange = (changedValues, allValues) => { onValuesChange = (changedValues, allValues) => {
console.log(changedValues, allValues); //console.log(changedValues, allValues);
}, },
}) { }) {
let proformRef = useRef(); let proformRef = useRef();
...@@ -118,16 +118,16 @@ function InitForm({ ...@@ -118,16 +118,16 @@ function InitForm({
request={async (params) => { request={async (params) => {
if (detailpath) { if (detailpath) {
let res = await doFetch({ url: detailpath, params }); let res = await doFetch({ url: detailpath, params });
console.log({ // console.log({
...(res?.data?.data ?? {}), // ...(res?.data?.data ?? {}),
...defaultFormValue, // ...defaultFormValue,
}); // });
if (extendField) { if (extendField) {
let obj = {}; let obj = {};
res?.data?.data[extendField]?.forEach((it) => { res?.data?.data[extendField]?.forEach((it) => {
obj[it?.fieldId] = it?.fieldRealValue; obj[it?.fieldId] = it?.fieldRealValue;
}); });
console.log('extendField:', obj); //console.log('extendField:', obj);
return { return {
...(res?.data?.data ?? {}), ...(res?.data?.data ?? {}),
...obj, ...obj,
...@@ -139,9 +139,9 @@ function InitForm({ ...@@ -139,9 +139,9 @@ function InitForm({
...defaultFormValue, ...defaultFormValue,
}; };
} else { } else {
console.log({ // console.log({
...defaultFormValue, // ...defaultFormValue,
}); // });
return { return {
...defaultFormValue, ...defaultFormValue,
}; };
......
...@@ -30,7 +30,7 @@ const loginOut = async () => { ...@@ -30,7 +30,7 @@ const loginOut = async () => {
const AvatarDropdown = ({ menu }) => { const AvatarDropdown = ({ menu }) => {
const { initialState, setInitialState } = useModel('@@initialState'); const { initialState, setInitialState } = useModel('@@initialState');
console.log('initialState,', initialState); //console.log('initialState,', initialState);
const [visible, cv] = useState(false), const [visible, cv] = useState(false),
[formRef] = Form.useForm(), [formRef] = Form.useForm(),
{ run, loading } = useRequest(doFetch, { { run, loading } = useRequest(doFetch, {
......
...@@ -55,7 +55,7 @@ const TagView = ({ children, home }) => { ...@@ -55,7 +55,7 @@ const TagView = ({ children, home }) => {
if (currentMenu.path) { if (currentMenu.path) {
const tagsCopy = tagList.map((item) => { const tagsCopy = tagList.map((item) => {
if (currentMenu?.path === item.path) { if (currentMenu?.path === item.path) {
console.log(item); //console.log(item);
hasOpen = true; hasOpen = true;
// 刷新浏览器时,重新覆盖当前 path 的 children // 刷新浏览器时,重新覆盖当前 path 的 children
return { ...item, active: true, children: item.children }; return { ...item, active: true, children: item.children };
......
...@@ -422,7 +422,7 @@ function TreeRender({ url, deleteurl, saveurl, onselected, params, noaction, max ...@@ -422,7 +422,7 @@ function TreeRender({ url, deleteurl, saveurl, onselected, params, noaction, max
<Tree <Tree
onSelect={(selectedKeys, e) => { onSelect={(selectedKeys, e) => {
// console.log(selectedKeys); // //console.log(selectedKeys);
onselected?.(selectedKeys, e, alldata); onselected?.(selectedKeys, e, alldata);
}} }}
autoExpandParent={autoExpandParent} autoExpandParent={autoExpandParent}
......
...@@ -81,7 +81,7 @@ export default () => { ...@@ -81,7 +81,7 @@ export default () => {
}, },
]} ]}
onSearch={(value) => { onSearch={(value) => {
console.log('input', value); //console.log('input', value);
}} }}
/> />
); );
......
...@@ -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-07 13:43:37 * @Last Modified time: 2022-12-08 15:08:04
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -481,9 +481,9 @@ function Model(props) { ...@@ -481,9 +481,9 @@ function Model(props) {
// detailpath: urlParams.detail, // detailpath: urlParams.detail,
// params: { id: row.id }, // params: { id: row.id },
// onFinish: async (vals) => { // onFinish: async (vals) => {
// console.log(1); // //console.log(1);
// let equipmentCharList = []; // let equipmentCharList = [];
// console.log('id:', row.id); // //console.log('id:', row.id);
// for (let i in vals) { // for (let i in vals) {
// if (!isNaN(Number(i))) { // if (!isNaN(Number(i))) {
// equipmentCharList.push({ // equipmentCharList.push({
...@@ -567,7 +567,7 @@ function Model(props) { ...@@ -567,7 +567,7 @@ function Model(props) {
val: 'only', val: 'only',
title: '编辑子设备', title: '编辑子设备',
// onFinish: async (vals) => { // onFinish: async (vals) => {
// console.log(1); // //console.log(1);
// let params = { // let params = {
// ...vals, // ...vals,
// id: row.id, // id: row.id,
...@@ -607,7 +607,7 @@ function Model(props) { ...@@ -607,7 +607,7 @@ function Model(props) {
val: 'only', val: 'only',
title: '履历登记', title: '履历登记',
// onFinish: async (vals) => { // onFinish: async (vals) => {
// console.log(1); // //console.log(1);
// let params = { // let params = {
// ...vals, // ...vals,
// id: row.id, // id: row.id,
...@@ -799,7 +799,7 @@ function Model(props) { ...@@ -799,7 +799,7 @@ function Model(props) {
url: urlParams.detail, url: urlParams.detail,
params: { id: drawer?.item?.id }, params: { id: drawer?.item?.id },
}); });
console.log(res?.data?.data); //console.log(res?.data?.data);
let obj = {}; let obj = {};
res?.data?.data['equipmentCharList']?.forEach((it) => { res?.data?.data['equipmentCharList']?.forEach((it) => {
obj[it?.fieldId] = it?.fieldRealValue; obj[it?.fieldId] = it?.fieldRealValue;
...@@ -1191,7 +1191,7 @@ function Model(props) { ...@@ -1191,7 +1191,7 @@ function Model(props) {
url: '/asset/equipment/children/selected/queryList', url: '/asset/equipment/children/selected/queryList',
params: { id: drawer?.item?.id }, params: { id: drawer?.item?.id },
}); });
// console.log(result); // //console.log(result);
if (!result?.data?.dataList.length == 0) { if (!result?.data?.dataList.length == 0) {
setSelectArr(result?.data?.dataList.map((it) => it.id)); setSelectArr(result?.data?.dataList.map((it) => it.id));
} }
...@@ -1365,13 +1365,13 @@ function Model(props) { ...@@ -1365,13 +1365,13 @@ function Model(props) {
selectedRowKeys: selectArr, selectedRowKeys: selectArr,
// defaultSelectedRowKeys: , // defaultSelectedRowKeys: ,
onSelect: (record, selected, selectedRows, nativeEvent) => { onSelect: (record, selected, selectedRows, nativeEvent) => {
console.log('selectedRowKeys changed: ', record, selected, selectedRows); //console.log('selectedRowKeys changed: ', record, selected, selectedRows);
setSelectArr(() => { setSelectArr(() => {
return selectedRows.map((it) => it.id); return selectedRows.map((it) => it.id);
}); });
}, },
onSelectAll: (selected, selectedRows, changeRows) => { onSelectAll: (selected, selectedRows, changeRows) => {
console.log(selected, selectedRows, changeRows); //console.log(selected, selectedRows, changeRows);
if (selected) { if (selected) {
let arr = selectArr.concat(changeRows.map((it) => it.id)); let arr = selectArr.concat(changeRows.map((it) => it.id));
setSelectArr(arr); setSelectArr(arr);
...@@ -1380,7 +1380,7 @@ function Model(props) { ...@@ -1380,7 +1380,7 @@ function Model(props) {
} }
}, },
onSelectNone: () => { onSelectNone: () => {
console.log(11); //console.log(11);
setSelectArr([]); setSelectArr([]);
}, },
}} }}
...@@ -1388,7 +1388,7 @@ function Model(props) { ...@@ -1388,7 +1388,7 @@ function Model(props) {
<Space style={{ marginTop: 16 }}> <Space style={{ marginTop: 16 }}>
<Button <Button
onClick={() => { onClick={() => {
console.log(drawer); //console.log(drawer);
setDrawer((s) => ({ setDrawer((s) => ({
...s, ...s,
visible: false, visible: false,
...@@ -1406,7 +1406,7 @@ function Model(props) { ...@@ -1406,7 +1406,7 @@ function Model(props) {
<Button <Button
type="primary" type="primary"
onClick={async () => { onClick={async () => {
console.log(selectArr); //console.log(selectArr);
let res = await doFetch({ let res = await doFetch({
url: urlParams_childEquipment.save, url: urlParams_childEquipment.save,
params: { params: {
...@@ -1444,7 +1444,7 @@ function Model(props) { ...@@ -1444,7 +1444,7 @@ function Model(props) {
url: '/asset/equipment/children/selected/queryList', url: '/asset/equipment/children/selected/queryList',
params: { id: drawer?.item?.id }, params: { id: drawer?.item?.id },
}); });
// console.log(result); // //console.log(result);
if (!result?.data?.dataList.length == 0) { if (!result?.data?.dataList.length == 0) {
setSelectArr(result?.data?.dataList.map((it) => it.id)); setSelectArr(result?.data?.dataList.map((it) => it.id));
} }
...@@ -1891,7 +1891,7 @@ function Model(props) { ...@@ -1891,7 +1891,7 @@ function Model(props) {
<InitForm <InitForm
fields={fields[activeTab]} fields={fields[activeTab]}
onFinish={async (vals) => { onFinish={async (vals) => {
console.log(vals); //console.log(vals);
let res = await doFetch({ let res = await doFetch({
url: urlParams_resume.save, url: urlParams_resume.save,
params: { ...vals, type: '1', equipmentId: drawer?.item?.id }, params: { ...vals, type: '1', equipmentId: drawer?.item?.id },
...@@ -1916,7 +1916,7 @@ function Model(props) { ...@@ -1916,7 +1916,7 @@ function Model(props) {
<InitForm <InitForm
fields={fields[activeTab]} fields={fields[activeTab]}
onFinish={async (vals) => { onFinish={async (vals) => {
console.log(vals); //console.log(vals);
let res = await doFetch({ let res = await doFetch({
url: urlParams_resume.save, url: urlParams_resume.save,
params: { ...vals, type: '2', equipmentId: drawer?.item?.id }, params: { ...vals, type: '2', equipmentId: drawer?.item?.id },
...@@ -1941,7 +1941,7 @@ function Model(props) { ...@@ -1941,7 +1941,7 @@ function Model(props) {
<InitForm <InitForm
fields={fields[activeTab]} fields={fields[activeTab]}
onFinish={async (vals) => { onFinish={async (vals) => {
console.log(vals); //console.log(vals);
let res = await doFetch({ let res = await doFetch({
url: urlParams_resume.save, url: urlParams_resume.save,
params: { ...vals, type: '3', equipmentId: drawer?.item?.id }, params: { ...vals, type: '3', equipmentId: drawer?.item?.id },
...@@ -1966,7 +1966,7 @@ function Model(props) { ...@@ -1966,7 +1966,7 @@ function Model(props) {
<InitForm <InitForm
fields={fields[activeTab]} fields={fields[activeTab]}
onFinish={async (vals) => { onFinish={async (vals) => {
console.log(vals); //console.log(vals);
let res = await doFetch({ let res = await doFetch({
url: urlParams_resume.save, url: urlParams_resume.save,
params: { ...vals, type: '4', equipmentId: drawer?.item?.id }, params: { ...vals, type: '4', equipmentId: drawer?.item?.id },
...@@ -1991,7 +1991,7 @@ function Model(props) { ...@@ -1991,7 +1991,7 @@ function Model(props) {
<InitForm <InitForm
fields={fields[activeTab]} fields={fields[activeTab]}
onFinish={async (vals) => { onFinish={async (vals) => {
console.log(vals); //console.log(vals);
let res = await doFetch({ let res = await doFetch({
url: urlParams_resume.save, url: urlParams_resume.save,
params: { ...vals, type: '5', equipmentId: drawer?.item?.id }, params: { ...vals, type: '5', equipmentId: drawer?.item?.id },
...@@ -2089,7 +2089,7 @@ function Model(props) { ...@@ -2089,7 +2089,7 @@ function Model(props) {
id: drawer?.title == '编辑' ? drawer?.item?.id : '', id: drawer?.title == '编辑' ? drawer?.item?.id : '',
equipmentCharReqList, equipmentCharReqList,
}; };
console.log(params, '!!!!'); //console.log(params, '!!!!');
let res = await doFetch({ let res = await doFetch({
url: urlParams.save, url: urlParams.save,
params, params,
...@@ -2150,7 +2150,7 @@ function Model(props) { ...@@ -2150,7 +2150,7 @@ function Model(props) {
val: 'only', val: 'only',
type: 'add', type: 'add',
// onFinish: async (vals) => { // onFinish: async (vals) => {
// console.log(vals); // //console.log(vals);
// let params = { // let params = {
// ...vals, // ...vals,
// }; // };
......
...@@ -65,7 +65,7 @@ function Model(props) { ...@@ -65,7 +65,7 @@ function Model(props) {
detailpath: urlParams.detail, detailpath: urlParams.detail,
params: { id: row.id }, params: { id: row.id },
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(1); //console.log(1);
let params = { let params = {
...vals, ...vals,
id: row.id, id: row.id,
...@@ -154,8 +154,8 @@ function Model(props) { ...@@ -154,8 +154,8 @@ function Model(props) {
title: '新增', title: '新增',
val: 'add', val: 'add',
onFinish: async (vals) => { onFinish: async (vals) => {
// console.log(1); // //console.log(1);
console.log(drawer); //console.log(drawer);
let params = { let params = {
...vals, ...vals,
}; };
......
...@@ -109,7 +109,7 @@ function getcolumns(setdrawer) { ...@@ -109,7 +109,7 @@ function getcolumns(setdrawer) {
unCheckedChildren="禁用" unCheckedChildren="禁用"
defaultChecked={row.status == 1} defaultChecked={row.status == 1}
onChange={(flag) => { onChange={(flag) => {
// console.log(e); // //console.log(e);
if (flag) { if (flag) {
doFetch({ doFetch({
url: '/asset/equipmentSupplier/update/status', url: '/asset/equipmentSupplier/update/status',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44 * @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-01 17:13:05 * @Last Modified time: 2022-12-08 15:09:50
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -48,7 +48,7 @@ function Supplier(props) { ...@@ -48,7 +48,7 @@ function Supplier(props) {
type: 'add', type: 'add',
onFinish: async (vals) => { onFinish: async (vals) => {
let equipmentSupplierCharReqList = []; let equipmentSupplierCharReqList = [];
console.log('id:', row.id); //console.log('id:', row.id);
for (let i in vals) { for (let i in vals) {
if (!isNaN(Number(i))) { if (!isNaN(Number(i))) {
equipmentSupplierCharReqList.push({ equipmentSupplierCharReqList.push({
...@@ -213,15 +213,15 @@ function Supplier(props) { ...@@ -213,15 +213,15 @@ function Supplier(props) {
url: urlParams.detail, url: urlParams.detail,
params: { id: drawer?.item?.id }, params: { id: drawer?.item?.id },
}); });
console.log(res?.data?.data); //console.log(res?.data?.data);
let obj = {}; let obj = {};
res?.data?.data['equipmentSupplierCharReqList']?.forEach((it) => { res?.data?.data['equipmentSupplierCharReqList']?.forEach((it) => {
obj[it?.fieldId] = it?.fieldRealValue; obj[it?.fieldId] = it?.fieldRealValue;
}); });
console.log('drawerpro:', { // console.log('drawerpro:', {
...(res?.data?.data ?? {}), // ...(res?.data?.data ?? {}),
...obj, // ...obj,
}); // });
setrequest( setrequest(
{ {
...(res?.data?.data ?? {}), ...(res?.data?.data ?? {}),
......
...@@ -65,7 +65,7 @@ function Type(props) { ...@@ -65,7 +65,7 @@ function Type(props) {
title: '编辑', title: '编辑',
val: 'edit', val: 'edit',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(1); //console.log(1);
let params = { let params = {
...vals, ...vals,
id: row.key, id: row.key,
...@@ -73,7 +73,7 @@ function Type(props) { ...@@ -73,7 +73,7 @@ function Type(props) {
equipmentTypeName: vals.title, equipmentTypeName: vals.title,
}; };
delete params.title; delete params.title;
console.log(params); //console.log(params);
let res = await doFetch({ let res = await doFetch({
url: urlParams.save, url: urlParams.save,
params, params,
...@@ -88,7 +88,7 @@ function Type(props) { ...@@ -88,7 +88,7 @@ function Type(props) {
} }
}, },
})); }));
console.log(row); //console.log(row);
}, },
}} }}
> >
...@@ -113,7 +113,7 @@ function Type(props) { ...@@ -113,7 +113,7 @@ function Type(props) {
title: '新增子级', title: '新增子级',
val: 'addChild', val: 'addChild',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(1); //console.log(1);
let params = { let params = {
...vals, ...vals,
parentId: row.key, parentId: row.key,
...@@ -135,7 +135,7 @@ function Type(props) { ...@@ -135,7 +135,7 @@ function Type(props) {
} }
}, },
})); }));
console.log(drawer.item); //console.log(drawer.item);
}, },
}} }}
> >
...@@ -217,7 +217,7 @@ function Type(props) { ...@@ -217,7 +217,7 @@ function Type(props) {
params: {}, params: {},
val: 'add', val: 'add',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(drawer); //console.log(drawer);
let params = { let params = {
...vals, ...vals,
parentId: 0, parentId: 0,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-07 11:19:30 * @Date: 2022-12-07 11:19:30
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-07 15:12:48 * @Last Modified time: 2022-12-08 15:48:49
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -34,7 +34,9 @@ function Fault(props) { ...@@ -34,7 +34,9 @@ function Fault(props) {
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
}); });
const [drawergz, setdrawergz] = useState({
open: false,
});
const { run, loading } = useRequest(doFetch, { const { run, loading } = useRequest(doFetch, {
manual: true, manual: true,
onSuccess: (res, params) => { onSuccess: (res, params) => {
...@@ -131,11 +133,34 @@ function Fault(props) { ...@@ -131,11 +133,34 @@ function Fault(props) {
} }
}, [drawer?.type]); }, [drawer?.type]);
const FaultName = () => { const FaultName = (props) => {
const [request, setrequest] = useState(); const [request, setrequest] = useState();
const [drawergz, setdrawergz] = useState({ const gzmcref = useRef();
open: false, const columns = useMemo(() => {
}); return [
{
title: '故障名称',
dataIndex: 'faultDetailName',
key: 'faultDetailName',
},
{
title: '故障代码',
dataIndex: 'faultDetailCode',
key: 'faultDetailCode',
},
{
title: '故障描述',
dataIndex: 'faultPhenomenon',
key: 'faultPhenomenon',
},
{
title: '解决方案',
dataIndex: 'faultSolution',
key: 'faultSolution',
search: false,
},
];
}, []);
useEffect(() => { useEffect(() => {
const fn = async () => { const fn = async () => {
let params = { id: drawer?.item?.id }; let params = { id: drawer?.item?.id };
...@@ -148,29 +173,7 @@ function Fault(props) { ...@@ -148,29 +173,7 @@ function Fault(props) {
<> <>
<ProDescriptions dataSource={request} columns={columns} /> <ProDescriptions dataSource={request} columns={columns} />
<AutoTable <AutoTable
columns={[ columns={columns}
{
title: '故障名称',
dataIndex: 'faultDetailName',
key: 'faultDetailName',
},
{
title: '故障代码',
dataIndex: 'faultDetailCode',
key: 'faultDetailCode',
},
{
title: '故障描述',
dataIndex: 'faultPhenomenon',
key: 'faultPhenomenon',
},
{
title: '解决方案',
dataIndex: 'faultSolution',
key: 'faultSolution',
search: false,
},
]}
path="/repair/umFaultSettingDetail/queryById" path="/repair/umFaultSettingDetail/queryById"
params={{ id: drawer?.item.id }} params={{ id: drawer?.item.id }}
pageextra={'add'} pageextra={'add'}
...@@ -194,6 +197,23 @@ function Fault(props) { ...@@ -194,6 +197,23 @@ function Fault(props) {
}, },
}} }}
/> />
<DrawerPro
placement="right"
fields={columns}
actionRef={gzmcref}
style={{ transform: 'translateX(180px)' }}
width={'100%'}
defaultFormValue={drawergz?.item}
onClose={() => {
setdrawergz((s) => ({
...s,
open: false,
type: null,
item: null,
}));
}}
{...drawergz}
/>
</> </>
); );
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03 * @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-06 13:28:43 * @Last Modified time: 2022-12-08 09:02:50
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -119,7 +119,7 @@ function Failure(props) { ...@@ -119,7 +119,7 @@ function Failure(props) {
val: 'only', val: 'only',
title: '编辑子设备', title: '编辑子设备',
// onFinish: async (vals) => { // onFinish: async (vals) => {
// console.log(1); // //console.log(1);
// let params = { // let params = {
// ...vals, // ...vals,
// id: row.id, // id: row.id,
...@@ -159,7 +159,7 @@ function Failure(props) { ...@@ -159,7 +159,7 @@ function Failure(props) {
val: 'only', val: 'only',
title: '履历登记', title: '履历登记',
// onFinish: async (vals) => { // onFinish: async (vals) => {
// console.log(1); // //console.log(1);
// let params = { // let params = {
// ...vals, // ...vals,
// id: row.id, // id: row.id,
...@@ -256,8 +256,9 @@ function Failure(props) { ...@@ -256,8 +256,9 @@ function Failure(props) {
break; break;
} }
}; };
const containderef = useRef();
return ( return (
<div style={{ position: 'relative' }}> <div style={{ position: 'relative' }} ref={containderef}>
<AutoTable <AutoTable
pagetitle={<h3 className="page-title">维修工单</h3>} pagetitle={<h3 className="page-title">维修工单</h3>}
columns={columns} columns={columns}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03 * @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-06 19:43:22 * @Last Modified time: 2022-12-08 14:35:09
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -142,10 +142,10 @@ function Failure(props) { ...@@ -142,10 +142,10 @@ function Failure(props) {
fields={[ fields={[
{ {
title: '最新外协人员', title: '最新外协人员',
dataIndex: 'causeFailure', dataIndex: 'newRepairUserName',
valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
key: 'causeFailure', fieldProps: { disabled: true },
key: 'newRepairUserName',
}, },
{ {
title: '外协人员', title: '外协人员',
...@@ -155,13 +155,13 @@ function Failure(props) { ...@@ -155,13 +155,13 @@ function Failure(props) {
valueType: 'select', valueType: 'select',
options: { options: {
path: '/repair/umOtherUnitsOrder/selectionAgain', path: '/repair/umOtherUnitsOrder/selectionAgain',
params: { otherUnitsOrderId: drawer?.item.id }, params: { id: drawer?.item.id },
}, },
}, },
]} ]}
onFinish={async (vals) => { onFinish={async (vals) => {
let params = { let params = {
otherUnitsFinish: vals, otherUnitsAssistList: vals?.otherUnitsAssistList.map((it) => ({ assistUserId: it })),
id: drawer?.item?.id, id: drawer?.item?.id,
}; };
let res = await doFetch({ let res = await doFetch({
...@@ -182,6 +182,45 @@ function Failure(props) { ...@@ -182,6 +182,45 @@ function Failure(props) {
); );
}; };
// 外协派单
const Wxpd = () => {
const columns = [
{
title: '外协人员',
dataIndex: 'otherUnitsAssistList',
key: 'otherUnitsAssistList',
valueType: 'select',
options: { path: '/repair/umOtherUnitsOrder/selection', params: { id: drawer?.item.id } },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
];
return (
<>
<InitForm
fields={columns}
onFinish={async (vals) => {
let params = {
otherUnitsAssistList: [{ assistUserId: vals?.otherUnitsAssistList }],
id: drawer?.item.id,
};
let res = await doFetch({
url: '/repair/umOtherUnitsOrder/dispatchById',
params,
});
if (res.code === '0000') {
message.success('派单成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
}}
/>
</>
);
};
const remove = (text, row, _, action) => { const remove = (text, row, _, action) => {
return ( return (
<PremButton <PremButton
...@@ -235,21 +274,14 @@ function Failure(props) { ...@@ -235,21 +274,14 @@ function Failure(props) {
) : ( ) : (
<a <a
onClick={async () => { onClick={async () => {
let params = { setdrawer((s) => ({
id: row?.id, ...s,
}; open: true,
let res = await doFetch({ type: 'wxpd',
url: '/repair/umOtherUnitsOrder/dispatchById', item: row,
params, val: 'only',
}); title: '派单',
if (res.code === '0000') { }));
message.success('派单成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
}} }}
> >
派单 派单
...@@ -295,7 +327,7 @@ function Failure(props) { ...@@ -295,7 +327,7 @@ function Failure(props) {
}; };
// 未完成按钮 // 未完成按钮
const unfinishBtn = (text, row, _, action) => { const unfinishBtn = (text, row, _, action) => {
if (row?.status == 1) { if (row?.status == 1 || row?.status == 2) {
return ( return (
<PremButton <PremButton
pop={{ pop={{
...@@ -314,19 +346,23 @@ function Failure(props) { ...@@ -314,19 +346,23 @@ function Failure(props) {
删除 删除
</PremButton> </PremButton>
); );
} else if (row?.status == 2) { } else {
return ( return (
<PremButton <PremButton
onClick={() => {
setdrawer((s) => ({
...s,
item: row,
type: 'Reassig',
open: true,
}));
}}
btn={{ btn={{
size: 'small', size: 'small',
onClick: () => {
setdrawer((s) => ({
...s,
item: {
...row,
trackAssistList: row?.trackAssistList ? row?.trackAssistList : [],
},
title: '重新指派',
type: 'Reassig',
open: true,
}));
},
}} }}
> >
重新指派 重新指派
...@@ -337,7 +373,7 @@ function Failure(props) { ...@@ -337,7 +373,7 @@ function Failure(props) {
const columns = useMemo(() => { const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.columns; let defcolumn = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.columns;
console.log(defcolumn); //console.log(defcolumn);
let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {}; let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
if (activeTabKey == '1') { if (activeTabKey == '1') {
...@@ -371,11 +407,19 @@ function Failure(props) { ...@@ -371,11 +407,19 @@ function Failure(props) {
const selectType = (type) => { const selectType = (type) => {
switch (type) { switch (type) {
case 'add': case 'add':
return <Addform />; return (
<Addform
url={'/repair/umOtherUnitsOrder/save'}
setdrawer={setdrawer}
actionRef={actionRef}
/>
);
case 'comouts': case 'comouts':
return <CompleteOuts />; return <CompleteOuts />;
case 'Reassig': case 'Reassig':
return <Reassig />; return <Reassig />;
case 'wxpd':
return <Wxpd />;
default: default:
break; break;
} }
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-05 11:13:26 * @Date: 2022-12-05 11:13:26
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-05 16:31:25 * @Last Modified time: 2022-12-08 15:07:19
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import InitForm from '@/components/InitForm'; import InitForm from '@/components/InitForm';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
import { message } from 'antd';
const App = ({ type, id, actionRef, url, setdrawer }) => { const App = ({ type, id, actionRef, url, setdrawer }) => {
let columns = []; const columns = {
if (type == 'wxjd') { wxjd: [
columns = [
{ {
title: '协助维修人员', title: '协助维修人员',
dataIndex: 'repairAssistList', dataIndex: 'repairAssistList',
...@@ -24,21 +24,20 @@ const App = ({ type, id, actionRef, url, setdrawer }) => { ...@@ -24,21 +24,20 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
mode: 'multiple', mode: 'multiple',
}, },
}, },
]; ],
} else if (type == 'wxpd') { wxpd: [
columns = [
{ {
title: '维修人员', title: '维修人员',
dataIndex: 'faultDescription', dataIndex: 'repairId',
key: 'faultDescription', key: 'repairId',
valueType: 'select', valueType: 'select',
options: { path: '/auth/sysUser/selection' }, options: { path: '/auth/sysUser/selection' },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
}, },
{ {
title: '协助维修人员', title: '协助维修人员',
dataIndex: 'faultDescription', dataIndex: 'repairAssistList',
key: 'faultDescription', key: 'repairAssistList',
valueType: 'select', valueType: 'select',
options: { path: '/repair/umRepairOrder/selection', params: { id } }, options: { path: '/repair/umRepairOrder/selection', params: { id } },
fieldProps: { fieldProps: {
...@@ -47,9 +46,8 @@ const App = ({ type, id, actionRef, url, setdrawer }) => { ...@@ -47,9 +46,8 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
mode: 'multiple', mode: 'multiple',
}, },
}, },
]; ],
} else if (type == 'zzpd') { zzpd: [
columns = [
{ {
title: '追踪人员', title: '追踪人员',
dataIndex: 'trackAssistList', dataIndex: 'trackAssistList',
...@@ -58,48 +56,108 @@ const App = ({ type, id, actionRef, url, setdrawer }) => { ...@@ -58,48 +56,108 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
options: { path: '/auth/sysUser/selection' }, options: { path: '/auth/sysUser/selection' },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
}, },
]; ],
} else if (type == 'wpd') { wpd: [
columns = [
{ {
title: '外协人员', title: '外协人员',
dataIndex: 'otherUnitsAssistList', dataIndex: 'otherUnitsAssistList',
key: 'otherUnitsAssistList', key: 'otherUnitsAssistList',
valueType: 'select', valueType: 'select',
options: { path: '/auth/sysUser/selection' }, options: { path: '/repair/umOtherUnitsOrder/selection' },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
}, },
]; ],
} };
const finishHandle = {
wxjd: async (vals) => {
//console.log(vals);
vals.repairAssistList = vals?.repairAssistList.map((it) => ({
assistUserId: it,
}));
let params = {
...vals,
id,
};
let res = await doFetch({
url,
params,
});
if (res.code === '0000') {
message.success('操作成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
},
wxpd: async (vals) => {
//console.log(vals);
vals.repairAssistList = vals?.repairAssistList.map((it) => {
return {
assistUserId: it,
};
});
let params = {
...vals,
id,
};
let res = await doFetch({
url,
params,
});
if (res.code === '0000') {
message.success('操作成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
},
zzpd: async (vals) => {
//console.log(vals);
let params = {
trackAssistList: [{ assistUserId: vals?.trackAssistList }],
id,
};
//console.log(params);
let res = await doFetch({
url,
params,
});
if (res.code === '0000') {
message.success('操作成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
},
wpd: async (vals) => {
let params = {
otherUnitsAssistList: [{ assistUserId: vals?.otherUnitsAssistList }],
id,
};
let res = await doFetch({
url,
params,
});
if (res.code === '0000') {
message.success('操作成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
},
};
return ( return (
<> <>
<InitForm <InitForm fields={columns[type]} onFinish={finishHandle[type]} />
fields={columns}
onFinish={async (vals) => {
console.log(vals);
vals.repairAssistList = vals?.repairAssistList.map((it) => {
return {
assistUserId: it,
};
});
let params = {
...vals,
id,
};
let res = await doFetch({
url,
params,
});
if (res.code === '0000') {
message.success('操作成功!');
setdrawer((s) => ({
...s,
visible: false,
}));
actionRef.current.reload();
}
}}
/>
</> </>
); );
}; };
......
function getcolumns(setdrawer) { function getcolumns(setdrawer) {
return [
return [ {
{ tab: '维修工单',
"tab": "维修工单", key: '1',
"key": "1", columns: [
"columns": [ {
{ title: '维修单号',
"title": "维修单号", dataIndex: 'repairOrderNo',
"dataIndex": "repairOrderNo", key: 'repairOrderNo',
"key": "repairOrderNo" },
}, {
{ title: '设备编号',
"title": "设备编号", dataIndex: 'equipmentNo',
"dataIndex": "equipmentNo", key: 'equipmentNo',
"key": "equipmentNo" },
}, {
{ title: '设备名称',
"title": "设备名称", dataIndex: 'equipmentName',
"dataIndex": "equipmentName", key: 'equipmentName',
"key": "equipmentName" },
}, {
{ title: '故障描述',
"title": "故障描述", dataIndex: 'faultDescription',
"dataIndex": "faultDescription", key: 'faultDescription',
"key": "faultDescription" },
}, {
{ title: '报修人员',
"title": "报修人员", dataIndex: 'repairUserName',
"dataIndex": "repairUserName", key: 'repairUserName',
"key": "repairUserName" },
}, {
{ title: '报修时间',
"title": "报修时间", dataIndex: 'repairTime',
"dataIndex": "repairTime", key: 'repairTimeList',
"key": "repairTimeList", valueType: 'dateTimeRange',
"valueType": "dateTimeRange" },
}, {
{ title: '报修单号',
"title": "报修单号", dataIndex: 'repairNo',
"dataIndex": "repairNo", key: 'repairNo',
"key": "repairNo" },
}, {
{ title: '工单状态',
"title": "工单状态", dataIndex: 'statusName',
"dataIndex": "statusName", key: 'statusName',
"key": "statusName" },
} ],
], pathconfig: {
"pathconfig": { enableadd: false,
"enableadd": false, enableedit: false,
"enableedit": false, enabledelete: false,
"enabledelete": false, enabledetail: false,
"enabledetail": false, add: '',
"add": "", edit: '',
"edit": "", list: '/repair/umRepairOrder/queryRepairOrderList',
"list": "/repair/umRepairOrder/queryRepairOrderList", delete: '',
"delete": "", detail: '',
"detail": "" },
} },
}, {
{ tab: '追踪工单',
"tab": "追踪工单", key: '2',
"key": "2", columns: [
"columns": [ {
{ title: '追踪单号',
"title": "追踪单号", dataIndex: 'taskOrderNo',
"dataIndex": "taskOrderNo", key: 'taskOrderNo',
"key": "taskOrderNo" },
}, {
{ title: '设备编号',
"title": "设备编号", dataIndex: 'equipmentNo',
"dataIndex": "equipmentNo", key: 'equipmentNo',
"key": "equipmentNo" },
}, {
{ title: '设备名称',
"title": "设备名称", dataIndex: 'equipmentName',
"dataIndex": "equipmentName", key: 'equipmentName',
"key": "equipmentName" },
}, {
{ title: '故障描述',
"title": "故障描述", dataIndex: 'faultDescription',
"dataIndex": "faultDescription", key: 'faultDescription',
"key": "faultDescription" },
}, {
{ title: '创建时间',
"title": "创建时间", dataIndex: 'createTime',
"dataIndex": "createTime", key: 'createTime',
"key": "createTime" },
}, {
{ title: '创建人员',
"title": "创建人员", dataIndex: 'createUserName',
"dataIndex": "createUserName", key: 'createUserName',
"key": "createUserName" },
}, {
{ title: '来源单号',
"title": "来源单号", dataIndex: 'dataSourcesNo',
"dataIndex": "dataSourcesNo", key: 'dataSourcesNo',
"key": "dataSourcesNo" },
}, {
{ title: '工单状态',
"title": "工单状态", dataIndex: 'statusName',
"dataIndex": "statusName", key: 'statusName',
"key": "statusName" },
} ],
], pathconfig: {
"pathconfig": { enableadd: false,
"enableadd": false, enableedit: false,
"enableedit": false, enabledelete: false,
"enabledelete": false, enabledetail: false,
"enabledetail": false, add: '',
"add": "", edit: '',
"edit": "", list: '/repair/umTrackOrder/queryTrackOrderList',
"list": "/repair/umTrackOrder/queryTrackOrderList", delete: '',
"delete": "", detail: '',
"detail": "" },
} },
}, {
{ tab: '外协工单',
"tab": "外协工单", key: '3',
"key": "3", columns: [
"columns": [ {
{ title: '维修单号',
"title": "维修单号", dataIndex: 'repairOrderNo',
"dataIndex": "repairOrderNo", key: 'repairOrderNo',
"key": "repairOrderNo" },
}, {
{ title: '设备编号',
"title": "设备编号", dataIndex: 'equipmentNo',
"dataIndex": "equipmentNo", key: 'equipmentNo',
"key": "equipmentNo" },
}, {
{ title: '设备名称',
"title": "设备名称", dataIndex: 'equipmentName',
"dataIndex": "equipmentName", key: 'equipmentName',
"key": "equipmentName" },
}, {
{ title: '故障描述',
"title": "故障描述", dataIndex: 'faultDescription',
"dataIndex": "faultDescription", key: 'faultDescription',
"key": "faultDescription" },
}, {
{ title: '报修人员',
"title": "报修人员", dataIndex: 'repairUserName',
"dataIndex": "repairUserName", key: 'repairUserName',
"key": "repairUserName" },
}, {
{ title: '报修时间',
"title": "报修时间", dataIndex: 'repairTime',
"dataIndex": "repairTime", key: 'repairTimeList',
"key": "repairTimeList", valueType: 'dateTimeRange',
"valueType": "dateTimeRange" },
}, {
{ title: '报修单号',
"title": "报修单号", dataIndex: 'repairNo',
"dataIndex": "repairNo", key: 'repairNo',
"key": "repairNo" },
}, {
{ title: '工单状态',
"title": "工单状态", dataIndex: 'statusName',
"dataIndex": "statusName", key: 'statusName',
"key": "statusName" },
} ],
], pathconfig: {
"pathconfig": { enableadd: true,
"enableadd": true, enableedit: true,
"enableedit": true, enabledelete: true,
"enabledelete": true, enabledetail: true,
"enabledetail": true, add: '',
"add": "", edit: '',
"edit": "", list: '/repair/umOtherUnitsOrder/queryOtherUnitsOrderList',
"list": "", delete: '',
"delete": "", detail: '',
"detail": "" },
} },
} ];
]; }
} export default getcolumns;
export default getcolumns;
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-05 10:13:42 * @Date: 2022-12-05 10:13:42
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-06 16:41:48 * @Last Modified time: 2022-12-08 13:47:55
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -14,6 +14,7 @@ import getcolumns from './columns'; ...@@ -14,6 +14,7 @@ import getcolumns from './columns';
import { useRequest } from 'ahooks'; import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
import OrderHandle from './RepairOrderHandle'; import OrderHandle from './RepairOrderHandle';
import { message } from 'antd';
function Platform(props) { function Platform(props) {
const actionRef = useRef(), const actionRef = useRef(),
...@@ -75,7 +76,7 @@ function Platform(props) { ...@@ -75,7 +76,7 @@ function Platform(props) {
// ...s, // ...s,
// type: null, // type: null,
// })); // }));
console.log('zzjd'); //console.log('zzjd');
let params = { let params = {
id: row?.id, id: row?.id,
}; };
...@@ -87,14 +88,14 @@ function Platform(props) { ...@@ -87,14 +88,14 @@ function Platform(props) {
message.success('操作成功!'); message.success('操作成功!');
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
visible: false, open: false,
})); }));
actionRef.current.reload(); actionRef.current.reload();
} }
}, },
}} }}
> >
接单2 接单
</PremButton> </PremButton>
); );
} else if (activeTab == '3') { } else if (activeTab == '3') {
...@@ -116,14 +117,14 @@ function Platform(props) { ...@@ -116,14 +117,14 @@ function Platform(props) {
message.success('操作成功!'); message.success('操作成功!');
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
visible: false, open: false,
})); }));
actionRef.current.reload(); actionRef.current.reload();
} }
}, },
}} }}
> >
接单3 接单
</PremButton> </PremButton>
); );
} else if (activeTab == '1') { } else if (activeTab == '1') {
...@@ -145,7 +146,7 @@ function Platform(props) { ...@@ -145,7 +146,7 @@ function Platform(props) {
}, },
}} }}
> >
接单1 接单
</PremButton> </PremButton>
); );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03 * @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-07 19:10:04 * @Last Modified time: 2022-12-08 14:03:22
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -109,6 +109,7 @@ function Failure(props) { ...@@ -109,6 +109,7 @@ function Failure(props) {
actionRef.current.reload(); actionRef.current.reload();
} }
}} }}
defaultFormValue={drawer?.item}
{...drawer} {...drawer}
/> />
</> </>
...@@ -125,9 +126,8 @@ function Failure(props) { ...@@ -125,9 +126,8 @@ function Failure(props) {
title: '计划追踪日期', title: '计划追踪日期',
dataIndex: 'planTrackTime', dataIndex: 'planTrackTime',
formItemProps: { rules: [{ required: false, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: false, message: '此项为必填项' }] },
key: 'planTrackTime', key: 'nextTrackDate',
fieldProps: { fieldProps: {
placeholder: '请选择',
disabled: true, disabled: true,
}, },
}, },
...@@ -172,7 +172,6 @@ function Failure(props) { ...@@ -172,7 +172,6 @@ function Failure(props) {
dataIndex: 'trackCycle', dataIndex: 'trackCycle',
key: 'trackCycle', key: 'trackCycle',
fieldProps: { fieldProps: {
placeholder: '请选择',
disabled: true, disabled: true,
}, },
}, },
...@@ -186,9 +185,12 @@ function Failure(props) { ...@@ -186,9 +185,12 @@ function Failure(props) {
]} ]}
onFinish={async (vals) => { onFinish={async (vals) => {
let params = { let params = {
trackTraceinfo: vals, trackTraceinfo: { ...vals, planTrackTime: vals.nextTrackDate },
id: drawer?.item?.id, id: drawer?.item?.id,
}; };
delete params.trackTraceinfo.nextTrackDate;
//console.log(params);
let res = await doFetch({ let res = await doFetch({
url: '/repair/umTrackOrder/trackById', url: '/repair/umTrackOrder/trackById',
params, params,
...@@ -203,6 +205,7 @@ function Failure(props) { ...@@ -203,6 +205,7 @@ function Failure(props) {
} }
}} }}
{...drawer} {...drawer}
defaultFormValue={drawer?.item}
/> />
</> </>
); );
...@@ -217,7 +220,7 @@ function Failure(props) { ...@@ -217,7 +220,7 @@ function Failure(props) {
{ {
title: '追踪人员', title: '追踪人员',
dataIndex: 'trackerName', dataIndex: 'trackerName',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: false, message: '此项为必填项' }] },
key: 'trackerName', key: 'trackerName',
fieldProps: { fieldProps: {
placeholder: '请选择', placeholder: '请选择',
...@@ -306,6 +309,7 @@ function Failure(props) { ...@@ -306,6 +309,7 @@ function Failure(props) {
actionRef.current.reload(); actionRef.current.reload();
} }
}} }}
defaultFormValue={drawer?.item}
{...drawer} {...drawer}
/> />
</> </>
...@@ -396,11 +400,9 @@ function Failure(props) { ...@@ -396,11 +400,9 @@ function Failure(props) {
...s, ...s,
open: true, open: true,
type: 'track', type: 'track',
item: { item: { ...row, trackCycle: String(row?.trackCycle) },
id: row.id, // detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
}, // params: { trackOrderId: row?.id },
detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
params: { trackOrderId: row?.id },
val: 'only', val: 'only',
title: '追踪信息', title: '追踪信息',
})); }));
...@@ -420,6 +422,7 @@ function Failure(props) { ...@@ -420,6 +422,7 @@ function Failure(props) {
open: true, open: true,
val: 'only', val: 'only',
title: '验证', title: '验证',
item: row,
detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId', detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
params: { trackOrderId: row?.id }, params: { trackOrderId: row?.id },
type: 'check', type: 'check',
...@@ -474,12 +477,15 @@ function Failure(props) { ...@@ -474,12 +477,15 @@ function Failure(props) {
onClick: () => { onClick: () => {
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
item: row, item: {
...row,
trackAssistList: row?.trackAssistList ? row?.trackAssistList : [],
},
type: 'Reassig', type: 'Reassig',
open: true, open: true,
val: 'only', val: 'only',
})); }));
console.log(drawer); //console.log(drawer);
}, },
}} }}
> >
...@@ -491,7 +497,7 @@ function Failure(props) { ...@@ -491,7 +497,7 @@ function Failure(props) {
const columns = useMemo(() => { const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.columns; let defcolumn = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.columns;
console.log(defcolumn); //console.log(defcolumn);
let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {}; let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
if (activeTabKey == '1') { if (activeTabKey == '1') {
......
...@@ -64,7 +64,7 @@ function Factory(props) { ...@@ -64,7 +64,7 @@ function Factory(props) {
title: '编辑', title: '编辑',
val: 'edit', val: 'edit',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(1); //console.log(1);
let params = { let params = {
...vals, ...vals,
id: row.id, id: row.id,
...@@ -153,7 +153,7 @@ function Factory(props) { ...@@ -153,7 +153,7 @@ function Factory(props) {
title: '新增', title: '新增',
val: 'add', val: 'add',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(1); //console.log(1);
let params = { let params = {
...vals, ...vals,
}; };
......
...@@ -68,14 +68,14 @@ function Type(props) { ...@@ -68,14 +68,14 @@ function Type(props) {
title: '编辑', title: '编辑',
val: 'edit', val: 'edit',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(vals); //console.log(vals);
let params = { let params = {
...vals, ...vals,
id: row.key, id: row.key,
parentId: row.parentKey, parentId: row.parentKey,
departmentType: row.departmentType, departmentType: row.departmentType,
}; };
console.log(params); //console.log(params);
delete params.title; delete params.title;
let res = await doFetch({ let res = await doFetch({
url: urlParams.save, url: urlParams.save,
......
...@@ -135,19 +135,19 @@ function Role(props) { ...@@ -135,19 +135,19 @@ function Role(props) {
// url: '/sysRolePermission/queryAll', // url: '/sysRolePermission/queryAll',
// params: { roleId: row.id }, // params: { roleId: row.id },
// }); // });
// console.log(data); // //console.log(data);
console.log(row); //console.log(row);
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
authorityOpen: true, authorityOpen: true,
item: row, item: row,
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(vals); //console.log(vals);
let res = await doFetch({ let res = await doFetch({
url: '/sysEnterprise/save', url: '/sysEnterprise/save',
params: { ...vals }, params: { ...vals },
}); });
console.log(res); //console.log(res);
if (res.code === '0000') { if (res.code === '0000') {
message.success('修改成功!'); message.success('修改成功!');
setdrawer((s) => ({ setdrawer((s) => ({
...@@ -266,7 +266,7 @@ function Role(props) { ...@@ -266,7 +266,7 @@ function Role(props) {
title: '新增', title: '新增',
val: 'add', val: 'add',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(1); //console.log(1);
let params = { let params = {
...vals, ...vals,
}; };
......
...@@ -133,7 +133,7 @@ function getcolumns(setdrawer) { ...@@ -133,7 +133,7 @@ function getcolumns(setdrawer) {
// }); // });
// }); // });
// newfieldscolumns = fieldscolumns.concat(column); // newfieldscolumns = fieldscolumns.concat(column);
// console.log('fieldscolumns', newfieldscolumns); // //console.log('fieldscolumns', newfieldscolumns);
// } // }
// setdrawer((s) => ({ // setdrawer((s) => ({
// ...s, // ...s,
......
...@@ -68,7 +68,7 @@ function User(props) { ...@@ -68,7 +68,7 @@ function User(props) {
val: 'only', val: 'only',
// onFinish: async (vals) => { // onFinish: async (vals) => {
// let userCharReqList = []; // let userCharReqList = [];
// console.log('id:', row.id); // //console.log('id:', row.id);
// for (let i in vals) { // for (let i in vals) {
// if (!isNaN(Number(i))) { // if (!isNaN(Number(i))) {
// userCharReqList.push({ // userCharReqList.push({
...@@ -174,7 +174,7 @@ function User(props) { ...@@ -174,7 +174,7 @@ function User(props) {
userCharReqList, userCharReqList,
}; };
delete params.shopId; delete params.shopId;
console.log(params, '!!!!'); //console.log(params, '!!!!');
let res = await doFetch({ let res = await doFetch({
url: urlParams.save, url: urlParams.save,
params, params,
...@@ -221,7 +221,7 @@ function User(props) { ...@@ -221,7 +221,7 @@ function User(props) {
userCharReqList, userCharReqList,
}; };
delete params.shopId; delete params.shopId;
console.log(params, '!!!!'); //console.log(params, '!!!!');
let res = await doFetch({ let res = await doFetch({
url: urlParams.save, url: urlParams.save,
params, params,
......
...@@ -57,7 +57,7 @@ function Type(props) { ...@@ -57,7 +57,7 @@ function Type(props) {
size: 'small', size: 'small',
disabled: row?.dataType == 1 ? true : false, disabled: row?.dataType == 1 ? true : false,
onClick: () => { onClick: () => {
console.log(row); //console.log(row);
setDrawer((s) => ({ setDrawer((s) => ({
...s, ...s,
visible: true, visible: true,
...@@ -69,13 +69,13 @@ function Type(props) { ...@@ -69,13 +69,13 @@ function Type(props) {
title: '编辑', title: '编辑',
val: 'edit', val: 'edit',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(vals); //console.log(vals);
let params = { let params = {
...vals, ...vals,
id: row.key, id: row.key,
parentId: row.parentKey, parentId: row.parentKey,
}; };
console.log(params); //console.log(params);
delete params.title; delete params.title;
delete params.dataType; delete params.dataType;
let res = await doFetch({ let res = await doFetch({
...@@ -117,7 +117,7 @@ function Type(props) { ...@@ -117,7 +117,7 @@ function Type(props) {
title: '新增数据', title: '新增数据',
val: 'addChild', val: 'addChild',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(vals); //console.log(vals);
let params = { let params = {
...vals, ...vals,
parentId: row.key, parentId: row.key,
......
...@@ -41,7 +41,7 @@ function Field(props) { ...@@ -41,7 +41,7 @@ function Field(props) {
url: urlParams.formList, url: urlParams.formList,
params: {}, params: {},
}); });
console.log(result); //console.log(result);
if (!result?.data?.dataList.length == 0) { if (!result?.data?.dataList.length == 0) {
setitems( setitems(
result?.data?.dataList.map((it, index) => { result?.data?.dataList.map((it, index) => {
...@@ -81,7 +81,7 @@ function Field(props) { ...@@ -81,7 +81,7 @@ function Field(props) {
formId: drawer?.formId, formId: drawer?.formId,
}, },
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(vals); //console.log(vals);
let params = { let params = {
...vals, ...vals,
id: row.id, id: row.id,
...@@ -174,7 +174,7 @@ function Field(props) { ...@@ -174,7 +174,7 @@ function Field(props) {
</h3> </h3>
<Menu <Menu
onClick={async (e) => { onClick={async (e) => {
// console.log(e); // //console.log(e);
setextraparams({ setextraparams({
formId: e?.key, formId: e?.key,
}); });
...@@ -208,7 +208,7 @@ function Field(props) { ...@@ -208,7 +208,7 @@ function Field(props) {
disabled: false, disabled: false,
type: 'primary', type: 'primary',
onClick: () => { onClick: () => {
console.log(drawer); //console.log(drawer);
setDrawer((s) => ({ setDrawer((s) => ({
...s, ...s,
visible: true, visible: true,
...@@ -220,7 +220,7 @@ function Field(props) { ...@@ -220,7 +220,7 @@ function Field(props) {
title: '新增', title: '新增',
val: 'add', val: 'add',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(vals); //console.log(vals);
let params = { let params = {
...vals, ...vals,
formId: drawer?.formId, formId: drawer?.formId,
......
...@@ -65,7 +65,7 @@ function Rules(props) { ...@@ -65,7 +65,7 @@ function Rules(props) {
title: '编辑', title: '编辑',
val: 'edit', val: 'edit',
onFinish: async (vals) => { onFinish: async (vals) => {
console.log(1); //console.log(1);
let params = { let params = {
...vals, ...vals,
id: row.id, id: row.id,
...@@ -158,7 +158,7 @@ function Rules(props) { ...@@ -158,7 +158,7 @@ function Rules(props) {
let params = { let params = {
...vals, ...vals,
}; };
console.log('vals:', vals); //console.log('vals:', vals);
// for (let i in vals) { // for (let i in vals) {
// if (i == 'nrList') { // if (i == 'nrList') {
// let reshow = { // let reshow = {
...@@ -170,7 +170,7 @@ function Rules(props) { ...@@ -170,7 +170,7 @@ function Rules(props) {
// }); // });
// reshow.other.sort = // reshow.other.sort =
// reshow.other.sort == 1 ? reshow.other.sort : reshow.other.sort - 1; // reshow.other.sort == 1 ? reshow.other.sort : reshow.other.sort - 1;
// console.log('reshow', reshow); // //console.log('reshow', reshow);
// } // }
// } // }
params.nrList = []; params.nrList = [];
...@@ -188,7 +188,7 @@ function Rules(props) { ...@@ -188,7 +188,7 @@ function Rules(props) {
message.warning('请选择顺序递增规则的位置!'); message.warning('请选择顺序递增规则的位置!');
return; return;
} }
console.log('11111', params); //console.log('11111', params);
let res = await doFetch({ let res = await doFetch({
url: urlParams.save, url: urlParams.save,
params, params,
......
...@@ -62,7 +62,7 @@ export default async (fieldscolumns, setdrawer, row, formId, detailpath) => { ...@@ -62,7 +62,7 @@ export default async (fieldscolumns, setdrawer, row, formId, detailpath) => {
}); });
}); });
newfieldscolumns = fieldscolumns.concat(column); newfieldscolumns = fieldscolumns.concat(column);
console.log('fieldscolumns', newfieldscolumns); //console.log('fieldscolumns', newfieldscolumns);
} }
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
......
...@@ -16,21 +16,21 @@ const startServer = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['r ...@@ -16,21 +16,21 @@ const startServer = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['r
startServer.stderr.on('data', (data) => { startServer.stderr.on('data', (data) => {
// eslint-disable-next-line // eslint-disable-next-line
console.log(data.toString()); //console.log(data.toString());
}); });
startServer.on('exit', () => { startServer.on('exit', () => {
kill(process.env.PORT || 8000); kill(process.env.PORT || 8000);
}); });
console.log('Starting development server for e2e tests...'); //console.log('Starting development server for e2e tests...');
startServer.stdout.on('data', (data) => { startServer.stdout.on('data', (data) => {
console.log(data.toString()); //console.log(data.toString());
// hack code , wait umi // hack code , wait umi
if (!once && data.toString().indexOf('Serving your umi project!') >= 0) { if (!once && data.toString().indexOf('Serving your umi project!') >= 0) {
// eslint-disable-next-line // eslint-disable-next-line
once = true; once = true;
console.log('Development server is started, ready to run tests.'); //console.log('Development server is started, ready to run tests.');
const testCmd = spawn( const testCmd = spawn(
/^win/.test(process.platform) ? 'npm.cmd' : 'npm', /^win/.test(process.platform) ? 'npm.cmd' : 'npm',
['run', 'playwright'], ['run', 'playwright'],
...@@ -39,7 +39,7 @@ startServer.stdout.on('data', (data) => { ...@@ -39,7 +39,7 @@ startServer.stdout.on('data', (data) => {
}, },
); );
testCmd.on('exit', (code) => { testCmd.on('exit', (code) => {
console.log('服务已经退出,退出码:', code); //console.log('服务已经退出,退出码:', code);
startServer.kill(); startServer.kill();
process.exit(code); process.exit(code);
}); });
......
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