提交 469894ac authored 作者: 姚鑫国's avatar 姚鑫国

修改冲突

......@@ -51,7 +51,6 @@ const GJLZJXJApply = (WrappedComponent) =>
};
componentDidMount() {
console.log(this.instanceComponent);
this.diyFunction();
}
......
......@@ -85,7 +85,6 @@ const KNXSJTQKSQ = (WrappedComponent) =>
};
componentDidMount() {
console.log(this.instanceComponent);
this.diyFunction();
}
......
......@@ -51,7 +51,6 @@ const KNXSRDApply = (WrappedComponent) =>
};
componentDidMount() {
console.log(this.instanceComponent);
this.diyFunction();
}
......
......@@ -248,6 +248,7 @@ export default class List extends Component {
noSelectRow: !listConfig.selectRows,
onSelectRow: this.handleSelectRows,
scroll: { x: window.location.href.includes('Portal/#/') ? 'max-content' : true },
selectType: 'radio',
};
// console.log(tableProps);
if (!listConfig.paging) {
......
import { getIsBei_Dian } from '@/webPublic/zyd_public/utils/getSchoolType';
import { message, Modal } from 'antd';
import { uaaRequest } from '@/webPublic/one_stop_public/utils/request';
export default function rebackButton(serviceInfo){
let reBack = [];
if (getIsBei_Dian() && serviceInfo?.isCanRecall) { // 撤销按钮
reBack.push({
type: 'chehui',
name: '撤回',
buttonType: 'danger',
component: 'Normal',
handleClick: (selectRows, formValues, getPage, search, columns) => {
if (!selectRows || !selectRows.length || selectRows.length !== 1) {
message.warning('请选择一条需要撤回的数据!');
return false;
}
if (!selectRows[0].isBack) {
message.warning('当前流程无法撤回,请选择其他数据');
return false;
}
Modal.confirm({
title: '撤回',
content: '确定撤回吗?',
okText: '确认',
cancelText: '取消',
onOk: () => {
return uaaRequest('/UnifiedAppFormApi/regressionProcess', {
taskIds: [selectRows[0].taskId],
})
.then((res) => {
if (res) {
Modal.info({
title: '提示',
content: '撤回成功, 点击详情可再次编辑并提交申请',
});
getPage();
} else {
message.info('操作失败');
return false;
}
});
},
});
},
});
}
return reBack;
}
......@@ -31,6 +31,7 @@ export default class ButtonListDom extends Component {
<ButtonDiy
name={item.name}
key={item.type}
type={item.buttonType}
className={item.className || 'defaultBule'}
handleClick={() => {
item.handleClick(selectRows, formValues, getPage, search, columns);
......
......@@ -144,6 +144,19 @@ const getFormDetail = (id) => {
});
};
/**
*
* */
const getServiceDetail = (id) => {
return apiRequest('/UnifiedServiceApi/getDetail', { id }).then((x) => {
if (x) {
return x;
} else {
return {};
}
});
};
/**
* 发起流程
* */
......@@ -248,6 +261,7 @@ export {
getColumns,
getPages,
getFormDetail,
getServiceDetail,
getOptions,
getBatchOptions,
startProcess,
......
......@@ -61,7 +61,9 @@ export default function SelectPerson(props) {
// 第二栏树形数据
const getTreeList = () => {
requestData({}, apis.findTree)
requestData({
...propsDiy.apiParams,
}, apis.findTree)
.then(res => {
if (res) {
res = formatTreeData(res);
......@@ -83,6 +85,7 @@ export default function SelectPerson(props) {
{
keyword: searchKey,
isExact: jqpp,
...propsDiy.apiParams,
},
apis.search,
)
......@@ -111,6 +114,7 @@ export default function SelectPerson(props) {
{
businessKey: bKey,
selectType,
...propsDiy.apiParams,
},
apis.findList,
)
......@@ -151,8 +155,8 @@ export default function SelectPerson(props) {
const auth = () => {
const data = {
businessKey: [...sgUserIds, ...checkedList.map(g => g.businessKey)],
...propsDiy.apiParams,
};
if (!data.businessKey.length) {
message.warning(propsDiy.getResultProps.emptySelectMessage);
return false;
......
export default function lowCodeProps(info) {
return {
searchType: 'instructorSearch', // teacherSearch || studentSearch || instructorSearch
apiParams: { // 30357 北电]辅导员考核-考核批次设置,辅导员筛选那50个辅导员
isCounselor: true,
},
ModalProps: {
// 弹窗的属性
title: '选择辅导员',
......
......@@ -36,6 +36,9 @@ const encryptApiList = [
{
api: 'UnifiedAppFormApi/getFormDetail',
},
{
api: 'UnifiedAppFormApi/getWaitPage',
},
{
api: 'UnifiedWebPatternApi/save',
},
......@@ -147,6 +150,9 @@ const resBinaryApiList = [
{
api: 'UnifiedAppApi/getDetail',
},
{
api: 'DataColumnApi/getHeaderList',
},
{
api: 'UnifiedServiceApi/getDetail',
},
......
import React from 'react';
import {Upload, message} from 'antd';
import { Upload, message, Badge, Icon } from 'antd';
import config from '@/webPublic/one_stop_public/config';
import {zipImage} from "@/webPublic/zyd_public/utils/handlePhoto";
import { zipImage } from '@/webPublic/zyd_public/utils/handlePhoto';
import { getToken } from '@/webPublic/one_stop_public/utils/token';
import { queryFileUrl } from '@/webPublic/one_stop_public/utils/queryConfig';
......@@ -14,7 +14,7 @@ export default class ImgUploadCom extends React.Component {
};
}
triggerChange = changedValue => {
triggerChange = (changedValue) => {
// Should provide an event to pass value to Form.
const onChange = this.props.onChange;
if (onChange) {
......@@ -26,7 +26,7 @@ export default class ImgUploadCom extends React.Component {
// Should be a controlled component.
if ('value' in nextProps) {
const value = nextProps.value;
this.setState({url: value});
this.setState({ url: value });
}
}
......@@ -35,23 +35,34 @@ export default class ImgUploadCom extends React.Component {
message.success(`图片上传成功`);
if (!('value' in this.props)) {
this.setState({url: info.file.response});
this.setState({ url: info.file.response });
}
this.triggerChange(info.file.response);
} else if (info.file.status === 'error') {
message.error(`图片上传失败`);
}
};
changePos = obj => {
changePos = (obj) => {
if (!('value' in this.props)) {
this.setState({...obj});
this.setState({ ...obj });
}
this.triggerChange({...obj});
this.triggerChange({ ...obj });
};
removePicture = (e) => {
if (e && e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
this.triggerChange('');
};
render() {
const {json, disabled} = this.props;
const {url} = this.state;
const {
json,
disabled
} = this.props;
const { url } = this.state;
return (
<Upload.Dragger
disabled={disabled}
......@@ -64,25 +75,37 @@ export default class ImgUploadCom extends React.Component {
token: getToken(),
}}
beforeUpload={(file) => {
return zipImage(file, 4);
// 图片压缩函数. 超过fileSizeLimitMb兆的图片 直接压缩成原来的 30% 如果后续有其他需求考虑 做成全局配置项 配置可以压缩的图片的范围
// 禅道bug 23185
return zipImage(file, 4);
// 图片压缩函数. 超过fileSizeLimitMb兆的图片 直接压缩成原来的 30% 如果后续有其他需求考虑 做成全局配置项 配置可以压缩的图片的范围
// 禅道bug 23185
}}
showUploadList={false}
name="file"
action={config.uploadUrl}
onChange={this.changeUrl}
multiple={false}
style={{padding: 0}}
>
style={{ padding: 0 }}>
{url ? (
<img src={queryFileUrl(url)} style={{
height: json.height,
width: json.width,
maxWidth: '60vw', // 解决图片在移动端过宽的bug
}}/>
<Badge count={<Icon type="close-circle"
style={{ color: 'red' }}
onClick={this.removePicture}
/>}>
<img
src={queryFileUrl(url)}
style={{
height: json.height,
width: json.width,
maxWidth: '60vw', // 解决图片在移动端过宽的bug
}}
/>
</Badge>
) : (
<div style={{height: json.height, width: json.width}}/>
<div
style={{
height: json.height,
width: json.width,
}}
/>
)}
</Upload.Dragger>
);
......
......@@ -348,23 +348,29 @@ class TreeList extends React.Component {
payload: { objCode: this.props.objCode },
callback: (dataObj) => {
this.setState({ objId: dataObj.id, isTable: data.isTable }, () => {
dispatch({
type: 'DataRight/getUserRight',
payload: { objId: this.state.objId },
callback: (data) => {
if (!this.props.rights) {
this.setState({ rights: data });
}
dispatch({
type: 'DataRight/getUserColumnRight',
payload: { objId: this.state.objId },
callback: (data) => {
this.setState({ columnRights: data });
this.initColumn();
},
});
},
});
/**
* 2022年10月27日
* 欢哥说这个权限功能没用了 在一站式后台元数据管理-数据授权里面修改 实际已经废弃了
* 问了姚新国也说没用了. 有问题就还原回来
* */
this.initColumn();
// dispatch({
// type: 'DataRight/getUserRight',
// payload: { objId: this.state.objId },
// callback: (data) => {
// if (!this.props.rights) {
// this.setState({ rights: data });
// }
// dispatch({
// type: 'DataRight/getUserColumnRight',
// payload: { objId: this.state.objId },
// callback: (data) => {
// this.setState({ columnRights: data });
// this.initColumn();
// },
// });
// },
// });
});
},
});
......@@ -377,23 +383,29 @@ class TreeList extends React.Component {
this.setState({ isTable: data.isTable });
},
});
dispatch({
type: 'DataRight/getUserRight',
payload: { objId: this.state.objId },
callback: (data) => {
if (!this.props.rights) {
this.setState({ rights: data });
}
dispatch({
type: 'DataRight/getUserColumnRight',
payload: { objId: this.state.objId },
callback: (data) => {
this.setState({ columnRights: data });
this.initColumn();
},
});
},
});
/**
* 2022年10月27日
* 欢哥说这个权限功能没用了 在一站式后台元数据管理-数据授权里面修改 实际已经废弃了
* 问了姚新国也说没用了. 有问题就还原回来
* */
this.initColumn();
// dispatch({
// type: 'DataRight/getUserRight',
// payload: { objId: this.state.objId },
// callback: (data) => {
// if (!this.props.rights) {
// this.setState({ rights: data });
// }
// dispatch({
// type: 'DataRight/getUserColumnRight',
// payload: { objId: this.state.objId },
// callback: (data) => {
// this.setState({ columnRights: data });
// this.initColumn();
// },
// });
// },
// });
}
}
......
......@@ -303,23 +303,29 @@ class FormList extends React.Component {
isTable: dataObj.isTable,
},
() => {
dispatch({
type: 'DataRight/getUserRight',
payload: { objId: this.state.objId },
callback: (data) => {
if (!this.props.rights) {
this.setState({ rights: data });
}
dispatch({
type: 'DataRight/getUserColumnRight',
payload: { objId: this.state.objId },
callback: (data) => {
this.setState({ columnRights: data });
this.initColumn();
},
});
},
});
this.initColumn();
/**
* 2022年10月27日
* 欢哥说这个权限功能没用了 在一站式后台元数据管理-数据授权里面修改 实际已经废弃了
* 问了姚新国也说没用了. 有问题就还原回来
* */
// dispatch({
// type: 'DataRight/getUserRight',
// payload: { objId: this.state.objId },
// callback: (data) => {
// if (!this.props.rights) {
// this.setState({ rights: data });
// }
// dispatch({
// type: 'DataRight/getUserColumnRight',
// payload: { objId: this.state.objId },
// callback: (data) => {
// this.setState({ columnRights: data });
// this.initColumn();
// },
// });
// },
// });
},
);
},
......@@ -333,23 +339,29 @@ class FormList extends React.Component {
this.setState({ isTable: data.isTable });
},
});
dispatch({
type: 'DataRight/getUserRight',
payload: { objId: this.state.objId },
callback: (data) => {
if (!this.props.rights) {
this.setState({ rights: data });
}
dispatch({
type: 'DataRight/getUserColumnRight',
payload: { objId: this.state.objId },
callback: (data) => {
this.setState({ columnRights: data });
this.initColumn();
},
});
},
});
/**
* 2022年10月27日
* 欢哥说这个权限功能没用了
* 问了姚新国也说没用了
* */
this.initColumn();
// dispatch({
// type: 'DataRight/getUserRight',
// payload: { objId: this.state.objId },
// callback: (data) => {
// if (!this.props.rights) {
// this.setState({ rights: data });
// }
// dispatch({
// type: 'DataRight/getUserColumnRight',
// payload: { objId: this.state.objId },
// callback: (data) => {
// this.setState({ columnRights: data });
// this.initColumn();
// },
// });
// },
// });
}
}
......@@ -617,7 +629,7 @@ class FormList extends React.Component {
getPage = (params, values, callPage, pageNo) => {
const { objCode } = this.props;
if (this.columns == null || this.columns.length == 0) {
if (this.columns == null || this.columns.length === 0) {
return;
}
const { dispatch } = this.props;
......@@ -1444,7 +1456,8 @@ class FormList extends React.Component {
onSelectRow={this.handleSelectRows}
onChange={this.handleStandardTableChange}
loading={loading}
/>
getCheckboxProps={this.props.getCheckboxProps || undefined}
/>
)}
</div>
) : (
......
import React, { } from 'react';
import React from 'react';
import { Button } from 'antd';
import { getModal } from '@/webPublic/one_stop_public/utils/utils';
import styles from './style.less'
const Modal = getModal();
export default class FormModal extends React.Component {
render() {
const showFullScreen = () => {
let dom = document.getElementById('smartFormModal');
dom.requestFullscreen();
console.log(dom);
};
return (
<Modal
bodyStyle={{
maxHeight: '80vh',
overflowY: 'auto',
}}
{...this.props}
bodyStyle={{
maxHeight: '80vh',
overflowY: 'auto',
}}
{...this.props}
destroyOnClose
title={this.props.title}
maskClosable={false}
......@@ -19,7 +27,14 @@ export default class FormModal extends React.Component {
visible={this.props.visible}
footer={null}
onCancel={this.props.handleCancel}>
{this.props.children}
{this.props.showFullScreen && (
<Button type={'primary'} onClick={showFullScreen}>
全屏查看
</Button>
)}
<div id={'smartFormModal'} className={styles.fullScreen}>
{this.props.children}
</div>
</Modal>
);
}
......
......@@ -2579,12 +2579,13 @@ ${obj[dataColumn.base52]}
src={filePath}
style={{
marginLeft: 5,
minHeight: get === 'mobile' ? '200px' : 'auto',
width:
get === 'mobile'
? document.documentElement.clientWidth - 10 ||
document.body.clientWidth - 10
? 'auto'
: json.width,
height: get === 'mobile' ? '' : json.height,
}}
/>
);
......
.fullScreen {
&:-webkit-full-screen {
width: 100%;
height: 100%;
padding: 100px;
background-color: #fff;
}
//&:div[data-page-formkey]{
// overflow: hidden;
//}
}
:global {
// table{
// border-collapse:collapse;
// }
#web_table .ant-form-item {
margin-bottom: 2.5px;
margin-top: 2.5px;
......@@ -264,6 +279,9 @@
.mobileList {
:global {
.am-list-content {
white-space: pre-wrap !important; // 禅道30442
}
.am-list-item .am-list-line .am-list-extra {
white-space: normal;
......@@ -290,7 +308,8 @@
min-height: 50px;
}
}
.bigTitle{
.bigTitle {
text-align: center;
font-size: 18px;
margin-bottom: 20px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论