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.
355 lines
33 KiB
355 lines
33 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[5125],{
|
|
|
|
/***/ 25728:
|
|
/*!************************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/DetailedAnalysis/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 */ DetailedAnalysis; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23175);
|
|
// 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/breadcrumb/index.js + 6 modules
|
|
var breadcrumb = __webpack_require__(66104);
|
|
// 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/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/table/index.js + 85 modules
|
|
var table = __webpack_require__(72315);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules
|
|
var ArrowLeftOutlined = __webpack_require__(68742);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/DetailedAnalysis/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var DetailedAnalysismodules = ({"flex_box_center":"flex_box_center___Qx5by","flex_space_between":"flex_space_between___Jovvb","flex_box_vertical_center":"flex_box_vertical_center___ZgKxt","flex_box_center_end":"flex_box_center_end___rLoZQ","flex_box_column":"flex_box_column___H7gvw","title":"title___mKlZQ","link":"link____MbLK","wrap":"wrap___M54Mm","info":"info___LS1sD","name":"name___XFTyf","box":"box___MY5TN","tab":"tab___Pts7W","group":"group___KTR8B","modal":"modal___wynb6","head":"head___rpYjK","des":"des___PNfp8","sub":"sub___LF5wd","tags":"tags___tdrDl"});
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(94754);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(9498);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(13316);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/DetailedAnalysis/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 Export = ({
|
|
exercise,
|
|
user,
|
|
dispatch
|
|
}) => {
|
|
var _a, _b, _c;
|
|
const isExam = (_a = window.location.pathname) == null ? void 0 : _a.includes("exercise");
|
|
const path = isExam ? "exercise" : "shixun_homework";
|
|
const urlParams = (0,_umi_production_exports.useParams)();
|
|
const { userInfo } = user;
|
|
const [data, setData] = (0,_react_17_0_2_react.useState)({});
|
|
const [modalData, setModalData] = (0,_react_17_0_2_react.useState)();
|
|
const [height, setHeight] = (0,_react_17_0_2_react.useState)(0);
|
|
const [list, setList] = (0,_react_17_0_2_react.useState)([]);
|
|
const [tableLoading, setTableLoading] = (0,_react_17_0_2_react.useState)(true);
|
|
const [qualityshow, setqualityshow] = (0,_react_17_0_2_react.useState)(false);
|
|
const [total, setTotal] = (0,_react_17_0_2_react.useState)(0);
|
|
const [params, setParams] = (0,_react_17_0_2_react.useState)({
|
|
type: "2",
|
|
degree: 0,
|
|
page: 1,
|
|
limit: 10,
|
|
id: urlParams.studentId
|
|
});
|
|
const { bug, vulnerability, codeSmall } = (data == null ? void 0 : data.analysis_data) || {};
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
getData();
|
|
getList(params);
|
|
}, []);
|
|
const getData = () => __async(void 0, null, function* () {
|
|
const res = yield (0,fetch/* default */.ZP)("/api/code_analyses_detail/analyse_detail.json", {
|
|
method: "get",
|
|
params: {
|
|
id: urlParams.studentId
|
|
}
|
|
});
|
|
if (res.status === 0) {
|
|
setData(res.data);
|
|
}
|
|
});
|
|
const getList = (params2) => __async(void 0, null, function* () {
|
|
var _a2;
|
|
setTableLoading(true);
|
|
const res = yield (0,fetch/* default */.ZP)("/api/code_analyses_detail/analyse_detail_list.json", {
|
|
method: "get",
|
|
params: params2
|
|
});
|
|
if (res.status === 0) {
|
|
setList(res.data.recordList);
|
|
setTotal((_a2 = res.data) == null ? void 0 : _a2.recordSum);
|
|
}
|
|
setTableLoading(false);
|
|
});
|
|
const iconJson = {
|
|
"\u963B\u65AD": /* @__PURE__ */ _react_17_0_2_react.createElement("i", { style: { color: "#D4333F" }, className: "iconfont icon-zuduan font14" }),
|
|
"\u4E25\u91CD": /* @__PURE__ */ _react_17_0_2_react.createElement("i", { style: { color: "#D4333F" }, className: "iconfont icon-yanzhong font14" }),
|
|
"\u4E3B\u8981": /* @__PURE__ */ _react_17_0_2_react.createElement("i", { style: { color: "#D4333F" }, className: "iconfont icon-zhuyao font14" }),
|
|
"\u6B21\u8981": /* @__PURE__ */ _react_17_0_2_react.createElement("i", { style: { color: "#B0D513" }, className: "iconfont icon-ciyao font14" }),
|
|
"\u63D0\u793A": /* @__PURE__ */ _react_17_0_2_react.createElement("i", { style: { color: "#4B9FD5" }, className: "iconfont icon-tishi10 font14" }),
|
|
"Bug": /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-bug" }),
|
|
"\u6F0F\u6D1E": /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-loudong1" }),
|
|
"\u4EE3\u7801\u89C4\u8303": /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-yiwei" })
|
|
};
|
|
const columns = [
|
|
{
|
|
title: "\u5E8F\u53F7",
|
|
dataIndex: "name",
|
|
align: "left",
|
|
width: 80,
|
|
render: (text, record, index) => params.limit * (params.page - 1) + index + 1
|
|
},
|
|
{
|
|
title: `${params.type === "2" ? "Bug" : params.type === "3" ? "\u6F0F\u6D1E" : "\u89C4\u8303\u5F02\u5E38"}\u540D\u79F0`,
|
|
align: "left",
|
|
ellipsis: true,
|
|
dataIndex: "name",
|
|
render: (r, v) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"a",
|
|
{
|
|
target: "_blank",
|
|
href: `/classrooms/${urlParams.coursesId}/${path}/${urlParams.exerciseId}/analysis/${urlParams.studentId}/code?name=${data == null ? void 0 : data.user_name}&rule_id=${v.ruleId}&uuid=${v.uuid}&issueId=${v.issueId}&language=${v.language}&rowNumber=${v.rowNumber}`,
|
|
className: DetailedAnalysismodules.link
|
|
},
|
|
r
|
|
);
|
|
}
|
|
},
|
|
{
|
|
title: "\u6587\u4EF6\u8DEF\u5F84",
|
|
align: "left",
|
|
ellipsis: true,
|
|
dataIndex: "filePath"
|
|
},
|
|
{
|
|
title: "\u4E25\u91CD\u7A0B\u5EA6",
|
|
align: "left",
|
|
width: 90,
|
|
dataIndex: "level",
|
|
render: (v) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, iconJson[v], /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "ml5" }, v));
|
|
}
|
|
},
|
|
{
|
|
title: "\u64CD\u4F5C",
|
|
width: 154,
|
|
align: "left",
|
|
dataIndex: "action",
|
|
render: (record, v) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { justify: "space-between", align: "middle" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { onClick: () => getModalData(v), className: "current c-light-primary" }, "\u95EE\u9898\u5206\u6790"), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"a",
|
|
{
|
|
target: "_blank",
|
|
href: `/classrooms/${urlParams.coursesId}/${path}/${urlParams.exerciseId}/analysis/${urlParams.studentId}/code?name=${data == null ? void 0 : data.user_name}&rule_id=${v.ruleId}&uuid=${v.uuid}&issueId=${v.issueId}&language=${v.language}&rowNumber=${v.rowNumber}`,
|
|
className: "current c-light-primary"
|
|
},
|
|
"\u4EE3\u7801\u8BE6\u60C5"
|
|
));
|
|
}
|
|
}
|
|
];
|
|
const handleTabsChange = (activeKey) => {
|
|
params.page = 1;
|
|
params.type = activeKey;
|
|
setParams(__spreadValues({}, params));
|
|
getList(params);
|
|
};
|
|
const handleCheck = (e) => {
|
|
params.page = 1;
|
|
params.degree = e.target.value;
|
|
setParams(__spreadValues({}, params));
|
|
getList(params);
|
|
};
|
|
const handleChangePage = (param) => {
|
|
params.page = param == null ? void 0 : param.current;
|
|
params.limit = param == null ? void 0 : param.pageSize;
|
|
setParams(__spreadValues({}, params));
|
|
getList(params);
|
|
};
|
|
const getModalData = (v) => __async(void 0, null, function* () {
|
|
const res = yield (0,fetch/* default */.ZP)("/api/code_analyses_detail/problem_analysis.json", {
|
|
method: "get",
|
|
params: {
|
|
rule_id: v.ruleId
|
|
}
|
|
});
|
|
if (res.status === 0) {
|
|
setModalData(__spreadProps(__spreadValues({}, res.data), {
|
|
level: v.level,
|
|
type: params.type === "2" ? "Bug" : params.type === "3" ? "\u6F0F\u6D1E" : "\u4EE3\u7801\u89C4\u8303"
|
|
}));
|
|
setHeight(32);
|
|
}
|
|
});
|
|
let qualityList = [
|
|
{ live: "A", gz: "0\u4E2A\u9519\u8BEF", ld: "0\u4E2A\u6F0F\u6D1E", gf: "0 - 5%" },
|
|
{ live: "B", gz: "\u81F3\u5C111\u4E2A\u6B21\u8981\u9519\u8BEF", ld: "\u81F3\u5C111\u4E2A\u6B21\u8981\u6F0F\u6D1E", gf: "6% - 10%" },
|
|
{ live: "C", gz: "\u81F3\u5C111\u4E2A\u4E3B\u8981\u9519\u8BEF", ld: "\u81F3\u5C111\u4E2A\u4E3B\u8981\u6F0F\u6D1E", gf: "11% - 20%" },
|
|
{ live: "D", gz: "\u81F3\u5C111\u4E2A\u4E25\u91CD\u9519\u8BEF", ld: "\u81F3\u5C111\u4E2A\u4E25\u91CD\u6F0F\u6D1E", gf: "21% - 50%" },
|
|
{ live: "E", gz: "\u81F3\u5C111\u4E2A\u963B\u65AD\u9519\u8BEF", ld: "\u81F3\u5C111\u4E2A\u963B\u65AD\u6F0F\u6D1E", gf: "\u8D85\u8FC750%" }
|
|
];
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("section", { className: "edu-container" }, /* @__PURE__ */ _react_17_0_2_react.createElement("section", { className: "animated fadeIn" }, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: "mt10" }, userInfo && /* @__PURE__ */ _react_17_0_2_react.createElement(breadcrumb/* default */.Z, { separator: ">" }, /* @__PURE__ */ _react_17_0_2_react.createElement(breadcrumb/* default */.Z.Item, null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
_umi_production_exports.Link,
|
|
{
|
|
to: `/classrooms/${urlParams.coursesId}/${path}`
|
|
},
|
|
(_b = userInfo == null ? void 0 : userInfo.course) == null ? void 0 : _b.course_name
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(breadcrumb/* default */.Z.Item, null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
_umi_production_exports.Link,
|
|
{
|
|
to: `/classrooms/${urlParams.coursesId}/${path}`
|
|
},
|
|
isExam ? "\u8003\u8BD5" : "\u5B9E\u8BAD",
|
|
"\u5217\u8868"
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(breadcrumb/* default */.Z.Item, null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
_umi_production_exports.Link,
|
|
{
|
|
to: `/classrooms/${urlParams.coursesId}/${path}/${urlParams == null ? void 0 : urlParams.exerciseId}/detail`
|
|
},
|
|
isExam ? "\u8BD5\u5377" : "\u4F5C\u4E1A",
|
|
"\u8BE6\u60C5"
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(breadcrumb/* default */.Z.Item, null, data == null ? void 0 : data.user_name))), /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: [DetailedAnalysismodules.title, "mt20"].join(" ") }, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { style: { width: "100%" } }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: "1", style: { lineHeight: "24px" } }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
_umi_production_exports.Link,
|
|
{
|
|
to: `/classrooms/${urlParams.coursesId}/${path}/${urlParams == null ? void 0 : urlParams.exerciseId}/detail`
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(ArrowLeftOutlined/* default */.Z, { className: "font16 c-black" })
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement("strong", { className: "font20 ml5" }, data == null ? void 0 : data.name), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "iconfont icon-a-wenhaobeifen2", onClick: () => {
|
|
setqualityshow(true);
|
|
}, style: { fontWeight: 800, color: "#0152d9", float: "right", cursor: "pointer" } }, "\u89C4\u5219\u8BF4\u660E"))))), /* @__PURE__ */ _react_17_0_2_react.createElement("section", { className: DetailedAnalysismodules.wrap }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: DetailedAnalysismodules.info }, /* @__PURE__ */ _react_17_0_2_react.createElement("img", { src: `${env/* default */.Z.IMG_SERVER}/images/${data == null ? void 0 : data.avatar}`, alt: "" }), /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { style: { marginLeft: 30 } }, /* @__PURE__ */ _react_17_0_2_react.createElement("li", { className: DetailedAnalysismodules.name }, data == null ? void 0 : data.user_name), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u5B66\u53F7\uFF1A"), data == null ? void 0 : data.student_number), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u4EE3\u7801\u884C\u6570\uFF1A"), data == null ? void 0 : data.total_row_number)), /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { style: { marginTop: 65 } }, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u5206\u73ED\uFF1A"), data == null ? void 0 : data.group_course_name), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u590D\u6742\u4EE3\u7801\uFF1A"), data == null ? void 0 : data.complexity)), /* @__PURE__ */ _react_17_0_2_react.createElement("ol", null, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, "\u8D28\u91CF\u8BC4\u5206\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, data == null ? void 0 : data.quality_score))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: DetailedAnalysismodules.box }, /* @__PURE__ */ _react_17_0_2_react.createElement("ul", null, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: "mb20" }, bug == null ? void 0 : bug.total), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u7F3A\u9677")), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u7B49\u7EA7\uFF1A", /* @__PURE__ */ _react_17_0_2_react.createElement("b", null, bug == null ? void 0 : bug.levelStr)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u963B\u65AD"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#A73E38", width: (bug == null ? void 0 : bug.blocker) === 0 ? 0 : `${(bug == null ? void 0 : bug.blocker) / (bug == null ? void 0 : bug.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, bug == null ? void 0 : bug.blocker)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u4E25\u91CD"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#DB544D", width: (bug == null ? void 0 : bug.critical) === 0 ? 0 : `${(bug == null ? void 0 : bug.critical) / (bug == null ? void 0 : bug.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, bug == null ? void 0 : bug.critical)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u4E3B\u8981"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#F7AB3E", width: (bug == null ? void 0 : bug.major) === 0 ? 0 : `${(bug == null ? void 0 : bug.major) / (bug == null ? void 0 : bug.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, bug == null ? void 0 : bug.major)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u6B21\u8981"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#E7DF37", width: (bug == null ? void 0 : bug.minor) === 0 ? 0 : `${(bug == null ? void 0 : bug.minor) / (bug == null ? void 0 : bug.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, bug == null ? void 0 : bug.minor)))), /* @__PURE__ */ _react_17_0_2_react.createElement("ul", null, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: "mb20" }, vulnerability == null ? void 0 : vulnerability.total), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u6F0F\u6D1E")), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u7B49\u7EA7\uFF1A", /* @__PURE__ */ _react_17_0_2_react.createElement("b", null, vulnerability == null ? void 0 : vulnerability.levelStr)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u963B\u65AD"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#A73E38", width: (vulnerability == null ? void 0 : vulnerability.blocker) === 0 ? 0 : `${(vulnerability == null ? void 0 : vulnerability.blocker) / (vulnerability == null ? void 0 : vulnerability.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, vulnerability == null ? void 0 : vulnerability.blocker)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u4E25\u91CD"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#DB544D", width: (vulnerability == null ? void 0 : vulnerability.critical) === 0 ? 0 : `${(vulnerability == null ? void 0 : vulnerability.critical) / (vulnerability == null ? void 0 : vulnerability.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, vulnerability == null ? void 0 : vulnerability.critical)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u4E3B\u8981"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#F7AB3E", width: (vulnerability == null ? void 0 : vulnerability.major) === 0 ? 0 : `${(vulnerability == null ? void 0 : vulnerability.major) / (vulnerability == null ? void 0 : vulnerability.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, vulnerability == null ? void 0 : vulnerability.major)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u6B21\u8981"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#E7DF37", width: (vulnerability == null ? void 0 : vulnerability.minor) === 0 ? 0 : `${(vulnerability == null ? void 0 : vulnerability.minor) / (vulnerability == null ? void 0 : vulnerability.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, vulnerability == null ? void 0 : vulnerability.minor)))), /* @__PURE__ */ _react_17_0_2_react.createElement("ul", null, /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: "mb20" }, codeSmall == null ? void 0 : codeSmall.total), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u4EE3\u7801\u89C4\u8303")), /* @__PURE__ */ _react_17_0_2_react.createElement("li", null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u7B49\u7EA7\uFF1A", /* @__PURE__ */ _react_17_0_2_react.createElement("b", null, codeSmall == null ? void 0 : codeSmall.levelStr)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u963B\u65AD"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#A73E38", width: (codeSmall == null ? void 0 : codeSmall.blocker) === 0 ? 0 : `${(codeSmall == null ? void 0 : codeSmall.blocker) / (codeSmall == null ? void 0 : codeSmall.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, codeSmall == null ? void 0 : codeSmall.blocker)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u4E25\u91CD"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#DB544D", width: (codeSmall == null ? void 0 : codeSmall.critical) === 0 ? 0 : `${(codeSmall == null ? void 0 : codeSmall.critical) / (codeSmall == null ? void 0 : codeSmall.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, codeSmall == null ? void 0 : codeSmall.critical)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u4E3B\u8981"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#F7AB3E", width: (codeSmall == null ? void 0 : codeSmall.major) === 0 ? 0 : `${(codeSmall == null ? void 0 : codeSmall.major) / (codeSmall == null ? void 0 : codeSmall.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, codeSmall == null ? void 0 : codeSmall.major)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u6B21\u8981"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { style: { background: "#E7DF37", width: (codeSmall == null ? void 0 : codeSmall.minor) === 0 ? 0 : `${(codeSmall == null ? void 0 : codeSmall.minor) / (codeSmall == null ? void 0 : codeSmall.total) * 100}%` } })), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, codeSmall == null ? void 0 : codeSmall.minor))))), /* @__PURE__ */ _react_17_0_2_react.createElement(tabs["default"], { className: DetailedAnalysismodules.tab, activeKey: params.type, onChange: handleTabsChange }, /* @__PURE__ */ _react_17_0_2_react.createElement(tabs["default"].TabPane, { tab: `Bug (${(bug == null ? void 0 : bug.total) || 0})`, key: "2" }), /* @__PURE__ */ _react_17_0_2_react.createElement(tabs["default"].TabPane, { tab: `\u6F0F\u6D1E (${(vulnerability == null ? void 0 : vulnerability.total) || 0})`, key: "3" }), /* @__PURE__ */ _react_17_0_2_react.createElement(tabs["default"].TabPane, { tab: `\u4EE3\u7801\u89C4\u8303 (${(codeSmall == null ? void 0 : codeSmall.total) || 0})`, key: "1" })), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: DetailedAnalysismodules.group }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "mr5" }, "\u4E25\u91CD\u7A0B\u5EA6:"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_radio/* default.Group */.ZP.Group, { value: params.degree, onChange: handleCheck }, /* @__PURE__ */ _react_17_0_2_react.createElement(es_radio/* default */.ZP, { value: 0 }, "\u5168\u90E8"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_radio/* default */.ZP, { value: 1 }, "\u963B\u65AD"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_radio/* default */.ZP, { value: 2 }, "\u4E25\u91CD"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_radio/* default */.ZP, { value: 3 }, "\u4E3B\u8981"), /* @__PURE__ */ _react_17_0_2_react.createElement(es_radio/* default */.ZP, { value: 4 }, "\u6B21\u8981"))), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
table["default"],
|
|
{
|
|
style: { padding: "30px 30px 0 30px" },
|
|
dataSource: list,
|
|
columns,
|
|
onChange: handleChangePage,
|
|
loading: tableLoading,
|
|
pagination: {
|
|
pageSize: params.limit,
|
|
total,
|
|
current: params.page,
|
|
showQuickJumper: true,
|
|
hideOnSinglePage: true,
|
|
position: ["bottomCenter"],
|
|
showTotal: (total2) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "mr10" }, "\u5171", /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-orange" }, total2), "\u6761\u6570\u636E")
|
|
}
|
|
}
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: DetailedAnalysismodules.modal, style: { height: `${height}vh` } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: DetailedAnalysismodules.head }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u95EE\u9898\u5206\u6790"), /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "icon-zuixiaohua iconfont mt10", onClick: () => setHeight(32) }), /* @__PURE__ */ _react_17_0_2_react.createElement("i", { style: { margin: "0 18px" }, className: "icon-fangda iconfont", onClick: () => setHeight(80) }), /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "icon-guanbi7 iconfont", onClick: () => setHeight(0) })), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: DetailedAnalysismodules.des }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: DetailedAnalysismodules.sub }, modalData == null ? void 0 : modalData.title), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: DetailedAnalysismodules.tags }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, iconJson[modalData == null ? void 0 : modalData.type], "\xA0", modalData == null ? void 0 : modalData.type), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, iconJson[modalData == null ? void 0 : modalData.level], "\xA0", modalData == null ? void 0 : modalData.level), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-biaoqian4 mr5" }), (_c = modalData == null ? void 0 : modalData.tags) == null ? void 0 : _c.join(",")), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u751F\u6548\u65F6\u95F4", dayjs_min_default()(modalData == null ? void 0 : modalData.createTime).format("ll")), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, modalData == null ? void 0 : modalData.language), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u5E38\u91CF/\u4EFB\u52A1:", modalData == null ? void 0 : modalData.constantIssue)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: DetailedAnalysismodules.example, dangerouslySetInnerHTML: { __html: (modalData == null ? void 0 : modalData.example) || "" } }))), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
modal["default"],
|
|
{
|
|
open: qualityshow,
|
|
title: "\u89C4\u5219\u8BF4\u660E",
|
|
width: 800,
|
|
footer: null,
|
|
onCancel: () => {
|
|
setqualityshow(false);
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", null, "\u4E00\u3001\u7B49\u7EA7\u89C4\u5219"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "10px" } }, "1. \u7F3A\u9677\u7B49\u7EA7"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "10px" } }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
table["default"],
|
|
{
|
|
dataSource: qualityList,
|
|
columns: [
|
|
{ title: "\u7B49\u7EA7", dataIndex: "live" },
|
|
{ title: "\u7F3A\u9677\u8BC4\u4F30\u89C4\u5219", dataIndex: "gz" },
|
|
{ title: "\u6F0F\u6D1E\u8BC4\u4F30\u89C4\u5219", dataIndex: "ld" },
|
|
{ title: "\u4EE3\u7801\u89C4\u8303\u8BC4\u4F30\u89C4\u5219", dataIndex: "gf" }
|
|
],
|
|
pagination: false
|
|
}
|
|
)),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "10px" } }, "\u6CE8\uFF1A\u4EE3\u7801\u89C4\u8303\u8BC4\u4F30\u89C4\u5219\u4E2D\u6570\u503C\u6765\u6E90\u4E3A\u8BA1\u7B97\u6280\u672F\u503A\u52A1\u65F6\u95F4\u5360\u5F00\u53D1\u6240\u6709\u4EE3\u7801\u6240\u9700\u8981\u7684\u65F6\u95F4\u7684\u6BD4\u4F8B\uFF08Technical Debt Ratio\uFF09"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "20px" } }, "Technical Debt Ratio = \u6280\u672F\u503A\u52A1\u65F6\u95F4 / \u5F00\u53D1\u65F6\u95F4"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "20px" } }, "\u6280\u672F\u503A\u52A1\u65F6\u95F4\u4E3A\u4FEE\u590D\u6240\u6709\u95EE\u9898\u6240\u9700\u8981\u7684\u65F6\u95F4\u3002"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", null, "\u4E8C\u3001\u590D\u6742\u5EA6\u89C4\u5219"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "10px" } }, "\u6839\u636E\u4EE3\u7801\u8DEF\u5F84\u6570\u8BA1\u7B97\u7684\u6570\u503C\uFF0C\u6BCF\u5F53\u4E00\u4E2A\u51FD\u6570\u7684\u63A7\u5236\u6D41\u5206\u53C9\u65F6\uFF0C\u590D\u6742\u5EA6\u8BA1\u6570\u5668\u5C31\u4F1A\u81EA\u589E\u4E00\u3002"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "10px" } }, "\u6BCF\u4E2A\u7A0B\u5E8F\u8BED\u8A00\u7684\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u590D\u6742\u5EA6\u6570\u636E\u4E0D\u540C\uFF0C\u4F46\u6BCF\u4E2A\u51FD\u6570\u7684\u6700\u5C0F\u590D\u6742\u5EA6\u4E3A1\u3002\uFF08\u7279\u5B9A\u8BED\u8A00\u7684\u8BE6\u7EC6\u6570\u636E\u7565\uFF09"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", null, "\u4E09\u3001\u4EE3\u7801\u8D28\u91CF\u5206\u89C4\u5219"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "10px" } }, "\u4EE3\u7801\u8D28\u91CF\u5206 = 0.5*\u7F3A\u9677\u5206\u6570 + 0.3*\u6F0F\u6D1E\u5206\u6570 + 0.2*\u4EE3\u7801\u89C4\u8303\u6027\u5206\u6570"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "10px" } }, "\u5176\u4E2D\uFF1A"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "10px" } }, "\u7F3A\u9677/\u6F0F\u6D1E/\u4EE3\u7801\u89C4\u8303\u6027\u5206\u6570\u8BA1\u7B97\u89C4\u5219\u4E3A\uFF1A100 - 100 *((100*\u963B\u65AD\u6570 + 5*\u4E25\u91CD\u6570 + 3*\u4E3B\u8981\u6570 + 1*\u6B21\u6570\uFF09/ \u4EE3\u7801\u884C\u6570\uFF09"),
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { style: { marginLeft: "10px" } }, "\u6CE8\uFF1A\u5206\u6570\u4E3A\u7A7A\u7684\u4EE3\u8868\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u683C\u5F0F\u3002")
|
|
));
|
|
};
|
|
/* harmony default export */ var DetailedAnalysis = ((0,_umi_production_exports.connect)(
|
|
({
|
|
exercise,
|
|
user
|
|
}) => ({
|
|
exercise,
|
|
user
|
|
})
|
|
)(Export));
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |