Commit 76bca1af authored by 涂伟's avatar 涂伟

fix: '事件类型编辑配置交互优化'

parent 77e7be0b
Pipeline #67849 passed with stages
......@@ -64,7 +64,8 @@ import PreviewModal from './PreviewModal';
import EditTypeModal from './EditTypeModal';
import eventImg from '@/assets/images/workOptions/事件.png';
import caseImg from '@/assets/images/workOptions/工单.png';
// import caseImg from '@/assets/images/workOptions/工单发起选中.png';
import caseChooseImg from '@/assets/images/workOptions/工单发起选中.png';
import eventChooseImg from '@/assets/images/workOptions/事件选中.png';
const { Option } = Select;
const AddModal = props => {
......@@ -524,7 +525,7 @@ const AddModal = props => {
if (obj.CreateMode === 0 || 1) {
obj.CreateMode = obj.CreateMode.toString();
}
obj.CreateMode = value
obj.CreateMode = value;
if (editable != true) {
obj.Editable = false;
} else {
......@@ -547,7 +548,7 @@ const AddModal = props => {
obj.ReportFromMobile = '';
obj.ReportFromWeb = '';
}
if (visibleChecked === false) {
if (visibleChecked) {
obj.Reportable = true;
} else {
obj.Reportable = false;
......@@ -658,9 +659,9 @@ const AddModal = props => {
setReportFromMobile(res.data.root.ReportFromMobile);
setReportFromWeb(res.data.root.ReportFromWeb);
if (res.data.root.Reportable === false) {
setVisibleChecked(true);
} else {
setVisibleChecked(false);
} else {
setVisibleChecked(true);
}
setType1(res.data.root.BusinessType);
setOrder(res.data.root.Order);
......@@ -1141,7 +1142,7 @@ const AddModal = props => {
if (res.data.length && res.data.length === 1) {
setEventFlowId(res.data[0].ID);
} else {
setEventFlowId(0)
setEventFlowId(0);
setFlowTableData(res.data);
setEditTypeModal(true);
}
......@@ -1222,7 +1223,7 @@ const AddModal = props => {
const chooseFlowOk = prop => {
setEventFlowId(prop);
setEditTypeModal(false)
setEditTypeModal(false);
};
const pickFiled = fileds => {
......@@ -1444,21 +1445,25 @@ const AddModal = props => {
style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}
className={styles.eventType}
>
<img
onClick={() => onChange2(1)}
style={{
flex: 1,
marginRight: '5px',
transform: value === 1 ? 'scale(1.1)' : 'scale(1)',
}}
src={caseImg}
alt=""
/>
<Tooltip title="选择仅上报时,事件权限必填">
<Tooltip title="直接发起工单,上报权限使用工作流首节点字段配置和权限">
<img
onClick={() => onChange2(1)}
style={{
width: '100%',
flex: 1,
marginRight: '5px',
transform: value === 1 ? 'scale(1.1)' : 'scale(1)',
imageRendering: '-webkit-optimize-contrast'
}}
src={value === 1 ? caseChooseImg : caseImg}
alt=""
/>
</Tooltip>
<Tooltip title="事件填报后仅上报,进入调度箱进行办理,事件上报权限单独管理">
<img
onClick={() => onChange2(0)}
style={{ flex: 1, transform: value === 0 ? 'scale(1.1)' : 'scale(1)' }}
src={eventImg}
style={{ flex: 1, transform: value === 0 ? 'scale(1.1)' : 'scale(1)', width: '100%', imageRendering: '-webkit-optimize-contrast' }}
src={value === 0 ? eventChooseImg : eventImg}
alt=""
/>
</Tooltip>
......@@ -1941,7 +1946,11 @@ const AddModal = props => {
name="Reportable"
label={
<div style={{ display: 'flex', alignItems: 'center' }}>
<Tooltip title="开启内置使用后,仅用于内部功能调用,工单系统中无法使用;关闭内置使用后,可通过勾选 前端/手持,来控制是否展示事件的填报入口,勾选即展示。">
<Tooltip
title = {<div>标准使用,使用标准工单系统,可通过勾选 前端/手持,来控制是否展示事件的填报入口,勾选及展示;<br/>内置使用,使用第三方完整功能,仅调用接口、表结构和流程,工单系统中无法使用</div>}
// title="标准使用,使用标准工单系统,可通过勾选 前端/手持,来控制是否展示事件的填报入口,勾选及展示;
// 内置使用,使用第三方完整功能,仅调用接口、表结构和流程,工单系统中无法使用。"
>
<InfoCircleOutlined
style={{
color: '#1890ff',
......@@ -1955,10 +1964,10 @@ const AddModal = props => {
labelCol={{ span: 5 }}
>
<div style={{ display: 'flex' }}>
<span style={{ marginRight: '5px' }}>内置使用</span>
{/* <span style={{ marginRight: '5px' }}>内置使用</span> */}
<Switch
checkedChildren=""
unCheckedChildren=""
checkedChildren="标准用法"
unCheckedChildren="内置用法"
checked={visibleChecked}
onChange={change}
/>
......@@ -1969,8 +1978,8 @@ const AddModal = props => {
<Item name="ReportFromWeb">
<Checkbox
onChange={onChange3}
checked={ReportFromWeb && !visibleChecked}
disabled={visibleChecked}
checked={ReportFromWeb && visibleChecked}
disabled={!visibleChecked}
>
前端
</Checkbox>
......@@ -1980,8 +1989,8 @@ const AddModal = props => {
<Item name="ReportFromMobile">
<Checkbox
onChange={onChange4}
checked={ReportFromMobile && !visibleChecked}
disabled={visibleChecked}
checked={ReportFromMobile && visibleChecked}
disabled={!visibleChecked}
>
手持
</Checkbox>
......@@ -1989,10 +1998,20 @@ const AddModal = props => {
</div>
{value === 0 ? (
<Col span={24}>
<Item label="事件权限" name="Roles" labelCol={{ span: 5 }}>
<Item
label="上报权限"
name="Roles"
labelCol={{ span: 5 }}
rules={[
{
required: true,
message: '请选择上报权限',
},
]}
>
<div style={{ display: 'flex' }}>
<Form.Item name="Roles" style={{ marginBottom: 0, width: '100%' }}>
<Input placeholder="请选择事件权限" allowClear />
<Input placeholder="请选择上报权限" allowClear />
</Form.Item>
<Button
type="dashed"
......@@ -2121,7 +2140,7 @@ const AddModal = props => {
tableData={flowTableData}
onCancel={() => {
setEditTypeModal(false);
setValue(0)
setValue(0);
}}
callBackSubmit={chooseFlowOk}
/>
......
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