|
@@ -34,7 +34,8 @@ function initMenu(data){
|
|
|
const code=$(this).attr("code");
|
|
|
global_activeTab=code;
|
|
|
$(".content-item,.flaw-item").hide();
|
|
|
- $(".content-item[code='"+code+"'],.flaw-item[code='"+code+"']").show();
|
|
|
+ $(".content-item[code='"+code+"']").show();
|
|
|
+ showFlawList();
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -86,7 +87,8 @@ function initScoreItem(data){
|
|
|
for(let k in data){
|
|
|
$("#flawTmpl").tmpl(data[k]).appendTo("#flaws .flaw-box");
|
|
|
}
|
|
|
- $(".flaw-item[code="+global_activeTab+"]").show();
|
|
|
+ //$(".flaw-item[code="+global_activeTab+"]").show();
|
|
|
+ showFlawList();
|
|
|
$(".flaw-item .oper a").click(function () {
|
|
|
//const activeTab=$(".sub-menu .page.active").attr("code");
|
|
|
const i = $(".flaw-item[code="+global_activeTab+"]").index($(this).parents(".flaw-item"));
|
|
@@ -95,6 +97,18 @@ function initScoreItem(data){
|
|
|
showModal(isEdit?'0':'1',code,i);
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+//显示缺陷列表
|
|
|
+function showFlawList(){
|
|
|
+ const hml = $(".flaw-item[code="+global_activeTab+"]");
|
|
|
+ if(hml.length){
|
|
|
+ hml.show();
|
|
|
+ $("#flaws .empty").hide();
|
|
|
+ }else{
|
|
|
+ $("#flaws .empty").length?$("#flaws .empty").show():$("#emptyTmpl").tmpl().appendTo("#flaws .flaw-box");
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
//删除评分项
|
|
|
function delScore(id){
|
|
|
const param={
|