小细节优化和派单逻辑
This commit is contained in:
@@ -37,19 +37,21 @@ const { Option } = Select;
|
||||
// 告警模型管理子组件
|
||||
const AlarmModelManagement: React.FC = () => {
|
||||
const [form] = Form.useForm();
|
||||
const [list, setList] = useState<any[]>([]);
|
||||
const [list, setList] = useState([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [modalVisible, setModalVisible] = useState(false);
|
||||
const [editingItem, setEditingItem] = useState<any>(null);
|
||||
const [editingItem, setEditingItem] = useState(null);
|
||||
const { stationId } = useSelector((state: RootState) => state.station);
|
||||
const { modal } = App.useApp();
|
||||
|
||||
// 批量多选
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState<(string | number)[]>([]);
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
|
||||
// 下拉数据源:错误编码列表、工单模型列表
|
||||
const [errorCodeOptions, setErrorCodeOptions] = useState<{ label: string; value: string }[]>([]);
|
||||
const [modelOptions, setModelOptions] = useState<{ label: string; value: number }[]>([]);
|
||||
const [errorCodeOptions, setErrorCodeOptions] = useState([]);
|
||||
const [modelOptions, setModelOptions] = useState([]);
|
||||
const { userInfo } = useSelector((state: RootState) => state.user);
|
||||
|
||||
|
||||
// 获取告警模型列表
|
||||
const fetchList = async () => {
|
||||
@@ -185,7 +187,8 @@ const AlarmModelManagement: React.FC = () => {
|
||||
errorCode: values.errorCode,
|
||||
modelId: values.modelId,
|
||||
autoGenerateOrder: values.autoGenerateOrder ?? false,
|
||||
sourceType: values.sourceType ?? 1
|
||||
sourceType: values.sourceType ?? 1,
|
||||
orgId: userInfo?.orgId || '',
|
||||
};
|
||||
const res = await saveAlarmOrderConfigApi(submitParams);
|
||||
if (res.code === 200 && res.data === true) {
|
||||
|
||||
@@ -807,7 +807,7 @@ export default function DeviceManagementPage() {
|
||||
</Form.Item>
|
||||
<Form.Item label="负责人" name="userId" >
|
||||
<Select
|
||||
placeholder="请先选择场站"
|
||||
placeholder="请先选择负责人"
|
||||
disabled={!userOptions.length}
|
||||
>
|
||||
{userOptions.map(user => (
|
||||
|
||||
@@ -144,6 +144,9 @@ export default function ErrorManagement() {
|
||||
// 新增校验规则字段
|
||||
field: values.field,
|
||||
compareType: values.compareType,
|
||||
orgId: userInfo?.orgId || '',
|
||||
siteId: stationId || '',
|
||||
|
||||
// 区间/普通值统一拼接逗号字符串传给 compareValues
|
||||
compareValues: values.rangeMin && values.rangeMax
|
||||
? `${values.rangeMin},${values.rangeMax}`
|
||||
|
||||
@@ -147,7 +147,7 @@ export default function StationManage() {
|
||||
form.setFieldsValue({
|
||||
...record,
|
||||
status: record.status === 1,
|
||||
dingTalkOrderPush: record.dingTalkOrderPush === 1,
|
||||
dingTalkOrderPush: record.dingTalkOrderPush == true,
|
||||
dingTalkPush: record.dingTalkPush === 1,
|
||||
emailPush: record.emailPush === 1,
|
||||
alertPush: record.alertPush === 1,
|
||||
|
||||
@@ -262,6 +262,8 @@ const WorkOrderModelManagement: React.FC = () => {
|
||||
// 根据设备类型设置对应的路径字段
|
||||
routeId: selectedDeviceType === 'robot' ? values.routeId : undefined,
|
||||
waylineId: selectedDeviceType === 'uav' ? values.waylineId : undefined,
|
||||
orgId: userInfo?.orgId || '',
|
||||
|
||||
};
|
||||
if (editingItem) {
|
||||
res = await addWorkOrderModelApi({ ...payload, id: editingItem.id });
|
||||
|
||||
@@ -294,6 +294,11 @@ export default function AlarmCenterPage() {
|
||||
dataIndex: 'alarmContent',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '上报值',
|
||||
dataIndex: 'time_values',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '设备名称',
|
||||
dataIndex: 'deviceName',
|
||||
|
||||
Reference in New Issue
Block a user