Pārlūkot izejas kodu

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage

wjx 3 nedēļas atpakaļ
vecāks
revīzija
eaae804c9c

+ 1 - 1
src/pages/launchSystemV3/monitorEWList/astraGroup.tsx

@@ -35,7 +35,7 @@ const AstraGroup: React.FC<{ localCorpCsgroupList: { label: string, value: strin
                 filterOption={(input, option) =>
                 filterOption={(input, option) =>
                     ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                     ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                 }
                 }
-                style={{ width: 140 }}
+                style={{ width: 200 }}
                 allowClear
                 allowClear
                 value={queryParamsNew?.localCsgroupId}
                 value={queryParamsNew?.localCsgroupId}
                 onChange={(e) => {
                 onChange={(e) => {

+ 1 - 1
src/pages/launchSystemV3/monitorEWList/astraSupport‌.tsx

@@ -71,7 +71,7 @@ const AstraSupport: React.FC<{ localCorpCsgroupList: { label: string, value: str
                 filterOption={(input, option) =>
                 filterOption={(input, option) =>
                     ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                     ((option?.label ?? '') as any).toLowerCase().includes(input.toLowerCase())
                 }
                 }
-                style={{ width: 140 }}
+                style={{ width: 200 }}
                 allowClear
                 allowClear
                 value={queryParams?.localCsgroupId}
                 value={queryParams?.localCsgroupId}
                 onChange={(e) => {
                 onChange={(e) => {

+ 46 - 7
src/pages/launchSystemV3/tencenTasset/corpWechat/userRotatePolicy/addUserPotatePolicy.tsx

@@ -11,6 +11,14 @@ interface AddUserRotatePolicyProps {
     onChange?: () => void;
     onChange?: () => void;
 }
 }
 
 
+const validateRollingTime = (value: number) => {
+    if (value === 0) return true;
+    return value >= 10 || '必须≥10或等于0';
+};
+
+const validateRollingTime1 = (value: number) => {
+    return value >= 10 ? value % 5 === 0 || '必须是5的倍数' : '必须≥10';
+};
 const AddUserRotatePolicy: React.FC<AddUserRotatePolicyProps> = ({ value, visible, onClose, onChange }) => {
 const AddUserRotatePolicy: React.FC<AddUserRotatePolicyProps> = ({ value, visible, onClose, onChange }) => {
 
 
     /**************************************/
     /**************************************/
@@ -61,7 +69,7 @@ const AddUserRotatePolicy: React.FC<AddUserRotatePolicyProps> = ({ value, visibl
             <Form.Item label={<strong>策略名称</strong>} name="policyName" rules={[{ required: true, message: '请输入策略名称!' }]}>
             <Form.Item label={<strong>策略名称</strong>} name="policyName" rules={[{ required: true, message: '请输入策略名称!' }]}>
                 <Input placeholder='请输入策略名称' />
                 <Input placeholder='请输入策略名称' />
             </Form.Item>
             </Form.Item>
-            <Form.Item
+            {/* <Form.Item
                 label={<strong>{`加粉成本的计算周期(/分钟,必须 >= 20,且必须是 10 的整数倍数)`}</strong>}
                 label={<strong>{`加粉成本的计算周期(/分钟,必须 >= 20,且必须是 10 的整数倍数)`}</strong>}
                 name="addCostCalculationCycle"
                 name="addCostCalculationCycle"
                 rules={[{
                 rules={[{
@@ -82,6 +90,34 @@ const AddUserRotatePolicy: React.FC<AddUserRotatePolicyProps> = ({ value, visibl
                 name="noFansCostValue"
                 name="noFansCostValue"
             >
             >
                 <InputNumber style={{ width: '100%' }} placeholder='请输入有消耗无加粉异常' />
                 <InputNumber style={{ width: '100%' }} placeholder='请输入有消耗无加粉异常' />
+            </Form.Item> */}
+            <Form.Item
+                label={<strong>{`距今添加时间告警时长  (单位:/分,必须 >= 10,且是5的倍数)`}</strong>}
+                name="lastAddWarnTime"
+                rules={[
+                    {
+                        validator: (_, value) =>
+                            validateRollingTime1(value) === true
+                                ? Promise.resolve()
+                                : Promise.reject(validateRollingTime1(value))
+                    }
+                ]}
+            >
+                <InputNumber style={{ width: '100%' }} placeholder='请输入距今添加时间告警时长' />
+            </Form.Item>
+            <Form.Item
+                label={<strong>{`距今添加时间下线时长  (单位:/分, 必须 >= 10,且是5的倍数)`}</strong>}
+                name="lastAddOfflineTime"
+                rules={[
+                    {
+                        validator: (_, value) =>
+                            validateRollingTime1(value) === true
+                                ? Promise.resolve()
+                                : Promise.reject(validateRollingTime1(value))
+                    }
+                ]}
+            >
+                <InputNumber style={{ width: '100%' }} placeholder='请输入距今添加时间下线时长' />
             </Form.Item>
             </Form.Item>
             <Form.Item
             <Form.Item
                 label={<strong>单号单日最小加粉数量,默认20,加粉数少于该值永远不触发风控</strong>}
                 label={<strong>单号单日最小加粉数量,默认20,加粉数少于该值永远不触发风控</strong>}
@@ -102,13 +138,16 @@ const AddUserRotatePolicy: React.FC<AddUserRotatePolicyProps> = ({ value, visibl
                 <InputNumber style={{ width: '100%' }} placeholder='请输入组内客服号在线数量' />
                 <InputNumber style={{ width: '100%' }} placeholder='请输入组内客服号在线数量' />
             </Form.Item>
             </Form.Item>
             <Form.Item
             <Form.Item
-                label={<strong>{`客服组内滚动客服号的周期(/分钟,必须 >= 10)`}</strong>}
+                label={<strong>{`客服组内滚动客服号的周期(/分钟,必须 >= 10,0表示不执行)`}</strong>}
                 name="rollingCustomerTime"
                 name="rollingCustomerTime"
-                rules={[{
-                    type: 'number',
-                    min: 10,
-                    message: '输入值必须≥10'
-                }]}
+                rules={[
+                    {
+                        validator: (_, value) =>
+                            validateRollingTime(value) === true
+                                ? Promise.resolve()
+                                : Promise.reject(validateRollingTime(value))
+                    }
+                ]}
             >
             >
                 <InputNumber style={{ width: '100%' }} placeholder='请输入加粉成本的计算周期' />
                 <InputNumber style={{ width: '100%' }} placeholder='请输入加粉成本的计算周期' />
             </Form.Item>
             </Form.Item>

+ 56 - 22
src/pages/launchSystemV3/tencenTasset/corpWechat/userRotatePolicy/index.tsx

@@ -66,31 +66,63 @@ const UserRotatePolicy: React.FC = () => {
                     ellipsis: true,
                     ellipsis: true,
                     align: 'center'
                     align: 'center'
                 },
                 },
+                // {
+                //     title: <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
+                //         <span>加粉成本的计算周期</span>
+                //         <Tooltip title="/分钟,必须 >= 20,且必须是 10 的整数倍数">
+                //             <QuestionCircleFilled />
+                //         </Tooltip>
+                //     </div>,
+                //     dataIndex: 'addCostCalculationCycle',
+                //     key: 'addCostCalculationCycle',
+                //     width: 90,
+                //     align: 'center',
+                //     render(value) {
+                //         if (value || value === 0) return value
+                //         return '--'
+                //     },
+                // },
+                // {
+                //     title: <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
+                //         <span>加粉成本异常值</span>
+                //         <Tooltip title="单位:/分">
+                //             <QuestionCircleFilled />
+                //         </Tooltip>
+                //     </div>,
+                //     dataIndex: 'addCostException',
+                //     key: 'addCostException',
+                //     width: 90,
+                //     align: 'center',
+                //     render(value) {
+                //         if (value || value === 0) return value
+                //         return '--'
+                //     },
+                // },
+                // {
+                //     title: <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
+                //         <span>有消耗无加粉异常</span>
+                //         <Tooltip title="单位:/分">
+                //             <QuestionCircleFilled />
+                //         </Tooltip>
+                //     </div>,
+                //     dataIndex: 'noFansCostValue',
+                //     key: 'noFansCostValue',
+                //     width: 90,
+                //     align: 'center',
+                //     render(value) {
+                //         if (value || value === 0) return value
+                //         return '--'
+                //     },
+                // },
                 {
                 {
                     title: <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
                     title: <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
-                        <span>加粉成本的计算周期</span>
-                        <Tooltip title="/分钟,必须 >= 20,且必须是 10 的整数倍数">
-                            <QuestionCircleFilled />
-                        </Tooltip>
-                    </div>,
-                    dataIndex: 'addCostCalculationCycle',
-                    key: 'addCostCalculationCycle',
-                    width: 90,
-                    align: 'center',
-                    render(value) {
-                        if (value || value === 0) return value
-                        return '--'
-                    },
-                },
-                {
-                    title: <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
-                        <span>加粉成本异常值</span>
+                        <span>距今添加时间告警时长</span>
                         <Tooltip title="单位:/分">
                         <Tooltip title="单位:/分">
                             <QuestionCircleFilled />
                             <QuestionCircleFilled />
                         </Tooltip>
                         </Tooltip>
                     </div>,
                     </div>,
-                    dataIndex: 'addCostException',
-                    key: 'addCostException',
+                    dataIndex: 'lastAddWarnTime',
+                    key: 'lastAddWarnTime',
                     width: 90,
                     width: 90,
                     align: 'center',
                     align: 'center',
                     render(value) {
                     render(value) {
@@ -100,13 +132,13 @@ const UserRotatePolicy: React.FC = () => {
                 },
                 },
                 {
                 {
                     title: <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
                     title: <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
-                        <span>有消耗无加粉异常</span>
+                        <span>距今添加时间下线时长</span>
                         <Tooltip title="单位:/分">
                         <Tooltip title="单位:/分">
                             <QuestionCircleFilled />
                             <QuestionCircleFilled />
                         </Tooltip>
                         </Tooltip>
                     </div>,
                     </div>,
-                    dataIndex: 'noFansCostValue',
-                    key: 'noFansCostValue',
+                    dataIndex: 'lastAddOfflineTime',
+                    key: 'lastAddOfflineTime',
                     width: 90,
                     width: 90,
                     align: 'center',
                     align: 'center',
                     render(value) {
                     render(value) {
@@ -195,9 +227,11 @@ const UserRotatePolicy: React.FC = () => {
             value={editData}
             value={editData}
             onChange={() => {
             onChange={() => {
                 setVisible(false)
                 setVisible(false)
+                setEditData(undefined)
                 getUserRotatePolicyList.refresh()
                 getUserRotatePolicyList.refresh()
             }}
             }}
             onClose={() => {
             onClose={() => {
+                setEditData(undefined)
                 setVisible(false)
                 setVisible(false)
             }}
             }}
         />}
         />}