Commit 072ee41e authored by 涂伟's avatar 涂伟
parents 283bf7be 727ab1b2
Pipeline #93810 passed with stages
import React, { useState, useEffect, useRef, forwardRef, useImperativeHandle } from 'react';
import { Space, Button, Divider, Table, Tooltip, message } from 'antd';
import { Space, Button, Divider, Table, Tooltip, message, Switch } from 'antd';
import { DeleteOutlined, EditTwoTone, PlusOutlined } from '@ant-design/icons';
import debounce from 'lodash/debounce';
import RoalChoose from './RoalChoose';
......@@ -13,11 +13,13 @@ const ConfgUndertake = (props, ref) => {
const [chooseUser, setChooseUser] = useState(); // 当前编辑角色或者机构的默认承办人
const [showUnderTaker, setShowUnderTaker] = useState(false); // 是否显示选择默认承办人弹窗
const [roleList, setRoleList] = useState([]);
const [IsDynamicDefaultUser, setIsDynamicDefaultUser] = useState(0)
const delayedNodeChange = useRef(debounce(list => nodeChage('roleList', list), 500)).current;
useImperativeHandle(ref, () => ({
getParmar,
}));
useEffect(() => {
setIsDynamicDefaultUser(editMsg.IsDynamicDefaultUser || 0)
setRoleList(editMsg.roleList);
}, [editMsg]);
const getParmar = () => ({ roleList });
......@@ -55,6 +57,11 @@ const ConfgUndertake = (props, ref) => {
nodeChage('roleList', list);
setShowUnderTaker(false);
};
const onChangeDefaultUser = e => {
setIsDynamicDefaultUser(e ? 1 : 0)
nodeChage('IsDynamicDefaultUser', e ? 1 : 0);
};
// 定义表格
const columns = [
{
......@@ -192,6 +199,17 @@ const ConfgUndertake = (props, ref) => {
})}
pagination={false}
/>
<div style={{ display: 'flex', justifyContent: 'right', marginTop: 14, marginBottom: '12px' }}>
是否动态承办人
<Switch
style={{ marginLeft: '5px' }}
checked={IsDynamicDefaultUser !== 0}
onChange={onChangeDefaultUser}
/>
</div>
<div className={styles.titleBox} style={{ color: '#BCBCBC', fontSize: 14, paddingLeft: 20 }}>
开启动态承办人后当前角色里所有人都是承办人
</div>
<RoalChoose
roleList={roleList}
visible={showRoal}
......
.apkUpload{
:global{
.newVer-row{
background-color: #e6f7ff; /* 淡蓝色背景 */
font-weight: bold; /* 粗体字体 */
color: #1890ff; /* Ant Design主色 */
}
}
}
......@@ -124,3 +124,5 @@ export const upgradeCardVersion = parmas => post(`${PUBLISH_SERVICE}/WebSite/App
export const postAppVersionInfo = parmas => post(`${PUBLISH_SERVICE}/Mobile/PostAppVersionInfo`, parmas);
export const getAppUploadRecords = parmas => get(`${PUBLISH_SERVICE}/Mobile/GetAppUploadRecords`, parmas);
export const getApkVerionInfo = parmas => get(`${PUBLISH_SERVICE}/FileCenter/GetApkVerionInfo`, parmas);
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