|
@@ -75,7 +75,7 @@
|
|
|
<el-table-column label="图纸" prop="drawingName" align="center" />
|
|
|
<el-table-column label="类型" prop="pattern" align="center" width="60">
|
|
|
<template #default="scope">
|
|
|
- <span :class="getClassByPattern(scope.row.pattern)">{{ scope.row.pattern }}</span>
|
|
|
+ <span :class="getClassByPattern(scope.row.abandoned,scope.row.pattern)">{{ scope.row.pattern }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" width="80px" prop="status" align="center">
|
|
@@ -290,17 +290,20 @@ function getRowKey(row) {
|
|
|
return row.id;
|
|
|
}
|
|
|
|
|
|
-function getClassByPattern(pattern) {
|
|
|
+function getClassByPattern(abandoned,pattern) {
|
|
|
+ if(abandoned==1){
|
|
|
+ return "font-danger";
|
|
|
+ }else{
|
|
|
switch (pattern) {
|
|
|
case "替换产品":
|
|
|
return "font-warning";
|
|
|
case "新产品":
|
|
|
- return "font-success";
|
|
|
- case "作废产品":
|
|
|
- return "font-danger";
|
|
|
+ return "font-success";
|
|
|
default:
|
|
|
return "";
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped>
|