diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js
index e73c7cd..44cdfe7 100644
--- a/src/components/Common/CommonTable/index.js
+++ b/src/components/Common/CommonTable/index.js
@@ -2951,6 +2951,7 @@ class CommonTableRc extends React.Component {
const bShowTreeDel = props.tableProps.bShowTreeDel && this.findIsExistByControlName(props, 'BtnDel'); /* 添加树节点 */
const bShowTreeCopyAll = props.tableProps.bShowTreeCopyAll && this.findIsExistByControlName(props, 'BtnCopyAll'); /* 添加树节点 */
const exitIcon = props.tableProps.setExit; /* 退出操作 */
+ const clearIcon = props.tableProps.setClear; /* 清空操作 */
let bShowProductProcess = false;/* 选择成品工序 */
if (commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.tableProps) && props.tableProps.bShowProductProcess !== undefined) {
bShowProductProcess = props.tableProps.bShowProductProcess;/* 选择成品工序 */
@@ -3037,6 +3038,9 @@ class CommonTableRc extends React.Component {
if (exitIcon) {
operateWidth += 60;
}
+ if (clearIcon) {
+ operateWidth += 60;
+ }
if (headPopup) {
operateWidth += 20;
}
@@ -3092,6 +3096,7 @@ class CommonTableRc extends React.Component {
let operateTreeCopyAll = null;
let operateTreeAddChild = null;
let operateExit = null;
+ let operateClear = null;
let operatesAlumitePopup = null;
const setAdd = commonFunc.showMessage(props.app.commonConst, 'setAdd');/* 新增s */
const setCopy = commonFunc.showMessage(props.app.commonConst, 'setCopy');/* 复制 */
@@ -3257,6 +3262,10 @@ class CommonTableRc extends React.Component {
const setExit = '退出';
operateExit = {};
}
+ if (clearIcon) {
+ const setExit = '清空';
+ operateClear = {};
+ }
if (sAlumitePopup) {
const setAlumitePopup = '电化铝';
const enabled = this.getTableBtnState('BtnPopupsAlumiteBomBillNo', record);
@@ -3269,6 +3278,7 @@ class CommonTableRc extends React.Component {
}}
className="operate-bar"
>{operateTreeAdd}{operateTreeAddChild}{operateTreeCopyAll}{operateTreeDel}{operateAdd}{operatesAlumitePopup}{operatePopupModal}{operateCopy}{operateCopyAll}{operateReplace}{operateCopyMore}{operateMaterial}{operateProductMaterials}{operateMaterailRemark}{operateDel}{operateProcess}{operateParamModal}{operateDownload}{operateProductProcess}{operateExit}
+ {operateClear}
);
},
title: () => (this.props.setOpterationColumn === 'Y' && this.getTableFilterData() === 0 ? {
this.props.onExitTbRow(index, record);
}
+ clearTbRow = (index, record) => {
+ this.props.onClearTbRow(index, record);
+ }
handleViewClick = (name, sName, record, index, showConfig, configName) => {
// console.log('vvvs', showConfig);
if (commonUtils.isNotEmptyObject(showConfig) && commonUtils.isNotEmptyObject(record)) {
diff --git a/src/components/Common/PersonCenter/PersonCenter.js b/src/components/Common/PersonCenter/PersonCenter.js
index 7f01ce4..05f6b9d 100644
--- a/src/components/Common/PersonCenter/PersonCenter.js
+++ b/src/components/Common/PersonCenter/PersonCenter.js
@@ -375,6 +375,20 @@ class PersonCenter extends Component {
});
}
+ // 情空用户
+ handleClearTbRow = async (index, record) => {
+ const { app } = this.props;
+ const { userinfo, token } = app;
+ const { sUserId, sUserLoginType } = record;
+ const configUrl = `${config.server_host}license/doClean/${sUserId}`;
+ const configReturn = (await commonServices.getService(token, configUrl)).data;
+ if (configReturn.code === 1) {
+ message.success(`用户【${record.sUserName}】已清空`);
+ } else {
+ message.error(`用户【${record.sUserName}】强制清空失败`);
+ }
+ }
+
handleCancel = () => {
this.setState({
userVisible: false,
@@ -724,6 +738,7 @@ class PersonCenter extends Component {
handleCancel={this.handleCancel}
onSaveState={this.handleSaveOnlineUserState}
onExitTbRow={this.handleExitTbRow}
+ onClearTbRow={this.handleClearTbRow}
/>
{state.skinChangeModalVisible &&
{ },
onExitTbRow,
+ onClearTbRow,
getDateFormat: () => 'YYYY-MM-DD hh:mm:ss',
...onlineUserState
};