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.
612 lines
33 KiB
612 lines
33 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[5335],{
|
|
|
|
/***/ 4929:
|
|
/*!************************************************************************!*\
|
|
!*** ./src/pages/Engineering/Lists/CourseMatrix/index.tsx + 1 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 */ CourseMatrix; }
|
|
});
|
|
|
|
// 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/Lists/CourseMatrix/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var CourseMatrixmodules = ({"flex_box_center":"flex_box_center___xNPWD","flex_space_between":"flex_space_between___BPBCq","flex_box_vertical_center":"flex_box_vertical_center___JYI1q","flex_box_center_end":"flex_box_center_end___ngQW8","flex_box_column":"flex_box_column___coHpn","wrap":"wrap___c9DPc","title":"title___FITot","textWrap":"textWrap___zFb5b","textTitle":"textTitle___bsHIA","row":"row___TZQOl","control":"control___TM9z1","label":"label___OFgDw","table":"table___SmEox","tbl":"tbl___mp943","line":"line___Q7IUE","head":"head___iyaG3","list":"list___wUJPB","omit":"omit___pRLmp","headOmit":"headOmit___FUpZW","customModal":"customModal___AOmSA"});
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23852);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(64841);
|
|
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
|
|
var lodash = __webpack_require__(89392);
|
|
// 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/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(6848);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
|
|
var input_number = __webpack_require__(96971);
|
|
// 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);
|
|
// 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/spin/index.js + 1 modules
|
|
var spin = __webpack_require__(71418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(86383);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/empty/index.js + 3 modules
|
|
var empty = __webpack_require__(64165);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
var skeleton = __webpack_require__(2518);
|
|
// 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);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(20008);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(75798);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(19351);
|
|
// EXTERNAL MODULE: ./src/pages/Engineering/util.tsx
|
|
var Engineering_util = __webpack_require__(81951);
|
|
// EXTERNAL MODULE: ./src/pages/Engineering/components/Evaluate/index.ts + 4 modules
|
|
var Evaluate = __webpack_require__(81001);
|
|
;// CONCATENATED MODULE: ./src/pages/Engineering/Lists/CourseMatrix/index.tsx
|
|
var __defProp = Object.defineProperty;
|
|
var __defProps = Object.defineProperties;
|
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
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;
|
|
};
|
|
var __spreadProps = (a, b) => __defProps(a, __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 data = [{
|
|
key: 1,
|
|
name: "\u7F16\u7A0B\u539F\u7406",
|
|
age1: "M",
|
|
age2: "H",
|
|
companyName1: "X",
|
|
companyName2: "X",
|
|
companyName3: "X",
|
|
gender1: "X",
|
|
gender2: "X",
|
|
gender3: "X"
|
|
}, {
|
|
key: 2,
|
|
name: "\u9AD8\u7B49\u6570\u5B66",
|
|
age1: "M",
|
|
age2: "H",
|
|
companyName1: "X",
|
|
companyName2: "C",
|
|
companyName3: "C",
|
|
gender1: "X",
|
|
gender2: "C",
|
|
gender3: "X"
|
|
}];
|
|
const Page = ({
|
|
user,
|
|
dispatch
|
|
}) => {
|
|
var _a;
|
|
const urlParams = (0,_umi_production_exports.useLocation)();
|
|
const initParams = {
|
|
tab: "1",
|
|
ec_major_school_id: null,
|
|
ec_year_id: null
|
|
};
|
|
const [majorData, setMajorData] = (0,_react_17_0_2_react.useState)([]);
|
|
const [yearData, setYearData] = (0,_react_17_0_2_react.useState)([]);
|
|
const [tableData, setTableData] = (0,_react_17_0_2_react.useState)({});
|
|
const [tableWidth, setTableWidth] = (0,_react_17_0_2_react.useState)(0);
|
|
const [column, setColumn] = (0,_react_17_0_2_react.useState)([]);
|
|
const [loading, setLoading] = (0,_react_17_0_2_react.useState)(true);
|
|
const [disabled, setDisabled] = (0,_react_17_0_2_react.useState)(false);
|
|
const [modalLoading, setModalLoading] = (0,_react_17_0_2_react.useState)(false);
|
|
const [visible, setVisible] = (0,_react_17_0_2_react.useState)(false);
|
|
const [noAllowEdit, setNoAllowEdit] = (0,_react_17_0_2_react.useState)(true);
|
|
const [editInputValue, setEditInputValue] = (0,_react_17_0_2_react.useState)({ mid_to_high_number: null, low_to_mid_number: null });
|
|
let [params, setParams] = (0,_react_17_0_2_react.useState)(initParams);
|
|
const [editId, setEditId] = (0,_react_17_0_2_react.useState)(null);
|
|
const editIdValue = (0,_react_17_0_2_react.useRef)("");
|
|
const tableCellTotalWidth = (0,_react_17_0_2_react.useRef)(0);
|
|
const editInputValueRef = (0,_react_17_0_2_react.useRef)({ mid_to_high_number: null, low_to_mid_number: null });
|
|
const paramsRef = (0,_react_17_0_2_react.useRef)(initParams);
|
|
const editIdRef = (0,_react_17_0_2_react.useRef)(null);
|
|
const tableInitRef = (0,_react_17_0_2_react.useRef)([]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a2;
|
|
if ((_a2 = user == null ? void 0 : user.userInfo) == null ? void 0 : _a2.school_id) {
|
|
getMajorData();
|
|
}
|
|
}, [(_a = user == null ? void 0 : user.userInfo) == null ? void 0 : _a.school_id]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
paramsRef.current = params;
|
|
}, [params]);
|
|
const getData = (record, bool) => __async(void 0, null, function* () {
|
|
var _a2;
|
|
const sendData = (0,lodash.cloneDeep)(record);
|
|
Engineering_util/* localSelect */.U.setItem((_a2 = user == null ? void 0 : user.userInfo) == null ? void 0 : _a2.login, [sendData == null ? void 0 : sendData.ec_major_school_id, sendData == null ? void 0 : sendData.ec_year_id]);
|
|
delete sendData.tab;
|
|
if (!bool) {
|
|
setLoading(true);
|
|
}
|
|
const res = yield (0,fetch/* default */.ZP)(`/api/ec_years/${params == null ? void 0 : params.ec_year_id}/graduation_course_supports.json`, {
|
|
method: "get",
|
|
params: sendData
|
|
});
|
|
if (res == null ? void 0 : res.graduation_subitems) {
|
|
setTableData((res == null ? void 0 : res.ec_courses) || []);
|
|
dealData((res == null ? void 0 : res.graduation_subitems) || []);
|
|
tableInitRef.current = res == null ? void 0 : res.graduation_subitems;
|
|
}
|
|
setLoading(false);
|
|
});
|
|
const handleBlur = () => __async(void 0, null, function* () {
|
|
var _a2, _b;
|
|
setEditId(null);
|
|
const rel = editIdRef.current;
|
|
editIdRef.current = null;
|
|
const res = yield (0,fetch/* default */.ZP)(`/api/ec_years/1/graduation_course_supports/create_one.json`, {
|
|
method: "post",
|
|
body: {
|
|
ec_course_id: (_a2 = rel == null ? void 0 : rel.split("-")) == null ? void 0 : _a2[1],
|
|
ec_graduation_subitem_id: (_b = rel == null ? void 0 : rel.split("-")) == null ? void 0 : _b[0],
|
|
weights: editIdValue.current
|
|
}
|
|
});
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("\u4FDD\u5B58\u6210\u529F");
|
|
getData(params, true);
|
|
} else {
|
|
dealData((0,lodash.cloneDeep)(tableInitRef.current));
|
|
}
|
|
});
|
|
const handleClickNum = (id) => {
|
|
setEditId(id);
|
|
editIdRef.current = id;
|
|
dealData((0,lodash.cloneDeep)(tableInitRef.current));
|
|
};
|
|
const dealData = (d) => {
|
|
if (!(d == null ? void 0 : d.length)) {
|
|
return;
|
|
}
|
|
tableCellTotalWidth.current = 0;
|
|
let cloneData = (0,lodash.cloneDeep)(d);
|
|
cloneData[0].title = /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CourseMatrixmodules.line }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u6BD5\u4E1A\u8981\u6C42\u6307\u6807\u70B9"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u8BFE\u7A0B\u540D\u79F0"));
|
|
cloneData[0].width = "207px";
|
|
cloneData[0].render = (v, r) => /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CourseMatrixmodules.omit }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { title: v }, v), r.warning && /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: "\u8BE5\u8BFE\u7A0B\u6743\u91CD\u4E4B\u548C\u4E0D\u7B49\u4E8E1\uFF0C\u53EF\u80FD\u5BFC\u81F4\u8BA1\u7B97\u7ED3\u679C\u4E0D\u51C6\u786E\uFF01" }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { style: { color: "#FF9D18" }, className: "iconfont icon-hongsejingshi ml5" })));
|
|
const render = (k, g, id) => {
|
|
var _a2, _b;
|
|
let realV1 = "";
|
|
let realV2 = "";
|
|
if (k) {
|
|
realV1 = k.split("-")[0];
|
|
realV2 = k.split("-")[1];
|
|
}
|
|
let realV = ((_a2 = paramsRef.current) == null ? void 0 : _a2.tab) === "1" ? realV1 : realV2;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, editIdRef.current === `${id}-${g.ec_course_id}` ? /* @__PURE__ */ _react_17_0_2_react.createElement(input_number/* default */.Z, { key: `${id}-${g.ec_course_id}`, autoFocus: true, onFocus: () => {
|
|
editIdValue.current = realV2;
|
|
}, defaultValue: realV2, parser, onBlur: handleBlur, step: 0.1, onChange: (e) => editIdValue.current = e, style: { width: "auto" } }) : /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, { key: `${id}-${g.ec_course_id}` }, realV === "X" && /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: "\u8BE5\u8BFE\u7A0B\u4E0E\u6BD5\u4E1A\u8981\u6C42\u6307\u6807\u70B9\u6CA1\u6709\u5BF9\u5E94\u5173\u7CFB\uFF0C\u4E0D\u80FD\u8F93\u5165\u6743\u91CD\u3002" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { style: { color: "#B1BACD", transform: "scale(0.6)", display: "inline-block" }, className: "iconfont icon-wu" }))), realV !== "X" && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"span",
|
|
{
|
|
className: CourseMatrixmodules.tbl,
|
|
onClick: () => handleClickNum(`${id}-${g.ec_course_id}`),
|
|
style: { color: realV === "H" ? "#0152D9" : realV === "M" ? "#07C160" : realV === "L" ? "#FF9D18" : "#0152D9" }
|
|
},
|
|
realV ? /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: ((_b = paramsRef.current) == null ? void 0 : _b.tab) === "1" ? `\u6743\u91CD:${realV2}` : `\u5173\u8054\u5EA6:${realV1}` }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, realV)) : "\u8F93\u5165\u6570\u5B57"
|
|
)));
|
|
};
|
|
cloneData = cloneData.map((e, ei) => {
|
|
var _a2, _b, _c;
|
|
if (!ei) {
|
|
return e;
|
|
}
|
|
tableCellTotalWidth.current = tableCellTotalWidth.current + 120 * (((_a2 = e == null ? void 0 : e.children) == null ? void 0 : _a2.length) || 1);
|
|
return __spreadProps(__spreadValues({}, e), {
|
|
ellipsis: true,
|
|
width: 120 * (((_b = e == null ? void 0 : e.children) == null ? void 0 : _b.length) || 1),
|
|
// title: <span style={{ padding: '0 6px' }}>{e.title}</span>,
|
|
// title: <span title={e.title} style={{ width: 120 * (e?.children?.length || 1) }} className={styles.headOmit}>{e.title}</span>,
|
|
children: (_c = e == null ? void 0 : e.children) == null ? void 0 : _c.map((r, ri) => {
|
|
return __spreadProps(__spreadValues({}, r), {
|
|
title: /* @__PURE__ */ _react_17_0_2_react.createElement("span", { key: Math.random() }, /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: r.content }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, r.title)), r.warning && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
tooltip/* default */.Z,
|
|
{
|
|
title: "\u8BE5\u6307\u6807\u70B9\u6743\u91CD\u4E4B\u548C\u4E0D\u7B49\u4E8E1 \uFF0C\u53EF\u80FD\u5BFC\u81F4\u8BA1\u7B97\u7ED3\u679C\u4E0D\u51C6\u786E\uFF01"
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("i", { style: { color: "#FF9D18" }, className: "iconfont icon-hongsejingshi ml5" })
|
|
)),
|
|
render: (k, g) => render(k, g, r.id)
|
|
});
|
|
})
|
|
});
|
|
});
|
|
setColumn(cloneData || []);
|
|
};
|
|
const exportExcel = () => {
|
|
const sendData = (0,lodash.cloneDeep)(params);
|
|
delete sendData.tab;
|
|
(0,util/* downLoadFile */.FH)("", (0,util/* setUrlQuery */.NY)({ url: env/* default */.Z.API_SERVER + `/api/ec_years/${params.ec_year_id}/graduation_course_supports.xlsx`, query: sendData }));
|
|
};
|
|
const getMajorData = () => __async(void 0, null, function* () {
|
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
const res1 = yield (0,fetch/* default */.ZP)(
|
|
`/api/schools/${(_a2 = user == null ? void 0 : user.userInfo) == null ? void 0 : _a2.school_id}/ec_majors/get_major_list.json`,
|
|
{ method: "get" }
|
|
);
|
|
if (!((_c = (_b = res1 == null ? void 0 : res1.data) == null ? void 0 : _b[0]) == null ? void 0 : _c.ec_major_school_id)) {
|
|
setLoading(false);
|
|
setDisabled(true);
|
|
return;
|
|
}
|
|
const item = Engineering_util/* localSelect */.U.getItem((_d = user == null ? void 0 : user.userInfo) == null ? void 0 : _d.login);
|
|
const ec_major_school_id = Number((_e = urlParams == null ? void 0 : urlParams.query) == null ? void 0 : _e.ec_major_school_id) || item[0] || ((_g = (_f = res1 == null ? void 0 : res1.data) == null ? void 0 : _f[0]) == null ? void 0 : _g.ec_major_school_id);
|
|
const res2 = yield (0,fetch/* default */.ZP)(`/api/ec_major_schools/${ec_major_school_id}/ec_years/get_year_list.json`, { method: "get" });
|
|
params.ec_major_school_id = ec_major_school_id;
|
|
params.ec_year_id = Number((_h = urlParams == null ? void 0 : urlParams.query) == null ? void 0 : _h.ec_year_id) || item[1] || ((_j = (_i = res2 == null ? void 0 : res2.data) == null ? void 0 : _i[0]) == null ? void 0 : _j.ec_year_id);
|
|
setMajorData((res1 == null ? void 0 : res1.data) || []);
|
|
setYearData((res2 == null ? void 0 : res2.data) || []);
|
|
setParams(params);
|
|
getData(params);
|
|
});
|
|
const getYearData = (id) => __async(void 0, null, function* () {
|
|
var _a2, _b;
|
|
const res2 = yield (0,fetch/* default */.ZP)(`/api/ec_major_schools/${id}/ec_years/get_year_list.json`, { method: "get" });
|
|
params.ec_major_school_id = id;
|
|
params.ec_year_id = (_b = (_a2 = res2 == null ? void 0 : res2.data) == null ? void 0 : _a2[0]) == null ? void 0 : _b.ec_year_id;
|
|
setYearData((res2 == null ? void 0 : res2.data) || []);
|
|
setParams(params);
|
|
getData(params);
|
|
});
|
|
const handleSelect = (v, type) => {
|
|
params[type] = v;
|
|
if (type === "ec_major_school_id") {
|
|
getYearData(v);
|
|
return;
|
|
}
|
|
if (type === "ec_year_id") {
|
|
setParams(__spreadValues({}, params));
|
|
getData(params);
|
|
}
|
|
};
|
|
const handleValue = (v, type) => {
|
|
const { mid_to_high_number, low_to_mid_number } = editInputValue;
|
|
let num = v.target.value;
|
|
num = isNaN(num) ? "" : num;
|
|
if (Number(num) !== 0) {
|
|
const n = Number(num);
|
|
if (type === "mid_to_high_number" && !(n > (low_to_mid_number || 0) && n < 1)) {
|
|
num = "";
|
|
}
|
|
if (type === "low_to_mid_number" && !(n > 0 && n < (mid_to_high_number || 1))) {
|
|
num = "";
|
|
}
|
|
}
|
|
if (num[0] === ".") {
|
|
num = "";
|
|
}
|
|
editInputValue[type] = num;
|
|
setEditInputValue(__spreadValues({}, editInputValue));
|
|
};
|
|
const handleTypeChange = (e, activeKey) => {
|
|
params.tab = activeKey;
|
|
setParams(__spreadValues({}, params));
|
|
dealData((0,lodash.cloneDeep)(tableInitRef.current));
|
|
};
|
|
const columns = [
|
|
{
|
|
title: "\u8BFE\u7A0B\u540D\u79F0",
|
|
dataIndex: "name",
|
|
fixed: "left"
|
|
},
|
|
{
|
|
title: "1.\u95EE\u9898\u5206\u6790",
|
|
align: "center",
|
|
children: [
|
|
{
|
|
align: "center",
|
|
title: "\u6307\u6807\u70B91-1",
|
|
dataIndex: "age1"
|
|
},
|
|
{
|
|
align: "center",
|
|
title: "\u6307\u6807\u70B91-2",
|
|
dataIndex: "age2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
align: "center",
|
|
title: "2.\u8BBE\u8BA1/\u5F00\u53D1\u89E3\u51B3\u65B9\u6848",
|
|
children: [
|
|
{
|
|
title: "\u6307\u6807\u70B92-1",
|
|
align: "center",
|
|
dataIndex: "companyName1"
|
|
},
|
|
{
|
|
title: "\u6307\u6807\u70B92-2",
|
|
align: "center",
|
|
dataIndex: "companyName2"
|
|
},
|
|
{
|
|
title: "\u6307\u6807\u70B92-3",
|
|
align: "center",
|
|
dataIndex: "companyName3"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: "3.\u8BED\u8A00\u89E3\u51B3",
|
|
align: "center",
|
|
children: [
|
|
{
|
|
title: "\u6307\u6807\u70B93-1",
|
|
align: "center",
|
|
dataIndex: "gender1"
|
|
},
|
|
{
|
|
title: "\u6307\u6807\u70B93-2",
|
|
align: "center",
|
|
dataIndex: "gender2"
|
|
},
|
|
{
|
|
title: "\u6307\u6807\u70B93-3",
|
|
align: "center",
|
|
dataIndex: "gender3"
|
|
}
|
|
]
|
|
}
|
|
];
|
|
const parser = (v) => {
|
|
let num = v;
|
|
num = isNaN(num) ? "" : num;
|
|
if (num[0] === ".") {
|
|
num = "";
|
|
}
|
|
return num;
|
|
};
|
|
const handlerRelevance = () => __async(void 0, null, function* () {
|
|
setModalLoading(true);
|
|
setVisible(true);
|
|
const res = yield (0,fetch/* default */.ZP)(`/api/ec_years/${params.ec_year_id}/ec_course_support_relations.json`, { method: "get" });
|
|
if (res) {
|
|
setModalLoading(false);
|
|
setEditInputValue(__spreadValues({}, res));
|
|
editInputValueRef.current = __spreadValues({}, res);
|
|
}
|
|
});
|
|
const handlerRelevanceAffirm = () => __async(void 0, null, function* () {
|
|
const { mid_to_high_number, low_to_mid_number } = editInputValue;
|
|
if (!mid_to_high_number || !low_to_mid_number) {
|
|
message/* default */.ZP.warning("\u8F93\u5165\u6846\u4E0D\u80FD\u4E3A\u7A7A");
|
|
return;
|
|
}
|
|
if (Number(mid_to_high_number) === 0 || Number(low_to_mid_number) === 0) {
|
|
message/* default */.ZP.warning("\u5FC5\u987B\u8F93\u5165\u5927\u4E8E0\u4E14\u5C0F\u4E8E1\u7684\u6570\u5B57");
|
|
return;
|
|
}
|
|
const res = yield (0,fetch/* default */.ZP)(`/api/ec_years/${params.ec_year_id}/ec_course_support_relations.json`, { method: "put", body: editInputValue });
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("\u4FDD\u5B58\u6210\u529F");
|
|
setNoAllowEdit(true);
|
|
}
|
|
});
|
|
const scroll = tableData.length > 11 ? { x: tableCellTotalWidth.current, y: 452 } : { x: tableCellTotalWidth.current };
|
|
const isDisabled = loading || disabled;
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CourseMatrixmodules.wrap }, /* @__PURE__ */ _react_17_0_2_react.createElement(Evaluate/* PanelTitle */.p, { title: "\u8BFE\u7A0B\u77E9\u9635", style: { padding: "12px 0 10px 20px" } }), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CourseMatrixmodules.control }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CourseMatrixmodules.label }, "\u8BA4\u8BC1\u4E13\u4E1A"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_select["default"], { disabled: isDisabled, style: { width: 240 }, placeholder: "\u8BF7\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A", value: params == null ? void 0 : params.ec_major_school_id, onChange: (v) => handleSelect(v, "ec_major_school_id") }, majorData == null ? void 0 : majorData.map((e, i) => /* @__PURE__ */ _react_17_0_2_react.createElement(es_select["default"].Option, { key: i, value: e.ec_major_school_id }, e.name))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CourseMatrixmodules.label }, "\u8BA4\u8BC1\u5C4A\u522B"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_select["default"], { disabled: isDisabled, style: { width: 140 }, placeholder: "\u8BF7\u9009\u62E9\u5C4A\u522B", value: params == null ? void 0 : params.ec_year_id, onChange: (v) => handleSelect(v, "ec_year_id") }, yearData == null ? void 0 : yearData.map((e, i) => /* @__PURE__ */ _react_17_0_2_react.createElement(es_select["default"].Option, { key: i, value: e.ec_year_id }, e.year))), /* @__PURE__ */ _react_17_0_2_react.createElement(es_button/* default */.ZP, { disabled: isDisabled, style: { marginLeft: "auto", transition: "0s", height: 30 }, onClick: () => handlerRelevance() }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-daochubeifen font14 mr5" }), "\u5173\u8054\u5EA6\u8303\u56F4\u8BBE\u7F6E"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_button/* default */.ZP, { disabled: isDisabled || !tableData.length, style: { transition: "0s", height: 30 }, className: "ml10", onClick: () => exportExcel() }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-daochubeifen font14 mr5" }), "\u5BFC\u51FA")), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CourseMatrixmodules.textWrap }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CourseMatrixmodules.textTitle }, "\u8BFE\u7A0B\u4E0E\u6BD5\u4E1A\u8981\u6C42\u6307\u6807\u70B9\u5173\u7CFB\u77E9\u9635"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CourseMatrixmodules.row }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: "#0152D9" } }, "H"), "\u8868\u793A\u5173\u8054\u5EA6\u9AD8\uFF0C", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: "#07C160" } }, "M"), "\u8868\u793A\u5173\u8054\u5EA6\u4E2D\uFF0C", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { style: { color: "#FF9D18" } }, "L"), "\u8868\u793A\u5173\u8054\u5EA6\u4F4E"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "mr20 font14" }, "\u5C55\u793A\u65B9\u5F0F"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_radio/* default */.ZP, { disabled: isDisabled, checked: params.tab === "1", onChange: (e) => handleTypeChange(e, "1") }, "\u5B57\u6BCD"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_radio/* default */.ZP, { disabled: isDisabled, checked: params.tab === "2", onChange: (e) => handleTypeChange(e, "2") }, "\u6570\u5B57")))), /* @__PURE__ */ _react_17_0_2_react.createElement(spin/* default */.Z, { spinning: loading }, !!(tableData == null ? void 0 : tableData.length) ? /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: CourseMatrixmodules.table }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
table["default"],
|
|
{
|
|
rowKey: "ec_course_id",
|
|
columns: column,
|
|
dataSource: tableData,
|
|
bordered: true,
|
|
size: "middle",
|
|
scroll,
|
|
pagination: false
|
|
}
|
|
)) : /* @__PURE__ */ _react_17_0_2_react.createElement(empty/* default */.Z, { style: { padding: "70px 0" } })), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
modal["default"],
|
|
{
|
|
title: "\u5173\u8054\u5EA6\u8303\u56F4\u8BBE\u7F6E",
|
|
open: visible,
|
|
centered: true,
|
|
onCancel: () => {
|
|
setVisible(false);
|
|
getData(params);
|
|
},
|
|
width: "680px",
|
|
className: CourseMatrixmodules.customModal,
|
|
footer: null
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(skeleton/* default */.Z, { loading: modalLoading }, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "mb20 ml40", style: { color: "#464F66" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u8BF4\u660E\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "1.\u8303\u56F4\u89C4\u5219\u8F93\u5165\u6846\u5FC5\u987B\u8F93\u5165\u5927\u4E8E0\u4E14\u5C0F\u4E8E1\u7684\u6570\u5B57\uFF1B"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mb10" }, "2.\u8303\u56F4\u89C4\u5219\u7684\u524D\u4E00\u4E2A\u6570\u5B57\u5FC5\u987B\u5C0F\u4E8E\u540E\u4E00\u4E2A\u6570\u5B57\u3002")), /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { className: CourseMatrixmodules.head }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 126 } }, "\u5173\u8054\u5EA6"), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 120 } }, "\u5173\u8054\u5EA6\u7B26\u53F7"), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: 1 }, "\u8303\u56F4\u89C4\u5219"), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 120 } }, "\u64CD\u4F5C")), /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { className: CourseMatrixmodules.list }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 126 } }, "\u9AD8"), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 120 } }, "H"), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
col/* default */.Z,
|
|
{
|
|
style: { display: "flex", justifyContent: "center", alignItems: "center" },
|
|
flex: 1
|
|
},
|
|
"(",
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
input["default"],
|
|
{
|
|
disabled: noAllowEdit,
|
|
onChange: (e) => handleValue(e, "mid_to_high_number"),
|
|
value: editInputValue.mid_to_high_number,
|
|
step: 1
|
|
}
|
|
),
|
|
",",
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
input["default"],
|
|
{
|
|
value: 1,
|
|
disabled: true
|
|
}
|
|
),
|
|
"]"
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 120, borderLeft: "1px solid #EEF2F8", borderBottom: 0 } })), /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { className: CourseMatrixmodules.list }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 126 } }, "\u4E2D"), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 120 } }, "M"), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
col/* default */.Z,
|
|
{
|
|
style: { display: "flex", justifyContent: "center", alignItems: "center" },
|
|
flex: 1
|
|
},
|
|
"(",
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
input["default"],
|
|
{
|
|
disabled: noAllowEdit,
|
|
onChange: (e) => handleValue(e, "low_to_mid_number"),
|
|
value: editInputValue.low_to_mid_number,
|
|
step: 1
|
|
}
|
|
),
|
|
",",
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
input["default"],
|
|
{
|
|
disabled: noAllowEdit,
|
|
onChange: (e) => handleValue(e, "mid_to_high_number"),
|
|
value: editInputValue.mid_to_high_number,
|
|
step: 1
|
|
}
|
|
),
|
|
"]"
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 120, borderLeft: "1px solid #EEF2F8", borderBottom: 0, display: "flex", justifyContent: "center", alignItems: "center" } }, noAllowEdit ? /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: "\u7F16\u8F91" }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { onClick: () => setNoAllowEdit(false), className: "iconfont icon-bianji7 current c-gcrz-primary" })) : /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: "\u4FDD\u5B58" }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { onClick: handlerRelevanceAffirm, className: "iconfont icon-baocun1 mr20 current c-gcrz-primary" })), /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: "\u53D6\u6D88" }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { onClick: () => {
|
|
setNoAllowEdit(true);
|
|
setEditInputValue(__spreadValues({}, editInputValueRef.current));
|
|
}, className: "iconfont icon-quxiao current c-gcrz-primary" }))))), /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { style: { marginBottom: 20 }, className: CourseMatrixmodules.list }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 126 } }, "\u4F4E"), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 120 } }, "L"), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
col/* default */.Z,
|
|
{
|
|
style: { display: "flex", justifyContent: "center", alignItems: "center" },
|
|
flex: 1
|
|
},
|
|
"(",
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
input["default"],
|
|
{
|
|
disabled: true,
|
|
value: 0
|
|
}
|
|
),
|
|
",",
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
input["default"],
|
|
{
|
|
onChange: (e) => handleValue(e, "low_to_mid_number"),
|
|
value: editInputValue.low_to_mid_number,
|
|
disabled: noAllowEdit,
|
|
step: 1
|
|
}
|
|
),
|
|
"]"
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { style: { width: 120, borderLeft: "1px solid #EEF2F8" } })))
|
|
));
|
|
};
|
|
/* harmony default export */ var CourseMatrix = ((0,_umi_production_exports.connect)(
|
|
({
|
|
user
|
|
}) => ({
|
|
user
|
|
})
|
|
)(Page));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 81001:
|
|
/*!************************************************************************!*\
|
|
!*** ./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
|
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |