diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + - diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + - diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 380779a..0916a59 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -9,6 +9,9 @@ import BenchCol from '@/components/benchCol/index.vue' import type { lineDataI, pieDataI } from '@/components/Echart/echart-interface' import useUserStore from '@/store/modules/user' +// 每个展示块高度 +const blockHeight = ref(300) +const blockWidth = ref(400) const { username } = useUserStore() const buttomTypes = ref([ { id: '1', text: '培训记录', url: '/train/trainLog' }, @@ -21,23 +24,23 @@ const tableData = ref([]) const meterageTableData = ref([]) const columns = ref([ - { text: '培训名称', value: 'planName', width: '110' }, + { text: '培训名称', value: 'planName' }, { text: '负责人', value: 'director', width: '120' }, - { text: '培训时间', value: 'trainTime' }, + { text: '培训时间', value: 'trainTime', width: '180' }, ]) const meterageColumns = ref([ - { text: '文件名称', value: 'fileName', width: '110' }, + { text: '文件名称', value: 'fileName' }, { text: '类别', value: 'fileTypeName', width: '110' }, - { text: '发布时间', value: 'publishTime' }, + { text: '发布时间', value: 'publishTime', width: '180' }, ]) const CertificateColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '证书名称', value: 'certificateName' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const CertificatesColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, + { text: '证书名称', value: 'certificateName' }, { text: '人员名称', value: 'name', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const StatisticxAxis: Ref = ref([]) const StatisticData: Ref = ref([]) @@ -106,20 +109,14 @@ const yValue = res.data.map((item: planReturn) => Number(item.count)) StaffSStatisticData.value = [{ name: '人数', data: yValue }] }) - const param = { - account: username, - } - getTrainLogSStatistic(param).then((res) => { - TrainLogSList.value = [ - { name: `合格 ${res.data.qualified}--${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, - { name: `不合格 ${res.data.notQualified}-- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, - ] - TrainLogTitle.value = res.data.trainCount - }) + // 返回值 interface CertificatReturn { lastValidDate: number } + const param = { + account: username, + } getCertificateStatistic(param).then((res) => { CertificateList.value = res.data CertificateObject.value = res.data.sort((nex: CertificatReturn, max: CertificatReturn) => { @@ -127,6 +124,26 @@ })[0] }) } + +function fetchMyTrainLog() { + const param = { + account: username, + } + getTrainLogSStatistic(param).then((res) => { + TrainLogSList.value = [ + { name: `合格 ${res.data.qualified}-${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, + { name: `不合格 ${res.data.notQualified}- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, + ] + TrainLogTitle.value = res.data.trainCount + }).catch((_) => { + // 处理异常 + TrainLogSList.value = [ + { name: '合格 0 - 50%', value: 0 }, + { name: '不合格 0 - 50%', value: 0 }, + ] + TrainLogTitle.value = 0 + }) +} const getmeterageList = () => { const params = { fileNo: '', // 编号 @@ -143,218 +160,251 @@ meterageTableData.value = res.data.rows }) } -getmeterageList() -getStatisticList() + +function calcBlockSize() { + // 计算工作台区域高度 - 顶部-面包屑-边距 + const bodyHeight = document.body.clientHeight - 60 - 50 - 20 + blockHeight.value = bodyHeight > 610 ? (bodyHeight - 10) / 2 : 300 + blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 + console.log(blockHeight.value, blockWidth.value - 20) +} +window.addEventListener('resize', () => { + calcBlockSize() +}) + +onMounted(() => { + calcBlockSize() + fetchMyTrainLog() // 获取我的培训考核 + getmeterageList() + getStatisticList() +}) - - - - - - - - - - - - - {{ item.text }} + + + + + + + + + + + + + + + + + + + {{ item.text }} + + + + + + + + + + + - - - - - - - - {{ item.name }} + + + + + + + + + + + + + + + + + + + + + {{ CertificateObject.lastValidDate }}天 + + + 最近到期时间 + {{ CertificateObject.validDate || '无' }} + - - - - - - - - - - - + - + + + + + + + - - - - {{ CertificateObject.lastValidDate }}天 - - - 最近到期时间 - {{ CertificateObject.validDate }} - - - - - - - - - - - - + + + + + diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + - diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 380779a..0916a59 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -9,6 +9,9 @@ import BenchCol from '@/components/benchCol/index.vue' import type { lineDataI, pieDataI } from '@/components/Echart/echart-interface' import useUserStore from '@/store/modules/user' +// 每个展示块高度 +const blockHeight = ref(300) +const blockWidth = ref(400) const { username } = useUserStore() const buttomTypes = ref([ { id: '1', text: '培训记录', url: '/train/trainLog' }, @@ -21,23 +24,23 @@ const tableData = ref([]) const meterageTableData = ref([]) const columns = ref([ - { text: '培训名称', value: 'planName', width: '110' }, + { text: '培训名称', value: 'planName' }, { text: '负责人', value: 'director', width: '120' }, - { text: '培训时间', value: 'trainTime' }, + { text: '培训时间', value: 'trainTime', width: '180' }, ]) const meterageColumns = ref([ - { text: '文件名称', value: 'fileName', width: '110' }, + { text: '文件名称', value: 'fileName' }, { text: '类别', value: 'fileTypeName', width: '110' }, - { text: '发布时间', value: 'publishTime' }, + { text: '发布时间', value: 'publishTime', width: '180' }, ]) const CertificateColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '证书名称', value: 'certificateName' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const CertificatesColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, + { text: '证书名称', value: 'certificateName' }, { text: '人员名称', value: 'name', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const StatisticxAxis: Ref = ref([]) const StatisticData: Ref = ref([]) @@ -106,20 +109,14 @@ const yValue = res.data.map((item: planReturn) => Number(item.count)) StaffSStatisticData.value = [{ name: '人数', data: yValue }] }) - const param = { - account: username, - } - getTrainLogSStatistic(param).then((res) => { - TrainLogSList.value = [ - { name: `合格 ${res.data.qualified}--${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, - { name: `不合格 ${res.data.notQualified}-- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, - ] - TrainLogTitle.value = res.data.trainCount - }) + // 返回值 interface CertificatReturn { lastValidDate: number } + const param = { + account: username, + } getCertificateStatistic(param).then((res) => { CertificateList.value = res.data CertificateObject.value = res.data.sort((nex: CertificatReturn, max: CertificatReturn) => { @@ -127,6 +124,26 @@ })[0] }) } + +function fetchMyTrainLog() { + const param = { + account: username, + } + getTrainLogSStatistic(param).then((res) => { + TrainLogSList.value = [ + { name: `合格 ${res.data.qualified}-${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, + { name: `不合格 ${res.data.notQualified}- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, + ] + TrainLogTitle.value = res.data.trainCount + }).catch((_) => { + // 处理异常 + TrainLogSList.value = [ + { name: '合格 0 - 50%', value: 0 }, + { name: '不合格 0 - 50%', value: 0 }, + ] + TrainLogTitle.value = 0 + }) +} const getmeterageList = () => { const params = { fileNo: '', // 编号 @@ -143,218 +160,251 @@ meterageTableData.value = res.data.rows }) } -getmeterageList() -getStatisticList() + +function calcBlockSize() { + // 计算工作台区域高度 - 顶部-面包屑-边距 + const bodyHeight = document.body.clientHeight - 60 - 50 - 20 + blockHeight.value = bodyHeight > 610 ? (bodyHeight - 10) / 2 : 300 + blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 + console.log(blockHeight.value, blockWidth.value - 20) +} +window.addEventListener('resize', () => { + calcBlockSize() +}) + +onMounted(() => { + calcBlockSize() + fetchMyTrainLog() // 获取我的培训考核 + getmeterageList() + getStatisticList() +}) - - - - - - - - - - - - - {{ item.text }} + + + + + + + + + + + + + + + + + + + {{ item.text }} + + + + + + + + + + + - - - - - - - - {{ item.name }} + + + + + + + + + + + + + + + + + + + + + {{ CertificateObject.lastValidDate }}天 + + + 最近到期时间 + {{ CertificateObject.validDate || '无' }} + - - - - - - - - - - - + - + + + + + + + - - - - {{ CertificateObject.lastValidDate }}天 - - - 最近到期时间 - {{ CertificateObject.validDate }} - - - - - - - - - - - - + + + + + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index 0763c5a..9ef0b93 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -19,7 +19,6 @@ const effectiveStatusName = ref('') const title = ref('') const fileList = ref([]) -console.log(sessionStorage.getItem(fileTypeName.value)) const ruleForm = reactive({ fileType: '', // 类型 fileTypeName: '', // 类型名称 不传 @@ -80,10 +79,9 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = '' + ruleForm.publisher = userInfo.$state.deptName ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 判断有无存储 - console.log(sessionStorage.getItem(fileTypeName.value), 'sess') if (sessionStorage.getItem(fileTypeName.value)) { const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string) ruleForm.fileType = session.fileType @@ -117,6 +115,8 @@ ruleForm.remark = row.remark ruleForm.publishTime = row.publishTime ruleForm.minioFileName = row.minioFileName + // ruleForm.publisher = '0' + // ruleForm.createUserId = '1' } } defineExpose({ initDialog }) @@ -148,6 +148,9 @@ type: 'warning', }, ).then((res) => { + if (ruleForm.publisher === userInfo.$state.deptName) { + ruleForm.publisher === userInfo.$state.deptId + } if (flag == '提交') { addApi(ruleForm).then((res) => { if (res.code == 200) { @@ -193,7 +196,6 @@ fd.append('multipartFile', event.target.files[0]) UploadFile(fd).then((res) => { if (res.code === 200) { - console.log(res.data[0]) ruleForm.minioFileName = res.data[0] // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') @@ -216,7 +218,6 @@ // ]) watch(() => ruleForm.effectiveTime, (newVal) => { const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour') - console.log(diffDat) if (diffDat < 0) { // ruleForm.effectiveStatusName = '已废止' effectiveStatusName.value = '在使用' @@ -237,7 +238,7 @@ - + 提交 @@ -278,12 +279,12 @@ - + diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + - diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 380779a..0916a59 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -9,6 +9,9 @@ import BenchCol from '@/components/benchCol/index.vue' import type { lineDataI, pieDataI } from '@/components/Echart/echart-interface' import useUserStore from '@/store/modules/user' +// 每个展示块高度 +const blockHeight = ref(300) +const blockWidth = ref(400) const { username } = useUserStore() const buttomTypes = ref([ { id: '1', text: '培训记录', url: '/train/trainLog' }, @@ -21,23 +24,23 @@ const tableData = ref([]) const meterageTableData = ref([]) const columns = ref([ - { text: '培训名称', value: 'planName', width: '110' }, + { text: '培训名称', value: 'planName' }, { text: '负责人', value: 'director', width: '120' }, - { text: '培训时间', value: 'trainTime' }, + { text: '培训时间', value: 'trainTime', width: '180' }, ]) const meterageColumns = ref([ - { text: '文件名称', value: 'fileName', width: '110' }, + { text: '文件名称', value: 'fileName' }, { text: '类别', value: 'fileTypeName', width: '110' }, - { text: '发布时间', value: 'publishTime' }, + { text: '发布时间', value: 'publishTime', width: '180' }, ]) const CertificateColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '证书名称', value: 'certificateName' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const CertificatesColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, + { text: '证书名称', value: 'certificateName' }, { text: '人员名称', value: 'name', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const StatisticxAxis: Ref = ref([]) const StatisticData: Ref = ref([]) @@ -106,20 +109,14 @@ const yValue = res.data.map((item: planReturn) => Number(item.count)) StaffSStatisticData.value = [{ name: '人数', data: yValue }] }) - const param = { - account: username, - } - getTrainLogSStatistic(param).then((res) => { - TrainLogSList.value = [ - { name: `合格 ${res.data.qualified}--${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, - { name: `不合格 ${res.data.notQualified}-- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, - ] - TrainLogTitle.value = res.data.trainCount - }) + // 返回值 interface CertificatReturn { lastValidDate: number } + const param = { + account: username, + } getCertificateStatistic(param).then((res) => { CertificateList.value = res.data CertificateObject.value = res.data.sort((nex: CertificatReturn, max: CertificatReturn) => { @@ -127,6 +124,26 @@ })[0] }) } + +function fetchMyTrainLog() { + const param = { + account: username, + } + getTrainLogSStatistic(param).then((res) => { + TrainLogSList.value = [ + { name: `合格 ${res.data.qualified}-${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, + { name: `不合格 ${res.data.notQualified}- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, + ] + TrainLogTitle.value = res.data.trainCount + }).catch((_) => { + // 处理异常 + TrainLogSList.value = [ + { name: '合格 0 - 50%', value: 0 }, + { name: '不合格 0 - 50%', value: 0 }, + ] + TrainLogTitle.value = 0 + }) +} const getmeterageList = () => { const params = { fileNo: '', // 编号 @@ -143,218 +160,251 @@ meterageTableData.value = res.data.rows }) } -getmeterageList() -getStatisticList() + +function calcBlockSize() { + // 计算工作台区域高度 - 顶部-面包屑-边距 + const bodyHeight = document.body.clientHeight - 60 - 50 - 20 + blockHeight.value = bodyHeight > 610 ? (bodyHeight - 10) / 2 : 300 + blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 + console.log(blockHeight.value, blockWidth.value - 20) +} +window.addEventListener('resize', () => { + calcBlockSize() +}) + +onMounted(() => { + calcBlockSize() + fetchMyTrainLog() // 获取我的培训考核 + getmeterageList() + getStatisticList() +}) - - - - - - - - - - - - - {{ item.text }} + + + + + + + + + + + + + + + + + + + {{ item.text }} + + + + + + + + + + + - - - - - - - - {{ item.name }} + + + + + + + + + + + + + + + + + + + + + {{ CertificateObject.lastValidDate }}天 + + + 最近到期时间 + {{ CertificateObject.validDate || '无' }} + - - - - - - - - - - - + - + + + + + + + - - - - {{ CertificateObject.lastValidDate }}天 - - - 最近到期时间 - {{ CertificateObject.validDate }} - - - - - - - - - - - - + + + + + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index 0763c5a..9ef0b93 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -19,7 +19,6 @@ const effectiveStatusName = ref('') const title = ref('') const fileList = ref([]) -console.log(sessionStorage.getItem(fileTypeName.value)) const ruleForm = reactive({ fileType: '', // 类型 fileTypeName: '', // 类型名称 不传 @@ -80,10 +79,9 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = '' + ruleForm.publisher = userInfo.$state.deptName ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 判断有无存储 - console.log(sessionStorage.getItem(fileTypeName.value), 'sess') if (sessionStorage.getItem(fileTypeName.value)) { const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string) ruleForm.fileType = session.fileType @@ -117,6 +115,8 @@ ruleForm.remark = row.remark ruleForm.publishTime = row.publishTime ruleForm.minioFileName = row.minioFileName + // ruleForm.publisher = '0' + // ruleForm.createUserId = '1' } } defineExpose({ initDialog }) @@ -148,6 +148,9 @@ type: 'warning', }, ).then((res) => { + if (ruleForm.publisher === userInfo.$state.deptName) { + ruleForm.publisher === userInfo.$state.deptId + } if (flag == '提交') { addApi(ruleForm).then((res) => { if (res.code == 200) { @@ -193,7 +196,6 @@ fd.append('multipartFile', event.target.files[0]) UploadFile(fd).then((res) => { if (res.code === 200) { - console.log(res.data[0]) ruleForm.minioFileName = res.data[0] // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') @@ -216,7 +218,6 @@ // ]) watch(() => ruleForm.effectiveTime, (newVal) => { const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour') - console.log(diffDat) if (diffDat < 0) { // ruleForm.effectiveStatusName = '已废止' effectiveStatusName.value = '在使用' @@ -237,7 +238,7 @@ - + 提交 @@ -278,12 +279,12 @@ - + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 44e3e4d..b45fbc3 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -324,22 +324,9 @@ - - - - - - 导出 - - - 打印 - + + + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + - diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 380779a..0916a59 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -9,6 +9,9 @@ import BenchCol from '@/components/benchCol/index.vue' import type { lineDataI, pieDataI } from '@/components/Echart/echart-interface' import useUserStore from '@/store/modules/user' +// 每个展示块高度 +const blockHeight = ref(300) +const blockWidth = ref(400) const { username } = useUserStore() const buttomTypes = ref([ { id: '1', text: '培训记录', url: '/train/trainLog' }, @@ -21,23 +24,23 @@ const tableData = ref([]) const meterageTableData = ref([]) const columns = ref([ - { text: '培训名称', value: 'planName', width: '110' }, + { text: '培训名称', value: 'planName' }, { text: '负责人', value: 'director', width: '120' }, - { text: '培训时间', value: 'trainTime' }, + { text: '培训时间', value: 'trainTime', width: '180' }, ]) const meterageColumns = ref([ - { text: '文件名称', value: 'fileName', width: '110' }, + { text: '文件名称', value: 'fileName' }, { text: '类别', value: 'fileTypeName', width: '110' }, - { text: '发布时间', value: 'publishTime' }, + { text: '发布时间', value: 'publishTime', width: '180' }, ]) const CertificateColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '证书名称', value: 'certificateName' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const CertificatesColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, + { text: '证书名称', value: 'certificateName' }, { text: '人员名称', value: 'name', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const StatisticxAxis: Ref = ref([]) const StatisticData: Ref = ref([]) @@ -106,20 +109,14 @@ const yValue = res.data.map((item: planReturn) => Number(item.count)) StaffSStatisticData.value = [{ name: '人数', data: yValue }] }) - const param = { - account: username, - } - getTrainLogSStatistic(param).then((res) => { - TrainLogSList.value = [ - { name: `合格 ${res.data.qualified}--${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, - { name: `不合格 ${res.data.notQualified}-- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, - ] - TrainLogTitle.value = res.data.trainCount - }) + // 返回值 interface CertificatReturn { lastValidDate: number } + const param = { + account: username, + } getCertificateStatistic(param).then((res) => { CertificateList.value = res.data CertificateObject.value = res.data.sort((nex: CertificatReturn, max: CertificatReturn) => { @@ -127,6 +124,26 @@ })[0] }) } + +function fetchMyTrainLog() { + const param = { + account: username, + } + getTrainLogSStatistic(param).then((res) => { + TrainLogSList.value = [ + { name: `合格 ${res.data.qualified}-${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, + { name: `不合格 ${res.data.notQualified}- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, + ] + TrainLogTitle.value = res.data.trainCount + }).catch((_) => { + // 处理异常 + TrainLogSList.value = [ + { name: '合格 0 - 50%', value: 0 }, + { name: '不合格 0 - 50%', value: 0 }, + ] + TrainLogTitle.value = 0 + }) +} const getmeterageList = () => { const params = { fileNo: '', // 编号 @@ -143,218 +160,251 @@ meterageTableData.value = res.data.rows }) } -getmeterageList() -getStatisticList() + +function calcBlockSize() { + // 计算工作台区域高度 - 顶部-面包屑-边距 + const bodyHeight = document.body.clientHeight - 60 - 50 - 20 + blockHeight.value = bodyHeight > 610 ? (bodyHeight - 10) / 2 : 300 + blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 + console.log(blockHeight.value, blockWidth.value - 20) +} +window.addEventListener('resize', () => { + calcBlockSize() +}) + +onMounted(() => { + calcBlockSize() + fetchMyTrainLog() // 获取我的培训考核 + getmeterageList() + getStatisticList() +}) - - - - - - - - - - - - - {{ item.text }} + + + + + + + + + + + + + + + + + + + {{ item.text }} + + + + + + + + + + + - - - - - - - - {{ item.name }} + + + + + + + + + + + + + + + + + + + + + {{ CertificateObject.lastValidDate }}天 + + + 最近到期时间 + {{ CertificateObject.validDate || '无' }} + - - - - - - - - - - - + - + + + + + + + - - - - {{ CertificateObject.lastValidDate }}天 - - - 最近到期时间 - {{ CertificateObject.validDate }} - - - - - - - - - - - - + + + + + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index 0763c5a..9ef0b93 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -19,7 +19,6 @@ const effectiveStatusName = ref('') const title = ref('') const fileList = ref([]) -console.log(sessionStorage.getItem(fileTypeName.value)) const ruleForm = reactive({ fileType: '', // 类型 fileTypeName: '', // 类型名称 不传 @@ -80,10 +79,9 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = '' + ruleForm.publisher = userInfo.$state.deptName ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 判断有无存储 - console.log(sessionStorage.getItem(fileTypeName.value), 'sess') if (sessionStorage.getItem(fileTypeName.value)) { const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string) ruleForm.fileType = session.fileType @@ -117,6 +115,8 @@ ruleForm.remark = row.remark ruleForm.publishTime = row.publishTime ruleForm.minioFileName = row.minioFileName + // ruleForm.publisher = '0' + // ruleForm.createUserId = '1' } } defineExpose({ initDialog }) @@ -148,6 +148,9 @@ type: 'warning', }, ).then((res) => { + if (ruleForm.publisher === userInfo.$state.deptName) { + ruleForm.publisher === userInfo.$state.deptId + } if (flag == '提交') { addApi(ruleForm).then((res) => { if (res.code == 200) { @@ -193,7 +196,6 @@ fd.append('multipartFile', event.target.files[0]) UploadFile(fd).then((res) => { if (res.code === 200) { - console.log(res.data[0]) ruleForm.minioFileName = res.data[0] // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') @@ -216,7 +218,6 @@ // ]) watch(() => ruleForm.effectiveTime, (newVal) => { const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour') - console.log(diffDat) if (diffDat < 0) { // ruleForm.effectiveStatusName = '已废止' effectiveStatusName.value = '在使用' @@ -237,7 +238,7 @@ - + 提交 @@ -278,12 +279,12 @@ - + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 44e3e4d..b45fbc3 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -324,22 +324,9 @@ - - - - - - 导出 - - - 打印 - + + + { - -} const fileRef = ref() // 文件上传input const onFileChange = (event: any) => { - // 原生上传图片 + // 原生上传 // console.log(event.target.files) // if (event.target.files[0].type === 'application/pdf') { if (event.target.files?.length !== 0) { @@ -264,7 +260,7 @@ - + @@ -287,19 +283,19 @@ v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" placeholder="实施时间" class="normal-date" - style="width: 155px;" + style="width: 185px;" /> - - + + @@ -310,7 +306,7 @@ - + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + - diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 380779a..0916a59 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -9,6 +9,9 @@ import BenchCol from '@/components/benchCol/index.vue' import type { lineDataI, pieDataI } from '@/components/Echart/echart-interface' import useUserStore from '@/store/modules/user' +// 每个展示块高度 +const blockHeight = ref(300) +const blockWidth = ref(400) const { username } = useUserStore() const buttomTypes = ref([ { id: '1', text: '培训记录', url: '/train/trainLog' }, @@ -21,23 +24,23 @@ const tableData = ref([]) const meterageTableData = ref([]) const columns = ref([ - { text: '培训名称', value: 'planName', width: '110' }, + { text: '培训名称', value: 'planName' }, { text: '负责人', value: 'director', width: '120' }, - { text: '培训时间', value: 'trainTime' }, + { text: '培训时间', value: 'trainTime', width: '180' }, ]) const meterageColumns = ref([ - { text: '文件名称', value: 'fileName', width: '110' }, + { text: '文件名称', value: 'fileName' }, { text: '类别', value: 'fileTypeName', width: '110' }, - { text: '发布时间', value: 'publishTime' }, + { text: '发布时间', value: 'publishTime', width: '180' }, ]) const CertificateColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '证书名称', value: 'certificateName' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const CertificatesColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, + { text: '证书名称', value: 'certificateName' }, { text: '人员名称', value: 'name', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const StatisticxAxis: Ref = ref([]) const StatisticData: Ref = ref([]) @@ -106,20 +109,14 @@ const yValue = res.data.map((item: planReturn) => Number(item.count)) StaffSStatisticData.value = [{ name: '人数', data: yValue }] }) - const param = { - account: username, - } - getTrainLogSStatistic(param).then((res) => { - TrainLogSList.value = [ - { name: `合格 ${res.data.qualified}--${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, - { name: `不合格 ${res.data.notQualified}-- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, - ] - TrainLogTitle.value = res.data.trainCount - }) + // 返回值 interface CertificatReturn { lastValidDate: number } + const param = { + account: username, + } getCertificateStatistic(param).then((res) => { CertificateList.value = res.data CertificateObject.value = res.data.sort((nex: CertificatReturn, max: CertificatReturn) => { @@ -127,6 +124,26 @@ })[0] }) } + +function fetchMyTrainLog() { + const param = { + account: username, + } + getTrainLogSStatistic(param).then((res) => { + TrainLogSList.value = [ + { name: `合格 ${res.data.qualified}-${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, + { name: `不合格 ${res.data.notQualified}- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, + ] + TrainLogTitle.value = res.data.trainCount + }).catch((_) => { + // 处理异常 + TrainLogSList.value = [ + { name: '合格 0 - 50%', value: 0 }, + { name: '不合格 0 - 50%', value: 0 }, + ] + TrainLogTitle.value = 0 + }) +} const getmeterageList = () => { const params = { fileNo: '', // 编号 @@ -143,218 +160,251 @@ meterageTableData.value = res.data.rows }) } -getmeterageList() -getStatisticList() + +function calcBlockSize() { + // 计算工作台区域高度 - 顶部-面包屑-边距 + const bodyHeight = document.body.clientHeight - 60 - 50 - 20 + blockHeight.value = bodyHeight > 610 ? (bodyHeight - 10) / 2 : 300 + blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 + console.log(blockHeight.value, blockWidth.value - 20) +} +window.addEventListener('resize', () => { + calcBlockSize() +}) + +onMounted(() => { + calcBlockSize() + fetchMyTrainLog() // 获取我的培训考核 + getmeterageList() + getStatisticList() +}) - - - - - - - - - - - - - {{ item.text }} + + + + + + + + + + + + + + + + + + + {{ item.text }} + + + + + + + + + + + - - - - - - - - {{ item.name }} + + + + + + + + + + + + + + + + + + + + + {{ CertificateObject.lastValidDate }}天 + + + 最近到期时间 + {{ CertificateObject.validDate || '无' }} + - - - - - - - - - - - + - + + + + + + + - - - - {{ CertificateObject.lastValidDate }}天 - - - 最近到期时间 - {{ CertificateObject.validDate }} - - - - - - - - - - - - + + + + + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index 0763c5a..9ef0b93 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -19,7 +19,6 @@ const effectiveStatusName = ref('') const title = ref('') const fileList = ref([]) -console.log(sessionStorage.getItem(fileTypeName.value)) const ruleForm = reactive({ fileType: '', // 类型 fileTypeName: '', // 类型名称 不传 @@ -80,10 +79,9 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = '' + ruleForm.publisher = userInfo.$state.deptName ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 判断有无存储 - console.log(sessionStorage.getItem(fileTypeName.value), 'sess') if (sessionStorage.getItem(fileTypeName.value)) { const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string) ruleForm.fileType = session.fileType @@ -117,6 +115,8 @@ ruleForm.remark = row.remark ruleForm.publishTime = row.publishTime ruleForm.minioFileName = row.minioFileName + // ruleForm.publisher = '0' + // ruleForm.createUserId = '1' } } defineExpose({ initDialog }) @@ -148,6 +148,9 @@ type: 'warning', }, ).then((res) => { + if (ruleForm.publisher === userInfo.$state.deptName) { + ruleForm.publisher === userInfo.$state.deptId + } if (flag == '提交') { addApi(ruleForm).then((res) => { if (res.code == 200) { @@ -193,7 +196,6 @@ fd.append('multipartFile', event.target.files[0]) UploadFile(fd).then((res) => { if (res.code === 200) { - console.log(res.data[0]) ruleForm.minioFileName = res.data[0] // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') @@ -216,7 +218,6 @@ // ]) watch(() => ruleForm.effectiveTime, (newVal) => { const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour') - console.log(diffDat) if (diffDat < 0) { // ruleForm.effectiveStatusName = '已废止' effectiveStatusName.value = '在使用' @@ -237,7 +238,7 @@ - + 提交 @@ -278,12 +279,12 @@ - + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 44e3e4d..b45fbc3 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -324,22 +324,9 @@ - - - - - - 导出 - - - 打印 - + + + { - -} const fileRef = ref() // 文件上传input const onFileChange = (event: any) => { - // 原生上传图片 + // 原生上传 // console.log(event.target.files) // if (event.target.files[0].type === 'application/pdf') { if (event.target.files?.length !== 0) { @@ -264,7 +260,7 @@ - + @@ -287,19 +283,19 @@ v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" placeholder="实施时间" class="normal-date" - style="width: 155px;" + style="width: 185px;" /> - - + + @@ -310,7 +306,7 @@ - + () // from组件 @@ -31,11 +31,20 @@ technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }], }) // 表单验证规则 const userList = ref([]) // 用户列表 +// 获取计量人员列表 const getuser = () => { - getUserList({ offset: 1, limit: 99999 }).then((res) => { - userList.value = res.data.rows + getStaffList({ + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: ruleForm.value.deptId, // 所在部门 + limit: 999999, + offset: 1, + }).then((res) => { + if (res.code === 200) { + userList.value = res.data.records + } }) -} // 获取用户列表 +} const technologyJobList = ref<{ id: string;name: string;value: string }[]>([]) // 获取技术职务列表 const getTechnologyJobList = () => { @@ -50,7 +59,16 @@ administrationJobList.value = response.data }) } - +// 选择负责人自动填充职务信息 +const directorChange = (val: string) => { + const selectUser = userList.value.filter(item => item.name === val)[0] + getStaffDetail(selectUser).then((res) => { + if (res.code === 200) { + ruleForm.value.administrationJob = res.data.administrationJob + ruleForm.value.technologyJob = res.data.technologyJob + } + }) +} // 提交 const submitForm = async (formEl: FormInstance | undefined) => { if (!formEl) { return } @@ -95,12 +113,6 @@ const multipleTableRef = ref() const current = ref('') const changeList = ref() -// const searchQuery = ref({ -// limit: 10, -// offset: 1, -// total: 0, -// pageSizes: [10, 20, 30], -// }) // 部门列表数据 const changeList_bm = ref([ { @@ -410,20 +422,6 @@ } }) } -// const handleSizeChange = (val: number) => { -// searchQuery.value.limit = val -// getDepartmentList() -// getuserInfoList() -// getInstrumentInfo() -// getDeviceInfo() -// } -// const handleCurrentChange = (val: number) => { -// searchQuery.value.offset = val -// getDepartmentList() -// getuserInfoList() -// getInstrumentInfo() -// getDeviceInfo() -// } // 弹窗初始化 const initDialog = (row: any) => { reset() @@ -460,22 +458,17 @@ - - - - {{ title }} - - - - 提交 - - - 关闭 - - - + + + + 提交 + + + 关闭 + + - + @@ -487,7 +480,7 @@ - + @@ -509,10 +502,10 @@ - + - + @@ -532,7 +525,7 @@ - + @@ -540,85 +533,24 @@ - - - - - - - {{ item.name }} - - - - {{ current }} - - - - - - - - - - - - + + + + + + {{ item.name }} + + + + + + + + diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + - diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 380779a..0916a59 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -9,6 +9,9 @@ import BenchCol from '@/components/benchCol/index.vue' import type { lineDataI, pieDataI } from '@/components/Echart/echart-interface' import useUserStore from '@/store/modules/user' +// 每个展示块高度 +const blockHeight = ref(300) +const blockWidth = ref(400) const { username } = useUserStore() const buttomTypes = ref([ { id: '1', text: '培训记录', url: '/train/trainLog' }, @@ -21,23 +24,23 @@ const tableData = ref([]) const meterageTableData = ref([]) const columns = ref([ - { text: '培训名称', value: 'planName', width: '110' }, + { text: '培训名称', value: 'planName' }, { text: '负责人', value: 'director', width: '120' }, - { text: '培训时间', value: 'trainTime' }, + { text: '培训时间', value: 'trainTime', width: '180' }, ]) const meterageColumns = ref([ - { text: '文件名称', value: 'fileName', width: '110' }, + { text: '文件名称', value: 'fileName' }, { text: '类别', value: 'fileTypeName', width: '110' }, - { text: '发布时间', value: 'publishTime' }, + { text: '发布时间', value: 'publishTime', width: '180' }, ]) const CertificateColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '证书名称', value: 'certificateName' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const CertificatesColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, + { text: '证书名称', value: 'certificateName' }, { text: '人员名称', value: 'name', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const StatisticxAxis: Ref = ref([]) const StatisticData: Ref = ref([]) @@ -106,20 +109,14 @@ const yValue = res.data.map((item: planReturn) => Number(item.count)) StaffSStatisticData.value = [{ name: '人数', data: yValue }] }) - const param = { - account: username, - } - getTrainLogSStatistic(param).then((res) => { - TrainLogSList.value = [ - { name: `合格 ${res.data.qualified}--${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, - { name: `不合格 ${res.data.notQualified}-- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, - ] - TrainLogTitle.value = res.data.trainCount - }) + // 返回值 interface CertificatReturn { lastValidDate: number } + const param = { + account: username, + } getCertificateStatistic(param).then((res) => { CertificateList.value = res.data CertificateObject.value = res.data.sort((nex: CertificatReturn, max: CertificatReturn) => { @@ -127,6 +124,26 @@ })[0] }) } + +function fetchMyTrainLog() { + const param = { + account: username, + } + getTrainLogSStatistic(param).then((res) => { + TrainLogSList.value = [ + { name: `合格 ${res.data.qualified}-${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, + { name: `不合格 ${res.data.notQualified}- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, + ] + TrainLogTitle.value = res.data.trainCount + }).catch((_) => { + // 处理异常 + TrainLogSList.value = [ + { name: '合格 0 - 50%', value: 0 }, + { name: '不合格 0 - 50%', value: 0 }, + ] + TrainLogTitle.value = 0 + }) +} const getmeterageList = () => { const params = { fileNo: '', // 编号 @@ -143,218 +160,251 @@ meterageTableData.value = res.data.rows }) } -getmeterageList() -getStatisticList() + +function calcBlockSize() { + // 计算工作台区域高度 - 顶部-面包屑-边距 + const bodyHeight = document.body.clientHeight - 60 - 50 - 20 + blockHeight.value = bodyHeight > 610 ? (bodyHeight - 10) / 2 : 300 + blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 + console.log(blockHeight.value, blockWidth.value - 20) +} +window.addEventListener('resize', () => { + calcBlockSize() +}) + +onMounted(() => { + calcBlockSize() + fetchMyTrainLog() // 获取我的培训考核 + getmeterageList() + getStatisticList() +}) - - - - - - - - - - - - - {{ item.text }} + + + + + + + + + + + + + + + + + + + {{ item.text }} + + + + + + + + + + + - - - - - - - - {{ item.name }} + + + + + + + + + + + + + + + + + + + + + {{ CertificateObject.lastValidDate }}天 + + + 最近到期时间 + {{ CertificateObject.validDate || '无' }} + - - - - - - - - - - - + - + + + + + + + - - - - {{ CertificateObject.lastValidDate }}天 - - - 最近到期时间 - {{ CertificateObject.validDate }} - - - - - - - - - - - - + + + + + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index 0763c5a..9ef0b93 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -19,7 +19,6 @@ const effectiveStatusName = ref('') const title = ref('') const fileList = ref([]) -console.log(sessionStorage.getItem(fileTypeName.value)) const ruleForm = reactive({ fileType: '', // 类型 fileTypeName: '', // 类型名称 不传 @@ -80,10 +79,9 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = '' + ruleForm.publisher = userInfo.$state.deptName ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 判断有无存储 - console.log(sessionStorage.getItem(fileTypeName.value), 'sess') if (sessionStorage.getItem(fileTypeName.value)) { const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string) ruleForm.fileType = session.fileType @@ -117,6 +115,8 @@ ruleForm.remark = row.remark ruleForm.publishTime = row.publishTime ruleForm.minioFileName = row.minioFileName + // ruleForm.publisher = '0' + // ruleForm.createUserId = '1' } } defineExpose({ initDialog }) @@ -148,6 +148,9 @@ type: 'warning', }, ).then((res) => { + if (ruleForm.publisher === userInfo.$state.deptName) { + ruleForm.publisher === userInfo.$state.deptId + } if (flag == '提交') { addApi(ruleForm).then((res) => { if (res.code == 200) { @@ -193,7 +196,6 @@ fd.append('multipartFile', event.target.files[0]) UploadFile(fd).then((res) => { if (res.code === 200) { - console.log(res.data[0]) ruleForm.minioFileName = res.data[0] // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') @@ -216,7 +218,6 @@ // ]) watch(() => ruleForm.effectiveTime, (newVal) => { const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour') - console.log(diffDat) if (diffDat < 0) { // ruleForm.effectiveStatusName = '已废止' effectiveStatusName.value = '在使用' @@ -237,7 +238,7 @@ - + 提交 @@ -278,12 +279,12 @@ - + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 44e3e4d..b45fbc3 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -324,22 +324,9 @@ - - - - - - 导出 - - - 打印 - + + + { - -} const fileRef = ref() // 文件上传input const onFileChange = (event: any) => { - // 原生上传图片 + // 原生上传 // console.log(event.target.files) // if (event.target.files[0].type === 'application/pdf') { if (event.target.files?.length !== 0) { @@ -264,7 +260,7 @@ - + @@ -287,19 +283,19 @@ v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" placeholder="实施时间" class="normal-date" - style="width: 155px;" + style="width: 185px;" /> - - + + @@ -310,7 +306,7 @@ - + () // from组件 @@ -31,11 +31,20 @@ technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }], }) // 表单验证规则 const userList = ref([]) // 用户列表 +// 获取计量人员列表 const getuser = () => { - getUserList({ offset: 1, limit: 99999 }).then((res) => { - userList.value = res.data.rows + getStaffList({ + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: ruleForm.value.deptId, // 所在部门 + limit: 999999, + offset: 1, + }).then((res) => { + if (res.code === 200) { + userList.value = res.data.records + } }) -} // 获取用户列表 +} const technologyJobList = ref<{ id: string;name: string;value: string }[]>([]) // 获取技术职务列表 const getTechnologyJobList = () => { @@ -50,7 +59,16 @@ administrationJobList.value = response.data }) } - +// 选择负责人自动填充职务信息 +const directorChange = (val: string) => { + const selectUser = userList.value.filter(item => item.name === val)[0] + getStaffDetail(selectUser).then((res) => { + if (res.code === 200) { + ruleForm.value.administrationJob = res.data.administrationJob + ruleForm.value.technologyJob = res.data.technologyJob + } + }) +} // 提交 const submitForm = async (formEl: FormInstance | undefined) => { if (!formEl) { return } @@ -95,12 +113,6 @@ const multipleTableRef = ref() const current = ref('') const changeList = ref() -// const searchQuery = ref({ -// limit: 10, -// offset: 1, -// total: 0, -// pageSizes: [10, 20, 30], -// }) // 部门列表数据 const changeList_bm = ref([ { @@ -410,20 +422,6 @@ } }) } -// const handleSizeChange = (val: number) => { -// searchQuery.value.limit = val -// getDepartmentList() -// getuserInfoList() -// getInstrumentInfo() -// getDeviceInfo() -// } -// const handleCurrentChange = (val: number) => { -// searchQuery.value.offset = val -// getDepartmentList() -// getuserInfoList() -// getInstrumentInfo() -// getDeviceInfo() -// } // 弹窗初始化 const initDialog = (row: any) => { reset() @@ -460,22 +458,17 @@ - - - - {{ title }} - - - - 提交 - - - 关闭 - - - + + + + 提交 + + + 关闭 + + - + @@ -487,7 +480,7 @@ - + @@ -509,10 +502,10 @@ - + - + @@ -532,7 +525,7 @@ - + @@ -540,85 +533,24 @@ - - - - - - - {{ item.name }} - - - - {{ current }} - - - - - - - - - - - - + + + + + + {{ item.name }} + + + + + + + + diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue index 9ad87af..aac1ef2 100644 --- a/src/views/measure/measureDept/components/templatePage.vue +++ b/src/views/measure/measureDept/components/templatePage.vue @@ -231,12 +231,14 @@ - + + + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + - diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 380779a..0916a59 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -9,6 +9,9 @@ import BenchCol from '@/components/benchCol/index.vue' import type { lineDataI, pieDataI } from '@/components/Echart/echart-interface' import useUserStore from '@/store/modules/user' +// 每个展示块高度 +const blockHeight = ref(300) +const blockWidth = ref(400) const { username } = useUserStore() const buttomTypes = ref([ { id: '1', text: '培训记录', url: '/train/trainLog' }, @@ -21,23 +24,23 @@ const tableData = ref([]) const meterageTableData = ref([]) const columns = ref([ - { text: '培训名称', value: 'planName', width: '110' }, + { text: '培训名称', value: 'planName' }, { text: '负责人', value: 'director', width: '120' }, - { text: '培训时间', value: 'trainTime' }, + { text: '培训时间', value: 'trainTime', width: '180' }, ]) const meterageColumns = ref([ - { text: '文件名称', value: 'fileName', width: '110' }, + { text: '文件名称', value: 'fileName' }, { text: '类别', value: 'fileTypeName', width: '110' }, - { text: '发布时间', value: 'publishTime' }, + { text: '发布时间', value: 'publishTime', width: '180' }, ]) const CertificateColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '证书名称', value: 'certificateName' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const CertificatesColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, + { text: '证书名称', value: 'certificateName' }, { text: '人员名称', value: 'name', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const StatisticxAxis: Ref = ref([]) const StatisticData: Ref = ref([]) @@ -106,20 +109,14 @@ const yValue = res.data.map((item: planReturn) => Number(item.count)) StaffSStatisticData.value = [{ name: '人数', data: yValue }] }) - const param = { - account: username, - } - getTrainLogSStatistic(param).then((res) => { - TrainLogSList.value = [ - { name: `合格 ${res.data.qualified}--${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, - { name: `不合格 ${res.data.notQualified}-- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, - ] - TrainLogTitle.value = res.data.trainCount - }) + // 返回值 interface CertificatReturn { lastValidDate: number } + const param = { + account: username, + } getCertificateStatistic(param).then((res) => { CertificateList.value = res.data CertificateObject.value = res.data.sort((nex: CertificatReturn, max: CertificatReturn) => { @@ -127,6 +124,26 @@ })[0] }) } + +function fetchMyTrainLog() { + const param = { + account: username, + } + getTrainLogSStatistic(param).then((res) => { + TrainLogSList.value = [ + { name: `合格 ${res.data.qualified}-${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, + { name: `不合格 ${res.data.notQualified}- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, + ] + TrainLogTitle.value = res.data.trainCount + }).catch((_) => { + // 处理异常 + TrainLogSList.value = [ + { name: '合格 0 - 50%', value: 0 }, + { name: '不合格 0 - 50%', value: 0 }, + ] + TrainLogTitle.value = 0 + }) +} const getmeterageList = () => { const params = { fileNo: '', // 编号 @@ -143,218 +160,251 @@ meterageTableData.value = res.data.rows }) } -getmeterageList() -getStatisticList() + +function calcBlockSize() { + // 计算工作台区域高度 - 顶部-面包屑-边距 + const bodyHeight = document.body.clientHeight - 60 - 50 - 20 + blockHeight.value = bodyHeight > 610 ? (bodyHeight - 10) / 2 : 300 + blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 + console.log(blockHeight.value, blockWidth.value - 20) +} +window.addEventListener('resize', () => { + calcBlockSize() +}) + +onMounted(() => { + calcBlockSize() + fetchMyTrainLog() // 获取我的培训考核 + getmeterageList() + getStatisticList() +}) - - - - - - - - - - - - - {{ item.text }} + + + + + + + + + + + + + + + + + + + {{ item.text }} + + + + + + + + + + + - - - - - - - - {{ item.name }} + + + + + + + + + + + + + + + + + + + + + {{ CertificateObject.lastValidDate }}天 + + + 最近到期时间 + {{ CertificateObject.validDate || '无' }} + - - - - - - - - - - - + - + + + + + + + - - - - {{ CertificateObject.lastValidDate }}天 - - - 最近到期时间 - {{ CertificateObject.validDate }} - - - - - - - - - - - - + + + + + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index 0763c5a..9ef0b93 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -19,7 +19,6 @@ const effectiveStatusName = ref('') const title = ref('') const fileList = ref([]) -console.log(sessionStorage.getItem(fileTypeName.value)) const ruleForm = reactive({ fileType: '', // 类型 fileTypeName: '', // 类型名称 不传 @@ -80,10 +79,9 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = '' + ruleForm.publisher = userInfo.$state.deptName ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 判断有无存储 - console.log(sessionStorage.getItem(fileTypeName.value), 'sess') if (sessionStorage.getItem(fileTypeName.value)) { const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string) ruleForm.fileType = session.fileType @@ -117,6 +115,8 @@ ruleForm.remark = row.remark ruleForm.publishTime = row.publishTime ruleForm.minioFileName = row.minioFileName + // ruleForm.publisher = '0' + // ruleForm.createUserId = '1' } } defineExpose({ initDialog }) @@ -148,6 +148,9 @@ type: 'warning', }, ).then((res) => { + if (ruleForm.publisher === userInfo.$state.deptName) { + ruleForm.publisher === userInfo.$state.deptId + } if (flag == '提交') { addApi(ruleForm).then((res) => { if (res.code == 200) { @@ -193,7 +196,6 @@ fd.append('multipartFile', event.target.files[0]) UploadFile(fd).then((res) => { if (res.code === 200) { - console.log(res.data[0]) ruleForm.minioFileName = res.data[0] // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') @@ -216,7 +218,6 @@ // ]) watch(() => ruleForm.effectiveTime, (newVal) => { const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour') - console.log(diffDat) if (diffDat < 0) { // ruleForm.effectiveStatusName = '已废止' effectiveStatusName.value = '在使用' @@ -237,7 +238,7 @@ - + 提交 @@ -278,12 +279,12 @@ - + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 44e3e4d..b45fbc3 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -324,22 +324,9 @@ - - - - - - 导出 - - - 打印 - + + + { - -} const fileRef = ref() // 文件上传input const onFileChange = (event: any) => { - // 原生上传图片 + // 原生上传 // console.log(event.target.files) // if (event.target.files[0].type === 'application/pdf') { if (event.target.files?.length !== 0) { @@ -264,7 +260,7 @@ - + @@ -287,19 +283,19 @@ v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" placeholder="实施时间" class="normal-date" - style="width: 155px;" + style="width: 185px;" /> - - + + @@ -310,7 +306,7 @@ - + () // from组件 @@ -31,11 +31,20 @@ technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }], }) // 表单验证规则 const userList = ref([]) // 用户列表 +// 获取计量人员列表 const getuser = () => { - getUserList({ offset: 1, limit: 99999 }).then((res) => { - userList.value = res.data.rows + getStaffList({ + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: ruleForm.value.deptId, // 所在部门 + limit: 999999, + offset: 1, + }).then((res) => { + if (res.code === 200) { + userList.value = res.data.records + } }) -} // 获取用户列表 +} const technologyJobList = ref<{ id: string;name: string;value: string }[]>([]) // 获取技术职务列表 const getTechnologyJobList = () => { @@ -50,7 +59,16 @@ administrationJobList.value = response.data }) } - +// 选择负责人自动填充职务信息 +const directorChange = (val: string) => { + const selectUser = userList.value.filter(item => item.name === val)[0] + getStaffDetail(selectUser).then((res) => { + if (res.code === 200) { + ruleForm.value.administrationJob = res.data.administrationJob + ruleForm.value.technologyJob = res.data.technologyJob + } + }) +} // 提交 const submitForm = async (formEl: FormInstance | undefined) => { if (!formEl) { return } @@ -95,12 +113,6 @@ const multipleTableRef = ref() const current = ref('') const changeList = ref() -// const searchQuery = ref({ -// limit: 10, -// offset: 1, -// total: 0, -// pageSizes: [10, 20, 30], -// }) // 部门列表数据 const changeList_bm = ref([ { @@ -410,20 +422,6 @@ } }) } -// const handleSizeChange = (val: number) => { -// searchQuery.value.limit = val -// getDepartmentList() -// getuserInfoList() -// getInstrumentInfo() -// getDeviceInfo() -// } -// const handleCurrentChange = (val: number) => { -// searchQuery.value.offset = val -// getDepartmentList() -// getuserInfoList() -// getInstrumentInfo() -// getDeviceInfo() -// } // 弹窗初始化 const initDialog = (row: any) => { reset() @@ -460,22 +458,17 @@ - - - - {{ title }} - - - - 提交 - - - 关闭 - - - + + + + 提交 + + + 关闭 + + - + @@ -487,7 +480,7 @@ - + @@ -509,10 +502,10 @@ - + - + @@ -532,7 +525,7 @@ - + @@ -540,85 +533,24 @@ - - - - - - - {{ item.name }} - - - - {{ current }} - - - - - - - - - - - - + + + + + + {{ item.name }} + + + + + + + + diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue index 9ad87af..aac1ef2 100644 --- a/src/views/measure/measureDept/components/templatePage.vue +++ b/src/views/measure/measureDept/components/templatePage.vue @@ -231,12 +231,14 @@ - + + + { if (res.code === 200) { - res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' })) + res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] })) list.value = res.data.records total.value = Number(res.data.total) } @@ -115,6 +115,7 @@ addRef.value.initDialog({ ...row, title: '详情', + name: props.isRemind ? '证书状况' : '证书记录', }) } // 编辑 @@ -123,6 +124,7 @@ addRef.value.initDialog({ ...row, title: '编辑', + name: props.isRemind ? '证书状况' : '证书记录', }) } @@ -193,6 +195,7 @@ dialogVisible.value = true addRef.value.initDialog({ title: '新建', + name: props.isRemind ? '证书状况' : '证书记录', }) } // 导出 @@ -292,21 +295,11 @@ - - 批量导入 - - - 模板下载 - - - 新建 - - - 导出 - - - 打印 - + + + + + - + 提醒 @@ -336,7 +329,7 @@ 详情 - + 删除 diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + - diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 380779a..0916a59 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -9,6 +9,9 @@ import BenchCol from '@/components/benchCol/index.vue' import type { lineDataI, pieDataI } from '@/components/Echart/echart-interface' import useUserStore from '@/store/modules/user' +// 每个展示块高度 +const blockHeight = ref(300) +const blockWidth = ref(400) const { username } = useUserStore() const buttomTypes = ref([ { id: '1', text: '培训记录', url: '/train/trainLog' }, @@ -21,23 +24,23 @@ const tableData = ref([]) const meterageTableData = ref([]) const columns = ref([ - { text: '培训名称', value: 'planName', width: '110' }, + { text: '培训名称', value: 'planName' }, { text: '负责人', value: 'director', width: '120' }, - { text: '培训时间', value: 'trainTime' }, + { text: '培训时间', value: 'trainTime', width: '180' }, ]) const meterageColumns = ref([ - { text: '文件名称', value: 'fileName', width: '110' }, + { text: '文件名称', value: 'fileName' }, { text: '类别', value: 'fileTypeName', width: '110' }, - { text: '发布时间', value: 'publishTime' }, + { text: '发布时间', value: 'publishTime', width: '180' }, ]) const CertificateColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '证书名称', value: 'certificateName' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const CertificatesColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, + { text: '证书名称', value: 'certificateName' }, { text: '人员名称', value: 'name', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const StatisticxAxis: Ref = ref([]) const StatisticData: Ref = ref([]) @@ -106,20 +109,14 @@ const yValue = res.data.map((item: planReturn) => Number(item.count)) StaffSStatisticData.value = [{ name: '人数', data: yValue }] }) - const param = { - account: username, - } - getTrainLogSStatistic(param).then((res) => { - TrainLogSList.value = [ - { name: `合格 ${res.data.qualified}--${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, - { name: `不合格 ${res.data.notQualified}-- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, - ] - TrainLogTitle.value = res.data.trainCount - }) + // 返回值 interface CertificatReturn { lastValidDate: number } + const param = { + account: username, + } getCertificateStatistic(param).then((res) => { CertificateList.value = res.data CertificateObject.value = res.data.sort((nex: CertificatReturn, max: CertificatReturn) => { @@ -127,6 +124,26 @@ })[0] }) } + +function fetchMyTrainLog() { + const param = { + account: username, + } + getTrainLogSStatistic(param).then((res) => { + TrainLogSList.value = [ + { name: `合格 ${res.data.qualified}-${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, + { name: `不合格 ${res.data.notQualified}- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, + ] + TrainLogTitle.value = res.data.trainCount + }).catch((_) => { + // 处理异常 + TrainLogSList.value = [ + { name: '合格 0 - 50%', value: 0 }, + { name: '不合格 0 - 50%', value: 0 }, + ] + TrainLogTitle.value = 0 + }) +} const getmeterageList = () => { const params = { fileNo: '', // 编号 @@ -143,218 +160,251 @@ meterageTableData.value = res.data.rows }) } -getmeterageList() -getStatisticList() + +function calcBlockSize() { + // 计算工作台区域高度 - 顶部-面包屑-边距 + const bodyHeight = document.body.clientHeight - 60 - 50 - 20 + blockHeight.value = bodyHeight > 610 ? (bodyHeight - 10) / 2 : 300 + blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 + console.log(blockHeight.value, blockWidth.value - 20) +} +window.addEventListener('resize', () => { + calcBlockSize() +}) + +onMounted(() => { + calcBlockSize() + fetchMyTrainLog() // 获取我的培训考核 + getmeterageList() + getStatisticList() +}) - - - - - - - - - - - - - {{ item.text }} + + + + + + + + + + + + + + + + + + + {{ item.text }} + + + + + + + + + + + - - - - - - - - {{ item.name }} + + + + + + + + + + + + + + + + + + + + + {{ CertificateObject.lastValidDate }}天 + + + 最近到期时间 + {{ CertificateObject.validDate || '无' }} + - - - - - - - - - - - + - + + + + + + + - - - - {{ CertificateObject.lastValidDate }}天 - - - 最近到期时间 - {{ CertificateObject.validDate }} - - - - - - - - - - - - + + + + + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index 0763c5a..9ef0b93 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -19,7 +19,6 @@ const effectiveStatusName = ref('') const title = ref('') const fileList = ref([]) -console.log(sessionStorage.getItem(fileTypeName.value)) const ruleForm = reactive({ fileType: '', // 类型 fileTypeName: '', // 类型名称 不传 @@ -80,10 +79,9 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = '' + ruleForm.publisher = userInfo.$state.deptName ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 判断有无存储 - console.log(sessionStorage.getItem(fileTypeName.value), 'sess') if (sessionStorage.getItem(fileTypeName.value)) { const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string) ruleForm.fileType = session.fileType @@ -117,6 +115,8 @@ ruleForm.remark = row.remark ruleForm.publishTime = row.publishTime ruleForm.minioFileName = row.minioFileName + // ruleForm.publisher = '0' + // ruleForm.createUserId = '1' } } defineExpose({ initDialog }) @@ -148,6 +148,9 @@ type: 'warning', }, ).then((res) => { + if (ruleForm.publisher === userInfo.$state.deptName) { + ruleForm.publisher === userInfo.$state.deptId + } if (flag == '提交') { addApi(ruleForm).then((res) => { if (res.code == 200) { @@ -193,7 +196,6 @@ fd.append('multipartFile', event.target.files[0]) UploadFile(fd).then((res) => { if (res.code === 200) { - console.log(res.data[0]) ruleForm.minioFileName = res.data[0] // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') @@ -216,7 +218,6 @@ // ]) watch(() => ruleForm.effectiveTime, (newVal) => { const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour') - console.log(diffDat) if (diffDat < 0) { // ruleForm.effectiveStatusName = '已废止' effectiveStatusName.value = '在使用' @@ -237,7 +238,7 @@ - + 提交 @@ -278,12 +279,12 @@ - + diff --git a/src/views/measure/file/components/approve/templatePage.vue b/src/views/measure/file/components/approve/templatePage.vue index 44e3e4d..b45fbc3 100644 --- a/src/views/measure/file/components/approve/templatePage.vue +++ b/src/views/measure/file/components/approve/templatePage.vue @@ -324,22 +324,9 @@ - - - - - - 导出 - - - 打印 - + + + { - -} const fileRef = ref() // 文件上传input const onFileChange = (event: any) => { - // 原生上传图片 + // 原生上传 // console.log(event.target.files) // if (event.target.files[0].type === 'application/pdf') { if (event.target.files?.length !== 0) { @@ -264,7 +260,7 @@ - + @@ -287,19 +283,19 @@ v-model="searchQuery.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" placeholder="实施时间" class="normal-date" - style="width: 155px;" + style="width: 185px;" /> - - + + @@ -310,7 +306,7 @@ - + () // from组件 @@ -31,11 +31,20 @@ technologyJob: [{ required: true, message: '技术职务不能为空', trigger: 'blur' }], }) // 表单验证规则 const userList = ref([]) // 用户列表 +// 获取计量人员列表 const getuser = () => { - getUserList({ offset: 1, limit: 99999 }).then((res) => { - userList.value = res.data.rows + getStaffList({ + staffNo: '', // 人员编号 + name: '', // 姓名 + deptId: ruleForm.value.deptId, // 所在部门 + limit: 999999, + offset: 1, + }).then((res) => { + if (res.code === 200) { + userList.value = res.data.records + } }) -} // 获取用户列表 +} const technologyJobList = ref<{ id: string;name: string;value: string }[]>([]) // 获取技术职务列表 const getTechnologyJobList = () => { @@ -50,7 +59,16 @@ administrationJobList.value = response.data }) } - +// 选择负责人自动填充职务信息 +const directorChange = (val: string) => { + const selectUser = userList.value.filter(item => item.name === val)[0] + getStaffDetail(selectUser).then((res) => { + if (res.code === 200) { + ruleForm.value.administrationJob = res.data.administrationJob + ruleForm.value.technologyJob = res.data.technologyJob + } + }) +} // 提交 const submitForm = async (formEl: FormInstance | undefined) => { if (!formEl) { return } @@ -95,12 +113,6 @@ const multipleTableRef = ref() const current = ref('') const changeList = ref() -// const searchQuery = ref({ -// limit: 10, -// offset: 1, -// total: 0, -// pageSizes: [10, 20, 30], -// }) // 部门列表数据 const changeList_bm = ref([ { @@ -410,20 +422,6 @@ } }) } -// const handleSizeChange = (val: number) => { -// searchQuery.value.limit = val -// getDepartmentList() -// getuserInfoList() -// getInstrumentInfo() -// getDeviceInfo() -// } -// const handleCurrentChange = (val: number) => { -// searchQuery.value.offset = val -// getDepartmentList() -// getuserInfoList() -// getInstrumentInfo() -// getDeviceInfo() -// } // 弹窗初始化 const initDialog = (row: any) => { reset() @@ -460,22 +458,17 @@ - - - - {{ title }} - - - - 提交 - - - 关闭 - - - + + + + 提交 + + + 关闭 + + - + @@ -487,7 +480,7 @@ - + @@ -509,10 +502,10 @@ - + - + @@ -532,7 +525,7 @@ - + @@ -540,85 +533,24 @@ - - - - - - - {{ item.name }} - - - - {{ current }} - - - - - - - - - - - - + + + + + + {{ item.name }} + + + + + + + + diff --git a/src/views/measure/measureDept/components/templatePage.vue b/src/views/measure/measureDept/components/templatePage.vue index 9ad87af..aac1ef2 100644 --- a/src/views/measure/measureDept/components/templatePage.vue +++ b/src/views/measure/measureDept/components/templatePage.vue @@ -231,12 +231,14 @@ - + + + { if (res.code === 200) { - res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效' })) + res.data.records = res.data.records.map(item => ({ ...item, sex: item.sex == '1' ? '男' : '女', certificateStatus: item.certificateStatus == '0' ? '正常' : '已失效', validDate: item.validDate.split(' ')[0], certificateDate: item.certificateDate.split(' ')[0] })) list.value = res.data.records total.value = Number(res.data.total) } @@ -115,6 +115,7 @@ addRef.value.initDialog({ ...row, title: '详情', + name: props.isRemind ? '证书状况' : '证书记录', }) } // 编辑 @@ -123,6 +124,7 @@ addRef.value.initDialog({ ...row, title: '编辑', + name: props.isRemind ? '证书状况' : '证书记录', }) } @@ -193,6 +195,7 @@ dialogVisible.value = true addRef.value.initDialog({ title: '新建', + name: props.isRemind ? '证书状况' : '证书记录', }) } // 导出 @@ -292,21 +295,11 @@ - - 批量导入 - - - 模板下载 - - - 新建 - - - 导出 - - - 打印 - + + + + + - + 提醒 @@ -336,7 +329,7 @@ 详情 - + 删除 diff --git a/src/views/measure/person/components/addPerson.vue b/src/views/measure/person/components/addPerson.vue index 4dc1b17..4352604 100644 --- a/src/views/measure/person/components/addPerson.vue +++ b/src/views/measure/person/components/addPerson.vue @@ -69,7 +69,16 @@ const IdCard = ruleForm.value.idCard const birthday = `${IdCard.substring(6, 10)}-${IdCard.substring(10, 12)}` ruleForm.value.birthday = birthday - console.log(ruleForm.value) + // 获取性别 第17位 奇数为男 偶数为女 + // ruleForm.value.sex + if (Number(IdCard.substring(16, 17)) % 2) { + // 男 + ruleForm.value.sex = '1' + } + else { + // 女 + ruleForm.value.sex = '2' + } }) } const dialogVisible = ref(false) // 弹窗显示 @@ -130,7 +139,6 @@ technologyExam: '', // 技术考核 remark: '', // 备注 certificateList: [], // 证书列表 - } } const technologyJobList = ref([]) @@ -309,7 +317,7 @@ } (title.value === '新建' ? getStaffAdd - : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data }).then((res) => { + : getStaffupdate) ({ ...ruleForm.value, certificateList: changeList.value[0].data, birthday: `${ruleForm.value.idCard.substring(6, 10)}-${ruleForm.value.idCard.substring(10, 12)}-${ruleForm.value.idCard.substring(12, 14)}` }).then((res) => { if (res.code == 200) { formEl?.resetFields() ElMessage.success('提交成功') @@ -332,12 +340,14 @@ emits('resetData') resetFormData() } +const selectTreeRef = ref() // 弹窗初始化 const initDialog = (row: any) => { changeList.value[0].data = [] dialogVisible.value = true title.value = row.title resetFormData() + selectTreeRef.value?.clearSelected() getuser() getPubList() getSexList() @@ -370,20 +380,15 @@ - - - - 计量人员-{{ title }} - - - - 完成 - - - 关闭 - - - + + + + 完成 + + + 关闭 + + @@ -394,6 +399,7 @@ :http-request="uploadQuarterlyEvaluateFile" :before-upload="beforeAvatarUpload" :disabled="title === '详情'" + accept="image/png, image/jpeg,image/jpg" > @@ -425,8 +431,8 @@ @@ -489,29 +495,19 @@ - - - - - - {{ current }} - - - - 删除行 - - - 添加行 - - - 编辑行 - - - + + + + + 删除行 + + + 添加行 + + + 编辑行 + + @@ -523,7 +519,7 @@ - + @@ -532,77 +528,38 @@ @@ -624,8 +581,8 @@ .el-icon.avatar-uploader-icon { font-size: 28px; color: #8c939d; - width: 220px; - height: 320px; + width: 190px; + height: 250px; text-align: center; } diff --git a/src/assets/icons/icon-book.svg b/src/assets/icons/icon-book.svg new file mode 100644 index 0000000..18760fe --- /dev/null +++ b/src/assets/icons/icon-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-certi.svg b/src/assets/icons/icon-certi.svg new file mode 100644 index 0000000..8615630 --- /dev/null +++ b/src/assets/icons/icon-certi.svg @@ -0,0 +1 @@ + diff --git a/src/assets/icons/icon-line.svg b/src/assets/icons/icon-line.svg new file mode 100644 index 0000000..f471055 --- /dev/null +++ b/src/assets/icons/icon-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/icon-pie.svg b/src/assets/icons/icon-pie.svg new file mode 100644 index 0000000..5ba1903 --- /dev/null +++ b/src/assets/icons/icon-pie.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/styles/element-plus/index.scss b/src/assets/styles/element-plus/index.scss index 6dc95ed..da02197 100644 --- a/src/assets/styles/element-plus/index.scss +++ b/src/assets/styles/element-plus/index.scss @@ -4,9 +4,14 @@ "base": #4384ff ) ), + $fill-color:( + "lighter":#f2f6ff + ), $table:( "header-bg-color":#f2f6ff, - "header-text-color":#444c59 + "header-text-color":#444c59, + "row-hover-bg-color":#f2f6ff, + ), $menu:( "base-level-padding": 15px, diff --git a/src/components.d.ts b/src/components.d.ts index f7ffd79..815d62f 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -22,6 +22,7 @@ Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] + DetailBlockSwitch: typeof import('./components/DetailPage/DetailBlockSwitch.vue')['default'] DetailPage: typeof import('./components/DetailPage/index.vue')['default'] Editor: typeof import('./components/Editor/index.vue')['default'] EmployeesDialog: typeof import('./components/dialog/employeesDialog.vue')['default'] diff --git a/src/components/DetailPage/DetailBlockSwitch.vue b/src/components/DetailPage/DetailBlockSwitch.vue new file mode 100644 index 0000000..4d92074 --- /dev/null +++ b/src/components/DetailPage/DetailBlockSwitch.vue @@ -0,0 +1,71 @@ + + + + + + + + + + {{ title }} + + + + + + + + + + + + diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index ce5d797..ca9df2c 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -32,7 +32,7 @@ top: 50, left: 10, right: 20, - bottom: 5, + bottom: 10, containLabel: true, // 是否包含坐标轴的刻度标签 } }, @@ -244,7 +244,7 @@ splitLine: { show: true, lineStyle: { - color: ['#7a6b74'], + color: ['#bfbfbf'], type: 'dashed', }, }, @@ -324,8 +324,11 @@ // 刷新图表 function refreshChart() { if (chart) { + console.log('渲染折线图') + const option = buildOption() chart.setOption(option as unknown as ECBasicOption, true) + chart.resize() } } diff --git a/src/components/Echart/PieChart.vue b/src/components/Echart/PieChart.vue index 4b1aa79..74d506a 100644 --- a/src/components/Echart/PieChart.vue +++ b/src/components/Echart/PieChart.vue @@ -1,6 +1,6 @@ - - - + + + + + + {{ title }} - - 更多 > + + 更多 > - + + + diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts index d6c1c91..1644a80 100644 --- a/src/router/modules/device.ts +++ b/src/router/modules/device.ts @@ -314,6 +314,39 @@ }, ], }, + { + path: '/borrow', + component: Layout, + redirect: '/device/borrow/borrowapply', + name: 'Borrow', + meta: { + title: '设备领用', + icon: 'ep:key', + auth: '/device/borrow', + }, + children: [ + { + path: 'borrowapply', + name: 'borroWapply', + component: () => import('@/views/device/borrow/borrwoApply.vue'), + meta: { + title: '设备借用申请', + icon: 'ep:key', + auth: '/device/borrow/borrowapply', + }, + }, + { + path: 'borrowhandle', + name: 'borrowHandle', + component: () => import('@/views/device/borrow/borrowHandle.vue'), + meta: { + title: '设备借用处理', + icon: 'ep:key', + auth: '/device/borrow/borrowhandle', + }, + }, + ], + }, ] diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts index f8c750b..3676c67 100644 --- a/src/router/modules/measure.ts +++ b/src/router/modules/measure.ts @@ -23,6 +23,7 @@ auth: '/measure/bench', sidebar: false, breadcrumb: true, + activeMenu: '/bench', }, }, ], diff --git a/src/views/device/borrow/borrowHandle.vue b/src/views/device/borrow/borrowHandle.vue new file mode 100644 index 0000000..1c2405e --- /dev/null +++ b/src/views/device/borrow/borrowHandle.vue @@ -0,0 +1,13 @@ + + + + + 设备借用处理 + + + + diff --git a/src/views/device/borrow/borrwoApply.vue b/src/views/device/borrow/borrwoApply.vue new file mode 100644 index 0000000..03d414b --- /dev/null +++ b/src/views/device/borrow/borrwoApply.vue @@ -0,0 +1,13 @@ + + + + + 设备借用申请 + + + + diff --git a/src/views/device/standingBook/components/baseInfo.vue b/src/views/device/standingBook/components/baseInfo.vue index c2682fc..5f7b347 100644 --- a/src/views/device/standingBook/components/baseInfo.vue +++ b/src/views/device/standingBook/components/baseInfo.vue @@ -339,381 +339,374 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 扫描 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 扫描 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} - - 暂无 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ ruleForm.fileList[0]?.minioFileName ? '更换' : '上传' }} + + 暂无 + + + + + + + + + + + + - diff --git a/src/views/measure/bench/bench.vue b/src/views/measure/bench/bench.vue index 380779a..0916a59 100644 --- a/src/views/measure/bench/bench.vue +++ b/src/views/measure/bench/bench.vue @@ -9,6 +9,9 @@ import BenchCol from '@/components/benchCol/index.vue' import type { lineDataI, pieDataI } from '@/components/Echart/echart-interface' import useUserStore from '@/store/modules/user' +// 每个展示块高度 +const blockHeight = ref(300) +const blockWidth = ref(400) const { username } = useUserStore() const buttomTypes = ref([ { id: '1', text: '培训记录', url: '/train/trainLog' }, @@ -21,23 +24,23 @@ const tableData = ref([]) const meterageTableData = ref([]) const columns = ref([ - { text: '培训名称', value: 'planName', width: '110' }, + { text: '培训名称', value: 'planName' }, { text: '负责人', value: 'director', width: '120' }, - { text: '培训时间', value: 'trainTime' }, + { text: '培训时间', value: 'trainTime', width: '180' }, ]) const meterageColumns = ref([ - { text: '文件名称', value: 'fileName', width: '110' }, + { text: '文件名称', value: 'fileName' }, { text: '类别', value: 'fileTypeName', width: '110' }, - { text: '发布时间', value: 'publishTime' }, + { text: '发布时间', value: 'publishTime', width: '180' }, ]) const CertificateColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '证书名称', value: 'certificateName' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const CertificatesColumns = ref([ - { text: '证书名称', value: 'certificateName', width: '110' }, + { text: '证书名称', value: 'certificateName' }, { text: '人员名称', value: 'name', width: '110' }, - { text: '到期时间', value: 'validDate' }, + { text: '到期时间', value: 'validDate', width: '180' }, ]) const StatisticxAxis: Ref = ref([]) const StatisticData: Ref = ref([]) @@ -106,20 +109,14 @@ const yValue = res.data.map((item: planReturn) => Number(item.count)) StaffSStatisticData.value = [{ name: '人数', data: yValue }] }) - const param = { - account: username, - } - getTrainLogSStatistic(param).then((res) => { - TrainLogSList.value = [ - { name: `合格 ${res.data.qualified}--${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, - { name: `不合格 ${res.data.notQualified}-- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, - ] - TrainLogTitle.value = res.data.trainCount - }) + // 返回值 interface CertificatReturn { lastValidDate: number } + const param = { + account: username, + } getCertificateStatistic(param).then((res) => { CertificateList.value = res.data CertificateObject.value = res.data.sort((nex: CertificatReturn, max: CertificatReturn) => { @@ -127,6 +124,26 @@ })[0] }) } + +function fetchMyTrainLog() { + const param = { + account: username, + } + getTrainLogSStatistic(param).then((res) => { + TrainLogSList.value = [ + { name: `合格 ${res.data.qualified}-${(res.data.qualifiedCount / res.data.trainCount) * 100}%`, value: res.data.qualified }, + { name: `不合格 ${res.data.notQualified}- ${((res.data.notQualified / res.data.trainCount) * 100)}%`, value: res.data.notQualified }, + ] + TrainLogTitle.value = res.data.trainCount + }).catch((_) => { + // 处理异常 + TrainLogSList.value = [ + { name: '合格 0 - 50%', value: 0 }, + { name: '不合格 0 - 50%', value: 0 }, + ] + TrainLogTitle.value = 0 + }) +} const getmeterageList = () => { const params = { fileNo: '', // 编号 @@ -143,218 +160,251 @@ meterageTableData.value = res.data.rows }) } -getmeterageList() -getStatisticList() + +function calcBlockSize() { + // 计算工作台区域高度 - 顶部-面包屑-边距 + const bodyHeight = document.body.clientHeight - 60 - 50 - 20 + blockHeight.value = bodyHeight > 610 ? (bodyHeight - 10) / 2 : 300 + blockWidth.value = (document.body.clientWidth - 180 - 20 - 20) / 3 + console.log(blockHeight.value, blockWidth.value - 20) +} +window.addEventListener('resize', () => { + calcBlockSize() +}) + +onMounted(() => { + calcBlockSize() + fetchMyTrainLog() // 获取我的培训考核 + getmeterageList() + getStatisticList() +}) - - - - - - - - - - - - - {{ item.text }} + + + + + + + + + + + + + + + + + + + {{ item.text }} + + + + + + + + + + + - - - - - - - - {{ item.name }} + + + + + + + + + + + + + + + + + + + + + {{ CertificateObject.lastValidDate }}天 + + + 最近到期时间 + {{ CertificateObject.validDate || '无' }} + - - - - - - - - - - - + - + + + + + + + - - - - {{ CertificateObject.lastValidDate }}天 - - - 最近到期时间 - {{ CertificateObject.validDate }} - - - - - - - - - - - - + + + + + diff --git a/src/views/measure/file/components/addDialog.vue b/src/views/measure/file/components/addDialog.vue index 0763c5a..9ef0b93 100644 --- a/src/views/measure/file/components/addDialog.vue +++ b/src/views/measure/file/components/addDialog.vue @@ -19,7 +19,6 @@ const effectiveStatusName = ref('') const title = ref('') const fileList = ref([]) -console.log(sessionStorage.getItem(fileTypeName.value)) const ruleForm = reactive({ fileType: '', // 类型 fileTypeName: '', // 类型名称 不传 @@ -80,10 +79,9 @@ if (row.title === '新建') { // 默认发布人和发布单位 ruleForm.createUserId = userInfo.$state.id - ruleForm.publisher = '' + ruleForm.publisher = userInfo.$state.deptName ruleForm.publishTime = dayjs().format('YYYY-MM-DD HH:mm:ss') // 判断有无存储 - console.log(sessionStorage.getItem(fileTypeName.value), 'sess') if (sessionStorage.getItem(fileTypeName.value)) { const session = JSON.parse(sessionStorage.getItem(fileTypeName.value) as string) ruleForm.fileType = session.fileType @@ -117,6 +115,8 @@ ruleForm.remark = row.remark ruleForm.publishTime = row.publishTime ruleForm.minioFileName = row.minioFileName + // ruleForm.publisher = '0' + // ruleForm.createUserId = '1' } } defineExpose({ initDialog }) @@ -148,6 +148,9 @@ type: 'warning', }, ).then((res) => { + if (ruleForm.publisher === userInfo.$state.deptName) { + ruleForm.publisher === userInfo.$state.deptId + } if (flag == '提交') { addApi(ruleForm).then((res) => { if (res.code == 200) { @@ -193,7 +196,6 @@ fd.append('multipartFile', event.target.files[0]) UploadFile(fd).then((res) => { if (res.code === 200) { - console.log(res.data[0]) ruleForm.minioFileName = res.data[0] // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') @@ -216,7 +218,6 @@ // ]) watch(() => ruleForm.effectiveTime, (newVal) => { const diffDat = dayjs(newVal).diff(dayjs().format('YYYY-MM-DD HH:mm:ss'), 'hour') - console.log(diffDat) if (diffDat < 0) { // ruleForm.effectiveStatusName = '已废止' effectiveStatusName.value = '在使用' @@ -237,7 +238,7 @@ - + 提交 @@ -278,12 +279,12 @@ - +