From 6b78e995bbf18eaadee5e422c8311b8b4dd64f80 Mon Sep 17 00:00:00 2001 From: jiang Date: Wed, 16 Oct 2024 09:21:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E8=84=B8=E8=AF=86=E5=88=AB=E4=B8=8E?= =?UTF-8?q?=E5=A4=A7=E6=A8=A1=E5=9E=8B=E9=97=AE=E7=AD=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dataSet/dataSet.js | 9 + src/assets/styles/ruoyi.scss | 62 +++++- src/directives/debounce.js | 18 ++ src/main.js | 3 + src/views/dataSet/dataSetAlgorithm/index.vue | 34 ++- src/views/dataSet/dataSetCategory/index.vue | 40 +++- src/views/dataSet/dataSetFile/details.vue | 223 ++++++++----------- src/views/dataSet/dataSetFile/index.vue | 28 ++- src/views/dataSet/dataSetModel/index.vue | 58 +++-- src/views/updateFace/addFace.vue | 2 +- src/views/updateFace/faceListShowPic.vue | 2 +- src/views/updateFace/midPic.vue | 2 +- src/views/updateFace/updateFace.vue | 2 +- 13 files changed, 303 insertions(+), 180 deletions(-) create mode 100644 src/directives/debounce.js diff --git a/src/api/dataSet/dataSet.js b/src/api/dataSet/dataSet.js index d501b1e..406bd9c 100644 --- a/src/api/dataSet/dataSet.js +++ b/src/api/dataSet/dataSet.js @@ -10,6 +10,13 @@ export function getCategories(data) { }) } +export function getCategoriesById(categoryId) { + return request({ + url: '/ai/dataSet/getCategories/'+categoryId, + method: 'post' + }) +} + // 查询菜单详细 export function getCategoryById(categoryId) { return request({ @@ -51,6 +58,7 @@ export function uploadImgFiles(formData) { url: '/ai/dataSet/uploadImgFiles', method: 'post', data: formData, + timeout: 600000, headers: { 'Content-Type': 'application/x-www-form-urlencoded' } @@ -63,6 +71,7 @@ export function uploadZipFiles(formData) { url: '/ai/dataSet/uploadZipFiles', method: 'post', data: formData, + timeout: 600000, // 设置超时时间为 10 秒(10000 毫秒) headers: { 'Content-Type': 'application/x-www-form-urlencoded' } diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index 4e29874..08c0a08 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -88,15 +88,73 @@ padding: 10px 20px 0; } +.el-table::before { //去除底部白线 + height: 0; +} + .el-table { + background-color: transparent; //背景色设为透明 + border-radius: 10px;//圆角边框 + th.el-table__cell.is-leaf {//设置表头底部边框为绿色 + border-bottom: 1px solid Rgb(128,255,255,60%); + } + th { //表头背景为蓝色渐变色,文字颜色为白色,不加粗 + background: linear-gradient(180deg,rgba(1,84,120,1.00), #040b37 100%); + color: #ffffff; + font-weight: normal; + } + tr{//每一行背景色设为透明 + + background-color: transparent; + &:hover {//鼠标悬浮变色 + td { + background-color:#1B4584 !important; + + } + } + td {//每一行的每一列文字为白色,底部边框为绿色, + + color: #fff; + border-bottom: 1px solid Rgb(128,255,255,60%); + + } + td:first-child{//第一列的文字颜色为绿色 + color: #ffffff; + + } + } + + .el-button--text{//按钮颜色为绿色 + color:#0C70FA; + } + +} + +.el-table th.el-table__cell.is-leaf, .el-table td.el-table__cell { + border-bottom: 1px solid #1A3676; +} +.el-table td.el-table__cell.is-leaf:hover{ + background-color: #0D1F4B !important; +} +.el-table { + tr { + background-color: #0D1F4B; + color: #ffffff; + } + + td{ + border-bottom: 1px solid #1A3676; + } + .el-table__header-wrapper, .el-table__fixed-header-wrapper { th { word-break: break-word; - background-color: #f8f8f9; - color: #515a6e; + background: linear-gradient(to bottom, #1A3676, #0D1F4B); + color: #ffffff; height: 40px; font-size: 13px; } + } .el-table__body-wrapper { diff --git a/src/directives/debounce.js b/src/directives/debounce.js new file mode 100644 index 0000000..528f87d --- /dev/null +++ b/src/directives/debounce.js @@ -0,0 +1,18 @@ +export default { + bind(el, binding) { + const debounce = (func, delay) => { + let timer; + return function (...args) { + clearTimeout(timer); + timer = setTimeout(() => func.apply(this, args), delay); + }; + }; + + el.addEventListener('click', debounce(() => { + binding.value(); + }, binding.arg || 300)); // 默认延迟300ms + }, + unbind(el) { + el.removeEventListener('click', el._debounceClick); + }, +}; diff --git a/src/main.js b/src/main.js index 1ead5a8..73bd7c1 100644 --- a/src/main.js +++ b/src/main.js @@ -15,6 +15,8 @@ import router from './router' import directive from './directive' // directive import plugins from './plugins' // plugins import { download } from '@/utils/request' +import debounce from './directives/debounce'; + import './assets/icons' // icon import './permission' // permission control @@ -44,6 +46,7 @@ import LargeScreen from '@/components/LargeScreen' //大屏头部 // 全局方法挂载 +Vue.directive('debounce', debounce); Vue.prototype.getDicts = getDicts Vue.prototype.getConfigKey = getConfigKey Vue.prototype.parseTime = parseTime diff --git a/src/views/dataSet/dataSetAlgorithm/index.vue b/src/views/dataSet/dataSetAlgorithm/index.vue index 37d8235..b7297e8 100644 --- a/src/views/dataSet/dataSetAlgorithm/index.vue +++ b/src/views/dataSet/dataSetAlgorithm/index.vue @@ -20,7 +20,7 @@ - + @@ -72,18 +72,19 @@ - + - - - + @@ -125,7 +126,11 @@ export default { // 是否显示弹出层 open: false, // 表单参数 - form: {}, + form: { + validationSampleCount:1, + correctCount:0, + missedDetectionCount:0, + }, queryParams: { pageNum: 1, pageSize: 10, @@ -133,7 +138,7 @@ export default { }, rules: { modelId: [ - {required: true, message: "请选择模型不能为空", trigger: "blur"} + {required: true, message: "请选择模型", trigger: "blur"} ], validationSampleCount: [ {required: true, message: "验证样本数不能为空", trigger: "blur"} @@ -155,6 +160,16 @@ export default { this.getModelsList(); }, methods: { + onKeydown(event) { + if (event.key !== "ArrowUp" && event.key !== "ArrowDown") { + event.preventDefault(); + } + }, + handleInput(e) { + e.replace(/^(0+)|[^\d]+/g, ''); // 只能输入数字 + console.log(e) + return e + }, parseTime, getList() { this.loading = true; @@ -195,6 +210,9 @@ export default { noticeTitle: undefined, noticeType: undefined, noticeContent: undefined, + validationSampleCount:1, + correctCount:0, + missedDetectionCount:0, status: "0" }; this.resetForm("form"); diff --git a/src/views/dataSet/dataSetCategory/index.vue b/src/views/dataSet/dataSetCategory/index.vue index cfd5912..d0a5e6d 100644 --- a/src/views/dataSet/dataSetCategory/index.vue +++ b/src/views/dataSet/dataSetCategory/index.vue @@ -59,7 +59,7 @@ :default-expand-all="isExpandAll" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" > - -