diff --git a/src/assets/index/AS.svg b/src/assets/index/AS.svg new file mode 100644 index 0000000..d13befc --- /dev/null +++ b/src/assets/index/AS.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index/attendanceSystem.svg b/src/assets/index/attendanceSystem.svg new file mode 100644 index 0000000..0ff987c --- /dev/null +++ b/src/assets/index/attendanceSystem.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index/crm.svg b/src/assets/index/crm.svg new file mode 100644 index 0000000..4fc9a85 --- /dev/null +++ b/src/assets/index/crm.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index/default-app.svg b/src/assets/index/default-app.svg new file mode 100644 index 0000000..7b9305b --- /dev/null +++ b/src/assets/index/default-app.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index/financialSystem.svg b/src/assets/index/financialSystem.svg new file mode 100644 index 0000000..af6cd4d --- /dev/null +++ b/src/assets/index/financialSystem.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index/kaoqin.svg b/src/assets/index/kaoqin.svg new file mode 100644 index 0000000..24e6dd2 --- /dev/null +++ b/src/assets/index/kaoqin.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index/oa.svg b/src/assets/index/oa.svg new file mode 100644 index 0000000..9893f9f --- /dev/null +++ b/src/assets/index/oa.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index/工作计划.svg b/src/assets/index/工作计划.svg new file mode 100644 index 0000000..b0dd4f5 --- /dev/null +++ b/src/assets/index/工作计划.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index/建议提案管理.svg b/src/assets/index/建议提案管理.svg new file mode 100644 index 0000000..7b9305b --- /dev/null +++ b/src/assets/index/建议提案管理.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index/考勤管理.svg b/src/assets/index/考勤管理.svg new file mode 100644 index 0000000..cda99bf --- /dev/null +++ b/src/assets/index/考勤管理.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/index/财务系统.svg b/src/assets/index/财务系统.svg new file mode 100644 index 0000000..af6cd4d --- /dev/null +++ b/src/assets/index/财务系统.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/Common/CommonListSelect/index.js b/src/components/Common/CommonListSelect/index.js index b9e1e60..ba0bf29 100644 --- a/src/components/Common/CommonListSelect/index.js +++ b/src/components/Common/CommonListSelect/index.js @@ -351,7 +351,7 @@ class CommonList extends Component { const { userinfo } = app; const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定'); const FriendlyReminder = commonFunc.showLocalMessage(this.props, 'FriendlyReminder', '温馨提示'); - + const onSendSocketMessage = this.props.handleSendSocketMessage; const returnData = await commonBusiness.saveData({ token, value: params, sModelsId }); this.props.onSaveState({ @@ -854,9 +854,10 @@ const CommonListComponent = Form.create({ }, }; const upInvoiceName = commonUtils.isNotEmptyArr(btnUploadApi) ? btnUploadApi[0].showName : '发票上传(金税)'; - + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定'); const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); + const BtnClose = commonFunc.showLocalMessage(props, 'BtnClose', '关闭'); return (
@@ -941,7 +942,7 @@ const CommonListComponent = Form.create({ { props.readOnly ?
- +
:
{ diff --git a/src/components/Common/CommonView/index.js b/src/components/Common/CommonView/index.js index 35597c8..7ef8a65 100644 --- a/src/components/Common/CommonView/index.js +++ b/src/components/Common/CommonView/index.js @@ -431,6 +431,7 @@ export default class CommonView extends Component { app, iColValue, slaveData: this.props.slaveData, + slave0Data: this.props.slave0Data, record: masterData, name: 'master', form: this.props.form, diff --git a/src/components/Common/InstructSetSetting/index.js b/src/components/Common/InstructSetSetting/index.js index da3500b..d8c09c9 100644 --- a/src/components/Common/InstructSetSetting/index.js +++ b/src/components/Common/InstructSetSetting/index.js @@ -12,7 +12,7 @@ const InstructSetSetting = (props = {}) => { const { instructSetSettingVisible } = props; if (!instructSetSettingVisible) return ""; - const { onCancelInstructSetSettingModal, showConfig, dataValue, instructSetSettingId } = props; + const { onCancelInstructSetSettingModal, showConfig, dataValue, instructSetSettingId, slave0Data } = props; const { showName, sName } = showConfig; const instructSet = commonUtils.convertStrToObj(dataValue, {}); @@ -44,6 +44,7 @@ const InstructSetSetting = (props = {}) => { { command: "initData", value: instructSet.change || instructSet.blur || (instructSet ? [instructSet] : []), + slave0Data, }, IFRAMEURL ); diff --git a/src/components/Common/PersonCenter/MenuSearchPopovor.js b/src/components/Common/PersonCenter/MenuSearchPopovor.js index 6934232..89040f5 100644 --- a/src/components/Common/PersonCenter/MenuSearchPopovor.js +++ b/src/components/Common/PersonCenter/MenuSearchPopovor.js @@ -16,14 +16,43 @@ const MenuSearchPopovor = props => { [] ); + const { modelCenter, kpiData } = app; + const popovorRef = useRef(null); - const handleTabClick = useCallback(e => { + const handleTabClick = useCallback(option => { + const { data, type } = option; + if (type === 1) { + const record = data; + const newsId = record.sId; + const newKey = new Date().getTime().toString(); + const route = record.sName; + const title = record.sMenuName; + const pane = { + title, route, formId: newsId, key: newKey, sModelsType: record.sModelType, fromKey: "1", sSrcModelsId: '1', + currentIndex: 0, + }; + onAddPane(pane); + return; + } else if (type === 2) { + const record = data; + const newsId = record.sResultModelId; + const newKey = new Date().getTime().toString(); + const route = record.sResultModelName; + const title = record.sResultModelMenuName; + const pane = { + title, route, formId: newsId, key: newKey, sModelsType: record.sResultModelType, fromKey: "1", + currentIndex: 0, + }; + onAddPane(pane); + return + } + const paneKey = new Date().getTime().toString(); - const formId = e.sId; - const route = e.sName; - const title = e.sMenuName; - const sModelsType = e.sModelType; - const { sProcName } = e; + const formId = data.sId; + const route = data.sName; + const title = data.sMenuName; + const sModelsType = data.sModelType; + const { sProcName } = data; for (const each of app.panes) { /* 解决导航栏打开页签,Modal不消失问题 */ each.notCurrentPane = true; @@ -139,10 +168,33 @@ const MenuSearchPopovor = props => { }); } - return [...commonlyUsedOption, ...options]; + const columnWorkMatters = commonFunc.showMessage(app.commonConst, 'columnWorkMatters'); + const columnContent = commonFunc.showMessage(app.commonConst, 'columnContent'); + const { model = {} } = kpiData || modelCenter || {}; + const modelOptions = [{ label: renderTitle('', columnWorkMatters), options: [] }, { label: renderTitle('', columnContent), options: [] }]; + Object.keys(model).filter((_, index) => index === 0).forEach(key => { + const value = model[key]; + value.forEach(item => { + const { sId, sMenuUnMemo, sResultModelId, sMenuWorkFruit } = item; + modelOptions[0].options.push({ + label: sMenuUnMemo, + value: sId, + data: item, + type: 1 + }); + modelOptions[1].options.push({ + label: sMenuWorkFruit, + value: `${sId},${sResultModelId}`, + data: item, + type: 2 + }); + }); + }); + + return [...commonlyUsedOption, ...options, ...modelOptions]; }, [menuPanel.panelMenus]); - const searchTitle = commonFunc.showMessage(app.commonConst, 'btnSearch') || '搜索122'; + const searchTitle = commonFunc.showMessage(app.commonConst, 'btnSearch') || '搜索'; return (
@@ -157,18 +209,23 @@ const MenuSearchPopovor = props => { }} filterOption={(inputValue, option) => { let result = false; - const { data } = option; + const { data, value } = option; if (commonUtils.isNotEmptyObject(data)) { - const { sMenuName, parentMenu, grandParentMenu } = data; + const { sMenuName, parentMenu = {}, grandParentMenu = {}, sMenuUnMemo, sMenuWorkFruit } = data; const { sMenuName: sMenuName1 } = parentMenu; const { sMenuName: sMenuName2 } = grandParentMenu; + const bMenuWorkFruit = value.includes(','); const result0 = - sMenuName.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1; + sMenuName && sMenuName.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1; const result1 = - sMenuName1.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1; + sMenuName1 && sMenuName1.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1; const result2 = - sMenuName2.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1; - result = result0 || result1 || result2; + sMenuName2 && sMenuName2.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1; + const result3 = + !bMenuWorkFruit && sMenuUnMemo && sMenuUnMemo.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1; + const result4 = + bMenuWorkFruit && sMenuWorkFruit && sMenuWorkFruit.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1; + result = result0 || result1 || result2 || result3 || result4; } return result; }} @@ -176,7 +233,7 @@ const MenuSearchPopovor = props => { // popovorRef.current.animate([{ width: '250px' }, { width: 0 }], { // duration: 2000, iterations: 1 // }); - handleTabClick(option.data); + handleTabClick(option); onSetMenuSearchPopoverVisible(false); }} > diff --git a/src/components/IndexCenter/IndexCenter.js b/src/components/IndexCenter/IndexCenter.js index 975452d..e92b7f5 100644 --- a/src/components/IndexCenter/IndexCenter.js +++ b/src/components/IndexCenter/IndexCenter.js @@ -14,6 +14,11 @@ import styles from './index.less'; import commonConfig from '../../utils/config'; import * as commonServices from '../../services/services'; import file_single from "@/assets/file_single.svg"; +import defaultApp from "@/assets/index/default-app.svg"; +import kaoqin from "@/assets/index/kaoqin.svg"; +import OASys from "@/assets/index/oa.svg"; +import caiwu from "@/assets/index/financialSystem.svg"; +import crm from "@/assets/index/crm.svg"; const { Sider, Content, Footer } = Layout; const { TabPane } = Tabs; @@ -99,7 +104,10 @@ class IndexCenter extends Component { componentWillReceiveProps(nextProps) { const { dispatch } = nextProps; - const { modelCenter, comParameter, dataCode, kpiData, logoImageInfo, userinfo } = nextProps.app; + const { modelCenter, comParameter:comParameterAll = [], dataCode, kpiData, logoImageInfo, userinfo, token } = nextProps.app; + console.log('1-comParameterAll', comParameterAll); + const comParameter = comParameterAll.filter(item => item.sDisplayType ? item.sDisplayType !== 'LargeScreen' : !item.sFormUrl?.includes('http')); + const commonThirdApp = comParameterAll.filter(item => item.sDisplayType ? item.sDisplayType === 'LargeScreen' : item.sFormUrl?.includes('http')); const { modelCenter: modelCenterOld } = this.props; const { sUserNo } = userinfo; @@ -130,6 +138,39 @@ class IndexCenter extends Component {
); }); + const getIconSrc = (formName) => { + if (formName.includes('考勤')) return kaoqin; + if (formName.includes('财务')) return caiwu; + if (formName.includes('CRM')) return crm; + if (formName.includes('OA')) return OASys; + return defaultApp; + }; + const comThirdAppList = []; + commonThirdApp.forEach((child) => { + const dataUrl = child.sTitleLogoPath ? `${commonConfig.file_host}file/download?savePathStr=${child.sTitleLogoPath}&sModelsId=100&token=${token}` : ''; + comThirdAppList.push( + +
+ {child.sTitleLogoPath ? ( + + ) : ( + + )} +
+ {child.sFormName} +
+ this.handleDelCommonMenu(e, child)} /> +
+
+ ); + }); const columnNo = commonFunc.showMessage(nextProps.app.commonConst, 'columnNo');/* 编号 */ let sChildFlow = commonFunc.showMessage(nextProps.app.commonConst, 'sChildFlow');/* 子流程 */ const sNotShowChildFlow = commonFunc.showMessage(nextProps.app.commonConst, 'sNotShowChildFlow');/* 是否显示子流程 */ @@ -390,7 +431,7 @@ class IndexCenter extends Component { tabsPanes, tableTreeData, ...addState }); } - this.setState({ comParameterList, dToDayNumSum, dTobeDoneSum, logoImageInfo }); + this.setState({ comParameterList, comThirdAppList, dToDayNumSum, dTobeDoneSum, logoImageInfo }); } componentDidMount() { if (this.kpiTable && this.kpiTable.querySelector('.ant-table-body')) { @@ -682,7 +723,7 @@ class IndexCenter extends Component { }; render() { const { - comParameterList, dToDayNumSum, dTobeDoneSum, tabsPanes, loadings, tableTreeData, columns, tableData, logoImageInfo = [], + comParameterList, comThirdAppList, dToDayNumSum, dTobeDoneSum, tabsPanes, loadings, tableTreeData, columns, tableData, logoImageInfo = [], } = this.state; const { app } = this.props; const KPIMonitor = commonFunc.showMessage(app.commonConst, 'KPIMonitor');/* KPI监控 */ @@ -693,6 +734,7 @@ class IndexCenter extends Component { const TodayAffair = commonFunc.showMessage(app.commonConst, 'TodayAffair');/* 今日事务: */ const unclearedTotal = commonFunc.showMessage(app.commonConst, 'unclearedTotal');/* 未清总数: */ const CommonOperation = commonFunc.showMessage(app.commonConst, 'CommonOperation');/* 常用操作 */ + const CommonThirdAppTitle = commonFunc.showMessage(app.commonConst, 'thirdAppList') || '第三方应用列表';/* 第三方应用 */ const Copyright = commonFunc.showMessage(app.commonConst, 'Copyright');/* Copyright */ const AddrOne = commonFunc.showMessage(app.commonConst, 'AddrOne');/* 小羚羊软件 */ const AddrTwo = commonFunc.showMessage(app.commonConst, 'AddrTwo');/* 印刷智慧工厂 */ @@ -851,7 +893,7 @@ class IndexCenter extends Component { - + + + + {comThirdAppList} + +