|
@@ -1,4 +1,4 @@
|
|
-import { FC, useEffect, useMemo, useState } from "react";
|
|
|
|
|
|
+import { FC, useEffect, useMemo, useRef, useState } from "react";
|
|
import classNames from "classnames";
|
|
import classNames from "classnames";
|
|
import {
|
|
import {
|
|
Col,
|
|
Col,
|
|
@@ -8,6 +8,7 @@ import {
|
|
Radio,
|
|
Radio,
|
|
Row,
|
|
Row,
|
|
Select,
|
|
Select,
|
|
|
|
+ Table,
|
|
TreeSelect,
|
|
TreeSelect,
|
|
} from "antd";
|
|
} from "antd";
|
|
import { useLocation, useNavigate, useParams } from "react-router-dom";
|
|
import { useLocation, useNavigate, useParams } from "react-router-dom";
|
|
@@ -23,10 +24,17 @@ import {
|
|
getAssIndexDetailApi,
|
|
getAssIndexDetailApi,
|
|
getAssIndexTreeApi,
|
|
getAssIndexTreeApi,
|
|
saveAssIndexApi,
|
|
saveAssIndexApi,
|
|
|
|
+ saveAssInspectionApi,
|
|
} from "@/api";
|
|
} from "@/api";
|
|
import { CONNECT_WITH_SYMBOL_OPTIONS, SYMBOL_OPTIONS } from "../constants";
|
|
import { CONNECT_WITH_SYMBOL_OPTIONS, SYMBOL_OPTIONS } from "../constants";
|
|
-import { isNull } from "lodash";
|
|
|
|
|
|
+import { isNull, isNumber } from "lodash";
|
|
import { DageLoading } from "@dage/pc-components";
|
|
import { DageLoading } from "@dage/pc-components";
|
|
|
|
+import { getSelectedNodes } from "@/utils";
|
|
|
|
+import {
|
|
|
|
+ InspectionEditable,
|
|
|
|
+ InspectionEditableMethods,
|
|
|
|
+} from "./components/InspectionEditable";
|
|
|
|
+import { EditableFormInstance } from "@ant-design/pro-components";
|
|
|
|
|
|
const { TextArea } = Input;
|
|
const { TextArea } = Input;
|
|
const CONFIRM_OPTIONS = [
|
|
const CONFIRM_OPTIONS = [
|
|
@@ -39,6 +47,10 @@ const CONFIRM_OPTIONS = [
|
|
value: YES_OR_NO.NO,
|
|
value: YES_OR_NO.NO,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
|
|
+const MUSEUM_LEVEL: Record<number, string> = {
|
|
|
|
+ 1: "二级",
|
|
|
|
+ 2: "三级",
|
|
|
|
+};
|
|
|
|
|
|
const CreateOrEditIndex: FC = () => {
|
|
const CreateOrEditIndex: FC = () => {
|
|
const location = useLocation();
|
|
const location = useLocation();
|
|
@@ -46,6 +58,8 @@ const CreateOrEditIndex: FC = () => {
|
|
const query = new URLSearchParams(location.search);
|
|
const query = new URLSearchParams(location.search);
|
|
const params = useParams();
|
|
const params = useParams();
|
|
const [form] = Form.useForm();
|
|
const [form] = Form.useForm();
|
|
|
|
+ const editorFormRef = useRef<EditableFormInstance<any>>();
|
|
|
|
+ const inspectionRef = useRef<InspectionEditableMethods | null>(null);
|
|
const [loading, setLoading] = useState(false);
|
|
const [loading, setLoading] = useState(false);
|
|
const [values, setValues] = useState<any>({
|
|
const [values, setValues] = useState<any>({
|
|
isPoint: YES_OR_NO.YES,
|
|
isPoint: YES_OR_NO.YES,
|
|
@@ -57,40 +71,105 @@ const CreateOrEditIndex: FC = () => {
|
|
[location]
|
|
[location]
|
|
);
|
|
);
|
|
const [detail, setDetail] = useState<null | IAssIndexDetail>(null);
|
|
const [detail, setDetail] = useState<null | IAssIndexDetail>(null);
|
|
|
|
+ const isFixed = params.type === ASS_INDEX_TYPE.FIXED;
|
|
|
|
+ const parentId = Form.useWatch("parentId", form);
|
|
|
|
+ /** 考察要点 */
|
|
|
|
+ const gistIds = Form.useWatch("gistIds", form);
|
|
|
|
+ /** 指标分值 */
|
|
|
|
+ const scores = useMemo(() => {
|
|
|
|
+ const temp = {
|
|
|
|
+ id: 0,
|
|
|
|
+ one: 0,
|
|
|
|
+ two: 0,
|
|
|
|
+ three: 0,
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ gistIds?.forEach((item: any) => {
|
|
|
|
+ if (item.one) temp.one += item.one;
|
|
|
|
+ if (item.two) temp.two += item.two;
|
|
|
|
+ if (item.three) temp.three += item.three;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ return [temp];
|
|
|
|
+ }, [gistIds]);
|
|
|
|
+ const parentNode = useMemo(() => {
|
|
|
|
+ const id = Number(parentId);
|
|
|
|
+ if (!isNumber(id)) return null;
|
|
|
|
+
|
|
|
|
+ const targets = getSelectedNodes([id], treeData, true);
|
|
|
|
+
|
|
|
|
+ return targets ? targets[0] : null;
|
|
|
|
+ }, [parentId, treeData]);
|
|
|
|
|
|
const handleSubmit = async () => {
|
|
const handleSubmit = async () => {
|
|
- if (!(await form.validateFields())) return;
|
|
|
|
|
|
+ if (
|
|
|
|
+ !(
|
|
|
|
+ (await form.validateFields()) ||
|
|
|
|
+ (await editorFormRef.current?.validateFields())
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ return;
|
|
|
|
|
|
- const { materialIds, api, isAdd, score, warnData, ...rest } =
|
|
|
|
|
|
+ const { materialIds, api, isAdd, score, warnData, gistIds, ...rest } =
|
|
form.getFieldsValue();
|
|
form.getFieldsValue();
|
|
|
|
|
|
if (materialIds)
|
|
if (materialIds)
|
|
rest.materialIds = materialIds.map((i: any) => i.id).join(",");
|
|
rest.materialIds = materialIds.map((i: any) => i.id).join(",");
|
|
- if (rest.isPoint === YES_OR_NO.YES) {
|
|
|
|
- // 打分点
|
|
|
|
|
|
+ // 定级指标才有打分点
|
|
|
|
+ if (rest.isPoint === YES_OR_NO.YES && isFixed) {
|
|
rest.jsonPoint = {
|
|
rest.jsonPoint = {
|
|
api,
|
|
api,
|
|
isAdd,
|
|
isAdd,
|
|
score,
|
|
score,
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+ // 告警阈值
|
|
if (rest.isWarn === YES_OR_NO.YES) {
|
|
if (rest.isWarn === YES_OR_NO.YES) {
|
|
- // 告警阈值
|
|
|
|
rest.jsonWarn = JSON.stringify(warnData);
|
|
rest.jsonWarn = JSON.stringify(warnData);
|
|
}
|
|
}
|
|
|
|
+ // 运行指标补全权重
|
|
|
|
+ if (!isFixed && !rest.weight) rest.weight = 0;
|
|
|
|
+
|
|
|
|
+ // 先处理考察要点
|
|
|
|
+ let data = null;
|
|
|
|
+ if (Array.isArray(gistIds)) {
|
|
|
|
+ data = await saveAssInspectionApi(
|
|
|
|
+ gistIds.map((item) => {
|
|
|
|
+ const { _id, ...rest } = item;
|
|
|
|
+ return rest;
|
|
|
|
+ })
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
|
|
await saveAssIndexApi({
|
|
await saveAssIndexApi({
|
|
...rest,
|
|
...rest,
|
|
level: 1,
|
|
level: 1,
|
|
type: params.type,
|
|
type: params.type,
|
|
id: detail?.id,
|
|
id: detail?.id,
|
|
|
|
+ gistIds: Array.isArray(data) ? data.join(",") : undefined,
|
|
});
|
|
});
|
|
navigate(-1);
|
|
navigate(-1);
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ const filterTreeData = (data: AssIndexTreeItemType[]) => {
|
|
|
|
+ return data.map((item) => {
|
|
|
|
+ const { children, ...rest } = item;
|
|
|
|
+ const temp: AssIndexTreeItemType = {
|
|
|
|
+ ...rest,
|
|
|
|
+ children: [],
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ if (temp.level < 2) {
|
|
|
|
+ temp.children = filterTreeData(children);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return temp;
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+
|
|
const getAssIndexTree = async () => {
|
|
const getAssIndexTree = async () => {
|
|
const data = await getAssIndexTreeApi(params.type as ASS_INDEX_TYPE);
|
|
const data = await getAssIndexTreeApi(params.type as ASS_INDEX_TYPE);
|
|
- setTreeData(data);
|
|
|
|
|
|
+ setTreeData(filterTreeData(data));
|
|
};
|
|
};
|
|
|
|
|
|
const getDetail = async () => {
|
|
const getDetail = async () => {
|
|
@@ -98,9 +177,13 @@ const CreateOrEditIndex: FC = () => {
|
|
setLoading(true);
|
|
setLoading(true);
|
|
const data = await getAssIndexDetailApi(Number(params.id));
|
|
const data = await getAssIndexDetailApi(Number(params.id));
|
|
const pointData =
|
|
const pointData =
|
|
- data.isPoint === YES_OR_NO.YES ? JSON.parse(data.jsonPoint) : null;
|
|
|
|
|
|
+ data.isPoint === YES_OR_NO.YES && data.jsonPoint
|
|
|
|
+ ? JSON.parse(data.jsonPoint)
|
|
|
|
+ : null;
|
|
const warnData =
|
|
const warnData =
|
|
- data.isWarn === YES_OR_NO.YES ? JSON.parse(data.jsonWarn) : null;
|
|
|
|
|
|
+ data.isWarn === YES_OR_NO.YES && data.jsonWarn
|
|
|
|
+ ? JSON.parse(data.jsonWarn)
|
|
|
|
+ : null;
|
|
setDetail(data);
|
|
setDetail(data);
|
|
form.setFieldsValue({
|
|
form.setFieldsValue({
|
|
parentId: data.parentId,
|
|
parentId: data.parentId,
|
|
@@ -120,6 +203,17 @@ const CreateOrEditIndex: FC = () => {
|
|
isPoint: data.isPoint,
|
|
isPoint: data.isPoint,
|
|
isWarn: data.isWarn,
|
|
isWarn: data.isWarn,
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ if (data.gists) {
|
|
|
|
+ form.setFieldValue(
|
|
|
|
+ "gistIds",
|
|
|
|
+ data.gists.map((i) => ({
|
|
|
|
+ ...i,
|
|
|
|
+ _id: i.id,
|
|
|
|
+ }))
|
|
|
|
+ );
|
|
|
|
+ // inspectionRef.current?.setEditableRowKeys(data.gists.map((i) => i.id));
|
|
|
|
+ }
|
|
} finally {
|
|
} finally {
|
|
setLoading(false);
|
|
setLoading(false);
|
|
}
|
|
}
|
|
@@ -156,6 +250,11 @@ const CreateOrEditIndex: FC = () => {
|
|
fieldNames={{ label: "name", value: "id" }}
|
|
fieldNames={{ label: "name", value: "id" }}
|
|
/>
|
|
/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
|
|
+ {!isFixed && (
|
|
|
|
+ <Form.Item label="指标级别">
|
|
|
|
+ {MUSEUM_LEVEL[parentNode?.level as number] || "一级"}
|
|
|
|
+ </Form.Item>
|
|
|
|
+ )}
|
|
<Form.Item
|
|
<Form.Item
|
|
label="指标名称"
|
|
label="指标名称"
|
|
required
|
|
required
|
|
@@ -188,133 +287,217 @@ const CreateOrEditIndex: FC = () => {
|
|
/>
|
|
/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
|
|
|
|
- <Form.Item label="打分点" name="isPoint" initialValue={values.isPoint}>
|
|
|
|
- <Radio.Group
|
|
|
|
- options={CONFIRM_OPTIONS}
|
|
|
|
- optionType="button"
|
|
|
|
- buttonStyle="solid"
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item label=" " colon={false} style={{ marginTop: -14 }}>
|
|
|
|
- <div className={classNames("mw650", style.panel)}>
|
|
|
|
- {Boolean(values.isPoint) ? (
|
|
|
|
- <>
|
|
|
|
- <Form.Item
|
|
|
|
- required
|
|
|
|
- label="指标分值"
|
|
|
|
- labelCol={{ span: 4 }}
|
|
|
|
- name="score"
|
|
|
|
- rules={[{ required: true, message: "请输入指标分值" }]}
|
|
|
|
- >
|
|
|
|
- <InputNumber
|
|
|
|
- precision={0}
|
|
|
|
- placeholder="请输入正整数"
|
|
|
|
- className="w160"
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item label="数据API" labelCol={{ span: 4 }} name="api">
|
|
|
|
- <Input placeholder="请输入地址" style={{ width: 427 }} />
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item label="加分项" labelCol={{ span: 4 }} colon={false}>
|
|
|
|
- <Form.Item noStyle name="isAdd">
|
|
|
|
- <Radio.Group>
|
|
|
|
- <Radio value={1}>是</Radio>
|
|
|
|
- <Radio value={0}>否</Radio>
|
|
|
|
- </Radio.Group>
|
|
|
|
- </Form.Item>
|
|
|
|
- <span className={style.tips}>
|
|
|
|
- 注:设为加分项后,该指标的分值不会参与父级指标的计算
|
|
|
|
- </span>
|
|
|
|
- </Form.Item>
|
|
|
|
- </>
|
|
|
|
- ) : (
|
|
|
|
- <Form.Item label="分值:0" labelCol={{ span: 4 }} colon={false}>
|
|
|
|
- <span className={style.tips}>
|
|
|
|
- 注:当指标不作为打分点时,分值=该指标各分项分值(除加分项)之和
|
|
|
|
- </span>
|
|
|
|
- </Form.Item>
|
|
|
|
- )}
|
|
|
|
- </div>
|
|
|
|
- </Form.Item>
|
|
|
|
|
|
+ {parentNode?.level === 2 && !isFixed && (
|
|
|
|
+ <>
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="考察要点"
|
|
|
|
+ required
|
|
|
|
+ name="gistIds"
|
|
|
|
+ rules={[{ required: true, message: "至少需要填入一个考查要点" }]}
|
|
|
|
+ >
|
|
|
|
+ <InspectionEditable
|
|
|
|
+ ref={inspectionRef}
|
|
|
|
+ editableFormRef={editorFormRef}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
|
|
- <Form.Item label="告警阈值" name="isWarn" initialValue={values.isWarn}>
|
|
|
|
- <Radio.Group
|
|
|
|
- options={CONFIRM_OPTIONS}
|
|
|
|
- optionType="button"
|
|
|
|
- buttonStyle="solid"
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- {Boolean(values.isWarn) ? (
|
|
|
|
- <Form.Item label=" " colon={false} style={{ marginTop: -14 }}>
|
|
|
|
- <div
|
|
|
|
- className={classNames("mw650", style.panel)}
|
|
|
|
- style={{ padding: "10px 30px" }}
|
|
|
|
|
|
+ <Form.Item label="指标分值">
|
|
|
|
+ <Table
|
|
|
|
+ rowKey="id"
|
|
|
|
+ dataSource={scores}
|
|
|
|
+ className="mw650"
|
|
|
|
+ pagination={false}
|
|
|
|
+ columns={[
|
|
|
|
+ {
|
|
|
|
+ title: "一级博物馆",
|
|
|
|
+ dataIndex: "one",
|
|
|
|
+ align: "center",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: "二级博物馆",
|
|
|
|
+ dataIndex: "two",
|
|
|
|
+ align: "center",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: "三级博物馆",
|
|
|
|
+ dataIndex: "three",
|
|
|
|
+ align: "center",
|
|
|
|
+ },
|
|
|
|
+ ]}
|
|
|
|
+ />
|
|
|
|
+ <p className={style.tips}>注:指标分值:=各考查要点分值之和</p>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
|
|
+
|
|
|
|
+ {isFixed && (
|
|
|
|
+ <>
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="打分点"
|
|
|
|
+ name="isPoint"
|
|
|
|
+ initialValue={values.isPoint}
|
|
>
|
|
>
|
|
- <Row gutter={10}>
|
|
|
|
- <Col span={8}>
|
|
|
|
|
|
+ <Radio.Group
|
|
|
|
+ options={CONFIRM_OPTIONS}
|
|
|
|
+ optionType="button"
|
|
|
|
+ buttonStyle="solid"
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item label=" " colon={false} style={{ marginTop: -14 }}>
|
|
|
|
+ <div className={classNames("mw650", style.panel)}>
|
|
|
|
+ {Boolean(values.isPoint) ? (
|
|
|
|
+ <>
|
|
|
|
+ <Form.Item
|
|
|
|
+ required
|
|
|
|
+ label="指标分值"
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ name="score"
|
|
|
|
+ rules={[{ required: true, message: "请输入指标分值" }]}
|
|
|
|
+ >
|
|
|
|
+ <InputNumber
|
|
|
|
+ precision={0}
|
|
|
|
+ placeholder="请输入正整数"
|
|
|
|
+ className="w160"
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="数据API"
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ name="api"
|
|
|
|
+ >
|
|
|
|
+ <Input placeholder="请输入地址" style={{ width: 427 }} />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="加分项"
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ colon={false}
|
|
|
|
+ >
|
|
|
|
+ <Form.Item noStyle name="isAdd">
|
|
|
|
+ <Radio.Group>
|
|
|
|
+ <Radio value={1}>是</Radio>
|
|
|
|
+ <Radio value={0}>否</Radio>
|
|
|
|
+ </Radio.Group>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <span className={style.tips}>
|
|
|
|
+ 注:设为加分项后,该指标的分值不会参与父级指标的计算
|
|
|
|
+ </span>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </>
|
|
|
|
+ ) : (
|
|
<Form.Item
|
|
<Form.Item
|
|
- noStyle
|
|
|
|
- name={["warnData", "symbol"]}
|
|
|
|
- rules={[{ required: true, message: "" }]}
|
|
|
|
|
|
+ label="分值:0"
|
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
|
+ colon={false}
|
|
>
|
|
>
|
|
- <Select placeholder="请选择" options={SYMBOL_OPTIONS} />
|
|
|
|
|
|
+ <span className={style.tips}>
|
|
|
|
+ 注:当指标不作为打分点时,分值=该指标各分项分值(除加分项)之和
|
|
|
|
+ </span>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
- </Col>
|
|
|
|
- <Col span={12}>
|
|
|
|
- <Form.Item
|
|
|
|
- noStyle
|
|
|
|
- name={["warnData", "num"]}
|
|
|
|
- rules={[{ required: true, message: "" }]}
|
|
|
|
- >
|
|
|
|
- <InputNumber
|
|
|
|
- precision={0}
|
|
|
|
- placeholder="请输入正整数"
|
|
|
|
- className="w100"
|
|
|
|
|
|
+ )}
|
|
|
|
+ </div>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
|
|
+
|
|
|
|
+ {(isFixed || parentNode?.level === 2) && (
|
|
|
|
+ <>
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="告警阈值"
|
|
|
|
+ name="isWarn"
|
|
|
|
+ initialValue={values.isWarn}
|
|
|
|
+ >
|
|
|
|
+ <Radio.Group
|
|
|
|
+ options={CONFIRM_OPTIONS}
|
|
|
|
+ optionType="button"
|
|
|
|
+ buttonStyle="solid"
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ {Boolean(values.isWarn) ? (
|
|
|
|
+ <Form.Item label=" " colon={false} style={{ marginTop: -14 }}>
|
|
|
|
+ <div
|
|
|
|
+ className={classNames("mw650", style.panel)}
|
|
|
|
+ style={{ padding: "10px 30px" }}
|
|
|
|
+ >
|
|
|
|
+ <Row gutter={10}>
|
|
|
|
+ <Col span={8}>
|
|
|
|
+ <Form.Item
|
|
|
|
+ noStyle
|
|
|
|
+ name={["warnData", "symbol"]}
|
|
|
|
+ rules={[{ required: true, message: "" }]}
|
|
|
|
+ >
|
|
|
|
+ <Select placeholder="请选择" options={SYMBOL_OPTIONS} />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col span={12}>
|
|
|
|
+ <Form.Item
|
|
|
|
+ noStyle
|
|
|
|
+ name={["warnData", "num"]}
|
|
|
|
+ rules={[{ required: true, message: "" }]}
|
|
|
|
+ >
|
|
|
|
+ <InputNumber
|
|
|
|
+ precision={0}
|
|
|
|
+ placeholder="请输入正整数"
|
|
|
|
+ className="w100"
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col span={4}>
|
|
|
|
+ <span className={style.required}>(必填)</span>
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
|
|
+
|
|
|
|
+ <Form.Item noStyle name={["warnData", "and"]}>
|
|
|
|
+ <Radio.Group
|
|
|
|
+ options={CONNECT_WITH_SYMBOL_OPTIONS}
|
|
|
|
+ style={{ margin: "3px 0" }}
|
|
/>
|
|
/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
- </Col>
|
|
|
|
- <Col span={4}>
|
|
|
|
- <span className={style.required}>(必填)</span>
|
|
|
|
- </Col>
|
|
|
|
- </Row>
|
|
|
|
-
|
|
|
|
- <Form.Item noStyle name={["warnData", "and"]}>
|
|
|
|
- <Radio.Group
|
|
|
|
- options={CONNECT_WITH_SYMBOL_OPTIONS}
|
|
|
|
- style={{ margin: "3px 0" }}
|
|
|
|
- />
|
|
|
|
|
|
+
|
|
|
|
+ <Row gutter={10}>
|
|
|
|
+ <Col span={8}>
|
|
|
|
+ <Form.Item noStyle name={["warnData", "symbol2"]}>
|
|
|
|
+ <Select
|
|
|
|
+ allowClear
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ options={SYMBOL_OPTIONS}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col span={12}>
|
|
|
|
+ <Form.Item noStyle name={["warnData", "num2"]}>
|
|
|
|
+ <InputNumber
|
|
|
|
+ precision={0}
|
|
|
|
+ placeholder="请输入正整数"
|
|
|
|
+ className="w100"
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col span={4}></Col>
|
|
|
|
+ </Row>
|
|
|
|
+ </div>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
|
|
+ ) : (
|
|
|
|
+ ""
|
|
|
|
+ )}
|
|
|
|
|
|
- <Row gutter={10}>
|
|
|
|
- <Col span={8}>
|
|
|
|
- <Form.Item noStyle name={["warnData", "symbol2"]}>
|
|
|
|
- <Select
|
|
|
|
- allowClear
|
|
|
|
- placeholder="请选择"
|
|
|
|
- options={SYMBOL_OPTIONS}
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- </Col>
|
|
|
|
- <Col span={12}>
|
|
|
|
- <Form.Item noStyle name={["warnData", "num2"]}>
|
|
|
|
- <InputNumber
|
|
|
|
- precision={0}
|
|
|
|
- placeholder="请输入正整数"
|
|
|
|
- className="w100"
|
|
|
|
- />
|
|
|
|
- </Form.Item>
|
|
|
|
- </Col>
|
|
|
|
- <Col span={4}></Col>
|
|
|
|
- </Row>
|
|
|
|
- </div>
|
|
|
|
- </Form.Item>
|
|
|
|
- ) : (
|
|
|
|
- ""
|
|
|
|
|
|
+ <Form.Item label="需上传资料" name="materialIds">
|
|
|
|
+ <FileTemplateTable />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </>
|
|
)}
|
|
)}
|
|
|
|
|
|
- <Form.Item label="需上传资料" name="materialIds">
|
|
|
|
- <FileTemplateTable />
|
|
|
|
- </Form.Item>
|
|
|
|
|
|
+ {(parentNode?.level || 0) < 2 && !isFixed && (
|
|
|
|
+ <Form.Item required label="指标权重" name="weight">
|
|
|
|
+ <InputNumber
|
|
|
|
+ precision={0}
|
|
|
|
+ min={1}
|
|
|
|
+ max={100}
|
|
|
|
+ placeholder="请输入1~100的正整数"
|
|
|
|
+ className="mw650 w100"
|
|
|
|
+ addonAfter="%"
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ )}
|
|
|
|
|
|
<Form.Item required label="排序值" name="sort" initialValue={999}>
|
|
<Form.Item required label="排序值" name="sort" initialValue={999}>
|
|
<InputNumber
|
|
<InputNumber
|