You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
838 lines
34 KiB
838 lines
34 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[6741],{
|
|
|
|
/***/ 82199:
|
|
/*!***************************************************************!*\
|
|
!*** ./src/pages/Engineering/Norm/List/index.tsx + 7 modules ***!
|
|
\***************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ List; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/pages/Engineering/components/Evaluate/index.ts + 4 modules
|
|
var Evaluate = __webpack_require__(18831);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(67866);
|
|
// EXTERNAL MODULE: ./src/models/engineering/evaluateList.ts
|
|
var evaluateList = __webpack_require__(15253);
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/Norm/List/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Listmodules = ({"flex_box_center":"flex_box_center___X9V7U","flex_space_between":"flex_space_between___yrftj","flex_box_vertical_center":"flex_box_vertical_center___L4TZS","flex_box_center_end":"flex_box_center_end___cg_Zt","flex_box_column":"flex_box_column___wze1F","normContainer":"normContainer___W8XuE","header":"header___b9n4K","select":"select___HP7t1","button":"button___mqRKo","tips":"tips___r2hsJ"});
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
var es_select = __webpack_require__(57809);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/Norm/List/TabList/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var TabListmodules = ({"normTablistContainer":"normTablistContainer___yLRBP","red":"red___hyG5_","green":"green___YdwJo"});
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(6848);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/index.js + 3 modules
|
|
var space = __webpack_require__(81327);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/typography/index.js + 18 modules
|
|
var typography = __webpack_require__(71796);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(14491);
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/Norm/List/TabList/index.tsx
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const NormTabList = ({
|
|
headerData,
|
|
tabListData,
|
|
loading,
|
|
expandedRowKeys,
|
|
dispatch
|
|
}) => {
|
|
const columns = [
|
|
{
|
|
title: "\u6BD5\u4E1A\u8981\u6C42\u53CA\u6307\u6807\u70B9",
|
|
key: "content",
|
|
ellipsis: {
|
|
showTitle: false
|
|
},
|
|
width: "50%",
|
|
render: (record) => /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { placement: "topLeft", title: record.content }, record.children ? /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, record.position, ".", record.content) : /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, record.content))
|
|
},
|
|
{
|
|
title: "\u8FBE\u6210\u9608\u503C",
|
|
dataIndex: "goal_value",
|
|
align: "center"
|
|
},
|
|
{
|
|
title: "\u8FBE\u6210\u5EA6\u5B9E\u9645\u503C",
|
|
dataIndex: "actual_value",
|
|
align: "center"
|
|
},
|
|
{
|
|
title: "\u8BC4\u4EF7\u7ED3\u679C",
|
|
dataIndex: "status",
|
|
align: "center",
|
|
render: (record) => /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: record ? TabListmodules.green : TabListmodules.red }, record ? "" : "\u672A", "\u8FBE\u6210")
|
|
},
|
|
{
|
|
title: "\u72B6\u6001",
|
|
dataIndex: "compute_status",
|
|
render: (record) => /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, record || "--")
|
|
},
|
|
{
|
|
title: "\u8BA1\u7B97\u65F6\u95F4",
|
|
dataIndex: "compute_time",
|
|
render: (record) => /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, record || "--")
|
|
},
|
|
{
|
|
title: "\u64CD\u4F5C",
|
|
width: 80,
|
|
render: (record) => {
|
|
if (!record.children) {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null);
|
|
}
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(space/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement(typography["default"].Link, { onClick: () => onComputeSingleClick(record.id) }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"i",
|
|
{
|
|
className: "iconfont icon-jisuan",
|
|
style: {
|
|
color: "#0152D9"
|
|
}
|
|
}
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
typography["default"].Link,
|
|
{
|
|
onClick: () => {
|
|
_umi_production_exports.history.push(
|
|
`/engineering/evaluate/norm/${headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]]}/${record.id}`
|
|
);
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"i",
|
|
{
|
|
className: "iconfont icon-chakansvg",
|
|
style: { color: "#0152D9" }
|
|
}
|
|
)
|
|
));
|
|
}
|
|
}
|
|
];
|
|
const onComputeSingleClick = (id) => {
|
|
dispatch({
|
|
type: "engineeringNormList/compute",
|
|
payload: {
|
|
all: false,
|
|
ec_year_id: headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]],
|
|
id
|
|
}
|
|
});
|
|
};
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: TabListmodules.normTablistContainer }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
table["default"],
|
|
{
|
|
loading: loading.effects["engineeringNormList/getGraduationResults"] || loading.effects["engineeringNormList/compute"],
|
|
rowKey: "id",
|
|
columns,
|
|
bordered: false,
|
|
dataSource: tabListData,
|
|
expandable: {
|
|
expandedRowKeys,
|
|
expandIcon: () => /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null)
|
|
},
|
|
pagination: false
|
|
}
|
|
));
|
|
};
|
|
/* harmony default export */ var TabList = ((0,_umi_production_exports.connect)(
|
|
({
|
|
engineeringNormList,
|
|
loading
|
|
}) => __spreadValues({
|
|
loading
|
|
}, engineeringNormList)
|
|
)(NormTabList));
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/Norm/List/CalcModal/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var CalcModalmodules = ({"flex_box_center":"flex_box_center___XsJky","flex_space_between":"flex_space_between___YT9jW","flex_box_vertical_center":"flex_box_vertical_center___m1XRe","flex_box_center_end":"flex_box_center_end___tpcG6","flex_box_column":"flex_box_column___dcmMW","normCalcModalWrap":"normCalcModalWrap___Vh4Nx","tableCotainer":"tableCotainer___mgwQ9","name":"name___did8y","content":"content___NUsYT","subtitle":"subtitle___zYm_7","tag":"tag___Ym3uV"});
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules
|
|
var tabs = __webpack_require__(99313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
|
|
var es_radio = __webpack_require__(5112);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/Norm/List/CalcModal/index.tsx
|
|
var CalcModal_defProp = Object.defineProperty;
|
|
var __defProps = Object.defineProperties;
|
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var CalcModal_getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var CalcModal_hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var CalcModal_propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var CalcModal_defNormalProp = (obj, key, value) => key in obj ? CalcModal_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var CalcModal_spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (CalcModal_hasOwnProp.call(b, prop))
|
|
CalcModal_defNormalProp(a, prop, b[prop]);
|
|
if (CalcModal_getOwnPropSymbols)
|
|
for (var prop of CalcModal_getOwnPropSymbols(b)) {
|
|
if (CalcModal_propIsEnum.call(b, prop))
|
|
CalcModal_defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
|
|
|
|
|
|
|
const { TabPane } = tabs["default"];
|
|
const keymap = {
|
|
formula_one: "\u6307\u6807\u70B9\u8FBE\u6210\u5B9E\u9645\u503C",
|
|
formula_two: "\u6307\u6807\u70B9\u8BC4\u4EF7\u7ED3\u679C",
|
|
formula_three: "\u6BD5\u4E1A\u8981\u6C42\u8FBE\u6210\u5B9E\u9645\u503C"
|
|
};
|
|
const NormCalcModal = ({
|
|
actionTabs,
|
|
loading,
|
|
dispatch
|
|
}) => {
|
|
const [activeKey, setActiveKey] = (0,_react_17_0_2_react.useState)({});
|
|
const [dataSourceKey, setDataSourceKey] = (0,_react_17_0_2_react.useState)({
|
|
formula_one: [],
|
|
formula_two: [],
|
|
formula_three: []
|
|
});
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
dispatch({
|
|
type: "engineeringNormList/getFormulas",
|
|
callback: (result) => {
|
|
if (result) {
|
|
setDataSourceKey(result);
|
|
let keys = {};
|
|
for (let x in result) {
|
|
const target = result[x].find((list) => list.checked);
|
|
keys[x] = target ? target.id : void 0;
|
|
}
|
|
setActiveKey(keys);
|
|
}
|
|
}
|
|
});
|
|
}, []);
|
|
const getColumns = (key) => {
|
|
return [
|
|
{
|
|
title: `${keymap[key]}\u8BA1\u7B97\u516C\u5F0F`,
|
|
key: "content",
|
|
render: (record) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CalcModalmodules.name }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, record.checked && /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: CalcModalmodules.tag }, "\u9ED8\u8BA4")), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CalcModalmodules.content }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, record.content), record.explain && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CalcModalmodules.subtitle }, "\u8BF4\u660E\uFF1A", record.explain)));
|
|
}
|
|
},
|
|
{
|
|
title: "\u64CD\u4F5C",
|
|
width: 120,
|
|
render: (record) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_radio/* default */.ZP,
|
|
{
|
|
checked: activeKey[key] === record.id,
|
|
onClick: () => onRadioClick(key, record.id)
|
|
},
|
|
"\u8BBE\u7F6E\u9ED8\u8BA4\u516C\u5F0F"
|
|
));
|
|
}
|
|
}
|
|
];
|
|
};
|
|
const onRadioClick = (key, id) => {
|
|
const targetData = dataSourceKey[key].map((list) => __spreadProps(CalcModal_spreadValues({}, list), {
|
|
checked: id === list.id
|
|
}));
|
|
setActiveKey(__spreadProps(CalcModal_spreadValues({}, activeKey), {
|
|
[key]: id
|
|
}));
|
|
setDataSourceKey(__spreadProps(CalcModal_spreadValues({}, dataSourceKey), {
|
|
[key]: targetData
|
|
}));
|
|
};
|
|
const onCancelClick = () => {
|
|
dispatch({
|
|
type: "engineeringNormList/save",
|
|
payload: {
|
|
actionTabs: {
|
|
key: "",
|
|
params: {}
|
|
}
|
|
}
|
|
});
|
|
};
|
|
const onOkClick = () => {
|
|
dispatch({
|
|
type: "engineeringNormList/setFormulas",
|
|
payload: CalcModal_spreadValues({
|
|
ec_year_id: actionTabs.params.id
|
|
}, activeKey),
|
|
callback: (result) => {
|
|
if (result && result.status === 0) {
|
|
message/* default */.ZP.success("\u66F4\u65B0\u6210\u529F");
|
|
dispatch({
|
|
type: "engineeringNormList/getGraduationResults"
|
|
});
|
|
onCancelClick();
|
|
} else {
|
|
message/* default */.ZP.error("\u66F4\u65B0\u5931\u8D25");
|
|
}
|
|
}
|
|
});
|
|
};
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CalcModalmodules.normCalcModalContainer }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
modal["default"],
|
|
{
|
|
title: "\u8BBE\u7F6E\u8BA1\u7B97\u516C\u5F0F",
|
|
open: true,
|
|
width: 918,
|
|
wrapClassName: CalcModalmodules.normCalcModalWrap,
|
|
onCancel: onCancelClick,
|
|
onOk: onOkClick,
|
|
confirmLoading: loading.effects["engineeringNormList/getFormulas"] || loading.effects["engineeringNormList/setFormulas"] || false
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CalcModalmodules.normCalcContent }, /* @__PURE__ */ _react_17_0_2_react.createElement(tabs["default"], { defaultActiveKey: "1" }, Object.entries(keymap).map(([key, value], index) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(TabPane, { tab: value, key: (index + 1).toString() }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CalcModalmodules.tableCotainer }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
table["default"],
|
|
{
|
|
rowKey: "id",
|
|
columns: getColumns(key),
|
|
dataSource: dataSourceKey[key],
|
|
pagination: false
|
|
}
|
|
)));
|
|
})))
|
|
));
|
|
};
|
|
/* harmony default export */ var CalcModal = ((0,_umi_production_exports.connect)(
|
|
({
|
|
loading,
|
|
engineeringNormList
|
|
}) => CalcModal_spreadValues({
|
|
loading
|
|
}, engineeringNormList)
|
|
)(NormCalcModal));
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/Norm/List/ThresholdsModal/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var ThresholdsModalmodules = ({"normThresholdsModalWrap":"normThresholdsModalWrap___VJWzM","normThresholdsContent":"normThresholdsContent___ygrNj","tips":"tips___yRoBl","tableCotainer":"tableCotainer____phIu","name":"name___oQNhw","tag":"tag___MmgZg"});
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
var es_form = __webpack_require__(78241);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
|
|
var input_number = __webpack_require__(54449);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
var row = __webpack_require__(95237);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
var col = __webpack_require__(43604);
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/Norm/List/ThresholdsModal/index.tsx
|
|
var ThresholdsModal_defProp = Object.defineProperty;
|
|
var ThresholdsModal_defProps = Object.defineProperties;
|
|
var ThresholdsModal_getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var ThresholdsModal_getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var ThresholdsModal_hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var ThresholdsModal_propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var ThresholdsModal_defNormalProp = (obj, key, value) => key in obj ? ThresholdsModal_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var ThresholdsModal_spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (ThresholdsModal_hasOwnProp.call(b, prop))
|
|
ThresholdsModal_defNormalProp(a, prop, b[prop]);
|
|
if (ThresholdsModal_getOwnPropSymbols)
|
|
for (var prop of ThresholdsModal_getOwnPropSymbols(b)) {
|
|
if (ThresholdsModal_propIsEnum.call(b, prop))
|
|
ThresholdsModal_defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var ThresholdsModal_spreadProps = (a, b) => ThresholdsModal_defProps(a, ThresholdsModal_getOwnPropDescs(b));
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
const layout = {
|
|
// labelCol: { span: 3 },
|
|
wrapperCol: { span: 21 }
|
|
};
|
|
const NormThresholdsModal = ({
|
|
actionTabs,
|
|
tabListData,
|
|
expandedRowKeys,
|
|
all_goal_value,
|
|
loading,
|
|
dispatch
|
|
}) => {
|
|
const [form] = es_form["default"].useForm();
|
|
const [activeRadio, setActiveRadio] = (0,_react_17_0_2_react.useState)("all");
|
|
const [eachkeys, setEachKeys] = (0,_react_17_0_2_react.useState)({});
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
setActiveRadio("all");
|
|
let keys = {};
|
|
tabListData.forEach((list) => {
|
|
if (list.children && list.children.length > 0) {
|
|
list.children.forEach(
|
|
(item) => keys[item.id] = item.goal_value !== void 0 ? item.goal_value : ""
|
|
);
|
|
}
|
|
});
|
|
setEachKeys(keys);
|
|
}, []);
|
|
const columns = [
|
|
{
|
|
title: "\u6BD5\u4E1A\u8981\u6C42\u53CA\u6307\u6807\u70B9",
|
|
key: "content",
|
|
// ellipsis: {
|
|
// showTitle: false,
|
|
// },
|
|
render: (record) => /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { placement: "top", title: record.content }, record.children ? /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, record.position, ".", record.content) : /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, record.content))
|
|
},
|
|
{
|
|
title: "\u8FBE\u6210\u9608\u503C",
|
|
key: "action",
|
|
width: 100,
|
|
render: (record) => /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, record.children ? "\u81EA\u52A8\u8BA1\u7B97" : /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
input_number/* default */.Z,
|
|
{
|
|
key: record.id,
|
|
defaultValue: record.goal_value,
|
|
onChange: (value) => setEachKeys(ThresholdsModal_spreadProps(ThresholdsModal_spreadValues({}, eachkeys), {
|
|
[record.id]: value
|
|
})),
|
|
style: { width: 64 },
|
|
min: 0,
|
|
max: 1,
|
|
step: 0.1,
|
|
precision: 3
|
|
}
|
|
))
|
|
}
|
|
];
|
|
const onCancelClick = () => {
|
|
dispatch({
|
|
type: "engineeringNormList/save",
|
|
payload: {
|
|
actionTabs: {
|
|
key: "",
|
|
params: {}
|
|
}
|
|
}
|
|
});
|
|
};
|
|
const onOkClick = () => __async(void 0, null, function* () {
|
|
const { configure, goal_value } = yield form.validateFields();
|
|
let _loading = false;
|
|
let param = {
|
|
ec_year_id: actionTabs.params.id,
|
|
type: configure
|
|
};
|
|
if (configure === "all") {
|
|
param = ThresholdsModal_spreadProps(ThresholdsModal_spreadValues({}, param), {
|
|
goal_value
|
|
});
|
|
}
|
|
if (configure === "each") {
|
|
let subitems = [];
|
|
for (let x in eachkeys) {
|
|
if (eachkeys[x] === "") {
|
|
_loading = true;
|
|
}
|
|
subitems.push({
|
|
id: Number(x),
|
|
goal_value: eachkeys[x]
|
|
});
|
|
}
|
|
param = ThresholdsModal_spreadProps(ThresholdsModal_spreadValues({}, param), {
|
|
subitems
|
|
});
|
|
}
|
|
if (_loading) {
|
|
message/* default */.ZP.info("\u8BF7\u586B\u5199\u5168\u90E8\u7684\u9608\u503C");
|
|
}
|
|
if (["each", "all"].includes(configure) && !_loading) {
|
|
dispatch({
|
|
type: "engineeringNormList/putGoalValue",
|
|
payload: param
|
|
});
|
|
}
|
|
});
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: ThresholdsModalmodules.normThresholdsModalModalContainer }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
modal["default"],
|
|
{
|
|
title: "\u914D\u7F6E\u8FBE\u6210\u9608\u503C",
|
|
open: true,
|
|
width: 880,
|
|
wrapClassName: ThresholdsModalmodules.normThresholdsModalWrap,
|
|
onCancel: onCancelClick,
|
|
onOk: onOkClick,
|
|
confirmLoading: loading.effects["engineeringNormList/putGoalValue"] || false
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: ThresholdsModalmodules.normThresholdsContent }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: ThresholdsModalmodules.tips }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u8BF4\u660E\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "1.\u6307\u6807\u70B9\u7684\u8FBE\u6210\u9608\u503C\u8BBE\u7F6E\u8303\u56F4\uFF080,1\uFF09\uFF0C\u4FDD\u7559\u5C0F\u6570\u70B9\u540E\u4E09\u4F4D\uFF1B"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "2.\u6BD5\u4E1A\u8981\u6C42\u7684\u8FBE\u6210\u9608\u503C\u6839\u636E\u8BBE\u7F6E\u7684\u8BA1\u7B97\u516C\u5F0F\u4E0E\u6307\u6807\u70B9\u9608\u503C\u81EA\u52A8\u8BA1\u7B97\u3002\u5982\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u8BBE\u7F6E\u7684\u6BD5\u4E1A\u8981\u6C42\u5F97\u5206\u8BA1\u7B97\u516C\u5F0F\u662F\u6309\u6307\u6807\u70B9\u5F97\u5206\u7684\u5E73\u5747\u5206\u8BA1\u7B97\uFF0C\u5219\u6BD5\u4E1A\u8981\u6C42\u8FBE\u6210\u9608\u503C=\u5F53\u524D\u6BD5\u4E1A\u8981\u6C42\u4E0B\u6240\u6709\u6307\u6807\u70B9\u8FBE\u6210\u9608\u503C\u7684\u5E73\u5747\u503C\uFF1B"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u8BBE\u7F6E\u7684\u6BD5\u4E1A\u8981\u6C42\u5F97\u5206\u8BA1\u7B97\u516C\u5F0F\u662F\u6309\u591A\u4E2A\u6307\u6807\u70B9\u5F97\u5206\u7684\u6700\u5C0F\u503C\u8BA1\u7B97\uFF0C\u5219\u6BD5\u4E1A\u8981\u6C42\u8FBE\u6210\u9608\u503C=\u5F53\u524D\u6BD5\u4E1A\u8981\u6C42\u4E0B\u6240\u6709\u6307\u6807\u70B9\u5F97\u5206\u7684\u6700\u5C0F\u503C\u3002")), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_form["default"],
|
|
ThresholdsModal_spreadProps(ThresholdsModal_spreadValues({}, layout), {
|
|
form,
|
|
initialValues: {
|
|
configure: "all",
|
|
goal_value: all_goal_value
|
|
}
|
|
}),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(es_form["default"].Item, { label: "\u914D\u7F6E\u65B9\u5F0F", name: "configure" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_radio/* default.Group */.ZP.Group,
|
|
{
|
|
onChange: (event) => {
|
|
setActiveRadio(event.target.value);
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(es_radio/* default */.ZP, { value: "all" }, "\u7EDF\u4E00\u914D\u7F6E"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(es_radio/* default */.ZP, { value: "each" }, "\u5355\u72EC\u914D\u7F6E")
|
|
)),
|
|
activeRadio === "all" && /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { span: 7 }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_form["default"].Item,
|
|
{
|
|
label: "\u8FBE\u6210\u9608\u503C",
|
|
name: "goal_value",
|
|
rules: [
|
|
{
|
|
required: true,
|
|
message: "\u8BF7\u8F93\u5165\u9608\u503C"
|
|
}
|
|
]
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
input_number/* default */.Z,
|
|
{
|
|
onChange: (value) => {
|
|
form.setFieldsValue({
|
|
goal_value: value
|
|
});
|
|
},
|
|
placeholder: "\u8BF7\u8F93\u5165\u9608\u503C",
|
|
style: { width: 132 },
|
|
min: 0,
|
|
max: 1,
|
|
step: 0.1,
|
|
precision: 3
|
|
}
|
|
)
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { span: 12 }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { fontSize: 14, color: "#464f66" } }, "\u4E3A\u6240\u6709\u6307\u6807\u70B9\u914D\u7F6E\u4E00\u6837\u7684\u8FBE\u6210\u9608\u503C"))),
|
|
activeRadio === "each" && /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
table["default"],
|
|
{
|
|
rowKey: "id",
|
|
columns,
|
|
bordered: false,
|
|
dataSource: tabListData,
|
|
expandable: {
|
|
expandedRowKeys,
|
|
expandIcon: () => /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null)
|
|
},
|
|
pagination: false,
|
|
scroll: { y: 460 }
|
|
}
|
|
))
|
|
))
|
|
));
|
|
};
|
|
/* harmony default export */ var ThresholdsModal = ((0,_umi_production_exports.connect)(
|
|
({
|
|
loading,
|
|
engineeringNormList
|
|
}) => ThresholdsModal_spreadValues({
|
|
loading
|
|
}, engineeringNormList)
|
|
)(NormThresholdsModal));
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/Norm/List/index.tsx
|
|
var List_defProp = Object.defineProperty;
|
|
var List_getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var List_hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var List_propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var List_defNormalProp = (obj, key, value) => key in obj ? List_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var List_spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (List_hasOwnProp.call(b, prop))
|
|
List_defNormalProp(a, prop, b[prop]);
|
|
if (List_getOwnPropSymbols)
|
|
for (var prop of List_getOwnPropSymbols(b)) {
|
|
if (List_propIsEnum.call(b, prop))
|
|
List_defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { Option } = es_select["default"];
|
|
const Norm = ({
|
|
user,
|
|
actionTabs,
|
|
headerData,
|
|
tabListData,
|
|
loading,
|
|
dispatch
|
|
}) => {
|
|
var _a, _b, _c;
|
|
const firstEnter = (0,_react_17_0_2_react.useRef)(true);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a2;
|
|
if ((_a2 = user.userInfo) == null ? void 0 : _a2.login) {
|
|
dispatch({
|
|
type: "engineeringNormList/getMajorList"
|
|
});
|
|
}
|
|
return () => {
|
|
dispatch({
|
|
type: "engineeringNormList/save",
|
|
payload: {
|
|
actionTabs: {
|
|
key: "",
|
|
params: {}
|
|
}
|
|
}
|
|
});
|
|
dispatch({
|
|
type: "engineeringNormList/setMajorOrYearActive",
|
|
payload: {
|
|
key: evaluateList/* evaluateListHeaderKey */.k[0],
|
|
value: ""
|
|
}
|
|
});
|
|
dispatch({
|
|
type: "engineeringNormList/setMajorOrYearActive",
|
|
payload: {
|
|
key: evaluateList/* evaluateListHeaderKey */.k[1],
|
|
value: ""
|
|
}
|
|
});
|
|
};
|
|
}, [(_a = user.userInfo) == null ? void 0 : _a.login]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a2;
|
|
if ((_a2 = headerData.active) == null ? void 0 : _a2[evaluateList/* evaluateListHeaderKey */.k[0]]) {
|
|
dispatch({
|
|
type: "engineeringNormList/getYearList",
|
|
payload: { id: headerData.active[evaluateList/* evaluateListHeaderKey */.k[0]], firstEnter: firstEnter.current }
|
|
});
|
|
firstEnter.current = false;
|
|
dispatch({
|
|
type: "engineeringNormList/setMajorOrYearActive",
|
|
payload: {
|
|
key: evaluateList/* evaluateListHeaderKey */.k[1],
|
|
value: ""
|
|
}
|
|
});
|
|
dispatch({
|
|
type: "engineeringNormList/setMajorOrYearDataSource",
|
|
payload: {
|
|
key: evaluateList/* evaluateListHeaderKey */.k[1],
|
|
value: []
|
|
}
|
|
});
|
|
}
|
|
}, [(_b = headerData.active) == null ? void 0 : _b[evaluateList/* evaluateListHeaderKey */.k[0]]]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
dispatch({
|
|
type: "engineeringNormList/getGraduationResults"
|
|
});
|
|
}, [(_c = headerData.active) == null ? void 0 : _c[evaluateList/* evaluateListHeaderKey */.k[1]]]);
|
|
const onSelectChange = (key, value) => {
|
|
dispatch({
|
|
type: "engineeringNormList/setMajorOrYearActive",
|
|
payload: {
|
|
key,
|
|
value
|
|
}
|
|
});
|
|
};
|
|
const onExportClick = () => {
|
|
dispatch({
|
|
type: "engineeringNormList/exportGraduation"
|
|
});
|
|
};
|
|
const onComputeClick = () => {
|
|
if (tabListData.length && headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]]) {
|
|
dispatch({
|
|
type: "engineeringNormList/compute",
|
|
payload: {
|
|
all: true,
|
|
ec_year_id: headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]]
|
|
}
|
|
});
|
|
}
|
|
};
|
|
const onSetCalcClick = (key) => {
|
|
dispatch({
|
|
type: "engineeringNormList/save",
|
|
payload: {
|
|
actionTabs: {
|
|
key,
|
|
params: {
|
|
id: headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]]
|
|
}
|
|
}
|
|
}
|
|
});
|
|
};
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Listmodules.normContainer }, /* @__PURE__ */ _react_17_0_2_react.createElement(Evaluate/* PanelTitle */.p, { title: "\u6307\u6807\u8BC4\u4EF7" }), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Listmodules.header }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Listmodules.select }, Object.entries(headerData.dataSource).map(([key, list]) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(Evaluate/* SelectWrap */.v, { title: key, key }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_select["default"],
|
|
{
|
|
style: { width: list.width },
|
|
value: headerData.active[key] || void 0,
|
|
bordered: false,
|
|
placeholder: list.placeholder,
|
|
loading: loading.effects[list.loading],
|
|
onChange: (value) => onSelectChange(key, value)
|
|
},
|
|
list.dataList.map((item) => /* @__PURE__ */ _react_17_0_2_react.createElement(Option, { key: item.value, value: item.value }, item.label))
|
|
));
|
|
})), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Listmodules.button }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_button/* default */.ZP,
|
|
{
|
|
type: "default",
|
|
icon: /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-yuzhi" }),
|
|
disabled: !headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]],
|
|
onClick: () => onSetCalcClick("\u914D\u7F6E\u8FBE\u6210\u9608\u503C")
|
|
},
|
|
"\u914D\u7F6E\u8FBE\u6210\u9608\u503C"
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_button/* default */.ZP,
|
|
{
|
|
type: "default",
|
|
icon: /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-jisuangongshi" }),
|
|
disabled: !headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]],
|
|
onClick: () => onSetCalcClick("\u8BBE\u7F6E\u8BA1\u7B97\u516C\u5F0F")
|
|
},
|
|
"\u8BBE\u7F6E\u8BA1\u7B97\u516C\u5F0F"
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_button/* default */.ZP,
|
|
{
|
|
type: "primary",
|
|
disabled: !tabListData.length || !headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]],
|
|
icon: /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-jisuan" }),
|
|
onClick: onComputeClick
|
|
},
|
|
"\u5168\u90E8\u8BA1\u7B97"
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_button/* default */.ZP,
|
|
{
|
|
disabled: !tabListData.length || !headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]],
|
|
onClick: onExportClick,
|
|
type: "default",
|
|
icon: /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-daochubeifen " })
|
|
},
|
|
"\u5BFC\u51FA"
|
|
))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Listmodules.tips }, "\u8BF4\u660E\uFF1A\u6BD5\u4E1A\u8981\u6C42\u4E0B\u6240\u6709\u7684\u6307\u6807\u70B9\u90FD\u8FBE\u6210\u7684\u65F6\u5019\uFF0C\u6BD5\u4E1A\u8981\u6C42\u624D\u7B97\u8FBE\u6210\u3002"), /* @__PURE__ */ _react_17_0_2_react.createElement(TabList, null), actionTabs.key === "\u8BBE\u7F6E\u8BA1\u7B97\u516C\u5F0F" && headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]] && /* @__PURE__ */ _react_17_0_2_react.createElement(CalcModal, null), actionTabs.key === "\u914D\u7F6E\u8FBE\u6210\u9608\u503C" && headerData.active[evaluateList/* evaluateListHeaderKey */.k[1]] && /* @__PURE__ */ _react_17_0_2_react.createElement(ThresholdsModal, null));
|
|
};
|
|
/* harmony default export */ var List = ((0,_umi_production_exports.connect)(
|
|
({
|
|
user,
|
|
loading,
|
|
engineeringNormList
|
|
}) => List_spreadValues({
|
|
user,
|
|
loading
|
|
}, engineeringNormList)
|
|
)(Norm));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 18831:
|
|
/*!************************************************************************!*\
|
|
!*** ./src/pages/Engineering/components/Evaluate/index.ts + 4 modules ***!
|
|
\************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
p: function() { return /* reexport */ Evaluate_PanelTitle; },
|
|
v: function() { return /* reexport */ Evaluate_SelectWrap; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/components/Evaluate/PanelTitle/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var PanelTitlemodules = ({"panelTitleContainer":"panelTitleContainer___Ypuh_"});
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/components/Evaluate/PanelTitle/index.tsx
|
|
|
|
|
|
const PanelTitle = ({ title, style = {} }) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: PanelTitlemodules.panelTitleContainer, style }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, title));
|
|
};
|
|
/* harmony default export */ var Evaluate_PanelTitle = (PanelTitle);
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/components/Evaluate/SelectWrap/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var SelectWrapmodules = ({"selectWrapContainer":"selectWrapContainer___qocIH"});
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/components/Evaluate/SelectWrap/index.tsx
|
|
|
|
|
|
const SelectWrap = ({ title, children }) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: SelectWrapmodules.selectWrapContainer }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, title), children);
|
|
};
|
|
/* harmony default export */ var Evaluate_SelectWrap = (SelectWrap);
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/components/Evaluate/index.ts
|
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |